Changeset 19 for trunk/src/kShell
- Timestamp:
- Oct 18, 2002, 1:02:18 AM (23 years ago)
- Location:
- trunk/src/kShell
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kShell/kShellMain.c
r18 r19 30 30 #include "kShell.h" 31 31 #include <string.h> 32 #include <stdio.h>33 32 34 33 … … 66 65 else 67 66 { 68 while (fgets(&szCmd[0], sizeof(szCmd), stdin)) 69 { 70 char *pszEnd = &szCmd[strlen(&szCmd[0]) - 1]; 71 while (pszEnd >= &szCmd[0] && (*pszEnd == '\n' || *pszEnd == '\r')) 72 *pszEnd-- = '\0'; 73 74 if (!strcmp(&szCmd[0], "exit")) 75 break; 76 77 rc = kshellExecute(&szCmd[0]); 78 } 67 rc = kshellInteractive(); 79 68 } 80 69
Note:
See TracChangeset
for help on using the changeset viewer.