Mercurial > hg > Members > kono > nitros9-code
annotate 3rdparty/packages/ed/del.c @ 1942:b41df77588b0
printer is now scbbp
sio is now scbbt
All references changed in various files
author | boisy |
---|---|
date | Sat, 26 Nov 2005 22:51:50 +0000 |
parents | bef1844de0dc |
children |
rev | line source |
---|---|
994 | 1 /* del.c */ |
2 #include <stdio.h> | |
3 #include "tools.h" | |
4 #include "ed.h" | |
5 | |
6 int del(from, to) | |
7 int from, to; | |
8 { | |
9 LINE *first, *last, *next, *tmp; | |
10 | |
11 if (from < 1) from = 1; | |
12 first = getptr(prevln(from)); | |
13 last = getptr(nextln(to)); | |
14 next = first->l_next; | |
15 while (next != last && next != &line0) { | |
16 tmp = next->l_next; | |
17 free((char *) next); | |
18 next = tmp; | |
19 } | |
20 relink(first, last, first, last); | |
21 lastln -= (to - from) + 1; | |
22 curln = prevln(from); | |
23 return(0); | |
24 } | |
25 |