#include <string.h>
#include <getopt.h>
#include "busybox.h"
-#define BB_DECLARE_EXTERN
-#define bb_need_invalid_date
-#define bb_need_memory_exhausted
-#include "messages.c"
/* This 'date' command supports only 2 time setting formats,
/* Default input handling to save suprising some people */
-struct tm *date_conv_time(struct tm *tm_time, const char *t_string)
+static struct tm *date_conv_time(struct tm *tm_time, const char *t_string)
{
int nr;
/* The new stuff for LRP */
-struct tm *date_conv_ftime(struct tm *tm_time, const char *t_string)
+static struct tm *date_conv_ftime(struct tm *tm_time, const char *t_string)
{
struct tm t;
date_conv_time(&tm_time, date_str);
}
- /* Correct any day of week and day of year etc fields */
+ /* Correct any day of week and day of year etc. fields */
tm = mktime(&tm_time);
if (tm < 0)
error_msg_and_die(invalid_date, date_str);
/* Print OUTPUT (after ALL that!) */
t_buff = xmalloc(201);
strftime(t_buff, 200, date_fmt, &tm_time);
- printf("%s\n", t_buff);
+ puts(t_buff);
return EXIT_SUCCESS;
}