work/bootstrap/gec17.c
EIF_BOOLEAN eif_file_access(EIF_FILENAME name, EIF_INTEGER op) {
	switch (op) {
	case 0: /* Does file exist? */
		return (EIF_BOOLEAN) ((-1 != rt_access(name, F_OK)) ? '\01' : '\0');
	case 1: /* Test for search permission */
		return (EIF_BOOLEAN) ((-1 != rt_access(name, X_OK)) ? '\01' : '\0');
	case 2: /* Test for write permission */
		return (EIF_BOOLEAN) ((-1 != rt_access(name, W_OK)) ? '\01' : '\0');
	case 3: /* Test for read permission */
		return (EIF_BOOLEAN) ((-1 != rt_access(name, R_OK)) ? '\01' : '\0');
	default:
		return EIF_FALSE;
	}
}
/*
 * Check whether access permission `op' are possible on file `name' using
 * real UID and real GID. This is probably only useful to setuid or setgid
 * programs.
 */
Check whether access permission `op' are possible on file `name' using
real UID and real GID. This is probably only useful to setuid or setgid
programs.
Check whether access permission ` op ' are possible on file ` name ' using real UID and real GID . This is probably only useful to setuid or setgid programs .
EIF_BOOLEAN eif_file_access(EIF_FILENAME name, EIF_INTEGER op) {
	switch (op) {
	case 0: 
		return (EIF_BOOLEAN) ((-1 != rt_access(name, F_OK)) ? '\01' : '\0');
	case 1: 
		return (EIF_BOOLEAN) ((-1 != rt_access(name, X_OK)) ? '\01' : '\0');
	case 2: 
		return (EIF_BOOLEAN) ((-1 != rt_access(name, W_OK)) ? '\01' : '\0');
	case 3: 
		return (EIF_BOOLEAN) ((-1 != rt_access(name, R_OK)) ? '\01' : '\0');
	default:
		return EIF_FALSE;
	}
}
EIF_BOOLEAN eif_file_access ( EIF_FILENAME name , EIF_INTEGER op ) { switch ( op ) { case 0 : return ( EIF_BOOLEAN ) ( ( -1 != rt_access ( name , F_OK ) ) ? ' \01 ' : ' \0 ' ) ; case 1 : return ( EIF_BOOLEAN ) ( ( -1 != rt_access ( name , X_OK ) ) ? ' \01 ' : ' \0 ' ) ; case 2 : return ( EIF_BOOLEAN ) ( ( -1 != rt_access ( name , W_OK ) ) ? ' \01 ' : ' \0 ' ) ; case 3 : return ( EIF_BOOLEAN ) ( ( -1 != rt_access ( name , R_OK ) ) ? ' \01 ' : ' \0 ' ) ; default : return EIF_FALSE ; } }
Check whether access permission `op' are possible on file `name' using
 real UID and real GID.
Check whether access permission ` op ' are possible on file ` name ' using real UID and real GID .
/* Does file exist? */ /* Test for search permission */ /* Test for write permission */ /* Test for read permission */