aboutsummaryrefslogtreecommitdiff
path: root/messages.c
diff options
context:
space:
mode:
Diffstat (limited to 'messages.c')
-rw-r--r--messages.c64
1 files changed, 64 insertions, 0 deletions
diff --git a/messages.c b/messages.c
new file mode 100644
index 000000000..bfbf3175b
--- /dev/null
+++ b/messages.c
@@ -0,0 +1,64 @@
1/*
2 * Copyright (C) 2000 by BitterSweet Enterprises, LLC.
3 * Written by Karl M. Hegbloom <karlheg@debian.org>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *
19 */
20
21/*
22 * Let's put all of these messages in one place, and link this in as
23 * a separate object module, so that there are not going to be
24 * multiple non-unique but very similar strings in the binary.
25 * Perhaps this will make it simpler to internationalize also, and
26 * may make the binary slightly smaller.
27 */
28#ifndef _BB_MESSAGES_C
29#define _BB_MESSAGES_C
30
31#define _BB_DEF_MESSAGE_PROTO(symbol) extern const char *symbol;
32#define _BB_DEF_MESSAGE_INITIALIZE(symbol, string_const) const char *symbol = string_const;
33
34#ifdef BB_DECLARE_EXTERN
35# define BB_DEF_MESSAGE(symbol, string_const) _BB_DEF_MESSAGE_PROTO(symbol)
36#else
37# define BB_DEF_MESSAGE(symbol, string_const) _BB_DEF_MESSAGE_INITIALIZE(symbol, string_const)
38#endif
39
40#if defined bb_need_name_too_long || ! defined BB_DECLARE_EXTERN
41BB_DEF_MESSAGE(name_too_long, "%s: file name too long\n")
42#endif
43
44#if defined bb_need_omitting_directory || ! defined BB_DECLARE_EXTERN
45BB_DEF_MESSAGE(omitting_directory, "%s: %s: omitting directory\n")
46#endif
47
48#if defined bb_need_not_a_directory || ! defined BB_DECLARE_EXTERN
49BB_DEF_MESSAGE(not_a_directory, "%s: %s: not a directory\n")
50#endif
51
52#if defined bb_need_memory_exhausted || ! defined BB_DECLARE_EXTERN
53BB_DEF_MESSAGE(memory_exhausted, "%s: memory exhausted\n")
54#endif
55
56#if defined bb_need_invalid_date || ! defined BB_DECLARE_EXTERN
57BB_DEF_MESSAGE(invalid_date, "%s: invalid date `%s'\n")
58#endif
59
60#if defined bb_need_invalid_option || ! defined BB_DECLARE_EXTERN
61BB_DEF_MESSAGE(invalid_option, "%s: invalid option -- %c\n")
62#endif
63
64#endif /* _BB_MESSAGES_C */