aboutsummaryrefslogtreecommitdiffstats
path: root/input.h
diff options
context:
space:
mode:
authorJari Aalto <jari.aalto@cante.net>2001-11-13 17:56:06 +0000
committerJari Aalto <jari.aalto@cante.net>2009-09-12 16:46:54 +0000
commitf73dda092b33638d2d5e9c35375f687a607b5403 (patch)
treef21584e70a444d6a1ecba0fb5e2cf79e8cce91db /input.h
parent28ef6c316f1aff914bb95ac09787a3c83c1815fd (diff)
downloadandroid_external_bash-f73dda092b33638d2d5e9c35375f687a607b5403.tar.gz
android_external_bash-f73dda092b33638d2d5e9c35375f687a607b5403.tar.bz2
android_external_bash-f73dda092b33638d2d5e9c35375f687a607b5403.zip
Imported from ../bash-2.05a.tar.gz.
Diffstat (limited to 'input.h')
-rw-r--r--input.h29
1 files changed, 16 insertions, 13 deletions
diff --git a/input.h b/input.h
index c5ec3b5..59e06cb 100644
--- a/input.h
+++ b/input.h
@@ -27,10 +27,13 @@
# define _FUNCTION_DEF
typedef int Function ();
typedef void VFunction ();
-typedef char *CPFunction ();
-typedef char **CPPFunction ();
+typedef char *CPFunction (); /* no longer used */
+typedef char **CPPFunction (); /* no longer used */
#endif /* _FUNCTION_DEF */
+typedef int sh_cget_func_t __P((void)); /* sh_ivoidfunc_t */
+typedef int sh_cunget_func_t __P((int)); /* sh_intfunc_t */
+
enum stream_type {st_none, st_stdin, st_stream, st_string, st_bstream};
#if defined (BUFFERED_INPUT)
@@ -49,12 +52,12 @@ enum stream_type {st_none, st_stdin, st_stream, st_string, st_bstream};
synchronization. Look in input.c for the implementation. */
typedef struct BSTREAM
{
- int b_fd;
+ int b_fd;
char *b_buffer; /* The buffer that holds characters read. */
size_t b_size; /* How big the buffer is. */
- int b_used; /* How much of the buffer we're using, */
- int b_flag; /* Flag values. */
- int b_inputp; /* The input pointer, index into b_buffer. */
+ size_t b_used; /* How much of the buffer we're using, */
+ int b_flag; /* Flag values. */
+ size_t b_inputp; /* The input pointer, index into b_buffer. */
} BUFFERED_STREAM;
#if 0
@@ -77,18 +80,18 @@ typedef struct {
enum stream_type type;
char *name;
INPUT_STREAM location;
- Function *getter;
- Function *ungetter;
+ sh_cget_func_t *getter;
+ sh_cunget_func_t *ungetter;
} BASH_INPUT;
extern BASH_INPUT bash_input;
/* Functions from parse.y. */
extern void initialize_bash_input __P((void));
-extern void init_yy_io __P((Function *, Function *, enum stream_type, char *, INPUT_STREAM));
+extern void init_yy_io __P((sh_cget_func_t *, sh_cunget_func_t *, enum stream_type, const 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 void with_input_from_string __P((char *, const char *));
+extern void with_input_from_stream __P((FILE *, const char *));
extern void push_stream __P((int));
extern void pop_stream __P((void));
extern int stream_on_stack __P((enum stream_type));
@@ -102,8 +105,8 @@ extern int *save_token_state __P((void));
extern void restore_token_state __P((int *));
/* Functions from input.c */
-extern int getc_with_restart ();
-extern int ungetc_with_restart ();
+extern int getc_with_restart __P((FILE *));
+extern int ungetc_with_restart __P((int, FILE *));
#if defined (BUFFERED_INPUT)
/* Functions from input.c. */