-fakeversion appears in generated files. Made comment with version number at top of generated files consistent.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9563 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
0aa1bb55f8
commit
331dd53a61
10 changed files with 50 additions and 34 deletions
|
|
@ -177,8 +177,8 @@ void exit_handler(FILE *f) {
|
||||||
static void display(FILE *f, Node *n) {
|
static void display(FILE *f, Node *n) {
|
||||||
/* Print standard HTML header */
|
/* Print standard HTML header */
|
||||||
|
|
||||||
Printf(f, "<HTML><HEAD><TITLE>SWIG-%s</TITLE></HEAD><BODY BGCOLOR=\"#ffffff\">\n", PACKAGE_VERSION);
|
Printf(f, "<HTML><HEAD><TITLE>SWIG-%s</TITLE></HEAD><BODY BGCOLOR=\"#ffffff\">\n", Swig_package_version());
|
||||||
Printf(f, "<b>SWIG-%s</b><br>\n", PACKAGE_VERSION);
|
Printf(f, "<b>SWIG-%s</b><br>\n", Swig_package_version());
|
||||||
Printf(f, "[ <a href=\"exit.html\">Exit</a> ]");
|
Printf(f, "[ <a href=\"exit.html\">Exit</a> ]");
|
||||||
Printf(f, " [ <a href=\"index.html?node=0x%x\">Top</a> ]", tree_top);
|
Printf(f, " [ <a href=\"index.html?node=0x%x\">Top</a> ]", tree_top);
|
||||||
if (n != tree_top) {
|
if (n != tree_top) {
|
||||||
|
|
@ -296,8 +296,8 @@ void data_handler(FILE *f) {
|
||||||
if (!swill_getargs("p(n)", &n)) {
|
if (!swill_getargs("p(n)", &n)) {
|
||||||
n = 0;
|
n = 0;
|
||||||
}
|
}
|
||||||
Printf(f, "<HTML><HEAD><TITLE>SWIG-%s</TITLE></HEAD><BODY BGCOLOR=\"#ffffff\">\n", PACKAGE_VERSION);
|
Printf(f, "<HTML><HEAD><TITLE>SWIG-%s</TITLE></HEAD><BODY BGCOLOR=\"#ffffff\">\n", Swig_package_version());
|
||||||
Printf(f, "<b>SWIG-%s</b><br>\n", PACKAGE_VERSION);
|
Printf(f, "<b>SWIG-%s</b><br>\n", Swig_package_version());
|
||||||
Printf(f, "[ <a href=\"exit.html\">Exit</a> ]");
|
Printf(f, "[ <a href=\"exit.html\">Exit</a> ]");
|
||||||
Printf(f, " [ <a href=\"index.html?node=0x%x\">Top</a> ]", tree_top);
|
Printf(f, " [ <a href=\"index.html?node=0x%x\">Top</a> ]", tree_top);
|
||||||
Printf(f, "<br><hr><p>\n");
|
Printf(f, "<br><hr><p>\n");
|
||||||
|
|
@ -312,8 +312,8 @@ void symbol_handler(FILE *f) {
|
||||||
Symtab *sym;
|
Symtab *sym;
|
||||||
char *name = 0;
|
char *name = 0;
|
||||||
|
|
||||||
Printf(f, "<HTML><HEAD><TITLE>SWIG-%s</TITLE></HEAD><BODY BGCOLOR=\"#ffffff\">\n", PACKAGE_VERSION);
|
Printf(f, "<HTML><HEAD><TITLE>SWIG-%s</TITLE></HEAD><BODY BGCOLOR=\"#ffffff\">\n", Swig_package_version());
|
||||||
Printf(f, "<b>SWIG-%s</b><br>\n", PACKAGE_VERSION);
|
Printf(f, "<b>SWIG-%s</b><br>\n", Swig_package_version());
|
||||||
Printf(f, "[ <a href=\"exit.html\">Exit</a> ]");
|
Printf(f, "[ <a href=\"exit.html\">Exit</a> ]");
|
||||||
Printf(f, " [ <a href=\"index.html?node=0x%x\">Top</a> ]", tree_top);
|
Printf(f, " [ <a href=\"index.html?node=0x%x\">Top</a> ]", tree_top);
|
||||||
Printf(f, " [ <a href=\"symbol.html\">Symbols</a> ]");
|
Printf(f, " [ <a href=\"symbol.html\">Symbols</a> ]");
|
||||||
|
|
|
||||||
|
|
@ -590,7 +590,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");
|
Printf(f, " * This file was automatically generated by SWIG (http://www.swig.org).\n");
|
||||||
Printf(f, " * Version %s\n", PACKAGE_VERSION);
|
Printf(f, " * Version %s\n", Swig_package_version());
|
||||||
Printf(f, " *\n");
|
Printf(f, " *\n");
|
||||||
Printf(f, " * Do not make changes to this file unless you know what you are doing--modify\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, " * the SWIG interface file instead.\n");
|
||||||
|
|
|
||||||
|
|
@ -655,7 +655,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");
|
Printf(f, " * This file was automatically generated by SWIG (http://www.swig.org).\n");
|
||||||
Printf(f, " * Version %s\n", PACKAGE_VERSION);
|
Printf(f, " * Version %s\n", Swig_package_version());
|
||||||
Printf(f, " *\n");
|
Printf(f, " *\n");
|
||||||
Printf(f, " * Do not make changes to this file unless you know what you are doing--modify\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, " * the SWIG interface file instead.\n");
|
||||||
|
|
|
||||||
|
|
@ -166,13 +166,6 @@ static String *dependencies_file = 0;
|
||||||
static File *f_dependencies_file = 0;
|
static File *f_dependencies_file = 0;
|
||||||
static int external_runtime = 0;
|
static int external_runtime = 0;
|
||||||
static String *external_runtime_name = 0;
|
static String *external_runtime_name = 0;
|
||||||
static char *fake_version = 0;
|
|
||||||
|
|
||||||
static const char *swig_package_version() {
|
|
||||||
return fake_version ? fake_version : PACKAGE_VERSION;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// check_suffix(char *name)
|
// check_suffix(char *name)
|
||||||
|
|
@ -249,14 +242,7 @@ static void set_outdir(const String *c_wrapper_file_dir) {
|
||||||
outdir = NewString(c_wrapper_file_dir);
|
outdir = NewString(c_wrapper_file_dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------
|
|
||||||
// main()
|
|
||||||
//
|
|
||||||
// Main program. Initializes the files and starts the parser.
|
|
||||||
//-----------------------------------------------------------------
|
|
||||||
|
|
||||||
/* This function sets the name of the configuration file */
|
/* This function sets the name of the configuration file */
|
||||||
|
|
||||||
void SWIG_config_file(const String_or_char *filename) {
|
void SWIG_config_file(const String_or_char *filename) {
|
||||||
lang_config = NewString(filename);
|
lang_config = NewString(filename);
|
||||||
}
|
}
|
||||||
|
|
@ -554,19 +540,19 @@ void SWIG_getoptions(int argc, char *argv[]) {
|
||||||
} else if (strcmp(argv[i], "-fakeversion") == 0) {
|
} else if (strcmp(argv[i], "-fakeversion") == 0) {
|
||||||
Swig_mark_arg(i);
|
Swig_mark_arg(i);
|
||||||
if (argv[i + 1]) {
|
if (argv[i + 1]) {
|
||||||
fake_version = Swig_copy_string(argv[i + 1]);
|
Swig_set_fakeversion(argv[i + 1]);
|
||||||
Swig_mark_arg(i + 1);
|
Swig_mark_arg(i + 1);
|
||||||
i++;
|
i++;
|
||||||
} else {
|
} else {
|
||||||
Swig_arg_error();
|
Swig_arg_error();
|
||||||
}
|
}
|
||||||
} else if (strcmp(argv[i], "-version") == 0) {
|
} else if (strcmp(argv[i], "-version") == 0) {
|
||||||
fprintf(stdout, "\nSWIG Version %s\n", swig_package_version());
|
fprintf(stdout, "\nSWIG Version %s\n", Swig_package_version());
|
||||||
fprintf(stdout, "\nCompiled with %s [%s]\n", SWIG_CXX, SWIG_PLATFORM);
|
fprintf(stdout, "\nCompiled with %s [%s]\n", SWIG_CXX, SWIG_PLATFORM);
|
||||||
fprintf(stdout, "Please see %s for reporting bugs and further information\n", PACKAGE_BUGREPORT);
|
fprintf(stdout, "Please see %s for reporting bugs and further information\n", PACKAGE_BUGREPORT);
|
||||||
SWIG_exit(EXIT_SUCCESS);
|
SWIG_exit(EXIT_SUCCESS);
|
||||||
} else if (strcmp(argv[i], "-copyright") == 0) {
|
} else if (strcmp(argv[i], "-copyright") == 0) {
|
||||||
fprintf(stdout, "\nSWIG Version %s\n", swig_package_version());
|
fprintf(stdout, "\nSWIG Version %s\n", Swig_package_version());
|
||||||
fprintf(stdout, "Copyright (c) 1995-1998\n");
|
fprintf(stdout, "Copyright (c) 1995-1998\n");
|
||||||
fprintf(stdout, "University of Utah and the Regents of the University of California\n");
|
fprintf(stdout, "University of Utah and the Regents of the University of California\n");
|
||||||
fprintf(stdout, "Copyright (c) 1998-2005\n");
|
fprintf(stdout, "Copyright (c) 1998-2005\n");
|
||||||
|
|
@ -763,7 +749,7 @@ int SWIG_main(int argc, char *argv[], Language *l) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Set the SWIG version value in format 0xAABBCC from package version expected to be in format A.B.C
|
// Set the SWIG version value in format 0xAABBCC from package version expected to be in format A.B.C
|
||||||
String *package_version = NewString(swig_package_version());
|
String *package_version = NewString(PACKAGE_VERSION); /* Note that the fakeversion has not been set at this point */
|
||||||
char *token = strtok(Char(package_version), ".");
|
char *token = strtok(Char(package_version), ".");
|
||||||
String *vers = NewString("SWIG_VERSION 0x");
|
String *vers = NewString("SWIG_VERSION 0x");
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
|
||||||
|
|
@ -1171,7 +1171,7 @@ MODULA3():
|
||||||
*\n\
|
*\n\
|
||||||
* Do not make changes to this file unless you know what you are doing --\n\
|
* Do not make changes to this file unless you know what you are doing --\n\
|
||||||
* modify the SWIG interface file instead.\n\
|
* modify the SWIG interface file instead.\n\
|
||||||
*******************************************************************************)\n\n", PACKAGE_VERSION);
|
*******************************************************************************)\n\n", Swig_package_version());
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -285,8 +285,11 @@ public:
|
||||||
Delete(tmp);
|
Delete(tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
Printv(f_pm,
|
Printf(f_pm, "# This file was automatically generated by SWIG (http://www.swig.org).\n");
|
||||||
"# This file was created automatically by SWIG ", PACKAGE_VERSION, ".\n", "# Don't modify this file, modify the SWIG interface instead.\n", NIL);
|
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, "package %s;\n", fullmodule);
|
Printf(f_pm, "package %s;\n", fullmodule);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -674,8 +674,10 @@ 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);
|
||||||
|
|
||||||
Printv(f_shadow,
|
Printf(f_shadow, "# This file was automatically generated by SWIG (http://www.swig.org).\n");
|
||||||
"# This file was created automatically by SWIG ", PACKAGE_VERSION, ".\n", "# Don't modify this file, modify the SWIG interface instead.\n", NIL);
|
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);
|
||||||
|
|
|
||||||
|
|
@ -186,8 +186,10 @@ 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);
|
||||||
|
|
||||||
Printv(f_shadow,
|
Printf(f_shadow, "# This file was automatically generated by SWIG (http://www.swig.org).\n");
|
||||||
"# This file was created automatically by SWIG ", PACKAGE_VERSION, ".\n", "# Don't modify this file, modify the SWIG interface instead.\n", NIL);
|
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);
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ char cvsroot_misc_c[] = "$Header$";
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
|
static char *fake_version = 0;
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------------
|
/* -----------------------------------------------------------------------------
|
||||||
* Swig_copy_string()
|
* Swig_copy_string()
|
||||||
|
|
@ -31,6 +32,26 @@ char *Swig_copy_string(const char *s) {
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -----------------------------------------------------------------------------
|
||||||
|
* Swig_set_fakeversion()
|
||||||
|
*
|
||||||
|
* Version string override
|
||||||
|
* ----------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void Swig_set_fakeversion(const char *version) {
|
||||||
|
fake_version = Swig_copy_string(version);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -----------------------------------------------------------------------------
|
||||||
|
* Swig_package_version()
|
||||||
|
*
|
||||||
|
* Return the package string containing the version number
|
||||||
|
* ----------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
const char *Swig_package_version(void) {
|
||||||
|
return fake_version ? fake_version : PACKAGE_VERSION;
|
||||||
|
}
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------------
|
/* -----------------------------------------------------------------------------
|
||||||
* Swig_banner()
|
* Swig_banner()
|
||||||
*
|
*
|
||||||
|
|
@ -45,7 +66,7 @@ void Swig_banner(File *f) {
|
||||||
* This file is not intended to be easily readable and contains a number of \n\
|
* This file is not intended to be easily readable and contains a number of \n\
|
||||||
* coding conventions designed to improve portability and efficiency. Do not make\n\
|
* coding conventions designed to improve portability and efficiency. Do not make\n\
|
||||||
* changes to this file unless you know what you are doing--modify the SWIG \n\
|
* changes to this file unless you know what you are doing--modify the SWIG \n\
|
||||||
* interface file instead. \n", PACKAGE_VERSION);
|
* interface file instead. \n", Swig_package_version());
|
||||||
/* String too long for ISO compliance */
|
/* String too long for ISO compliance */
|
||||||
Printf(f, " * ----------------------------------------------------------------------------- */\n\n");
|
Printf(f, " * ----------------------------------------------------------------------------- */\n\n");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -441,6 +441,8 @@ extern "C" {
|
||||||
|
|
||||||
/* --- Misc --- */
|
/* --- Misc --- */
|
||||||
extern char *Swig_copy_string(const char *c);
|
extern char *Swig_copy_string(const char *c);
|
||||||
|
extern void Swig_set_fakeversion(const char *version);
|
||||||
|
extern const char *Swig_package_version(void);
|
||||||
extern void Swig_banner(File *f);
|
extern void Swig_banner(File *f);
|
||||||
extern String *Swig_string_escape(String *s);
|
extern String *Swig_string_escape(String *s);
|
||||||
extern String *Swig_string_mangle(const String *s);
|
extern String *Swig_string_mangle(const String *s);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue