]> git.lyx.org Git - features.git/commitdiff
Small fixes to reLyX.
authorJosé Matox <jamatos@lyx.org>
Fri, 31 Aug 2001 07:54:05 +0000 (07:54 +0000)
committerJosé Matox <jamatos@lyx.org>
Fri, 31 Aug 2001 07:54:05 +0000 (07:54 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2638 a592a061-630c-0410-9148-cb99ea01b6c8

lib/ChangeLog
lib/reLyX/MakePreamble.pm
lib/reLyX/reLyX.in
lib/reLyX/reLyXmain.pl

index 98c01c51343c8cdc28f164f3a02827605962bee8..d48078576bad69bb4742d707a46cef37a7cc63e1 100644 (file)
@@ -1,3 +1,12 @@
+2001-08-31  José Matos  <jamatos@fep.up.pt>
+       * reLyX/reLyX.in: added debug statement.
+       Moved the insertion in @maybe_dir to push.
+
+       * reLyX/MakePreamble.pm (translate_preamble): Fix syntax only understood
+       by recent versions of Perl. Allow compatability with perl 5.002.
+
+       * reLyX/reLyXmain.pl: Escape forgoten slash. Thanks to Yves Bastide.
+
 2001-08-28  José Matos  <jamatos@fep.up.pt>
        * reLyX/reLyX.in: allow reLyX to be run from the source directory.
 
index 666dff2e05583344fb6dfa976fbee3c1980f9db8..a71cb92f6699f444c02b4445dff2ac1a9f6ac9d9 100644 (file)
@@ -307,7 +307,7 @@ sub translate_preamble {
        my $op;
        foreach $op (keys %Geometry_Options) {
            $geom_options =~ s/$op// && do {
-               $LyX_Preamble .= $Geometry_Options{$op}();
+               $LyX_Preamble .= &{$Geometry_Options{$op}}();
                print "Geometry option $op\n" if $debug_on;
            }
        }
index d20b78590c50522a8f3bffbf8083c1bfe0d54cec..2a4773f22582ecf689489083ac00c4a7b6c4a9dc 100644 (file)
@@ -33,17 +33,17 @@ my $dir = &dirname($name);
 
 # Create a list of possible directories to look in. Non-existent directories
 #    are OK, but empty or undefined values will make 'use lib' complain
-my $i = 0;
+
 # case 1: for developers, e.g. - reLyX and $mainscript in same directory
-$maybe_dir[$i++] = "$dir";
+push @maybe_dir, "$dir";
 # case 2: ran make but not make install.
-$maybe_dir[$i++] = "$dir/$srcdir";
+push @maybe_dir, "$dir/$srcdir";
 # case 3: environment variable LYX_DIR_11x has been set
-if (exists $ENV{LYX_DIR_11x}) { $maybe_dir[$i++] = "$ENV{LYX_DIR_11x}/reLyX"};
+if (exists $ENV{LYX_DIR_11x}) { push @maybe_dir, "$ENV{LYX_DIR_11x}/reLyX"};
 # case 4: e.g., reLyX in /opt/bin, $mainscript in /opt/share/lyx/reLyX
-$maybe_dir[$i++] = "$dir/../share/$lyxname/reLyX"; # case 4
+push @maybe_dir, "$dir/../share/$lyxname/reLyX"; # case 4
 # case 5: configure figured out where $mainscript is
-$maybe_dir[$i++] = "$lyxdir/reLyX";
+push @maybe_dir, "$lyxdir/reLyX";
 
 # Decide which one is the real directory, based on the existence of
 #    "$dir/$mainscript"
@@ -55,12 +55,14 @@ foreach $dir (@maybe_dir) {
        $found = 1;
        last;
     }
- }
+}
 
 if(!$found) {
     print "reLyX directory not found.\n";
     exit(1);
- } 
+} else { ##just for debug purpose, remove for stable version
+    print "reLyX directory is: $relyxdir\n";
+}
 
 } # end BEGIN block
 
index 0766aee67f72aaa2a20c2da9be2f45ffd3aa75a1..4db42ceb657fb783442f336c2626fb2caed04d4f 100644 (file)
@@ -8,7 +8,7 @@
 #
 # This code usually gets called by the reLyX wrapper executable
 #
-# $Id: reLyXmain.pl,v 1.3 2000/06/06 10:32:10 lasgouttes Exp $
+# $Id: reLyXmain.pl,v 1.4 2001/08/31 07:54:05 jamatos Exp $
 #
 
 require 5.002; # Perl 5.001 doesn't work. Perl 4 REALLY doesn't work.
@@ -65,7 +65,7 @@ BEGIN{$Success = 0}
 #
 
 # Print welcome message including version info
-my $version_info = '$Date: 2000/06/06 10:32:10 $'; # RCS puts checkin date here
+my $version_info = '$Date: 2001/08/31 07:54:05 $'; # RCS puts checkin date here
 $version_info =~ s&.*?(\d+/\d+/\d+).*&$1&; # take out just the date info
 warn "reLyX, the LaTeX to LyX translator. Revision date $version_info\n\n";
 
@@ -94,7 +94,7 @@ my $Usage_Long = $Usage_Short . <<"ENDLONGUSAGE";
     -o    output all LyX files to directory "outputdir"
              Otherwise, LyX file is created in directory the LaTeX file is in
     -p    translate LaTeX fragments or include files (requires -c)
-             I.e., files without \documentclass commands
+             I.e., files without \\documentclass commands
     -r    give reLyX a (list of) regular environment(s)
     -s    give reLyX a (list of) additional syntax file(s) to read