diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/3rdparty/packages/ed/setbuf.c	Sun Feb 23 21:11:37 2003 +0000
@@ -0,0 +1,23 @@
+/*      setbuf.c        */
+#include <stdio.h>
+#include "tools.h"
+#include "ed.h"
+
+relink(a, x, y, b)
+LINE *a, *x, *y, *b;
+{
+  x->l_prev = a;
+  y->l_next = b;
+}
+
+clrbuf()
+{
+  del(1, lastln);
+}
+
+set_buf()
+{
+  relink(&line0, &line0, &line0, &line0);
+  curln = lastln = 0;
+}
+