/* $OpenXM: OpenXM/src/kan96xx/Kan/shell.c,v 1.1 2003/11/24 12:38:17 takayama Exp $ */ #include #include #include #include #include #include #include #include "datatype.h" #include "stackm.h" #include "extern.h" #include "extern2.h" #include #include "plugin.h" #include "kclass.h" #include #include "ox_pathfinder.h" /* Functions for ox_shell */ struct object KoxWhich(struct object cmdo,struct object patho) { struct object rob; char *sss; rob = NullObject; if (cmdo.tag != Sdollar) errorKan1("%s\n","KoxWhich(str-obj,str-obj)"); if (patho.tag == Sdollar) { sss=oxWhich(KopString(cmdo),KopString(patho)); if (sss != NULL) rob=KpoString(sss); else{ sss=getCommandPath(KopString(cmdo)); if (sss != NULL) rob=KpoString(sss); } }else{ sss=getCommandPath(KopString(cmdo)); if (sss != NULL) rob=KpoString(sss); } return(rob); }