Last change
on this file since 3311 was 3308, checked in by ansari, 18 years ago |
Creation du module AnaLC (lecture suivi EROS avec SOPHYA) dans la base
SOPHYA - cmv+reza 22/08/2007
|
-
Property svn:executable
set to
*
|
File size:
1022 bytes
|
Line | |
---|
1 | #ifndef FILECACHE_H_SEEN
|
---|
2 | #define FILECACHE_H_SEEN
|
---|
3 |
|
---|
4 |
|
---|
5 | #include <stdio.h>
|
---|
6 | #include "machdefs.h"
|
---|
7 |
|
---|
8 | #ifdef __cplusplus
|
---|
9 | extern "C" {
|
---|
10 | #endif
|
---|
11 |
|
---|
12 |
|
---|
13 | #define DEF_PGSIZE 4096
|
---|
14 | #define DEF_NPAGE 50
|
---|
15 | #define MIN_PGSIZE 512
|
---|
16 | #define MIN_NPAGE 10
|
---|
17 |
|
---|
18 |
|
---|
19 | typedef struct dskpage
|
---|
20 | {
|
---|
21 | int wrfg;
|
---|
22 | char *page;
|
---|
23 | int_4 pgno;
|
---|
24 | struct dskpage *next, *prev;
|
---|
25 | } DSKPAGE;
|
---|
26 |
|
---|
27 |
|
---|
28 | typedef struct filecache
|
---|
29 | {
|
---|
30 | FILE *fip;
|
---|
31 | int fidesc;
|
---|
32 | int memode, rwfg;
|
---|
33 | long int fpos;
|
---|
34 | long int fsz;
|
---|
35 | int_4 npage, pgsize;
|
---|
36 | DSKPAGE *pages; /* pointeur sur la zone memoire de toutes les pages */
|
---|
37 | DSKPAGE *first, *last;
|
---|
38 | int_4 nread, nwrite;
|
---|
39 | long int totrd, totwr;
|
---|
40 | } FILECACHE ;
|
---|
41 |
|
---|
42 |
|
---|
43 | FILECACHE *zfopen(char *flnm, char *mode, int NPg, int PgSiz);
|
---|
44 | int zfseek( FILECACHE *fcp, long int offset, int fg);
|
---|
45 | size_t zfread( void *buff, size_t size, size_t nitems, FILECACHE *fcp);
|
---|
46 | size_t zfwrite( void *buff, size_t size, size_t nitems, FILECACHE *fcp);
|
---|
47 | void zfclose( FILECACHE *fcp );
|
---|
48 | void zfSetPrtLevel(int lev);
|
---|
49 |
|
---|
50 | #ifdef __cplusplus
|
---|
51 | }
|
---|
52 | #endif
|
---|
53 |
|
---|
54 | #endif
|
---|
55 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.