summaryrefslogtreecommitdiff
path: root/src/qcommon/cmd.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2006-01-24 05:04:21 +0000
committerTim Angus <tim@ngus.net>2006-01-24 05:04:21 +0000
commit608a95f42c08146d7e85fa876476d98365339a32 (patch)
treebb413c295ce51aa6648090e9856c399989a5e2f4 /src/qcommon/cmd.c
parent470f5cc7203a148289d6ad6f0f5c7b4d80a48d50 (diff)
* Merged ioq3-r522
- i586 is now default -march - Couple of OpenAL "bug" fixes - Fancy autocompletion - Delete key on *nix fixed - Client now sleeps when inactive - Persistent console history
Diffstat (limited to 'src/qcommon/cmd.c')
-rw-r--r--src/qcommon/cmd.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/qcommon/cmd.c b/src/qcommon/cmd.c
index a3053c89..7495bf1c 100644
--- a/src/qcommon/cmd.c
+++ b/src/qcommon/cmd.c
@@ -477,7 +477,7 @@ will point into this temporary buffer.
*/
// NOTE TTimo define that to track tokenization issues
//#define TKN_DBG
-void Cmd_TokenizeString( const char *text_in ) {
+static void Cmd_TokenizeString2( const char *text_in, qboolean ignoreQuotes ) {
const char *text;
char *textOut;
@@ -534,7 +534,7 @@ void Cmd_TokenizeString( const char *text_in ) {
// handle quoted strings
// NOTE TTimo this doesn't handle \" escaping
- if ( *text == '"' ) {
+ if ( !ignoreQuotes && *text == '"' ) {
cmd.argv[cmd.argc] = textOut;
cmd.argc++;
text++;
@@ -555,7 +555,7 @@ void Cmd_TokenizeString( const char *text_in ) {
// skip until whitespace, quote, or command
while ( *text > ' ' ) {
- if ( text[0] == '"' ) {
+ if ( !ignoreQuotes && text[0] == '"' ) {
break;
}
@@ -580,6 +580,23 @@ void Cmd_TokenizeString( const char *text_in ) {
}
+/*
+============
+Cmd_TokenizeString
+============
+*/
+void Cmd_TokenizeString( const char *text_in ) {
+ Cmd_TokenizeString2( text_in, qfalse );
+}
+
+/*
+============
+Cmd_TokenizeStringIgnoreQuotes
+============
+*/
+void Cmd_TokenizeStringIgnoreQuotes( const char *text_in ) {
+ Cmd_TokenizeString2( text_in, qtrue );
+}
/*
============