mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
* lib/strspn.c: New.
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
2001-08-03 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
|
* lib/strspn.c: New.
|
||||||
|
|
||||||
2001-08-01 Marc Autret <autret_m@epita.fr>
|
2001-08-01 Marc Autret <autret_m@epita.fr>
|
||||||
|
|
||||||
* doc/bison.texinfo: Update.
|
* doc/bison.texinfo: Update.
|
||||||
|
|||||||
1
THANKS
1
THANKS
@@ -7,6 +7,7 @@ Hans Aberg haberg@matematik.su.se
|
|||||||
Jesse Thilo jthilo@gnu.org
|
Jesse Thilo jthilo@gnu.org
|
||||||
Jim Meyering meyering@gnu.org
|
Jim Meyering meyering@gnu.org
|
||||||
Laurent Mascherpa laurent.mascherpa@epita.fr
|
Laurent Mascherpa laurent.mascherpa@epita.fr
|
||||||
|
Marc Autret autret_m@epita.fr
|
||||||
Neil Booth NeilB@earthling.net
|
Neil Booth NeilB@earthling.net
|
||||||
Noah Friedman friedman@gnu.org
|
Noah Friedman friedman@gnu.org
|
||||||
Paul Eggert eggert@twinsun.com
|
Paul Eggert eggert@twinsun.com
|
||||||
|
|||||||
63
aclocal.m4
vendored
63
aclocal.m4
vendored
@@ -527,11 +527,13 @@ fi
|
|||||||
# Ulrich Drepper <drepper@cygnus.com>, 1995.
|
# Ulrich Drepper <drepper@cygnus.com>, 1995.
|
||||||
#
|
#
|
||||||
# This file can be copied and used freely without restrictions. It can
|
# This file can be copied and used freely without restrictions. It can
|
||||||
# be used in projects which are not available under the GNU Public License
|
# be used in projects which are not available under the GNU General Public
|
||||||
# but which still want to provide support for the GNU gettext functionality.
|
# License but which still want to provide support for the GNU gettext
|
||||||
# Please note that the actual code is *not* freely available.
|
# functionality.
|
||||||
|
# Please note that the actual code of GNU gettext is covered by the GNU
|
||||||
|
# General Public License and is *not* in the public domain.
|
||||||
|
|
||||||
# serial 9
|
# serial 10
|
||||||
|
|
||||||
dnl Usage: AM_WITH_NLS([TOOLSYMBOL], [NEEDSYMBOL], [LIBDIR]).
|
dnl Usage: AM_WITH_NLS([TOOLSYMBOL], [NEEDSYMBOL], [LIBDIR]).
|
||||||
dnl If TOOLSYMBOL is specified and is 'use-libtool', then a libtool library
|
dnl If TOOLSYMBOL is specified and is 'use-libtool', then a libtool library
|
||||||
@@ -642,14 +644,14 @@ return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", ""
|
|||||||
AC_CHECK_FUNCS(dcgettext)
|
AC_CHECK_FUNCS(dcgettext)
|
||||||
LIBS="$gt_save_LIBS"
|
LIBS="$gt_save_LIBS"
|
||||||
|
|
||||||
|
dnl Search for GNU msgfmt in the PATH.
|
||||||
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
||||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
|
[$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :)
|
||||||
if test "$MSGFMT" != "no"; then
|
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
||||||
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
dnl Search for GNU xgettext in the PATH.
|
||||||
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
[$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :)
|
||||||
|
|
||||||
CATOBJEXT=.gmo
|
CATOBJEXT=.gmo
|
||||||
fi
|
fi
|
||||||
@@ -666,10 +668,10 @@ return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", ""
|
|||||||
dnl Mark actions used to generate GNU NLS library.
|
dnl Mark actions used to generate GNU NLS library.
|
||||||
INTLOBJS="\$(GETTOBJS)"
|
INTLOBJS="\$(GETTOBJS)"
|
||||||
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
||||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
|
[$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :)
|
||||||
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
||||||
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
[$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :)
|
||||||
AC_SUBST(MSGFMT)
|
AC_SUBST(MSGFMT)
|
||||||
BUILD_INCLUDED_LIBINTL=yes
|
BUILD_INCLUDED_LIBINTL=yes
|
||||||
USE_INCLUDED_LIBINTL=yes
|
USE_INCLUDED_LIBINTL=yes
|
||||||
@@ -678,11 +680,26 @@ return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", ""
|
|||||||
LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
|
LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
|
||||||
|
dnl Test whether we really found GNU msgfmt.
|
||||||
|
if test "$GMSGFMT" != ":"; then
|
||||||
|
dnl If it is no GNU msgfmt we define it as : so that the
|
||||||
|
dnl Makefiles still can work.
|
||||||
|
if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
|
||||||
|
: ;
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(
|
||||||
|
[found msgfmt program is not GNU msgfmt; ignore it])
|
||||||
|
GMSGFMT=":"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
|
||||||
dnl Test whether we really found GNU xgettext.
|
dnl Test whether we really found GNU xgettext.
|
||||||
if test "$XGETTEXT" != ":"; then
|
if test "$XGETTEXT" != ":"; then
|
||||||
dnl If it is no GNU xgettext we define it as : so that the
|
dnl If it is no GNU xgettext we define it as : so that the
|
||||||
dnl Makefiles still can work.
|
dnl Makefiles still can work.
|
||||||
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
|
if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
|
||||||
: ;
|
: ;
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT(
|
AC_MSG_RESULT(
|
||||||
@@ -706,6 +723,8 @@ return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", ""
|
|||||||
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
|
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
|
||||||
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
|
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
|
||||||
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
|
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
|
||||||
|
# In autoconf-2.13 it is called $ac_given_srcdir.
|
||||||
|
# In autoconf-2.50 it is called $srcdir.
|
||||||
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
|
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
|
||||||
case "$ac_given_srcdir" in
|
case "$ac_given_srcdir" in
|
||||||
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
|
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
|
||||||
@@ -877,11 +896,13 @@ strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
|
|||||||
# Ulrich Drepper <drepper@cygnus.com>, 1996.
|
# Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||||
#
|
#
|
||||||
# This file can be copied and used freely without restrictions. It can
|
# This file can be copied and used freely without restrictions. It can
|
||||||
# be used in projects which are not available under the GNU Public License
|
# be used in projects which are not available under the GNU General Public
|
||||||
# but which still want to provide support for the GNU gettext functionality.
|
# License but which still want to provide support for the GNU gettext
|
||||||
# Please note that the actual code is *not* freely available.
|
# functionality.
|
||||||
|
# Please note that the actual code of GNU gettext is covered by the GNU
|
||||||
|
# General Public License and is *not* in the public domain.
|
||||||
|
|
||||||
# serial 1
|
# serial 2
|
||||||
|
|
||||||
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
|
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
|
||||||
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
|
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
|
||||||
@@ -913,7 +934,7 @@ ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
|
|||||||
;;
|
;;
|
||||||
esac])dnl
|
esac])dnl
|
||||||
$1="$ac_cv_path_$1"
|
$1="$ac_cv_path_$1"
|
||||||
if test -n "[$]$1"; then
|
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
|
||||||
AC_MSG_RESULT([$]$1)
|
AC_MSG_RESULT([$]$1)
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
@@ -1040,9 +1061,11 @@ AC_DEFUN([AM_LANGINFO_CODESET],
|
|||||||
# Ulrich Drepper <drepper@cygnus.com>, 1995.
|
# Ulrich Drepper <drepper@cygnus.com>, 1995.
|
||||||
#
|
#
|
||||||
# This file can be copied and used freely without restrictions. It can
|
# This file can be copied and used freely without restrictions. It can
|
||||||
# be used in projects which are not available under the GNU Public License
|
# be used in projects which are not available under the GNU General Public
|
||||||
# but which still want to provide support for the GNU gettext functionality.
|
# License but which still want to provide support for the GNU gettext
|
||||||
# Please note that the actual code is *not* freely available.
|
# functionality.
|
||||||
|
# Please note that the actual code of GNU gettext is covered by the GNU
|
||||||
|
# General Public License and is *not* in the public domain.
|
||||||
|
|
||||||
# serial 2
|
# serial 2
|
||||||
|
|
||||||
|
|||||||
12
config.hin
12
config.hin
@@ -149,6 +149,9 @@
|
|||||||
/* Define if you have the <stddef.h> header file. */
|
/* Define if you have the <stddef.h> header file. */
|
||||||
#undef HAVE_STDDEF_H
|
#undef HAVE_STDDEF_H
|
||||||
|
|
||||||
|
/* Define if you have the <stdint.h> header file. */
|
||||||
|
#undef HAVE_STDINT_H
|
||||||
|
|
||||||
/* Define if you have the <stdlib.h> header file. */
|
/* Define if you have the <stdlib.h> header file. */
|
||||||
#undef HAVE_STDLIB_H
|
#undef HAVE_STDLIB_H
|
||||||
|
|
||||||
@@ -182,12 +185,21 @@
|
|||||||
/* Define if you have the `strnlen' function. */
|
/* Define if you have the `strnlen' function. */
|
||||||
#undef HAVE_STRNLEN
|
#undef HAVE_STRNLEN
|
||||||
|
|
||||||
|
/* Define if you have the `strspn' function. */
|
||||||
|
#undef HAVE_STRSPN
|
||||||
|
|
||||||
/* Define if you have the `strtoul' function. */
|
/* Define if you have the `strtoul' function. */
|
||||||
#undef HAVE_STRTOUL
|
#undef HAVE_STRTOUL
|
||||||
|
|
||||||
/* Define if you have the <sys/param.h> header file. */
|
/* Define if you have the <sys/param.h> header file. */
|
||||||
#undef HAVE_SYS_PARAM_H
|
#undef HAVE_SYS_PARAM_H
|
||||||
|
|
||||||
|
/* Define if you have the <sys/stat.h> header file. */
|
||||||
|
#undef HAVE_SYS_STAT_H
|
||||||
|
|
||||||
|
/* Define if you have the <sys/types.h> header file. */
|
||||||
|
#undef HAVE_SYS_TYPES_H
|
||||||
|
|
||||||
/* Define if you have the `tsearch' function. */
|
/* Define if you have the `tsearch' function. */
|
||||||
#undef HAVE_TSEARCH
|
#undef HAVE_TSEARCH
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# Process this file with autoconf to produce a configure script.
|
# Process this file with autoconf to produce a configure script.
|
||||||
AC_PREREQ(2.50)
|
AC_PREREQ(2.52)
|
||||||
AC_INIT(bison, 1.28a, bug-bison@gnu.org)
|
AC_INIT(bison, 1.28a, bug-bison@gnu.org)
|
||||||
AC_CONFIG_AUX_DIR(config)
|
AC_CONFIG_AUX_DIR(config)
|
||||||
AM_INIT_AUTOMAKE(bison, 1.28a)
|
AM_INIT_AUTOMAKE(bison, 1.28a)
|
||||||
@@ -63,7 +63,7 @@ AM_C_PROTOTYPES
|
|||||||
AC_FUNC_ALLOCA
|
AC_FUNC_ALLOCA
|
||||||
AC_CHECK_FUNCS(mkstemp setlocale)
|
AC_CHECK_FUNCS(mkstemp setlocale)
|
||||||
AC_CHECK_DECLS([stpcpy, strndup, strnlen, memchr])
|
AC_CHECK_DECLS([stpcpy, strndup, strnlen, memchr])
|
||||||
AC_REPLACE_FUNCS(stpcpy strndup strnlen memchr)
|
AC_REPLACE_FUNCS(stpcpy strndup strnlen strspn memchr)
|
||||||
jm_FUNC_MALLOC
|
jm_FUNC_MALLOC
|
||||||
jm_FUNC_REALLOC
|
jm_FUNC_REALLOC
|
||||||
jm_PREREQ_QUOTEARG
|
jm_PREREQ_QUOTEARG
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CF
|
|||||||
CCLD = $(CC)
|
CCLD = $(CC)
|
||||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
|
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
|
||||||
DIST_COMMON = Makefile.am Makefile.in alloca.c ansi2knr.1 ansi2knr.c \
|
DIST_COMMON = Makefile.am Makefile.in alloca.c ansi2knr.1 ansi2knr.c \
|
||||||
memchr.c stpcpy.c strndup.c strnlen.c
|
memchr.c stpcpy.c strndup.c strnlen.c strspn.c
|
||||||
|
|
||||||
|
|
||||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
@@ -138,8 +138,8 @@ TAR = tar
|
|||||||
GZIP_ENV = --best
|
GZIP_ENV = --best
|
||||||
DEP_FILES = .deps/alloca.P .deps/error.P .deps/getopt.P .deps/getopt1.P \
|
DEP_FILES = .deps/alloca.P .deps/error.P .deps/getopt.P .deps/getopt1.P \
|
||||||
.deps/memchr.P .deps/obstack.P .deps/quote.P .deps/quotearg.P \
|
.deps/memchr.P .deps/obstack.P .deps/quote.P .deps/quotearg.P \
|
||||||
.deps/stpcpy.P .deps/strndup.P .deps/strnlen.P .deps/xmalloc.P \
|
.deps/stpcpy.P .deps/strndup.P .deps/strnlen.P .deps/strspn.P \
|
||||||
.deps/xstrdup.P
|
.deps/xmalloc.P .deps/xstrdup.P
|
||||||
SOURCES = $(libbison_a_SOURCES)
|
SOURCES = $(libbison_a_SOURCES)
|
||||||
OBJECTS = $(libbison_a_OBJECTS)
|
OBJECTS = $(libbison_a_OBJECTS)
|
||||||
|
|
||||||
@@ -227,13 +227,15 @@ strndup_.c: strndup.c $(ANSI2KNR)
|
|||||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strndup.c; then echo $(srcdir)/strndup.c; else echo strndup.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strndup_.c
|
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strndup.c; then echo $(srcdir)/strndup.c; else echo strndup.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strndup_.c
|
||||||
strnlen_.c: strnlen.c $(ANSI2KNR)
|
strnlen_.c: strnlen.c $(ANSI2KNR)
|
||||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strnlen.c; then echo $(srcdir)/strnlen.c; else echo strnlen.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strnlen_.c
|
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strnlen.c; then echo $(srcdir)/strnlen.c; else echo strnlen.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strnlen_.c
|
||||||
|
strspn_.c: strspn.c $(ANSI2KNR)
|
||||||
|
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strspn.c; then echo $(srcdir)/strspn.c; else echo strspn.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strspn_.c
|
||||||
xmalloc_.c: xmalloc.c $(ANSI2KNR)
|
xmalloc_.c: xmalloc.c $(ANSI2KNR)
|
||||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xmalloc.c; then echo $(srcdir)/xmalloc.c; else echo xmalloc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xmalloc_.c
|
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xmalloc.c; then echo $(srcdir)/xmalloc.c; else echo xmalloc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xmalloc_.c
|
||||||
xstrdup_.c: xstrdup.c $(ANSI2KNR)
|
xstrdup_.c: xstrdup.c $(ANSI2KNR)
|
||||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xstrdup.c; then echo $(srcdir)/xstrdup.c; else echo xstrdup.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xstrdup_.c
|
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xstrdup.c; then echo $(srcdir)/xstrdup.c; else echo xstrdup.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xstrdup_.c
|
||||||
alloca_.o error_.o getopt_.o getopt1_.o memchr_.o obstack_.o quote_.o \
|
alloca_.o error_.o getopt_.o getopt1_.o memchr_.o obstack_.o quote_.o \
|
||||||
quotearg_.o stpcpy_.o strndup_.o strnlen_.o xmalloc_.o xstrdup_.o : \
|
quotearg_.o stpcpy_.o strndup_.o strnlen_.o strspn_.o xmalloc_.o \
|
||||||
$(ANSI2KNR)
|
xstrdup_.o : $(ANSI2KNR)
|
||||||
|
|
||||||
tags: TAGS
|
tags: TAGS
|
||||||
|
|
||||||
|
|||||||
59
lib/strspn.c
Normal file
59
lib/strspn.c
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
/* Copyright (C) 1991, 1997 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
NOTE: The canonical source of this file is maintained with the GNU
|
||||||
|
C Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu.
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2 of
|
||||||
|
the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but
|
||||||
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public
|
||||||
|
License along with this program; see the file COPYING.LIB. If not,
|
||||||
|
write to the Free Software Foundation, Inc., 59 Temple Place -
|
||||||
|
Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
#if HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined _LIBC || HAVE_STRING_H
|
||||||
|
# include <string.h>
|
||||||
|
#else
|
||||||
|
# include <strings.h>
|
||||||
|
# ifndef strchr
|
||||||
|
# define strchr index
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#undef strspn
|
||||||
|
|
||||||
|
/* Return the length of the maximum initial segment
|
||||||
|
of S which contains only characters in ACCEPT. */
|
||||||
|
size_t
|
||||||
|
strspn (s, accept)
|
||||||
|
const char *s;
|
||||||
|
const char *accept;
|
||||||
|
{
|
||||||
|
const char *p;
|
||||||
|
const char *a;
|
||||||
|
size_t count = 0;
|
||||||
|
|
||||||
|
for (p = s; *p != '\0'; ++p)
|
||||||
|
{
|
||||||
|
for (a = accept; *a != '\0'; ++a)
|
||||||
|
if (*p == *a)
|
||||||
|
break;
|
||||||
|
if (*a == '\0')
|
||||||
|
return count;
|
||||||
|
else
|
||||||
|
++count;
|
||||||
|
}
|
||||||
|
|
||||||
|
return count;
|
||||||
|
}
|
||||||
@@ -265,6 +265,8 @@ strndup_.c: strndup.c $(ANSI2KNR)
|
|||||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strndup.c; then echo $(srcdir)/strndup.c; else echo strndup.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strndup_.c
|
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strndup.c; then echo $(srcdir)/strndup.c; else echo strndup.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strndup_.c
|
||||||
strnlen_.c: strnlen.c $(ANSI2KNR)
|
strnlen_.c: strnlen.c $(ANSI2KNR)
|
||||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strnlen.c; then echo $(srcdir)/strnlen.c; else echo strnlen.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strnlen_.c
|
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strnlen.c; then echo $(srcdir)/strnlen.c; else echo strnlen.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strnlen_.c
|
||||||
|
strspn_.c: strspn.c $(ANSI2KNR)
|
||||||
|
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strspn.c; then echo $(srcdir)/strspn.c; else echo strspn.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strspn_.c
|
||||||
symtab_.c: symtab.c $(ANSI2KNR)
|
symtab_.c: symtab.c $(ANSI2KNR)
|
||||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/symtab.c; then echo $(srcdir)/symtab.c; else echo symtab.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > symtab_.c
|
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/symtab.c; then echo $(srcdir)/symtab.c; else echo symtab.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > symtab_.c
|
||||||
vmsgetargs_.c: vmsgetargs.c $(ANSI2KNR)
|
vmsgetargs_.c: vmsgetargs.c $(ANSI2KNR)
|
||||||
@@ -274,7 +276,7 @@ warshall_.c: warshall.c $(ANSI2KNR)
|
|||||||
LR0_.o alloca_.o closure_.o complain_.o conflicts_.o derives_.o \
|
LR0_.o alloca_.o closure_.o complain_.o conflicts_.o derives_.o \
|
||||||
files_.o getargs_.o gram_.o lalr_.o lex_.o main_.o memchr_.o \
|
files_.o getargs_.o gram_.o lalr_.o lex_.o main_.o memchr_.o \
|
||||||
nullable_.o output_.o print_.o reader_.o reduce_.o stpcpy_.o strndup_.o \
|
nullable_.o output_.o print_.o reader_.o reduce_.o stpcpy_.o strndup_.o \
|
||||||
strnlen_.o symtab_.o vmsgetargs_.o warshall_.o : $(ANSI2KNR)
|
strnlen_.o strspn_.o symtab_.o vmsgetargs_.o warshall_.o : $(ANSI2KNR)
|
||||||
|
|
||||||
install-pkgdataDATA: $(pkgdata_DATA)
|
install-pkgdataDATA: $(pkgdata_DATA)
|
||||||
@$(NORMAL_INSTALL)
|
@$(NORMAL_INSTALL)
|
||||||
|
|||||||
Reference in New Issue
Block a user