/* tfile.h */ /* %Src=tfile.h %Dir=\rltraynh/c/stuff/ %Date=92/10/15-2:28pm */ /* Support for: Line-oriented file read from Src_file */ #ifndef TF_H #define TF_H 1 /* Requires: tu.h & tu.c */ /*********************** | NOTE: See tu.h for FILE ACCESS parms, etc | | (also CR vs CR/LF on writeln() functions, etc. | +-------------------------------------------------------------*/ #ifndef STRING_SIZE #define STRING_SIZE 256 #define STRING_LENGTH 256 #endif FILE *TF_exists_file = NULL; FILE *Src_file = NULL; short Src_eof = 1; short Src_fcode = READ_ACCESS_UNDEFINED; INT Src_recnum = 0; INT Src_byte_count = 0; /* byte location */ char *Src_fname = NULL; char *Src_tmp_fname = NULL; FILE *Out_file = NULL; short Out_eof = 1; short Out_fcode = READ_ACCESS_UNDEFINED; INT Out_recnum = 0; INT Out_byte_count = 0; /* byte location */ char *Out_fname = NULL; char *Out_tmp_fname = NULL; char *Junkf, *JunkF, *Fjunk, *Junko; char *IO_err_msg = NULL; short IO_err_code = 0; /*----------------------------------------------- function prototypes -----*/ void Init_tf (void); long Copy_and_strip_control_chars_completely (void); long Copy_ascii_format_src_to_out (void); long Copy_no_troff (void); long Copy_src_to_out (void); long Count_src_file_non_blank_lines (char *Qfname); void Fclose (char *File_ref_symbol); short File_exists (char *Qfname); short Open_out_file (char *Qfname); short Open_out_via_argv_or_prompt (int Arg_num, char *Msg, short Argc, char* Argv[]); short Open_out_via_new_extn (char *Qfname, char *Extn); short Open_src_file (char *Qfname); short Open_src_and_out_file_in_place (char *Qfname); short Open_src_via_argv_or_prompt (short Arg_num, char *Msg, short Argc, char* Argv[]); short Pull_src_line (char *Xd); void Show_file (FILE *Fp); void Show_line (char *Xs); void Show_line_info (char *Xs, short Len, short Line_count); void Warn_user_null_found_embedded_in_text_file (void); #endif /* ifndef TF_H */