%n2500
%a5000
%{
-#include <h/nmh.h>
-#include <h/tws.h>
+#include "h/nmh.h"
+#include "h/mh.h"
+#include "h/utils.h"
+#include "h/tws.h"
/* Since we're looking at a string at a time, don't worry about
* wrapping to the next buffer.
#define yyterminate() (void)yy_delete_buffer(lexhandle); \
if(!(tw.tw_flags & TW_SUCC)) { \
- return (struct tws *)NULL; \
+ return NULL; \
} \
if(tw.tw_year < 1970) \
tw.tw_year += 1900; \
if(tw.tw_year < 1970) \
tw.tw_year += 100; \
- return(&tw)
+ return &tw
/*
* Table to convert month names to numeric month. We use the
--cp; }
#define SKIPTOA() { while ( !isalpha((unsigned char) *cp++) ) ; \
--cp; }
-#define SKIPSP() { while ( isspace((unsigned char) *cp++) ) ; \
- --cp; }
-#define SKIPTOSP() { while ( !isspace((unsigned char) *cp++) ) ; \
- --cp; }
# ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
char *cp;
static struct tws tw;
- memset(&tw,0,sizeof(struct tws));
+ ZERO(&tw);
lexhandle = yy_scan_string(lexstr);
%}
* "%option nounput" which is flex-specific
* makefile hackery just to compile dtimep.c with different flags
*/
-void dtimep_yyunput(int c)
+void
+dtimep_yyunput(int c)
{
unput(c);
}