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