ast_comparator/test/student_data/handout/shlab-handout/cases/reference_5_tsh.c
/* 
 * builtin_cmd - Execute the builtin command
 *
 * If the user has requested a built-in command then execute it immediately; 
 * else, call corresponding functions.
 * Return 1 if it is a built-in command; else, return 0.
 */
Execute the builtin command
If the user has requested a built-in command then execute it immediately;
else, call corresponding functions.
Return 1 if it is a built-in command; else, return 0.
Execute the builtin command If the user has requested a built - in command then execute it immediately ; else call corresponding functions . Return 1 if it is a built - in command ; else return 0 .
int 
builtin_cmd(struct cmdline_tokens* tok_ptr)
{
    switch (tok_ptr->builtins) {
        case BUILTIN_NONE:
            return 0;
        case BUILTIN_QUIT:
            exit(0);
        case BUILTIN_JOBS:
            list_job(tok_ptr);
            return 1;
        case BUILTIN_BG:
            background_job(tok_ptr);
            return 1;
        case BUILTIN_FG:
            foreground_job(tok_ptr);
            return 1;
        default:
            return 0;   
    }
}
int builtin_cmd ( struct cmdline_tokens * tok_ptr ) { switch ( tok_ptr -> builtins ) { case BUILTIN_NONE : return 0 ; case BUILTIN_QUIT : exit ( 0 ) ; case BUILTIN_JOBS : list_job ( tok_ptr ) ; return 1 ; case BUILTIN_BG : background_job ( tok_ptr ) ; return 1 ; case BUILTIN_FG : foreground_job ( tok_ptr ) ; return 1 ; default : return 0 ; } }
builtin_cmd - Execute the builtin command
 If the user has requested a built-in command then execute it immediately;
 else, call corresponding functions.
builtin_cmd - Execute the builtin command If the user has requested a built - in command then execute it immediately ; else call corresponding functions .
// not a built-in command