aboutsummaryrefslogtreecommitdiff
path: root/applets
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>1999-10-06 20:25:32 +0000
committerEric Andersen <andersen@codepoet.org>1999-10-06 20:25:32 +0000
commit17d49efd8ce6507152d78a70574193bb1b313af6 (patch)
tree64e24302dc2575867d8a78897500e5a5b2a48398 /applets
parent9d3aba7b37b275350a9fe0887871da9ba73dcbd7 (diff)
downloadbusybox-17d49efd8ce6507152d78a70574193bb1b313af6.tar.gz
More stuff.
Diffstat (limited to 'applets')
-rw-r--r--applets/busybox.c12
-rwxr-xr-xapplets/busybox.mkll16
2 files changed, 14 insertions, 14 deletions
diff --git a/applets/busybox.c b/applets/busybox.c
index 9986af389..c36bc2626 100644
--- a/applets/busybox.c
+++ b/applets/busybox.c
@@ -195,6 +195,7 @@ int main(int argc, char **argv)
int busybox_main(int argc, char **argv)
{
+ int col=0;
argc--;
argv++;
@@ -208,18 +209,19 @@ int busybox_main(int argc, char **argv)
fprintf(stderr, "BusyBox v%s (%s) multi-call binary -- GPL2\n",
BB_VER, BB_BT);
fprintf(stderr, "Usage: busybox [function] [arguments]...\n");
+ fprintf(stderr, "or\nUsage: [function] [arguments]...\n");
fprintf(stderr,
"\n\tMost people will create a symlink to busybox for each\n"
"\tfunction name, and busybox will act like whatever you invoke it as.\n");
fprintf(stderr, "\nCurrently defined functions:\n");
- if (a->name != 0) {
- fprintf(stderr, "%s", a->name);
- a++;
- }
while (a->name != 0) {
- fprintf(stderr, ", %s", a->name);
+ col+=fprintf(stderr, "%s%s", ((col==0)? "\t":", "), a->name);
a++;
+ if (col>60) {
+ fprintf(stderr, ",\n");
+ col=0;
+ }
}
fprintf(stderr, "\n\n");
exit(-1);
diff --git a/applets/busybox.mkll b/applets/busybox.mkll
index e43a1ccb0..f79462b7f 100755
--- a/applets/busybox.mkll
+++ b/applets/busybox.mkll
@@ -2,16 +2,14 @@
#Make busybox links list file
DF="busybox.def.h"
-MF="main.c"
+MF="busybox.c"
LIST="$(sed -n '/^#define/{s/^#define //p;}' $DF)"
- for def in ${LIST}; do
-
- set -- $(sed -n '/^#ifdef '$def'[ +| +].*/,/^#endif/{s/.*\/\///p; /^{ /{ s/^{ "//; s/",.*$//p;}; }' $MF)
- path=$1; shift
-
- for n in $@; do
- echo "$path/$n"
- done
+for def in ${LIST}; do
+ i=`sed -n 's/^#ifdef '$def'.*\/\/\(.*$\)/\/\1\//gp' $MF`
+ j=`sed -n '/^#ifdef '$def'.*/,/^#endif/{ s/.*\"\(.*\)\".*/\1/gp; }' $MF`
+ for k in $j; do
+ echo $i$k
done
+done