1 2 /******************************************** 3 files.h 4 copyright 1991, Michael D. Brennan 5 6 This is a source file for mawk, an implementation of 7 the AWK programming language. 8 9 Mawk is distributed without warranty under the terms of 10 the GNU General Public License, version 2, 1991. 11 ********************************************/ 12 13 /*$Log: files.h,v $ 14 * Revision 1.3 1996/01/14 17:14:11 mike 15 * flush_all_output() 16 * 17 * Revision 1.2 1994/12/11 22:14:13 mike 18 * remove THINK_C #defines. Not a political statement, just no indication 19 * that anyone ever used it. 20 * 21 * Revision 1.1.1.1 1993/07/03 18:58:13 mike 22 * move source to cvs 23 * 24 * Revision 5.2 1992/12/17 02:48:01 mike 25 * 1.1.2d changes for DOS 26 * 27 * Revision 5.1 1991/12/05 07:59:18 brennan 28 * 1.1 pre-release 29 * 30 */ 31 32 #ifndef FILES_H 33 #define FILES_H 34 35 /* IO redirection types */ 36 #define COP_IN (-7) 37 #define COP_OUT (-6) 38 #define F_IN (-5) 39 #define PIPE_IN (-4) 40 #define PIPE_OUT (-3) 41 #define F_APPEND (-2) 42 #define F_TRUNC (-1) 43 #define IS_OUTPUT(type) ((type)>=PIPE_OUT) 44 45 extern char *shell ; /* for pipes and system() */ 46 47 PTR PROTO(file_find, (STRING *, int)) ; 48 int PROTO(file_close, (STRING *)) ; 49 int PROTO(file_flush, (STRING *)) ; 50 void PROTO(flush_all_output, (void)) ; 51 PTR PROTO(get_pipe, (char *, int, int *) ) ; 52 int PROTO(wait_for, (int) ) ; 53 void PROTO( close_out_pipes, (void) ) ; 54 55 #if HAVE_FAKE_PIPES 56 void PROTO(close_fake_pipes, (void)) ; 57 int PROTO(close_fake_outpipe, (char *,int)) ; 58 char *PROTO(tmp_file_name, (int, char*)) ; 59 #endif 60 61 #if MSDOS 62 int PROTO(DOSexec, (char *)) ; 63 int PROTO(binmode, (void)) ; 64 void PROTO(set_binmode, (int)) ; 65 void PROTO(enlarge_output_buffer, (FILE*)) ; 66 #endif 67 68 69 #endif 70