=================================================================== RCS file: /home/cvs/OpenXM/src/kan96xx/Kan/shell.c,v retrieving revision 1.11 retrieving revision 1.15 diff -u -p -r1.11 -r1.15 --- OpenXM/src/kan96xx/Kan/shell.c 2004/02/23 09:03:42 1.11 +++ OpenXM/src/kan96xx/Kan/shell.c 2012/10/29 02:51:41 1.15 @@ -1,5 +1,6 @@ -/* $OpenXM: OpenXM/src/kan96xx/Kan/shell.c,v 1.10 2004/02/05 10:35:04 takayama Exp $ */ +/* $OpenXM: OpenXM/src/kan96xx/Kan/shell.c,v 1.14 2005/07/03 11:08:54 ohara Exp $ */ #include +#include #include #include #include @@ -96,7 +97,8 @@ void KoxShellHelp(char *key,FILE *fp) { }else if (strcmp(key,"keep_tmp_files")==0) { s[0] = "keep_tmp_files value"; s[1] = "If value is zero, then temporary files are removed after execution."; - s[2] = NULL; + s[2] = "Example 1: [(keep_tmp_files) (1)] oxshell ; temporary files will be kept in /tmp or $TMP or ..."; + s[3] = NULL; }else{ } i = 0; @@ -108,7 +110,7 @@ void KoxShellHelp(char *key,FILE *fp) { static struct object KoxShell_test1(struct object ob) { /* A simple shell. It does not implement a parser. */ - struct object rob; + struct object rob = OINIT; char *cmd; char *arg1,*arg2; int i,n; @@ -125,9 +127,13 @@ static struct object KoxShell_test1(struct object ob) rob = testmain(ob); }else if (strcmp(cmd,"which")==0) { if (n == 2) { + pathFinderErrorVerbose(0); rob = KoxWhich(getoa(ob,1),KpoInteger(0)); + pathFinderErrorVerbose(-1); }else if (n==3) { + pathFinderErrorVerbose(0); rob = KoxWhich(getoa(ob,1),getoa(ob,2)); + pathFinderErrorVerbose(-1); }else{ errorKan1("%s\n","shell: << which command-name >> or << which command-name path >>"); } @@ -155,7 +161,7 @@ static struct object KoxShell_test1(struct object ob) /* Functions for ox_shell */ struct object KoxWhich(struct object cmdo,struct object patho) { - struct object rob; + struct object rob = OINIT; char *sss; rob = NullObject; if (cmdo.tag != Sdollar) errorKan1("%s\n","KoxWhich(str-obj,str-obj)"); @@ -197,7 +203,7 @@ static myunsetenv(char *name) { /* Example. [(export) (PATH) (=) (/usr/new/bin:$PATH)] */ static struct object oxsSetenv(struct object ob) { - struct object rob; + struct object rob = OINIT; int i,n; char *envp; char *new; @@ -371,9 +377,9 @@ char *oxsURIgetFileName(char *s) { static struct object testmain(struct object ob) { - struct object rob; + struct object rob = OINIT; char *s; - struct object ot; + struct object ot = OINIT; char **av; int i; rob = NullObject; @@ -402,7 +408,7 @@ char *oxsVarToFile(char *v,char *ext,char *command,int FILE *fp; int n,i,prevc,c; char *prog; - struct object vv; + struct object vv = OINIT; /*bug; winname must be automatically set by looking at command. If command is win32-native-application, then winname=1; else winname=0. @@ -484,7 +490,7 @@ static char **oxsBuildArgv(struct object ob) { char *ext, *v; int usetmp=1; int win=0; - struct object ocmd; + struct object ocmd = OINIT; /* bug: win variable must be properly set on windows native. */