-
Notifications
You must be signed in to change notification settings - Fork 1
/
COPYONB.C
50 lines (43 loc) · 1.78 KB
/
COPYONB.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#include "zedit.h"
void copyonb(
register struct lineptrs *place)
/**********************************************************************/
/* */
/* Copy a block of lines onto another block of lines. If the source */
/* is less lines than the destination, then the source will repeat */
/* from the begining. Either the source or the destination may be */
/* only one or a block. */
/* */
/**********************************************************************/
/* */
/* This is ZEDIT source material. */
/* */
/* ZEDIT Source Materials are intellectual property */
/* (c) Copyright 1987,2001 by Clyde Thomas Zuber. */
/* */
/**********************************************************************/
{
register struct bufline *frln;
register struct bufline *toln;
frln = place -> copyst;
toln = place -> onst;
while (toln != place -> onfn -> next)
{
if (frln == place -> copyfn -> next)
frln = place -> copyst;
if (frln -> status & ST_PROT)
frln = frln -> next;
else if (toln -> status & ST_PROT)
toln = toln -> next;
else
{
mergeon(frln -> bline, toln -> bline);
toln = toln -> next;
frln = frln -> next;
} /* end else */
} /* end while */
place -> copyst = NULL;
place -> copyfn = NULL;
place -> onst = NULL;
place -> onfn = NULL;
} /* end copyonb */