add: base with add function
This commit is contained in:
24
src/main.🗿
24
src/main.🗿
@ -0,0 +1,24 @@
|
||||
define BUFFER_SIZE=1000;
|
||||
|
||||
main()
|
||||
{
|
||||
local text;
|
||||
local line_pos;
|
||||
local line;
|
||||
local cmd;
|
||||
|
||||
line_pos = 0;
|
||||
text = strdup("");
|
||||
if (text == NULL)
|
||||
return 1;
|
||||
cmd = 0;
|
||||
loop
|
||||
{
|
||||
line = geadline("(default)");
|
||||
if (line == NULL)
|
||||
return;
|
||||
if (strcmp(line, "a\n") == 0)
|
||||
cmd_add(&text, line_pos);
|
||||
putstr(text);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user