Ilya Zakharevich on Mon, 6 Mar 2000 21:59:17 -0500 (EST)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PATCH 2.0.15] docdir


Again: an older PARI here.

--- ./doc/gphelp.in.orig	Thu May  6 10:00:48 1999
+++ ./doc/gphelp.in	Mon Mar  6 21:58:02 2000
@@ -26,7 +26,10 @@
 #  GPXDVI: which 'xdvi' program to call (xdvi by default)
 #
 $version= "@version@";
-$docdir = $ENV{GPDOCDIR} || $ENV{GPHELP_DOCDIR} || "@miscdir@";
+$docdir = $ENV{GPDOCDIR} || $ENV{GPHELP_DOCDIR};
+$docdir = './doc' if not $docdir and -f './doc/translations';
+$docdir = '../doc' if not $docdir and -f '../doc/translations';
+$docdir ||= "@miscdir@";
 # no expanded material (@key@) below
 
 $xdvi = $ENV{GPXDVI} || "xdvi";
@@ -105,7 +108,7 @@ sub init
   $tmpdir = $ENV{GPTMPDIR} || $ENV{TMPDIR} || $ENV{GPHELP_TMPDIR} || "/tmp";
   $texfile = "$tmpdir/gp.help$$";
 
-  open(IN,"translations") || die("Could not find translation file");
+  open(IN,"translations") || die("Could not find translation file, docdir='$docdir'");
   while(<IN>)
   {
     chop; @_ = split(/ *\@ */);