/* _______________________________________________________________________ * * RDPARM/PTRAJ: APR 2000 * _______________________________________________________________________ * * $Header: /thr/gamow/cvsroot/amber7/src/ptraj/io.h,v 1.5 2000/05/10 21:52:00 cheatham Exp $ * * Revision: $Revision: 1.5 $ * Date: $Date: 2000/05/10 21:52:00 $ * Last checked in by $Author: cheatham $ * * This source is now archived under CVS at Scripps in the amber7 tree. * * NOTE: this is a beta, pre-release version, is under constant development, * probably contains some bugs and is under constant revision; therefore * take care. Please report bugs (and fixes!) to cheatham@chpc.utah.edu or * cheatham@cgl.ucsf.edu * * Do not distribute this code without explicit permission. * Do not incorporate into other codes without explicit permission. * * Current contact information: * * Thomas Cheatham, III * 2000 East, 30 South, Skaggs Hall 201 * Department of Medicinal Chemistry * University of Utah * Salt Lake City, UT 84112-5820 * cheatham@chpc.utah.edu * (801) 587-9653 * FAX: (801) 585-5366 * * Other contributors * * David Case (Scripps) * Michael Crowley (Scripps) * Jed Pitera (UCSF) * Vickie Tsui (Scripps) * _______________________________________________________________________ */ typedef struct _fileType { char *buffer; FILE *file; char *mode; int popen; } fileType; #ifdef IO_MODULE /* * GLOBAL: fileStack -- contains a circular list fileType structures in * order to maintain a list of opened files and respective filenames, * modes, and popen status. * */ stackType *fileStack = (stackType *) NULL; #else /* IO_MODULE */ extern stackType *fileStack; # ifdef __STDC__ extern void doSystem(char *); extern char * promptToOpenFile( FILE **, char *, char *, char *); extern int openFile( FILE **, char *, char *); extern int promptUserResponse(FILE *, FILE *, char *, char *, int); extern char * promptUser(FILE *, FILE *, char *); extern int safe_fclose(FILE *); extern int safe_fclose_buffer(char *); extern int safe_close(FILE *, char *); extern FILE *safe_open(FILE *, char *, int); extern FILE *safe_fopen(char *, char *); extern FILE *safe_popen(FILE *, char *); extern FILE *safe_freopen(FILE *); # else extern void doSystem(); extern char * promptToOpenFile(); extern int openFile(); extern int promptUserResponse(); extern char * promptUser(); extern int safe_fclose(); extern int safe_fclose_buffer(); extern int safe_close(); extern FILE *safe_open(); extern FILE *safe_fopen(); extern FILE *safe_popen(); extern FILE *safe_freopen(); # endif #endif /* IO_MODULE */