From 7581869fc6b5fe8e31d520d04af7af3fc53fa235 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Mon, 13 Nov 2000 15:05:35 +0000 Subject: [PATCH] OS/2 updates git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1213 a592a061-630c-0410-9148-cb99ea01b6c8 --- ChangeLog | 6 + README.OS2 | 21 ++- development/OS2/quick_fix.patch | 136 ++++++++++++++--- lib/configure.cmd | 258 ++++++++++++++++++-------------- 4 files changed, 279 insertions(+), 142 deletions(-) diff --git a/ChangeLog b/ChangeLog index 67621279cf..426c50e728 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2000-11-13 Miyata Shigeru + + * development/OS2/quick_fix.patch: + * lib/configure.cmd: + * README.OS2: quick update to the OS/2 port. + 2000-11-13 Jean-Marc Lasgouttes * src/converter.C: add "using" directive. diff --git a/README.OS2 b/README.OS2 index 895baf6aff..71464b5022 100644 --- a/README.OS2 +++ b/README.OS2 @@ -14,24 +14,30 @@ step like this: 3. Install xforms 0.88 and rename forms.a -> forms_d.a forms_s.a -> forms.a - // Ever since 1.1.5pre1, you cannot link xforms dynamically. + // Ever since 1.1.5pre1, you cannot link xforms 0.88 dynamically. // If you don't like this, please ask Holger Veit to export // fl_get_scrollbar_bounds, fl_get_scrollbar_increment and // fl_get_scrollbar_value from the DLL. They're already there! + // I will try to release xforms 0.89 ASAP. 4. Install Hung-Chi Chu's port of GNU gettext. Other ports will not work. 5. Set environment variables MAKE_SHELL=sh LIBS=-lulib -lsocket -lbsd -lshm -lstdcpp - // ulib must be linked if we use static xforms library. + CXXFLAGS=-g -O2 -m486 -Zmt -DOS2 -fno-rtti -fno-exceptions + // ulib must be linked if we use static xforms library 0.88. + // If xforms 0.89 is used -lulib must be removed from above. // Unless you are using pgcc, we use gcc rather than g++. // Hence stdc++ must be linked explicitely. Also please // note that ld for pgcc often fails to link big executables // like unstripped lyx.exe + // Due to a bug (actually a limitation) of autoconf/2, + // you have to set CXXFLAGS explicitely in order to compile + // CVS version newer than 11 Oct. 2000. 6. From sh prompt, type - autogen.sh + autogen.sh; rm -f config.cache and then - configure --prefix=/XFree86 --datadir=/XFree86/lib/X11 + configure --prefix=/XFree86 --datadir=/XFree86/lib/X11 --with-included-string x11make // Please do not use make.cmd make.exe should be OK. // x11make.exe is the safest choice @@ -44,15 +50,9 @@ step like this: // If the synchronization to the children breaks, configure // often detects wrongfully. -> Or it is possible to download the compiled program? - 7. If you are going to make a binary distribution, you have to prepare lib/configure.cmd noweb2lyx.cmd and reLyX.cmd, since end users may not have a UNIX type shell installed. - At this stage, lib/configure.cmd in the 1.1.5pre1 should work - without change. - // If Dekel Tsur introduces the converter_command tag to lyxrc, - // the situation changes. In order to create noweb2lyx.cmd and reLyX.cmd, first rename noweb2lyx and reLyX and open them in a text editor. You have to remove hardcoded path in the first line: @@ -265,4 +265,3 @@ Some suggestions in case of problems: window manager, so that LyX' messages appear in the console window and LyX does not appear in the PM task list. - \ No newline at end of file diff --git a/development/OS2/quick_fix.patch b/development/OS2/quick_fix.patch index 5ea8b436fb..298fd99b4c 100644 --- a/development/OS2/quick_fix.patch +++ b/development/OS2/quick_fix.patch @@ -1,6 +1,10 @@ -diff -ubr -X g:/exclude lyx-devel/config/progtest.m4 lyx-build/config/progtest.m4 ---- lyx-devel/config/progtest.m4 Tue Feb 22 06:44:28 2000 -+++ lyx-build/config/progtest.m4 Wed May 10 10:12:44 2000 +Index: lyx-devel/config/progtest.m4 +=================================================================== +RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/progtest.m4,v +retrieving revision 1.2 +diff -u -r1.2 progtest.m4 +--- lyx-devel/config/progtest.m4 2000/01/08 21:02:55 1.2 ++++ lyx-devel/config/progtest.m4 2000/11/12 08:09:08 @@ -11,6 +11,19 @@ dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) @@ -36,9 +40,13 @@ diff -ubr -X g:/exclude lyx-devel/config/progtest.m4 lyx-build/config/progtest.m if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word" break -diff -ubr -X g:/exclude lyx-devel/lib/configure.m4 lyx-build/lib/configure.m4 ---- lyx-devel/lib/configure.m4 Tue Feb 22 06:44:42 2000 -+++ lyx-build/lib/configure.m4 Wed May 10 07:24:02 2000 +Index: lyx-devel/lib/configure.m4 +=================================================================== +RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/configure.m4,v +retrieving revision 1.15 +diff -u -r1.15 configure.m4 +--- lyx-devel/lib/configure.m4 2000/11/07 12:07:13 1.15 ++++ lyx-devel/lib/configure.m4 2000/11/12 08:09:13 @@ -28,6 +28,19 @@ dnl define(SEARCH_PROG,[dnl @@ -69,12 +77,12 @@ diff -ubr -X g:/exclude lyx-devel/lib/configure.m4 lyx-build/lib/configure.m4 test -z "$ac_dir" && ac_dir=. - if test -x [$ac_dir/$ac_word]; then + if test -x [$ac_dir/$ac_word] \ -+ -o -x [$ac_dir/$ac_word$EXE_EXT] \ -+ -o -x [$ac_dir/$ac_word$CMD_EXT]; then ++ -o -x [$ac_dir/$ac_word$EXE_EXT] \ ++ -o -x [$ac_dir/$ac_word$CMD_EXT]; then $2="$ac_prog" break fi -@@ -179,8 +194,17 @@ +@@ -180,8 +195,17 @@ fi # Search for an installed reLyX or a ready-to-install one @@ -90,13 +98,17 @@ diff -ubr -X g:/exclude lyx-devel/lib/configure.m4 lyx-build/lib/configure.m4 +;; +esac +PATH=${PATH}${PATH_IFS}./reLyX/ - SEARCH_PROG([for reLyX LaTeX-to-LyX translator],RELYX,reLyX) + SEARCH_PROG([for a LaTeX -> LyX converter],tex_to_lyx_command,reLyX) PATH=${save_PATH} - -diff -ubr -X g:/exclude lyx-devel/lib/reLyX/acinclude.m4 lyx-build/lib/reLyX/acinclude.m4 ---- lyx-devel/lib/reLyX/acinclude.m4 Tue Sep 28 03:44:34 1999 -+++ lyx-build/lib/reLyX/acinclude.m4 Wed May 10 05:38:36 2000 -@@ -11,15 +11,24 @@ + test $tex_to_lyx_command = "reLyX" && tex_to_lyx_command="reLyX -f \$\$FName" +Index: lyx-devel/lib/reLyX/acinclude.m4 +=================================================================== +RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/reLyX/acinclude.m4,v +retrieving revision 1.2 +diff -u -r1.2 acinclude.m4 +--- lyx-devel/lib/reLyX/acinclude.m4 2000/11/07 12:07:13 1.2 ++++ lyx-devel/lib/reLyX/acinclude.m4 2000/11/12 08:09:15 +@@ -10,15 +10,24 @@ dnl RELYX_SEARCH_PROG(VARIABLE-NAME,PROGRAMS-LIST,ACTION-IF-FOUND) dnl define(RELYX_SEARCH_PROG,[dnl @@ -123,9 +135,13 @@ diff -ubr -X g:/exclude lyx-devel/lib/reLyX/acinclude.m4 lyx-build/lib/reLyX/aci $1="$ac_prog" break fi -diff -ubr -X g:/exclude lyx-devel/lib/reLyX/configure.in lyx-build/lib/reLyX/configure.in ---- lyx-devel/lib/reLyX/configure.in Tue Feb 22 06:45:24 2000 -+++ lyx-build/lib/reLyX/configure.in Wed May 10 05:38:34 2000 +Index: lyx-devel/lib/reLyX/configure.in +=================================================================== +RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/reLyX/configure.in,v +retrieving revision 1.8 +diff -u -r1.8 configure.in +--- lyx-devel/lib/reLyX/configure.in 2000/06/26 15:33:12 1.8 ++++ lyx-devel/lib/reLyX/configure.in 2000/11/12 08:09:15 @@ -2,6 +2,7 @@ AC_INIT(reLyX.in) AC_PREREQ(2.13) dnl We want to use autoconf 2.13 @@ -134,10 +150,45 @@ diff -ubr -X g:/exclude lyx-devel/lib/reLyX/configure.in lyx-build/lib/reLyX/con dnl PACKAGE=reLyX dnl Do this to install in $datadir/lyx/reLyX instead of $datadir/reLyX/reLyX -diff -ubr -X g:/exclude lyx-devel/src/os2_defines.h lyx-build/src/os2_defines.h ---- lyx-devel/src/os2_defines.h Fri Mar 10 06:25:50 2000 -+++ lyx-build/src/os2_defines.h Fri May 5 11:37:48 2000 -@@ -13,9 +13,14 @@ +Index: lyx-devel/src/lyx_cb.C +=================================================================== +RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyx_cb.C,v +retrieving revision 1.128 +diff -u -r1.128 lyx_cb.C +--- lyx-devel/src/lyx_cb.C 2000/11/10 17:29:45 1.128 ++++ lyx-devel/src/lyx_cb.C 2000/11/12 08:09:18 +@@ -321,6 +321,7 @@ + #if 0 + void MenuFax(Buffer * buffer) + { ++#ifndef __EMX__ + // Generate postscript file + if (!Exporter::Export(buffer, "ps", true)) + return; +@@ -328,6 +329,15 @@ + // Send fax + string const ps = OnlyFilename(ChangeExtension(buffer->fileName(), + ".ps")); ++#else ++ // Generate tiff file ++ if (!Exporter::Export(buffer, "tiff", true)) ++ return; ++ ++ // Send fax ++ string const ps = OnlyFilename(ChangeExtension(buffer->fileName(), ++ ".tif")); ++#endif + + string path = OnlyPath (buffer->fileName()); + if (lyxrc.use_tempdir || (IsDirWriteable(path) < 1)) { +Index: lyx-devel/src/os2_defines.h +=================================================================== +RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/os2_defines.h,v +retrieving revision 1.5 +diff -u -r1.5 os2_defines.h +--- lyx-devel/src/os2_defines.h 2000/11/08 09:39:44 1.5 ++++ lyx-devel/src/os2_defines.h 2000/11/12 08:09:18 +@@ -13,16 +13,22 @@ #ifndef OS2_DEFINES_H #define OS2_DEFINES_H @@ -145,11 +196,52 @@ diff -ubr -X g:/exclude lyx-devel/src/os2_defines.h lyx-build/src/os2_defines.h #include -#include #include ++extern "C" inline int readlink(const char *, char *, size_t) {return -1;} +#else +#include +#include ++#define readlink(s, t, l) (-1) +#endif +#include #include #include /* #include */ + #define lstat stat + #define S_ISLNK(x) false + #define S_ISBLK(x) false +-#define readlink(s, t, l) (strcpy(t, s), strlen(t)) + /*#define mkfifo(p, m) (0) *//* LyXserver is temporary disabled. */ + #define chdir _chdir2 + #define strcasecmp stricmp +Index: lyx-devel/src/support/rename.C +=================================================================== +RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/support/rename.C,v +retrieving revision 1.4 +diff -u -r1.4 rename.C +--- lyx-devel/src/support/rename.C 2000/11/06 11:20:22 1.4 ++++ lyx-devel/src/support/rename.C 2000/11/12 08:09:20 +@@ -6,6 +6,9 @@ + + bool lyx::rename(string const & from, string const & to) + { ++#ifdef __EMX__ ++ ::unlink(to.c_str()); ++#endif + if (::rename(from.c_str(), to.c_str()) == -1) + return lyx::copy(from, to); + return true; +Index: lyx-devel/src/support/syscall.C +=================================================================== +RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/support/syscall.C,v +retrieving revision 1.18 +diff -u -r1.18 syscall.C +--- lyx-devel/src/support/syscall.C 2000/10/11 21:06:43 1.18 ++++ lyx-devel/src/support/syscall.C 2000/11/12 08:09:21 +@@ -15,6 +15,7 @@ + #include "syscontr.h" + #include "support/lstrings.h" + #include "support/lyxlib.h" ++#include "support/filetools.h" + + using std::endl; + diff --git a/lib/configure.cmd b/lib/configure.cmd index f7864516a0..f51beddcbf 100755 --- a/lib/configure.cmd +++ b/lib/configure.cmd @@ -2,7 +2,6 @@ call RxFuncAdd 'SysLoadFuncs','RexxUtil','SysLoadFuncs' call SysLoadFuncs env='OS2ENVIRONMENT' -EMTEXDIR=value('EMTEXDIR',,env) X11ROOT=value('X11ROOT',,env) latex_script='chkconfig.ltx' lyxrc_defaults='lyxrc.defaults' @@ -41,10 +40,16 @@ if \(curdir=srcdir) then do call SysFileTree 'layouts', 'found', 'D' if found.0 = 0 then do call SysMkDir 'bind' + call SysMkDir 'clipart' call SysMkDir 'doc' + call SysMkDir 'examples' + call SysMkDir 'images' call SysMkDir 'kbd' call SysMkDir 'layouts' + call SysMkDir 'reLyX' + call SysMkDir 'scripts' call SysMkDir 'templates' + call SysMkDir 'ui' end 'cmd /c copy /v' srcdir'\layouts\*.layout layouts' if \(rc=0) then @@ -52,58 +57,67 @@ if \(curdir=srcdir) then do end curdir=translate(curdir,'/','\') srcdir=translate(srcdir,'/','\') -call SysFileTree EMTEXDIR'\bin\latex.cmd', 'found', 'F' -if found.0 = 0 then LATEX='latex2e' -else LATEX='latex' -if \(''=SysSearchPath('PATH','GS.EXE')) then - GS='gs' -else -if \(''=SysSearchPath('PATH','GSOS2.EXE')) then - GS='gsos2' -else - GS='none' -if \(''=SysSearchPath('PATH','GV.EXE')) then - GHOSTVIEW='gv' -else -if \(''=SysSearchPath('PATH','GHOSTVIEW.EXE')) then - GHOSTVIEW='ghostview' -else - GHOSTVIEW='none' -if (''=SysSearchPath('PATH','SGML2LYX.CMD')) then - SGMLTOOLS='none' -else - SGMLTOOLS='sgml2lyx' -if (''=SysSearchPath('PATH','CHKTEX.EXE')) then - CHKTEX='none' -else - CHKTEX='chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38' -if \(''=SysSearchPath('PATH','ISPELL.EXE')) then - SPELL='ispell' -else - SPELL='none' -if (''=SysSearchPath('PATH','NOWEAVE.EXE')) then do - LITERATE='none' - LITERATE_EXT='none' -end -else do - LITERATE='noweave -delay -index' - LITERATE_EXT='.nw' -end -call SysFileTree 'reLyX\reLyX.cmd', 'found', 'F' -if found.0 = 0 then - if (''=SysSearchPath('PATH','reLyX.cmd')) then - RELYX='none' - else - RELYX='reLyX.cmd' +A_.0=0 +call SEARCH_PROG 'converter latex dvi%latex|latex2e%"latex,disable=linuxdoc&docbook"' +call SEARCH_PROG 'converter latex pdf%pdflatex|pdflatex2e%"latex,disable=linuxdoc&docbook"' +call SEARCH_PROG 'converter latex html%tth -t -e2 -L$$BaseName < $$FName > $$OutName|latex2html -no_subdir -split 0 -show_section_numbers $$FName|hevea -s $$FName%"originaldir,needaux,disable=linuxdoc&docbook"' +call SEARCH_PROG 'converter literate latex%noweave -delay -index $$FName > $$OutName%""' +call SEARCH_PROG 'converter dvi ps%dvips -o $$OutName $$FName%""' +call SEARCH_PROG 'converter ps pdf%ps2pdf $$FName%""' +call SEARCH_PROG 'converter ps tiff%gs -sDEVICE=tiffg3 -sOutputFile=$$OutName -dNOPAUSE $$FName -c quit|gsos2 -sDEVICE=tiffg3 -sOutputFile=$$OutName -dNOPAUSE $$FName -c quit%""' +call SEARCH_PROG 'converter linuxdoc lyx%sgml2lyx $$FName%""' +call SEARCH_PROG 'converter linuxdoc latex%sgml2latex $$FName%""' +call SEARCH_PROG 'converter linuxdoc dvi%sgml2latex -o dvi $$FName%""' +call SEARCH_PROG 'converter linuxdoc html%sgml2html $$FName%""' +call SEARCH_PROG 'converter docbook dvi%sgmltools -b dvi $$FName|db2dvi $$FName%""' +call SEARCH_PROG 'converter docbook html%sgmltools -b html $$FName|db2html $$FName%""' +A_.0=A_.0+1;i=A_.0 +A_.i='' +call SEARCH_PROG 'converter latex lyx%reLyX -f $$FName%"importer"' +call SEARCH_PROG 'converter literate lyx%noweb2lyx $$FName $$OutName%"importer"' +call SEARCH_PROG 'converter html latex%html2latex $$FName%"importer"' +call SEARCH_PROG 'converter word latex%wvCleanLatex $$FName $$OutName|word2x -f latex $$FName%"importer"' +A_.0=A_.0+1;i=A_.0 +A_.i='' +call SEARCH_PROG 'converter gif eps%convert $$FName $$OutName%""' +call SEARCH_PROG 'converter png eps%convert $$FName $$OutName%""' +call SEARCH_PROG 'converter jpg eps%convert $$FName $$OutName%""' +call SEARCH_PROG 'converter gif png%convert $$FName $$OutName%""' +A_.0=A_.0+1;i=A_.0 +A_.i='' +call SEARCH_PROG 'viewer dvi%xdvi' +call SEARCH_PROG 'viewer html%netscape' +call SEARCH_PROG 'viewer pdf%xpdf gv ghostview acroread' +call SEARCH_PROG 'viewer ps%gv -swap|ghostview -swap|gvpm -swap' +call SEARCH_PROG 'viewer eps%gv|ghostview|gvpm' +A_.0=A_.0+1;i=A_.0 +A_.i='' +call SEARCH_PROG 'ps_command%gs|gsos2' +call SEARCH_PROG 'ascii_roff_command%groff -t -Tlatin1 $$FName' +call SEARCH_PROG 'chktex_command%chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38' +call SEARCH_PROG 'spell_command%ispell' +/* call SEARCH_PROG 'fax_command%fsend -p$$Phone -i$$FName -d$$Name -m$$Comment' */ +call SEARCH_PROG 'print_spool_command%lp|lpr' +i=A_.0;A_.0=A_.0+1 +if pos('lpr',A_.i)>0 then + do + i=i+1 + A_.i='print_spool_printerprefix "-P"' + end else - RELYX='reLyX.cmd' -call SysFileDelete 'chklatex.ltx' -rc=lineout('chklatex.ltx','\nonstopmode\makeatletter') -rc=lineout('chklatex.ltx','\ifx\undefined\documentclass\else') -rc=lineout('chklatex.ltx',' \message{ThisIsLaTeX2e}') -rc=lineout('chklatex.ltx','\fi') -rc=lineout('chklatex.ltx','\@@end') -rc=lineout('chklatex.ltx') + do + i=i+1 + A_.i='print_spool_printerprefix "-d "' + end +/* call SysFileTree 'reLyX\reLyX.cmd', 'found', 'F' */ +/* $ChkLaTeX +\nonstopmode\makeatletter +\ifx\undefined\documentclass\else + \message{ThisIsLaTeX2e} +\fi +\@@end + EOF */ +call WRITE_FILE 'chklatex.ltx' '$ChkLaTeX' 'cmd /c 'LATEX' chklatex.ltx>nul' call SysFileSearch 'NotLaTeX2e', 'chklatex.log', chklatex if chklatex.0 > 0 then LATEX='' @@ -154,20 +168,22 @@ end call SysFileTree 'textclass.lst', 'file', 'FO' if file.0=0 then do - rc=lineout('textclass.lst','# This file declares layouts and their associated definition files') - rc=lineout('textclass.lst','# (include dir. relative to the place where this file is).') - rc=lineout('textclass.lst','# It contains only default values, since chkconfig.ltx could not be run') - rc=lineout('textclass.lst','# for some reason. Run ./configure if you need to update it after a') - rc=lineout('textclass.lst','# configuration change.') - rc=lineout('textclass.lst','article article article') - rc=lineout('textclass.lst','report report report') - rc=lineout('textclass.lst','book book book') - rc=lineout('textclass.lst','linuxdoc linuxdoc linuxdoc') - rc=lineout('textclass.lst','letter letter letter') - rc=lineout('textclass.lst') - rc=lineout('chkconfig.sed','s/@.*@/???/g') - rc=lineout('chkconfig.sed') - rc_graphics='none' +/* $TextClass +# This file declares layouts and their associated definition files +# (include dir. relative to the place where this file is). +# It contains only default values, since chkconfig.ltx could not be run +# for some reason. Run ./configure if you need to update it after a +# configuration change. +article article article +report report report +book book book +linuxdoc linuxdoc linuxdoc +letter letter letter + EOF */ + call WRITE_FILE 'textclass.lst' '$TextClass' + rc=lineout('chkconfig.sed','s/@.*@/???/g') + rc=lineout('chkconfig.sed') + rc_graphics='none' end call SysFileTree 'chkconfig.sed', 'file', 'FO' @@ -180,11 +196,13 @@ end call SysFileTree 'packages.lst', 'file', 'FO' if file.0=0 then do - rc=lineout('packages.lst','# This file should contain the list of LaTeX packages that have been') - rc=lineout('packages.lst','# recognized by LyX. Unfortunately, since configure could not find') - rc=lineout('packages.lst','# your LaTeX2e program, the tests have not been run. Run configure') - rc=lineout('packages.lst','# if you need to update it after a configuration change.') - rc=lineout('packages.lst') +/* $Packages +# This file should contain the list of LaTeX packages that have been +# recognized by LyX. Unfortunately, since configure could not find +# your LaTeX2e program, the tests have not been run. Run configure +# if you need to update it after a configuration change. + EOF */ + call WRITE_FILE 'packages.lst' '$Packages' end say 'creating doc/LaTeXConfig.lyx' @@ -199,47 +217,69 @@ call SysFileDelete 'chklayouts.tex' call SysFileDelete 'missfont.log' say 'creating 'lyxrc_defaults -rc=SysFileDelete(lyxrc_defaults) if rxfuncquery(SysAddRexxMacro) then rc=stream(lyxrc_defaults,'c','seek =0') rc=SysFileDelete(X11ROOT'\XFree86\bin\fsend2.cmd') -rc=lineout(lyxrc_defaults,'\latex_command "'LATEX'"') -rc=lineout(lyxrc_defaults,'\relyx_command "'RELYX'"') -rc=lineout(lyxrc_defaults,'\literate_command "'LITERATE'"') -rc=lineout(lyxrc_defaults,'\literate_extension "'LITERATE_EXT'"') -rc=lineout(lyxrc_defaults,'\ps_command "'GS'"') -rc=lineout(lyxrc_defaults,'\view_ps_command "'GHOSTVIEW' -swap"') -rc=lineout(lyxrc_defaults,'\view_pspic_command "'GHOSTVIEW'"') -rc=lineout(lyxrc_defaults,'\ascii_roff_command "groff -t -ms -Tlatin1"') -rc=lineout(lyxrc_defaults,'\chktex_command "'CHKTEX'"') -rc=lineout(lyxrc_defaults,'\spell_command "'SPELL'"') -/* -if \(''=SysSearchPath('PATH','fsend.exe')) then -do - rc=lineout(X11ROOT'\XFree86\bin\fsend2.cmd','/*A wrapper for fsend.exe*/') - rc=lineout(X11ROOT'\XFree86\bin\fsend2.cmd','parse arg "-p" phone "-i" fname "-d" name "-m" comment') - rc=lineout(X11ROOT'\XFree86\bin\fsend2.cmd','"gs -sDEVICE=tiffg3 -sOutputFile=temp_tiff.TIF -dNOPAUSE "fname" -c quit"') - rc=lineout(X11ROOT'\XFree86\bin\fsend2.cmd','"fsend -p"phone" -itemp_tiff.TIF -d"name" -m"comment') - rc=lineout(X11ROOT'\XFree86\bin\fsend2.cmd','"rm -f temp_tiff.TIF"') - rc=lineout(X11ROOT'\XFree86\bin\fsend2.cmd') - rc=lineout(lyxrc_defaults,'\fax_command "fsend2 -p'"'$$Phone' -i'$$FName' -d'$$Name' -m'$$Comment'"'"') -end -*/ -if \(''=SysSearchPath('PATH','lp.exe')) then -do - rc=lineout(lyxrc_defaults,'\print_spool_command "lp"') - rc=lineout(lyxrc_defaults,'\print_spool_printerprefix "-d"') +/* $LyXRC_Default +# This file has been automatically generated by LyX' lib/configure +# script. It contains default settings that have been determined by +# examining your system. PLEASE DO NOT MODIFY ANYTHING HERE! If you +# want to customize LyX, make a copy of the file LYXDIR/lyxrc as +# ~/.lyx/lyxrc and edit this file instead. Any setting in lyxrc will +# override the values given here. +\Format latex tex LaTeX L +\Format dvi dvi DVI D +\Format ps ps Postscript t +\Format pdf pdf PDF P +\Format html html HTML H +\Format text txt ASCII A +\Format word doc Word W +\Format literate nw NoWeb N +\Format linuxdoc sgml LinuxDoc x +\Format docbook sgml DocBook B +\Format program "" Program "" +\Format fax "" Fax "" + + EOF */ +call WRITE_FILE lyxrc_defaults '$LyXRC_Default' +A_.0=A_.0+1;i=A_.0 +A_.i='font_encoding "'||rc_fontenc||'"' +do i=1 to A_.0 + if A_.i\='' then A_.i='\'||A_.i + call lineout lyxrc_defaults,A_.i end -else -if \(''=SysSearchPath('PATH','lpr.exe')) then -do - rc=lineout(lyxrc_defaults,'\print_spool_command "lpr"') - rc=lineout(lyxrc_defaults,'\print_spool_printerprefix "-P"') +call lineout lyxrc_defaults +call lineout script +exit + +SEARCH_PROG: procedure expose A_. +parse arg LABEL '%' COMMANDS '%' ROUTE + i=A_.0+1 + A_.0=i + A_.i=LABEL||' "none" '||ROUTE + do while COMMANDS\='' + parse value COMMANDS with COMMAND '|' COMMANDS + parse upper value COMMAND with CMD ARGV + if (\(''=SysSearchPath('PATH',CMD||'.EXE'))|\(''=SysSearchPath('PATH',CMD||'.CMD'))) then + do + A_.i=LABEL||' "'||COMMAND||'" '||ROUTE + COMMANDS='' + end + end +return + +WRITE_FILE: procedure expose script +parse arg FILE TAG +call SysFileDelete FILE +C_='' +do while pos(TAG,C_)=0 + C_=linein(script) end -else -do - rc=lineout(lyxrc_defaults,'\print_spool_command ""') - rc=lineout(lyxrc_defaults,'\print_spool_printerprefix ""') +C_=linein(script) +do while pos('EOF',C_)=0 + call lineout FILE,C_ + C_=linein(script) end -rc=lineout(lyxrc_defaults,'\font_encoding "'rc_fontenc'"') -rc=lineout(lyxrc_defaults) +call lineout FILE +/*call lineout script*/ +return -- 2.39.5