/* $Id: cmd_source.mc,v 8.8 2012/09/12 19:03:16 ksb Exp $ */ /* should we change the prompt? If one sources /dev/tty they get (ksb) * a subshell -- kinda. */ static int cmd_source(argc, argv, pCS) int argc; char **argv; CMDSET *pCS; { register FILE *fpCmds; register int iRet; iRet = 0; while (0 != --argc) { if ((FILE *)0 == (fpCmds = fopen(*++argv, "r"))) { % fprintf(stderr, "%%s: fopen: %%s: %%s\n", %b, *argv, %E)%; ++iRet; continue; } iRet += cmd_from_file(pCS, fpCmds); (void)fclose(fpCmds); } return iRet; }