-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:
William S Fulton 2006-11-15 23:45:47 +00:00
commit 331dd53a61
10 changed files with 50 additions and 34 deletions

View file

@ -177,8 +177,8 @@ void exit_handler(FILE *f) {
static void display(FILE *f, Node *n) {
/* Print standard HTML header */
Printf(f, "<HTML><HEAD><TITLE>SWIG-%s</TITLE></HEAD><BODY BGCOLOR=\"#ffffff\">\n", PACKAGE_VERSION);
Printf(f, "<b>SWIG-%s</b><br>\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", Swig_package_version());
Printf(f, "[ <a href=\"exit.html\">Exit</a> ]");
Printf(f, " [ <a href=\"index.html?node=0x%x\">Top</a> ]", tree_top);
if (n != tree_top) {
@ -296,8 +296,8 @@ void data_handler(FILE *f) {
if (!swill_getargs("p(n)", &n)) {
n = 0;
}
Printf(f, "<HTML><HEAD><TITLE>SWIG-%s</TITLE></HEAD><BODY BGCOLOR=\"#ffffff\">\n", PACKAGE_VERSION);
Printf(f, "<b>SWIG-%s</b><br>\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", Swig_package_version());
Printf(f, "[ <a href=\"exit.html\">Exit</a> ]");
Printf(f, " [ <a href=\"index.html?node=0x%x\">Top</a> ]", tree_top);
Printf(f, "<br><hr><p>\n");
@ -312,8 +312,8 @@ void symbol_handler(FILE *f) {
Symtab *sym;
char *name = 0;
Printf(f, "<HTML><HEAD><TITLE>SWIG-%s</TITLE></HEAD><BODY BGCOLOR=\"#ffffff\">\n", PACKAGE_VERSION);
Printf(f, "<b>SWIG-%s</b><br>\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", Swig_package_version());
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=\"symbol.html\">Symbols</a> ]");

View file

@ -590,7 +590,7 @@ public:
void emitBanner(File *f) {
Printf(f, "/* ----------------------------------------------------------------------------\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, " * Do not make changes to this file unless you know what you are doing--modify\n");
Printf(f, " * the SWIG interface file instead.\n");

View file

@ -655,7 +655,7 @@ public:
void emitBanner(File *f) {
Printf(f, "/* ----------------------------------------------------------------------------\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, " * Do not make changes to this file unless you know what you are doing--modify\n");
Printf(f, " * the SWIG interface file instead.\n");

View file

@ -166,13 +166,6 @@ static String *dependencies_file = 0;
static File *f_dependencies_file = 0;
static int external_runtime = 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)
@ -249,14 +242,7 @@ static void set_outdir(const String *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 */
void SWIG_config_file(const String_or_char *filename) {
lang_config = NewString(filename);
}
@ -554,19 +540,19 @@ void SWIG_getoptions(int argc, char *argv[]) {
} else if (strcmp(argv[i], "-fakeversion") == 0) {
Swig_mark_arg(i);
if (argv[i + 1]) {
fake_version = Swig_copy_string(argv[i + 1]);
Swig_set_fakeversion(argv[i + 1]);
Swig_mark_arg(i + 1);
i++;
} else {
Swig_arg_error();
}
} 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, "Please see %s for reporting bugs and further information\n", PACKAGE_BUGREPORT);
SWIG_exit(EXIT_SUCCESS);
} 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, "University of Utah and the Regents of the University of California\n");
fprintf(stdout, "Copyright (c) 1998-2005\n");
@ -763,7 +749,7 @@ int SWIG_main(int argc, char *argv[], Language *l) {
#endif
// 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), ".");
String *vers = NewString("SWIG_VERSION 0x");
int count = 0;

View file

@ -1171,7 +1171,7 @@ MODULA3():
*\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", PACKAGE_VERSION);
*******************************************************************************)\n\n", Swig_package_version());
}
/* ----------------------------------------------------------------------

View file

@ -285,8 +285,11 @@ public:
Delete(tmp);
}
Printv(f_pm,
"# 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, "# This file was automatically generated by SWIG (http://www.swig.org).\n");
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);

View file

@ -674,8 +674,10 @@ public:
Swig_register_filebyname("shadow", f_shadow);
Swig_register_filebyname("python", f_shadow);
Printv(f_shadow,
"# 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, "# This file was automatically generated by SWIG (http://www.swig.org).\n");
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) {
Printv(f_shadow, "# This file is compatible with both classic and new-style classes.\n", NIL);

View file

@ -186,8 +186,10 @@ public:
Swig_register_filebyname("shadow", f_shadow);
Swig_register_filebyname("itcl", f_shadow);
Printv(f_shadow,
"# 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, "# This file was automatically generated by SWIG (http://www.swig.org).\n");
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);
Delete(filen);