* 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
[] = "@(#)input_lines.c 5.8 (Berkeley) %G%";
* This central function gets text from some file, which can (and most
* oft is) stdin. This flexability allows any text inputing function
register char *l_text
= text
;
LINE
*l_temp_line
, *l_temp1
;
int l_nn_max
= nn_max
, l_jmp_flag
;
Start_default
= End_default
= 0;
/* Start == NULL means line 0 which is legal for this function only. */
nn_max_end
= l_temp_line
= Start
;
u_add_stk(&(top
->above
));
u_add_stk(&(Start
->below
));
if (sigint_flag
&& (!sigspecial
))
if (l_jmp_flag
= setjmp(ctrl_position3
))
/*if (!l_ss)*/ /* 8-bit okay, but NULL not */
l_text
[l_nn
++] = (char)l_ss
;
if ((l_nn
== 2) && (l_text
[0] == '.') && add_flag
)
nn_max_end
= (LINE
*)malloc(sizeof(LINE
));
if (nn_max_end
== NULL
) {
strcpy(help_msg
, "out of memory error");
(nn_max_end
->len
) = l_nn
- 1;
(nn_max_end
->handle
) = add_line(l_text
, l_nn
- 1);
(nn_max_end
->above
) = l_temp_line
;
(nn_max_end
->below
) = NULL
;
(l_temp_line
->below
) = nn_max_end
;
l_temp_line
= nn_max_end
;
calloc(l_nn_max
+ 2, sizeof(char));
strcpy(help_msg
, "out of memory error");
bcopy(l_text2
, l_text
, l_nn
);
point
: current
= nn_max_end
;
if (nn_max_end
!= NULL
) {
(nn_max_end
->below
) = l_temp1
;
u_add_stk(&(l_temp1
->above
));
(l_temp1
->above
) = nn_max_end
;
if (sigint_flag
&& (!sigspecial
))