From b69b793d8e76b0d74ac34af52aa006215a718a7c Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Wed, 9 Mar 2011 21:42:38 +0000 Subject: [PATCH] Better consistency in usage display git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12524 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Makefile.in | 40 ++++++++++++++++++++---------------- Source/Modules/allegrocl.cxx | 32 +++++++++++++++-------------- Source/Modules/cffi.cxx | 25 ++++++++++++---------- Source/Modules/chicken.cxx | 12 +++++------ Source/Modules/clisp.cxx | 19 +++++++++-------- Source/Modules/csharp.cxx | 2 +- Source/Modules/d.cxx | 4 ++-- Source/Modules/go.cxx | 4 ++-- Source/Modules/guile.cxx | 39 ++++++++++++++++++----------------- Source/Modules/java.cxx | 4 ++-- Source/Modules/lua.cxx | 7 ++++--- Source/Modules/modula3.cxx | 8 ++++---- Source/Modules/mzscheme.cxx | 6 +++--- Source/Modules/ocaml.cxx | 12 ++++++----- Source/Modules/octave.cxx | 4 ++-- Source/Modules/perl5.cxx | 13 ++++++------ Source/Modules/php.cxx | 2 +- Source/Modules/pike.cxx | 2 +- Source/Modules/r.cxx | 9 +++++--- Source/Modules/ruby.cxx | 13 ++++++------ Source/Modules/uffi.cxx | 20 ++++++++++-------- 21 files changed, 150 insertions(+), 127 deletions(-) diff --git a/Makefile.in b/Makefile.in index 7da4ba79c..fc09d1f9c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -96,24 +96,28 @@ check-aliveness: test -x ./$(TARGET) ./$(TARGET) -version ./$(TARGET) -help - @$(skip-tcl) || ./$(TARGET) -tcl -help - @$(skip-perl5) || ./$(TARGET) -perl -help - @$(skip-python) || ./$(TARGET) -python -help - @$(skip-java) || ./$(TARGET) -java -help - @$(skip-guile) || ./$(TARGET) -guile -help - @$(skip-mzscheme) || ./$(TARGET) -mzscheme -help - @$(skip-ruby) || ./$(TARGET) -ruby -help - @$(skip-ocaml) || ./$(TARGET) -ocaml -help - @$(skip-octave) || ./$(TARGET) -octave -help - @$(skip-php) || ./$(TARGET) -php -help - @$(skip-pike) || ./$(TARGET) -pike -help - @$(skip-chicken) || ./$(TARGET) -chicken -help - @$(skip-csharp) || ./$(TARGET) -csharp -help - @$(skip-modula3) || ./$(TARGET) -modula3 -help - @$(skip-lua) || ./$(TARGET) -lua -help - @$(skip-r) || ./$(TARGET) -r -help - @$(skip-go) || ./$(TARGET) -go -help - @$(skip-d) || ./$(TARGET) -d -help + @$(skip-tcl) || ./$(TARGET) -tcl -help + @$(skip-perl5) || ./$(TARGET) -perl -help + @$(skip-python) || ./$(TARGET) -python -help + @$(skip-java) || ./$(TARGET) -java -help + @$(skip-guile) || ./$(TARGET) -guile -help + @$(skip-mzscheme) || ./$(TARGET) -mzscheme -help + @$(skip-ruby) || ./$(TARGET) -ruby -help + @$(skip-ocaml) || ./$(TARGET) -ocaml -help + @$(skip-octave) || ./$(TARGET) -octave -help + @$(skip-php) || ./$(TARGET) -php -help + @$(skip-pike) || ./$(TARGET) -pike -help + @$(skip-chicken) || ./$(TARGET) -chicken -help + @$(skip-csharp) || ./$(TARGET) -csharp -help + @$(skip-modula3) || ./$(TARGET) -modula3 -help + @$(skip-allegrocl)|| ./$(TARGET) -allegrocl -help + @$(skip-clisp) || ./$(TARGET) -clisp -help + @$(skip-uffi) || ./$(TARGET) -uffi -help + @$(skip-cffi) || ./$(TARGET) -cffi -help + @$(skip-lua) || ./$(TARGET) -lua -help + @$(skip-r) || ./$(TARGET) -r -help + @$(skip-go) || ./$(TARGET) -go -help + @$(skip-d) || ./$(TARGET) -d -help check-ccache: test -z "$(ENABLE_CCACHE)" || (cd $(CCACHE) && $(MAKE) check) diff --git a/Source/Modules/allegrocl.cxx b/Source/Modules/allegrocl.cxx index 93ca6d8f3..f450697a6 100644 --- a/Source/Modules/allegrocl.cxx +++ b/Source/Modules/allegrocl.cxx @@ -22,6 +22,21 @@ char cvsroot_allegrocl_cxx[] = "$Id$"; // #define ALLEGROCL_TYPE_DEBUG // #define ALLEGROCL_CLASS_DEBUG +static const char *usage = (char *) "\ +Allegro CL Options (available with -allegrocl)\n\ + -identifier-converter - \n\ + Specifies the type of conversion to do on C identifiers to convert\n\ + them to symbols. There are two built-in converters: 'null' and\n\ + 'lispify'. The default is 'null'. If you supply a name other\n\ + than one of the built-ins, then a function by that name will be\n\ + called to convert identifiers to symbols.\n\ + -[no]cwrap - Turn on or turn off generation of an intermediate C file when\n\ + creating a C interface. By default this is only done for C++ code.\n\ + -isolate - Define all SWIG helper functions in a package unique to this\n\ + module. Avoids redefinition warnings when loading multiple\n\ + SWIGged modules into the same running Allegro CL image.\n\ +"; + static File *f_cl = 0; String *f_clhead = NewString(""); String *f_clwrap = NewString("(swig-in-package ())\n\n"); @@ -1587,21 +1602,7 @@ void ALLEGROCL::main(int argc, char *argv[]) { } if (!strcmp(argv[i], "-help")) { - fprintf(stdout, "Allegro CL Options (available with -allegrocl)\n"); - fprintf(stdout, - " -identifier-converter \n" - "\tSpecifies the type of conversion to do on C identifiers to convert\n" - "\tthem to symbols. There are two built-in converters: 'null' and\n" - "\t 'lispify'. The default is 'null'. If you supply a name other\n" - "\tthan one of the built-ins, then a function by that name will be\n" - "\tcalled to convert identifiers to symbols.\n" - "\n" - " -[no]cwrap\n" - "\tTurn on or turn off generation of an intermediate C file when\n" "\tcreating a C interface. By default this is only done for C++ code.\n" - " -isolate\n" - "Define all SWIG helper functions in a package unique to this module. Avoids redefinition warnings when loading multiple SWIGged modules\n" - "into the same running Allegro CL image.\n"); - + Printf(stdout, "%s\n", usage); } } @@ -3230,3 +3231,4 @@ int ALLEGROCL::templateDeclaration(Node *n) { return SWIG_OK; } + diff --git a/Source/Modules/cffi.cxx b/Source/Modules/cffi.cxx index 53c44ff66..fe08a744a 100644 --- a/Source/Modules/cffi.cxx +++ b/Source/Modules/cffi.cxx @@ -20,6 +20,19 @@ char cvsroot_cffi_cxx[] = "$Id$"; //#define CFFI_DEBUG //#define CFFI_WRAP_DEBUG +static const char *usage = (char *) "\ +CFFI Options (available with -cffi)\n\ + -generate-typedef - Use defctype to generate shortcuts according to the\n\ + typedefs in the input.\n\ + -[no]cwrap - Turn on or turn off generation of an intermediate C\n\ + file when creating a C interface. By default this is\n\ + only done for C++ code.\n\ + -[no]swig-lisp - Turn on or off generation of code for helper lisp\n\ + macro, functions, etc. which SWIG uses while\n\ + generating wrappers. These macros, functions may still\n\ + be used by generated wrapper code.\n\ +"; + class CFFI:public Language { public: String *f_cl; @@ -80,17 +93,7 @@ void CFFI::main(int argc, char *argv[]) { CWrap = false; for (i = 1; i < argc; i++) { if (!Strcmp(argv[i], "-help")) { - Printf(stdout, "cffi Options (available with -cffi)\n"); - Printf(stdout, - " -generate-typedef\n" - "\tIf this option is given then defctype will be used to generate\n" - "\tshortcuts according to the typedefs in the input.\n" - " -[no]cwrap\n" - "\tTurn on or turn off generation of an intermediate C file when\n" - "\tcreating a C interface. By default this is only done for C++ code.\n" - " -[no]swig-lisp\n" - "\tTurns on or off generation of code for helper lisp macro, functions,\n" - "\tetc. which SWIG uses while generating wrappers. These macros, functions\n" "\tmay still be used by generated wrapper code.\n"); + Printf(stdout, "%s\n", usage); } else if (!strcmp(argv[i], "-cwrap")) { CWrap = true; Swig_mark_arg(i); diff --git a/Source/Modules/chicken.cxx b/Source/Modules/chicken.cxx index 07deb261a..0bb2193de 100644 --- a/Source/Modules/chicken.cxx +++ b/Source/Modules/chicken.cxx @@ -17,17 +17,17 @@ char cvsroot_chicken_cxx[] = "$Id$"; #include -static const char *chicken_usage = (char *) "\ +static const char *usage = (char *) "\ \ CHICKEN Options (available with -chicken)\n\ - -proxy - Export TinyCLOS class definitions\n\ -closprefix - Prepend to all clos identifiers\n\ - -useclassprefix - Prepend the class name to all clos identifiers\n\ - -unhideprimitive - Unhide the primitive: symbols\n\ - -nounit - Do not (declare (unit ...)) in scheme file\n\ -noclosuses - Do not (declare (uses ...)) in scheme file\n\ -nocollection - Do not register pointers with chicken garbage\n\ collector and export destructors\n\ + -nounit - Do not (declare (unit ...)) in scheme file\n\ + -proxy - Export TinyCLOS class definitions\n\ + -unhideprimitive - Unhide the primitive: symbols\n\ + -useclassprefix - Prepend the class name to all clos identifiers\n\ \n"; static char *module = 0; @@ -137,7 +137,7 @@ void CHICKEN::main(int argc, char *argv[]) { for (i = 1; i < argc; i++) { if (argv[i]) { if (strcmp(argv[i], "-help") == 0) { - fputs(chicken_usage, stdout); + fputs(usage, stdout); SWIG_exit(0); } else if (strcmp(argv[i], "-proxy") == 0) { clos = 1; diff --git a/Source/Modules/clisp.cxx b/Source/Modules/clisp.cxx index d26df36c2..05363a54d 100644 --- a/Source/Modules/clisp.cxx +++ b/Source/Modules/clisp.cxx @@ -15,6 +15,15 @@ char cvsroot_clisp_cxx[] = "$Id$"; #include "swigmod.h" +static const char *usage = (char *) "\ +CLISP Options (available with -clisp)\n\ + -extern-all - Create clisp definitions for all the functions and\n\ + global variables otherwise only definitions for\n\ + externed functions and variables are created.\n\ + -generate-typedef - Use def-c-type to generate shortcuts according to the\n\ + typedefs in the input.\n\ +"; + class CLISP:public Language { public: File *f_cl; @@ -48,15 +57,7 @@ void CLISP::main(int argc, char *argv[]) { for (i = 1; i < argc; i++) { if (!strcmp(argv[i], "-help")) { - Printf(stdout, "clisp Options (available with -clisp)\n"); - Printf(stdout, - " -extern-all\n" - "\t If this option is given then clisp definitions for all the functions\n" - "and global variables will be created otherwise only definitions for \n" - "externed functions and variables are created.\n" - " -generate-typedef\n" - "\t If this option is given then def-c-type will be used to generate shortcuts\n" - "according to the typedefs in the input.\n"); + Printf(stdout, "%s\n", usage); } else if ((Strcmp(argv[i], "-extern-all") == 0)) { extern_all_flag = 1; Swig_mark_arg(i); diff --git a/Source/Modules/csharp.cxx b/Source/Modules/csharp.cxx index 1444dbd87..6667f2ba8 100644 --- a/Source/Modules/csharp.cxx +++ b/Source/Modules/csharp.cxx @@ -4172,5 +4172,5 @@ C# Options (available with -csharp)\n\ -namespace - Generate wrappers into C# namespace \n\ -noproxy - Generate the low-level functional interface instead\n\ of proxy classes\n\ - -oldvarnames - old intermediary method names for variable wrappers\n\ + -oldvarnames - Old intermediary method names for variable wrappers\n\ \n"; diff --git a/Source/Modules/d.cxx b/Source/Modules/d.cxx index cc1bd2365..9e604d417 100644 --- a/Source/Modules/d.cxx +++ b/Source/Modules/d.cxx @@ -4342,10 +4342,10 @@ extern "C" Language *swig_d(void) { * ----------------------------------------------------------------------------- */ const char *D::usage = (char *) "\ D Options (available with -d)\n\ - -splitproxy - Write each D type to a dedicated file instead of\n\ - generating a single proxy D module.\n\ -noproxy - Generate the low-level functional interface instead\n\ of proxy classes\n\ -package - Write generated D modules into package \n\ + -splitproxy - Write each D type to a dedicated file instead of\n\ + generating a single proxy D module.\n\ -wrapperlibrary - Sets the name of the wrapper library to \n\ \n"; diff --git a/Source/Modules/go.cxx b/Source/Modules/go.cxx index 9ccebd24f..f263a76ca 100644 --- a/Source/Modules/go.cxx +++ b/Source/Modules/go.cxx @@ -4784,9 +4784,9 @@ extern "C" Language *swig_go(void) { // Usage message. const char * const GO::usage = (char *) "\ Go Options (available with -go)\n\ - -package - Set name of the Go package to \n\ -gccgo - Generate code for gccgo rather than 6g/8g\n\ -go-prefix

- Like gccgo -fgo-prefix option\n\ - -soname - Set shared library holding C/C++ code to \n\ -longsize - Set size of C/C++ long type--32 or 64 bits\n\ + -package - Set name of the Go package to \n\ + -soname - Set shared library holding C/C++ code to \n\ \n"; diff --git a/Source/Modules/guile.cxx b/Source/Modules/guile.cxx index fc0418496..d55f260a1 100644 --- a/Source/Modules/guile.cxx +++ b/Source/Modules/guile.cxx @@ -18,19 +18,15 @@ char cvsroot_guile_cxx[] = "$Id$"; #include // Note string broken in half for compilers that can't handle long strings -static const char *guile_usage = (char *) "\ +static const char *usage = (char *) "\ Guile Options (available with -guile)\n\ - -prefix - Use as prefix [default \"gswig_\"]\n\ - -package - Set the path of the module to \n\ - (default NULL)\n\ -emitsetters - Emit procedures-with-setters for variables\n\ and structure slots.\n\ - -onlysetters - Don't emit traditional getter and setter\n\ - procedures for structure slots,\n\ - only emit procedures-with-setters.\n\ - -procdoc - Output procedure documentation to \n\ - -procdocformat - Output procedure documentation in ;\n\ - one of `guile-1.4', `plain', `texinfo'\n\ + -emitslotaccessors - Emit accessor methods for all GOOPS slots\n" "\ + -exportprimitive - Add the (export ...) code from scmstub into the\n\ + GOOPS file.\n\ + -gh - Use the gh_ Guile API. (Guile <= 1.8) \n\ + -goopsprefix - Prepend to all goops identifiers\n\ -linkage - Use linkage protocol (default `simple')\n\ Use `module' for native Guile module linking\n\ (requires Guile >= 1.5.0). Use `passive' for\n\ @@ -38,18 +34,23 @@ Guile Options (available with -guile)\n\ `ltdlmod' for Guile's old dynamic module\n\ convention (Guile <= 1.4), or `hobbit' for hobbit\n\ modules.\n\ - -scmstub - Output Scheme file with module declaration and\n\ - exports; only with `passive' and `simple' linkage\n\ - -gh - Use the gh_ Guile API. (Guile <= 1.8) \n\ - -scm - Use the scm Guile API. (Guile >= 1.6, default) \n\ + -onlysetters - Don't emit traditional getter and setter\n\ + procedures for structure slots,\n\ + only emit procedures-with-setters.\n\ + -package - Set the path of the module to \n\ + (default NULL)\n\ + -prefix - Use as prefix [default \"gswig_\"]\n\ + -procdoc - Output procedure documentation to \n\ + -procdocformat - Output procedure documentation in ;\n\ + one of `guile-1.4', `plain', `texinfo'\n\ -proxy - Export GOOPS class definitions\n\ - -emitslotaccessors - Emit accessor methods for all GOOPS slots\n" "\ -primsuffix - Name appended to primitive module when exporting\n\ GOOPS classes. (default = \"primitive\")\n\ - -goopsprefix - Prepend to all goops identifiers\n\ + -scm - Use the scm Guile API. (Guile >= 1.6, default) \n\ + -scmstub - Output Scheme file with module declaration and\n\ + exports; only with `passive' and `simple' linkage\n\ -useclassprefix - Prepend the class name to all goops identifiers\n\ - -exportprimitive - Add the (export ...) code from scmstub into the\n\ - GOOPS file.\n"; +\n"; static File *f_begin = 0; static File *f_runtime = 0; @@ -135,7 +136,7 @@ public: for (i = 1; i < argc; i++) { if (argv[i]) { if (strcmp(argv[i], "-help") == 0) { - fputs(guile_usage, stdout); + fputs(usage, stdout); SWIG_exit(EXIT_SUCCESS); } else if (strcmp(argv[i], "-prefix") == 0) { if (argv[i + 1]) { diff --git a/Source/Modules/java.cxx b/Source/Modules/java.cxx index 234a1e85b..752a6165a 100644 --- a/Source/Modules/java.cxx +++ b/Source/Modules/java.cxx @@ -4394,6 +4394,6 @@ Java Options (available with -java)\n\ -nopgcpp - Suppress premature garbage collection prevention parameter\n\ -noproxy - Generate the low-level functional interface instead\n\ of proxy classes\n\ - -oldvarnames - old intermediary method names for variable wrappers\n\ - -package - set name of the Java package to \n\ + -oldvarnames - Old intermediary method names for variable wrappers\n\ + -package - Set name of the Java package to \n\ \n"; diff --git a/Source/Modules/lua.cxx b/Source/Modules/lua.cxx index d0cbc9195..ce92a2742 100644 --- a/Source/Modules/lua.cxx +++ b/Source/Modules/lua.cxx @@ -82,8 +82,9 @@ void display_mapping(DOH *d) { (though for now I have not bothered) NEW LANGUAGE NOTE:END ************************************************/ static const char *usage = (char *) "\ - Lua Options (available with -lua)\n\ - (coming soon.)\n\n"; +Lua Options (available with -lua)\n\ + [no additional options]\n\ +\n"; @@ -170,7 +171,7 @@ public: for (int i = 1; i < argc; i++) { if (argv[i]) { if (strcmp(argv[i], "-help") == 0) { // usage flags - fputs(usage, stderr); + fputs(usage, stdout); } } } diff --git a/Source/Modules/modula3.cxx b/Source/Modules/modula3.cxx index 45ceba1a4..00d4ed97a 100644 --- a/Source/Modules/modula3.cxx +++ b/Source/Modules/modula3.cxx @@ -3975,10 +3975,10 @@ extern "C" Language *swig_modula3(void) { const char *MODULA3::usage = (char *) "\ Modula 3 Options (available with -modula3)\n\ - -generateconst - generate code for computing numeric values of constants\n\ - -generaterename - generate suggestions for %rename\n\ - -generatetypemap - generate templates for some basic typemaps\n\ - -oldvarnames - old intermediary method names for variable wrappers\n\ + -generateconst - Generate code for computing numeric values of constants\n\ + -generaterename - Generate suggestions for %rename\n\ + -generatetypemap - Generate templates for some basic typemaps\n\ + -oldvarnames - Old intermediary method names for variable wrappers\n\ \n"; /* diff --git a/Source/Modules/mzscheme.cxx b/Source/Modules/mzscheme.cxx index d071dc870..89d267cbc 100644 --- a/Source/Modules/mzscheme.cxx +++ b/Source/Modules/mzscheme.cxx @@ -19,12 +19,12 @@ char cvsroot_mzscheme_cxx[] = "$Id$"; static const char *usage = (char *) "\ Mzscheme Options (available with -mzscheme)\n\ - -prefix - Set a prefix to be prepended to all names\n\ -declaremodule - Create extension that declares a module\n\ - -noinit - Do not emit scheme_initialize, scheme_reload,\n\ - scheme_module_name functions\n\ -dynamic-load ,[library,...] - Do not link with these libraries, dynamic load\n\ them\n\ + -noinit - Do not emit scheme_initialize, scheme_reload,\n\ + scheme_module_name functions\n\ + -prefix - Set a prefix to be prepended to all names\n\ "; static String *fieldnames_tab = 0; diff --git a/Source/Modules/ocaml.cxx b/Source/Modules/ocaml.cxx index 6021cf276..801b0ca70 100644 --- a/Source/Modules/ocaml.cxx +++ b/Source/Modules/ocaml.cxx @@ -17,11 +17,13 @@ char cvsroot_ocaml_cxx[] = "$Id$"; #include -static const char *usage = (char *) - ("Ocaml Options (available with -ocaml)\n" - "-prefix - Set a prefix to be prepended to all names\n" - "-where - Emit library location\n" - "-suffix - Change .cxx to something else\n" "-oldvarnames - old intermediary method names for variable wrappers\n" "\n"); +static const char *usage = (char *) "\ +Ocaml Options (available with -ocaml)\n\ + -oldvarnames - Old intermediary method names for variable wrappers\n\ + -prefix - Set a prefix to be prepended to all names\n\ + -suffix - Change .cxx to something else\n\ + -where - Emit library location\n\ +\n"; static int classmode = 0; static int in_constructor = 0, in_destructor = 0, in_copyconst = 0; diff --git a/Source/Modules/octave.cxx b/Source/Modules/octave.cxx index ad425e3c8..7753e669e 100644 --- a/Source/Modules/octave.cxx +++ b/Source/Modules/octave.cxx @@ -18,7 +18,7 @@ char cvsroot_octave_cxx[] = "$Id$"; static const char *usage = (char *) "\ Octave Options (available with -octave)\n\ [no additional options]\n\ - \n"; +\n"; class OCTAVE:public Language { @@ -64,7 +64,7 @@ public: for (int i = 1; i < argc; i++) { if (argv[i]) { if (strcmp(argv[i], "-help") == 0) { - fputs(usage, stderr); + fputs(usage, stdout); } } } diff --git a/Source/Modules/perl5.cxx b/Source/Modules/perl5.cxx index 01e557b1a..704be814f 100644 --- a/Source/Modules/perl5.cxx +++ b/Source/Modules/perl5.cxx @@ -21,14 +21,15 @@ static int treduce = SWIG_cparse_template_reduce(0); static const char *usage = (char *) "\ Perl5 Options (available with -perl5)\n\ - -static - Omit code related to dynamic loading\n\ - -nopm - Do not generate the .pm file\n\ - -proxy - Create proxy classes\n\ - -noproxy - Don't create proxy classes\n\ + -compat - Compatibility mode\n\ -const - Wrap constants as constants and not variables (implies -proxy)\n\ - -nocppcast - Disable C++ casting operators, useful for generating bugs\n\ -cppcast - Enable C++ casting operators\n\ - -compat - Compatibility mode\n\n"; + -nocppcast - Disable C++ casting operators, useful for generating bugs\n\ + -nopm - Do not generate the .pm file\n\ + -noproxy - Don't create proxy classes\n\ + -proxy - Create proxy classes\n\ + -static - Omit code related to dynamic loading\n\ +\n"; static int compat = 0; diff --git a/Source/Modules/php.cxx b/Source/Modules/php.cxx index d9b20e2b4..466641c47 100644 --- a/Source/Modules/php.cxx +++ b/Source/Modules/php.cxx @@ -46,7 +46,7 @@ char cvsroot_php_cxx[] = "$Id$"; static const char *usage = (char *) "\ PHP Options (available with -php)\n\ - -cppext - cpp file extension (default to .cpp)\n\ + -cppext - Change C++ file extension to (default is cpp)\n\ -noproxy - Don't generate proxy classes.\n\ -prefix - Prepend to all class names in PHP wrappers\n\ \n"; diff --git a/Source/Modules/pike.cxx b/Source/Modules/pike.cxx index bd1edec62..659496d52 100644 --- a/Source/Modules/pike.cxx +++ b/Source/Modules/pike.cxx @@ -37,7 +37,7 @@ char cvsroot_pike_cxx[] = "$Id$"; static const char *usage = (char *) "\ Pike Options (available with -pike)\n\ - [None]\n\ + [no additional options]\n\ \n"; class PIKE:public Language { diff --git a/Source/Modules/r.cxx b/Source/Modules/r.cxx index 64583175b..0f0024325 100644 --- a/Source/Modules/r.cxx +++ b/Source/Modules/r.cxx @@ -215,12 +215,15 @@ R Options (available with -r)\n\ -copystruct - Emit R code to copy C structs (on by default)\n\ -cppcast - Enable C++ casting operators (default) \n\ -debug - Output debug\n\ - -dll - Name of the DLL (without the .dll or .so suffix). Default is the module name.\n\ + -dll - Name of the DLL (without the .dll or .so suffix).\n\ + Default is the module name.\n\ -gc - Aggressive garbage collection\n\ -memoryprof - Add memory profile\n\ -namespace - Output NAMESPACE file\n\ - -no-init-code - Turn off the generation of the R_init_ code (registration information still generated)\n\ - -package - Package name for the PACKAGE argument of the R .Call() invocations. Default is the module name.\n\ + -no-init-code - Turn off the generation of the R_init_ code\n\ + (registration information still generated)\n\ + -package - Package name for the PACKAGE argument of the R .Call()\n\ + invocations. Default is the module name.\n\ "; diff --git a/Source/Modules/ruby.cxx b/Source/Modules/ruby.cxx index 8461b8bef..784b81973 100644 --- a/Source/Modules/ruby.cxx +++ b/Source/Modules/ruby.cxx @@ -131,16 +131,17 @@ enum autodoc_t { AUTODOC_SETTER }; -static const char *usage = "\ +static const char *usage = (char *) "\ Ruby Options (available with -ruby)\n\ - -globalmodule - Wrap everything into the global module\n\ - -minherit - Attempt to support multiple inheritance\n\ - -nocppcast - Disable C++ casting operators, useful for generating bugs\n\ - -cppcast - Enable C++ casting operators (default)\n\ -autorename - Enable renaming of classes and methods to follow Ruby coding standards\n\ + -cppcast - Enable C++ casting operators (default)\n\ + -globalmodule - Wrap everything into the global module\n\ + -initname - Set entry function to Init_ (used by `require')\n\ + -minherit - Attempt to support multiple inheritance\n\ -noautorename - Disable renaming of classes and methods (default)\n\ + -nocppcast - Disable C++ casting operators, useful for generating bugs\n\ -prefix - Set a prefix to be prepended to all names\n\ - -initname - Set entry function to Init_ (used by `require')\n"; +"; #define RCLASS(hash, name) (RClass*)(Getattr(hash, name) ? Data(Getattr(hash, name)) : 0) diff --git a/Source/Modules/uffi.cxx b/Source/Modules/uffi.cxx index ac17ca925..56ba045e6 100644 --- a/Source/Modules/uffi.cxx +++ b/Source/Modules/uffi.cxx @@ -17,6 +17,17 @@ char cvsroot_uffi_cxx[] = "$Id$"; #include "swigmod.h" +static const char *usage = (char *) "\ +UFFI Options (available with -uffi)\n\ + -identifier-converter - \n\ + Specifies the type of conversion to do on C identifiers\n\ + to convert them to symbols. There are two built-in\n\ + converters: 'null' and 'lispify'. The default is\n\ + 'null'. If you supply a name other than one of the\n\ + built-ins, then a function by that name will be\n\ + called to convert identifiers to symbols.\n\ +"; + class UFFI:public Language { public: @@ -222,14 +233,7 @@ void UFFI::main(int argc, char *argv[]) { } if (!strcmp(argv[i], "-help")) { - fprintf(stdout, "UFFI Options (available with -uffi)\n"); - fprintf(stdout, - " -identifier-converter \n" - "\tSpecifies the type of conversion to do on C identifiers to convert\n" - "\tthem to symbols. There are two built-in converters: 'null' and\n" - "\t 'lispify'. The default is 'null'. If you supply a name other\n" - "\tthan one of the built-ins, then a function by that name will be\n" - "\tcalled to convert identifiers to symbols.\n"); + Printf(stdout, "%s\n", usage); } } }