chiark / gitweb /
Kill non-re-entrant xgetdate(). We don't use it so we might as well
[disorder] / lib / t-dateparse.c
index cd599e8dfecc9c9ca465e3cdd315548baa1f1048..1e07c742f2cccc2e0d20db7ce200149d12306cad 100644 (file)
 #include "dateparse.h"
 
 static void check_date(time_t when,
-                      const char *format,
+                      const char *fmt,
                       struct tm *(*convert)(const time_t *)) {
   char buffer[128];
   time_t parsed;
 
-  strftime(buffer, sizeof buffer, format, convert(&when));
+  strftime(buffer, sizeof buffer, fmt, convert(&when));
   parsed = dateparse(buffer);
   check_integer(parsed, when);
   if(parsed != when)
-    fprintf(stderr, "format=%s formatted=%s\n", format, buffer);
+    fprintf(stderr, "format=%s formatted=%s\n", fmt, buffer);
 }
 
 static void test_dateparse(void) {