Redefine snprintf for Windows.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3018 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Molgrum 2008-06-27 19:16:15 +00:00
parent 64c9a31e6b
commit d71843d2e4
1 changed files with 7 additions and 3 deletions

View File

@ -166,6 +166,10 @@ enum segs {
#define USEDATBLOCK 64
#define STACKSIZE 0x10000
#ifdef WIN32
#define snprintf _snprintf
#endif
struct usedat {
struct usedat *next;
int count;
@ -831,7 +835,7 @@ void AssembleFile(struct assembler *w, int fnum, char *filename)
f = fopen(filename, "rt");
if (!f)
{
_snprintf(linebuffer, sizeof(linebuffer)-1, "%s.asm", filename);
snprintf(linebuffer, sizeof(linebuffer)-1, "%s.asm", filename);
f = fopen(linebuffer, "rt");
}
@ -1073,7 +1077,7 @@ int ParseCommandList(struct workload *w, int numcmds, char **cmds)
if (!f)
{
char blah[256];
_snprintf(blah, sizeof(blah)-1, "%s.q3asm", *cmds);
snprintf(blah, sizeof(blah)-1, "%s.q3asm", *cmds);
f = fopen(blah, "rt");
}
if (f)
@ -1143,7 +1147,7 @@ int ParseCommandList(struct workload *w, int numcmds, char **cmds)
if (!strchr(*cmds, '.'))
{
_snprintf(w->output, sizeof(w->output)-1, "%s.qvm", *cmds);
snprintf(w->output, sizeof(w->output)-1, "%s.qvm", *cmds);
}
else
{