home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mega CD-ROM 1
/
megacd_rom_1.zip
/
megacd_rom_1
/
POSTSCRI
/
PSFIX.ZIP
/
FILEIO.H
< prev
next >
Wrap
C/C++ Source or Header
|
1991-03-28
|
3KB
|
95 lines
/*
*
* header for fileio.c
*
*/
/*
* This software may be freely distributed under the following conditions:
* 1. It is distributed in its current form, without alterations.
* 2. No monetary profit is made, under any circumstances.
*
* Marc A. Murison
* Smithsonian Astrophysical Observatory
* 60 Garden Street, MS 63
* Cambridge, MA 02138
*
* (617) 495-7079 murison@cfacx2.harvard.edu
*/
#ifndef FILEIO_H
#define FILEIO_H
#define FILES
#include "mydefs.h"
#ifdef FILEIO_C /* stuff specific to fileio.c */
#ifndef STRING_H
#define STRING_H
#include <string.h>
#endif
#ifndef CTYPE_H
#define CTYPE_H
#include <ctype.h>
#endif
#include "vectdef.h"
#include "strlib.h"
/* macro for fnext_word */
#define WORD_CHAR( c ) ( isalnum(c) || (c) == '_' )
#endif /* specific to fileio.c */
/* function prototypes */
Boolean fnext_word( FILE *fp, char *word, int *n, char *cp );
Boolean fnext_line( FILE *file_ptr );
int fget_line( FILE *file_ptr, char *buffer );
Boolean openfile( File_Def *file, File_Type ftype, File_Mode mode);
Boolean cl_in_out( int min_args, char *usage, char *help,
File_Mode mode, int argc, char *argv[],
File_Def *infile, File_Def *outfile );
Boolean cl_dir_in_out( int nargs, char *argv[],
int min_args, char *usage,
char *help, File_Mode mode,
char default_in_ext[], char default_out_ext[],
char in_name[], char in_ext[],
char out_name[], char out_ext[],
File_Def *infile, File_Def *outfile,
File_Def *dirfile, int *dirflag );
Boolean get_next_file( File_Def *dirfile, File_Def *infile,
File_Def *outfile, File_Mode mode,
char default_in_ext[], char in_name[],
char in_ext[], char out_name[], char out_ext[] );
Boolean get_filename( File_Def *dirfile, char default_ext[],
char infile_name[], char in_name[], char in_ext[] );
ulong fill_file_buff( FILE *infile, File_Type ftype, ulong Nmax,
char *buff_ptr, int *EOF_ptr );
ulong append_buff( char *source_buff, ulong N, char *dest_buff );
uint fill_line_buff( FILE *infile, File_Type ftype,
char file_buffer[], char **file_buff_ptr_ptr,
ulong Fbytes, uint Lbytes, char *line_buff_ptr,
int msg_flag, int *EOF_ptr );
void ferrout( Boolean bell, FILE *device, char *errstring );
#endif