summaryrefslogtreecommitdiff
path: root/src/qcommon
diff options
context:
space:
mode:
Diffstat (limited to 'src/qcommon')
-rw-r--r--src/qcommon/common.c2
-rw-r--r--src/qcommon/q_shared.c15
-rw-r--r--src/qcommon/q_shared.h3
3 files changed, 20 insertions, 0 deletions
diff --git a/src/qcommon/common.c b/src/qcommon/common.c
index d4593e08..ddd3c023 100644
--- a/src/qcommon/common.c
+++ b/src/qcommon/common.c
@@ -164,6 +164,8 @@ void QDECL Com_Printf( const char *fmt, ... ) {
CL_ConsolePrint( msg );
#endif
+ Q_StripIndentMarker( msg );
+
// echo to dedicated console and early console
Sys_Print( msg );
diff --git a/src/qcommon/q_shared.c b/src/qcommon/q_shared.c
index 6da13ad0..71da2734 100644
--- a/src/qcommon/q_shared.c
+++ b/src/qcommon/q_shared.c
@@ -935,6 +935,21 @@ int Q_CountChar(const char *string, char tocount)
return count;
}
+void Q_StripIndentMarker(char *string)
+{
+ int i;
+
+ for (i = 0; i < strlen(string); i++) {
+ if (string[i] == INDENT_MARKER) {
+ int j;
+
+ for (j = i; j < strlen(string); j++) {
+ string[j] = string[j+1];
+ }
+ }
+ }
+}
+
void Q_ParseNewlines( char *dest, const char *src, int destsize )
{
for( ; *src && destsize > 1; src++, destsize-- )
diff --git a/src/qcommon/q_shared.h b/src/qcommon/q_shared.h
index 6eda5cd8..29cc4b9b 100644
--- a/src/qcommon/q_shared.h
+++ b/src/qcommon/q_shared.h
@@ -389,6 +389,9 @@ extern vec4_t colorDkGrey;
#define S_COLOR_MAGENTA "^6"
#define S_COLOR_WHITE "^7"
+#define INDENT_MARKER '\v'
+void Q_StripIndentMarker(char *string);
+
extern vec4_t g_color_table[8];
#define MAKERGB( v, r, g, b ) v[0]=r;v[1]=g;v[2]=b