mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
First few files of signedness cleanup for GCC 4.0.
This commit is contained in:
parent
71678e1859
commit
b59f366684
3 changed files with 5 additions and 7 deletions
|
@ -100,23 +100,21 @@ Info_SetValueForStarKey (info_t *info, const char *key, const char *value,
|
||||||
{
|
{
|
||||||
info_key_t *k;
|
info_key_t *k;
|
||||||
int cursize;
|
int cursize;
|
||||||
char *str;
|
char *str, *d, *s;
|
||||||
byte *s, *d;
|
|
||||||
|
|
||||||
if (strstr (key, "\\") || strstr (value, "\\")) {
|
if (strstr (key, "\\") || strstr (value, "\\")) {
|
||||||
Sys_Printf ("Can't use keys or values with a \\\n");
|
Sys_Printf ("Can't use keys or values with a \\\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strstr (key, "\"") || strstr (value, "\"")) {
|
if (strstr (key, "\"") || strstr (value, "\"")) {
|
||||||
Sys_Printf ("Can't use keys or values with a \"\n");
|
Sys_Printf ("Can't use keys or values with a \"\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strlen (key) > 63 || strlen (value) > 63) {
|
if (strlen (key) > 63 || strlen (value) > 63) {
|
||||||
Sys_Printf ("Keys and values must be < 64 characters.\n");
|
Sys_Printf ("Keys and values must be < 64 characters.\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
k = Hash_Find (info->tab, key);
|
k = Hash_Find (info->tab, key);
|
||||||
cursize = info->cursize;
|
cursize = info->cursize;
|
||||||
if (k) {
|
if (k) {
|
||||||
|
@ -132,7 +130,7 @@ Info_SetValueForStarKey (info_t *info, const char *key, const char *value,
|
||||||
if (strequal (k->value, value))
|
if (strequal (k->value, value))
|
||||||
return 0;
|
return 0;
|
||||||
info->cursize -= strlen (k->value) + 1;
|
info->cursize -= strlen (k->value) + 1;
|
||||||
free ((char*)k->value);
|
free ((char *) k->value);
|
||||||
} else {
|
} else {
|
||||||
if (!(k = malloc (sizeof (info_key_t))))
|
if (!(k = malloc (sizeof (info_key_t))))
|
||||||
Sys_Error ("Info_SetValueForStarKey: out of memory");
|
Sys_Error ("Info_SetValueForStarKey: out of memory");
|
||||||
|
|
|
@ -261,7 +261,7 @@ MSG_ReadString (qmsg_t *msg)
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
string = &msg->message->data[msg->readcount];
|
string = (char *) &msg->message->data[msg->readcount];
|
||||||
|
|
||||||
maxlen = msg->message->cursize - msg->readcount;
|
maxlen = msg->message->cursize - msg->readcount;
|
||||||
len = strnlen (string, maxlen);
|
len = strnlen (string, maxlen);
|
||||||
|
|
|
@ -59,7 +59,7 @@ init_quotables (void)
|
||||||
{
|
{
|
||||||
const char *unquotables = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
const char *unquotables = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||||
"abcdefghijklmnopqrstuvwxyz!#$%&*+-./:?@|~_^";
|
"abcdefghijklmnopqrstuvwxyz!#$%&*+-./:?@|~_^";
|
||||||
const byte *c;
|
const char *c;
|
||||||
memset (quotable_bitmap, ~0, sizeof (quotable_bitmap));
|
memset (quotable_bitmap, ~0, sizeof (quotable_bitmap));
|
||||||
for (c = unquotables; *c; c++)
|
for (c = unquotables; *c; c++)
|
||||||
quotable_bitmap[*c / 8] &= ~(1 << (*c % 8));
|
quotable_bitmap[*c / 8] &= ~(1 << (*c % 8));
|
||||||
|
|
Loading…
Reference in a new issue