Commit | Line | Data |
---|---|---|
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 | |
21 | typedef struct A { | |
ecbf4ad0 KB |
22 | struct A *above, *below; |
23 | recno_t handle; | |
24 | size_t len; | |
25 | } LINE; | |
e01daa07 KB |
26 | |
27 | struct MARK { | |
ecbf4ad0 KB |
28 | LINE *address; |
29 | }; | |
e01daa07 KB |
30 | |
31 | struct g_list { | |
ecbf4ad0 KB |
32 | struct g_list *next; |
33 | LINE *cell; | |
34 | }; | |
e01daa07 KB |
35 | |
36 | struct u_layer { | |
ecbf4ad0 KB |
37 | LINE *val, **cell; |
38 | struct u_layer *below; | |
39 | }; | |
e01daa07 KB |
40 | |
41 | struct d_layer { | |
ecbf4ad0 KB |
42 | LINE *begin, *end; |
43 | struct d_layer *next; | |
44 | }; | |
e01daa07 KB |
45 | |
46 | extern int nn_max, nn_max_flag, start_default, End_default, address_flag; | |
47 | extern LINE *nn_max_start, *nn_max_end, *start, *End, *current; | |
48 | extern char *text, *prompt_string, help_msg[]; | |
49 | extern struct MARK mark_matrix[]; | |
50 | extern char *filename_current, *buf; | |
51 | extern int zsnum; /* z sticky number */ | |
52 | extern LINE *top, *bottom; /* ...of the buffer */ | |
53 | extern int ss, explain_flag, name_set; | |
54 | extern int filename_flag, add_flag; | |
55 | extern long change_flag; | |
56 | extern int pat_err, flag, g_flag, GV_flag, printsfx; | |
57 | ||
e01daa07 KB |
58 | extern DB *dbhtmp; |
59 | extern char *template; | |
e01daa07 KB |
60 | |
61 | extern struct u_layer *u_stk; | |
62 | extern LINE *u_current, *u_top, *u_bottom; | |
63 | extern int u_set, line_length; | |
64 | extern struct d_layer *d_stk; | |
65 | ||
66 | extern int sigint_flag, sighup_flag; | |
67 | extern jmp_buf ctrl_position; | |
68 | ||
69 | #define RE_SEC 10 | |
70 | extern regex_t RE_comp; | |
71 | extern regmatch_t RE_match[]; | |
72 | extern int RE_sol, RE_flag; | |
73 | extern char *RE_patt; |