import openbsd kill(1)
[unleashed.git] / bin / ksh / edit.h
blob0b604cd64fbbeab5cbdf1cfc05b1f1c01126688d
1 /* $OpenBSD: edit.h,v 1.12 2018/06/18 17:03:58 millert Exp $ */
3 /* NAME:
4 * edit.h - globals for edit modes
6 * DESCRIPTION:
7 * This header defines various global edit objects.
9 * SEE ALSO:
12 * RCSid:
13 * $From: edit.h,v 1.2 1994/05/19 18:32:40 michael Exp michael $
17 #define BEL 0x07
19 /* tty driver characters we are interested in */
20 typedef struct {
21 int erase;
22 int kill;
23 int werase;
24 int intr;
25 int quit;
26 int eof;
27 } X_chars;
29 extern X_chars edchars;
31 /* x_cf_glob() flags */
32 #define XCF_COMMAND BIT(0) /* Do command completion */
33 #define XCF_FILE BIT(1) /* Do file completion */
34 #define XCF_FULLPATH BIT(2) /* command completion: store full path */
35 #define XCF_COMMAND_FILE (XCF_COMMAND|XCF_FILE)
37 /* edit.c */
38 int x_getc(void);
39 void x_flush(void);
40 int x_putc(int);
41 void x_puts(const char *);
42 bool x_mode(bool);
43 int promptlen(const char *, const char **);
44 int x_do_comment(char *, int, int *);
45 void x_print_expansions(int, char *const *, int);
46 int x_cf_glob(int, const char *, int, int, int *, int *, char ***, int *);
47 int x_longest_prefix(int , char *const *);
48 int x_basename(const char *, const char *);
49 void x_free_words(int, char **);
50 int x_escape(const char *, size_t, int (*)(const char *, size_t));
51 /* emacs.c */
52 int x_emacs(char *, size_t);
53 void x_init_emacs(void);
54 void x_emacs_keys(X_chars *);
55 /* vi.c */
56 int x_vi(char *, size_t);