bin/sh/exec.c
/*
 * Called when a cd is done.  Marks all commands so the next time they
 * are executed they will be rehashed.
 */
Called when a cd is done.  Marks all commands so the next time they
are executed they will be rehashed.
Called when a cd is done . Marks all commands so the next time they are executed they will be rehashed .
void
hashcd() {
	struct tblentry **pp;
	struct tblentry *cmdp;
	for (pp = cmdtable ; pp < &cmdtable[CMDTABLESIZE] ; pp++) {
		for (cmdp = *pp ; cmdp ; cmdp = cmdp->next) {
			if (cmdp->cmdtype == CMDNORMAL
			 || (cmdp->cmdtype == CMDBUILTIN && builtinloc >= 0))
				cmdp->rehash = 1;
		}
	}
}
void hashcd ( ) { struct tblentry * * pp ; struct tblentry * cmdp ; for ( pp = cmdtable ; pp < & cmdtable [ CMDTABLESIZE ] ; pp ++ ) { for ( cmdp = * pp ; cmdp ; cmdp = cmdp -> next ) { if ( cmdp -> cmdtype == CMDNORMAL || ( cmdp -> cmdtype == CMDBUILTIN && builtinloc >= 0 ) ) cmdp -> rehash = 1 ; } } }
Called when a cd is done.
Called when a cd is done .