diff options
author | Jari Aalto <jari.aalto@cante.net> | 1996-12-23 17:02:34 +0000 |
---|---|---|
committer | Jari Aalto <jari.aalto@cante.net> | 2009-09-12 16:46:49 +0000 |
commit | ccc6cda312fea9f0468ee65b8f368e9653e1380b (patch) | |
tree | b059878adcfd876c4acb8030deda1eeb918c7e75 /input.h | |
parent | 726f63884db0132f01745f1fb4465e6621088ccf (diff) | |
download | bash-ccc6cda312fea9f0468ee65b8f368e9653e1380b.tar.gz |
Imported from ../bash-2.0.tar.gz.
Diffstat (limited to 'input.h')
-rw-r--r-- | input.h | 28 |
1 files changed, 14 insertions, 14 deletions
@@ -17,28 +17,23 @@ with Bash; see the file COPYING. If not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ -#if !defined (_INPUT_H) -#define _INPUT_H +#if !defined (_INPUT_H_) +#define _INPUT_H_ #include "stdc.h" /* Function pointers can be declared as (Function *)foo. */ -#if !defined (__FUNCTION_DEF) -# define __FUNCTION_DEF +#if !defined (_FUNCTION_DEF) +# define _FUNCTION_DEF typedef int Function (); typedef void VFunction (); typedef char *CPFunction (); typedef char **CPPFunction (); #endif /* _FUNCTION_DEF */ -/* Some stream `types'. */ -#define st_none 0 -#define st_stream 1 -#define st_string 2 -#define st_stdin 3 +enum stream_type {st_none, st_stdin, st_stream, st_string, st_bstream}; #if defined (BUFFERED_INPUT) -#define st_bstream 4 /* Possible values for b_flag. */ #define B_EOF 0x1 @@ -74,7 +69,7 @@ typedef union { } INPUT_STREAM; typedef struct { - int type; + enum stream_type type; char *name; INPUT_STREAM location; Function *getter; @@ -89,14 +84,19 @@ extern void init_yy_io __P((Function *, Function *, int, char *, INPUT_STREAM)); extern void with_input_from_stdin __P((void)); extern void with_input_from_string __P((char *, char *)); extern void with_input_from_stream __P((FILE *, char *)); -extern int push_stream __P((void)); -extern int pop_stream __P((void)); +extern void push_stream __P((int)); +extern void pop_stream __P((void)); +extern int stream_on_stack __P((enum stream_type)); extern char *read_secondary_line __P((int)); extern int find_reserved_word __P((char *)); extern char *decode_prompt_string __P((char *)); extern void gather_here_documents __P((void)); extern void execute_prompt_command __P((char *)); +/* Functions from input.c */ +extern int getc_with_restart (); +extern int ungetc_with_restart (); + #if defined (BUFFERED_INPUT) /* Functions from input.c. */ extern int check_bash_input __P((int)); @@ -112,4 +112,4 @@ extern int buffered_ungetchar __P((int)); extern void with_input_from_buffered_stream __P((int, char *)); #endif /* BUFFERED_INPUT */ -#endif /* _INPUT_H */ +#endif /* _INPUT_H_ */ |