Psi4
libpsio/config.h
Go to the documentation of this file.
1 /*
2  * @BEGIN LICENSE
3  *
4  * Psi4: an open-source quantum chemistry software package
5  *
6  * Copyright (c) 2007-2017 The Psi4 Developers.
7  *
8  * The copyrights for code used from other parties are included in
9  * the corresponding files.
10  *
11  * This file is part of Psi4.
12  *
13  * Psi4 is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU Lesser General Public License as published by
15  * the Free Software Foundation, version 3.
16  *
17  * Psi4 is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public License along
23  * with Psi4; if not, write to the Free Software Foundation, Inc.,
24  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25  *
26  * @END LICENSE
27  */
28 
29 #ifndef _psi_src_lib_libpsio_config_h_
30 #define _psi_src_lib_libpsio_config_h_
31 
32 namespace psi {
33 
34 #define PSIO_OPEN_NEW 0
35 #define PSIO_OPEN_OLD 1
36 
37 #define PSIO_KEYLEN 80
38 #define PSIO_MAXVOL 8
39 #define PSIO_MAXUNIT 500
40 #define PSIO_PAGELEN 65536
41 
42 #define PSIO_ERROR_INIT 1
43 #define PSIO_ERROR_DONE 2
44 #define PSIO_ERROR_MAXVOL 3
45 #define PSIO_ERROR_NOVOLPATH 4
46 #define PSIO_ERROR_OPEN 5
47 #define PSIO_ERROR_REOPEN 6
48 #define PSIO_ERROR_CLOSE 7
49 #define PSIO_ERROR_RECLOSE 8
50 #define PSIO_ERROR_OSTAT 9
51 #define PSIO_ERROR_LSEEK 10
52 #define PSIO_ERROR_READ 11
53 #define PSIO_ERROR_WRITE 12
54 #define PSIO_ERROR_NOTOCENT 13
55 #define PSIO_ERROR_TOCENTSZ 14
56 #define PSIO_ERROR_KEYLEN 15
57 #define PSIO_ERROR_BLKSIZ 16
58 #define PSIO_ERROR_BLKSTART 17
59 #define PSIO_ERROR_BLKEND 18
60 #define PSIO_ERROR_IDENTVOLPATH 19
61 #define PSIO_ERROR_MAXUNIT 20
62 
63 typedef struct {
64  size_t page; /* First page of entry */
65  size_t offset; /* Starting byte offset on fpage */
66 } psio_address;
67 
68 typedef struct {
69  char *path;
70  int stream;
71 } psio_vol;
72 
73 typedef struct psio_entry {
77  struct psio_entry *next;
78  struct psio_entry *last;
80 
81 typedef struct {
82  size_t numvols;
84  size_t toclen;
86 } psio_ud;
87 
89 extern psio_address PSIO_ZERO;
90 
91 }
92 
93 #endif /* header guard */
psio_address eadd
Definition: libpsio/config.h:76
#define PSIO_MAXVOL
Definition: libpsio/config.h:38
struct psio_entry * last
Definition: libpsio/config.h:78
char * path
Definition: libpsio/config.h:69
Definition: libpsio/config.h:63
psio_address sadd
Definition: libpsio/config.h:75
size_t toclen
Definition: libpsio/config.h:84
char key[PSIO_KEYLEN]
Definition: libpsio/config.h:74
Definition: libpsio/config.h:68
size_t offset
Definition: libpsio/config.h:65
Definition: libpsio/config.h:73
#define PSIO_KEYLEN
Definition: libpsio/config.h:37
size_t page
Definition: libpsio/config.h:64
size_t numvols
Definition: libpsio/config.h:82
struct psi::psio_entry psio_tocentry
psio_tocentry * toc
Definition: libpsio/config.h:85
psio_address PSIO_ZERO
Definition: libpsio/init.cc:57
int stream
Definition: libpsio/config.h:70
struct psio_entry * next
Definition: libpsio/config.h:77
Definition: libpsio/config.h:81