/usr/include/gpp4/ccp4/library_file.h is in libgpp4-dev 1.3.1-0ubuntu4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | /*
library_file.h: header file for library_file.c
Copyright (C) 2001 CCLRC, Charles Ballard
This library is free software: you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation, either
version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with This library. If not, see
<http://www.gnu.org/licenses/>.
*/
/** @file library_file.h
* @brief Functions for file i/o.
* @author Charles Ballard
*/
#ifndef __CCP4_LIB_FILE
#define __CCP4_LIB_FILE
#include "ccp4_sysdep.h"
#include "ccp4_types.h"
#ifdef __cplusplus
namespace CCP4 {
extern "C" {
#endif
/** Generic CCP4 file. */
typedef struct _CFileStruct CCP4File;
struct _CFileStruct {
char *name;
FILE *stream;
int fd;
unsigned int read : 1;
unsigned int write : 1;
unsigned int append : 1;
unsigned int binary : 1;
unsigned int scratch : 1 , : 3;
unsigned int buffered : 1;
unsigned int sync : 1, : 6;
unsigned int direct : 1, : 7;
unsigned int open : 1;
unsigned int own : 1;
unsigned int last_op : 2;
unsigned int getbuff : 1, : 4;
int iostat;
unsigned int mode : 8;
unsigned int itemsize : 8;
unsigned int iconvert : 8;
unsigned int fconvert: 8;
off_t length;
off_t loc;
size_t stamp_loc;
int (*_read) (CCP4File *, uint8 *, size_t);
int (*_write) (CCP4File *, const uint8 *, size_t);
char buff[8];
void *priv;
};
CCP4File *ccp4_file_open (const char *, const int);
CCP4File *ccp4_file_open_file (const FILE *, const int);
CCP4File *ccp4_file_open_fd (const int, const int);
int ccp4_file_rarch ( CCP4File*);
int ccp4_file_warch ( CCP4File*);
int ccp4_file_close ( CCP4File*);
int ccp4_file_mode ( const CCP4File*);
int ccp4_file_setmode ( CCP4File*, const int);
int ccp4_file_setstamp( CCP4File *, const size_t);
int ccp4_file_itemsize( const CCP4File*);
int ccp4_file_setbyte( CCP4File *, const int);
int ccp4_file_byteorder( CCP4File *);
int ccp4_file_is_write(const CCP4File *);
int ccp4_file_is_read(const CCP4File *);
int ccp4_file_is_append(const CCP4File *);
int ccp4_file_is_scratch(const CCP4File *);
int ccp4_file_is_buffered(const CCP4File *);
int ccp4_file_status(const CCP4File *);
const char *ccp4_file_name( CCP4File *);
int ccp4_file_read ( CCP4File*, uint8 *, size_t);
int ccp4_file_readcomp ( CCP4File*, uint8 *, size_t);
int ccp4_file_readshortcomp ( CCP4File*, uint8 *, size_t);
int ccp4_file_readfloat ( CCP4File*, uint8 *, size_t);
int ccp4_file_readint ( CCP4File*, uint8 *, size_t);
int ccp4_file_readshort ( CCP4File*, uint8 *, size_t);
int ccp4_file_readchar ( CCP4File*, uint8 *, size_t);
int ccp4_file_write ( CCP4File*, const uint8 *, size_t);
int ccp4_file_writecomp ( CCP4File*, const uint8 *, size_t);
int ccp4_file_writeshortcomp ( CCP4File*, const uint8 *, size_t);
int ccp4_file_writefloat ( CCP4File*, const uint8 *, size_t);
int ccp4_file_writeint ( CCP4File*, const uint8 *, size_t);
int ccp4_file_writeshort ( CCP4File*, const uint8 *, size_t);
int ccp4_file_writechar ( CCP4File*, const uint8 *, size_t);
int ccp4_file_seek ( CCP4File*, long, int);
void ccp4_file_rewind ( CCP4File*);
void ccp4_file_flush (CCP4File *);
long ccp4_file_length ( CCP4File*);
long ccp4_file_tell ( CCP4File*);
int ccp4_file_feof(CCP4File *);
void ccp4_file_clearerr(CCP4File *);
void ccp4_file_fatal (CCP4File *, char *);
char *ccp4_file_print(CCP4File *, char *, char *);
int ccp4_file_raw_seek( CCP4File *, long, int);
int ccp4_file_raw_read ( CCP4File*, char *, size_t);
int ccp4_file_raw_write ( CCP4File*, const char *, size_t);
int ccp4_file_raw_setstamp( CCP4File *, const size_t);
#ifdef __cplusplus
}
}
#endif
#endif /* __CCP4_LIB_FILE */
/*
Local variables:
mode: font-lock
End:
*/
|