~ubuntu-branches/ubuntu/lucid/python-scipy/lucid

« back to all changes in this revision

Viewing changes to Lib/xplt/src/play/pstdlib.h

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-01-07 14:12:12 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070107141212-mm0ebkh5b37hcpzn
* Remove build dependency on python-numpy-dev.
* python-scipy: Depend on python-numpy instead of python-numpy-dev.
* Package builds on other archs than i386. Closes: #402783.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * pstdlib.h -- $Id: pstdlib.h,v 1.1 2003/03/08 15:26:46 travo Exp $
3
 
 * portability layer basic memory management interface
4
 
 *
5
 
 * Copyright (c) 1998.  See accompanying LEGAL file for details.
6
 
 */
7
 
 
8
 
#include <stdlib.h>
9
 
 
10
 
#include "extern_c.h"
11
 
 
12
 
extern void *(*p_malloc)(size_t);
13
 
extern void  (*p_free)(void *);
14
 
extern void *(*p_realloc)(void *, size_t);
15
 
 
16
 
/* above data loaded to system malloc, free, and realloc
17
 
 * -- call p_mminit to get mm version
18
 
 */
19
 
#ifdef P_DEBUG
20
 
#define p_mminit p_mmdebug
21
 
extern int p_mmcheck(void *p);
22
 
extern void p_mmguard(void *b, unsigned long n);
23
 
extern long p_mmextra, p_mmoffset;
24
 
#endif
25
 
extern void p_mminit(void);
26
 
 
27
 
/* make trivial memory statistics globally available
28
 
 * -- counts total number of allocations, frees, and
29
 
 *    current number of large blocks */
30
 
extern long p_nallocs;
31
 
extern long p_nfrees;
32
 
extern long p_nsmall;
33
 
extern long p_asmall;
34
 
 
35
 
/* define this to get control when mm functions fail
36
 
 * -- if it returns, must return 0 */
37
 
extern void *(*p_mmfail)(unsigned long n);
38
 
 
39
 
/* temporary space */
40
 
#define P_WKSIZ 2048
41
 
typedef union {
42
 
  char c[P_WKSIZ+8];
43
 
  int i[P_WKSIZ/8];
44
 
  long l[P_WKSIZ/8];
45
 
  double d[P_WKSIZ/8];
46
 
} p_twkspc;
47
 
extern p_twkspc p_wkspc;
48
 
 
49
 
/* similar to the string.h functions, but p_malloc destination
50
 
 * - 0 src is acceptable */
51
 
extern void *p_memcpy(const void *, size_t);
52
 
extern char *p_strcpy(const char *);
53
 
extern char *p_strncat(const char *, const char *, size_t);
54
 
 
55
 
/* dont do anything critical if this is set -- signal an error */
56
 
extern volatile int p_signalling;
57
 
 
58
 
END_EXTERN_C