- Main Page
- Related Pages
- Classes
- Files

- File List

# psio.h

    00001 #ifndef util_class_psi3_libpsio_psio_h_
    00002 #define util_class_psi3_libpsio_psio_h_
    00003
    00004 #include <stdio.h>
    00005 #include <util/psi3/libpsio/psio.gbl>
    00006
    00007 namespace psi3 {
    00008 namespace libpsio {
    00009
    00010 /* A convenient address initialization struct */
    00011 extern psio_address PSIO_ZERO;
    00012
    00013 /* Library state variable */
    00014 extern int _psi3_libpsio_state_;
    00015
    00016 #ifdef PSIO_STATS
    00017 extern ULI *psio_readlen;
    00018 extern ULI *psio_writlen;
    00019 #endif
    00020
    00021 int psio_init(void);
    00022 int psio_state(void);
    00023 int psio_done(void);
    00024 void psio_error(unsigned int unit, unsigned int errval);
    00025 int psio_open(unsigned int unit, int status);
    00026 int psio_close(unsigned int unit, int keep);
    00027
    00028 unsigned int psio_get_numvols(unsigned int unit);
    00029 unsigned int psio_get_numvols_default(void);
    00030 int psio_get_volpath(unsigned int unit, unsigned int volume, char *path);
    00031 int psio_get_volpath_default(unsigned int volume, char *path);
    00032 int psio_get_filename(unsigned int unit, char *name);
    00033 int psio_get_filename_default(char *name);
    00034 psio_address psio_get_address(psio_address start, ULI shift);
    00035 psio_address psio_get_global_address(psio_address entry_start,
    00036                                      psio_address rel_address);
    00037 int psio_volseek(psio_vol *vol, ULI page, ULI offset, ULI numvols);
    00038 ULI psio_get_length(psio_address sadd, psio_address eadd);
    00039 psio_address psio_get_entry_end(unsigned int unit, char *key);
    00040
    00041 int psio_tocwrite(unsigned int unit);
    00042 int psio_tocread(unsigned int unit);
    00043 void psio_tocprint(unsigned int unit, FILE *output);
    00044 psio_tocentry *psio_tocscan(unsigned int unit, char *key);
    00045 psio_tocentry *psio_toclast(unsigned int unit);
    00046 unsigned int psio_toclen(unsigned int unit);
    00047 int psio_tocdel(unsigned int unit, char *key);
    00048 int psio_tocclean(unsigned int unit, char *key);
    00049 void psio_tocrename(unsigned int unit, char *key, char *newkey);
    00050
    00051 int psio_write(unsigned int unit, char *key, char *buffer, ULI size,
    00052                psio_address sadd, psio_address *eadd);
    00053 int psio_read(unsigned int unit, char *key, char *buffer, ULI size,
    00054               psio_address sadd, psio_address *eadd);
    00055 int psio_write_entry(unsigned int unit, char *key, char *buffer, ULI size);
    00056 int psio_read_entry(unsigned int unit, char *key, char *buffer, ULI size);
    00057 int psio_write_block(unsigned int unit, char *key, char *buffer, ULI blksiz,
    00058                      ULI start_blk, ULI end_blk);
    00059 int psio_read_block(unsigned int unit, char *key, char *buffer, ULI blksiz,
    00060                     ULI start_blk, ULI end_blk);
    00061 int psio_rw(unsigned int unit, char *buffer, psio_address address, ULI size, int wrt);
    00062
    00063 int psio_open_check(unsigned int unit);
    00064
    00065 }
    00066 }
    00067
    00068 #endif    /* #ifndef PSIO_H */