edit.h revision 1.3 1 1.3 jdolecek /* $NetBSD: edit.h,v 1.3 1999/11/02 22:06:45 jdolecek Exp $ */
2 1.2 tls
3 1.1 jtc /* NAME:
4 1.1 jtc * edit.h - globals for edit modes
5 1.1 jtc *
6 1.1 jtc * DESCRIPTION:
7 1.1 jtc * This header defines various global edit objects.
8 1.1 jtc *
9 1.1 jtc * SEE ALSO:
10 1.1 jtc *
11 1.1 jtc *
12 1.1 jtc * RCSid:
13 1.3 jdolecek * $NetBSD: edit.h,v 1.3 1999/11/02 22:06:45 jdolecek Exp $
14 1.1 jtc *
15 1.1 jtc */
16 1.1 jtc
17 1.1 jtc /* some useful #defines */
18 1.1 jtc #ifdef EXTERN
19 1.1 jtc # define I__(i) = i
20 1.1 jtc #else
21 1.1 jtc # define I__(i)
22 1.1 jtc # define EXTERN extern
23 1.1 jtc # define EXTERN_DEFINED
24 1.1 jtc #endif
25 1.1 jtc
26 1.1 jtc #define BEL 0x07
27 1.1 jtc
28 1.1 jtc /* tty driver characters we are interested in */
29 1.1 jtc typedef struct {
30 1.1 jtc int erase;
31 1.1 jtc int kill;
32 1.1 jtc int werase;
33 1.1 jtc int intr;
34 1.1 jtc int quit;
35 1.1 jtc int eof;
36 1.1 jtc } X_chars;
37 1.1 jtc
38 1.1 jtc EXTERN X_chars edchars;
39 1.1 jtc
40 1.1 jtc /* x_fc_glob() flags */
41 1.1 jtc #define XCF_COMMAND BIT(0) /* Do command completion */
42 1.1 jtc #define XCF_FILE BIT(1) /* Do file completion */
43 1.1 jtc #define XCF_FULLPATH BIT(2) /* command completion: store full path */
44 1.1 jtc #define XCF_COMMAND_FILE (XCF_COMMAND|XCF_FILE)
45 1.1 jtc
46 1.1 jtc /* edit.c */
47 1.1 jtc int x_getc ARGS((void));
48 1.1 jtc void x_flush ARGS((void));
49 1.1 jtc void x_putc ARGS((int c));
50 1.1 jtc void x_puts ARGS((const char *s));
51 1.1 jtc bool_t x_mode ARGS((bool_t onoff));
52 1.1 jtc int promptlen ARGS((const char *cp, const char **spp));
53 1.1 jtc int x_do_comment ARGS((char *buf, int bsize, int *lenp));
54 1.1 jtc void x_print_expansions ARGS((int nwords, char *const *words, int is_command));
55 1.1 jtc int x_cf_glob ARGS((int flags, const char *buf, int buflen, int pos, int *startp,
56 1.1 jtc int *endp, char ***wordsp, int *is_commandp));
57 1.1 jtc int x_longest_prefix ARGS((int nwords, char *const *words));
58 1.1 jtc int x_basename ARGS((const char *s, const char *se));
59 1.1 jtc void x_free_words ARGS((int nwords, char **words));
60 1.3 jdolecek int x_escape ARGS((const char *, size_t, int (*)(const char *s, size_t len)));
61 1.1 jtc /* emacs.c */
62 1.1 jtc int x_emacs ARGS((char *buf, size_t len));
63 1.1 jtc void x_init_emacs ARGS((void));
64 1.1 jtc void x_emacs_keys ARGS((X_chars *ec));
65 1.1 jtc /* vi.c */
66 1.1 jtc int x_vi ARGS((char *buf, size_t len));
67 1.1 jtc
68 1.1 jtc
69 1.1 jtc #ifdef DEBUG
70 1.1 jtc # define D__(x) x
71 1.1 jtc #else
72 1.1 jtc # define D__(x)
73 1.1 jtc #endif
74 1.1 jtc
75 1.1 jtc /* This lot goes at the END */
76 1.1 jtc /* be sure not to interfere with anyone else's idea about EXTERN */
77 1.1 jtc #ifdef EXTERN_DEFINED
78 1.1 jtc # undef EXTERN_DEFINED
79 1.1 jtc # undef EXTERN
80 1.1 jtc #endif
81 1.1 jtc #undef I__
82 1.1 jtc /*
83 1.1 jtc * Local Variables:
84 1.1 jtc * version-control:t
85 1.1 jtc * comment-column:40
86 1.1 jtc * End:
87 1.1 jtc */
88