view 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
line wrap: on
line source

/*      del.c   */
#include <stdio.h>
#include "tools.h"
#include "ed.h"

int del(from, to)
int from, to;
{
  LINE *first, *last, *next, *tmp;

  if (from < 1) from = 1;
  first = getptr(prevln(from));
  last = getptr(nextln(to));
  next = first->l_next;
  while (next != last && next != &line0) {
        tmp = next->l_next;
        free((char *) next);
        next = tmp;
  }
  relink(first, last, first, last);
  lastln -= (to - from) + 1;
  curln = prevln(from);
  return(0);
}