add multiple access method code back in; signal fix
[unix-history] / usr / src / contrib / ed / ed.h
CommitLineData
e01daa07
KB
1/*-
2 * Copyright (c) 1992 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Rodney Ruddock of the University of Guelph.
7 *
8 * %sccs.include.redist.c%
9 *
ecbf4ad0 10 * @(#)ed.h 5.2 (Berkeley) %G%
e01daa07
KB
11 */
12
ecbf4ad0
KB
13#define FILENAME_LEN 1023
14#define JMP_SET (int)0
15#define INTERUPT (int)1
16#define HANGUP (int)2
17#define SIGINT_ACTION longjmp(ctrl_position, INTERUPT); fflush(stdin)
18#define SIGHUP_ACTION longjmp(ctrl_position, HANGUP)
19#define NN_MAX_START 510
e01daa07
KB
20
21typedef struct A {
ecbf4ad0
KB
22 struct A *above, *below;
23 recno_t handle;
24 size_t len;
25} LINE;
e01daa07
KB
26
27struct MARK {
ecbf4ad0
KB
28 LINE *address;
29};
e01daa07
KB
30
31struct g_list {
ecbf4ad0
KB
32 struct g_list *next;
33 LINE *cell;
34};
e01daa07
KB
35
36struct u_layer {
ecbf4ad0
KB
37 LINE *val, **cell;
38 struct u_layer *below;
39};
e01daa07
KB
40
41struct d_layer {
ecbf4ad0
KB
42 LINE *begin, *end;
43 struct d_layer *next;
44};
e01daa07
KB
45
46extern int nn_max, nn_max_flag, start_default, End_default, address_flag;
47extern LINE *nn_max_start, *nn_max_end, *start, *End, *current;
48extern char *text, *prompt_string, help_msg[];
49extern struct MARK mark_matrix[];
50extern char *filename_current, *buf;
51extern int zsnum; /* z sticky number */
52extern LINE *top, *bottom; /* ...of the buffer */
53extern int ss, explain_flag, name_set;
54extern int filename_flag, add_flag;
55extern long change_flag;
56extern int pat_err, flag, g_flag, GV_flag, printsfx;
57
e01daa07
KB
58extern DB *dbhtmp;
59extern char *template;
e01daa07
KB
60
61extern struct u_layer *u_stk;
62extern LINE *u_current, *u_top, *u_bottom;
63extern int u_set, line_length;
64extern struct d_layer *d_stk;
65
66extern int sigint_flag, sighup_flag;
67extern jmp_buf ctrl_position;
68
69#define RE_SEC 10
70extern regex_t RE_comp;
71extern regmatch_t RE_match[];
72extern int RE_sol, RE_flag;
73extern char *RE_patt;