~ubuntu-branches/ubuntu/quantal/genometools/quantal-backports

« back to all changes in this revision

Viewing changes to src/core/xansi_api.h

  • Committer: Package Import Robot
  • Author(s): Sascha Steinbiss
  • Date: 2012-07-09 14:10:23 UTC
  • Revision ID: package-import@ubuntu.com-20120709141023-juuu4spm6chqsf9o
Tags: upstream-1.4.1
ImportĀ upstreamĀ versionĀ 1.4.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  Copyright (c) 2005-2010 Gordon Gremme <gremme@zbh.uni-hamburg.de>
 
3
  Copyright (c) 2005-2008 Center for Bioinformatics, University of Hamburg
 
4
 
 
5
  Permission to use, copy, modify, and distribute this software for any
 
6
  purpose with or without fee is hereby granted, provided that the above
 
7
  copyright notice and this permission notice appear in all copies.
 
8
 
 
9
  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 
10
  WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 
11
  MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 
12
  ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 
13
  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 
14
  ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 
15
  OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
16
*/
 
17
 
 
18
#ifndef XANSI_API_H
 
19
#define XANSI_API_H
 
20
 
 
21
#include <stdarg.h>
 
22
#include <stdio.h>
 
23
 
 
24
/* XANSI module */
 
25
 
 
26
/* This module contains wrappers for the functions from the standard library we
 
27
   use. These functions always terminate the program if an error occurs.
 
28
   That is, one can use this functions without the need to check for errors. */
 
29
 
 
30
/* Similar to <atexit(3)>, terminates on error. */
 
31
void   gt_xatexit(void (*function)(void));
 
32
 
 
33
/* Similar to <fclose(3)>, terminates on error. */
 
34
void   gt_xfclose(FILE*);
 
35
 
 
36
/* Similar to <fflush(3)>, terminates on error. */
 
37
void   gt_xfflush(FILE*);
 
38
 
 
39
/* Similar to <fgetc(3)>, terminates on error. */
 
40
int    gt_xfgetc(FILE*);
 
41
 
 
42
/* Similar to <fgets(3)>, terminates on error. */
 
43
char*  gt_xfgets(char *s, int size, FILE *stream);
 
44
 
 
45
/* Similar to <fgetpos(3)>, terminates on error. */
 
46
void   gt_xfgetpos(FILE*, fpos_t*);
 
47
 
 
48
/* Similar to <fopen(3)>, terminates on error. */
 
49
FILE*  gt_xfopen(const char *path, const char *mode);
 
50
 
 
51
/* Similar to <fputc(3)>, terminates on error. */
 
52
void   gt_xfputc(int, FILE*);
 
53
 
 
54
/* Similar to <fputs(3)>, terminates on error. */
 
55
void   gt_xfputs(const char*, FILE*);
 
56
 
 
57
/* Similar to <fread(3)>, terminates on error. */
 
58
size_t gt_xfread(void *ptr, size_t size, size_t nmemb, FILE*);
 
59
 
 
60
/* Similar to <fseek(3)>, terminates on error. */
 
61
void   gt_xfseek(FILE*, long offset, int whence);
 
62
 
 
63
/* Similar to <fsetpos(3)>, terminates on error. */
 
64
void   gt_xfsetpos(FILE*, const fpos_t*);
 
65
 
 
66
/* Similar to <fwrite(3)>, terminates on error. */
 
67
void   gt_xfwrite(const void *ptr, size_t size, size_t nmemb, FILE*);
 
68
 
 
69
/* Similar to <putchar(3)>, terminates on error. */
 
70
void   gt_xputchar(int);
 
71
 
 
72
/* Similar to <puts(3)>, terminates on error. */
 
73
void   gt_xputs(const char*);
 
74
 
 
75
/* Similar to <remove(3)>, terminates on error. */
 
76
void   gt_xremove(const char*);
 
77
 
 
78
/* Similar to <ungetc(3)>, terminates on error. */
 
79
void   gt_xungetc(int, FILE*);
 
80
 
 
81
/* Similar to <vfprintf(3)>, terminates on error. */
 
82
void   gt_xvfprintf(FILE *stream, const char *format, va_list ap);
 
83
 
 
84
/* Similar to <vsnprintf(3)>, terminates on error. */
 
85
int    gt_xvsnprintf(char *str, size_t size, const char *format, va_list ap);
 
86
 
 
87
#endif