diff options
author | Eric Andersen <andersen@codepoet.org> | 1999-10-19 20:03:34 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 1999-10-19 20:03:34 +0000 |
commit | e77ae3a2c0328590b43447550bdb1284650b8236 (patch) | |
tree | 1e46d5cf36870771a4f3cedfe84f6161c3871131 /coreutils | |
parent | a3f09076ef5e9a2c26b4d0728cd066bba6c474e4 (diff) | |
download | busybox-w32-e77ae3a2c0328590b43447550bdb1284650b8236.tar.gz busybox-w32-e77ae3a2c0328590b43447550bdb1284650b8236.tar.bz2 busybox-w32-e77ae3a2c0328590b43447550bdb1284650b8236.zip |
Added sfdisk. Ststic-ified a bunch of stuff.
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/cat.c | 2 | ||||
-rw-r--r-- | coreutils/cp.c | 2 | ||||
-rw-r--r-- | coreutils/date.c | 2 | ||||
-rw-r--r-- | coreutils/dd.c | 2 | ||||
-rw-r--r-- | coreutils/df.c | 2 | ||||
-rw-r--r-- | coreutils/ls.c | 19 | ||||
-rw-r--r-- | coreutils/mkdir.c | 2 | ||||
-rw-r--r-- | coreutils/mknod.c | 2 | ||||
-rw-r--r-- | coreutils/printf.c | 2 | ||||
-rw-r--r-- | coreutils/touch.c | 2 |
10 files changed, 18 insertions, 19 deletions
diff --git a/coreutils/cat.c b/coreutils/cat.c index 38078d505..3aae6d78e 100644 --- a/coreutils/cat.c +++ b/coreutils/cat.c | |||
@@ -32,7 +32,7 @@ static void print_file( FILE *file) | |||
32 | fflush(stdout); | 32 | fflush(stdout); |
33 | } | 33 | } |
34 | 34 | ||
35 | extern int cat_more_main(int argc, char **argv) | 35 | extern int cat_main(int argc, char **argv) |
36 | { | 36 | { |
37 | FILE *file; | 37 | FILE *file; |
38 | 38 | ||
diff --git a/coreutils/cp.c b/coreutils/cp.c index 11c76825c..34c12922d 100644 --- a/coreutils/cp.c +++ b/coreutils/cp.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <utime.h> | 25 | #include <utime.h> |
26 | #include <dirent.h> | 26 | #include <dirent.h> |
27 | 27 | ||
28 | const char cp_usage[] = "cp [OPTION]... SOURCE DEST\n" | 28 | static const char cp_usage[] = "cp [OPTION]... SOURCE DEST\n" |
29 | " or: cp [OPTION]... SOURCE... DIRECTORY\n" | 29 | " or: cp [OPTION]... SOURCE... DIRECTORY\n" |
30 | "Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.\n" | 30 | "Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.\n" |
31 | "\n" | 31 | "\n" |
diff --git a/coreutils/date.c b/coreutils/date.c index 70d5dd5c6..51194848b 100644 --- a/coreutils/date.c +++ b/coreutils/date.c | |||
@@ -34,7 +34,7 @@ | |||
34 | an RFC 822 complient date output for shell scripting | 34 | an RFC 822 complient date output for shell scripting |
35 | mail commands */ | 35 | mail commands */ |
36 | 36 | ||
37 | const char date_usage[] = "date [OPTION]... [+FORMAT]\n" | 37 | static const char date_usage[] = "date [OPTION]... [+FORMAT]\n" |
38 | " or: date [OPTION] [MMDDhhmm[[CC]YY][.ss]]\n" | 38 | " or: date [OPTION] [MMDDhhmm[[CC]YY][.ss]]\n" |
39 | "Display the current time in the given FORMAT, or set the system date.\n" | 39 | "Display the current time in the given FORMAT, or set the system date.\n" |
40 | "\nOptions:\n\t-R\t\toutput RFC-822 compliant date string\n" | 40 | "\nOptions:\n\t-R\t\toutput RFC-822 compliant date string\n" |
diff --git a/coreutils/dd.c b/coreutils/dd.c index ecf7e3a3d..1cf731664 100644 --- a/coreutils/dd.c +++ b/coreutils/dd.c | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <fcntl.h> | 14 | #include <fcntl.h> |
15 | #include <errno.h> | 15 | #include <errno.h> |
16 | 16 | ||
17 | const char dd_usage[] = | 17 | static const char dd_usage[] = |
18 | "Copy a file, converting and formatting according to options\n\ | 18 | "Copy a file, converting and formatting according to options\n\ |
19 | \n\ | 19 | \n\ |
20 | usage: [if=name] [of=name] [bs=n] [count=n]\n\ | 20 | usage: [if=name] [of=name] [bs=n] [count=n]\n\ |
diff --git a/coreutils/df.c b/coreutils/df.c index a777d70f4..7a72bf8fd 100644 --- a/coreutils/df.c +++ b/coreutils/df.c | |||
@@ -5,7 +5,7 @@ | |||
5 | #include <sys/vfs.h> | 5 | #include <sys/vfs.h> |
6 | #include <fstab.h> | 6 | #include <fstab.h> |
7 | 7 | ||
8 | const char df_usage[] = "df [filesystem ...]\n" | 8 | static const char df_usage[] = "df [filesystem ...]\n" |
9 | "\n" | 9 | "\n" |
10 | "\tPrint the filesystem space used and space available.\n"; | 10 | "\tPrint the filesystem space used and space available.\n"; |
11 | 11 | ||
diff --git a/coreutils/ls.c b/coreutils/ls.c index 0adc35de1..a8e7e048a 100644 --- a/coreutils/ls.c +++ b/coreutils/ls.c | |||
@@ -132,7 +132,6 @@ int ls_main(int argc, char **argv) | |||
132 | #else | 132 | #else |
133 | 133 | ||
134 | 134 | ||
135 | #include "internal.h" | ||
136 | /* | 135 | /* |
137 | * tiny-ls.c version 0.1.0: A minimalist 'ls' | 136 | * tiny-ls.c version 0.1.0: A minimalist 'ls' |
138 | * Copyright (C) 1996 Brian Candler <B.Candler@pobox.com> | 137 | * Copyright (C) 1996 Brian Candler <B.Candler@pobox.com> |
@@ -175,7 +174,7 @@ int ls_main(int argc, char **argv) | |||
175 | * 1. requires lstat (BSD) - how do you do it without? | 174 | * 1. requires lstat (BSD) - how do you do it without? |
176 | */ | 175 | */ |
177 | 176 | ||
178 | #define FEATURE_USERNAME /* show username/groupnames (libc6 uses NSS) */ | 177 | //#define FEATURE_USERNAME /* show username/groupnames (libc6 uses NSS) */ |
179 | #define FEATURE_TIMESTAMPS /* show file timestamps */ | 178 | #define FEATURE_TIMESTAMPS /* show file timestamps */ |
180 | #define FEATURE_AUTOWIDTH /* calculate terminal & column widths */ | 179 | #define FEATURE_AUTOWIDTH /* calculate terminal & column widths */ |
181 | #define FEATURE_FILETYPECHAR /* enable -p and -F */ | 180 | #define FEATURE_FILETYPECHAR /* enable -p and -F */ |
@@ -187,8 +186,8 @@ int ls_main(int argc, char **argv) | |||
187 | 186 | ||
188 | /************************************************************************/ | 187 | /************************************************************************/ |
189 | 188 | ||
190 | 189 | #include "internal.h" | |
191 | #if 1 /* FIXME libc 6 */ | 190 | #if !defined(__GLIBC__) && (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 1) |
192 | # include <linux/types.h> | 191 | # include <linux/types.h> |
193 | #else | 192 | #else |
194 | # include <sys/types.h> | 193 | # include <sys/types.h> |
@@ -225,7 +224,7 @@ int ls_main(int argc, char **argv) | |||
225 | 224 | ||
226 | /* The 9 mode bits to test */ | 225 | /* The 9 mode bits to test */ |
227 | 226 | ||
228 | static const umode_t MBIT[] = { | 227 | static const mode_t MBIT[] = { |
229 | S_IRUSR, S_IWUSR, S_IXUSR, | 228 | S_IRUSR, S_IWUSR, S_IXUSR, |
230 | S_IRGRP, S_IWGRP, S_IXGRP, | 229 | S_IRGRP, S_IWGRP, S_IXGRP, |
231 | S_IROTH, S_IWOTH, S_IXOTH | 230 | S_IROTH, S_IWOTH, S_IXOTH |
@@ -233,7 +232,7 @@ static const umode_t MBIT[] = { | |||
233 | 232 | ||
234 | /* The special bits. If set, display SMODE0/1 instead of MODE0/1 */ | 233 | /* The special bits. If set, display SMODE0/1 instead of MODE0/1 */ |
235 | 234 | ||
236 | static const umode_t SBIT[] = { | 235 | static const mode_t SBIT[] = { |
237 | 0, 0, S_ISUID, | 236 | 0, 0, S_ISUID, |
238 | 0, 0, S_ISGID, | 237 | 0, 0, S_ISGID, |
239 | 0, 0, S_ISVTX | 238 | 0, 0, S_ISVTX |
@@ -278,7 +277,7 @@ static unsigned char time_fmt = TIME_MOD; | |||
278 | 277 | ||
279 | static void writenum(long val, short minwidth) | 278 | static void writenum(long val, short minwidth) |
280 | { | 279 | { |
281 | char scratch[20]; | 280 | char scratch[128]; |
282 | 281 | ||
283 | char *p = scratch + sizeof(scratch); | 282 | char *p = scratch + sizeof(scratch); |
284 | short len = 0; | 283 | short len = 0; |
@@ -324,7 +323,7 @@ static void tab(short col) | |||
324 | } | 323 | } |
325 | 324 | ||
326 | #ifdef FEATURE_FILETYPECHAR | 325 | #ifdef FEATURE_FILETYPECHAR |
327 | static char append_char(umode_t mode) | 326 | static char append_char(mode_t mode) |
328 | { | 327 | { |
329 | if (!(opts & DISP_FTYPE)) | 328 | if (!(opts & DISP_FTYPE)) |
330 | return '\0'; | 329 | return '\0'; |
@@ -343,14 +342,14 @@ static char append_char(umode_t mode) | |||
343 | 342 | ||
344 | static void list_single(const char *name, struct stat *info) | 343 | static void list_single(const char *name, struct stat *info) |
345 | { | 344 | { |
346 | char scratch[20]; | 345 | char scratch[PATH_MAX]; |
347 | short len = strlen(name); | 346 | short len = strlen(name); |
348 | #ifdef FEATURE_FILETYPECHAR | 347 | #ifdef FEATURE_FILETYPECHAR |
349 | char append = append_char(info->st_mode); | 348 | char append = append_char(info->st_mode); |
350 | #endif | 349 | #endif |
351 | 350 | ||
352 | if (display_fmt == FMT_LONG) { | 351 | if (display_fmt == FMT_LONG) { |
353 | umode_t mode = info->st_mode; | 352 | mode_t mode = info->st_mode; |
354 | int i; | 353 | int i; |
355 | 354 | ||
356 | scratch[0] = TYPECHAR(mode); | 355 | scratch[0] = TYPECHAR(mode); |
diff --git a/coreutils/mkdir.c b/coreutils/mkdir.c index b42899a4a..cf65f272f 100644 --- a/coreutils/mkdir.c +++ b/coreutils/mkdir.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include <errno.h> | 24 | #include <errno.h> |
25 | #include <sys/param.h> | 25 | #include <sys/param.h> |
26 | 26 | ||
27 | const char mkdir_usage[] = "Usage: mkdir [OPTION] DIRECTORY...\n" | 27 | static const char mkdir_usage[] = "Usage: mkdir [OPTION] DIRECTORY...\n" |
28 | "Create the DIRECTORY(ies), if they do not already exist\n\n" | 28 | "Create the DIRECTORY(ies), if they do not already exist\n\n" |
29 | "-m\tset permission mode (as in chmod), not rwxrwxrwx - umask\n" | 29 | "-m\tset permission mode (as in chmod), not rwxrwxrwx - umask\n" |
30 | "-p\tno error if existing, make parent directories as needed\n"; | 30 | "-p\tno error if existing, make parent directories as needed\n"; |
diff --git a/coreutils/mknod.c b/coreutils/mknod.c index 95d7de360..ea2331fa3 100644 --- a/coreutils/mknod.c +++ b/coreutils/mknod.c | |||
@@ -6,7 +6,7 @@ | |||
6 | #include <fcntl.h> | 6 | #include <fcntl.h> |
7 | #include <unistd.h> | 7 | #include <unistd.h> |
8 | 8 | ||
9 | const char mknod_usage[] = "mknod file b|c|u|p major minor\n" | 9 | static const char mknod_usage[] = "mknod file b|c|u|p major minor\n" |
10 | "\tMake special files.\n" | 10 | "\tMake special files.\n" |
11 | "\n" | 11 | "\n" |
12 | "\tb:\tMake a block (buffered) device.\n" | 12 | "\tb:\tMake a block (buffered) device.\n" |
diff --git a/coreutils/printf.c b/coreutils/printf.c index 4d4465943..02d08118b 100644 --- a/coreutils/printf.c +++ b/coreutils/printf.c | |||
@@ -136,7 +136,7 @@ static void verify __P ((char *s, char *end)); | |||
136 | /* The value to return to the calling program. */ | 136 | /* The value to return to the calling program. */ |
137 | static int exit_status; | 137 | static int exit_status; |
138 | 138 | ||
139 | const char printf_usage[] = "printf format [argument...]\n"; | 139 | static const char printf_usage[] = "printf format [argument...]\n"; |
140 | 140 | ||
141 | int | 141 | int |
142 | printf_main(int argc, char** argv) | 142 | printf_main(int argc, char** argv) |
diff --git a/coreutils/touch.c b/coreutils/touch.c index c36ffca90..d882a6319 100644 --- a/coreutils/touch.c +++ b/coreutils/touch.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <errno.h> | 28 | #include <errno.h> |
29 | 29 | ||
30 | 30 | ||
31 | const char touch_usage[] = "touch [-c] file [file ...]\n\n" | 31 | static const char touch_usage[] = "touch [-c] file [file ...]\n\n" |
32 | "\tUpdate the last-modified date on the given file[s].\n"; | 32 | "\tUpdate the last-modified date on the given file[s].\n"; |
33 | 33 | ||
34 | 34 | ||