Add support for the -external-runtime argument and update all language modules to use it

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6993 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
John Lenz 2005-02-23 22:40:51 +00:00
commit ef58056ffd
18 changed files with 233 additions and 46 deletions

View file

@ -79,11 +79,12 @@ Swig_check_marked(int n) {
* ----------------------------------------------------------------------------- */
void
Swig_check_options() {
Swig_check_options(int check_input) {
int error = 0;
int i;
int max = check_input ? numargs - 1 : numargs;
assert(marked);
for (i = 1; i < numargs-1; i++) {
for (i = 1; i < max; i++) {
if (!marked[i]) {
Printf(stderr,"swig error : Unrecognized option %s\n", args[i]);
error=1;
@ -93,7 +94,7 @@ Swig_check_options() {
Printf(stderr,"Use 'swig -help' for available options.\n");
exit(1);
}
if (marked[numargs-1]) {
if (check_input && marked[numargs-1]) {
Printf(stderr,"Must specify an input file. Use -help for available options.\n");
exit(1);
}

View file

@ -132,7 +132,7 @@ extern char *Swig_file_dirname(const String_or_char *filename);
extern void Swig_init_args(int argc, char **argv);
extern void Swig_mark_arg(int n);
extern int Swig_check_marked(int n);
extern void Swig_check_options();
extern void Swig_check_options(int check_input);
extern void Swig_arg_error();
/* --- Scanner Interface --- */

View file

@ -723,7 +723,7 @@ extern DOH *Swig_include(DOH *name);
extern void Swig_init_args(int argc, char **argv);
extern void Swig_mark_arg(int n);
extern void Swig_check_options();
extern void Swig_check_options(int check_input);
extern void Swig_arg_error();
%section "Miscelaneous", after