prog.c: In function 'work':
prog.c:3:8: warning: implicit declaration of function 'check_cd' [-Wimplicit-function-declaration]
if(check_cd(line))
^
prog.c:5:5: warning: implicit declaration of function 'strcpy' [-Wimplicit-function-declaration]
strcpy(line , buf);
^
prog.c:5:5: warning: incompatible implicit declaration of built-in function 'strcpy'
prog.c:5:5: note: include '<string.h>' or provide a declaration of 'strcpy'
prog.c:5:19: error: 'buf' undeclared (first use in this function)
strcpy(line , buf);
^
prog.c:5:19: note: each undeclared identifier is reported only once for each function it appears in
prog.c:6:5: error: unknown type name 'pid_t'
pid_t pid = fork();
^
prog.c:6:17: warning: implicit declaration of function 'fork' [-Wimplicit-function-declaration]
pid_t pid = fork();
^
prog.c:8:20: warning: implicit declaration of function 'back_ground_check' [-Wimplicit-function-declaration]
int bol_flag = back_ground_check(line);
^
prog.c:12:23: warning: implicit declaration of function 'getenv' [-Wimplicit-function-declaration]
char *paths = getenv("PATH" );
^
prog.c:12:23: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
prog.c:13:23: warning: implicit declaration of function 'strtok' [-Wimplicit-function-declaration]
char *token = strtok(paths , ":");
^
prog.c:13:23: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
prog.c:14:12: warning: implicit declaration of function 'strstr' [-Wimplicit-function-declaration]
if(strstr(line, "echo") != NULL) {
^
prog.c:14:12: warning: incompatible implicit declaration of built-in function 'strstr'
prog.c:14:12: note: include '<string.h>' or provide a declaration of 'strstr'
prog.c:14:36: error: 'NULL' undeclared (first use in this function)
if(strstr(line, "echo") != NULL) {
^
prog.c:15:13: warning: implicit declaration of function 'parse_echo' [-Wimplicit-function-declaration]
parse_echo(line , argo);
^
prog.c:18:13: warning: implicit declaration of function 'parse' [-Wimplicit-function-declaration]
parse(line , argo);
^
prog.c:19:12: warning: implicit declaration of function 'execv' [-Wimplicit-function-declaration]
if(execv (*argo , argo)>0)
^
prog.c:27:13: warning: implicit declaration of function 'strcat' [-Wimplicit-function-declaration]
strcat(temp2 , *argo);
^
prog.c:27:13: warning: incompatible implicit declaration of built-in function 'strcat'
prog.c:27:13: note: include '<string.h>' or provide a declaration of 'strcat'
prog.c:33:9: warning: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
exit(1);
^
prog.c:33:9: warning: incompatible implicit declaration of built-in function 'exit'
prog.c:33:9: note: include '<stdlib.h>' or provide a declaration of 'exit'
prog.c:37:9: warning: incompatible implicit declaration of built-in function 'exit'
exit(1);
^
prog.c:37:9: note: include '<stdlib.h>' or provide a declaration of 'exit'
prog.c:42:20: warning: implicit declaration of function 'wait' [-Wimplicit-function-declaration]
while (wait(&status) != pid) ;
^