Psi4
psio.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 PSIO_H
29 #define PSIO_H
30 
31 #include <cstdio>
32 #include "psi4/libpsio/config.h"
33 #include <string>
34 
35 namespace psi {
36 
37  int psio_init(void);
38  int psio_ipv1_config(void);
39  int psio_state(void);
40  int psio_done(void);
41  void psio_error(unsigned int unit, unsigned int errval);
42  int psio_open(unsigned int unit, int status);
43  int psio_close(unsigned int unit, int keep);
44  std::string psio_getpid(void);
45 
46  unsigned int psio_get_numvols_default(void);
47  int psio_get_volpath_default(unsigned int volume, char **path);
48  int psio_get_filename_default(char **name);
49  psio_address psio_get_address(psio_address start, ULI shift);
50  psio_address psio_get_global_address(psio_address entry_start,
51  psio_address rel_address);
52  int psio_volseek(psio_vol *vol, ULI page, ULI offset, ULI numvols);
53  //ULI psio_get_length(psio_address sadd, psio_address eadd);
54  psio_address psio_get_entry_end(unsigned int unit, const char *key);
55 
56  int psio_tocwrite(unsigned int unit);
57  int psio_tocread(unsigned int unit);
58  void psio_tocprint(unsigned int unit, FILE *output);
59  psio_tocentry *psio_tocscan(unsigned int unit, const char *key);
60  bool psio_tocentry_exists(unsigned int unit, const char *key);
61  psio_tocentry *psio_toclast(unsigned int unit);
62  int psio_tocclean(unsigned int unit, const char *key);
63 
64  int psio_write(unsigned int unit, const char *key, char *buffer, ULI size,
65  psio_address sadd, psio_address *eadd);
66  int psio_read(unsigned int unit, const char *key, char *buffer, ULI size,
67  psio_address sadd, psio_address *eadd);
68  int psio_write_entry(unsigned int unit, const char *key, char *buffer, ULI size);
69  int psio_read_entry(unsigned int unit, const char *key, char *buffer, ULI size);
70  int psio_write_block(unsigned int unit, const char *key, char *buffer, ULI blksiz,
71  ULI start_blk, ULI end_blk);
72  int psio_read_block(unsigned int unit, const char *key, char *buffer, ULI blksiz,
73  ULI start_blk, ULI end_blk);
74  int psio_rw(unsigned int unit, char *buffer, psio_address address, ULI size,
75  int wrt);
76  int psio_zero_disk(unsigned int unit, const char *key, ULI rows, ULI cols);
77 
78  int psio_open_check(unsigned int unit);
79 
80  unsigned long int psio_rd_toclen(unsigned int unit);
81  void psio_wt_toclen(unsigned int unit, ULI toclen);
82 
83  int psio_set_filescfg_kwd(const char* kwdgrp, const char* kwd, int unit,
84  const char* kwdval);
85  const char* psio_get_filescfg_kwd(const char* kwdgrp, const char* kwd,
86  int unit);
87 
88  bool psio_tocdel(unsigned int unit, const char *key);
89 }
90 
91 #endif /* #ifndef PSIO_H */
int psio_read_block(unsigned int unit, const char *key, char *buffer, ULI blksiz, ULI start_blk, ULI end_blk)
void status(const char *, std::string)
Definition: cchbar/status.cc:37
int psio_tocwrite(unsigned int unit)
Definition: tocwrite.cc:80
psio_tocentry * psio_toclast(unsigned int unit)
int psio_zero_disk(unsigned int unit, const char *key, ULI rows, ULI cols)
Definition: zero_disk.cc:64
bool psio_tocentry_exists(unsigned int unit, const char *key)
Definition: tocscan.cc:114
int psio_set_filescfg_kwd(const char *kwdgrp, const char *kwd, int unit, const char *kwdval)
Definition: filescfg.cc:82
int psio_read(unsigned int unit, const char *key, char *buffer, ULI size, psio_address sadd, psio_address *eadd)
Definition: read.cc:116
int psio_open(unsigned int unit, int status)
Definition: open.cc:233
psio_address psio_get_global_address(psio_address entry_start, psio_address rel_address)
Definition: get_global_address.cc:44
int psio_read_entry(unsigned int unit, const char *key, char *buffer, ULI size)
Definition: read_entry.cc:59
int psio_ipv1_config(void)
const char * psio_get_filescfg_kwd(const char *kwdgrp, const char *kwd, int unit)
Definition: filescfg.cc:88
void psio_tocprint(unsigned int unit, FILE *output)
int psio_tocclean(unsigned int unit, const char *key)
Definition: tocclean.cc:84
int psio_write_block(unsigned int unit, const char *key, char *buffer, ULI blksiz, ULI start_blk, ULI end_blk)
psio_address psio_get_address(psio_address start, ULI shift)
Definition: get_address.cc:43
int psio_tocread(unsigned int unit)
psio_tocentry * psio_tocscan(unsigned int unit, const char *key)
Definition: tocscan.cc:77
std::string psio_getpid(void)
Definition: getpid.cc:58
unsigned long int ULI
Definition: dftensor.cc:47
void psio_wt_toclen(unsigned int unit, ULI toclen)
struct psi::psio_entry psio_tocentry
int psio_init(void)
Definition: libpsio/init.cc:122
int psio_get_filename_default(char **name)
Definition: get_filename.cc:82
int psio_write(unsigned int unit, const char *key, char *buffer, ULI size, psio_address sadd, psio_address *eadd)
Definition: write.cc:162
int psio_state()
Definition: libpsio/init.cc:143
void psio_error(unsigned int unit, unsigned int errval)
Definition: libpsio/error.cc:50
int psio_rw(unsigned int unit, char *buffer, psio_address address, ULI size, int wrt)
Definition: rw.cc:145
psio_address psio_get_entry_end(unsigned int unit, const char *key)
int psio_write_entry(unsigned int unit, const char *key, char *buffer, ULI size)
Definition: write_entry.cc:54
int psio_volseek(psio_vol *vol, ULI page, ULI offset, ULI numvols)
Definition: volseek.cc:45
bool psio_tocdel(unsigned int unit, const char *key)
Definition: tocdel.cc:68
int psio_close(unsigned int unit, int keep)
Definition: libpsio/close.cc:88
int psio_open_check(unsigned int unit)
Definition: open_check.cc:63
unsigned int psio_get_numvols_default(void)
Definition: get_numvols.cc:64
int psio_done(void)
Definition: done.cc:83
unsigned long int psio_rd_toclen(unsigned int unit)
Definition: toclen.cc:108
int psio_get_volpath_default(unsigned int volume, char **path)
Definition: get_volpath.cc:72