for (path = (char *)NULL, argc = wordCount - 1, argv = words + 1;
for (path = NULL, argc = wordCount - 1, argv = words + 1;
Job_ParseShell (line)    char	  *line;  /* The shell spec */{    char    	  **words;    int	    	  wordCount;    register char **argv;    register int  argc;    char    	  *path;    Shell   	  newShell;    Boolean 	  fullSpec = FALSE;    while (isspace (*line)) {	line++;    }    words = brk_string (line, &wordCount, TRUE);    memset ((Address)&newShell, 0, sizeof(newShell));        /*     * Parse the specification by keyword     */    for (path = (char *)NULL, argc = wordCount - 1, argv = words + 1;	 argc != 0;	 argc--, argv++) {	     if (strncmp (*argv, "path=", 5) == 0) {		 path = &argv[0][5];	     } else if (strncmp (*argv, "name=", 5) == 0) {		 newShell.name = &argv[0][5];	     } else {		 if (strncmp (*argv, "quiet=", 6) == 0) {		     newShell.echoOff = &argv[0][6];		 } else if (strncmp (*argv, "echo=", 5) == 0) {		     newShell.echoOn = &argv[0][5];		 } else if (strncmp (*argv, "filter=", 7) == 0) {		     newShell.noPrint = &argv[0][7];		     newShell.noPLen = strlen(newShell.noPrint);		 } else if (strncmp (*argv, "echoFlag=", 9) == 0) {		     newShell.echo = &argv[0][9];		 } else if (strncmp (*argv, "errFlag=", 8) == 0) {		     newShell.exit = &argv[0][8];		 } else if (strncmp (*argv, "hasErrCtl=", 10) == 0) {		     char c = argv[0][10];		     newShell.hasErrCtl = !((c != 'Y') && (c != 'y') &&					    (c != 'T') && (c != 't'));		 } else if (strncmp (*argv, "check=", 6) == 0) {		     newShell.errCheck = &argv[0][6];		 } else if (strncmp (*argv, "ignore=", 7) == 0) {		     newShell.ignErr = &argv[0][7];		 } else {		     Parse_Error (PARSE_FATAL, "Unknown keyword \"%s\"",				  *argv);		     return (FAILURE);		 }		 fullSpec = TRUE;	     }    }    if (path == (char *)NULL) {	/*	 * If no path was given, the user wants one of the pre-defined shells,	 * yes? So we find the one s/he wants with the help of JobMatchShell	 * and set things up the right way. shellPath will be set up by	 * Job_Init.	 */	if (newShell.name == (char *)NULL) {	    Parse_Error (PARSE_FATAL, "Neither path nor name specified");	    return (FAILURE);	} else {	    commandShell = JobMatchShell (newShell.name);	    shellName = newShell.name;	}    } else {	/*	 * The user provided a path. If s/he gave nothing else (fullSpec is	 * FALSE), try and find a matching shell in the ones we know of.	 * Else we just take the specification at its word and copy it	 * to a new location. In either case, we need to record the	 * path the user gave for the shell.	 */	shellPath = path;	path = strrchr (path, '/');	if (path == (char *)NULL) {	    path = shellPath;	} else {	    path += 1;	}	if (newShell.name != (char *)NULL) {	    shellName = newShell.name;	} else {	    shellName = path;	}	if (!fullSpec) {	    commandShell = JobMatchShell (shellName);	} else {	    commandShell = (Shell *) emalloc(sizeof(Shell));	    *commandShell = newShell;	}    }    if (commandShell->echoOn && commandShell->echoOff) {	commandShell->hasEchoCtl = TRUE;    }        if (!commandShell->hasErrCtl) {	if (commandShell->errCheck == (char *)NULL) {	    commandShell->errCheck = "";	}	if (commandShell->ignErr == (char *)NULL) {	    commandShell->ignErr = "%s\n";	}    }        /*     * Do not free up the words themselves, since they might be in use by the     * shell specification...     */    free (words);    return SUCCESS;}