Changeset - r4905:90a4d9d2102d
[Not reviewed]
master
0 1 0
Darkvater - 18 years ago 2006-10-21 22:24:28
darkvater@openttd.org
(svn r6875) -Feature: Allow for " to be in console tokens. Escape them with \. eg \".
1 file changed with 6 insertions and 0 deletions:
0 comments (0 inline, 0 general)
console.c
Show inline comments
 
@@ -1091,6 +1091,12 @@ void IConsoleCmdExec(const char *cmdstr)
 
		case '"': /* Tokens enclosed in "" are one token */
 
			longtoken = !longtoken;
 
			break;
 
		case '\\': /* Escape character for "" */
 
			if (cmdptr[1] == '"' && tstream_i + 1 < lengthof(tokenstream)) {
 
				tokenstream[tstream_i++] = *++cmdptr;
 
				break;
 
			}
 
			/* fallthrough */
 
		default: /* Normal character */
 
			tokenstream[tstream_i++] = *cmdptr;
 

	
0 comments (0 inline, 0 general)