/usr/include/ccp4/library_file.h is in libccp4-dev 6.4.5-2+b2.
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 | /*
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
version 3, modified in accordance with the provisions of the
license to address the requirements of UK law.
You should have received a copy of the modified GNU Lesser General
Public License along with this library. If not, copies may be
downloaded from http://www.ccp4.ac.uk/ccp4license.php
This program 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.
*/
/** @file library_file.h
* Functions for file i/o.
* 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 *);
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 */
|