1.1 --- a/sourcehook/generate/generate Sun May 14 18:29:35 2006 +0000
1.2 +++ b/sourcehook/generate/generate Sun May 14 19:07:01 2006 +0000
1.3 @@ -1,7 +1,7 @@
1.4 #/bin/sh
1.5
1.6 -./shworker.bin iter $1 sourcehook.hxx sourcehook.h
1.7 -./shworker.bin iter $1 sh_memfuncinfo.hxx sh_memfuncinfo.h
1.8 -./shworker.bin hopter $1 FastDelegate.hxx FastDelegate.h
1.9 +./shworker.bin iter sourcehook.hxx sourcehook.h $1
1.10 +./shworker.bin iter sh_memfuncinfo.hxx sh_memfuncinfo.h $1
1.11 +./shworker.bin hopter FastDelegate.hxx FastDelegate.h $1
1.12
1.13 cp *.h ..
2.1 Binary file sourcehook/generate/shworker.bin has changed
3.1 --- a/sourcehook/generate/shworker/Makefile Sun May 14 18:29:35 2006 +0000
3.2 +++ b/sourcehook/generate/shworker/Makefile Sun May 14 19:07:01 2006 +0000
3.3 @@ -4,10 +4,10 @@
3.4 mkdir bin
3.5
3.6 fd_hopter.o: fd_hopter.cpp bin
3.7 - gcc -fPIC -o bin/$@ -c $<
3.8 + gcc -fPIC -O2 -o bin/$@ -c $<
3.9
3.10 main.o: shworker.cpp bin
3.11 - gcc -fPIC -o bin/$@ -c $<
3.12 + gcc -fPIC -O2 -o bin/$@ -c $<
3.13
3.14 shworker: fd_hopter.o main.o bin
3.15 gcc -ldl -lstdc++ bin/fd_hopter.o bin/main.o -o bin/shworker.bin
4.1 --- a/sourcehook/generate/shworker/shworker.cpp Sun May 14 18:29:35 2006 +0000
4.2 +++ b/sourcehook/generate/shworker/shworker.cpp Sun May 14 19:07:01 2006 +0000
4.3 @@ -444,14 +444,14 @@
4.4 for (int i = 0; i < argc; ++i)
4.5 {
4.6 varname[1] = 'a' + i;
4.7 - itoa(argv[i], value, 10);
4.8 + sprintf(value, "%d", argv[i]);
4.9 DoReplace(buf, varname, value);
4.10 }
4.11
4.12 for (varmap::const_iterator iter = vars.begin(); iter != vars.end(); ++iter)
4.13 {
4.14 varname[1] = '0' + iter->first;
4.15 - itoa(iter->second, value, 10);
4.16 + sprintf(value, "%d", iter->second);
4.17 DoReplace(buf, varname, value);
4.18 }
4.19 }
4.20 @@ -608,8 +608,8 @@
4.21 // Add separator if required
4.22 if (sepbegin != string::npos && i != expr_max)
4.23 {
4.24 - do_input(argc, argv, outfile,
4.25 - string(sect.begin() + sepbegin, sect.begin() + sepend), curvars);
4.26 + string tmp(sect.begin() + sepbegin, sect.begin() + sepend);
4.27 + do_input(argc, argv, outfile, tmp, curvars);
4.28 }
4.29 }
4.30 // Remove the var!
4.31 @@ -654,7 +654,8 @@
4.32 // Condition is true, process it!
4.33 // The text may still contain arithmetic exprs or other cond. exprs
4.34 // so send it through do_input
4.35 - do_input(argc, argv, outfile, sect.substr(colon+1, sect.size() - colon - 3), curvars);
4.36 + string tmp(sect.substr(colon+1, sect.size() - colon - 3));
4.37 + do_input(argc, argv, outfile, tmp, curvars);
4.38 }
4.39 }
4.40 }
4.41 @@ -687,7 +688,8 @@
4.42 const int MAX_ARGC = 10;
4.43 int converted_argv[MAX_ARGC];
4.44
4.45 - for (int i = 0; i < argc && i < MAX_ARGC; ++i)
4.46 + int i;
4.47 + for (i = 0; i < argc && i < MAX_ARGC; ++i)
4.48 converted_argv[i] = atoi(argv[i]);
4.49
4.50 if (argc != i)