string function cleanups

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4714 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2009-11-07 22:44:32 +00:00
parent 9e817de2c8
commit e725e5ed8c
38 changed files with 423 additions and 420 deletions
+7 -7
View File
@@ -43,11 +43,11 @@ void fatal(const char *s, ...) // failure exit
if(errors <= 2)
{
s_sprintfdlv(msg,s,s);
defvformatstring(msg,s,s);
if(errors <= 1)
{
s_sprintfdlv(msg,s,s);
s_sprintfd(msgerr)("%s (%s)\n", msg, SDL_GetError());
defvformatstring(msg,s,s);
defformatstring(msgerr)("%s (%s)\n", msg, SDL_GetError());
cleanup(msgerr);
}
else puts(msg);
@@ -148,13 +148,13 @@ VARP(jpegquality, 10, 70, 100);
const char *screenshotpath(const char *imagepath, const char *suffix)
{
static string buf;
if(imagepath && imagepath[0]) s_strcpy(buf, imagepath);
if(imagepath && imagepath[0]) copystring(buf, imagepath);
else
{
if(getclientmap()[0])
s_sprintf(buf)("screenshots/%s_%s_%s.%s", timestring(), behindpath(getclientmap()), modestr(gamemode, true), suffix);
formatstring(buf)("screenshots/%s_%s_%s.%s", timestring(), behindpath(getclientmap()), modestr(gamemode, true), suffix);
else
s_sprintf(buf)("screenshots/%s.%s", timestring(), suffix);
formatstring(buf)("screenshots/%s.%s", timestring(), suffix);
}
path(buf);
return buf;
@@ -739,7 +739,7 @@ int main(int argc, char **argv)
initlog("localconnect");
extern string clientmap;
s_strcpy(clientmap, "ac_complex");
copystring(clientmap, "ac_complex");
localconnect();
if(initscript) execute(initscript);