MPQC 2.3.1

- Main Page
- Related Pages
- Classes
- Files

- File List

psio.h
1 #ifndef util_class_psi3_libpsio_psio_h_
2 #define util_class_psi3_libpsio_psio_h_
3
4 #include <stdio.h>
5 #include <util/psi3/libpsio/psio.gbl>
6
7 namespace psi3 {
8 namespace libpsio {
9
10 /* A convenient address initialization struct */
11 extern psio_address PSIO_ZERO;
12
13 /* Library state variable */
14 extern int _psi3_libpsio_state_;
15
16 #ifdef PSIO_STATS
17 extern ULI *psio_readlen;
18 extern ULI *psio_writlen;
19 #endif
20
21 int psio_init(void);
22 int psio_state(void);
23 int psio_done(void);
24 void psio_error(unsigned int unit, unsigned int errval);
25 int psio_open(unsigned int unit, int status);
26 int psio_close(unsigned int unit, int keep);
27
28 unsigned int psio_get_numvols(unsigned int unit);
29 unsigned int psio_get_numvols_default(void);
30 int psio_get_volpath(unsigned int unit, unsigned int volume, char *path);
31 int psio_get_volpath_default(unsigned int volume, char *path);
32 int psio_get_filename(unsigned int unit, char *name);
33 int psio_get_filename_default(char *name);
34 psio_address psio_get_address(psio_address start, ULI shift);
35 psio_address psio_get_global_address(psio_address entry_start,
36 psio_address rel_address);
37 int psio_volseek(psio_vol *vol, ULI page, ULI offset, ULI numvols);
38 ULI psio_get_length(psio_address sadd, psio_address eadd);
39 psio_address psio_get_entry_end(unsigned int unit, char *key);
40
41 int psio_tocwrite(unsigned int unit);
42 int psio_tocread(unsigned int unit);
43 void psio_tocprint(unsigned int unit, FILE *output);
44 psio_tocentry *psio_tocscan(unsigned int unit, char *key);
45 psio_tocentry *psio_toclast(unsigned int unit);
46 unsigned int psio_toclen(unsigned int unit);
47 int psio_tocdel(unsigned int unit, char *key);
48 int psio_tocclean(unsigned int unit, char *key);
49 void psio_tocrename(unsigned int unit, char *key, char *newkey);
50
51 int psio_write(unsigned int unit, char *key, char *buffer, ULI size,
52 psio_address sadd, psio_address *eadd);
53 int psio_read(unsigned int unit, char *key, char *buffer, ULI size,
54 psio_address sadd, psio_address *eadd);
55 int psio_write_entry(unsigned int unit, char *key, char *buffer, ULI size);
56 int psio_read_entry(unsigned int unit, char *key, char *buffer, ULI size);
57 int psio_write_block(unsigned int unit, char *key, char *buffer, ULI blksiz,
58 ULI start_blk, ULI end_blk);
59 int psio_read_block(unsigned int unit, char *key, char *buffer, ULI blksiz,
60 ULI start_blk, ULI end_blk);
61 int psio_rw(unsigned int unit, char *buffer, psio_address address, ULI size, int wrt);
62
63 int psio_open_check(unsigned int unit);
64
65 }
66 }
67
68 #endif /* #ifndef PSIO_H */