diff options
author | Tatsuya Kinoshita <tats@vega.ocn.ne.jp> | 2011-05-04 07:23:02 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@vega.ocn.ne.jp> | 2011-05-04 07:23:02 +0000 |
commit | 6db339b3d7a391f196e7c4b725a4ed0bd00f31cf (patch) | |
tree | 7d6fed976b72694d61fc595a745d394e1cd6e1a5 /scripts | |
parent | Adding upstream version 0.5.1 (diff) | |
download | w3m-ccf18a19b50f0eacd262d543e4afadc67ef14b31.tar.gz w3m-ccf18a19b50f0eacd262d543e4afadc67ef14b31.zip |
Adding upstream version 0.5.2upstream/0.5.2
Diffstat (limited to '')
-rw-r--r-- | scripts/Makefile.in | 1 | ||||
-rw-r--r-- | scripts/multipart/Makefile.in | 1 | ||||
-rw-r--r-- | scripts/w3mhelp.cgi.in | 3 | ||||
-rwxr-xr-x | scripts/w3mmail.cgi.in | 3 | ||||
-rw-r--r-- | scripts/w3mman/Makefile.in | 1 | ||||
-rw-r--r-- | scripts/w3mman/w3mman.1.in | 11 | ||||
-rw-r--r-- | scripts/w3mman/w3mman.in | 5 | ||||
-rw-r--r-- | scripts/w3mman/w3mman2html.cgi.in | 47 |
8 files changed, 53 insertions, 19 deletions
diff --git a/scripts/Makefile.in b/scripts/Makefile.in index c90ab2e..7efcb24 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -8,6 +8,7 @@ top_srcdir=@top_srcdir@ VPATH= $(srcdir):. prefix = @prefix@ exec_prefix = @exec_prefix@ +datarootdir = @datarootdir@ bindir = @bindir@ datadir = @datadir@ libdir = @libdir@ diff --git a/scripts/multipart/Makefile.in b/scripts/multipart/Makefile.in index ad472ee..20af165 100644 --- a/scripts/multipart/Makefile.in +++ b/scripts/multipart/Makefile.in @@ -8,6 +8,7 @@ top_srcdir=@top_srcdir@ VPATH= $(srcdir):. prefix = @prefix@ exec_prefix = @exec_prefix@ +datarootdir = @datarootdir@ bindir = @bindir@ datadir = @datadir@ libdir = @libdir@ diff --git a/scripts/w3mhelp.cgi.in b/scripts/w3mhelp.cgi.in index 135b835..b2fca8f 100644 --- a/scripts/w3mhelp.cgi.in +++ b/scripts/w3mhelp.cgi.in @@ -1,11 +1,12 @@ #!@PERL@ -# $Id: w3mhelp.cgi.in,v 1.28 2004/03/22 17:03:13 ukai Exp $ +# $Id: w3mhelp.cgi.in,v 1.29 2007/05/29 11:50:24 inu Exp $ if ( $^O =~ /^(ms)?(dos|win(32|nt)?)/i ) { $CYGPATH = 1; } $prefix = "@prefix@"; +$datarootdir = "@datarootdir@"; $helpdir = "@HELP_DIR@"; if ($CYGPATH) { $helpdir = &cygwin_pathconv($helpdir); diff --git a/scripts/w3mmail.cgi.in b/scripts/w3mmail.cgi.in index 670f26c..02fabd8 100755 --- a/scripts/w3mmail.cgi.in +++ b/scripts/w3mmail.cgi.in @@ -1,6 +1,6 @@ #!@PERL@ -$rcsid = q$Id: w3mmail.cgi.in,v 1.13 2003/09/22 21:02:29 ukai Exp $; +$rcsid = q$Id: w3mmail.cgi.in,v 1.14 2004/08/30 16:32:24 ukai Exp $; ($id = $rcsid) =~ s/^.*,v ([\d\.]*).*/$1/; ($prog=$0) =~ s/.*\///; @@ -180,6 +180,7 @@ if ($query =~ s/^\w+://) { } } ($cs,$cte,$body) = &lang_body($body, 1); + $body =~ s/\r//g; print MAIL "Mime-Version: 1.0\n"; if ($boundary) { print MAIL "Content-Type: multipart/form-data;\n"; diff --git a/scripts/w3mman/Makefile.in b/scripts/w3mman/Makefile.in index ab941c5..6c567c7 100644 --- a/scripts/w3mman/Makefile.in +++ b/scripts/w3mman/Makefile.in @@ -8,6 +8,7 @@ top_srcdir=@top_srcdir@ VPATH= $(srcdir):. prefix = @prefix@ exec_prefix = @exec_prefix@ +datarootdir = @datarootdir@ bindir = @bindir@ datadir = @datadir@ libdir = @libdir@ diff --git a/scripts/w3mman/w3mman.1.in b/scripts/w3mman/w3mman.1.in index eb30237..1c0361d 100644 --- a/scripts/w3mman/w3mman.1.in +++ b/scripts/w3mman/w3mman.1.in @@ -1,4 +1,4 @@ -.TH W3MMAN 1 "Mar 14, 2002" +.TH W3MMAN 1 "Nov 5, 2005" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: @@ -19,6 +19,9 @@ w3mman \- an interface to the on-line reference manuals by w3m(1) .br .B w3mman .RI "[-M " path "] -k " keyword +.br +.B w3mman +.RI -l " file .SH DESCRIPTION .B w3mman is the system's manual pager by @@ -31,9 +34,13 @@ Specify .I path as MANPATH. .TP -.B \-k " keyword" +.BI \-k " keyword" Specify .I keyword. +.TP +.BI \-l " file" +Specify a +.I file. .SH ENVIRONMENT .TP .B W3MMAN_W3M diff --git a/scripts/w3mman/w3mman.in b/scripts/w3mman/w3mman.in index 6c6f65d..6a27e70 100644 --- a/scripts/w3mman/w3mman.in +++ b/scripts/w3mman/w3mman.in @@ -8,6 +8,7 @@ sub usage { ($_ = $0) =~ s@.*/@@; print STDERR "$_ [-M <path>] [[<section>] <command>]\n"; print STDERR "$_ [-M <path>] [-k <keyword>]\n"; + print STDERR "$_ [-l <file>]\n"; exit 1; } @@ -20,6 +21,10 @@ while (@ARGV) { } elsif (/^-k$/) { @ARGV || &usage(); $query = "?keyword=" . &form_encode(shift @ARGV); + } elsif (/^-l$/) { + @ARGV || &usage(); + $query = "?quit=ok&local=" . &form_encode(shift @ARGV); + $query .= "&pwd=" . &form_encode($ENV{'PWD'}); } elsif (/^-/) { &usage(); } elsif (/^\d/ || $_ eq 'n') { diff --git a/scripts/w3mman/w3mman2html.cgi.in b/scripts/w3mman/w3mman2html.cgi.in index f41d487..3cb105d 100644 --- a/scripts/w3mman/w3mman2html.cgi.in +++ b/scripts/w3mman/w3mman2html.cgi.in @@ -19,7 +19,7 @@ if ($QUERY =~ /\=/) { $query{"man"} = &form_decode($QUERY); } -if (! $query{"man"}) { +if ((! $query{"man"}) && (! $query{"local"})) { if ($query{"keyword"}) { $keyword = $query{"keyword"}; $k = &html_quote($keyword); @@ -71,21 +71,29 @@ EOF exit; } -$man = $query{"man"}; -if ($man =~ s/\((\w+)\)$//) { - $section = $1; - $man_section = "$man($1)"; -} elsif ($query{"section"}) { - $section = $query{"section"}; - $man_section = "$man($section)"; +if ($query{"local"}) { + $file = $query{"local"}; + if (! ($file =~ /^\//)) { + $file = $query{"pwd"} . '/' . $file; + } + open(F, "$MAN -l $file 2> /dev/null |"); } else { - $section = ""; - $man_section = "$man"; -} + $man = $query{"man"}; + if ($man =~ s/\((\w+)\)$//) { + $section = $1; + $man_section = "$man($1)"; + } elsif ($query{"section"}) { + $section = $query{"section"}; + $man_section = "$man($section)"; + } else { + $section = ""; + $man_section = "$man"; + } -$section =~ s:([^-\w\200-\377.,])::g; -$man =~ s:([^-\w\200-\377.,])::g; -open(F, "$MAN $section $man 2> /dev/null |"); + $section =~ s:([^-\w\200-\377.,])::g; + $man =~ s:([^-\w\200-\377.,])::g; + open(F, "$MAN $section $man 2> /dev/null |"); +} $ok = 0; undef $header; $blank = -1; @@ -176,6 +184,11 @@ if ($prev) { close(F); if (! $ok) { if ($query{'quit'}) { + if ($query{'local'}) { + print STDERR "File $file not found.\n"; + } else { + print STDERR "No manual entry for $man_section.\n"; + } print STDERR "No manual entry for $man_section.\n"; print <<EOF; w3m-control: EXIT @@ -190,7 +203,11 @@ Content-Type: text/html <body> <pre> EOF - print "No manual entry for <B>$man_section</B>.\n"; + if ($query{'local'}) { + print "File <B>$file</B> not found.\n"; + } else { + print "No manual entry for <B>$man_section</B>.\n"; + } } print <<EOF; </pre> |