]> code.citadel.org Git - citadel.git/blobdiff - citadel/parsedate.y
replace calls to gets with fgets
[citadel.git] / citadel / parsedate.y
index b710129c04f9434a3fc909924458502358e8ad6f..bf69da311a2a1524dd1d27d7e30fe0d34fbddb22 100644 (file)
 /* SUPPRESS 593 on yyerrlab *//* Label was not used */
 /* SUPPRESS 593 on yynewstate *//* Label was not used */
 /* SUPPRESS 595 on yypvt *//* Automatic variable may be used before set */
+
+#ifdef DLL_EXPORT
+#define IN_LIBCIT
+#endif
+
+#include "sysdep.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/types.h>
 # endif
 #endif
 
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+
 #include "parsedate.h"
 
 int date_lex(void);
@@ -782,7 +799,7 @@ main(int ac, char *av[])
     for ( ; ; ) {
        (void)printf("\t> ");
        (void)fflush(stdout);
-       if (gets(buff) == NULL || buff[0] == '\n')
+       if (fgets(buff, sizeof buff, stdin) == NULL || buff[0] == '\n')
            break;
 #if YYDEBUG
        if (strcmp(buff, "yydebug") == 0) {