[w3m-dev 00720] dirlist.cgi

From: Hironori Sakamoto (h-saka@lsi.nec.co.jp)
Date: Thu May 25 2000 - 22:15:40 CDT


$B:dK\$G$9!#(B

dirlist.cgi $B$r=$@5$7$F!"%D%j!<9=B$$N>l9g$K(B
$BA*Br$7$?%G%#%l%/%H%j$N0LCV$KHt$VMM$K$7$^$7$?!#(B
$B$^$?!"(BCLEAR_BUF $B$b$"$k$N$G(B DELETE_PREVBUF $B$O;_$a$^$7$?!#(B
-----------------------------------
$B:dK\(B $B9@B'(B <hsaka@mth.biglobe.ne.jp>
 http://www2u.biglobe.ne.jp/~hsaka/

--- file.c.orig Thu May 25 12:13:56 2000
+++ file.c Fri May 26 10:17:17 2000
@@ -792,6 +792,7 @@
                         Str tmp = Strnew_charp(DirBufferCommand);
                         Strcat_char(tmp, '?');
                         Strcat_charp(tmp, pu.file);
+ Strcat_charp(tmp, "#current");
                         return loadGeneralFile(tmp->ptr, NULL, NO_REFERER, 0, NULL);
                     }
                     else {
--- scripts/dirlist.cgi.orig Wed May 24 11:01:33 2000
+++ scripts/dirlist.cgi Fri May 26 10:20:45 2000
@@ -85,9 +85,9 @@
   exit 1;
 }
 
-($cgi > 0) && print <<EOF;
-w3m-control: DELETE_PREVBUF
-EOF
+# ($cgi > 0) && print <<EOF;
+# w3m-control: DELETE_PREVBUF
+# EOF
 print <<EOF;
 Content-Type: text/html
 
@@ -118,9 +118,11 @@
   $q = &html_quote("$ROOT$_");
   $e = &html_quote(&form_encode("$ROOT$_"));
   if ($dir =~ m@^$@) {
- print "<a name=\"current\"></a>";
+ $n = "\" name=\"current";
+ } else {
+ $n = '';
   }
- printf("$AFMT\n", "$CGI?dir=$e#current", "<b>$q</b>");
+ printf("$AFMT\n", "$CGI?dir=$e#current$n", "<b>$q</b>");
   $N = 0;
   $SKIPLINE = "";
 
@@ -183,10 +185,12 @@
     if (!$ok && $_ eq $sdirs[0]) {
       $d = $dir0 . shift @sdirs;
       if (!@sdirs) {
- print "<a name=\"current\"></a>";
+ $n = "\" name=\"current";
         $SKIPLINE = "\n" x $N;
+ } else {
+ $n = '';
       }
- printf("${pre}o-$AFMT\n", "$CGI?dir=$edir$e#current", "<b>$q</b>");
+ printf("${pre}o-$AFMT\n", "$CGI?dir=$edir$e#current$n", "<b>$q</b>");
       &left_dir(@cdirs ? "$pre| " : "$pre ", $d, @sdirs);
       $ok = 1;
     } else {
--- scripts/dirlist.in.orig Fri Mar 31 15:55:09 2000
+++ scripts/dirlist.in Fri May 26 10:21:13 2000
@@ -85,9 +85,9 @@
   exit 1;
 }
 
-($cgi > 0) && print <<EOF;
-w3m-control: DELETE_PREVBUF
-EOF
+# ($cgi > 0) && print <<EOF;
+# w3m-control: DELETE_PREVBUF
+# EOF
 print <<EOF;
 Content-Type: text/html
 
@@ -118,9 +118,11 @@
   $q = &html_quote("$ROOT$_");
   $e = &html_quote(&form_encode("$ROOT$_"));
   if ($dir =~ m@^$@) {
- print "<a name=\"current\"></a>";
+ $n = "\" name=\"current";
+ } else {
+ $n = '';
   }
- printf("$AFMT\n", "$CGI?dir=$e#current", "<b>$q</b>");
+ printf("$AFMT\n", "$CGI?dir=$e#current$n", "<b>$q</b>");
   $N = 0;
   $SKIPLINE = "";
 
@@ -183,10 +185,12 @@
     if (!$ok && $_ eq $sdirs[0]) {
       $d = $dir0 . shift @sdirs;
       if (!@sdirs) {
- print "<a name=\"current\"></a>";
+ $n = "\" name=\"current";
         $SKIPLINE = "\n" x $N;
+ } else {
+ $n = '';
       }
- printf("${pre}o-$AFMT\n", "$CGI?dir=$edir$e#current", "<b>$q</b>");
+ printf("${pre}o-$AFMT\n", "$CGI?dir=$edir$e#current$n", "<b>$q</b>");
       &left_dir(@cdirs ? "$pre| " : "$pre ", $d, @sdirs);
       $ok = 1;
     } else {



This archive was generated by hypermail 2b29 : Wed Jul 19 2000 - 10:30:56 CDT