changed several '^' checks to STRING_COLOR_TAG as they should be
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 16 Aug 2006 07:17:21 +0000 (07:17 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 16 Aug 2006 07:17:21 +0000 (07:17 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6559 d7cf8633-e32d-0410-b094-e92efae38249

cl_screen.c
clvm_cmds.c
console.c

index 7c2b09b..4a05b5d 100644 (file)
@@ -132,7 +132,7 @@ void SCR_DrawCenterString (void)
                        if (start[l] == '\n' || !start[l])
                                break;
                        // color codes add no visible characters, so don't count them
-                       if (start[l] == '^' && (start[l+1] >= '0' && start[l+1] <= '9'))
+                       if (start[l] == STRING_COLOR_TAG && (start[l+1] >= '0' && start[l+1] <= '9'))
                                l++;
                        else
                                chars++;
index 4a4dff9..4bd60f2 100644 (file)
@@ -1269,7 +1269,7 @@ void VM_CL_registercmd (void)
        if(!Cmd_Exists(PRVM_G_STRING(OFS_PARM0)))
        {
                size_t alloclen;
-               
+
                alloclen = strlen(PRVM_G_STRING(OFS_PARM0)) + 1;
                t = (char *)Z_Malloc(alloclen);
                memcpy(t, PRVM_G_STRING(OFS_PARM0), alloclen);
@@ -2295,7 +2295,7 @@ static int Is_Text_Color (char c, char t)
        char c2 = c - (c & 128);
        char t2 = t - (t & 128);
 
-       if(c != '^' && c2 != '^')               return 0;
+       if(c != STRING_COLOR_TAG && c2 != STRING_COLOR_TAG)             return 0;
        if(t >= '0' && t <= '9')                a = 1;
        if(t2 >= '0' && t2 <= '9')              a = 1;
 /*     if(t >= 'A' && t <= 'Z')                a = 2;
index 3d613a8..f6d4080 100644 (file)
--- a/console.c
+++ b/console.c
@@ -639,12 +639,12 @@ void Con_Print(const char *msg)
                                        {
                                                switch(*in)
                                                {
-                                                       case '^':
+                                                       case STRING_COLOR_TAG:
                                                                switch(in[1])
                                                                {
-                                                                       case '^':
+                                                                       case STRING_COLOR_TAG:
                                                                                ++in;
-                                                                               *out++ = '^';
+                                                                               *out++ = STRING_COLOR_TAG;
                                                                                break;
                                                                        case '0':
                                                                        case '7':
@@ -698,7 +698,7 @@ void Con_Print(const char *msg)
                                                                                *out++ = 0x1B; *out++ = '['; *out++ = '0'; *out++ = ';'; *out++ = '1'; *out++ = 'm';
                                                                                break;
                                                                        default:
-                                                                               *out++ = '^';
+                                                                               *out++ = STRING_COLOR_TAG;
                                                                                break;
                                                                }
                                                                break;
@@ -737,12 +737,12 @@ void Con_Print(const char *msg)
                                        {
                                                switch(*in)
                                                {
-                                                       case '^':
+                                                       case STRING_COLOR_TAG:
                                                                switch(in[1])
                                                                {
-                                                                       case '^':
+                                                                       case STRING_COLOR_TAG:
                                                                                ++in;
-                                                                               *out++ = '^';
+                                                                               *out++ = STRING_COLOR_TAG;
                                                                                break;
                                                                        case '0':
                                                                        case '1':
@@ -757,7 +757,7 @@ void Con_Print(const char *msg)
                                                                                ++in;
                                                                                break;
                                                                        default:
-                                                                               *out++ = '^';
+                                                                               *out++ = STRING_COLOR_TAG;
                                                                                break;
                                                                }
                                                                break;
@@ -938,7 +938,7 @@ void Con_DrawNotify (void)
                        // count up to the last non-whitespace, and ignore color codes
                        for (j = 0;j < con_linewidth && text[j];j++)
                        {
-                               if (text[j] == '^' && (text[j+1] >= '0' && text[j+1] <= '9'))
+                               if (text[j] == STRING_COLOR_TAG && (text[j+1] >= '0' && text[j+1] <= '9'))
                                {
                                        j++;
                                        continue;