switch (type)
{
case ev_string:
- strlcpy (line, PRVM_GetString (prog, val->string), linelength);
+ dp_strlcpy (line, PRVM_GetString (prog, val->string), linelength);
break;
case ev_entity:
n = val->edict;
if ((unsigned int)val->function < (unsigned int)prog->progs_numfunctions)
{
f = prog->functions + val->function;
- strlcpy (line, PRVM_GetString (prog, f->s_name), linelength);
+ dp_strlcpy (line, PRVM_GetString (prog, f->s_name), linelength);
}
else
dpsnprintf (line, linelength, "bad function %" PRVM_PRIi " (invalid!)", val->function);
tempstring2[sizeof(tempstring2)-1] = 0;
name = tempstring2;
}
- strlcat(tempstring, name, sizeof(tempstring));
+ dp_strlcat(tempstring, name, sizeof(tempstring));
for (l = strlen(name);l < 14;l++)
- strlcat(tempstring, " ", sizeof(tempstring));
- strlcat(tempstring, " ", sizeof(tempstring));
+ dp_strlcat(tempstring, " ", sizeof(tempstring));
+ dp_strlcat(tempstring, " ", sizeof(tempstring));
name = PRVM_ValueString(prog, (etype_t)d->type, val, valuebuf, sizeof(valuebuf));
if (strlen(name) > sizeof(tempstring2)-4)
tempstring2[sizeof(tempstring2)-1] = 0;
name = tempstring2;
}
- strlcat(tempstring, name, sizeof(tempstring));
- strlcat(tempstring, "\n", sizeof(tempstring));
+ dp_strlcat(tempstring, name, sizeof(tempstring));
+ dp_strlcat(tempstring, "\n", sizeof(tempstring));
if (strlen(tempstring) >= sizeof(tempstring)/2)
{
Con_Print(tempstring);
if (developer_entityparsing.integer)
Con_Printf("Key: \"%s\"", com_token);
- strlcpy (keyname, com_token, sizeof(keyname));
+ dp_strlcpy (keyname, com_token, sizeof(keyname));
// parse value
if (!COM_ParseToken_Simple(&data, false, true, true))
// and allow them to be turned into vectors. (FIXME...)
if (!strcmp(com_token, "angle"))
{
- strlcpy (com_token, "angles", sizeof(com_token));
+ dp_strlcpy (com_token, "angles", sizeof(com_token));
anglehack = true;
}
else
// FIXME: change light to _light to get rid of this hack
if (!strcmp(com_token, "light"))
- strlcpy (com_token, "light_lev", sizeof(com_token)); // hack for single light def
+ dp_strlcpy (com_token, "light_lev", sizeof(com_token)); // hack for single light def
- strlcpy (keyname, com_token, sizeof(keyname));
+ dp_strlcpy (keyname, com_token, sizeof(keyname));
// another hack to fix keynames with trailing spaces
n = strlen(keyname);
if (anglehack)
{
char temp[32];
- strlcpy (temp, com_token, sizeof(temp));
+ dp_strlcpy (temp, com_token, sizeof(temp));
dpsnprintf (com_token, sizeof(com_token), "0 %s 0", temp);
}
break;
if((size_t)(q - p) >= (size_t) sizeof(inbuf))
break;
- strlcpy(inbuf, p, q - p); // not - 1, because this adds a NUL
+ dp_strlcpy(inbuf, p, q - p); // not - 1, because this adds a NUL
PRVM_PO_ParseString(decodedbuf + decodedpos, inbuf, sizeof(decodedbuf) - decodedpos);
decodedpos += strlen(decodedbuf + decodedpos);
if(*q == '\r')
char filename[512];
FS_StripExtension( progname, filename, sizeof( filename ) );
- strlcat( filename, ".lno", sizeof( filename ) );
+ dp_strlcat( filename, ".lno", sizeof( filename ) );
lno = FS_LoadFile( filename, tempmempool, false, &filesize );
if( !lno ) {
switch(d->type & ~DEF_SAVEGLOBAL)
{
case ev_string:
- strlcat(tempstring, "string ", sizeof(tempstring));
+ dp_strlcat(tempstring, "string ", sizeof(tempstring));
break;
case ev_entity:
- strlcat(tempstring, "entity ", sizeof(tempstring));
+ dp_strlcat(tempstring, "entity ", sizeof(tempstring));
break;
case ev_function:
- strlcat(tempstring, "function ", sizeof(tempstring));
+ dp_strlcat(tempstring, "function ", sizeof(tempstring));
break;
case ev_field:
- strlcat(tempstring, "field ", sizeof(tempstring));
+ dp_strlcat(tempstring, "field ", sizeof(tempstring));
break;
case ev_void:
- strlcat(tempstring, "void ", sizeof(tempstring));
+ dp_strlcat(tempstring, "void ", sizeof(tempstring));
break;
case ev_float:
- strlcat(tempstring, "float ", sizeof(tempstring));
+ dp_strlcat(tempstring, "float ", sizeof(tempstring));
break;
case ev_vector:
- strlcat(tempstring, "vector ", sizeof(tempstring));
+ dp_strlcat(tempstring, "vector ", sizeof(tempstring));
break;
case ev_pointer:
- strlcat(tempstring, "pointer ", sizeof(tempstring));
+ dp_strlcat(tempstring, "pointer ", sizeof(tempstring));
break;
default:
dpsnprintf (tempstring2, sizeof(tempstring2), "bad type %i ", d->type & ~DEF_SAVEGLOBAL);
- strlcat(tempstring, tempstring2, sizeof(tempstring));
+ dp_strlcat(tempstring, tempstring2, sizeof(tempstring));
break;
}
if (strlen(name) > sizeof(tempstring2)-4)
tempstring2[sizeof(tempstring2)-1] = 0;
name = tempstring2;
}
- strlcat(tempstring, name, sizeof(tempstring));
+ dp_strlcat(tempstring, name, sizeof(tempstring));
for (j = (int)strlen(name);j < 25;j++)
- strlcat(tempstring, " ", sizeof(tempstring));
+ dp_strlcat(tempstring, " ", sizeof(tempstring));
dpsnprintf(tempstring2, sizeof(tempstring2), "%5d", counts[i]);
- strlcat(tempstring, tempstring2, sizeof(tempstring));
- strlcat(tempstring, "\n", sizeof(tempstring));
+ dp_strlcat(tempstring, tempstring2, sizeof(tempstring));
+ dp_strlcat(tempstring, "\n", sizeof(tempstring));
if (strlen(tempstring) >= sizeof(tempstring)/2)
{
Con_Print(tempstring);
{
debug_data_t *debug = &debug_data[prog - prvm_prog_list];
- strlcpy(debug->break_statement, Cmd_Argv(cmd, 2), sizeof(debug->break_statement));
+ dp_strlcpy(debug->break_statement, Cmd_Argv(cmd, 2), sizeof(debug->break_statement));
}
PRVM_UpdateBreakpoints(prog);
}
{
debug_data_t *debug = &debug_data[prog - prvm_prog_list];
- strlcpy(debug->watch_global, Cmd_Argv(cmd, 2), sizeof(debug->watch_global));
+ dp_strlcpy(debug->watch_global, Cmd_Argv(cmd, 2), sizeof(debug->watch_global));
}
PRVM_UpdateBreakpoints(prog);
}
{
debug_data_t *debug = &debug_data[prog - prvm_prog_list];
debug->watch_edict = atoi(Cmd_Argv(cmd, 2));
- strlcpy(debug->watch_field, Cmd_Argv(cmd, 3), sizeof(debug->watch_field));
+ dp_strlcpy(debug->watch_field, Cmd_Argv(cmd, 3), sizeof(debug->watch_field));
}
PRVM_UpdateBreakpoints(prog);
}