[BACK]Return to shell.c CVS log [TXT][DIR] Up to [local] / OpenXM / src / kan96xx / Kan

Diff for /OpenXM/src/kan96xx/Kan/shell.c between version 1.6 and 1.7

version 1.6, 2003/12/04 05:29:12 version 1.7, 2003/12/04 06:29:21
Line 1 
Line 1 
 /* $OpenXM: OpenXM/src/kan96xx/Kan/shell.c,v 1.5 2003/12/04 05:27:19 takayama Exp $ */  /* $OpenXM: OpenXM/src/kan96xx/Kan/shell.c,v 1.6 2003/12/04 05:29:12 takayama Exp $ */
 #include <stdio.h>  #include <stdio.h>
 #include <sys/types.h>  #include <sys/types.h>
 #include <sys/stat.h>  #include <sys/stat.h>
Line 53  struct object KoxShell(struct object ob) {
Line 53  struct object KoxShell(struct object ob) {
   
 /* A temporary help system */  /* A temporary help system */
 void KoxShellHelp(char *key,FILE *fp) {  void KoxShellHelp(char *key,FILE *fp) {
   char *keys[]={"command","export","which","redirect","@@@@gatekeeper"};    char *keys[]={"command","export","keep_tmp_files",
                   "killall","redirect","which","@@@@gatekeeper"};
   int i;    int i;
 #define HSIZE 20  #define HSIZE 20
   char *s[HSIZE];    char *s[HSIZE];
Line 89  void KoxShellHelp(char *key,FILE *fp) {
Line 90  void KoxShellHelp(char *key,FILE *fp) {
     s[2] = "Example 1: [(ls) (hoge) (2>) (stringOut://afo)] oxshell\n    afo ::";      s[2] = "Example 1: [(ls) (hoge) (2>) (stringOut://afo)] oxshell\n    afo ::";
     s[3] = "Example 2: [(cp) ] addStdoutStderr oxshell\n      [@@@stdout @@@stderr] ::";      s[3] = "Example 2: [(cp) ] addStdoutStderr oxshell\n      [@@@stdout @@@stderr] ::";
     s[4] = NULL;      s[4] = NULL;
     }else if (strcmp(key,"killall")==0) {
       s[0] = "Kill all the processes envoked by oxshell";
       s[1] = NULL;
     }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;
   }else{    }else{
   }    }
   i = 0;    i = 0;
Line 126  static struct object KoxShell_test1(struct object ob) 
Line 134  static struct object KoxShell_test1(struct object ob) 
     return(rob);      return(rob);
   }else if (strcmp(cmd,"export")==0) {    }else if (strcmp(cmd,"export")==0) {
     rob=oxsSetenv(ob);      rob=oxsSetenv(ob);
     }else if (strcmp(cmd,"keep_tmp_files")==0) {
       if (n != 2) errorKan1("%s\n","shell: << keep_tmp_files value >>");
       if (strcmp("0",KopString(getoa(ob,1))) == 0) {
         KeepTmpFiles = 0;
       }else{
         KeepTmpFiles = 1;
       }
       rob = KpoInteger(KeepTmpFiles);
     }else if (strcmp(cmd,"killall")==0) {
           /* It is called from ctrl-C hook of oxrfc103.sm1 */
           fprintf(stderr,"Killing all child processes (oxshell) ...");
       rob = KpoInteger(oxKillAll());
           fprintf(stderr,"\nDone.\n");
   }else{    }else{
     rob = oxsExecuteBlocked(ob);      rob = oxsExecuteBlocked(ob);
   }    }

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>