-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwish.c
More file actions
41 lines (37 loc) · 772 Bytes
/
wish.c
File metadata and controls
41 lines (37 loc) · 772 Bytes
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
#include <stdlib.h>
#include "structures_constants.h"
#include "main_loop.h"
#include "error.h"
int main(int argc, char **argv)
{
if (argc > 2)
{
error("Too many arguments.\n");
exit(1);
}
if (argc == 1)
{
run_shell(NULL);
}
else
{
run_shell(argv[1]);
}
}
/* void nullify(char* line) {
int character = 0;
while (line[character] != '\0') {
if (line[character] == ' ']) {
line[character] = '\0'
}
}
} */
/* bool check_for_char(char* line, const char mark) {
int character = 0;
while (line[character] != '\0') {
if (line[character] == mark]) {
return true;
}
}
return false;
} */