diff options
author | 1996-08-14 06:19:10 +0000 | |
---|---|---|
committer | 1996-08-14 06:19:10 +0000 | |
commit | 7cb960a23c276f249cb97cedcfddb0b7adf3674f (patch) | |
tree | f0caedb66ed98b2937e96ada3e7646bad8025ec5 /bin/ksh/edit.h | |
parent | Install iso_addr(3) man page (diff) | |
download | wireguard-openbsd-7cb960a23c276f249cb97cedcfddb0b7adf3674f.tar.xz wireguard-openbsd-7cb960a23c276f249cb97cedcfddb0b7adf3674f.zip |
Import pdksh 5.2.7.
Diffstat (limited to 'bin/ksh/edit.h')
-rw-r--r-- | bin/ksh/edit.h | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/bin/ksh/edit.h b/bin/ksh/edit.h new file mode 100644 index 00000000000..1a8ec4df2f9 --- /dev/null +++ b/bin/ksh/edit.h @@ -0,0 +1,89 @@ +/* $OpenBSD: edit.h,v 1.1.1.1 1996/08/14 06:19:10 downsj Exp $ */ + +/* NAME: + * edit.h - globals for edit modes + * + * DESCRIPTION: + * This header defines various global edit objects. + * + * SEE ALSO: + * + * + * RCSid: + * $From: edit.h,v 1.2 1994/05/19 18:32:40 michael Exp michael $ + * + */ + +/* some useful #defines */ +#ifdef EXTERN +# define I__(i) = i +#else +# define I__(i) +# define EXTERN extern +# define EXTERN_DEFINED +#endif + +#define BEL 0x07 + +/* tty driver characters we are interested in */ +typedef struct { + int erase; + int kill; + int werase; + int intr; + int quit; + int eof; +} X_chars; + +EXTERN X_chars edchars; + +/* x_fc_glob() flags */ +#define XCF_COMMAND BIT(0) /* Do command completion */ +#define XCF_FILE BIT(1) /* Do file completion */ +#define XCF_FULLPATH BIT(2) /* command completion: store full path */ +#define XCF_COMMAND_FILE (XCF_COMMAND|XCF_FILE) + +/* edit.c */ +int x_getc ARGS((void)); +void x_flush ARGS((void)); +void x_putc ARGS((int c)); +void x_puts ARGS((const char *s)); +bool_t x_mode ARGS((bool_t onoff)); +int promptlen ARGS((const char *cp, const char **spp)); +int x_complete_word ARGS((const char *str, int slen, int is_command, int *multiple, char **ret)); +void x_print_expansions ARGS((int nwords, char *const *words, int is_command)); +int x_locate_word ARGS((const char *buf, int buflen, int pos, int *startp, int *is_command)); +int x_cf_glob ARGS((int flags, const char *buf, int buflen, int pos, int *startp, + int *endp, char ***wordsp, int *is_commandp)); +int x_file_glob ARGS((int flags, const char *str, int slen, char ***wordsp)); +int x_command_glob ARGS((int flags, const char *str, int slen, char ***wordsp)); +int x_longest_prefix ARGS((int nwords, char *const *words)); +int x_basename ARGS((const char *s, const char *se)); +void x_free_words ARGS((int nwords, char **words)); +/* emacs.c */ +int x_emacs ARGS((char *buf, size_t len)); +void x_init_emacs ARGS((void)); +void x_emacs_keys ARGS((X_chars *ec)); +/* vi.c */ +int x_vi ARGS((char *buf, size_t len)); + + +#ifdef DEBUG +# define D__(x) x +#else +# define D__(x) +#endif + +/* This lot goes at the END */ +/* be sure not to interfere with anyone else's idea about EXTERN */ +#ifdef EXTERN_DEFINED +# undef EXTERN_DEFINED +# undef EXTERN +#endif +#undef I__ +/* + * Local Variables: + * version-control:t + * comment-column:40 + * End: + */ |