aboutsummaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorGravatar Rob Landley <rob@landley.net>2006-07-14 17:59:36 +0000
committerGravatar Rob Landley <rob@landley.net>2006-07-14 17:59:36 +0000
commit91ed1a4a412d316619ae3f3007ca6be782ce6c1c (patch)
treeba98eecc643e162db0ae842dd666fdec10237821 /coreutils
parenta4622324dd3adc666259a375bfdf0bd718daae3d (diff)
downloadbusybox-91ed1a4a412d316619ae3f3007ca6be782ce6c1c.tar.gz
busybox-91ed1a4a412d316619ae3f3007ca6be782ce6c1c.tar.bz2
Patch from Suresh Rajashekara moving comments and #includes and such around.
Diffstat (limited to 'coreutils')
-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 @@
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/
-#include <stdlib.h>
-#include <errno.h>
-#include <unistd.h>
-#include <time.h>
-#include <stdio.h>
-#include <string.h>
-#include "busybox.h"
-
/* This 'date' command supports only 2 time setting formats,
all the GNU strftime stuff (its in libc, lets use it),
setting time using UTC and displaying int, as well as
@@ -28,6 +20,23 @@
/* Default input handling to save surprising some people */
+#include <stdlib.h>
+#include <errno.h>
+#include <unistd.h>
+#include <time.h>
+#include <stdio.h>
+#include <string.h>
+#include "busybox.h"
+
+#define DATE_OPT_RFC2822 0x01
+#define DATE_OPT_SET 0x02
+#define DATE_OPT_UTC 0x04
+#define DATE_OPT_DATE 0x08
+#define DATE_OPT_REFERENCE 0x10
+#define DATE_OPT_TIMESPEC 0x20
+#define DATE_OPT_HINT 0x40
+
+
static struct tm *date_conv_time(struct tm *tm_time, const char *t_string)
{
int nr;
@@ -103,14 +112,6 @@ static struct tm *date_conv_ftime(struct tm *tm_time, const char *t_string)
return (tm_time);
}
-#define DATE_OPT_RFC2822 0x01
-#define DATE_OPT_SET 0x02
-#define DATE_OPT_UTC 0x04
-#define DATE_OPT_DATE 0x08
-#define DATE_OPT_REFERENCE 0x10
-#define DATE_OPT_TIMESPEC 0x20
-#define DATE_OPT_HINT 0x40
-
int date_main(int argc, char **argv)
{
char *date_str = NULL;