mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
get rid of broken_header.h and some unneeded tests
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9326 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a2cd656e25
commit
37e82a5463
@ -1,3 +1,8 @@
|
||||
2004-11-29 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||
|
||||
* configure.ac: do not include broken_headers.h; do not check for
|
||||
strchr, memset and memmove
|
||||
|
||||
2004-11-04 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||
|
||||
* configure.ac: do not check for snprintf
|
||||
|
14
configure.ac
14
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)
|
||||
|
@ -1,3 +1,8 @@
|
||||
2004-11-29 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||
|
||||
* broken_headers.h: remove
|
||||
|
||||
* Makefile.am (lyx_SOURCES): remove broken_headers.h
|
||||
|
||||
2004-11-24 Alfredo Braunstein <abraunst@lyx.org>
|
||||
|
||||
|
@ -115,7 +115,6 @@ lyx_SOURCES = \
|
||||
boost.C \
|
||||
box.h \
|
||||
box.C \
|
||||
broken_headers.h \
|
||||
buffer.C \
|
||||
buffer.h \
|
||||
buffer_funcs.C \
|
||||
|
@ -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 */
|
@ -1,3 +1,7 @@
|
||||
2004-11-29 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||
|
||||
* input_validators.C: use support::contains instead of strchr
|
||||
|
||||
2004-11-26 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* FormFiledialog.C (expand_globs): changes due to the changed
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -1,3 +1,6 @@
|
||||
2004-11-29 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||
|
||||
* math_charinset.C: use support::contains instead of strchr
|
||||
|
||||
2004-11-26 André Pönitz <poenitz@gmx.net>
|
||||
|
||||
|
@ -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');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user