From 0d167123acd0ec72827a980028778bb717ad74bb Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Wed, 1 Mar 2000 18:15:39 +0000 Subject: [PATCH] Fix spacing of greek letters; other things. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@580 a592a061-630c-0410-9148-cb99ea01b6c8 --- ChangeLog | 15 +++++++++++++++ acinclude.m4 | 15 ++++++++------- config/lyxinclude.m4 | 15 ++++++++------- src/mathed/math_utils.C | 8 ++++---- src/support/filetools.C | 16 +++++++--------- 5 files changed, 42 insertions(+), 27 deletions(-) diff --git a/ChangeLog b/ChangeLog index 595aee5903..6475fc4d9d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2000-03-02 Jean-Marc Lasgouttes + + * src/mathed/math_utils.C (MathedLookupBOP): fix the search + routine (this fixes bug where greek letters were surrounded by too + much white space). + + * src/support/filetools.C (findtexfile): change a bit the search + algorithm, to fix bug introduced in 1.1.4. Note that --format is + no longer passed to kpsewhich, we may have to change that later. + + * config/lyxinclude.m4 (LYX_PROG_CXX): better version-dependent + warning options to avoid problems with X header files (from Angus + Leeming). + * acinclude.m4: regenerated. + 2000-03-02 Juergen Vigna * src/insets/insettext.C (WriteParagraphData): Using the diff --git a/acinclude.m4 b/acinclude.m4 index 9cd693fe66..f055262b95 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -183,11 +183,11 @@ dnl Check the version of g++ CXXFLAGS="$ac_save_CXXFLAGS" elif test $ac_cv_prog_cxx_g = yes; then case $gxx_version in - 2.95.1) CXXFLAGS="-g $lyx_opt -fpermissive -fno-rtti";; - 2.95.*) CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";; - 2.96*) CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";; - *2.91.*) CXXFLAGS="-g $lyx_opt -Wno-return-type -fno-exceptions -fno-rtti";; - *) CXXFLAGS="-g $lyx_opt -fno-exceptions -fno-rtti";; + 2.95.1) CXXFLAGS="-g $lyx_opt -fpermissive -fno-rtti";; + 2.95.*) CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";; + 2.96*) CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";; + *2.91.*) CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";; + *) CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";; esac else CXXFLAGS="$lyx_opt" @@ -195,13 +195,14 @@ dnl Check the version of g++ if test x$with_warnings = xyes ; then case $gxx_version in 2.95.*) CXXFLAGS="$CXXFLAGS -Wall -W -Wconversion";; - 2.96*) CXXFLAGS="$CXXFLAGS -Wall -W -Wconversion";; - *) CXXFLAGS="$CXXFLAGS -ansi -Wall -W";; + 2.96*) CXXFLAGS="$CXXFLAGS -Wall -W -Wconversion";; + *) CXXFLAGS="$CXXFLAGS -ansi -Wall -W -Wno-return-type";; esac if test $lyx_devel_version = yes ; then case $gxx_version in 2.95.*) ;; 2.96*) ;; + *2.91*) ;; *) CXXFLAGS="$CXXFLAGS -pedantic";; esac fi diff --git a/config/lyxinclude.m4 b/config/lyxinclude.m4 index 3e8a660079..bf009dc7c2 100644 --- a/config/lyxinclude.m4 +++ b/config/lyxinclude.m4 @@ -183,11 +183,11 @@ dnl Check the version of g++ CXXFLAGS="$ac_save_CXXFLAGS" elif test $ac_cv_prog_cxx_g = yes; then case $gxx_version in - 2.95.1) CXXFLAGS="-g $lyx_opt -fpermissive -fno-rtti";; - 2.95.*) CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";; - 2.96*) CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";; - *2.91.*) CXXFLAGS="-g $lyx_opt -Wno-return-type -fno-exceptions -fno-rtti";; - *) CXXFLAGS="-g $lyx_opt -fno-exceptions -fno-rtti";; + 2.95.1) CXXFLAGS="-g $lyx_opt -fpermissive -fno-rtti";; + 2.95.*) CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";; + 2.96*) CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";; + *2.91.*) CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";; + *) CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";; esac else CXXFLAGS="$lyx_opt" @@ -195,13 +195,14 @@ dnl Check the version of g++ if test x$with_warnings = xyes ; then case $gxx_version in 2.95.*) CXXFLAGS="$CXXFLAGS -Wall -W -Wconversion";; - 2.96*) CXXFLAGS="$CXXFLAGS -Wall -W -Wconversion";; - *) CXXFLAGS="$CXXFLAGS -ansi -Wall -W";; + 2.96*) CXXFLAGS="$CXXFLAGS -Wall -W -Wconversion";; + *) CXXFLAGS="$CXXFLAGS -ansi -Wall -W -Wno-return-type";; esac if test $lyx_devel_version = yes ; then case $gxx_version in 2.95.*) ;; 2.96*) ;; + *2.91*) ;; *) CXXFLAGS="$CXXFLAGS -pedantic";; esac fi diff --git a/src/mathed/math_utils.C b/src/mathed/math_utils.C index 90fb3bc5c3..a5fb789cce 100644 --- a/src/mathed/math_utils.C +++ b/src/mathed/math_utils.C @@ -86,11 +86,11 @@ int MathedLookupBOP(short id) issorted = true; } - int result = 0; binary_op_pair * res = lower_bound(binary_op_table, binary_op_table + bopCount, id, compara()); - if (res != (binary_op_table + bopCount)) - result = res->isrel; - return result; + if (res->id == id) + return res->isrel; + else + return LMB_NONE; } diff --git a/src/support/filetools.C b/src/support/filetools.C index 0c3cd19f24..a19bc74f03 100644 --- a/src/support/filetools.C +++ b/src/support/filetools.C @@ -1008,7 +1008,7 @@ static cmdret do_popen(string const & cmd) } -string findtexfile(string const & fil, string const & format) +string findtexfile(string const & fil, string const & /*format*/) { /* There is no problem to extend this function too use other methods to look for files. It could be setup to look @@ -1019,15 +1019,13 @@ string findtexfile(string const & fil, string const & format) Lgb */ - // If fil is a file with absolute path we just return it - if (AbsolutePath(fil)) return fil; - - // Check in the current dir. - if (FileInfo(OnlyFilename(fil)).exist()) - return OnlyFilename(fil); - + // If the file can be found directly, we just return a + // absolute path version of it. + if (FileInfo(fil).exist()) + return MakeAbsPath(fil); + // No we try to find it using kpsewhich. - string kpsecmd = "kpsewhich --format=" + format + " " + OnlyFilename(fil); + string kpsecmd = "kpsewhich " + fil; cmdret c = do_popen(kpsecmd); -- 2.39.2