403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.217.33
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/ports/textproc/wordnet/files/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/ports/textproc/wordnet/files/patch-src__wnb_2
This patch makes wnb use man(1) to access its own man-pages instead
of relying on textual copies of them being in the $resourcedir.

Similarly, it looks for the compiled-in license instead of opening
its textual copy.

These leave wn.xbm as the only "resource" file, thus removing the need
for a separate resource directory. FreeBSD port installs all -- the
dictionaries and the bitmap into ${PREFIX}/share/WordNet.

	-mi

--- src/wnb	Tue Jun  7 15:19:22 2005
+++ src/wnb	Sun Jan 15 07:42:38 2006
@@ -103,9 +100,14 @@
 
 if {$tcl_platform(platform) == "unix"} {
-   if {[lsearch -exact [array names env] WNHOME] == -1} {
-	set resourcedir "/usr/local/WordNet-3.0/lib/wnres"
-   } else {
-	set resourcedir "$env(WNHOME)/lib/wnres"
+   set resourcedirs {
+	/usr/local/WordNet
+   }
+   if {[info exists env(WNHOME)]} {
+	lappend resourcedirs $env(WNHOME) $env(WNHOME)/lib/wnres
    }
+   foreach resourcedir $resourcedirs {
+	if {[file exists $resourcedir/wn.xbm]} break
+   }
+   unset resourcedirs
    set configfile "$env(HOME)/.wnrc"
    if [ file exists $configfile ] {
@@ -575,7 +578,19 @@
    .$w.top.text configure \
       -state normal
-   set fileid [open $filename "r"]
-   set filetext [read $fileid]
-   close $fileid
+   switch -glob -- $filename {
+      *.man {
+	set manpage [file tail $filename]
+	set manpage [string range $manpage 0 end-4]
+	set fileid [open "|man $manpage"]
+      } */license.txt {
+	set filetext [wnlicense]
+      } default {
+	set fileid [open $filename]
+      }
+   }
+   if {[info exists fileid]} {
+	set filetext [read $fileid]
+	close $fileid
+   }
    regsub -all ".\b" $filetext "" filetext
    .$w.top.text insert end $filetext

Youez - 2016 - github.com/yon3zu
LinuXploit