aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2006-07-14 17:59:36 +0000
committerRob Landley <rob@landley.net>2006-07-14 17:59:36 +0000
commit91ed1a4a412d316619ae3f3007ca6be782ce6c1c (patch)
treeba98eecc643e162db0ae842dd666fdec10237821
parenta4622324dd3adc666259a375bfdf0bd718daae3d (diff)
downloadbusybox-w32-91ed1a4a412d316619ae3f3007ca6be782ce6c1c.tar.gz
busybox-w32-91ed1a4a412d316619ae3f3007ca6be782ce6c1c.tar.bz2
busybox-w32-91ed1a4a412d316619ae3f3007ca6be782ce6c1c.zip
Patch from Suresh Rajashekara moving comments and #includes and such around.
-rw-r--r--coreutils/date.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/coreutils/date.c b/coreutils/date.c
index a922eb96c..f08392ec2 100644
--- a/coreutils/date.c
+++ b/coreutils/date.c
@@ -9,14 +9,6 @@
9 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. 9 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
10*/ 10*/
11 11
12#include <stdlib.h>
13#include <errno.h>
14#include <unistd.h>
15#include <time.h>
16#include <stdio.h>
17#include <string.h>
18#include "busybox.h"
19
20/* This 'date' command supports only 2 time setting formats, 12/* This 'date' command supports only 2 time setting formats,
21 all the GNU strftime stuff (its in libc, lets use it), 13 all the GNU strftime stuff (its in libc, lets use it),
22 setting time using UTC and displaying int, as well as 14 setting time using UTC and displaying int, as well as
@@ -28,6 +20,23 @@
28 20
29/* Default input handling to save surprising some people */ 21/* Default input handling to save surprising some people */
30 22
23#include <stdlib.h>
24#include <errno.h>
25#include <unistd.h>
26#include <time.h>
27#include <stdio.h>
28#include <string.h>
29#include "busybox.h"
30
31#define DATE_OPT_RFC2822 0x01
32#define DATE_OPT_SET 0x02
33#define DATE_OPT_UTC 0x04
34#define DATE_OPT_DATE 0x08
35#define DATE_OPT_REFERENCE 0x10
36#define DATE_OPT_TIMESPEC 0x20
37#define DATE_OPT_HINT 0x40
38
39
31static struct tm *date_conv_time(struct tm *tm_time, const char *t_string) 40static struct tm *date_conv_time(struct tm *tm_time, const char *t_string)
32{ 41{
33 int nr; 42 int nr;
@@ -103,14 +112,6 @@ static struct tm *date_conv_ftime(struct tm *tm_time, const char *t_string)
103 return (tm_time); 112 return (tm_time);
104} 113}
105 114
106#define DATE_OPT_RFC2822 0x01
107#define DATE_OPT_SET 0x02
108#define DATE_OPT_UTC 0x04
109#define DATE_OPT_DATE 0x08
110#define DATE_OPT_REFERENCE 0x10
111#define DATE_OPT_TIMESPEC 0x20
112#define DATE_OPT_HINT 0x40
113
114int date_main(int argc, char **argv) 115int date_main(int argc, char **argv)
115{ 116{
116 char *date_str = NULL; 117 char *date_str = NULL;