1 /* vi: set sw=4 ts=4: */
3 * Copyright (C) 2000 by BitterSweet Enterprises, LLC.
4 * Written by Karl M. Hegbloom <karlheg@debian.org>
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.
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.
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
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.
29 #ifndef _BB_MESSAGES_C
30 #define _BB_MESSAGES_C
32 #define _BB_DEF_MESSAGE_PROTO(symbol) extern const char *symbol;
33 #define _BB_DEF_MESSAGE_INITIALIZE(symbol, string_const) const char *symbol = string_const;
35 #ifdef BB_DECLARE_EXTERN
36 # define BB_DEF_MESSAGE(symbol, string_const) _BB_DEF_MESSAGE_PROTO(symbol)
38 # define BB_DEF_MESSAGE(symbol, string_const) _BB_DEF_MESSAGE_INITIALIZE(symbol, string_const)
41 #if defined bb_need_name_too_long || ! defined BB_DECLARE_EXTERN
42 BB_DEF_MESSAGE(name_too_long, "%s: file name too long\n")
44 #if defined bb_need_omitting_directory || ! defined BB_DECLARE_EXTERN
45 BB_DEF_MESSAGE(omitting_directory, "%s: %s: omitting directory\n")
47 #if defined bb_need_not_a_directory || ! defined BB_DECLARE_EXTERN
48 BB_DEF_MESSAGE(not_a_directory, "%s: %s: not a directory\n")
50 #if defined bb_need_memory_exhausted || ! defined BB_DECLARE_EXTERN
51 BB_DEF_MESSAGE(memory_exhausted, "%s: memory exhausted\n")
53 #if defined bb_need_invalid_date || ! defined BB_DECLARE_EXTERN
54 BB_DEF_MESSAGE(invalid_date, "%s: invalid date `%s'\n")
56 #if defined bb_need_invalid_option || ! defined BB_DECLARE_EXTERN
57 BB_DEF_MESSAGE(invalid_option, "%s: invalid option -- %c\n")
59 #endif /* _BB_MESSAGES_C */