dish/loop.c

25 lines
419 B
C
Raw Normal View History

2022-09-18 06:46:23 +00:00
/*
* @Author: 1ridic
* @Date: 2022-09-18 14:13:53
* @Last Modified by: 1ridic
* @Last Modified time: 2022-09-18 14:13:53
*/
2022-09-18 05:14:30 +00:00
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "line.h"
#include "loop.h"
#include "exec.h"
int loop() {
char *line;
char **args;
printf("> ");
line = readLine();
args = splitLine(line);
2022-09-18 06:46:23 +00:00
commandExec(args);
2022-09-18 05:14:30 +00:00
free(line);
free(args);
return 0;
}