[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Cvs-cvs] ccvs/lib ChangeLog Makefile.am Makefile.gnulib ...
From: |
Derek Robert Price |
Subject: |
[Cvs-cvs] ccvs/lib ChangeLog Makefile.am Makefile.gnulib ... |
Date: |
Thu, 06 Jul 2006 13:47:57 +0000 |
CVSROOT: /cvsroot/cvs
Module name: ccvs
Changes by: Derek Robert Price <dprice> 06/07/06 13:47:57
Modified files:
lib : ChangeLog Makefile.am Makefile.gnulib
Makefile.in exit.h fnmatch.c fnmatch_loop.c
getaddrinfo.c getaddrinfo.h getdate.c getdate.y
strtol.c
Added files:
lib : snprintf.c snprintf.h
Log message:
* Makefile.am: Import changes from...
* Makefile.gnulib: ...this regenerated file.
* exit.h, fnmatch.c, fnmatch_loop.c, getaddrinfo.c, getaddrinfo.h,
getdate.c, getdate.y, strtol.c: Update from GNULIB.
* snprintf.c, snprintf.h: New files from GNULIB.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/ccvs/lib/ChangeLog?cvsroot=cvs&r1=1.529&r2=1.530
http://cvs.savannah.gnu.org/viewcvs/ccvs/lib/Makefile.am?cvsroot=cvs&r1=1.117&r2=1.118
http://cvs.savannah.gnu.org/viewcvs/ccvs/lib/Makefile.gnulib?cvsroot=cvs&r1=1.80&r2=1.81
http://cvs.savannah.gnu.org/viewcvs/ccvs/lib/Makefile.in?cvsroot=cvs&r1=1.217&r2=1.218
http://cvs.savannah.gnu.org/viewcvs/ccvs/lib/exit.h?cvsroot=cvs&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/ccvs/lib/fnmatch.c?cvsroot=cvs&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/ccvs/lib/fnmatch_loop.c?cvsroot=cvs&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/ccvs/lib/getaddrinfo.c?cvsroot=cvs&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/ccvs/lib/getaddrinfo.h?cvsroot=cvs&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/ccvs/lib/getdate.c?cvsroot=cvs&r1=1.45&r2=1.46
http://cvs.savannah.gnu.org/viewcvs/ccvs/lib/getdate.y?cvsroot=cvs&r1=1.36&r2=1.37
http://cvs.savannah.gnu.org/viewcvs/ccvs/lib/strtol.c?cvsroot=cvs&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/ccvs/lib/snprintf.c?cvsroot=cvs&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ccvs/lib/snprintf.h?cvsroot=cvs&rev=1.1
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/cvs/ccvs/lib/ChangeLog,v
retrieving revision 1.529
retrieving revision 1.530
diff -u -b -r1.529 -r1.530
--- ChangeLog 6 Jul 2006 02:17:59 -0000 1.529
+++ ChangeLog 6 Jul 2006 13:47:56 -0000 1.530
@@ -1,3 +1,11 @@
+2006-07-06 Derek Price <address@hidden>
+
+ * Makefile.am: Import changes from...
+ * Makefile.gnulib: ...this regenerated file.
+ * exit.h, fnmatch.c, fnmatch_loop.c, getaddrinfo.c, getaddrinfo.h,
+ getdate.c, getdate.y, strtol.c: Update from GNULIB.
+ * snprintf.c, snprintf.h: New files from GNULIB.
+
2006-07-05 Derek Price <address@hidden>
* same-inode.h, strndup.c, strndup.h, strnlen.c, strnlen.h, xstrndup.c,
Index: Makefile.am
===================================================================
RCS file: /cvsroot/cvs/ccvs/lib/Makefile.am,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -b -r1.117 -r1.118
--- Makefile.am 6 Jul 2006 02:17:59 -0000 1.117
+++ Makefile.am 6 Jul 2006 13:47:56 -0000 1.118
@@ -265,6 +265,12 @@
## end gnulib module size_max
+## begin gnulib module snprintf
+
+libcvs_a_SOURCES += snprintf.h
+
+## end gnulib module snprintf
+
## begin gnulib module stdbool
BUILT_SOURCES += $(STDBOOL_H)
Index: Makefile.gnulib
===================================================================
RCS file: /cvsroot/cvs/ccvs/lib/Makefile.gnulib,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -b -r1.80 -r1.81
--- Makefile.gnulib 6 Jul 2006 02:17:59 -0000 1.80
+++ Makefile.gnulib 6 Jul 2006 13:47:56 -0000 1.81
@@ -208,6 +208,12 @@
## end gnulib module size_max
+## begin gnulib module snprintf
+
+libgnu_a_SOURCES += snprintf.h
+
+## end gnulib module snprintf
+
## begin gnulib module stdbool
BUILT_SOURCES += $(STDBOOL_H)
Index: Makefile.in
===================================================================
RCS file: /cvsroot/cvs/ccvs/lib/Makefile.in,v
retrieving revision 1.217
retrieving revision 1.218
diff -u -b -r1.217 -r1.218
--- Makefile.in 6 Jul 2006 02:17:59 -0000 1.217
+++ Makefile.in 6 Jul 2006 13:47:56 -0000 1.218
@@ -75,14 +75,15 @@
pipe-safer.c printf-args.c printf-parse.c quotearg.c \
quotearg.h readlink.c realloc.c regcomp.c regex.c regex.h \
regex_internal.c regex_internal.h regexec.c rename.c rpmatch.c \
- save-cwd.c save-cwd.h setenv.c stat-macros.h strcasecmp.c \
- strdup.c strdup.h strerror.c strftime.c strftime.h \
- strncasecmp.c strndup.c strndup.h strnlen.c strnlen.h strstr.c \
- strtoimax.c strtol.c strtoll.c strtoul.c strtoull.c \
- strtoumax.c sunos57-select.c tempname.c time_r.c time_r.h \
- timespec.h unistd--.h unistd-safer.h unlocked-io.h unsetenv.c \
- vasnprintf.c vasprintf.c waitpid.c xalloc.h xgetcwd.c \
- xgetcwd.h xmalloc.c xreadlink.c xreadlink.h yesno.c yesno.h
+ save-cwd.c save-cwd.h setenv.c snprintf.c stat-macros.h \
+ strcasecmp.c strdup.c strdup.h strerror.c strftime.c \
+ strftime.h strncasecmp.c strndup.c strndup.h strnlen.c \
+ strnlen.h strstr.c strtoimax.c strtol.c strtoll.c strtoul.c \
+ strtoull.c strtoumax.c sunos57-select.c tempname.c time_r.c \
+ time_r.h timespec.h unistd--.h unistd-safer.h unlocked-io.h \
+ unsetenv.c vasnprintf.c vasprintf.c waitpid.c xalloc.h \
+ xgetcwd.c xgetcwd.h xmalloc.c xreadlink.c xreadlink.h yesno.c \
+ yesno.h
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/_inttypes_h.m4 \
$(top_srcdir)/m4/absolute-header.m4 \
@@ -137,17 +138,17 @@
$(top_srcdir)/m4/rename.m4 $(top_srcdir)/m4/restrict.m4 \
$(top_srcdir)/m4/rpmatch.m4 $(top_srcdir)/m4/save-cwd.m4 \
$(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/signed.m4 \
- $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/socklen.m4 \
- $(top_srcdir)/m4/sockpfaf.m4 $(top_srcdir)/m4/ssize_t.m4 \
- $(top_srcdir)/m4/stat-macros.m4 $(top_srcdir)/m4/stdbool.m4 \
- $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdint_h.m4 \
- $(top_srcdir)/m4/strcase.m4 $(top_srcdir)/m4/strdup.m4 \
- $(top_srcdir)/m4/strerror.m4 $(top_srcdir)/m4/strftime.m4 \
- $(top_srcdir)/m4/strndup.m4 $(top_srcdir)/m4/strnlen.m4 \
- $(top_srcdir)/m4/strstr.m4 $(top_srcdir)/m4/strtoimax.m4 \
- $(top_srcdir)/m4/strtol.m4 $(top_srcdir)/m4/strtoll.m4 \
- $(top_srcdir)/m4/strtoul.m4 $(top_srcdir)/m4/strtoull.m4 \
- $(top_srcdir)/m4/strtoumax.m4 \
+ $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/snprintf.m4 \
+ $(top_srcdir)/m4/socklen.m4 $(top_srcdir)/m4/sockpfaf.m4 \
+ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat-macros.m4 \
+ $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint.m4 \
+ $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/strcase.m4 \
+ $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \
+ $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/strndup.m4 \
+ $(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strstr.m4 \
+ $(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtol.m4 \
+ $(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/strtoul.m4 \
+ $(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \
$(top_srcdir)/m4/sunos57-select.m4 \
$(top_srcdir)/m4/sys_socket_h.m4 \
$(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/time_r.m4 \
@@ -374,10 +375,10 @@
cycle-check.h dev-ino.h same-inode.h basename.c stripslash.c \
error.h exit.h getaddrinfo.h getnline.h getnline.c gettext.h \
inet_ntop.h mbchar.h mbuiter.h minmax.h setenv.h size_max.h \
- strcase.h strnlen1.h strnlen1.c strstr.h printf-args.h \
- printf-parse.h vasnprintf.h vasprintf.h verify.h wcwidth.h \
- xalloc-die.c xgethostname.h xgethostname.c xsize.h xstrndup.h \
- xstrndup.c
+ snprintf.h strcase.h strnlen1.h strnlen1.c strstr.h \
+ printf-args.h printf-parse.h vasnprintf.h vasprintf.h verify.h \
+ wcwidth.h xalloc-die.c xgethostname.h xgethostname.c xsize.h \
+ xstrndup.h xstrndup.c
libcvs_a_LIBADD = @LIBOBJS@ @ALLOCA@
BUILT_SOURCES = $(ALLOCA_H) $(FNMATCH_H) getdate.c $(GETOPT_H) \
$(GLOB_H) $(STDBOOL_H) $(STDINT_H) $(SYS_SOCKET_H) \
@@ -535,6 +536,7 @@
@AMDEP_TRUE@@am__include@ @address@hidden(DEPDIR)/address@hidden@
@AMDEP_TRUE@@am__include@ @address@hidden(DEPDIR)/address@hidden@
@AMDEP_TRUE@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
@AMDEP_TRUE@@am__include@ @address@hidden(DEPDIR)/address@hidden@
@AMDEP_TRUE@@am__include@ @address@hidden(DEPDIR)/address@hidden@
@AMDEP_TRUE@@am__include@ @address@hidden(DEPDIR)/address@hidden@
Index: exit.h
===================================================================
RCS file: /cvsroot/cvs/ccvs/lib/exit.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- exit.h 23 May 2005 17:44:30 -0000 1.2
+++ exit.h 6 Jul 2006 13:47:56 -0000 1.3
@@ -21,7 +21,7 @@
/* Get exit() declaration. */
#include <stdlib.h>
-/* Some systems do not define EXIT_*, even with STDC_HEADERS. */
+/* Some systems do not define EXIT_*, despite otherwise supporting C89. */
#ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0
#endif
Index: fnmatch.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/lib/fnmatch.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- fnmatch.c 20 Mar 2006 02:21:56 -0000 1.13
+++ fnmatch.c 6 Jul 2006 13:47:56 -0000 1.14
@@ -86,34 +86,17 @@
#if defined _LIBC || !defined __GNU_LIBRARY__ || !HAVE_FNMATCH_GNU
-# if defined STDC_HEADERS || !defined isascii
-# define ISASCII(c) 1
-# else
-# define ISASCII(c) isascii(c)
-# endif
-
# ifdef isblank
-# define ISBLANK(c) (ISASCII (c) && isblank (c))
+# define ISBLANK(c) isblank (c)
# else
# define ISBLANK(c) ((c) == ' ' || (c) == '\t')
# endif
# ifdef isgraph
-# define ISGRAPH(c) (ISASCII (c) && isgraph (c))
+# define ISGRAPH(c) isgraph (c)
# else
-# define ISGRAPH(c) (ISASCII (c) && isprint (c) && !isspace (c))
+# define ISGRAPH(c) (isprint (c) && !isspace (c))
# endif
-# define ISPRINT(c) (ISASCII (c) && isprint (c))
-# define ISDIGIT(c) (ISASCII (c) && isdigit (c))
-# define ISALNUM(c) (ISASCII (c) && isalnum (c))
-# define ISALPHA(c) (ISASCII (c) && isalpha (c))
-# define ISCNTRL(c) (ISASCII (c) && iscntrl (c))
-# define ISLOWER(c) (ISASCII (c) && islower (c))
-# define ISPUNCT(c) (ISASCII (c) && ispunct (c))
-# define ISSPACE(c) (ISASCII (c) && isspace (c))
-# define ISUPPER(c) (ISASCII (c) && isupper (c))
-# define ISXDIGIT(c) (ISASCII (c) && isxdigit (c))
-
# define STREQ(s1, s2) ((strcmp (s1, s2) == 0))
# if defined _LIBC || WIDE_CHAR_SUPPORT
Index: fnmatch_loop.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/lib/fnmatch_loop.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- fnmatch_loop.c 20 Mar 2006 02:21:56 -0000 1.5
+++ fnmatch_loop.c 6 Jul 2006 13:47:56 -0000 1.6
@@ -288,18 +288,18 @@
goto matched;
# endif
#else
- if ((STREQ (str, L_("alnum")) && ISALNUM ((UCHAR) *n))
- || (STREQ (str, L_("alpha")) && ISALPHA ((UCHAR) *n))
+ if ((STREQ (str, L_("alnum")) && isalnum ((UCHAR) *n))
+ || (STREQ (str, L_("alpha")) && isalpha ((UCHAR) *n))
|| (STREQ (str, L_("blank")) && ISBLANK ((UCHAR) *n))
- || (STREQ (str, L_("cntrl")) && ISCNTRL ((UCHAR) *n))
- || (STREQ (str, L_("digit")) && ISDIGIT ((UCHAR) *n))
+ || (STREQ (str, L_("cntrl")) && iscntrl ((UCHAR) *n))
+ || (STREQ (str, L_("digit")) && isdigit ((UCHAR) *n))
|| (STREQ (str, L_("graph")) && ISGRAPH ((UCHAR) *n))
- || (STREQ (str, L_("lower")) && ISLOWER ((UCHAR) *n))
- || (STREQ (str, L_("print")) && ISPRINT ((UCHAR) *n))
- || (STREQ (str, L_("punct")) && ISPUNCT ((UCHAR) *n))
- || (STREQ (str, L_("space")) && ISSPACE ((UCHAR) *n))
- || (STREQ (str, L_("upper")) && ISUPPER ((UCHAR) *n))
- || (STREQ (str, L_("xdigit")) && ISXDIGIT ((UCHAR) *n)))
+ || (STREQ (str, L_("lower")) && islower ((UCHAR) *n))
+ || (STREQ (str, L_("print")) && isprint ((UCHAR) *n))
+ || (STREQ (str, L_("punct")) && ispunct ((UCHAR) *n))
+ || (STREQ (str, L_("space")) && isspace ((UCHAR) *n))
+ || (STREQ (str, L_("upper")) && isupper ((UCHAR) *n))
+ || (STREQ (str, L_("xdigit")) && isxdigit ((UCHAR) *n)))
goto matched;
#endif
c = *p++;
Index: getaddrinfo.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/lib/getaddrinfo.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- getaddrinfo.c 30 Jun 2006 23:18:32 -0000 1.9
+++ getaddrinfo.c 6 Jul 2006 13:47:56 -0000 1.10
@@ -38,6 +38,8 @@
#define _(String) gettext (String)
#define N_(String) String
+#include "inet_ntop.h"
+#include "snprintf.h"
#include "strdup.h"
#if defined _WIN32 || defined __WIN32__
Index: getaddrinfo.h
===================================================================
RCS file: /cvsroot/cvs/ccvs/lib/getaddrinfo.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- getaddrinfo.h 30 Jun 2006 01:58:56 -0000 1.9
+++ getaddrinfo.h 6 Jul 2006 13:47:56 -0000 1.10
@@ -142,4 +142,12 @@
# endif
+/* Possible flags for getnameinfo. */
+# ifndef NI_NUMERICHOST
+# define NI_NUMERICHOST 1
+# endif
+# ifndef NI_NUMERICSERV
+# define NI_NUMERICSERV 2
+# endif
+
#endif /* GETADDRINFO_H */
Index: getdate.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/lib/getdate.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -b -r1.45 -r1.46
--- getdate.c 19 Jun 2006 17:45:58 -0000 1.45
+++ getdate.c 6 Jul 2006 13:47:56 -0000 1.46
@@ -173,15 +173,6 @@
#include "setenv.h"
#include "xalloc.h"
-#if STDC_HEADERS || (! defined isascii && ! HAVE_ISASCII)
-# define IN_CTYPE_DOMAIN(c) 1
-#else
-# define IN_CTYPE_DOMAIN(c) isascii (c)
-#endif
-
-#define ISSPACE(c) (IN_CTYPE_DOMAIN (c) && isspace (c))
-#define ISALPHA(c) (IN_CTYPE_DOMAIN (c) && isalpha (c))
-#define ISLOWER(c) (IN_CTYPE_DOMAIN (c) && islower (c))
/* ISDIGIT differs from isdigit, as follows:
- Its arg may be any int or unsigned int; it need not be an unsigned char.
@@ -335,7 +326,7 @@
#endif
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
-#line 224 "getdate.y"
+#line 215 "getdate.y"
typedef union YYSTYPE {
long int intval;
textint textintval;
@@ -343,7 +334,7 @@
relative_time rel;
} YYSTYPE;
/* Line 196 of yacc.c. */
-#line 347 "getdate.c"
+#line 338 "getdate.c"
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
@@ -355,7 +346,7 @@
/* Line 219 of yacc.c. */
-#line 359 "getdate.c"
+#line 350 "getdate.c"
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
# define YYSIZE_T __SIZE_TYPE__
@@ -603,14 +594,14 @@
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const unsigned short int yyrline[] =
{
- 0, 250, 250, 251, 255, 262, 264, 268, 270, 272,
- 274, 276, 278, 280, 284, 292, 300, 310, 317, 329,
- 334, 342, 344, 354, 356, 358, 363, 368, 373, 378,
- 386, 391, 411, 418, 426, 434, 439, 445, 450, 459,
- 469, 482, 484, 486, 488, 490, 492, 494, 496, 498,
- 500, 502, 504, 506, 508, 510, 512, 514, 516, 518,
- 520, 522, 526, 528, 530, 532, 534, 536, 540, 540,
- 543, 544, 549, 550, 555, 593, 594, 600, 601
+ 0, 241, 241, 242, 246, 253, 255, 259, 261, 263,
+ 265, 267, 269, 271, 275, 283, 291, 301, 308, 320,
+ 325, 333, 335, 345, 347, 349, 354, 359, 364, 369,
+ 377, 382, 402, 409, 417, 425, 430, 436, 441, 450,
+ 460, 473, 475, 477, 479, 481, 483, 485, 487, 489,
+ 491, 493, 495, 497, 499, 501, 503, 505, 507, 509,
+ 511, 513, 517, 519, 521, 523, 525, 527, 531, 531,
+ 534, 535, 540, 541, 546, 584, 585, 591, 592
};
#endif
@@ -1431,7 +1422,7 @@
switch (yyn)
{
case 4:
-#line 256 "getdate.y"
+#line 247 "getdate.y"
{
pc->seconds = (yyvsp[0].timespec);
pc->timespec_seen = true;
@@ -1439,37 +1430,37 @@
break;
case 7:
-#line 269 "getdate.y"
+#line 260 "getdate.y"
{ pc->times_seen++; }
break;
case 8:
-#line 271 "getdate.y"
+#line 262 "getdate.y"
{ pc->local_zones_seen++; }
break;
case 9:
-#line 273 "getdate.y"
+#line 264 "getdate.y"
{ pc->zones_seen++; }
break;
case 10:
-#line 275 "getdate.y"
+#line 266 "getdate.y"
{ pc->dates_seen++; }
break;
case 11:
-#line 277 "getdate.y"
+#line 268 "getdate.y"
{ pc->days_seen++; }
break;
case 12:
-#line 279 "getdate.y"
+#line 270 "getdate.y"
{ pc->rels_seen = true; }
break;
case 14:
-#line 285 "getdate.y"
+#line 276 "getdate.y"
{
pc->hour = (yyvsp[-1].textintval).value;
pc->minutes = 0;
@@ -1480,7 +1471,7 @@
break;
case 15:
-#line 293 "getdate.y"
+#line 284 "getdate.y"
{
pc->hour = (yyvsp[-3].textintval).value;
pc->minutes = (yyvsp[-1].textintval).value;
@@ -1491,7 +1482,7 @@
break;
case 16:
-#line 301 "getdate.y"
+#line 292 "getdate.y"
{
pc->hour = (yyvsp[-4].textintval).value;
pc->minutes = (yyvsp[-2].textintval).value;
@@ -1504,7 +1495,7 @@
break;
case 17:
-#line 311 "getdate.y"
+#line 302 "getdate.y"
{
pc->hour = (yyvsp[-5].textintval).value;
pc->minutes = (yyvsp[-3].textintval).value;
@@ -1514,7 +1505,7 @@
break;
case 18:
-#line 318 "getdate.y"
+#line 309 "getdate.y"
{
pc->hour = (yyvsp[-6].textintval).value;
pc->minutes = (yyvsp[-4].textintval).value;
@@ -1526,7 +1517,7 @@
break;
case 19:
-#line 330 "getdate.y"
+#line 321 "getdate.y"
{
pc->local_isdst = (yyvsp[0].intval);
pc->dsts_seen += (0 < (yyvsp[0].intval));
@@ -1534,7 +1525,7 @@
break;
case 20:
-#line 335 "getdate.y"
+#line 326 "getdate.y"
{
pc->local_isdst = 1;
pc->dsts_seen += (0 < (yyvsp[-1].intval)) + 1;
@@ -1542,12 +1533,12 @@
break;
case 21:
-#line 343 "getdate.y"
+#line 334 "getdate.y"
{ pc->time_zone = (yyvsp[0].intval); }
break;
case 22:
-#line 345 "getdate.y"
+#line 336 "getdate.y"
{ pc->time_zone = (yyvsp[-1].intval);
pc->rel.ns += (yyvsp[0].rel).ns;
pc->rel.seconds += (yyvsp[0].rel).seconds;
@@ -1560,22 +1551,22 @@
break;
case 23:
-#line 355 "getdate.y"
+#line 346 "getdate.y"
{ pc->time_zone = (yyvsp[-2].intval) + time_zone_hhmm
((yyvsp[-1].textintval), (yyvsp[0].intval)); }
break;
case 24:
-#line 357 "getdate.y"
+#line 348 "getdate.y"
{ pc->time_zone = (yyvsp[0].intval) + 60; }
break;
case 25:
-#line 359 "getdate.y"
+#line 350 "getdate.y"
{ pc->time_zone = (yyvsp[-1].intval) + 60; }
break;
case 26:
-#line 364 "getdate.y"
+#line 355 "getdate.y"
{
pc->day_ordinal = 1;
pc->day_number = (yyvsp[0].intval);
@@ -1583,7 +1574,7 @@
break;
case 27:
-#line 369 "getdate.y"
+#line 360 "getdate.y"
{
pc->day_ordinal = 1;
pc->day_number = (yyvsp[-1].intval);
@@ -1591,7 +1582,7 @@
break;
case 28:
-#line 374 "getdate.y"
+#line 365 "getdate.y"
{
pc->day_ordinal = (yyvsp[-1].intval);
pc->day_number = (yyvsp[0].intval);
@@ -1599,7 +1590,7 @@
break;
case 29:
-#line 379 "getdate.y"
+#line 370 "getdate.y"
{
pc->day_ordinal = (yyvsp[-1].textintval).value;
pc->day_number = (yyvsp[0].intval);
@@ -1607,7 +1598,7 @@
break;
case 30:
-#line 387 "getdate.y"
+#line 378 "getdate.y"
{
pc->month = (yyvsp[-2].textintval).value;
pc->day = (yyvsp[0].textintval).value;
@@ -1615,7 +1606,7 @@
break;
case 31:
-#line 392 "getdate.y"
+#line 383 "getdate.y"
{
/* Interpret as YYYY/MM/DD if the first value has 4 or more digits,
otherwise as MM/DD/YY.
@@ -1638,7 +1629,7 @@
break;
case 32:
-#line 412 "getdate.y"
+#line 403 "getdate.y"
{
/* ISO 8601 format. YYYY-MM-DD. */
pc->year = (yyvsp[-2].textintval);
@@ -1648,7 +1639,7 @@
break;
case 33:
-#line 419 "getdate.y"
+#line 410 "getdate.y"
{
/* e.g. 17-JUN-1992. */
pc->day = (yyvsp[-2].textintval).value;
@@ -1659,7 +1650,7 @@
break;
case 34:
-#line 427 "getdate.y"
+#line 418 "getdate.y"
{
/* e.g. JUN-17-1992. */
pc->month = (yyvsp[-2].intval);
@@ -1670,7 +1661,7 @@
break;
case 35:
-#line 435 "getdate.y"
+#line 426 "getdate.y"
{
pc->month = (yyvsp[-1].intval);
pc->day = (yyvsp[0].textintval).value;
@@ -1678,7 +1669,7 @@
break;
case 36:
-#line 440 "getdate.y"
+#line 431 "getdate.y"
{
pc->month = (yyvsp[-3].intval);
pc->day = (yyvsp[-2].textintval).value;
@@ -1687,7 +1678,7 @@
break;
case 37:
-#line 446 "getdate.y"
+#line 437 "getdate.y"
{
pc->day = (yyvsp[-1].textintval).value;
pc->month = (yyvsp[0].intval);
@@ -1695,7 +1686,7 @@
break;
case 38:
-#line 451 "getdate.y"
+#line 442 "getdate.y"
{
pc->day = (yyvsp[-2].textintval).value;
pc->month = (yyvsp[-1].intval);
@@ -1704,7 +1695,7 @@
break;
case 39:
-#line 460 "getdate.y"
+#line 451 "getdate.y"
{
pc->rel.ns -= (yyvsp[-1].rel).ns;
pc->rel.seconds -= (yyvsp[-1].rel).seconds;
@@ -1717,7 +1708,7 @@
break;
case 40:
-#line 470 "getdate.y"
+#line 461 "getdate.y"
{
pc->rel.ns += (yyvsp[0].rel).ns;
pc->rel.seconds += (yyvsp[0].rel).seconds;
@@ -1730,147 +1721,147 @@
break;
case 41:
-#line 483 "getdate.y"
+#line 474 "getdate.y"
{ (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).year = (yyvsp[-1].intval); }
break;
case 42:
-#line 485 "getdate.y"
+#line 476 "getdate.y"
{ (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).year =
(yyvsp[-1].textintval).value; }
break;
case 43:
-#line 487 "getdate.y"
+#line 478 "getdate.y"
{ (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).year = 1; }
break;
case 44:
-#line 489 "getdate.y"
+#line 480 "getdate.y"
{ (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).month = (yyvsp[-1].intval); }
break;
case 45:
-#line 491 "getdate.y"
+#line 482 "getdate.y"
{ (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).month =
(yyvsp[-1].textintval).value; }
break;
case 46:
-#line 493 "getdate.y"
+#line 484 "getdate.y"
{ (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).month = 1; }
break;
case 47:
-#line 495 "getdate.y"
+#line 486 "getdate.y"
{ (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).day = (yyvsp[-1].intval) *
(yyvsp[0].intval); }
break;
case 48:
-#line 497 "getdate.y"
+#line 488 "getdate.y"
{ (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).day =
(yyvsp[-1].textintval).value * (yyvsp[0].intval); }
break;
case 49:
-#line 499 "getdate.y"
+#line 490 "getdate.y"
{ (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).day = (yyvsp[0].intval); }
break;
case 50:
-#line 501 "getdate.y"
+#line 492 "getdate.y"
{ (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).hour = (yyvsp[-1].intval); }
break;
case 51:
-#line 503 "getdate.y"
+#line 494 "getdate.y"
{ (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).hour =
(yyvsp[-1].textintval).value; }
break;
case 52:
-#line 505 "getdate.y"
+#line 496 "getdate.y"
{ (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).hour = 1; }
break;
case 53:
-#line 507 "getdate.y"
+#line 498 "getdate.y"
{ (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).minutes = (yyvsp[-1].intval);
}
break;
case 54:
-#line 509 "getdate.y"
+#line 500 "getdate.y"
{ (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).minutes =
(yyvsp[-1].textintval).value; }
break;
case 55:
-#line 511 "getdate.y"
+#line 502 "getdate.y"
{ (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).minutes = 1; }
break;
case 56:
-#line 513 "getdate.y"
+#line 504 "getdate.y"
{ (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = (yyvsp[-1].intval);
}
break;
case 57:
-#line 515 "getdate.y"
+#line 506 "getdate.y"
{ (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds =
(yyvsp[-1].textintval).value; }
break;
case 58:
-#line 517 "getdate.y"
+#line 508 "getdate.y"
{ (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds =
(yyvsp[-1].timespec).tv_sec; (yyval.rel).ns = (yyvsp[-1].timespec).tv_nsec; }
break;
case 59:
-#line 519 "getdate.y"
+#line 510 "getdate.y"
{ (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds =
(yyvsp[-1].timespec).tv_sec; (yyval.rel).ns = (yyvsp[-1].timespec).tv_nsec; }
break;
case 60:
-#line 521 "getdate.y"
+#line 512 "getdate.y"
{ (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = 1; }
break;
case 62:
-#line 527 "getdate.y"
+#line 518 "getdate.y"
{ (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).year =
(yyvsp[-1].textintval).value; }
break;
case 63:
-#line 529 "getdate.y"
+#line 520 "getdate.y"
{ (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).month =
(yyvsp[-1].textintval).value; }
break;
case 64:
-#line 531 "getdate.y"
+#line 522 "getdate.y"
{ (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).day =
(yyvsp[-1].textintval).value * (yyvsp[0].intval); }
break;
case 65:
-#line 533 "getdate.y"
+#line 524 "getdate.y"
{ (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).hour =
(yyvsp[-1].textintval).value; }
break;
case 66:
-#line 535 "getdate.y"
+#line 526 "getdate.y"
{ (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).minutes =
(yyvsp[-1].textintval).value; }
break;
case 67:
-#line 537 "getdate.y"
+#line 528 "getdate.y"
{ (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds =
(yyvsp[-1].textintval).value; }
break;
case 71:
-#line 545 "getdate.y"
+#line 536 "getdate.y"
{ (yyval.timespec).tv_sec = (yyvsp[0].textintval).value;
(yyval.timespec).tv_nsec = 0; }
break;
case 73:
-#line 551 "getdate.y"
+#line 542 "getdate.y"
{ (yyval.timespec).tv_sec = (yyvsp[0].textintval).value;
(yyval.timespec).tv_nsec = 0; }
break;
case 74:
-#line 556 "getdate.y"
+#line 547 "getdate.y"
{
if (pc->dates_seen && ! pc->year.digits
&& ! pc->rels_seen && (pc->times_seen || 2 <
(yyvsp[0].textintval).digits))
@@ -1907,22 +1898,22 @@
break;
case 75:
-#line 593 "getdate.y"
+#line 584 "getdate.y"
{ (yyval.intval) = -1; }
break;
case 76:
-#line 595 "getdate.y"
+#line 586 "getdate.y"
{ (yyval.intval) = (yyvsp[0].textintval).value; }
break;
case 77:
-#line 600 "getdate.y"
+#line 591 "getdate.y"
{ (yyval.intval) = MER24; }
break;
case 78:
-#line 602 "getdate.y"
+#line 593 "getdate.y"
{ (yyval.intval) = (yyvsp[0].intval); }
break;
@@ -1931,7 +1922,7 @@
}
/* Line 1126 of yacc.c. */
-#line 1935 "getdate.c"
+#line 1926 "getdate.c"
yyvsp -= yylen;
yyssp -= yylen;
@@ -2199,7 +2190,7 @@
}
-#line 605 "getdate.y"
+#line 596 "getdate.y"
static table const meridian_table[] =
@@ -2494,7 +2485,7 @@
for (p = word; *p; p++)
{
unsigned char ch = *p;
- if (ISLOWER (ch))
+ if (islower (ch))
*p = toupper (ch);
}
@@ -2560,7 +2551,7 @@
for (;;)
{
- while (c = *pc->input, ISSPACE (c))
+ while (c = *pc->input, isspace (c))
pc->input++;
if (ISDIGIT (c) || c == '-' || c == '+')
@@ -2571,7 +2562,7 @@
if (c == '-' || c == '+')
{
sign = c == '-' ? -1 : 1;
- while (c = *++pc->input, ISSPACE (c))
+ while (c = *++pc->input, isspace (c))
continue;
if (! ISDIGIT (c))
/* skip the '-' sign */
@@ -2675,7 +2666,7 @@
}
}
- if (ISALPHA (c))
+ if (isalpha (c))
{
char buff[20];
char *p = buff;
@@ -2687,7 +2678,7 @@
*p++ = c;
c = *++pc->input;
}
- while (ISALPHA (c) || c == '.');
+ while (isalpha (c) || c == '.');
*p = '\0';
tp = lookup_word (pc, buff);
@@ -2799,7 +2790,7 @@
if (! tmp)
return false;
- while (c = *p, ISSPACE (c))
+ while (c = *p, isspace (c))
p++;
if (strncmp (p, "TZ=\"", 4) == 0)
Index: getdate.y
===================================================================
RCS file: /cvsroot/cvs/ccvs/lib/getdate.y,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -b -r1.36 -r1.37
--- getdate.y 19 Jun 2006 17:45:58 -0000 1.36
+++ getdate.y 6 Jul 2006 13:47:56 -0000 1.37
@@ -68,15 +68,6 @@
#include "setenv.h"
#include "xalloc.h"
-#if STDC_HEADERS || (! defined isascii && ! HAVE_ISASCII)
-# define IN_CTYPE_DOMAIN(c) 1
-#else
-# define IN_CTYPE_DOMAIN(c) isascii (c)
-#endif
-
-#define ISSPACE(c) (IN_CTYPE_DOMAIN (c) && isspace (c))
-#define ISALPHA(c) (IN_CTYPE_DOMAIN (c) && isalpha (c))
-#define ISLOWER(c) (IN_CTYPE_DOMAIN (c) && islower (c))
/* ISDIGIT differs from isdigit, as follows:
- Its arg may be any int or unsigned int; it need not be an unsigned char.
@@ -896,7 +887,7 @@
for (p = word; *p; p++)
{
unsigned char ch = *p;
- if (ISLOWER (ch))
+ if (islower (ch))
*p = toupper (ch);
}
@@ -962,7 +953,7 @@
for (;;)
{
- while (c = *pc->input, ISSPACE (c))
+ while (c = *pc->input, isspace (c))
pc->input++;
if (ISDIGIT (c) || c == '-' || c == '+')
@@ -973,7 +964,7 @@
if (c == '-' || c == '+')
{
sign = c == '-' ? -1 : 1;
- while (c = *++pc->input, ISSPACE (c))
+ while (c = *++pc->input, isspace (c))
continue;
if (! ISDIGIT (c))
/* skip the '-' sign */
@@ -1077,7 +1068,7 @@
}
}
- if (ISALPHA (c))
+ if (isalpha (c))
{
char buff[20];
char *p = buff;
@@ -1089,7 +1080,7 @@
*p++ = c;
c = *++pc->input;
}
- while (ISALPHA (c) || c == '.');
+ while (isalpha (c) || c == '.');
*p = '\0';
tp = lookup_word (pc, buff);
@@ -1201,7 +1192,7 @@
if (! tmp)
return false;
- while (c = *p, ISSPACE (c))
+ while (c = *p, isspace (c))
p++;
if (strncmp (p, "TZ=\"", 4) == 0)
Index: strtol.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/lib/strtol.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- strtol.c 19 Jun 2006 17:45:58 -0000 1.7
+++ strtol.c 6 Jul 2006 13:47:56 -0000 1.8
@@ -208,11 +208,6 @@
# define TOUPPER(Ch) towupper (Ch)
# endif
#else
-# if defined STDC_HEADERS || (!defined isascii && !defined HAVE_ISASCII)
-# define IN_CTYPE_DOMAIN(c) 1
-# else
-# define IN_CTYPE_DOMAIN(c) isascii(c)
-# endif
# define L_(Ch) Ch
# define UCHAR_TYPE unsigned char
# define STRING_TYPE char
@@ -221,9 +216,9 @@
# define ISALPHA(Ch) __isalpha_l ((Ch), loc)
# define TOUPPER(Ch) __toupper_l ((Ch), loc)
# else
-# define ISSPACE(Ch) (IN_CTYPE_DOMAIN (Ch) && isspace (Ch))
-# define ISALPHA(Ch) (IN_CTYPE_DOMAIN (Ch) && isalpha (Ch))
-# define TOUPPER(Ch) (IN_CTYPE_DOMAIN (Ch) ? toupper (Ch) : (Ch))
+# define ISSPACE(Ch) isspace (Ch)
+# define ISALPHA(Ch) isalpha (Ch)
+# define TOUPPER(Ch) toupper (Ch)
# endif
#endif
Index: snprintf.c
===================================================================
RCS file: snprintf.c
diff -N snprintf.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ snprintf.c 6 Jul 2006 13:47:56 -0000 1.1
@@ -0,0 +1,60 @@
+/* Formatted output to strings.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ Written by Simon Josefsson.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "snprintf.h"
+
+#include <stdarg.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "minmax.h"
+#include "vasnprintf.h"
+
+/* Print formatted output to string STR. Similar to sprintf, but
+ additional length SIZE limit how much is written into STR. Returns
+ string length of formatted string (which may be larger than SIZE).
+ STR may be NULL, in which case nothing will be written. On error,
+ return a negative value. */
+int
+snprintf (char *str, size_t size, const char *format, ...)
+{
+ char *output;
+ size_t len;
+ va_list args;
+
+ va_start (args, format);
+ len = size;
+ output = vasnprintf (str, &len, format, args);
+ va_end (args);
+
+ if (!output)
+ return -1;
+
+ if (str != NULL)
+ if (len > size - 1) /* equivalent to: (size > 0 && len >= size) */
+ str[size - 1] = '\0';
+
+ if (output != str)
+ free (output);
+
+ return len;
+}
Index: snprintf.h
===================================================================
RCS file: snprintf.h
diff -N snprintf.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ snprintf.h 6 Jul 2006 13:47:56 -0000 1.1
@@ -0,0 +1,29 @@
+/* Formatted output to strings.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ Written by Simon Josefsson.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef SNPRINTF_H
+#define SNPRINTF_H
+
+/* Get snprintf declaration, if available. */
+#include <stdio.h>
+
+#if defined HAVE_DECL_SNPRINTF && !HAVE_DECL_SNPRINTF
+int snprintf (char *str, size_t size, const char *format, ...);
+#endif
+
+#endif /* SNPRINTF_H */