home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR24 / BASH_112.ZIP / BASH-112.TAR / bash-1.12 / input.h < prev    next >
C/C++ Source or Header  |  1992-01-21  |  611b  |  34 lines

  1. /* input.h -- Structures and unions used for reading input. */
  2.  
  3. #if !defined (_INPUT_H)
  4. #define _INPUT_H
  5.  
  6. /* Function pointers can be declared as (Function *)foo. */
  7. #if !defined (__FUNCTION_DEF)
  8. #  define __FUNCTION_DEF
  9. typedef int Function ();
  10. typedef void VFunction ();
  11. #endif /* _FUNCTION_DEF */
  12.  
  13. /* Some stream `types'. */
  14. #define st_stream 1
  15. #define st_string 2
  16.  
  17. typedef union {
  18.   FILE *file;
  19.   char *string;
  20. } INPUT_STREAM;
  21.  
  22. typedef struct {
  23.   int type;
  24.   char *name;
  25.   INPUT_STREAM location;
  26.   Function *getter;
  27.   Function *ungetter;
  28. } BASH_INPUT;
  29.  
  30. extern BASH_INPUT bash_input;
  31.  
  32. #endif /* _INPUT_H */
  33.  
  34.