34 #define IFX_SHELL_LLD "%lld "
35 #define IFX_SHELL_LLX "%llx "
36 #define IFX_SHELL_LLU "%llu "
39 #define IFX_SHELL_MAX_MESSAGE_SIZE 255
43 #define ISSPACE(c) (((c) == ' ') || ((c) == '\t'))
46 #define IFX_SHELL_IF_ECHO(X) {if (shell->control.echo) {X; }}
49 #define IFX_SHELL_WRITE_SPACES(X) \
50 {int ii; for (ii = 0; ii < (X); ii++) {IfxStdIf_DPipe_print(shell->io, " "); }}
53 #define IFX_SHELL_WRITE_BACKSPACES(X) \
54 {int ii; for (ii = 0; ii < (X); ii++) {IfxStdIf_DPipe_print(shell->io, "\b"); }}
99 command = &command[1];
128 boolean Result =
TRUE;
161 boolean result =
TRUE;
209 memset(shell, 0,
sizeof(*shell));
247 strcpy(CmdHistory[0],
"help");
248 strcpy(CmdHistory[1],
"protocol start");
265 boolean NormalKeyPress;
303 for (i = 0; i < count; i++)
306 NormalKeyPress =
FALSE;
309 switch (inputbuffer[i])
371 for (j = Cmd->
cursor; j < Cmd->length; j++)
411 NormalKeyPress =
TRUE;
432 NormalKeyPress =
TRUE;
451 NormalKeyPress =
TRUE;
469 NormalKeyPress =
TRUE;
476 NormalKeyPress =
TRUE;
484 if (NormalKeyPress !=
FALSE)
496 cmdStr[Cmd->
cursor] = inputbuffer[i];
543 pchar savedArguments = *argsPtr;
545 boolean result =
FALSE;
549 if (strcmp(token, buffer) == 0)
558 *argsPtr = savedArguments;
565 static boolean Ifx_Shell_matchCommand(
pchar *argsPtr,
pchar *match)
567 boolean result =
FALSE;
568 pchar savedArguments = *argsPtr;
569 pchar savedMatch = *match;
576 if (strcmp(buffer1, buffer0) == 0)
585 *argsPtr = savedArguments;
611 if (mindex < bufferLength)
613 tokenBuffer[mindex] = *args;
638 if (mindex < bufferLength)
640 tokenBuffer[mindex] = *args;
649 if (bufferLength > 0)
673 result = (buffer[0] !=
IFX_SHELL_NULL_CHAR) && (sscanf(buffer,
"%x ", (
unsigned int *)address) == 1);
755 char *bufferPointer = buffer;
757 if ((buffer[0] ==
'0') && (buffer[1] ==
'x'))
759 bufferPointer = &bufferPointer[2];
825 pchar commandLineTemp = commandLine;
827 boolean commandFound =
FALSE;
829 while (Ifx_Shell_matchCommand(&commandLineTemp, &commandTemp) !=
FALSE)
836 *args = commandLineTemp;
841 command = &command[1];
935 boolean result = (shell !=
NULL_PTR);
1053 if (EscapeChar2 ==
'~')
1055 switch (EscapeChar1)
1077 for (i = Cmd->
cursor; i < Cmd->length; i++)
1089 cmdStr[i] = cmdStr[i - 1];
1093 cmdStr[Cmd->
cursor] =
' ';
1168 syntax = &syntax[1];