create a common banner header for all target language specific files

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11016 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2008-12-29 22:56:25 +00:00
commit cc522323d7
19 changed files with 82 additions and 80 deletions

View file

@ -21,7 +21,7 @@ char cvsroot_allegrocl_cxx[] = "$Id$";
static File *f_cl = 0; static File *f_cl = 0;
String *f_clhead = NewString(""); String *f_clhead = NewString("");
String *f_clwrap = NewString("(swig-in-package ())\n\n"); String *f_clwrap = NewString("(swig-in-package ())\n\n");
static File *f_cxx; static File *f_runtime;
static File *f_cxx_header = 0; static File *f_cxx_header = 0;
static File *f_cxx_wrapper = 0; static File *f_cxx_wrapper = 0;
@ -1599,27 +1599,29 @@ int ALLEGROCL::top(Node *n) {
Generate_Wrapper = CPlusPlus || CWrap; Generate_Wrapper = CPlusPlus || CWrap;
if (Generate_Wrapper) { if (Generate_Wrapper) {
f_cxx = NewFile(cxx_filename, "w", SWIG_output_files()); f_runtime = NewFile(cxx_filename, "w", SWIG_output_files());
if (!f_cxx) { if (!f_runtime) {
Close(f_cl); Close(f_cl);
Delete(f_cl); Delete(f_cl);
Printf(stderr, "Unable to open %s for writing\n", cxx_filename); Printf(stderr, "Unable to open %s for writing\n", cxx_filename);
SWIG_exit(EXIT_FAILURE); SWIG_exit(EXIT_FAILURE);
} }
} else } else
f_cxx = NewString(""); f_runtime = NewString("");
f_cxx_header = f_cxx; f_cxx_header = f_runtime;
f_cxx_wrapper = NewString(""); f_cxx_wrapper = NewString("");
Swig_register_filebyname("header", f_cxx_header); Swig_register_filebyname("header", f_cxx_header);
Swig_register_filebyname("wrapper", f_cxx_wrapper); Swig_register_filebyname("wrapper", f_cxx_wrapper);
Swig_register_filebyname("runtime", f_cxx); Swig_register_filebyname("runtime", f_runtime);
Swig_register_filebyname("lisp", f_clwrap); Swig_register_filebyname("lisp", f_clwrap);
Swig_register_filebyname("lisphead", f_cl); Swig_register_filebyname("lisphead", f_cl);
Printf(f_cl, ";; This is an automatically generated file. Make changes in\n" Swig_banner(f_runtime);
";; the definition file, not here.\n\n" Swig_banner_target_lang(f_cl, ";;");
Printf(f_cl, "\n"
"(defpackage :%s\n" "(defpackage :%s\n"
" (:use :common-lisp :ff :excl)\n" " (:use :common-lisp :ff :excl)\n"
" (:export #:*swig-identifier-converter* #:*swig-module-name*\n" " (:export #:*swig-identifier-converter* #:*swig-module-name*\n"
@ -1636,7 +1638,7 @@ int ALLEGROCL::top(Node *n) {
Language::top(n); Language::top(n);
// SwigType_emit_type_table(f_cxx,f_cxx_wrapper); // SwigType_emit_type_table(f_runtime,f_cxx_wrapper);
// Swig_print_tree(n); // Swig_print_tree(n);
#ifdef ALLEGROCL_TYPE_DEBUG #ifdef ALLEGROCL_TYPE_DEBUG
@ -1659,10 +1661,10 @@ int ALLEGROCL::top(Node *n) {
Delete(f_clhead); Delete(f_clhead);
Delete(f_clwrap); Delete(f_clwrap);
Printf(f_cxx, "%s\n", f_cxx_wrapper); Printf(f_runtime, "%s\n", f_cxx_wrapper);
Close(f_cxx); Close(f_runtime);
Delete(f_cxx); Delete(f_runtime);
Delete(f_cxx_wrapper); Delete(f_cxx_wrapper);
// Swig_print_tree(n); // Swig_print_tree(n);
@ -2803,8 +2805,8 @@ int ALLEGROCL::constantWrapper(Node *n) {
SwigType_add_qualifier(const_type, "static"); SwigType_add_qualifier(const_type, "static");
String *ppcname = NewStringf("ACLppc_%s", Getattr(n, "sym:name")); String *ppcname = NewStringf("ACLppc_%s", Getattr(n, "sym:name"));
// Printf(f_cxx, "static const %s = %s;\n", SwigType_lstr(const_type, ppcname), const_val); // Printf(f_runtime, "static const %s = %s;\n", SwigType_lstr(const_type, ppcname), const_val);
Printf(f_cxx, "%s = %s;\n", SwigType_lstr(const_type, ppcname), const_val); Printf(f_runtime, "%s = %s;\n", SwigType_lstr(const_type, ppcname), const_val);
Setattr(n, "name", ppcname); Setattr(n, "name", ppcname);
SetFlag(n, "feature:immutable"); SetFlag(n, "feature:immutable");
@ -2861,7 +2863,7 @@ int ALLEGROCL::globalvariableHandler(Node *n) {
ctype = SwigType_str(type, 0); ctype = SwigType_str(type, 0);
// EXPORT <SwigType_str> <mangled_name>; // EXPORT <SwigType_str> <mangled_name>;
// <SwigType_str> <mangled_name> = <name>; // <SwigType_str> <mangled_name> = <name>;
// Printf(f_cxx, "EXPORT %s %s;\n%s %s = %s%s;\n", ctype, mangled_name, // Printf(f_runtime, "EXPORT %s %s;\n%s %s = %s%s;\n", ctype, mangled_name,
// ctype, mangled_name, (pointer_added ? "&" : ""), name); // ctype, mangled_name, (pointer_added ? "&" : ""), name);
Printf(f_clwrap, "(swig-defvar \"%s\" \"%s\" :type %s)\n", Printf(f_clwrap, "(swig-defvar \"%s\" \"%s\" :type %s)\n",
@ -2900,12 +2902,12 @@ int ALLEGROCL::variableWrapper(Node *n) {
// EXPORT <SwigType_str> <mangled_name>; // EXPORT <SwigType_str> <mangled_name>;
// <SwigType_str> <mangled_name> = <name>; // <SwigType_str> <mangled_name> = <name>;
Printf(f_cxx, "EXPORT %s %s;\n%s %s = %s%s;\n", ctype, mangled_name, ctype, mangled_name, (pointer_added ? "&" : ""), name); Printf(f_runtime, "EXPORT %s %s;\n%s %s = %s%s;\n", ctype, mangled_name, ctype, mangled_name, (pointer_added ? "&" : ""), name);
Printf(f_cl, "(swig-defvar \"%s\" :type %s)\n", mangled_name, ((SwigType_isconst(type)) ? ":constant" : ":variable")); Printf(f_cl, "(swig-defvar \"%s\" :type %s)\n", mangled_name, ((SwigType_isconst(type)) ? ":constant" : ":variable"));
/* /*
Printf(f_cxx, "// swigtype: %s\n", SwigType_typedef_resolve_all(Getattr(n,"type"))); Printf(f_runtime, "// swigtype: %s\n", SwigType_typedef_resolve_all(Getattr(n,"type")));
Printf(f_cxx, "// vwrap: %s\n", compose_foreign_type(SwigType_strip_qualifiers(Copy(rtype)))); Printf(f_runtime, "// vwrap: %s\n", compose_foreign_type(SwigType_strip_qualifiers(Copy(rtype))));
*/ */
Printf(stderr,"***\n"); Printf(stderr,"***\n");

View file

@ -22,7 +22,7 @@ public:
String *f_clhead; String *f_clhead;
String *f_clwrap; String *f_clwrap;
bool CWrap; // generate wrapper file for C code? bool CWrap; // generate wrapper file for C code?
File *f_cxx; File *f_runtime;
File *f_cxx_header; File *f_cxx_header;
File *f_cxx_wrapper; File *f_cxx_wrapper;
File *f_clos; File *f_clos;
@ -126,8 +126,8 @@ int CFFI::top(Node *n) {
} }
if (CPlusPlus || CWrap) { if (CPlusPlus || CWrap) {
f_cxx = NewFile(cxx_filename, "w", SWIG_output_files()); f_runtime = NewFile(cxx_filename, "w", SWIG_output_files());
if (!f_cxx) { if (!f_runtime) {
Close(f_lisp); Close(f_lisp);
Delete(f_lisp); Delete(f_lisp);
Printf(stderr, "Unable to open %s for writing\n", cxx_filename); Printf(stderr, "Unable to open %s for writing\n", cxx_filename);
@ -144,22 +144,25 @@ int CFFI::top(Node *n) {
SWIG_exit(EXIT_FAILURE); SWIG_exit(EXIT_FAILURE);
} }
} else { } else {
f_cxx = NewString(""); f_runtime = NewString("");
f_clos = NewString(""); f_clos = NewString("");
} }
f_cxx_header = f_cxx; f_cxx_header = f_runtime;
f_cxx_wrapper = NewString(""); f_cxx_wrapper = NewString("");
Swig_register_filebyname("header", f_cxx_header); Swig_register_filebyname("header", f_cxx_header);
Swig_register_filebyname("wrapper", f_cxx_wrapper); Swig_register_filebyname("wrapper", f_cxx_wrapper);
Swig_register_filebyname("runtime", f_cxx); Swig_register_filebyname("runtime", f_runtime);
Swig_register_filebyname("lisphead", f_clhead); Swig_register_filebyname("lisphead", f_clhead);
if (!no_swig_lisp) if (!no_swig_lisp)
Swig_register_filebyname("swiglisp", f_cl); Swig_register_filebyname("swiglisp", f_cl);
else else
Swig_register_filebyname("swiglisp", f_null); Swig_register_filebyname("swiglisp", f_null);
Swig_banner(f_runtime);
Swig_banner_target_lang(f_lisp, ";;;");
Language::top(n); Language::top(n);
Printf(f_lisp, "%s\n", f_clhead); Printf(f_lisp, "%s\n", f_clhead);
Printf(f_lisp, "%s\n", f_cl); Printf(f_lisp, "%s\n", f_cl);
@ -170,8 +173,8 @@ int CFFI::top(Node *n) {
Delete(f_cl); Delete(f_cl);
Delete(f_clhead); Delete(f_clhead);
Delete(f_clwrap); Delete(f_clwrap);
Close(f_cxx); Close(f_runtime);
Delete(f_cxx); Delete(f_runtime);
Delete(f_cxx_wrapper); Delete(f_cxx_wrapper);
Delete(f_null); Delete(f_null);
@ -454,7 +457,7 @@ int CFFI::functionWrapper(Node *n) {
Printf(f->code, "}\n"); Printf(f->code, "}\n");
if (CPlusPlus) if (CPlusPlus)
Wrapper_print(f, f_cxx); Wrapper_print(f, f_runtime);
if (CPlusPlus) { if (CPlusPlus) {
emit_defun(n, wname); emit_defun(n, wname);

View file

@ -215,7 +215,6 @@ int CHICKEN::top(Node *n) {
clos_methods = NewString(""); clos_methods = NewString("");
scm_const_defs = NewString(""); scm_const_defs = NewString("");
Printf(f_runtime, "/* -*- buffer-read-only: t -*- vi: set ro: */\n");
Swig_banner(f_runtime); Swig_banner(f_runtime);
Printf(f_runtime, "/* Implementation : CHICKEN */\n\n"); Printf(f_runtime, "/* Implementation : CHICKEN */\n\n");
@ -256,9 +255,9 @@ int CHICKEN::top(Node *n) {
SWIG_exit(EXIT_FAILURE); SWIG_exit(EXIT_FAILURE);
} }
Printv(f_scm, Swig_banner_target_lang(f_scm, ";;");
";; -*- buffer-read-only: t -*- vi: set ro:\n", Printf(f_scm, "\n");
";; This file was created automatically by SWIG.\n", ";; Don't modify this file, modify the SWIG interface instead.\n", NIL);
if (declare_unit) if (declare_unit)
Printv(f_scm, "(declare (unit ", scmmodule, "))\n\n", NIL); Printv(f_scm, "(declare (unit ", scmmodule, "))\n\n", NIL);
Printv(f_scm, "(declare \n", Printv(f_scm, "(declare \n",

View file

@ -89,10 +89,11 @@ int CLISP::top(Node *n) {
Swig_register_filebyname("runtime", f_null); Swig_register_filebyname("runtime", f_null);
Swig_register_filebyname("wrapper", f_null); Swig_register_filebyname("wrapper", f_null);
String *header = String *header = NewString("");
NewStringf
(";; This is an automatically generated file. \n;;Make changes as you feel are necessary (but remember if you try to regenerate this file, your changes will be lost). \n\n(defpackage :%s\n (:use :common-lisp :ffi)", Swig_banner_target_lang(header, ";;");
module);
Printf(header, "\n(defpackage :%s\n (:use :common-lisp :ffi)", module);
Language::top(n); Language::top(n);

View file

@ -601,11 +601,7 @@ public:
void emitBanner(File *f) { void emitBanner(File *f) {
Printf(f, "/* ----------------------------------------------------------------------------\n"); Printf(f, "/* ----------------------------------------------------------------------------\n");
Printf(f, " * This file was automatically generated by SWIG (http://www.swig.org).\n"); Swig_banner_target_lang(f, " *");
Printf(f, " * Version %s\n", Swig_package_version());
Printf(f, " *\n");
Printf(f, " * Do not make changes to this file unless you know what you are doing--modify\n");
Printf(f, " * the SWIG interface file instead.\n");
Printf(f, " * ----------------------------------------------------------------------------- */\n\n"); Printf(f, " * ----------------------------------------------------------------------------- */\n\n");
} }

View file

@ -322,7 +322,6 @@ public:
goopscode = NewString(""); goopscode = NewString("");
goopsexport = NewString(""); goopsexport = NewString("");
Printf(f_runtime, "/* -*- buffer-read-only: t -*- vi: set ro: */\n");
Swig_banner(f_runtime); Swig_banner(f_runtime);
Printf(f_runtime, "/* Implementation : GUILE */\n\n"); Printf(f_runtime, "/* Implementation : GUILE */\n\n");
@ -506,8 +505,8 @@ public:
} }
Delete(fname); Delete(fname);
Printf(scmstubfile, ";;; -*- buffer-read-only: t -*- vi: set ro: */\n"); Swig_banner_target_lang(scmstubfile, ";;;");
Printf(scmstubfile, ";;; Automatically generated by SWIG; do not edit.\n\n"); Printf(scmstubfile, "\n");
if (linkage == GUILE_LSTYLE_SIMPLE || linkage == GUILE_LSTYLE_PASSIVE) if (linkage == GUILE_LSTYLE_SIMPLE || linkage == GUILE_LSTYLE_PASSIVE)
Printf(scmstubfile, "(define-module (%s))\n\n", mod); Printf(scmstubfile, "(define-module (%s))\n\n", mod);
Delete(mod); Delete(mod);
@ -536,8 +535,8 @@ public:
SWIG_exit(EXIT_FAILURE); SWIG_exit(EXIT_FAILURE);
} }
Delete(fname); Delete(fname);
Printf(goopsfile, ";;; -*- buffer-read-only: t -*- vi: set ro: */\n"); Swig_banner_target_lang(goopsfile, ";;;");
Printf(goopsfile, ";;; Automatically generated by SWIG; do not edit.\n\n"); Printf(goopsfile, "\n");
Printf(goopsfile, "(define-module (%s))\n", mod); Printf(goopsfile, "(define-module (%s))\n", mod);
Printf(goopsfile, "%s\n", goopstext); Printf(goopsfile, "%s\n", goopstext);
Printf(goopsfile, "(use-modules (oop goops) (Swig common))\n"); Printf(goopsfile, "(use-modules (oop goops) (Swig common))\n");

View file

@ -673,11 +673,7 @@ public:
void emitBanner(File *f) { void emitBanner(File *f) {
Printf(f, "/* ----------------------------------------------------------------------------\n"); Printf(f, "/* ----------------------------------------------------------------------------\n");
Printf(f, " * This file was automatically generated by SWIG (http://www.swig.org).\n"); Swig_banner_target_lang(f, " *");
Printf(f, " * Version %s\n", Swig_package_version());
Printf(f, " *\n");
Printf(f, " * Do not make changes to this file unless you know what you are doing--modify\n");
Printf(f, " * the SWIG interface file instead.\n");
Printf(f, " * ----------------------------------------------------------------------------- */\n\n"); Printf(f, " * ----------------------------------------------------------------------------- */\n\n");
} }

View file

@ -1159,14 +1159,9 @@ MODULA3():
* ----------------------------------------------------------------------------- */ * ----------------------------------------------------------------------------- */
void emitBanner(File *f) { void emitBanner(File *f) {
Printf(f, "\ Printf(f, "(*******************************************************************************\n");
(*******************************************************************************\n\ Swig_banner_target_lang(f, " *");
* This file was automatically generated by SWIG (http://www.swig.org/).\n\ Printf(f, "*******************************************************************************)\n\n");
* Version %s\n\
*\n\
* Do not make changes to this file unless you know what you are doing --\n\
* modify the SWIG interface file instead.\n\
*******************************************************************************)\n\n", Swig_package_version());
} }
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------

View file

@ -146,7 +146,6 @@ public:
init_func_def = NewString(""); init_func_def = NewString("");
Swig_register_filebyname("init", init_func_def); Swig_register_filebyname("init", init_func_def);
Printf(f_runtime, "/* -*- buffer-read-only: t -*- vi: set ro: */\n");
Swig_banner(f_runtime); Swig_banner(f_runtime);
module = Getattr(n, "name"); module = Getattr(n, "name");

View file

@ -262,7 +262,8 @@ public:
Swig_name_register("get", "%v__get__"); Swig_name_register("get", "%v__get__");
} }
Printf(f_runtime, "/* -*- buffer-read-only: t -*- vi: set ro: */\n"); Swig_banner(f_runtime);
Printf(f_runtime, "#define SWIG_MODULE \"%s\"\n", module); Printf(f_runtime, "#define SWIG_MODULE \"%s\"\n", module);
/* Module name */ /* Module name */
Printf(f_mlbody, "let module_name = \"%s\"\n", module); Printf(f_mlbody, "let module_name = \"%s\"\n", module);
@ -276,8 +277,6 @@ public:
Printf(f_int_to_enum, "let int_to_enum x y =\n" " match (x : c_enum_type) with\n" " `unknown -> C_enum (`Int y)\n"); Printf(f_int_to_enum, "let int_to_enum x y =\n" " match (x : c_enum_type) with\n" " `unknown -> C_enum (`Int y)\n");
Swig_banner(f_runtime);
if (directorsEnabled()) { if (directorsEnabled()) {
Printf(f_runtime, "#define SWIG_DIRECTORS\n"); Printf(f_runtime, "#define SWIG_DIRECTORS\n");
} }

View file

@ -108,7 +108,9 @@ public:
Swig_register_filebyname("initbeforefunc", f_initbeforefunc); Swig_register_filebyname("initbeforefunc", f_initbeforefunc);
Swig_register_filebyname("director", f_directors); Swig_register_filebyname("director", f_directors);
Swig_register_filebyname("director_h", f_directors_h); Swig_register_filebyname("director_h", f_directors_h);
Swig_banner(f_runtime); Swig_banner(f_runtime);
Printf(f_runtime, "#define SWIG_name_d \"%s\"\n", module); Printf(f_runtime, "#define SWIG_name_d \"%s\"\n", module);
Printf(f_runtime, "#define SWIG_name %s\n", module); Printf(f_runtime, "#define SWIG_name %s\n", module);

View file

@ -332,10 +332,7 @@ public:
Delete(boot_name); Delete(boot_name);
} }
Printf(f_pm, "# This file was automatically generated by SWIG (http://www.swig.org).\n"); Swig_banner_target_lang(f_pm, "#");
Printf(f_pm, "# Version %s\n", Swig_package_version());
Printf(f_pm, "#\n");
Printf(f_pm, "# Don't modify this file, modify the SWIG interface instead.\n");
Printf(f_pm, "\n"); Printf(f_pm, "\n");
Printf(f_pm, "package %s;\n", module); Printf(f_pm, "package %s;\n", module);

View file

@ -676,10 +676,7 @@ public:
Swig_register_filebyname("shadow", f_shadow); Swig_register_filebyname("shadow", f_shadow);
Swig_register_filebyname("python", f_shadow); Swig_register_filebyname("python", f_shadow);
Printf(f_shadow, "# This file was automatically generated by SWIG (http://www.swig.org).\n"); Swig_banner_target_lang(f_shadow, "#");
Printf(f_shadow, "# Version %s\n", Swig_package_version());
Printf(f_shadow, "#\n");
Printf(f_shadow, "# Don't modify this file, modify the SWIG interface instead.\n");
if (!modern) { if (!modern) {
Printv(f_shadow, "# This file is compatible with both classic and new-style classes.\n", NIL); Printv(f_shadow, "# This file is compatible with both classic and new-style classes.\n", NIL);

View file

@ -819,8 +819,7 @@ int R::top(Node *n) {
Swig_register_filebyname("sclasses", s_classes); Swig_register_filebyname("sclasses", s_classes);
Swig_banner_target_lang(s_init, "#");
Printf(s_init, "# This is an automatically generated file by the R module for SWIG.\n\n");
outputCommandLineArguments(s_init); outputCommandLineArguments(s_init);
Printf(f_wrapper, "#ifdef __cplusplus\n"); Printf(f_wrapper, "#ifdef __cplusplus\n");
@ -2659,7 +2658,7 @@ int R::outputCommandLineArguments(File *out)
if(Argc < 1 || !Argv || !Argv[0]) if(Argc < 1 || !Argv || !Argv[0])
return(-1); return(-1);
Printf(out, "## Generated via the command line invocation:\n##\t"); Printf(out, "\n## Generated via the command line invocation:\n##\t");
for(int i = 0; i < Argc ; i++) { for(int i = 0; i < Argc ; i++) {
Printf(out, " %s", Argv[i]); Printf(out, " %s", Argv[i]);
} }

View file

@ -71,7 +71,10 @@ public:
Swig_register_filebyname("runtime", f_sink); Swig_register_filebyname("runtime", f_sink);
Swig_register_filebyname("init", f_sink); Swig_register_filebyname("init", f_sink);
Swig_banner_target_lang(out, ";;;");
Language::top(n); Language::top(n);
Printf(out, "\n");
Printf(out, ";;; Lisp parse tree produced by SWIG\n"); Printf(out, ";;; Lisp parse tree produced by SWIG\n");
print_circle_hash = DohNewHash(); print_circle_hash = DohNewHash();
print_circle_count = 0; print_circle_count = 0;

View file

@ -186,10 +186,7 @@ public:
Swig_register_filebyname("shadow", f_shadow); Swig_register_filebyname("shadow", f_shadow);
Swig_register_filebyname("itcl", f_shadow); Swig_register_filebyname("itcl", f_shadow);
Printf(f_shadow, "# This file was automatically generated by SWIG (http://www.swig.org).\n"); Swig_banner_target_lang(f_shadow, "#");
Printf(f_shadow, "# Version %s\n", Swig_package_version());
Printf(f_shadow, "#\n");
Printf(f_shadow, "# Don't modify this file, modify the SWIG interface instead.\n");
Printv(f_shadow, "\npackage require Itcl\n\n", NIL); Printv(f_shadow, "\npackage require Itcl\n\n", NIL);
Delete(filen); Delete(filen);

View file

@ -239,8 +239,10 @@ int UFFI::top(Node *n) {
Swig_register_filebyname("runtime", f_null); Swig_register_filebyname("runtime", f_null);
Swig_register_filebyname("wrapper", f_cl); Swig_register_filebyname("wrapper", f_cl);
Printf(f_cl, Swig_banner_target_lang(f_cl, ";;");
";; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10; package: %s -*-\n;; This is an automatically generated file. Make changes in\n;; the definition file, not here.\n\n(defpackage :%s\n (:use :common-lisp :uffi))\n\n(in-package :%s)\n",
Printf(f_cl, "\n"
";; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10; package: %s -*-\n\n(defpackage :%s\n (:use :common-lisp :uffi))\n\n(in-package :%s)\n",
module, module, module); module, module, module);
Printf(f_cl, "(eval-when (compile load eval)\n (defparameter *swig-identifier-converter* '%s))\n", identifier_converter); Printf(f_cl, "(eval-when (compile load eval)\n (defparameter *swig-identifier-converter* '%s))\n", identifier_converter);

View file

@ -54,7 +54,7 @@ const char *Swig_package_version(void) {
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* Swig_banner() * Swig_banner()
* *
* Emits the SWIG identifying banner. * Emits the SWIG identifying banner for the C/C++ wrapper file.
* ----------------------------------------------------------------------------- */ * ----------------------------------------------------------------------------- */
void Swig_banner(File *f) { void Swig_banner(File *f) {
@ -71,6 +71,20 @@ void Swig_banner(File *f) {
} }
/* -----------------------------------------------------------------------------
* Swig_banner_target_lang()
*
* Emits a SWIG identifying banner in the target language
* ----------------------------------------------------------------------------- */
void Swig_banner_target_lang(File *f, const String_or_char *commentchar) {
Printf(f, "%s This file was automatically generated by SWIG (http://www.swig.org).\n", commentchar);
Printf(f, "%s Version %s\n", commentchar, Swig_package_version());
Printf(f, "%s\n", commentchar);
Printf(f, "%s Do not make changes to this file unless you know what you are doing--modify\n", commentchar);
Printf(f, "%s the SWIG interface file instead.\n", commentchar);
}
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* Swig_strip_c_comments() * Swig_strip_c_comments()
* *
@ -124,6 +138,7 @@ String *Swig_strip_c_comments(const String *s) {
* ----------------------------------------------------------------------------- */ * ----------------------------------------------------------------------------- */
void Swig_filename_correct(String *filename) { void Swig_filename_correct(String *filename) {
(void)filename;
#if defined(_WIN32) || defined(MACSWIG) #if defined(_WIN32) || defined(MACSWIG)
/* accept Unix path separator on non-Unix systems */ /* accept Unix path separator on non-Unix systems */
Replaceall(filename, "/", SWIG_FILE_DELIMITER); Replaceall(filename, "/", SWIG_FILE_DELIMITER);

View file

@ -285,6 +285,7 @@ extern int ParmList_is_compactdefargs(ParmList *p);
extern void Swig_set_fakeversion(const char *version); extern void Swig_set_fakeversion(const char *version);
extern const char *Swig_package_version(void); extern const char *Swig_package_version(void);
extern void Swig_banner(File *f); extern void Swig_banner(File *f);
extern void Swig_banner_target_lang(File *f, const String_or_char *commentchar);
extern String *Swig_strip_c_comments(const String *s); extern String *Swig_strip_c_comments(const String *s);
extern String *Swig_filename_escape(String *filename); extern String *Swig_filename_escape(String *filename);
extern void Swig_filename_correct(String *filename); extern void Swig_filename_correct(String *filename);