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:
parent
64c9a31e6b
commit
d71843d2e4
1 changed files with 7 additions and 3 deletions
|
@ -166,6 +166,10 @@ enum segs {
|
||||||
#define USEDATBLOCK 64
|
#define USEDATBLOCK 64
|
||||||
#define STACKSIZE 0x10000
|
#define STACKSIZE 0x10000
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
#define snprintf _snprintf
|
||||||
|
#endif
|
||||||
|
|
||||||
struct usedat {
|
struct usedat {
|
||||||
struct usedat *next;
|
struct usedat *next;
|
||||||
int count;
|
int count;
|
||||||
|
@ -831,7 +835,7 @@ void AssembleFile(struct assembler *w, int fnum, char *filename)
|
||||||
f = fopen(filename, "rt");
|
f = fopen(filename, "rt");
|
||||||
if (!f)
|
if (!f)
|
||||||
{
|
{
|
||||||
_snprintf(linebuffer, sizeof(linebuffer)-1, "%s.asm", filename);
|
snprintf(linebuffer, sizeof(linebuffer)-1, "%s.asm", filename);
|
||||||
f = fopen(linebuffer, "rt");
|
f = fopen(linebuffer, "rt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1073,7 +1077,7 @@ int ParseCommandList(struct workload *w, int numcmds, char **cmds)
|
||||||
if (!f)
|
if (!f)
|
||||||
{
|
{
|
||||||
char blah[256];
|
char blah[256];
|
||||||
_snprintf(blah, sizeof(blah)-1, "%s.q3asm", *cmds);
|
snprintf(blah, sizeof(blah)-1, "%s.q3asm", *cmds);
|
||||||
f = fopen(blah, "rt");
|
f = fopen(blah, "rt");
|
||||||
}
|
}
|
||||||
if (f)
|
if (f)
|
||||||
|
@ -1143,7 +1147,7 @@ int ParseCommandList(struct workload *w, int numcmds, char **cmds)
|
||||||
|
|
||||||
if (!strchr(*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
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue