return strncmp(b, a, stringbuffers_sortlength);
}
-prvm_stringbuffer_t *BufStr_FindCreateReplace (prvm_prog_t *prog, int bufindex, int flags, char *format)
+prvm_stringbuffer_t *BufStr_FindCreateReplace (prvm_prog_t *prog, int bufindex, int flags, const char *format)
{
prvm_stringbuffer_t *stringbuffer;
int i;
// general functions
void VM_CheckEmptyString (prvm_prog_t *prog, const char *s);
void VM_VarString(prvm_prog_t *prog, int first, char *out, int outlength);
-prvm_stringbuffer_t *BufStr_FindCreateReplace (prvm_prog_t *prog, int bufindex, int flags, char *format);
+prvm_stringbuffer_t *BufStr_FindCreateReplace (prvm_prog_t *prog, int bufindex, int flags, const char *format);
void BufStr_Set(prvm_prog_t *prog, prvm_stringbuffer_t *stringbuffer, int strindex, const char *str);
void BufStr_Del(prvm_prog_t *prog, prvm_stringbuffer_t *stringbuffer);
void BufStr_Flush(prvm_prog_t *prog);
{
int i;
if (!bufferlength)
+ {
+ if (pointer)
+ *pointer = NULL;
return 0;
+ }
for (i = prog->firstfreeknownstring;i < prog->numknownstrings;i++)
if (!prog->knownstrings[i])
break;
# define HAVE_Sleep 1
#endif
+#ifndef WIN32
#if defined(CLOCK_MONOTONIC) || defined(CLOCK_HIRES)
# define HAVE_CLOCKGETTIME 1
#endif
-
-#ifndef WIN32
// FIXME improve this check, manpage hints to DST_NONE
# define HAVE_GETTIMEOFDAY 1
#endif
else
{
rect->left = workArea.left + max(0, (workWidth - width) / 2);
- rect->top = workArea.top + (0, (workHeight - height) / 2);
+ rect->top = workArea.top + ((workHeight - height) / 2);
}
}
#endif