aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Roskin <proski@gnu.org>2000-07-17 23:45:12 +0000
committerPavel Roskin <proski@gnu.org>2000-07-17 23:45:12 +0000
commit9c5fcc3408626c46bc5187554e950b981143bb38 (patch)
treefef8c909479641fa6828a08efb988cf6f4ed9c8a
parentcc8a66b113dbdf04082b6f7c9b0b58984d433028 (diff)
downloadbusybox-w32-9c5fcc3408626c46bc5187554e950b981143bb38.tar.gz
busybox-w32-9c5fcc3408626c46bc5187554e950b981143bb38.tar.bz2
busybox-w32-9c5fcc3408626c46bc5187554e950b981143bb38.zip
New message added to messages.c: full_version
Used where possible
-rw-r--r--applets/busybox.c8
-rw-r--r--busybox.c8
-rw-r--r--editors/sed.c5
-rw-r--r--init.c10
-rw-r--r--init/init.c10
-rw-r--r--lash.c6
-rw-r--r--messages.c4
-rw-r--r--sed.c5
-rw-r--r--sh.c6
-rw-r--r--shell/lash.c6
-rw-r--r--utility.c4
11 files changed, 53 insertions, 19 deletions
diff --git a/applets/busybox.c b/applets/busybox.c
index 041cdeb01..a88761aa2 100644
--- a/applets/busybox.c
+++ b/applets/busybox.c
@@ -4,6 +4,10 @@
4#include <string.h> 4#include <string.h>
5#include <errno.h> 5#include <errno.h>
6 6
7#define bb_need_full_version
8#define BB_DECLARE_EXTERN
9#include "messages.c"
10
7static int been_there_done_that = 0; 11static int been_there_done_that = 0;
8 12
9/* It has been alledged that doing such things can 13/* It has been alledged that doing such things can
@@ -504,14 +508,14 @@ int busybox_main(int argc, char **argv)
504 if (been_there_done_that == 1 || argc < 1) { 508 if (been_there_done_that == 1 || argc < 1) {
505 const struct BB_applet *a = applets; 509 const struct BB_applet *a = applets;
506 510
507 fprintf(stderr, "BusyBox v%s (%s) multi-call binary -- GPL2\n\n" 511 fprintf(stderr, "%s\n\n"
508 "Usage: busybox [function] [arguments]...\n" 512 "Usage: busybox [function] [arguments]...\n"
509 " or: [function] [arguments]...\n\n" 513 " or: [function] [arguments]...\n\n"
510 "\tBusyBox is a multi-call binary that combines many common Unix\n" 514 "\tBusyBox is a multi-call binary that combines many common Unix\n"
511 "\tutilities into a single executable. Most people will create a\n" 515 "\tutilities into a single executable. Most people will create a\n"
512 "\tlink to busybox for each function they wish to use, and BusyBox\n" 516 "\tlink to busybox for each function they wish to use, and BusyBox\n"
513 "\twill act like whatever it was invoked as.\n" 517 "\twill act like whatever it was invoked as.\n"
514 "\nCurrently defined functions:\n", BB_VER, BB_BT); 518 "\nCurrently defined functions:\n", full_version);
515 519
516 while (a->name != 0) { 520 while (a->name != 0) {
517 col += 521 col +=
diff --git a/busybox.c b/busybox.c
index 041cdeb01..a88761aa2 100644
--- a/busybox.c
+++ b/busybox.c
@@ -4,6 +4,10 @@
4#include <string.h> 4#include <string.h>
5#include <errno.h> 5#include <errno.h>
6 6
7#define bb_need_full_version
8#define BB_DECLARE_EXTERN
9#include "messages.c"
10
7static int been_there_done_that = 0; 11static int been_there_done_that = 0;
8 12
9/* It has been alledged that doing such things can 13/* It has been alledged that doing such things can
@@ -504,14 +508,14 @@ int busybox_main(int argc, char **argv)
504 if (been_there_done_that == 1 || argc < 1) { 508 if (been_there_done_that == 1 || argc < 1) {
505 const struct BB_applet *a = applets; 509 const struct BB_applet *a = applets;
506 510
507 fprintf(stderr, "BusyBox v%s (%s) multi-call binary -- GPL2\n\n" 511 fprintf(stderr, "%s\n\n"
508 "Usage: busybox [function] [arguments]...\n" 512 "Usage: busybox [function] [arguments]...\n"
509 " or: [function] [arguments]...\n\n" 513 " or: [function] [arguments]...\n\n"
510 "\tBusyBox is a multi-call binary that combines many common Unix\n" 514 "\tBusyBox is a multi-call binary that combines many common Unix\n"
511 "\tutilities into a single executable. Most people will create a\n" 515 "\tutilities into a single executable. Most people will create a\n"
512 "\tlink to busybox for each function they wish to use, and BusyBox\n" 516 "\tlink to busybox for each function they wish to use, and BusyBox\n"
513 "\twill act like whatever it was invoked as.\n" 517 "\twill act like whatever it was invoked as.\n"
514 "\nCurrently defined functions:\n", BB_VER, BB_BT); 518 "\nCurrently defined functions:\n", full_version);
515 519
516 while (a->name != 0) { 520 while (a->name != 0) {
517 col += 521 col +=
diff --git a/editors/sed.c b/editors/sed.c
index 195175e88..3973d212d 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -52,6 +52,9 @@
52#include <ctype.h> /* for isspace() */ 52#include <ctype.h> /* for isspace() */
53#include "internal.h" 53#include "internal.h"
54 54
55#define bb_need_full_version
56#define BB_DECLARE_EXTERN
57#include "messages.c"
55 58
56/* externs */ 59/* externs */
57extern int optind; /* in unistd.h */ 60extern int optind; /* in unistd.h */
@@ -676,7 +679,7 @@ extern int sed_main(int argc, char **argv)
676 while ((opt = getopt(argc, argv, "Vhne:f:")) > 0) { 679 while ((opt = getopt(argc, argv, "Vhne:f:")) > 0) {
677 switch (opt) { 680 switch (opt) {
678 case 'V': 681 case 'V':
679 printf("BusyBox v%s (%s)\n", BB_VER, BB_BT); 682 printf("%s\n", full_version);
680 exit(0); 683 exit(0);
681 break; 684 break;
682 case 'h': 685 case 'h':
diff --git a/init.c b/init.c
index 5a894392b..ab4ad5651 100644
--- a/init.c
+++ b/init.c
@@ -46,6 +46,10 @@
46# include <sys/syslog.h> 46# include <sys/syslog.h>
47#endif 47#endif
48 48
49#define bb_need_full_version
50#define BB_DECLARE_EXTERN
51#include "messages.c"
52
49/* From <linux/vt.h> */ 53/* From <linux/vt.h> */
50struct vt_stat { 54struct vt_stat {
51 unsigned short v_active; /* active vt */ 55 unsigned short v_active; /* active vt */
@@ -938,16 +942,14 @@ extern int init_main(int argc, char **argv)
938 CONSOLE| 942 CONSOLE|
939#endif 943#endif
940 LOG, 944 LOG,
941 "init started: BusyBox v%s (%s) multi-call binary\r\n", 945 "init started: %s\r\n", full_version);
942 BB_VER, BB_BT);
943#else 946#else
944 message( 947 message(
945#if ! defined BB_FEATURE_EXTRA_QUIET 948#if ! defined BB_FEATURE_EXTRA_QUIET
946 CONSOLE| 949 CONSOLE|
947#endif 950#endif
948 LOG, 951 LOG,
949 "init(%d) started: BusyBox v%s (%s) multi-call binary\r\n", 952 "init(%d) started: %s\r\n", getpid(), full_version);
950 getpid(), BB_VER, BB_BT);
951#endif 953#endif
952 954
953 955
diff --git a/init/init.c b/init/init.c
index 5a894392b..ab4ad5651 100644
--- a/init/init.c
+++ b/init/init.c
@@ -46,6 +46,10 @@
46# include <sys/syslog.h> 46# include <sys/syslog.h>
47#endif 47#endif
48 48
49#define bb_need_full_version
50#define BB_DECLARE_EXTERN
51#include "messages.c"
52
49/* From <linux/vt.h> */ 53/* From <linux/vt.h> */
50struct vt_stat { 54struct vt_stat {
51 unsigned short v_active; /* active vt */ 55 unsigned short v_active; /* active vt */
@@ -938,16 +942,14 @@ extern int init_main(int argc, char **argv)
938 CONSOLE| 942 CONSOLE|
939#endif 943#endif
940 LOG, 944 LOG,
941 "init started: BusyBox v%s (%s) multi-call binary\r\n", 945 "init started: %s\r\n", full_version);
942 BB_VER, BB_BT);
943#else 946#else
944 message( 947 message(
945#if ! defined BB_FEATURE_EXTRA_QUIET 948#if ! defined BB_FEATURE_EXTRA_QUIET
946 CONSOLE| 949 CONSOLE|
947#endif 950#endif
948 LOG, 951 LOG,
949 "init(%d) started: BusyBox v%s (%s) multi-call binary\r\n", 952 "init(%d) started: %s\r\n", getpid(), full_version);
950 getpid(), BB_VER, BB_BT);
951#endif 953#endif
952 954
953 955
diff --git a/lash.c b/lash.c
index 1dfce9e77..c9ef39f49 100644
--- a/lash.c
+++ b/lash.c
@@ -46,6 +46,10 @@
46#include "cmdedit.h" 46#include "cmdedit.h"
47#endif 47#endif
48 48
49#define bb_need_full_version
50#define BB_DECLARE_EXTERN
51#include "messages.c"
52
49#define MAX_READ 128 /* size of input buffer for `read' builtin */ 53#define MAX_READ 128 /* size of input buffer for `read' builtin */
50#define JOB_STATUS_FORMAT "[%d] %-22s %.40s\n" 54#define JOB_STATUS_FORMAT "[%d] %-22s %.40s\n"
51 55
@@ -1141,7 +1145,7 @@ int shell_main(int argc, char **argv)
1141 //} 1145 //}
1142 1146
1143 if (argc < 2) { 1147 if (argc < 2) {
1144 fprintf(stdout, "\n\nBusyBox v%s (%s) Built-in shell\n", BB_VER, BB_BT); 1148 fprintf(stdout, "\n\n%s Built-in shell\n", full_version);
1145 fprintf(stdout, "Enter 'help' for a list of built-in commands.\n\n"); 1149 fprintf(stdout, "Enter 'help' for a list of built-in commands.\n\n");
1146 } else { 1150 } else {
1147 if (argv[1][0]=='-' && argv[1][1]=='c') { 1151 if (argv[1][0]=='-' && argv[1][1]=='c') {
diff --git a/messages.c b/messages.c
index 428db9eaa..34b39f258 100644
--- a/messages.c
+++ b/messages.c
@@ -47,6 +47,10 @@
47#endif 47#endif
48 48
49 49
50#if defined bb_need_full_version || ! defined BB_DECLARE_EXTERN
51 BB_DEF_MESSAGE(full_version,
52 "BusyBox v" BB_VER " (" BB_BT ") multi-call binary -- GPL2")
53#endif
50#if defined bb_need_name_too_long || ! defined BB_DECLARE_EXTERN 54#if defined bb_need_name_too_long || ! defined BB_DECLARE_EXTERN
51 BB_DEF_MESSAGE(name_too_long, "file name too long\n") 55 BB_DEF_MESSAGE(name_too_long, "file name too long\n")
52#endif 56#endif
diff --git a/sed.c b/sed.c
index 195175e88..3973d212d 100644
--- a/sed.c
+++ b/sed.c
@@ -52,6 +52,9 @@
52#include <ctype.h> /* for isspace() */ 52#include <ctype.h> /* for isspace() */
53#include "internal.h" 53#include "internal.h"
54 54
55#define bb_need_full_version
56#define BB_DECLARE_EXTERN
57#include "messages.c"
55 58
56/* externs */ 59/* externs */
57extern int optind; /* in unistd.h */ 60extern int optind; /* in unistd.h */
@@ -676,7 +679,7 @@ extern int sed_main(int argc, char **argv)
676 while ((opt = getopt(argc, argv, "Vhne:f:")) > 0) { 679 while ((opt = getopt(argc, argv, "Vhne:f:")) > 0) {
677 switch (opt) { 680 switch (opt) {
678 case 'V': 681 case 'V':
679 printf("BusyBox v%s (%s)\n", BB_VER, BB_BT); 682 printf("%s\n", full_version);
680 exit(0); 683 exit(0);
681 break; 684 break;
682 case 'h': 685 case 'h':
diff --git a/sh.c b/sh.c
index 1dfce9e77..c9ef39f49 100644
--- a/sh.c
+++ b/sh.c
@@ -46,6 +46,10 @@
46#include "cmdedit.h" 46#include "cmdedit.h"
47#endif 47#endif
48 48
49#define bb_need_full_version
50#define BB_DECLARE_EXTERN
51#include "messages.c"
52
49#define MAX_READ 128 /* size of input buffer for `read' builtin */ 53#define MAX_READ 128 /* size of input buffer for `read' builtin */
50#define JOB_STATUS_FORMAT "[%d] %-22s %.40s\n" 54#define JOB_STATUS_FORMAT "[%d] %-22s %.40s\n"
51 55
@@ -1141,7 +1145,7 @@ int shell_main(int argc, char **argv)
1141 //} 1145 //}
1142 1146
1143 if (argc < 2) { 1147 if (argc < 2) {
1144 fprintf(stdout, "\n\nBusyBox v%s (%s) Built-in shell\n", BB_VER, BB_BT); 1148 fprintf(stdout, "\n\n%s Built-in shell\n", full_version);
1145 fprintf(stdout, "Enter 'help' for a list of built-in commands.\n\n"); 1149 fprintf(stdout, "Enter 'help' for a list of built-in commands.\n\n");
1146 } else { 1150 } else {
1147 if (argv[1][0]=='-' && argv[1][1]=='c') { 1151 if (argv[1][0]=='-' && argv[1][1]=='c') {
diff --git a/shell/lash.c b/shell/lash.c
index 1dfce9e77..c9ef39f49 100644
--- a/shell/lash.c
+++ b/shell/lash.c
@@ -46,6 +46,10 @@
46#include "cmdedit.h" 46#include "cmdedit.h"
47#endif 47#endif
48 48
49#define bb_need_full_version
50#define BB_DECLARE_EXTERN
51#include "messages.c"
52
49#define MAX_READ 128 /* size of input buffer for `read' builtin */ 53#define MAX_READ 128 /* size of input buffer for `read' builtin */
50#define JOB_STATUS_FORMAT "[%d] %-22s %.40s\n" 54#define JOB_STATUS_FORMAT "[%d] %-22s %.40s\n"
51 55
@@ -1141,7 +1145,7 @@ int shell_main(int argc, char **argv)
1141 //} 1145 //}
1142 1146
1143 if (argc < 2) { 1147 if (argc < 2) {
1144 fprintf(stdout, "\n\nBusyBox v%s (%s) Built-in shell\n", BB_VER, BB_BT); 1148 fprintf(stdout, "\n\n%s Built-in shell\n", full_version);
1145 fprintf(stdout, "Enter 'help' for a list of built-in commands.\n\n"); 1149 fprintf(stdout, "Enter 'help' for a list of built-in commands.\n\n");
1146 } else { 1150 } else {
1147 if (argv[1][0]=='-' && argv[1][1]=='c') { 1151 if (argv[1][0]=='-' && argv[1][1]=='c') {
diff --git a/utility.c b/utility.c
index 5f890c0ea..18d3c1440 100644
--- a/utility.c
+++ b/utility.c
@@ -37,6 +37,7 @@
37#define bb_need_name_too_long 37#define bb_need_name_too_long
38#endif 38#endif
39#define bb_need_memory_exhausted 39#define bb_need_memory_exhausted
40#define bb_need_full_version
40#define BB_DECLARE_EXTERN 41#define BB_DECLARE_EXTERN
41#include "messages.c" 42#include "messages.c"
42 43
@@ -84,8 +85,7 @@ const char mtab_file[] = "/dev/mtab";
84 85
85extern void usage(const char *usage) 86extern void usage(const char *usage)
86{ 87{
87 fprintf(stderr, "BusyBox v%s (%s) multi-call binary -- GPL2\n\n", 88 fprintf(stderr, "%s\n\n", full_version);
88 BB_VER, BB_BT);
89 fprintf(stderr, "Usage: %s\n", usage); 89 fprintf(stderr, "Usage: %s\n", usage);
90 exit FALSE; 90 exit FALSE;
91} 91}