+/* dtimep.lex exceeds the default table capacities for some old versions
+ * of lex (and the minimum defaults as specified by POSIX). The following
+ * choices meet or exceed the lex defaults for older SunOS4.x, Solaris,
+ * HPUX, and AIX.
+ */
+%e4000
+%p7000
+%n2500
+%a5000
%{
#include <h/nmh.h>
#include <h/tws.h>
#define yywrap() 1
#define YY_SKIP_YYWRAP
-#define YY_NO_UNPUT
+#define YY_NO_INPUT
/* This is the tricky thing that makes this function cool. We
* replace the traditional int yylex(void) declaration with our
YY_BUFFER_STATE lexhandle;
- register char *cp;
+ register unsigned char *cp;
static struct tws tw;
memset(&tw,0,sizeof(struct tws));
{nl}("hdt"|"HDT") { INIT(); SETDST(); SETZONE(-1000);
yyterminate(); }
.|\n
+
+%%
+/* This is a portable way to squash a warning about the yyunput()
+ * function being static but never used. It costs us a tiny amount
+ * of extra code in the binary but the other options are:
+ * "%option nounput" which is flex-specific
+ * makefile hackery just to compile dtimep.c with different flags
+ */
+void dtimep_yyunput(int c)
+{
+ unput(c);
+}
+