-
Notifications
You must be signed in to change notification settings - Fork 1
/
library.h
91 lines (76 loc) · 1.58 KB
/
library.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#ifndef LIBRARY_H
#define LIBRARY_H
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <string.h>
#include <sys/stat.h>
/**
* struct commands_help - sadsad
* @name: char variable
* @func: void
*/
typedef struct commands_help
{
char *name;
void (*func)();
} help_t;
/**
* struct builtins - sadsad
* @name: dsfasdf
* @func: sadfasdf
*/
typedef struct builtins
{
char *name;
int (*func)();
} builtins_t;
/* Global variables */
extern char **environ;
int cantLoops;
int flag;
void launch(void);
void constructor(char **);
void execute(char **);
char **parse(char *);
char **findpath(char **);
char *path_concat(char *, char *);
char *path_copy(char *);
int isbuiltin(char **, char *);
int issame(char *, char *);
void print_number(int n);
void signals(int);
/* Easter egg functions */
int yazF(void);
/* Help functions */
void exitH(void);
void envH(void);
void unsetH(void);
void helpH(void);
void help_me(void);
/* Builtin functions */
int exitF(char **, char *);
int envF(char **);
int unsetF(char **);
int helpF(char **);
/* Functions derived from the STRING library */
char *_strtok(char *, const char *);
char *_strcat(char *, char *);
int _strncmp(char *, char *, int);
int _strlen(char *);
char *_strdup(char *);
char *_strchr(char *, char);
/* Functions derived from the STDLIB library */
int _atoi(char *);
void *alloc(size_t);
void freeall(char **);
/* Functions derived from the STDIO library */
void _puts(char *);
int _putchar(char);
void exitH(void);
void envH(void);
void unsetenvH(void);
void helpH(void);
#endif