]> git.lyx.org Git - features.git/commitdiff
win32 port updates
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 4 Oct 2001 09:57:02 +0000 (09:57 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 4 Oct 2001 09:57:02 +0000 (09:57 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2840 a592a061-630c-0410-9148-cb99ea01b6c8

development/ChangeLog
development/Win32/lyxprofile
development/Win32/lyxwin32.C [deleted file]
development/Win32/lyxwin32.c [new file with mode: 0644]
src/ChangeLog
src/lyx_cb.C
src/support/ChangeLog
src/support/os.h
src/support/os_os2.C
src/support/os_unix.C
src/support/os_win32.C

index c99048afc8ed9a8554a71516eec1fb29d3bc932d..03c7d3c0a654df07ca66bce3a2e892a4d68e004b 100644 (file)
@@ -1,3 +1,9 @@
+2001-07-02  Claus Hentschel  <claus.hentschel@mbau.fh-hannover.de>
+
+       * Win32/lyxwin32.c: renamed from lyxwin32.C
+
+       * Win32/lyxprofile: update
+
 2001-09-21  Kayvan A. Sylvan  <kayvan@satyr.sylvan.com>
 
        * lyx.spec.in: last cleanup
index 9bfa4a8a1fa5c1c9a13a2c43bfb45c216fe7edfa..0a64a188b2edcd97494d0229b120bcf704b4c31c 100644 (file)
@@ -1,27 +1,29 @@
-PATH="/usr/local/lyx/bin:/usr/local/bin:/usr/X11R6/bin:/usr/bin:/bin:$PATH"
+# Set up your home directory (in Cygwin syntax)
+export HOME="//x/YourHomeDirectory"
+
+# Set up your Language (if you do not want English)
+# export LANG=DE
+
+# ========================================================
+# Below this line you should not change anything if you're
+# not familiar with configuration of an unix application!
+# ========================================================
+export PATH="/usr/bin:/usr/local/bin:/usr/X11R6/bin:/bin:$PATH"
+export USER="`id -un`"
+export DISPLAY=127.0.0.1:0.0
+export MAKE_MODE=unix
+
 unset DOSDRIVE
 unset DOSDIR
 unset TMPDIR
 unset TMP
 
-USER="`id -un`"
-
-# Set up USER's home directory; no spaces allowed in the path!
-export HOME=//c/Docs/Lyx
-
-export USER PATH
-
 for i in /etc/profile.d/*.sh ; do
   if [ -f $i ]; then
     . $i
   fi
 done
 
-export DISPLAY=localhost:0
-
-export MAKE_MODE=unix
-
-
 cd "$HOME"
 
 test -f ./.bashrc && . ./.bashrc
diff --git a/development/Win32/lyxwin32.C b/development/Win32/lyxwin32.C
deleted file mode 100644 (file)
index e479ef5..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#include <stdio.h>                         /* standard io library */
-#include <stdlib.h>                        /* standard library */
-#include <unistd.h>                        /* sleep , fork & exec */
-#include <string.h>                        /* standard string library */
-#include <errno.h>
-
-int main ( int argc, char *argv[] )
-{
-/*char cmd [32000] = "lyx " ; */                   /* user command */
-char cmd [32000] = "lyx " ;
-char *nargs [4 ] = { "/bin/bash", "-c" , cmd , NULL } ;   /* execute with login /bin/bash */
-int i=1;
-
-putenv ( "BASH_ENV=/etc/lyxprofile" ) ;    /* ensure bash reads my global env changes */
-
-while ( i < argc )                      /* do for all "real" args */
-   {
-       strcat ( cmd , "\"" ) ;             /* add quote before */
-       strcat ( cmd , argv [ i ] ) ;       /* add the argument */
-       strcat ( cmd , "\" " ) ;            /* add closing quote */
-       i ++ ;
-   }
-
-strcat ( cmd, "</dev/null 2>/dev/null");
-
-fprintf ( stderr , "Command is: |%s|\n" , cmd );
-execv ( "/bin/bash" , nargs ) ;         /* exec sub command */
-
-/* we should never reach here */
-fprintf ( stderr , "Execute failed, error = %d\n" , errno ) ;
-return ( 0 ) ;                          /* exit with no error */
-}
diff --git a/development/Win32/lyxwin32.c b/development/Win32/lyxwin32.c
new file mode 100644 (file)
index 0000000..404f2cf
--- /dev/null
@@ -0,0 +1,37 @@
+#include <stdio.h>            /* standard io library */
+#include <stdlib.h>           /* standard library */
+#include <unistd.h>           /* sleep , fork & exec */
+#include <string.h>           /* standard string library */
+#include <errno.h>
+
+int main ( int argc, char *argv[] )
+{
+       char cmd [32000] = "lyx " ;  /* user command */
+       char *nargs [4 ] = {  /* execute with login /bin/bash */
+               "/bin/bash",
+               "-c" , cmd ,
+               NULL
+       } ;
+       int i = 1; /* just to count */
+
+       /* ensure bash reads my global env changes */
+       putenv ( "BASH_ENV=/etc/lyxprofile" ) ;
+
+       /* do for all "real" args */
+       while ( i < argc )
+       {
+               strcat ( cmd , "\"" ) ; /* add quote before */
+               strcat ( cmd , argv [ i ] ) ; /* add the argument */
+               strcat ( cmd , "\" " ) ; /* add closing quote */
+               i ++ ;
+       }
+
+       strcat ( cmd, "</dev/null 2>/dev/null");
+
+       fprintf ( stderr , "Command is: |%s|\n" , cmd );
+       execv ( "/bin/bash" , nargs ) ;  /* exec sub command */
+
+       /* Oops: we should never reach here */
+       perror ( "Execute failed") ;
+       return ( 1 ) ; /* exit with an error */
+}
index 34333b1f428c2c62373b6f1c18e7442c86d5793a..bb7381986d3d6ec93a83aacf968031a4a0257b47 100644 (file)
@@ -1,3 +1,7 @@
+2001-10-03  Garst Reese  <reese@isn.net>
+
+       * lyx_cb.C: fhange CheckTex error msg.
+
 2001-10-03  José Matos  <jamatos@fep.up.pt>
 
        * buffer.C (simpleDocBookOnePar): add support for pass_thru.
index 75da0511a5f3db2564707cb3ca0858335d10c2c2..4d5787a354f6d20e26a0fd01f6e7cbd1db671668 100644 (file)
@@ -263,11 +263,11 @@ int MenuRunChktex(Buffer * buffer)
                        s = _("No warnings found.");
                } else if (ret == 1) {
                        s = _("One warning found.");
-                       t = _("Use 'Edit->Go to Error' to find it.");
+                       t = _("Use `Navigate->Error' to find it.");
                } else {
                        s += tostr(ret);
                        s += _(" warnings found.");
-                       t = _("Use 'Edit->Go to Error' to find them.");
+                       t = _("Use `Navigate->Error' to find them.");
                }
                WriteAlert(_("Chktex run successfully"), s, t);
        } else {
index 351bd43e0aa7c9b04d58b31f967b1041bed6198f..ced558adac09ab811a74fb3571171a8b1eddcff5 100644 (file)
@@ -1,3 +1,12 @@
+2001-07-02  Claus Hentschel  <claus.hentschel@mbau.fh-hannover.de>
+
+       * os_win32.C: 
+       * os_unix.C:
+       * os_os2.C:
+       * os.h: add internal_path method, which converts a unix-type file
+       name to the type known to the underlying file system (currently
+       only useful on cygwin) [from Ruurd A. Reitsma and Claus Hentschel]
+
 2001-08-18  Lars Gullik Bjønnes  <larsbj@birdstep.com>
 
        * smart_ptr.h: new file
index 7abe2d0a4d18ac1307b4e6dbdd1ba949892d5424..3f947734eb11aabcb7aa1363222eb7d83f5d84ed 100644 (file)
@@ -45,14 +45,18 @@ public:
 
        // no-op on UNIX, '\\'->'/' on OS/2 and Win32, ':'->'/' on MacOS, etc.
        static string slashify_path(string p);
+       // converts a host OS path to unix style
        static string external_path(string p);
+       // converts a unix path to host OS style
+       static string internal_path(string p);
        static void warn(string mesg);
 private:
        static string binpath_;
        static string binname_;
        static string tmpdir_;
        static os::shell_type _shell;
-       static unsigned long cp_;       // Used only on OS/2 to determine file system encoding.
+       // Used only on OS/2 to determine file system encoding.
+       static unsigned long cp_;       
 
        // Never initialize static variables in the header!
        // Anyway I bet this class will never be constructed.
index fd79f697a9acfa90e5c983717bb689553a7cfb82..358d487eb0937241661ca280426a76d78077bd4f 100644 (file)
@@ -158,3 +158,7 @@ string os::slashify_path(string p) {
 string os::external_path(string p) {
        return p;
 }
+
+string os::internal_path(string p) {
+       return p;
+}
index 19b8fa88aef0072d67924080205f01bd6b60e916..02da66050aa0a0bfc9a4c0418b29531ee06ee8e7 100644 (file)
@@ -68,3 +68,6 @@ string os::external_path(string p) {
        return p;
 }
 
+string os::internal_path(string p) {
+       return p;
+}
index 73abf6ef2d0953118483ecd6b802a5dd483e5911..a248f04a97aec679e75af7a16304da09c7be59bd 100644 (file)
@@ -80,4 +80,19 @@ string os::external_path(string p) {
                << p << "]->>["
                << dos_path << "]" << endl;
        return dos_path;
-}
\ No newline at end of file
+}
+
+// (Claus H.) Parsing the latex log file in an Win32 environment all
+// files are mentioned in Win32/DOS syntax. Because LyX uses the dep file
+// entries to check if any file has been changed we must retranslate
+// the Win32/DOS pathnames into Cygwin pathnames.
+string os::internal_path(string p) {
+       char pp[256];
+       cygwin_conv_to_posix_path(p.c_str(), pp);
+       string const posix_path = MakeLatexName(pp);
+       lyxerr[Debug::DEPEND]
+               << "<Win32 path correction> ["
+               << p << "]->>["
+               << posix_path << "]" << endl;
+       return posix_path;
+}