match = (Shell *) NULL;
match = NULL;
JobMatchShell (name)    char	  *name;      /* Final component of shell path */{    register Shell *sh;	      /* Pointer into shells table */    Shell	   *match;    /* Longest-matching shell */    register char *cp1,		  *cp2;    char	  *eoname;    eoname = name + strlen (name);    match = (Shell *) NULL;    for (sh = shells; sh->name != NULL; sh++) {	for (cp1 = eoname - strlen (sh->name), cp2 = sh->name;	     *cp1 != '\0' && *cp1 == *cp2;	     cp1++, cp2++) {		 continue;	}	if (*cp1 != *cp2) {	    continue;	} else if (match == (Shell *) NULL ||		   strlen (match->name) < strlen (sh->name)) {		       match = sh;	}    }    return (match == (Shell *) NULL ? sh : match);}