[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.10 and 1.12

version 1.10, 2004/02/05 10:35:04 version 1.12, 2004/10/14 10:08:09
Line 1 
Line 1 
 /* $OpenXM: OpenXM/src/kan96xx/Kan/shell.c,v 1.9 2003/12/13 13:29:44 takayama Exp $ */  /* $OpenXM: OpenXM/src/kan96xx/Kan/shell.c,v 1.11 2004/02/23 09:03:42 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 125  static struct object KoxShell_test1(struct object ob) 
Line 125  static struct object KoxShell_test1(struct object ob) 
     rob = testmain(ob);      rob = testmain(ob);
   }else if (strcmp(cmd,"which")==0) {    }else if (strcmp(cmd,"which")==0) {
     if (n == 2) {      if (n == 2) {
         pathFinderErrorVerbose(0);
       rob = KoxWhich(getoa(ob,1),KpoInteger(0));        rob = KoxWhich(getoa(ob,1),KpoInteger(0));
         pathFinderErrorVerbose(-1);
     }else if (n==3) {      }else if (n==3) {
         pathFinderErrorVerbose(0);
       rob = KoxWhich(getoa(ob,1),getoa(ob,2));        rob = KoxWhich(getoa(ob,1),getoa(ob,2));
         pathFinderErrorVerbose(-1);
     }else{      }else{
       errorKan1("%s\n","shell: << which command-name >> or << which command-name path >>");        errorKan1("%s\n","shell: << which command-name >> or << which command-name path >>");
     }      }
Line 180  static int mysetenv(char *name, char *value, int overw
Line 184  static int mysetenv(char *name, char *value, int overw
   char *orig;    char *orig;
   s = (char *)getenv(name);    s = (char *)getenv(name);
   if ((s == NULL) || overwrite) {    if ((s == NULL) || overwrite) {
         s = (char *) malloc(strlen(name)+strlen(value)+5);          s = (char *) mymalloc(strlen(name)+strlen(value)+5);
         if (s == 0) { fprintf(stderr,"No more memory.\n"); exit(10); }          if (s == 0) { fprintf(stderr,"No more memory.\n"); exit(10); }
     strcpy(s,name);      strcpy(s,name);
         strcat(s,"="); strcat(s,value);          strcat(s,"="); strcat(s,value);

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.12

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