ast_comparator/test/student_data/handout/shlab-handout/cases/reference_22_tsh.c
/*
 * Requires:
 *   Nothing.
 *
 * Effects:
 *   Returns the job ID for the job with process ID "pid" or 0 if no such
 *   job exists.
 */
Nothing.

Returns the job ID for the job with process ID "pid" or 0 if no such
job exists.
Nothing . Returns the job ID for the job with process ID " pid " or 0 if no such job exists .
static int
pid2jid(pid_t pid) 
{
	int i;
	if (pid < 1)
		return (0);
	for (i = 0; i < MAXJOBS; i++)
		if (jobs[i].pid == pid)
			return (jobs[i].jid);
	return (0);
}
static int pid2jid ( pid_t pid ) { int i ; if ( pid < 1 ) return ( 0 ) ; for ( i = 0 ; i < MAXJOBS ; i ++ ) if ( jobs [ i ] . pid == pid ) return ( jobs [ i ] . jid ) ; return ( 0 ) ; }
Requires:
   Nothing.
Requires : Nothing .