-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.h
36 lines (36 loc) · 948 Bytes
/
main.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef MAIN_H
#define MAIN_H
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <sys/wait.h>
#include <signal.h>
#include <stdbool.h>
#define MAX_C 10
/**
* struct denum - structure that contains vars
* @cnt: lines cnt
*/
typedef struct denum
{
int cnt;
} denum;
void prompt(char **arv, char **envp, bool flg);
int _strcmp(char *s1, char *s2);
char *_strcat(char *dest, char *src);
char *handle_path(char **rgv, char *cmd);
char *_strcpy(char *dest, char *src);
int _strlen(char *s);
void handle_exit(char *cmd);
void runcmd(char **rgv, char **arv, char **envp);
char *trim(char *cmd);
char *_strncpy(char *dest, char *src, int n);
char *get_path(char *cmd);
char *_getenv(char *name);
char **tokenize_env(char *path);
extern char **environ;
/*void geterror(int cnt, char **arv, char *cmd);*/
void geterror(denum *n, char **arv, char *cmd);
/*void search_path(char **rgv, char *cmd, char **envp);*/
#endif