This commit is contained in:
fluxgen 2002-03-08 12:21:46 +00:00
parent c92e9899e9
commit 91d51a4d16

View file

@ -22,7 +22,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: main.cc,v 1.4 2002/02/02 21:54:31 pekdon Exp $
// $Id: main.cc,v 1.5 2002/03/08 12:21:46 fluxgen Exp $
// stupid macros needed to access some functions in version 2 of the GNU C
// library
@ -72,6 +72,17 @@ using namespace std;
uds::uds_flags_t uds::flags = uds::leak_check;
#endif //!DEBUG_UDS
const char *getNLSYesNoMsg(bool val) {
if (val) {
return I18n::instance()->getMessage(
CommonSet, CommonYes,
"yes");
}
return I18n::instance()->getMessage(
CommonSet, CommonNo,
"no");
}
int main(int argc, char **argv) {
#ifdef DEBUG_UDS
@ -92,14 +103,9 @@ int main(int argc, char **argv) {
if ((++i) >= argc) {
fprintf(stderr,
i18n->getMessage(
#ifdef NLS
mainSet, mainRCRequiresArg,
#else // !NLS
0, 0,
#endif // NLS
"error: '-rc' requires and argument\n"));
::exit(1);
exit(1);
}
rc_file = argv[i];
@ -110,14 +116,9 @@ int main(int argc, char **argv) {
if ((++i) >= argc) {
fprintf(stderr,
i18n->getMessage(
#ifdef NLS
mainSet, mainDISPLAYRequiresArg,
#else // !NLS
0, 0,
#endif // NLS
"error: '-display' requires an argument\n"));
::exit(1);
exit(1);
}
session_display = argv[i];
@ -128,11 +129,7 @@ int main(int argc, char **argv) {
fprintf(stderr,
i18n->
getMessage(
#ifdef NLS
mainSet, mainWarnDisplaySet,
#else // !NLS
0, 0,
#endif // NLS
"warning: couldn't set environment variable 'DISPLAY'\n"));
perror("putenv()");
}
@ -141,16 +138,12 @@ int main(int argc, char **argv) {
printf("Fluxbox %s : (c) 2001-2002 Henrik Kinnunen \n\n",
__fluxbox_version);
::exit(0);
exit(0);
} else if (! strcmp(argv[i], "-help")) {
// print program usage and command line options
printf(i18n->
getMessage(
#ifdef NLS
mainSet, mainUsage,
#else // !NLS
0, 0,
#endif // NLS
"Fluxbox %s : (c) 2001-2002 Henrik Kinnunen\n\n"
" -display <string>\t\tuse display connection.\n"
" -rc <string>\t\t\tuse alternate resource file.\n"
@ -162,106 +155,46 @@ int main(int argc, char **argv) {
// as well
printf(i18n->
getMessage(
#ifdef NLS
#ifdef NLS
mainSet, mainCompileOptions,
#else // !NLS
#else // !NLS
0, 0,
#endif // NLS
#endif // NLS
"Compile time options:\n"
" Debugging:\t\t\t%s\n"
" Interlacing:\t\t\t%s\n"
" Shape:\t\t\t%s\n"
" Slit:\t\t\t\t%s\n"
" 8bpp Ordered Dithering:\t%s\n\n"),
#ifdef DEBUG
i18n->getMessage(
#ifdef NLS
CommonSet, CommonYes,
#else // !NLS
0, 0,
#endif // NLS
"yes"),
#else // !DEBUG
i18n->getMessage(
#ifdef NLS
CommonSet, CommonNo,
#else // !NLS
0, 0,
#endif // NLS
"no"),
#endif // DEBUG
#ifdef DEBUG
getNLSYesNoMsg(true),
#else // !DEBUG
getNLSYesNoMsg(false),
#endif // DEBUG
#ifdef INTERLACE
i18n->getMessage(
#ifdef NLS
CommonSet, CommonYes,
#else // !NLS
0, 0,
#endif // NLS
"yes"),
#else // !INTERLACE
i18n->getMessage(
#ifdef NLS
CommonSet, CommonNo,
#else // !NLS
0, 0,
#endif // NLS
"no"),
#endif // INTERLACE
#ifdef INTERLACE
getNLSYesNoMsg(true),
#else // !INTERLACE
getNLSYesNoMsg(false),
#endif // INTERLACE
#ifdef SHAPE
i18n->getMessage(
#ifdef NLS
CommonSet, CommonYes,
#else // !NLS
0, 0,
#endif // NLS
"yes"),
#else // !SHAPE
i18n->getMessage(
#ifdef NLS
CommonSet, CommonNo,
#else // !NLS
0, 0,
#endif // NLS
"no"),
#endif // SHAPE
#ifdef SHAPE
getNLSYesNoMsg(true),
#else // !SHAPE
getNLSYesNoMsg(false),
#endif // SHAPE
#ifdef SLIT
i18n->getMessage(
#ifdef NLS
CommonSet, CommonYes,
#else // !NLS
0, 0,
#endif // NLS
"yes"),
#else // !SLIT
i18n->getMessage(
#ifdef NLS
CommonSet, CommonNo,
#else // !NLS
0, 0,
#endif // NLS
"no"),
#endif // SLIT
#ifdef SLIT
getNLSYesNoMsg(true),
#else // !SLIT
getNLSYesNoMsg(false),
#endif // SLIT
#ifdef ORDEREDPSEUDO
i18n->getMessage(
#ifdef NLS
CommonSet, CommonYes,
#else // !NLS
0, 0,
#endif // NLS
"yes")
#else // !ORDEREDPSEUDO
i18n->getMessage(
#ifdef NLS
CommonSet, CommonNo,
#else // !NLS
0, 0,
#endif // NLS
"no")
#endif // ORDEREDPSEUDO
#ifdef ORDEREDPSEUDO
getNLSYesNoMsg(true)
#else // !ORDEREDPSEUDO
getNLSYesNoMsg(false)
#endif // ORDEREDPSEUDO
);