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