Crossfire Server, Trunk  R20513
output_file.h
Go to the documentation of this file.
1 /*
2  * Crossfire -- cooperative multi-player graphical RPG and adventure game
3  *
4  * Copyright (c) 1999-2014 Mark Wedel and the Crossfire Development Team
5  * Copyright (c) 1992 Frank Tore Johansen
6  *
7  * Crossfire is free software and comes with ABSOLUTELY NO WARRANTY. You are
8  * welcome to redistribute it under certain conditions. For details, please
9  * see COPYING and LICENSE.
10  *
11  * The authors can be reached via e-mail at <crossfire@metalforge.org>.
12  */
13 
35 #ifndef OUTPUT_FILE_H
36 #define OUTPUT_FILE_H
37 
38 #include <stdio.h>
39 
40 
41 typedef struct
42 {
46  char *fname;
47 
52  char *fname_tmp;
53 
57  FILE *file;
58 } OutputFile;
59 
60 
76 FILE *of_open(OutputFile *of, const char *fname);
77 
87 int of_close(OutputFile *of);
88 
96 void of_cancel(OutputFile *of);
97 
98 #endif
int of_close(OutputFile *of)
Closes an output file.
Definition: output_file.c:61
FILE * file
The file pointer for fname_tmp.
Definition: output_file.h:57
char * fname_tmp
The temporary output file that is written to until of_close() is called.
Definition: output_file.h:52
void of_cancel(OutputFile *of)
Cancels a save process.
Definition: output_file.c:89
FILE * of_open(OutputFile *of, const char *fname)
Opens an output file.
Definition: output_file.c:30
char * fname
The original output file that is written.
Definition: output_file.h:46