diff --git a/ChangeLog b/ChangeLog index 68fd53f9e6..374e454d37 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-11-29 Jean-Marc Lasgouttes + + * configure.ac: do not include broken_headers.h; do not check for + strchr, memset and memmove + 2004-11-04 Jean-Marc Lasgouttes * configure.ac: do not check for snprintf diff --git a/configure.ac b/configure.ac index c61bace4b4..8d3080253b 100644 --- a/configure.ac +++ b/configure.ac @@ -291,7 +291,7 @@ dnl work correctly because of some conflict with stdlib.h with g++ 2.96 dnl We aim to remove this eventually, since we should test as much as dnl possible with the compiler which will use the functions (JMarc) AC_LANG_PUSH(C) -AC_CHECK_FUNCS(memmove memset strchr mkfifo mkstemp mktemp) +AC_CHECK_FUNCS(mkfifo mkstemp mktemp) AC_LANG_POP(C) AC_FUNC_SELECT_ARGTYPES @@ -338,14 +338,6 @@ AH_BOTTOM([ /************************************************************ ** You should not need to change anything beyond this point */ -#ifndef HAVE_STRCHR -# define strchr(a,b) index(a,b) -#endif - -#ifndef HAVE_MEMMOVE -# define memmove(a,b,c) bcopy(b,a,c) -#endif - #ifndef HAVE_STRERROR #if defined(__cplusplus) extern "C" @@ -353,10 +345,6 @@ extern "C" char * strerror(int n); #endif -#ifdef BROKEN_HEADERS -#include "broken_headers.h" -#endif - #ifdef HAVE_MKSTEMP #ifndef HAVE_DECL_MKSTEMP #if defined(__cplusplus) diff --git a/src/ChangeLog b/src/ChangeLog index b97bd23aec..44351a0565 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,4 +1,9 @@ +2004-11-29 Jean-Marc Lasgouttes + + * broken_headers.h: remove + * Makefile.am (lyx_SOURCES): remove broken_headers.h + 2004-11-24 Alfredo Braunstein * BufferView.[Ch]: remove top_y, introduce anchor_ref, diff --git a/src/Makefile.am b/src/Makefile.am index 3f71e765f5..e9aa27be53 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -115,7 +115,6 @@ lyx_SOURCES = \ boost.C \ box.h \ box.C \ - broken_headers.h \ buffer.C \ buffer.h \ buffer_funcs.C \ diff --git a/src/broken_headers.h b/src/broken_headers.h deleted file mode 100644 index 687bde8d67..0000000000 --- a/src/broken_headers.h +++ /dev/null @@ -1,32 +0,0 @@ -// -*- C++ -*- -/** - * \file broken_headers.h - * This file is part of LyX, the document processor. - * Licence details can be found in the file COPYING. - * - * \author Lars Gullik Bjønnes - * - * Full author contact details are available in file CREDITS. - */ - -// A few prototypes missing from Sun and SCO 3.2v4 header files. - -#ifndef BROKEN_HEADERS_H -#define BROKEN_HEADERS_H - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef HAVE_MEMMOVE -void bcopy(unsigned char * b1, unsigned char * b2, int length); -#endif - -int readlink(char const * path, char * buf, int bufsiz); -int strcasecmp(char const * s1, char const * s2); - -#ifdef __cplusplus -} -#endif - -#endif /* _BROKEN_HEADERS_H */ diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index bcdd25cc54..8eba46e241 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,7 @@ +2004-11-29 Jean-Marc Lasgouttes + + * input_validators.C: use support::contains instead of strchr + 2004-11-26 Angus Leeming * FormFiledialog.C (expand_globs): changes due to the changed diff --git a/src/frontends/xforms/input_validators.C b/src/frontends/xforms/input_validators.C index c4e3389f0b..a184a49137 100644 --- a/src/frontends/xforms/input_validators.C +++ b/src/frontends/xforms/input_validators.C @@ -17,7 +17,9 @@ #include "lyx_forms.h" namespace support = lyx::support; - +using support::contains; +using support::isStrInt; +using support::isStrDbl; #if defined(__cplusplus) extern "C" @@ -28,8 +30,8 @@ int fl_int_filter(FL_OBJECT * ob, char const *, char const *, int c) { if (c == 0 /* final test before handing contents to app */ - || strchr("0123456789+-", c)) { - if (support::isStrInt(fl_get_input(ob))) + || contains("0123456789+-", c)) { + if (isStrInt(fl_get_input(ob))) return FL_VALID; } return FL_INVALID|FL_RINGBELL; @@ -40,7 +42,7 @@ int fl_unsigned_int_filter(FL_OBJECT * /*ob*/, char const *, char const *, int c) { if (c == 0 /* final test before handing contents to app */ - || strchr("0123456789", c)) { + || contains("0123456789", c)) { /* since we only accept numerals then it must be valid */ return FL_VALID; } @@ -52,8 +54,8 @@ int fl_float_filter(FL_OBJECT * ob, char const *, char const *, int c) { if (c == 0 /* final test before handing contents to app */ - || strchr("0123456789.+-", c)) { - if (support::isStrDbl(fl_get_input(ob))) + || contains("0123456789.+-", c)) { + if (isStrDbl(fl_get_input(ob))) return FL_VALID; } return FL_INVALID|FL_RINGBELL; @@ -66,8 +68,8 @@ int fl_unsigned_float_filter(FL_OBJECT * ob, int c) { if (c == 0 /* final test before handing contents to app */ - || strchr("0123456789.", c)) { - if (support::isStrDbl(fl_get_input(ob))) + || contains("0123456789.", c)) { + if (isStrDbl(fl_get_input(ob))) return FL_VALID; } return FL_INVALID|FL_RINGBELL; @@ -80,7 +82,7 @@ int fl_lowercase_filter(FL_OBJECT * /*ob*/, int c) { if (c == 0 /* final test before handing contents to app */ - || strchr("abcdefghijklmnopqrstuvwxyz0123456789", c)) { + || contains("abcdefghijklmnopqrstuvwxyz0123456789", c)) { /* since we only accept numerals then it must be valid */ return FL_VALID; } diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index df506cf15a..0bf48b8777 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -1,3 +1,6 @@ +2004-11-29 Jean-Marc Lasgouttes + + * math_charinset.C: use support::contains instead of strchr 2004-11-26 André Pönitz diff --git a/src/mathed/math_charinset.C b/src/mathed/math_charinset.C index 2f64372ee7..8f2674bba3 100644 --- a/src/mathed/math_charinset.C +++ b/src/mathed/math_charinset.C @@ -17,28 +17,23 @@ #include "debug.h" #include "dimension.h" +#include "support/lstrings.h" #include "textpainter.h" using std::auto_ptr; -#ifndef CXX_GLOBAL_CSTD -using std::strchr; -#endif - - extern bool has_math_fonts; namespace { bool isBinaryOp(char c) { - return strchr("+-<>=/*", c); + return lyx::support::contains("+-<>=/*", c); } bool slanted(char c) { - //if (strchr("0123456789;:!|[]().,?+/-*<>=", c) return ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z'); }