xref: /csrg-svn/contrib/ed/a.c (revision 60663)
157674Sbostic /*-
2*60663Sbostic  * Copyright (c) 1992, 1993
3*60663Sbostic  *	The Regents of the University of California.  All rights reserved.
457674Sbostic  *
557674Sbostic  * This code is derived from software contributed to Berkeley by
657674Sbostic  * Rodney Ruddock of the University of Guelph.
757674Sbostic  *
857674Sbostic  * %sccs.include.redist.c%
957674Sbostic  */
1057674Sbostic 
1157674Sbostic #ifndef lint
12*60663Sbostic static char sccsid[] = "@(#)a.c	8.1 (Berkeley) 05/31/93";
1357674Sbostic #endif /* not lint */
1457674Sbostic 
1557710Sbostic #include <sys/types.h>
1657710Sbostic 
1758314Sbostic #ifdef DBI
1857710Sbostic #include <db.h>
1958314Sbostic #endif
2057710Sbostic #include <regex.h>
2157710Sbostic #include <setjmp.h>
2257710Sbostic #include <stdio.h>
2357710Sbostic 
2457674Sbostic #include "ed.h"
2557710Sbostic #include "extern.h"
2657674Sbostic 
2757674Sbostic /*
2857674Sbostic  * This sets things up for the central input routine to place the text
2957674Sbostic  * at the proper location for an append.
3057674Sbostic  */
3157674Sbostic void
a(inputt,errnum)3257674Sbostic a(inputt, errnum)
3357710Sbostic 	FILE *inputt;
3457710Sbostic 	int *errnum;
3557674Sbostic {
3657710Sbostic 	if (rol(inputt, errnum))
3757710Sbostic 		return;
3857674Sbostic 
3957710Sbostic 	if (g_flag == 0)
4057710Sbostic 		u_clr_stk();
4157710Sbostic 	add_flag = 1;
4257710Sbostic 	input_lines(inputt, errnum);
4357710Sbostic 	add_flag = 0;
4457710Sbostic }
45