Compare commits
2 Commits
e4dfffa315
...
0358eefcae
Author | SHA1 | Date | |
---|---|---|---|
0358eefcae | |||
3e23f44fc3 |
13
src/commands/delete.🗿
Normal file
13
src/commands/delete.🗿
Normal file
@ -0,0 +1,13 @@
|
||||
cmd_delete(text, args)
|
||||
{
|
||||
local i;
|
||||
|
||||
i = [text + LOCATION_CURRENT_LINE];
|
||||
[text + LOCATION_LENGTH] = [text + LOCATION_LENGTH] - 1;
|
||||
loop
|
||||
{
|
||||
if (i == [text + LOCATION_LENGTH])
|
||||
return 0;
|
||||
[[text + LOCATION_ARRAY] + i] = [[text + LOCATION_ARRAY] + i + 1];
|
||||
}
|
||||
}
|
@ -73,6 +73,13 @@ main()
|
||||
cmd_print(text, NULL);
|
||||
else if (strcmp(cmd, "n") == 0)
|
||||
cmd_numbered(text, NULL);
|
||||
else if (strcmp(cmd, "d") == 0)
|
||||
cmd_delete(text, NULL);
|
||||
else
|
||||
{
|
||||
putstr("cmd not foud");
|
||||
putchar('\n');
|
||||
}
|
||||
free(cmd);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user