commit 7ae8ccd4ae5a9e2876fee14b171d5b2e0b53b7a6
parent 21447b74b0de70994727e99254f4290c3d02d173
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Sat, 12 Dec 2015 19:10:56 +0100
Move parsing functions from subs() to docmd()
This is similar to how is done in the rest of the commands,
and it simplifies subs() whichh is going to be complex.
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/ed.c b/ed.c
@@ -895,9 +895,6 @@ subs(void)
int delim, nth, i;
char *s;
- delim = input();
- compile(delim);
- getrhs(delim);
nth = getnth();
for (i = line1; i <= line2; i = nextln(i))
@@ -985,6 +982,9 @@ repeat:
break;
case 's':
deflines(curln, curln);
+ c = input();
+ compile(c);
+ getrhs(c);
subs();
chkprint(1);
break;