You should have received a copy of the GNU General Public License along
with Bash; see the file COPYING. If not, write to the Free Software
- Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+ Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#if !defined (_INPUT_H_)
#define _INPUT_H_
#if defined (BUFFERED_INPUT)
/* Possible values for b_flag. */
-#define B_EOF 0x1
-#define B_ERROR 0x2
-#define B_UNBUFF 0x4
+#undef B_EOF
+#undef B_ERROR /* There are some systems with this define */
+#undef B_UNBUFF
+
+#define B_EOF 0x01
+#define B_ERROR 0x02
+#define B_UNBUFF 0x04
+#define B_WASBASHINPUT 0x08
/* A buffered stream. Like a FILE *, but with our own buffering and
synchronization. Look in input.c for the implementation. */
{
int b_fd;
char *b_buffer; /* The buffer that holds characters read. */
- int b_size; /* How big the buffer is. */
+ 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. */
} BUFFERED_STREAM;
+#if 0
extern BUFFERED_STREAM **buffers;
-
-extern BUFFERED_STREAM *fd_to_buffered_stream ();
+#endif
extern int default_buffered_input;
extern void gather_here_documents __P((void));
extern void execute_prompt_command __P((char *));
+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 ();
#if defined (BUFFERED_INPUT)
/* Functions from input.c. */
+extern int fd_is_bash_input __P((int));
+extern int set_bash_input_fd __P((int));
+extern int save_bash_input __P((int, int));
extern int check_bash_input __P((int));
extern int duplicate_buffered_stream __P((int, int));
extern BUFFERED_STREAM *fd_to_buffered_stream __P((int));
+extern BUFFERED_STREAM *set_buffered_stream __P((int, BUFFERED_STREAM *));
extern BUFFERED_STREAM *open_buffered_stream __P((char *));
extern void free_buffered_stream __P((BUFFERED_STREAM *));
extern int close_buffered_stream __P((BUFFERED_STREAM *));