🌈 style:

This commit is contained in:
lzy
2024-05-26 15:39:14 +08:00
parent 6f28a3384a
commit a57bbdb4c1
156 changed files with 765 additions and 770 deletions

View File

@@ -29,9 +29,9 @@ static void prompt(void)
* @param line
* @param res
*/
static void parse(char *line, struct cmd_st *res)
static void parse(char* line, struct cmd_st* res)
{
char *tok;
char* tok;
int i = 0;
//* 根据分隔符分割小串
@@ -52,16 +52,16 @@ static void parse(char *line, struct cmd_st *res)
}
}
int main(int argc, char **argv)
int main(int argc, char** argv)
{
char *linebuf = NULL;
char* linebuf = NULL;
size_t linebuf_size = 0;
struct cmd_st cmd;
pid_t pid;
while (1)
{
prompt();
prompt( );
if (getline(&linebuf, &linebuf_size, stdin) < 0)
break;
@@ -74,7 +74,7 @@ int main(int argc, char **argv)
}
else // 外部命令
{
pid = fork();
pid = fork( );
if (pid < 0)
{
perror("fork");