fix: line + cmd is support
This commit is contained in:
parent
7d48af93de
commit
29c6b66b17
@ -37,7 +37,7 @@ parsing(text, cmd_ptr)
|
||||
if (strcmp(tmp, "") == 0)
|
||||
[cmd_ptr] = strdup("p");
|
||||
else
|
||||
[cmd_ptr] = strdup(input);
|
||||
[cmd_ptr] = strdup(tmp);
|
||||
free(input);
|
||||
if ([cmd_ptr] == NULL)
|
||||
return 1;
|
||||
@ -71,6 +71,8 @@ main()
|
||||
cmd_add(text, NULL);
|
||||
else if (strcmp(cmd, "p") == 0)
|
||||
cmd_print(text, NULL);
|
||||
else if (strcmp(cmd, "n") == 0)
|
||||
cmd_numbered(text, NULL);
|
||||
free(cmd);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user