From fac10d7c59f7db0facd5fb94de273310b9ec86e6 Mon Sep 17 00:00:00 2001 From: Erik Andersen Date: Mon, 7 Feb 2000 05:29:42 +0000 Subject: A few minor updates. ;-) Seriously though, read the Changelog for busybox 0.42, which this is about to become... -Erik --- messages.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 messages.c (limited to 'messages.c') diff --git a/messages.c b/messages.c new file mode 100644 index 000000000..bfbf3175b --- /dev/null +++ b/messages.c @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2000 by BitterSweet Enterprises, LLC. + * Written by Karl M. Hegbloom + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* + * Let's put all of these messages in one place, and link this in as + * a separate object module, so that there are not going to be + * multiple non-unique but very similar strings in the binary. + * Perhaps this will make it simpler to internationalize also, and + * may make the binary slightly smaller. + */ +#ifndef _BB_MESSAGES_C +#define _BB_MESSAGES_C + +#define _BB_DEF_MESSAGE_PROTO(symbol) extern const char *symbol; +#define _BB_DEF_MESSAGE_INITIALIZE(symbol, string_const) const char *symbol = string_const; + +#ifdef BB_DECLARE_EXTERN +# define BB_DEF_MESSAGE(symbol, string_const) _BB_DEF_MESSAGE_PROTO(symbol) +#else +# define BB_DEF_MESSAGE(symbol, string_const) _BB_DEF_MESSAGE_INITIALIZE(symbol, string_const) +#endif + +#if defined bb_need_name_too_long || ! defined BB_DECLARE_EXTERN +BB_DEF_MESSAGE(name_too_long, "%s: file name too long\n") +#endif + +#if defined bb_need_omitting_directory || ! defined BB_DECLARE_EXTERN +BB_DEF_MESSAGE(omitting_directory, "%s: %s: omitting directory\n") +#endif + +#if defined bb_need_not_a_directory || ! defined BB_DECLARE_EXTERN +BB_DEF_MESSAGE(not_a_directory, "%s: %s: not a directory\n") +#endif + +#if defined bb_need_memory_exhausted || ! defined BB_DECLARE_EXTERN +BB_DEF_MESSAGE(memory_exhausted, "%s: memory exhausted\n") +#endif + +#if defined bb_need_invalid_date || ! defined BB_DECLARE_EXTERN +BB_DEF_MESSAGE(invalid_date, "%s: invalid date `%s'\n") +#endif + +#if defined bb_need_invalid_option || ! defined BB_DECLARE_EXTERN +BB_DEF_MESSAGE(invalid_option, "%s: invalid option -- %c\n") +#endif + +#endif /* _BB_MESSAGES_C */ -- cgit v1.2.3