Move messages.c to libbb. Make each string in messages.c be its own .o file.
This way, we can new get rid of all that tedious #define rubbish we used to need to enable specific messages. This way is enormously simpler, and as a bonus also ends up saving us 96 bytes. -Erik
This commit is contained in:
@ -27,10 +27,6 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include "busybox.h"
|
||||
#define BB_DECLARE_EXTERN
|
||||
#define bb_need_invalid_option
|
||||
#define bb_need_too_few_args
|
||||
#include "messages.c"
|
||||
|
||||
/* Don't use lchown for libc5 or glibc older then 2.1.x */
|
||||
#if (__GLIBC__ < 2) && (__GLIBC_MINOR__ < 1)
|
||||
|
@ -28,9 +28,6 @@
|
||||
#include <unistd.h>
|
||||
#include <getopt.h>
|
||||
#include "busybox.h"
|
||||
#define BB_DECLARE_EXTERN
|
||||
#define bb_need_too_few_args
|
||||
#include "messages.c"
|
||||
|
||||
|
||||
struct stat *theMode;
|
||||
|
@ -27,10 +27,6 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include "busybox.h"
|
||||
#define BB_DECLARE_EXTERN
|
||||
#define bb_need_too_few_args
|
||||
#include "messages.c"
|
||||
|
||||
|
||||
/* Don't use lchown for libc5 or glibc older then 2.1.x */
|
||||
#if (__GLIBC__ < 2) && (__GLIBC_MINOR__ < 1)
|
||||
|
@ -29,10 +29,6 @@
|
||||
#include <string.h>
|
||||
#include <getopt.h>
|
||||
#include "busybox.h"
|
||||
#define BB_DECLARE_EXTERN
|
||||
#define bb_need_invalid_date
|
||||
#define bb_need_memory_exhausted
|
||||
#include "messages.c"
|
||||
|
||||
|
||||
/* This 'date' command supports only 2 time setting formats,
|
||||
|
@ -31,9 +31,6 @@
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include "busybox.h"
|
||||
#define BB_DECLARE_EXTERN
|
||||
#define bb_need_name_too_long
|
||||
#include "messages.c"
|
||||
|
||||
|
||||
#ifdef BB_FEATURE_HUMAN_READABLE
|
||||
@ -192,7 +189,7 @@ int du_main(int argc, char **argv)
|
||||
return status;
|
||||
}
|
||||
|
||||
/* $Id: du.c,v 1.44 2001/04/09 22:48:11 andersen Exp $ */
|
||||
/* $Id: du.c,v 1.45 2001/04/25 05:39:18 andersen Exp $ */
|
||||
/*
|
||||
Local Variables:
|
||||
c-file-style: "linux"
|
||||
|
@ -28,9 +28,6 @@
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include "busybox.h"
|
||||
#define BB_DECLARE_EXTERN
|
||||
#define bb_need_not_a_directory
|
||||
#include "messages.c"
|
||||
|
||||
|
||||
static const int LN_SYMLINK = 1;
|
||||
|
@ -26,9 +26,6 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include "busybox.h"
|
||||
#define bb_need_name_too_long
|
||||
#define BB_DECLARE_EXTERN
|
||||
#include "messages.c"
|
||||
|
||||
|
||||
static int parentFlag = FALSE;
|
||||
|
@ -38,9 +38,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "busybox.h"
|
||||
#define BB_DECLARE_EXTERN
|
||||
#define bb_need_help
|
||||
#include "messages.c"
|
||||
|
||||
/* test(1) accepts the following grammar:
|
||||
oexpr ::= aexpr | aexpr "-o" oexpr ;
|
||||
|
@ -30,9 +30,6 @@
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include "busybox.h"
|
||||
#define BB_DECLARE_EXTERN
|
||||
#define bb_need_write_error
|
||||
#include "messages.c"
|
||||
|
||||
static const int ASCII = 0377;
|
||||
|
||||
|
Reference in New Issue
Block a user