* Copyright (c) 1992 The Regents of the University of California.
* This code is derived from software contributed to Berkeley by
* Rodney Ruddock of the University of Guelph.
* %sccs.include.redist.c%
static char sccsid
[] = "@(#)d.c 5.3 (Berkeley) %G%";
static void d_add
__P((LINE
*, LINE
*));
* This removes lines in the buffer from user access. The specified
* lines are not really deleted yet(!) as they might be called back
* by an undo. So the pointers from start, End, and neighbours are placed
* in a stack for deletion later when no undo can be performed on these lines.
* The lines in the buffer are freed then as well.
if (start_default
&& End_default
)
strcpy(help_msg
, "buffer empty");
start_default
= End_default
= 0;
ss
= getc(inputt
); /* fed back from join */
if ((u_set
== 0) && (g_flag
== 0))
u_clr_stk(); /* for undo */
if ((start
== NULL
) && (End
== NULL
)) { /* nothing to do... */
d_add(start
, End
); /* for buffer clearing later(!) */
* Now change & preserve the pointers in case of undo and then adjust
u_add_stk(&(top
->above
));
u_add_stk(&(l_temp1
->below
));
(l_temp1
->below
) = End
->below
;
u_add_stk(&(l_temp2
->above
));
(l_temp2
->above
) = start
->above
;
/* To keep track of the marks. */
ku_chk(start
, End
, NULL
);
if (sigint_flag
&& (!sigspecial
)) /* next stable spot */
* This keeps a stack of the start and end lines deleted for clean-up
* later (in d_do()). A stack is used because of the global commands.
l_temp
= malloc(sizeof(struct d_layer
));
(l_temp
->end
) = bottom_d
;
* This cleans up the LINE structures deleted and no longer accessible
* to undo. It performs garbage clean-up on the now non-referenced
/* no garbage collection done currently */
l_db_key
.size
= sizeof(recno_t
);
l_db_key
.data
= &(l_temp2
->handle
);
(dbhtmp
->del
) (dbhtmp
, &l_db_key
, (u_int
) 0);
if ((l_temp
->end
) == l_temp2
)
l_temp2
= l_temp3
->below
;
d_stk
= NULL
; /* just to be sure */
if (sigint_flag
&& (!sigspecial
))