git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
UDI/ne2000 - Stubbed tx so it loads
[tpg/acess2.git]
/
Usermode
/
Applications
/
CLIShell_src
/
main.c
diff --git
a/Usermode/Applications/CLIShell_src/main.c
b/Usermode/Applications/CLIShell_src/main.c
index
501359a
..
8cea364
100644
(file)
--- a/
Usermode/Applications/CLIShell_src/main.c
+++ b/
Usermode/Applications/CLIShell_src/main.c
@@
-8,6
+8,7
@@
#include <string.h>
\r
#include "header.h"
\r
#include <readline.h>
\r
#include <string.h>
\r
#include "header.h"
\r
#include <readline.h>
\r
+#include <errno.h>
\r
\r
#define _stdin 0
\r
#define _stdout 1
\r
\r
#define _stdin 0
\r
#define _stdout 1
\r
@@
-31,11
+32,11
@@
struct {
{"help", Command_Help}, {"clear", Command_Clear},
\r
{"cd", Command_Cd}, {"dir", Command_Dir}
\r
};
\r
{"help", Command_Help}, {"clear", Command_Clear},
\r
{"cd", Command_Cd}, {"dir", Command_Dir}
\r
};
\r
-static char *cDEFAULT_PATH[] = {"/Acess/Bin"};
\r
+static char *cDEFAULT_PATH[] = {"/Acess/Bin"
,"/Acess/SBin"
};
\r
#define BUILTIN_COUNT (sizeof(cBUILTINS)/sizeof(cBUILTINS[0]))
\r
\r
// ==== LOCAL VARIABLES ====
\r
#define BUILTIN_COUNT (sizeof(cBUILTINS)/sizeof(cBUILTINS[0]))
\r
\r
// ==== LOCAL VARIABLES ====
\r
- int giNumPathDirs =
1
;
\r
+ int giNumPathDirs =
2
;
\r
char **gasPathDirs = cDEFAULT_PATH;
\r
char **gasEnvironment;
\r
char gsCommandBuffer[1024];
\r
char **gasPathDirs = cDEFAULT_PATH;
\r
char **gasEnvironment;
\r
char gsCommandBuffer[1024];
\r
@@
-55,7
+56,7
@@
int main(int argc, char *argv[], char **envp)
\r
gasEnvironment = envp;
\r
\r
\r
gasEnvironment = envp;
\r
\r
-
Command_Clear(0, NULL);
\r
+
//
Command_Clear(0, NULL);
\r
\r
{
\r
char *tmp = getenv("CWD");
\r
\r
{
\r
char *tmp = getenv("CWD");
\r
@@
-80,6
+81,10
@@
int main(int argc, char *argv[], char **envp)
// Read Command line
\r
sCommandStr = Readline( readline_state );
\r
printf("\n");
\r
// Read Command line
\r
sCommandStr = Readline( readline_state );
\r
printf("\n");
\r
+ if( !sCommandStr ) {
\r
+ perror("Readline");
\r
+ return 1;
\r
+ }
\r
\r
// Parse Command Line into arguments
\r
iArgCount = Parse_Args(sCommandStr, saArgs);
\r
\r
// Parse Command Line into arguments
\r
iArgCount = Parse_Args(sCommandStr, saArgs);
\r
UCC
git Repository :: git.ucc.asn.au