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 | * | |
e692f66f | 10 | * @(#)ed.h 5.3 (Berkeley) %G% |
e01daa07 KB |
11 | */ |
12 | ||
e692f66f | 13 | #define FILENAME_LEN PATH_MAX |
ecbf4ad0 KB |
14 | #define JMP_SET (int)0 |
15 | #define INTERUPT (int)1 | |
16 | #define HANGUP (int)2 | |
e692f66f KB |
17 | #define SIGINT_ACTION longjmp(ctrl_position, INTERUPT) |
18 | #define SIGINT_ILACTION longjmp(ctrl_position2, INTERUPT) | |
ecbf4ad0 KB |
19 | #define SIGHUP_ACTION longjmp(ctrl_position, HANGUP) |
20 | #define NN_MAX_START 510 | |
e692f66f KB |
21 | #ifndef STDOUT_FILENO |
22 | #define STDOUT_FILENO 1 | |
23 | #endif | |
e01daa07 KB |
24 | |
25 | typedef struct A { | |
ecbf4ad0 | 26 | struct A *above, *below; |
e692f66f KB |
27 | #ifdef STDIO |
28 | long handle; | |
29 | #endif | |
30 | #ifdef DBI | |
ecbf4ad0 | 31 | recno_t handle; |
e692f66f KB |
32 | #endif |
33 | #ifdef MEMORY | |
34 | char *handle; | |
35 | #endif | |
ecbf4ad0 KB |
36 | size_t len; |
37 | } LINE; | |
e01daa07 KB |
38 | |
39 | struct MARK { | |
ecbf4ad0 KB |
40 | LINE *address; |
41 | }; | |
e01daa07 KB |
42 | |
43 | struct g_list { | |
ecbf4ad0 KB |
44 | struct g_list *next; |
45 | LINE *cell; | |
46 | }; | |
e01daa07 KB |
47 | |
48 | struct u_layer { | |
ecbf4ad0 KB |
49 | LINE *val, **cell; |
50 | struct u_layer *below; | |
51 | }; | |
e01daa07 KB |
52 | |
53 | struct d_layer { | |
ecbf4ad0 KB |
54 | LINE *begin, *end; |
55 | struct d_layer *next; | |
56 | }; | |
e01daa07 KB |
57 | |
58 | extern int nn_max, nn_max_flag, start_default, End_default, address_flag; | |
59 | extern LINE *nn_max_start, *nn_max_end, *start, *End, *current; | |
60 | extern char *text, *prompt_string, help_msg[]; | |
61 | extern struct MARK mark_matrix[]; | |
62 | extern char *filename_current, *buf; | |
63 | extern int zsnum; /* z sticky number */ | |
64 | extern LINE *top, *bottom; /* ...of the buffer */ | |
65 | extern int ss, explain_flag, name_set; | |
e692f66f | 66 | extern int filename_flag, add_flag, join_flag; |
e01daa07 KB |
67 | extern long change_flag; |
68 | extern int pat_err, flag, g_flag, GV_flag, printsfx; | |
69 | ||
e692f66f KB |
70 | #ifdef STDIO |
71 | extern FILE *fhtmp; | |
72 | extern int file_seek; | |
73 | extern char *template; | |
74 | #endif | |
75 | ||
76 | #ifdef DBI | |
e01daa07 KB |
77 | extern DB *dbhtmp; |
78 | extern char *template; | |
e692f66f | 79 | #endif |
e01daa07 KB |
80 | |
81 | extern struct u_layer *u_stk; | |
82 | extern LINE *u_current, *u_top, *u_bottom; | |
83 | extern int u_set, line_length; | |
84 | extern struct d_layer *d_stk; | |
85 | ||
e692f66f KB |
86 | extern int sigint_flag, sighup_flag, sigspecial, sigspecial2; |
87 | extern jmp_buf ctrl_position, ctrl_position2; | |
e01daa07 KB |
88 | |
89 | #define RE_SEC 10 | |
90 | extern regex_t RE_comp; | |
91 | extern regmatch_t RE_match[]; | |
92 | extern int RE_sol, RE_flag; | |
93 | extern char *RE_patt; |