/usr/include/io_lib/expFileIO.h is in libstaden-read-dev 1.14.9-4.
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 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 | /*
* Copyright (c) 2004-2005, 2007 Genome Research Ltd.
* Author(s): James Bonfield
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* 3. Neither the names Genome Research Ltd and Wellcome Trust Sanger
* Institute nor the names of its contributors may be used to endorse
* or promote products derived from this software without specific
* prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY GENOME RESEARCH LTD AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GENOME RESEARCH
* LTD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
* Author(s): Simon Dear, James Bonfield, Rodger Staden
*
* Copyright (c) 1994-1998, 2001-2002 MEDICAL RESEARCH COUNCIL
* All rights reserved
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1 Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2 Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3 Neither the name of the MEDICAL RESEARCH COUNCIL, THE LABORATORY OF
* MOLECULAR BIOLOGY nor the names of its contributors may be used
* to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/*
* Copyright (c) Medical Research Council 1994. All rights reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation for any purpose is hereby granted without fee, provided that
* this copyright and notice appears in all copies.
*
* This file was written by James Bonfield, Simon Dear, Rodger Staden,
* as part of the Staden Package at the MRC Laboratory of Molecular
* Biology, Hills Road, Cambridge, CB2 2QH, United Kingdom.
*
* MRC disclaims all warranties with regard to this software.
*/
/*
* File: expFileIO.h
* Version:
*
* Description:
*
* Created:
* Updated:
*
*/
#ifndef _EXPFILEIO_H_
#define _EXPFILEIO_H_
#include <stdio.h>
#include "io_lib/mFILE.h"
#include "io_lib/array.h"
#include "io_lib/os.h"
#ifdef __cplusplus
extern "C" {
#endif
/*
* Definitions
*/
#define MAXIMUM_EFLT_LENGTH 4
#define MAXIMUM_EFLTS 60
#define EFLT_FILE_LINE_LENGTH 128
#define EXP_FILE_LINE_LENGTH 128
typedef Array Exp_entries;
typedef struct {
Array entries[MAXIMUM_EFLTS]; /* array of array of entries */
int Nentries[MAXIMUM_EFLTS];
mFILE *fp;
} Exp_info;
#define NULL_Exp_info ( (Exp_info *) NULL )
#define exp_Nentries(E,I) ((E)->Nentries[I]) /* get last entry for line I */
#define exp_get_entry(E,I) (arr(char *,(E)->entries[I],(E)->Nentries[I] - 1)) /* get last entry for line I */
/*
* Allocate an set a new experiment file entry
*/
extern char *exp_set_entry(Exp_info *e, int eflt, char *str);
/*************************************************************
* Experiment file line types
*************************************************************/
extern char eflt_feature_ids[MAXIMUM_EFLTS][MAXIMUM_EFLT_LENGTH+1];
#define EFLT_CF 0
#define EFLT_CN 1
#define EFLT_CS 2
#define EFLT_CV 3
#define EFLT_DR 4
#define EFLT_DT 5
#define EFLT_EN 6
#define EFLT_EX 7
#define EFLT_FM 8
#define EFLT_LN 9
#define EFLT_LT 10
#define EFLT_MC 11
#define EFLT_MN 12
#define EFLT_MT 13
#define EFLT_OP 14
#define EFLT_PN 15
#define EFLT_QR 16
#define EFLT_SC 17
#define EFLT_SF 18
#define EFLT_SI 19
#define EFLT_SL 20
#define EFLT_SP 21
#define EFLT_SQ 22
#define EFLT_SR 23
#define EFLT_ST 24
#define EFLT_SV 25
#define EFLT_TN 26
#define EFLT_QL 27
#define EFLT_PS 28
#define EFLT_CC 29
#define EFLT_SS 30
#define EFLT_TG 31
#define EFLT_ID 32
#define EFLT_AQ 33
#define EFLT_PR 34
#define EFLT_LI 35
#define EFLT_LE 36
#define EFLT_TC 37
#define EFLT_AC 38
#define EFLT_BC 39
#define EFLT_ON 40
#define EFLT_AV 41
#define EFLT_PC 42
#define EFLT_SE 43
#define EFLT_CL 44
#define EFLT_CR 45
#define EFLT_AP 46
#define EFLT_CH 47
#define EFLT_PD 48
#define EFLT_WT 49
#define EFLT_NT 50
#define EFLT_GD 51
#define EFLT_WL 52
#define EFLT_WR 53
#define EFLT_FT 54
#define EFLT_LG 55
/*************************************************************************************/
/*
* Creates a string of 'range format' from the start and end points.
* The string (of form start..end) is also returned.
*/
extern char *exp_create_range(char *str, int start, int end);
/*
* Extracts the start and end points from a range string.
* Returns 0 for success and -1 for failure.
*/
extern int exp_extract_range(char *str, int *start, int *end);
/*
* Output an experiment file line
*/
extern int exp_print_line(mFILE *fp, Exp_info *e, int eflt, int i);
/*
* Output an experiment file multi-line
*/
extern int exp_print_mline(mFILE *fp, Exp_info *e, int eflt, int i);
extern int exp_print_seq(mFILE *fp, Exp_info *e, int eflt, int i);
/*
* Output an experiment file multi line
*/
extern int exp_get_feature_index(char *e);
extern void exp_destroy_info(Exp_info *e);
/*
* Destroy experiment file information
*/
extern Exp_info *exp_create_info(void);
/*
* Allocate space for new experiment file information
*/
extern Exp_info *exp_fread_info(FILE *fp);
extern Exp_info *exp_mfread_info(mFILE *fp);
extern Exp_info *exp_read_info(char *file);
/*
* Read in an experiment file and return handle
*/
char *opos2str(int2 *opos, int len, char *buf);
int str2opos(int2 *opos, int len, char *buf);
char *conf2str(int1 *conf, int len, char *buf);
int str2conf(int1 *conf, int len, char *buf);
extern int exp_get_int(Exp_info *e, int id, int *val);
/*
* Get the integer for entry id
* returns:
* 0 - success
* 1 - no entry
*/
extern int exp_get_rng(Exp_info *e, int id, int *from, int *to);
/*
* Get the integer pair for entry id
* returns:
* 0 - success
* 1 - no entry
*/
extern int exp_get_str(Exp_info *e, int id, char *s, f_implicit s_l);
/*
* Get the string for entry id
* returns:
* 0 - success
* 1 - no entry
*/
extern int exp_put_int(Exp_info *e, int id, int *val);
/*
* Append the integer for entry id to the experiment file
* returns:
* 0 - success
* 1 - no update
*/
extern int exp_put_rng(Exp_info *e, int id, int *from, int *to);
/*
* Append the integer pair for entry id to the experiment file
* returns:
* 0 - success
* 1 - no update
*/
extern int exp_put_str(Exp_info *e, int id, char *s, f_implicit s_l);
/*
* Append the string for entry id to the experiment file
* returns:
* 0 - success
* 1 - no update
*/
extern void exp_close(Exp_info *e);
/*
* Closes an experiment file (if open), but does not free it.
*/
/*
* FORTRAN INTERFACE
*/
extern f_int expopn_(char *fn, f_implicit fn_l);
/*
* FORTRAN interface to exp_open_file()
*/
extern f_proc_ret expkil_(f_int *le);
/*
* FORTRAN interface to exp_destroy_info
*/
extern f_int expri_(f_int *le, f_int *id, f_int *val);
/*
* FORTRAN interface to exp_get_int
*/
extern f_int exprr_(f_int *le, f_int *id, f_int *from, f_int *to);
/*
* FORTRAN interface to exp_get_rng
*/
extern f_int exprsa_(f_int *le, f_int *id, char *s, f_int *max_len, f_implicit s_l);
/*
* FORTRAN interface to exp_get_str workalike
* NOTE: for use with FORTRAN CHARACTER arrays instead CHARACTER strings
*/
extern f_int exprs_(f_int *le, f_int *id, char *s, f_implicit s_l);
/*
* FORTRAN interface to exp_get_str workalike
* NOTE: for use with FORTRAN CHARACTER strings instead CHARACTER arrays
*/
extern f_int expwi_(f_int *le, f_int *id, f_int *val);
/*
* FORTRAN interface to exp_put_int
*/
extern f_int expwr_(f_int *le, f_int *id, f_int *from, f_int *to);
/*
* FORTRAN interface to exp_put_rng
*/
extern f_int expwsa_(f_int *le, f_int *id, char *s, f_int *max_len, f_implicit s_l);
/*
* FORTRAN interface to exp_put_str workalike
* NOTE: for use with FORTRAN CHARACTER arrays instead CHARACTER strings
*/
extern f_int expws_(f_int *le, f_int *id, char *s, f_implicit s_l);
/*
* FORTRAN interface to exp_put_str workalike
* NOTE: for use with FORTRAN CHARACTER strings instead CHARACTER arrays
*/
extern void exp_print_file(FILE *fp, Exp_info *e);
extern void exp_print_mfile(mFILE *fp, Exp_info *e);
/*
* FORTRAN interface to exp_create_range()
*/
extern void expcr_(char *str, f_int *start, f_int *end, f_implicit str_l);
/*
* FORTRAN interface to exp_extract_range()
*/
extern f_int exper_(char *str, f_int *start, f_int *end, f_implicit str_l);
#ifdef __cplusplus
}
#endif
#endif /* _EXPFILEIO_H_ */
|