mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-02-18 11:54:14 +01:00
Fixed linux/gcc/amd64
--HG-- extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%40201
This commit is contained in:
parent
2b3d8002f1
commit
e7f62bcc60
@ -1,7 +1,7 @@
|
||||
#/bin/sh
|
||||
|
||||
./shworker.bin iter $1 sourcehook.hxx sourcehook.h
|
||||
./shworker.bin iter $1 sh_memfuncinfo.hxx sh_memfuncinfo.h
|
||||
./shworker.bin hopter $1 FastDelegate.hxx FastDelegate.h
|
||||
./shworker.bin iter sourcehook.hxx sourcehook.h $1
|
||||
./shworker.bin iter sh_memfuncinfo.hxx sh_memfuncinfo.h $1
|
||||
./shworker.bin hopter FastDelegate.hxx FastDelegate.h $1
|
||||
|
||||
cp *.h ..
|
||||
|
Binary file not shown.
@ -4,10 +4,10 @@ bin:
|
||||
mkdir bin
|
||||
|
||||
fd_hopter.o: fd_hopter.cpp bin
|
||||
gcc -fPIC -o bin/$@ -c $<
|
||||
gcc -fPIC -O2 -o bin/$@ -c $<
|
||||
|
||||
main.o: shworker.cpp bin
|
||||
gcc -fPIC -o bin/$@ -c $<
|
||||
gcc -fPIC -O2 -o bin/$@ -c $<
|
||||
|
||||
shworker: fd_hopter.o main.o bin
|
||||
gcc -ldl -lstdc++ bin/fd_hopter.o bin/main.o -o bin/shworker.bin
|
||||
|
@ -444,14 +444,14 @@ void replace_vars(string &buf, int argc, int *argv, const varmap &vars)
|
||||
for (int i = 0; i < argc; ++i)
|
||||
{
|
||||
varname[1] = 'a' + i;
|
||||
itoa(argv[i], value, 10);
|
||||
sprintf(value, "%d", argv[i]);
|
||||
DoReplace(buf, varname, value);
|
||||
}
|
||||
|
||||
for (varmap::const_iterator iter = vars.begin(); iter != vars.end(); ++iter)
|
||||
{
|
||||
varname[1] = '0' + iter->first;
|
||||
itoa(iter->second, value, 10);
|
||||
sprintf(value, "%d", iter->second);
|
||||
DoReplace(buf, varname, value);
|
||||
}
|
||||
}
|
||||
@ -608,8 +608,8 @@ int do_input(int argc, int *argv, ofstream &outfile, string &buf, varmap &curvar
|
||||
// Add separator if required
|
||||
if (sepbegin != string::npos && i != expr_max)
|
||||
{
|
||||
do_input(argc, argv, outfile,
|
||||
string(sect.begin() + sepbegin, sect.begin() + sepend), curvars);
|
||||
string tmp(sect.begin() + sepbegin, sect.begin() + sepend);
|
||||
do_input(argc, argv, outfile, tmp, curvars);
|
||||
}
|
||||
}
|
||||
// Remove the var!
|
||||
@ -654,7 +654,8 @@ int do_input(int argc, int *argv, ofstream &outfile, string &buf, varmap &curvar
|
||||
// Condition is true, process it!
|
||||
// The text may still contain arithmetic exprs or other cond. exprs
|
||||
// so send it through do_input
|
||||
do_input(argc, argv, outfile, sect.substr(colon+1, sect.size() - colon - 3), curvars);
|
||||
string tmp(sect.substr(colon+1, sect.size() - colon - 3));
|
||||
do_input(argc, argv, outfile, tmp, curvars);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -687,7 +688,8 @@ int action_iter(const char *filenamein, const char *filenameout, int argc, const
|
||||
const int MAX_ARGC = 10;
|
||||
int converted_argv[MAX_ARGC];
|
||||
|
||||
for (int i = 0; i < argc && i < MAX_ARGC; ++i)
|
||||
int i;
|
||||
for (i = 0; i < argc && i < MAX_ARGC; ++i)
|
||||
converted_argv[i] = atoi(argv[i]);
|
||||
|
||||
if (argc != i)
|
||||
|
Loading…
x
Reference in New Issue
Block a user