|
Lines 2-7
Link Here
|
| 2 |
#include "StdAfx.h" |
2 |
#include "StdAfx.h" |
| 3 |
#include "cav_io.h" |
3 |
#include "cav_io.h" |
| 4 |
|
4 |
|
|
|
5 |
//#define SHOWIOOPERATIONS |
| 5 |
FILE *Fopen(const char *path, const char *mode) |
6 |
FILE *Fopen(const char *path, const char *mode) |
| 6 |
{ |
7 |
{ |
| 7 |
|
8 |
|
|
Lines 14-21
Link Here
|
| 14 |
exit(1); |
15 |
exit(1); |
| 15 |
|
16 |
|
| 16 |
} else { |
17 |
} else { |
| 17 |
// for (int i=0;i<nopenfiles;i++) fprintf(stderr," "); |
18 |
#ifdef SHOWIOOPERATIONS |
| 18 |
// fprintf(stderr,"Opening -> %p ('%s') mode: %s\n",f,path,mode); |
19 |
for (int i=0;i<nopenfiles;i++) fprintf(stderr," "); |
|
|
20 |
fprintf(stderr,"Opening -> %p ('%s') mode: %s no=%d\n",f,path,mode,nopenfiles); |
| 21 |
#endif |
| 19 |
} |
22 |
} |
| 20 |
return f; |
23 |
return f; |
| 21 |
|
24 |
|
|
Lines 24-32
Link Here
|
| 24 |
int Fclose(FILE *stream) |
27 |
int Fclose(FILE *stream) |
| 25 |
{ |
28 |
{ |
| 26 |
int res=fclose(stream); |
29 |
int res=fclose(stream); |
| 27 |
// for (int i=0;i<nopenfiles;i++) fprintf(stderr," "); |
30 |
for (int i=0;i<nopenfiles;i++) fprintf(stderr," "); |
| 28 |
// fprintf(stderr,"Closing -> %p\n",stream); |
|
|
| 29 |
nopenfiles--; |
31 |
nopenfiles--; |
|
|
32 |
#ifdef SHOWIOOPERATIONS |
| 33 |
fprintf(stderr,"Closing -> %p no=%d\n",stream,nopenfiles); |
| 34 |
#endif |
| 30 |
return res; |
35 |
return res; |
| 31 |
} |
36 |
} |
| 32 |
|
37 |
|