File: xalloc.h

package info (click to toggle)
python-pyds9 1.8.1-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster
  • size: 4,224 kB
  • sloc: ansic: 17,257; sh: 3,668; python: 701; makefile: 491; tcl: 219
file content (51 lines) | stat: -rw-r--r-- 805 bytes parent folder | download | duplicates (14)
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
/*
 *	Copyright (c) 2004 Smithsonian Astrophysical Observatory
 */

/*
 *
 * xalloc.h -- declarations for safe (error-checked) memory allocation
 *
 */

#ifndef	__xalloc_h
#define	__xalloc_h

#if HAVE_CONFIG_H
#include <conf.h>
#endif

#include <sys/types.h>
#if HAVE_STRING_H
#include <string.h>
#endif
#if HAVE_MALLOC_H
#include <malloc.h>
#endif
#if HAVE_STDLIB_H
#include <stdlib.h>
#endif
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_SETJMP_H
#define XALLOC_SETJMP 142857
#include <setjmp.h>
#endif

#include <prsetup.h>

_PRbeg

void *xmalloc _PRx((size_t n));
void *xcalloc _PRx((size_t n, size_t s));
void *xrealloc _PRx((void *p, size_t n));
void xfree _PRx((void *p));
char *xstrdup _PRx((char *s));
#if HAVE_SETJMP_H
void xalloc_savejmp _PRx((jmp_buf *env));
#endif

_PRend

#endif