annotate 3rdparty/packages/ed/setbuf.c @ 994:bef1844de0dc

The ED editor ported from Minix
author roug
date Sun, 23 Feb 2003 21:11:37 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
994
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
1 /* setbuf.c */
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
2 #include <stdio.h>
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
3 #include "tools.h"
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
4 #include "ed.h"
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
5
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
6 relink(a, x, y, b)
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
7 LINE *a, *x, *y, *b;
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
8 {
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
9 x->l_prev = a;
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
10 y->l_next = b;
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
11 }
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
12
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
13 clrbuf()
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
14 {
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
15 del(1, lastln);
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
16 }
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
17
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
18 set_buf()
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
19 {
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
20 relink(&line0, &line0, &line0, &line0);
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
21 curln = lastln = 0;
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
22 }
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
23