cvar_t log_dest_udp = {0, "log_dest_udp","", "UDP address to log messages to (in QW rcon compatible format); multiple destinations can be separated by spaces; DO NOT SPECIFY DNS NAMES HERE"};
char log_dest_buffer[1400]; // UDP packet
size_t log_dest_buffer_pos;
-qboolean log_dest_buffer_appending;
+unsigned int log_dest_buffer_appending;
char crt_log_file [MAX_OSPATH] = "";
qfile_t* logfile = NULL;
Adds a character to the rcon buffer
================
*/
-void Con_Rcon_AddChar(char c)
+void Con_Rcon_AddChar(int c)
{
if(log_dest_buffer_appending)
return;
int lastcolor = 0;
const char *in;
char *out;
- char color;
+ int color;
for(in = line, out = printline; *in; ++in)
{
switch(*in)
in+=4;
break;
}
+ *out++ = STRING_COLOR_TAG;
+ *out++ = STRING_COLOR_RGB_DEFAULT;
+ ++in;
+ break;
/*case 'a':
if ( isxdigit(in[2]) || in[2] == '+' || in[2] == '-' )
{
(void) 0;
else
{
- int x = ti->x + (ti->width - width) * ti->alignment;
+ int x = (int) (ti->x + (ti->width - width) * ti->alignment);
if(isContinuation && *ti->continuationString)
- x += DrawQ_String_Font(x, ti->y, ti->continuationString, strlen(ti->continuationString), ti->fontsize, ti->fontsize, 1.0, 1.0, 1.0, 1.0, 0, NULL, false, ti->font);
+ x += (int) DrawQ_String_Font(x, ti->y, ti->continuationString, strlen(ti->continuationString), ti->fontsize, ti->fontsize, 1.0, 1.0, 1.0, 1.0, 0, NULL, false, ti->font);
if(length > 0)
DrawQ_String_Font(x, ti->y, line, length, ti->fontsize, ti->fontsize, 1.0, 1.0, 1.0, 1.0, 0, &(ti->colorindex), false, ti->font);
}
l = 0;
Con_WordWidthFunc(&ti, NULL, &l, -1);
l = strlen(continuationString);
- continuationWidth = Con_WordWidthFunc(&ti, continuationString, &l, -1);
+ continuationWidth = (int) Con_WordWidthFunc(&ti, continuationString, &l, -1);
// first find the first line to draw by backwards iterating and word wrapping to find their length...
startidx = con_lines_count;
if (com_token[0] == '}')
break;
// skip leading whitespace
- for (k = 0;com_token[k] && com_token[k] <= ' ';k++);
- for (l = 0;l < (int)sizeof(keyname) - 1 && com_token[k+l] && com_token[k+l] > ' ';l++)
+ for (k = 0;com_token[k] && ISWHITESPACE(com_token[k]);k++);
+ for (l = 0;l < (int)sizeof(keyname) - 1 && com_token[k+l] && !ISWHITESPACE(com_token[k+l]);l++)
keyname[l] = com_token[k+l];
keyname[l] = 0;
if (!COM_ParseToken_Simple(&data, false, false))
{
qboolean quote_added = false;
int match;
- char color = STRING_COLOR_DEFAULT + '0';
+ int color = STRING_COLOR_DEFAULT + '0';
char r = 0, g = 0, b = 0;
if(con_nickcompletion_flags.integer & NICKS_ADD_QUOTE && buffer[Nicks_matchpos-1] == '\"')
else if(buffer[match+1] == STRING_COLOR_RGB_DEFAULT)
{
if ( isxdigit(buffer[match+2]) && isxdigit(buffer[match+3]) && isxdigit(buffer[match+4]) )
+ {
r = buffer[match+2];
g = buffer[match+3];
b = buffer[match+4];
color = -1;
break;
+ }
}
}
}