2000-02-08 19:58:47 +00:00
|
|
|
/* vi: set sw=4 ts=4: */
|
2000-02-07 05:29:42 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2000 by BitterSweet Enterprises, LLC.
|
|
|
|
* Written by Karl M. Hegbloom <karlheg@debian.org>
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
2000-05-12 19:41:47 +00:00
|
|
|
|
2000-05-19 05:35:19 +00:00
|
|
|
// To use this header file, include something like this:
|
2000-05-12 19:41:47 +00:00
|
|
|
//
|
|
|
|
//#define BB_DECLARE_EXTERN
|
|
|
|
//#define bb_need_memory_exhausted
|
|
|
|
//#include "messages.c"
|
|
|
|
//
|
2000-05-19 05:35:19 +00:00
|
|
|
//Then just use the string memory_exhausted when it is needed.
|
|
|
|
//
|
|
|
|
|
2000-09-25 21:45:58 +00:00
|
|
|
#include "busybox.h"
|
2000-02-07 05:29:42 +00:00
|
|
|
#ifndef _BB_MESSAGES_C
|
|
|
|
#define _BB_MESSAGES_C
|
|
|
|
|
|
|
|
#ifdef BB_DECLARE_EXTERN
|
2000-05-19 05:35:19 +00:00
|
|
|
# define BB_DEF_MESSAGE(symbol, string_const) extern const char *symbol;
|
2000-02-07 05:29:42 +00:00
|
|
|
#else
|
2000-05-19 05:35:19 +00:00
|
|
|
# define BB_DEF_MESSAGE(symbol, string_const) const char *symbol = string_const;
|
2000-02-07 05:29:42 +00:00
|
|
|
#endif
|
|
|
|
|
2000-05-19 05:35:19 +00:00
|
|
|
|
2000-07-17 23:45:12 +00:00
|
|
|
#if defined bb_need_full_version || ! defined BB_DECLARE_EXTERN
|
2001-04-12 20:11:55 +00:00
|
|
|
BB_DEF_MESSAGE(full_version, BB_BANNER " multi-call binary")
|
2000-07-17 23:45:12 +00:00
|
|
|
#endif
|
2000-02-07 05:29:42 +00:00
|
|
|
#if defined bb_need_name_too_long || ! defined BB_DECLARE_EXTERN
|
2001-01-31 19:00:21 +00:00
|
|
|
BB_DEF_MESSAGE(name_too_long, "file name too long")
|
2000-02-07 05:29:42 +00:00
|
|
|
#endif
|
|
|
|
#if defined bb_need_omitting_directory || ! defined BB_DECLARE_EXTERN
|
2001-01-31 19:00:21 +00:00
|
|
|
BB_DEF_MESSAGE(omitting_directory, "%s: omitting directory")
|
2000-02-07 05:29:42 +00:00
|
|
|
#endif
|
|
|
|
#if defined bb_need_not_a_directory || ! defined BB_DECLARE_EXTERN
|
2001-01-31 19:00:21 +00:00
|
|
|
BB_DEF_MESSAGE(not_a_directory, "%s: not a directory")
|
2000-02-07 05:29:42 +00:00
|
|
|
#endif
|
|
|
|
#if defined bb_need_memory_exhausted || ! defined BB_DECLARE_EXTERN
|
2001-01-31 19:00:21 +00:00
|
|
|
BB_DEF_MESSAGE(memory_exhausted, "memory exhausted")
|
2000-02-07 05:29:42 +00:00
|
|
|
#endif
|
|
|
|
#if defined bb_need_invalid_date || ! defined BB_DECLARE_EXTERN
|
2001-01-31 19:00:21 +00:00
|
|
|
BB_DEF_MESSAGE(invalid_date, "invalid date `%s'")
|
2000-02-07 05:29:42 +00:00
|
|
|
#endif
|
|
|
|
#if defined bb_need_invalid_option || ! defined BB_DECLARE_EXTERN
|
2001-01-31 19:00:21 +00:00
|
|
|
BB_DEF_MESSAGE(invalid_option, "invalid option -- %c")
|
2000-02-07 05:29:42 +00:00
|
|
|
#endif
|
2000-03-24 00:54:46 +00:00
|
|
|
#if defined bb_need_io_error || ! defined BB_DECLARE_EXTERN
|
2001-01-31 19:00:21 +00:00
|
|
|
BB_DEF_MESSAGE(io_error, "%s: input/output error -- %s")
|
2000-03-24 00:54:46 +00:00
|
|
|
#endif
|
2000-05-12 19:41:47 +00:00
|
|
|
#if defined bb_need_help || ! defined BB_DECLARE_EXTERN
|
|
|
|
BB_DEF_MESSAGE(dash_dash_help, "--help")
|
|
|
|
#endif
|
2000-05-19 05:35:19 +00:00
|
|
|
#if defined bb_need_write_error || ! defined BB_DECLARE_EXTERN
|
2001-01-31 19:00:21 +00:00
|
|
|
BB_DEF_MESSAGE(write_error, "Write Error")
|
2000-05-19 05:35:19 +00:00
|
|
|
#endif
|
2000-06-06 18:11:46 +00:00
|
|
|
#if defined bb_need_too_few_args || ! defined BB_DECLARE_EXTERN
|
2001-01-31 19:00:21 +00:00
|
|
|
BB_DEF_MESSAGE(too_few_args, "too few arguments")
|
2000-06-06 18:11:46 +00:00
|
|
|
#endif
|
2000-11-14 22:15:48 +00:00
|
|
|
#if defined bb_need_name_longer_than_foo || ! defined BB_DECLARE_EXTERN
|
2001-01-31 19:00:21 +00:00
|
|
|
BB_DEF_MESSAGE(name_longer_than_foo, "Names longer than %d chars not supported.")
|
2000-09-24 00:54:37 +00:00
|
|
|
#endif
|
2000-05-19 05:35:19 +00:00
|
|
|
|
2000-05-12 19:41:47 +00:00
|
|
|
|
2000-05-19 05:35:19 +00:00
|
|
|
#endif /* _BB_MESSAGES_C */
|
2000-05-12 19:41:47 +00:00
|
|
|
|