]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cmd.c
Remove Con_Warnf and Errorf. Use macros to change color and identify the message
[xonotic/darkplaces.git] / cmd.c
diff --git a/cmd.c b/cmd.c
index ea0b608eecfab77ade1a7bca311d3ce0ca4e85dc..64a90e26b008a509cb6927c4fa3d079e10514fbc 100644 (file)
--- a/cmd.c
+++ b/cmd.c
@@ -325,7 +325,7 @@ void Cbuf_Execute (cmd_state_t *cmd)
                // better than CRASHING on overlong input lines that may SOMEHOW enter the buffer
                if(i >= MAX_INPUTLINE)
                {
-                       Con_Warnf("Warning: console input buffer had an overlong line. Ignored.\n");
+                       Con_Printf(CON_WARN "Warning: console input buffer had an overlong line. Ignored.\n");
                        line[0] = 0;
                }
                else
@@ -1126,9 +1126,9 @@ static const char *Cmd_GetCvarValue(cmd_state_t *cmd, const char *var, size_t va
        {
                // empty cvar name?
                if(alias)
-                       Con_Warnf("Warning: Could not expand $ in alias %s\n", alias->name);
+                       Con_Printf(CON_WARN "Warning: Could not expand $ in alias %s\n", alias->name);
                else
-                       Con_Warnf("Warning: Could not expand $\n");
+                       Con_Printf(CON_WARN "Warning: Could not expand $\n");
                return "$";
        }
 
@@ -1174,9 +1174,9 @@ static const char *Cmd_GetCvarValue(cmd_state_t *cmd, const char *var, size_t va
                if(required)
                {
                        if(alias)
-                               Con_Errorf("Error: Could not expand $%s in alias %s\n", varname, alias->name);
+                               Con_Printf(CON_ERROR "Error: Could not expand $%s in alias %s\n", varname, alias->name);
                        else
-                               Con_Errorf("Error: Could not expand $%s\n", varname);
+                               Con_Printf(CON_ERROR "Error: Could not expand $%s\n", varname);
                        return NULL;
                }
                else if(optional)
@@ -1186,9 +1186,9 @@ static const char *Cmd_GetCvarValue(cmd_state_t *cmd, const char *var, size_t va
                else
                {
                        if(alias)
-                               Con_Warnf("Warning: Could not expand $%s in alias %s\n", varname, alias->name);
+                               Con_Printf(CON_WARN "Warning: Could not expand $%s in alias %s\n", varname, alias->name);
                        else
-                               Con_Warnf("Warning: Could not expand $%s\n", varname);
+                               Con_Printf(CON_WARN "Warning: Could not expand $%s\n", varname);
                        dpsnprintf(varval, sizeof(varval), "$%s", varname);
                        return varval;
                }