forked from richarddurbin/pbwt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
utils.h
58 lines (53 loc) · 2.22 KB
/
utils.h
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
/* File: utils.h
* Author: Richard Durbin ([email protected])
* Modified by Daniel Lawson ([email protected]) in December 2014, adding gzip output for paintSparse
* Copyright (C) Genome Research Limited, 2011
* -------------------------------------------------------------------
* 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 2.1 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*-------------------------------------------------------------------
* Description: includes standard system headers and own headers
* Exported functions:
* HISTORY:
* Last edited: Jan 20 01:01 2015 (rd)
* adding gzip output for paintSparse
* Created: Wed Jan 5 16:13:48 2011 (rd)
*-------------------------------------------------------------------
*/
#include <stdio.h> /* FILE etc. */
#include <stdlib.h> /* malloc(), free(), ... notation */
#include <string.h> /* memset() */
#include <limits.h> /* INT_MAX etc. */
#include <errno.h>
#include "zlib.h"
#ifndef BOOL_DEFINED
#define BOOL_DEFINED
typedef char BOOL ;
#define TRUE 1
#define FALSE 0
#endif
#include "array.h"
#include "dict.h"
#include "hash.h"
void die (char *format, ...) ;
void warn (char *format, ...) ;
#define myalloc(n,type) (type*)_myalloc((n)*sizeof(type))
void *_myalloc (long size) ;
#define mycalloc(n,type) (type*)_mycalloc(n,sizeof(type))
void *_mycalloc (long number, int size) ;
FILE *fopenTag (char* root, char* tag, char* mode) ;
gzFile gzopenTag (char* root, char* tag, char* mode) ;
char *fgetword (FILE *f) ; /* not threadsafe */
void timeUpdate (FILE *f) ; /* report to stderr resources used since last called */
/************************/