Erik Andersen | e49d5ec | 2000-02-08 19:58:47 +0000 | [diff] [blame] | 1 | /* vi: set sw=4 ts=4: */ |
Erik Andersen | fac10d7 | 2000-02-07 05:29:42 +0000 | [diff] [blame] | 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 | */ |
Erik Andersen | 7ab9c7e | 2000-05-12 19:41:47 +0000 | [diff] [blame] | 29 | |
Erik Andersen | 330fd2b | 2000-05-19 05:35:19 +0000 | [diff] [blame] | 30 | // To use this header file, include something like this: |
Erik Andersen | 7ab9c7e | 2000-05-12 19:41:47 +0000 | [diff] [blame] | 31 | // |
| 32 | //#define BB_DECLARE_EXTERN |
| 33 | //#define bb_need_memory_exhausted |
| 34 | //#include "messages.c" |
| 35 | // |
Erik Andersen | 330fd2b | 2000-05-19 05:35:19 +0000 | [diff] [blame] | 36 | //Then just use the string memory_exhausted when it is needed. |
| 37 | // |
| 38 | |
Eric Andersen | 3570a34 | 2000-09-25 21:45:58 +0000 | [diff] [blame] | 39 | #include "busybox.h" |
Erik Andersen | fac10d7 | 2000-02-07 05:29:42 +0000 | [diff] [blame] | 40 | #ifndef _BB_MESSAGES_C |
| 41 | #define _BB_MESSAGES_C |
| 42 | |
Erik Andersen | fac10d7 | 2000-02-07 05:29:42 +0000 | [diff] [blame] | 43 | #ifdef BB_DECLARE_EXTERN |
Erik Andersen | 330fd2b | 2000-05-19 05:35:19 +0000 | [diff] [blame] | 44 | # define BB_DEF_MESSAGE(symbol, string_const) extern const char *symbol; |
Erik Andersen | fac10d7 | 2000-02-07 05:29:42 +0000 | [diff] [blame] | 45 | #else |
Erik Andersen | 330fd2b | 2000-05-19 05:35:19 +0000 | [diff] [blame] | 46 | # define BB_DEF_MESSAGE(symbol, string_const) const char *symbol = string_const; |
Erik Andersen | fac10d7 | 2000-02-07 05:29:42 +0000 | [diff] [blame] | 47 | #endif |
| 48 | |
Erik Andersen | 330fd2b | 2000-05-19 05:35:19 +0000 | [diff] [blame] | 49 | |
Pavel Roskin | 9c5fcc3 | 2000-07-17 23:45:12 +0000 | [diff] [blame] | 50 | #if defined bb_need_full_version || ! defined BB_DECLARE_EXTERN |
| 51 | BB_DEF_MESSAGE(full_version, |
| 52 | "BusyBox v" BB_VER " (" BB_BT ") multi-call binary -- GPL2") |
| 53 | #endif |
Erik Andersen | fac10d7 | 2000-02-07 05:29:42 +0000 | [diff] [blame] | 54 | #if defined bb_need_name_too_long || ! defined BB_DECLARE_EXTERN |
Matt Kraai | d537a95 | 2000-07-14 01:51:25 +0000 | [diff] [blame] | 55 | BB_DEF_MESSAGE(name_too_long, "file name too long\n") |
Erik Andersen | fac10d7 | 2000-02-07 05:29:42 +0000 | [diff] [blame] | 56 | #endif |
Erik Andersen | fac10d7 | 2000-02-07 05:29:42 +0000 | [diff] [blame] | 57 | #if defined bb_need_omitting_directory || ! defined BB_DECLARE_EXTERN |
Matt Kraai | d537a95 | 2000-07-14 01:51:25 +0000 | [diff] [blame] | 58 | BB_DEF_MESSAGE(omitting_directory, "%s: omitting directory\n") |
Erik Andersen | fac10d7 | 2000-02-07 05:29:42 +0000 | [diff] [blame] | 59 | #endif |
Erik Andersen | fac10d7 | 2000-02-07 05:29:42 +0000 | [diff] [blame] | 60 | #if defined bb_need_not_a_directory || ! defined BB_DECLARE_EXTERN |
Matt Kraai | d537a95 | 2000-07-14 01:51:25 +0000 | [diff] [blame] | 61 | BB_DEF_MESSAGE(not_a_directory, "%s: not a directory\n") |
Erik Andersen | fac10d7 | 2000-02-07 05:29:42 +0000 | [diff] [blame] | 62 | #endif |
Erik Andersen | fac10d7 | 2000-02-07 05:29:42 +0000 | [diff] [blame] | 63 | #if defined bb_need_memory_exhausted || ! defined BB_DECLARE_EXTERN |
Matt Kraai | be84cd4 | 2000-07-12 17:02:35 +0000 | [diff] [blame] | 64 | BB_DEF_MESSAGE(memory_exhausted, "memory exhausted\n") |
Erik Andersen | fac10d7 | 2000-02-07 05:29:42 +0000 | [diff] [blame] | 65 | #endif |
Erik Andersen | fac10d7 | 2000-02-07 05:29:42 +0000 | [diff] [blame] | 66 | #if defined bb_need_invalid_date || ! defined BB_DECLARE_EXTERN |
Matt Kraai | be84cd4 | 2000-07-12 17:02:35 +0000 | [diff] [blame] | 67 | BB_DEF_MESSAGE(invalid_date, "invalid date `%s'\n") |
Erik Andersen | fac10d7 | 2000-02-07 05:29:42 +0000 | [diff] [blame] | 68 | #endif |
Erik Andersen | fac10d7 | 2000-02-07 05:29:42 +0000 | [diff] [blame] | 69 | #if defined bb_need_invalid_option || ! defined BB_DECLARE_EXTERN |
Matt Kraai | d537a95 | 2000-07-14 01:51:25 +0000 | [diff] [blame] | 70 | BB_DEF_MESSAGE(invalid_option, "invalid option -- %c\n") |
Erik Andersen | fac10d7 | 2000-02-07 05:29:42 +0000 | [diff] [blame] | 71 | #endif |
Erik Andersen | 1ad302a | 2000-03-24 00:54:46 +0000 | [diff] [blame] | 72 | #if defined bb_need_io_error || ! defined BB_DECLARE_EXTERN |
| 73 | BB_DEF_MESSAGE(io_error, "%s: input/output error -- %s\n") |
| 74 | #endif |
Erik Andersen | 7ab9c7e | 2000-05-12 19:41:47 +0000 | [diff] [blame] | 75 | #if defined bb_need_help || ! defined BB_DECLARE_EXTERN |
| 76 | BB_DEF_MESSAGE(dash_dash_help, "--help") |
| 77 | #endif |
Erik Andersen | 330fd2b | 2000-05-19 05:35:19 +0000 | [diff] [blame] | 78 | #if defined bb_need_write_error || ! defined BB_DECLARE_EXTERN |
| 79 | BB_DEF_MESSAGE(write_error, "Write Error\n") |
| 80 | #endif |
Mark Whitley | eec2f63 | 2000-06-06 18:11:46 +0000 | [diff] [blame] | 81 | #if defined bb_need_too_few_args || ! defined BB_DECLARE_EXTERN |
Matt Kraai | d537a95 | 2000-07-14 01:51:25 +0000 | [diff] [blame] | 82 | BB_DEF_MESSAGE(too_few_args, "too few arguments\n") |
Mark Whitley | eec2f63 | 2000-06-06 18:11:46 +0000 | [diff] [blame] | 83 | #endif |
Eric Andersen | 1b1cfde | 2000-09-24 00:54:37 +0000 | [diff] [blame] | 84 | #if defined bb_need_name_longer_then_foo || ! defined BB_DECLARE_EXTERN |
| 85 | BB_DEF_MESSAGE(name_longer_then_foo, "Names longer then %d chars not supported.\n") |
| 86 | #endif |
Erik Andersen | 330fd2b | 2000-05-19 05:35:19 +0000 | [diff] [blame] | 87 | |
| 88 | |
| 89 | #endif /* _BB_MESSAGES_C */ |
Erik Andersen | 7ab9c7e | 2000-05-12 19:41:47 +0000 | [diff] [blame] | 90 | |