/*$Log: datelex.c,v $
-/*Revision 1.1 2002-07-25 08:01:26 arjen
-/*First checkin, AXE release 0.2
+/*Revision 1.2 2002-09-28 06:58:45 arjen
+/*Bugfix: conversion of an empty string to a date or hour object
+/*now makes the values of such an object 0 (null) instead of giving
+/*a segmentation fault.
+/*The class UTC combines the date and hour classes. The most basic
+/*functions of the UTC class are now implemented.
+/*These include constructors and conversion to and from String objects.
+/*New functions: date::proper(), hour::proper() and UTC::proper().
+/*Return true if the object holds a proper clock time and/or calendar
+/*date; false if at least one value is out of range.
/*
+ *Revision 1.1 2002/07/25 08:01:26 arjen
+ *First checkin, AXE release 0.2
+ *
* Revision 1.1 84/09/01 15:01:14 wales
* Initial revision
*
/* AJB, Aug 28 1999: Added month names in Dutch */
#ifdef RCSIDENT
-static char rcsident[] = "$Header: /cvsroot/lib/AXE/src/datelex.c,v 1.1 2002-07-25 08:01:26 arjen Exp $";
+static char rcsident[] = "$Header: /cvsroot/lib/AXE/src/datelex.c,v 1.2 2002-09-28 06:58:45 arjen Exp $";
#endif /* RCSIDENT */
#include <stdio.h>
c = buffer; d = yyinbuf;
/* Skip over blanks, tabs, commas, and parentheses. */
- do { *c = *d++; }
- while (*c == ' ' || *c == '\t' || *c == ','
- || *c == '(' || *c == ')');
+ do
+ {
+ *c = *d++;
+ }
+ while (*c != '\0' && (*c == ' ' || *c == '\t' || *c == ','
+ || *c == '(' || *c == ')'));
/* A zero (null) byte signals the end of the input. */
if (*c == 0)