summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
877d0da)
ambiguous comments preceding day_map[] array (from old dtimep.lex) that probably
led to the erroneous cp++ being added.
+Thu Jun 08 19:36:57 2000 Dan Harkless <dan-nmh@dilvish.speed.net>
+
+ * New dtimep.lex didn't parse day names properly. Fixed. Also
+ clarified ambiguous comments preceding day_map[] array (from old
+ dtimep.lex) that probably led to the erroneous cp++ being added.
+
Wed Jun 7 20:52:33 CEST 2000 Ruud de Rooij <ruud@ruud.org>
* Added one more mkstemp invocation to uip/spost.c (which was in a
Wed Jun 7 20:52:33 CEST 2000 Ruud de Rooij <ruud@ruud.org>
* Added one more mkstemp invocation to uip/spost.c (which was in a
Wed May 31 07:40:45 2000 Doug Morris <doug@mhost.com>
Wed May 31 07:40:45 2000 Doug Morris <doug@mhost.com>
- * added a lint target to the Makefiles and a check in autoconf
+ * Added a lint target to the Makefiles and a check in autoconf
to determine whether lint or lclint exists on the system.
Fri May 30 19:21:48 2000 Dan Harkless <dan-nmh@dilvish.speed.net>
to determine whether lint or lclint exists on the system.
Fri May 30 19:21:48 2000 Dan Harkless <dan-nmh@dilvish.speed.net>
tws.h to h/). Updated all source files to reflect to new location
of tws.h.
tws.h to h/). Updated all source files to reflect to new location
of tws.h.
- * Rewrote dparsetime (dtimep.c) to replace the old
- zotnet/tws/dtimep.c, lexstring.c, lexedit.c, and
- dtimep.c-lexed. It should now work with flex (although untested
- with lex), and requires no sed-ing. For now, I have the lexed
- version in the distribution, so that end-users don't need to worry
- about running it through flex/lex. I have not added back support
- for guessing the time zone when it's not specified.
+ * Rewrote dparsetime (in dtimep.lex -> dtimep.c) to replace the
+ old zotnet/tws/dtimep.c, dtimep.lex, lexstring.c, lexedit.c, and
+ dtimep.c-lexed. It should now work with flex (although untested
+ with lex), and requires no sed-ing. For now, I have the lexed
+ version in the distribution, so that end-users don't need to worry
+ about running it through flex/lex. I have not added back support
+ for guessing the time zone when it's not specified.
Sun May 28 17:44:15 CEST 2000 Ruud de Rooij <ruud@ruud.org>
Sun May 28 17:44:15 CEST 2000 Ruud de Rooij <ruud@ruud.org>
- * Same trick for day-of-week using the hash function
- * (c1 & 7) + (c2 & 4)
+ * Lookup table for day-of-week using the same hash trick as for above name-of-
+ * month table, but using the first and second character, not second and third.
+ *
+ * Compute index into table using: (day_name[0] & 7) + (day_name[1] & 4)
*/
static int day_map[] = {
0,
*/
static int day_map[] = {
0,
*/
#define INIT() { cp = yytext;}
*/
#define INIT() { cp = yytext;}
-#define SETWDAY() { cp++; \
- tw.tw_wday= day_map[(cp[0] & 7) + (cp[1] & 4)]; \
+#define SETWDAY() { tw.tw_wday= day_map[(cp[0] & 7) + (cp[1] & 4)]; \
tw.tw_flags &= ~TW_SDAY; tw.tw_flags |= TW_SEXP; \
SKIPA(); }
#define SETMON() { cp++; \
tw.tw_flags &= ~TW_SDAY; tw.tw_flags |= TW_SEXP; \
SKIPA(); }
#define SETMON() { cp++; \
register char *yy_cp, *yy_bp;
register int yy_act;
register char *yy_cp, *yy_bp;
register int yy_act;
/* This section begins the definition of dparsetime().
/* This section begins the definition of dparsetime().
YY_BREAK
case 2:
YY_RULE_SETUP
YY_BREAK
case 2:
YY_RULE_SETUP
YY_BREAK
case 3:
YY_RULE_SETUP
YY_BREAK
case 3:
YY_RULE_SETUP
YY_BREAK
case 4:
YY_RULE_SETUP
YY_BREAK
case 4:
YY_RULE_SETUP
YY_BREAK
case 5:
YY_RULE_SETUP
YY_BREAK
case 5:
YY_RULE_SETUP
YY_BREAK
case 6:
YY_RULE_SETUP
YY_BREAK
case 6:
YY_RULE_SETUP
YY_BREAK
case 7:
YY_RULE_SETUP
YY_BREAK
case 7:
YY_RULE_SETUP
YY_BREAK
case 8:
YY_RULE_SETUP
YY_BREAK
case 8:
YY_RULE_SETUP
{
INIT();
if(europeandate) {
{
INIT();
if(europeandate) {
YY_BREAK
case 9:
YY_RULE_SETUP
YY_BREAK
case 9:
YY_RULE_SETUP
{
INIT();
if(europeandate) {
{
INIT();
if(europeandate) {
YY_BREAK
case 10:
YY_RULE_SETUP
YY_BREAK
case 10:
YY_RULE_SETUP
YY_BREAK
case 11:
YY_RULE_SETUP
YY_BREAK
case 11:
YY_RULE_SETUP
tw.tw_hour += 12;
YY_BREAK
case 12:
YY_RULE_SETUP
tw.tw_hour += 12;
YY_BREAK
case 12:
YY_RULE_SETUP
YY_BREAK
case 13:
YY_RULE_SETUP
YY_BREAK
case 13:
YY_RULE_SETUP
YY_BREAK
case 14:
YY_RULE_SETUP
YY_BREAK
case 14:
YY_RULE_SETUP
INIT(); SETZONE(0);
YY_BREAK
case 15:
YY_RULE_SETUP
INIT(); SETZONE(0);
YY_BREAK
case 15:
YY_RULE_SETUP
INIT(); SETZONE(0);
YY_BREAK
case 16:
YY_RULE_SETUP
INIT(); SETZONE(0);
YY_BREAK
case 16:
YY_RULE_SETUP
INIT(); SETZONE(200);
YY_BREAK
case 17:
YY_RULE_SETUP
INIT(); SETZONE(200);
YY_BREAK
case 17:
YY_RULE_SETUP
INIT(); SETDST(); SETZONE(2);
YY_BREAK
case 18:
YY_RULE_SETUP
INIT(); SETDST(); SETZONE(2);
YY_BREAK
case 18:
YY_RULE_SETUP
INIT(); SETZONE(-500);
YY_BREAK
case 19:
YY_RULE_SETUP
INIT(); SETZONE(-500);
YY_BREAK
case 19:
YY_RULE_SETUP
INIT(); SETDST(); SETZONE(-500);
YY_BREAK
case 20:
YY_RULE_SETUP
INIT(); SETDST(); SETZONE(-500);
YY_BREAK
case 20:
YY_RULE_SETUP
INIT(); SETZONE(-600);
YY_BREAK
case 21:
YY_RULE_SETUP
INIT(); SETZONE(-600);
YY_BREAK
case 21:
YY_RULE_SETUP
INIT(); SETDST(); SETZONE(-600);
YY_BREAK
case 22:
YY_RULE_SETUP
INIT(); SETDST(); SETZONE(-600);
YY_BREAK
case 22:
YY_RULE_SETUP
INIT(); SETZONE(-700);
YY_BREAK
case 23:
YY_RULE_SETUP
INIT(); SETZONE(-700);
YY_BREAK
case 23:
YY_RULE_SETUP
INIT(); SETDST(); SETZONE(-700);
YY_BREAK
case 24:
YY_RULE_SETUP
INIT(); SETDST(); SETZONE(-700);
YY_BREAK
case 24:
YY_RULE_SETUP
INIT(); SETZONE(-800);
YY_BREAK
case 25:
YY_RULE_SETUP
INIT(); SETZONE(-800);
YY_BREAK
case 25:
YY_RULE_SETUP
INIT(); SETDST(); SETZONE(-800);
YY_BREAK
case 26:
YY_RULE_SETUP
INIT(); SETDST(); SETZONE(-800);
YY_BREAK
case 26:
YY_RULE_SETUP
INIT(); SETZONE(-330);
YY_BREAK
case 27:
YY_RULE_SETUP
INIT(); SETZONE(-330);
YY_BREAK
case 27:
YY_RULE_SETUP
INIT(); SETZONE(-400);
YY_BREAK
case 28:
YY_RULE_SETUP
INIT(); SETZONE(-400);
YY_BREAK
case 28:
YY_RULE_SETUP
INIT(); SETDST(); SETZONE(-400);
YY_BREAK
case 29:
YY_RULE_SETUP
INIT(); SETDST(); SETZONE(-400);
YY_BREAK
case 29:
YY_RULE_SETUP
INIT(); SETZONE(-900);
YY_BREAK
case 30:
YY_RULE_SETUP
INIT(); SETZONE(-900);
YY_BREAK
case 30:
YY_RULE_SETUP
INIT(); SETDST(); SETZONE(-900);
YY_BREAK
case 31:
YY_RULE_SETUP
INIT(); SETDST(); SETZONE(-900);
YY_BREAK
case 31:
YY_RULE_SETUP
INIT(); SETZONE(-1000);
YY_BREAK
case 32:
YY_RULE_SETUP
INIT(); SETZONE(-1000);
YY_BREAK
case 32:
YY_RULE_SETUP
INIT(); SETDST(); SETZONE(-1000);
YY_BREAK
case 33:
YY_RULE_SETUP
INIT(); SETDST(); SETZONE(-1000);
YY_BREAK
case 33:
YY_RULE_SETUP
INIT(); SETDST(); SETZONE(-100);
YY_BREAK
case 34:
YY_RULE_SETUP
INIT(); SETDST(); SETZONE(-100);
YY_BREAK
case 34:
YY_RULE_SETUP
{
INIT();
SETZONE(100*(('a'-1) - tolower(*cp)));
{
INIT();
SETZONE(100*(('a'-1) - tolower(*cp)));
YY_BREAK
case 35:
YY_RULE_SETUP
YY_BREAK
case 35:
YY_RULE_SETUP
{
INIT();
SETZONE(100*('a' - tolower(*cp)));
{
INIT();
SETZONE(100*('a' - tolower(*cp)));
YY_BREAK
case 36:
YY_RULE_SETUP
YY_BREAK
case 36:
YY_RULE_SETUP
{
INIT();
SETZONE(100*(tolower(*cp) - 'm'));
{
INIT();
SETZONE(100*(tolower(*cp) - 'm'));
YY_BREAK
case 37:
YY_RULE_SETUP
YY_BREAK
case 37:
YY_RULE_SETUP
YY_BREAK
case 38:
YY_RULE_SETUP
YY_BREAK
case 38:
YY_RULE_SETUP
ECHO;
YY_BREAK
case YY_STATE_EOF(INITIAL):
ECHO;
YY_BREAK
case YY_STATE_EOF(INITIAL):
- * Same trick for day-of-week using the hash function
- * (c1 & 7) + (c2 & 4)
+ * Lookup table for day-of-week using the same hash trick as for above name-of-
+ * month table, but using the first and second character, not second and third.
+ *
+ * Compute index into table using: (day_name[0] & 7) + (day_name[1] & 4)
*/
static int day_map[] = {
0,
*/
static int day_map[] = {
0,
*/
#define INIT() { cp = yytext;}
*/
#define INIT() { cp = yytext;}
-#define SETWDAY() { cp++; \
- tw.tw_wday= day_map[(cp[0] & 7) + (cp[1] & 4)]; \
+#define SETWDAY() { tw.tw_wday= day_map[(cp[0] & 7) + (cp[1] & 4)]; \
tw.tw_flags &= ~TW_SDAY; tw.tw_flags |= TW_SEXP; \
SKIPA(); }
#define SETMON() { cp++; \
tw.tw_flags &= ~TW_SDAY; tw.tw_flags |= TW_SEXP; \
SKIPA(); }
#define SETMON() { cp++; \