157681Sbostic /*- 257681Sbostic * Copyright (c) 1992 The Regents of the University of California. 357681Sbostic * All rights reserved. 457681Sbostic * 557681Sbostic * This code is derived from software contributed to Berkeley by 657681Sbostic * Rodney Ruddock of the University of Guelph. 757681Sbostic * 857681Sbostic * %sccs.include.redist.c% 957681Sbostic * 10*57710Sbostic * @(#)ed.h 5.2 (Berkeley) 01/23/93 1157681Sbostic */ 1257681Sbostic 13*57710Sbostic #define FILENAME_LEN 1023 14*57710Sbostic #define JMP_SET (int)0 15*57710Sbostic #define INTERUPT (int)1 16*57710Sbostic #define HANGUP (int)2 17*57710Sbostic #define SIGINT_ACTION longjmp(ctrl_position, INTERUPT); fflush(stdin) 18*57710Sbostic #define SIGHUP_ACTION longjmp(ctrl_position, HANGUP) 19*57710Sbostic #define NN_MAX_START 510 2057681Sbostic 2157681Sbostic typedef struct A { 22*57710Sbostic struct A *above, *below; 23*57710Sbostic recno_t handle; 24*57710Sbostic size_t len; 25*57710Sbostic } LINE; 2657681Sbostic 2757681Sbostic struct MARK { 28*57710Sbostic LINE *address; 29*57710Sbostic }; 3057681Sbostic 3157681Sbostic struct g_list { 32*57710Sbostic struct g_list *next; 33*57710Sbostic LINE *cell; 34*57710Sbostic }; 3557681Sbostic 3657681Sbostic struct u_layer { 37*57710Sbostic LINE *val, **cell; 38*57710Sbostic struct u_layer *below; 39*57710Sbostic }; 4057681Sbostic 4157681Sbostic struct d_layer { 42*57710Sbostic LINE *begin, *end; 43*57710Sbostic struct d_layer *next; 44*57710Sbostic }; 4557681Sbostic 4657681Sbostic extern int nn_max, nn_max_flag, start_default, End_default, address_flag; 4757681Sbostic extern LINE *nn_max_start, *nn_max_end, *start, *End, *current; 4857681Sbostic extern char *text, *prompt_string, help_msg[]; 4957681Sbostic extern struct MARK mark_matrix[]; 5057681Sbostic extern char *filename_current, *buf; 5157681Sbostic extern int zsnum; /* z sticky number */ 5257681Sbostic extern LINE *top, *bottom; /* ...of the buffer */ 5357681Sbostic extern int ss, explain_flag, name_set; 5457681Sbostic extern int filename_flag, add_flag; 5557681Sbostic extern long change_flag; 5657681Sbostic extern int pat_err, flag, g_flag, GV_flag, printsfx; 5757681Sbostic 5857681Sbostic extern DB *dbhtmp; 5957681Sbostic extern char *template; 6057681Sbostic 6157681Sbostic extern struct u_layer *u_stk; 6257681Sbostic extern LINE *u_current, *u_top, *u_bottom; 6357681Sbostic extern int u_set, line_length; 6457681Sbostic extern struct d_layer *d_stk; 6557681Sbostic 6657681Sbostic extern int sigint_flag, sighup_flag; 6757681Sbostic extern jmp_buf ctrl_position; 6857681Sbostic 6957681Sbostic #define RE_SEC 10 7057681Sbostic extern regex_t RE_comp; 7157681Sbostic extern regmatch_t RE_match[]; 7257681Sbostic extern int RE_sol, RE_flag; 7357681Sbostic extern char *RE_patt; 74