1: /* $Header$ */ 2: 3: /* 4: * Author: Peter J. Nicklin 5: */ 6: 7: /* 8: * getshell() returns the value the SHELL environment variable (usually 9: * the pathname of the user's command interpreter). If SHELL is undefined, 10: * getshell() returns SH (defined in header file bin.h). 11: */ 12: #include "bin.h" 13: #include "null.h" 14: 15: char * 16: getshell() 17: { 18: char *shell; /* command shell pathname */ 19: char *getenv(); /* get environment variable */ 20: 21: if ((shell = getenv("SHELL")) == NULL) 22: return(SH); 23: else 24: return(shell); 25: }