-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.c
More file actions
43 lines (38 loc) · 963 Bytes
/
main.c
File metadata and controls
43 lines (38 loc) · 963 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
42
43
//
// Created by Magdalena Sawicka on 25.04.2021.
//
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
#include <signal.h>
#include <errno.h>
#include "arguments.h"
#include "builtinsfunc.h"
#include "execute.h"
#include "history.h"
#define clear() printf("\033[H\033[J")
int main(){
char* user = malloc(16 * sizeof(char));
write(STDOUT_FILENO, "Your user name: ", 15);
mread(user);
introduction(user);
handle_commands(user);
/* showUserName_and_Dir(user);
char** line = (char**)malloc(50*sizeof(char*));
for(int i=0; i<50;i++){
line[i]=(char*)malloc(20*sizeof(char));
}
line = readLine();
showUserName_and_Dir(user);
char** tok = (char**)malloc(50*sizeof(char*));
for(int i=0; i<50;i++){
tok[i]=(char*)malloc(20*sizeof(char));
}
tokenize(line, ' ');
fprintf(stdout,"ZYJE");
// write_token(line);
*/
}