aboutsummaryrefslogtreecommitdiff
path: root/messages.c
diff options
context:
space:
mode:
Diffstat (limited to 'messages.c')
-rw-r--r--messages.c89
1 files changed, 0 insertions, 89 deletions
diff --git a/messages.c b/messages.c
deleted file mode 100644
index 57630a802..000000000
--- a/messages.c
+++ /dev/null
@@ -1,89 +0,0 @@
1/* vi: set sw=4 ts=4: */
2/*
3 * Copyright (C) 2000 by BitterSweet Enterprises, LLC.
4 * Written by Karl M. Hegbloom <karlheg@debian.org>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 *
20 */
21
22/*
23 * Let's put all of these messages in one place, and link this in as
24 * a separate object module, so that there are not going to be
25 * multiple non-unique but very similar strings in the binary.
26 * Perhaps this will make it simpler to internationalize also, and
27 * may make the binary slightly smaller.
28 */
29
30// To use this header file, include something like this:
31//
32//#define BB_DECLARE_EXTERN
33//#define bb_need_memory_exhausted
34//#include "messages.c"
35//
36//Then just use the string memory_exhausted when it is needed.
37//
38
39#include "busybox.h"
40#ifndef _BB_MESSAGES_C
41#define _BB_MESSAGES_C
42
43#ifdef BB_DECLARE_EXTERN
44# define BB_DEF_MESSAGE(symbol, string_const) extern const char *symbol;
45#else
46# define BB_DEF_MESSAGE(symbol, string_const) const char *symbol = string_const;
47#endif
48
49
50#if defined bb_need_full_version || ! defined BB_DECLARE_EXTERN
51 BB_DEF_MESSAGE(full_version, BB_BANNER " multi-call binary")
52#endif
53#if defined bb_need_name_too_long || ! defined BB_DECLARE_EXTERN
54 BB_DEF_MESSAGE(name_too_long, "file name too long")
55#endif
56#if defined bb_need_omitting_directory || ! defined BB_DECLARE_EXTERN
57 BB_DEF_MESSAGE(omitting_directory, "%s: omitting directory")
58#endif
59#if defined bb_need_not_a_directory || ! defined BB_DECLARE_EXTERN
60 BB_DEF_MESSAGE(not_a_directory, "%s: not a directory")
61#endif
62#if defined bb_need_memory_exhausted || ! defined BB_DECLARE_EXTERN
63 BB_DEF_MESSAGE(memory_exhausted, "memory exhausted")
64#endif
65#if defined bb_need_invalid_date || ! defined BB_DECLARE_EXTERN
66 BB_DEF_MESSAGE(invalid_date, "invalid date `%s'")
67#endif
68#if defined bb_need_invalid_option || ! defined BB_DECLARE_EXTERN
69 BB_DEF_MESSAGE(invalid_option, "invalid option -- %c")
70#endif
71#if defined bb_need_io_error || ! defined BB_DECLARE_EXTERN
72 BB_DEF_MESSAGE(io_error, "%s: input/output error -- %s")
73#endif
74#if defined bb_need_help || ! defined BB_DECLARE_EXTERN
75 BB_DEF_MESSAGE(dash_dash_help, "--help")
76#endif
77#if defined bb_need_write_error || ! defined BB_DECLARE_EXTERN
78 BB_DEF_MESSAGE(write_error, "Write Error")
79#endif
80#if defined bb_need_too_few_args || ! defined BB_DECLARE_EXTERN
81 BB_DEF_MESSAGE(too_few_args, "too few arguments")
82#endif
83#if defined bb_need_name_longer_than_foo || ! defined BB_DECLARE_EXTERN
84 BB_DEF_MESSAGE(name_longer_than_foo, "Names longer than %d chars not supported.")
85#endif
86
87
88#endif /* _BB_MESSAGES_C */
89