(svn r1073) - condebugger extended a bit [shows the commandline] (sign_de)

- fixed handling of aliases with parameters (sign_de)
This commit is contained in:
dominik 2004-12-13 20:45:55 +00:00
parent def5fc3ff7
commit 9aeb0e1d30
1 changed files with 14 additions and 4 deletions

View File

@ -603,7 +603,8 @@ void IConsoleAliasExec(const char* cmdline, char* tokens[20], byte tokentypes[20
i++; i++;
if (cmdline[i] == '+') { if (cmdline[i] == '+') {
t=1; t=1;
while ((tokens[t]!=NULL) && (t<20)) { while ((tokens[t]!=NULL) && (t<20) &&
((tokentypes[t] == ICONSOLE_VAR_STRING) || (tokentypes[t] == ICONSOLE_VAR_UNKNOWN))) {
int l2 = strlen(tokens[t]); int l2 = strlen(tokens[t]);
*linestream = '"'; *linestream = '"';
linestream++; linestream++;
@ -621,9 +622,13 @@ void IConsoleAliasExec(const char* cmdline, char* tokens[20], byte tokentypes[20
t = ((byte)cmdline[i]) - 64; t = ((byte)cmdline[i]) - 64;
if ((t<20) && (tokens[t]!=NULL)) { if ((t<20) && (tokens[t]!=NULL)) {
l2 = strlen(tokens[t]); l2 = strlen(tokens[t]);
*linestream = '"';
linestream++;
memcpy(linestream,tokens[t],l2); memcpy(linestream,tokens[t],l2);
x += l2;
linestream += l2; linestream += l2;
*linestream = '"';
linestream++;
x += l2+2;
} }
} }
} else if (cmdline[i] == '\\') { } else if (cmdline[i] == '\\') {
@ -659,9 +664,11 @@ void IConsoleAliasExec(const char* cmdline, char* tokens[20], byte tokentypes[20
*linestream = '\0'; *linestream = '\0';
} }
free(linestream_s); for (i=0; i<c; i++) {
IConsoleCmdExec(lines[i]);
}
for (i=0; i<c; i++) IConsoleCmdExec(lines[i]); free(linestream_s);
} }
void IConsoleVarInsert(_iconsole_var* item_new, const char* name) void IConsoleVarInsert(_iconsole_var* item_new, const char* name)
@ -1035,6 +1042,9 @@ void IConsoleCmdExec(const char* cmdstr)
int i; int i;
int l; int l;
if (_stdlib_con_developer)
IConsolePrintF(_iconsole_color_debug, "CONDEBUG: execution_cmdline: %s", cmdstr);
//** clearing buffer **// //** clearing buffer **//
for (i = 0; i < 20; i++) { for (i = 0; i < 20; i++) {