File: zmalloc.h

package info (click to toggle)
mawk 1.3.4.20200120-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,916 kB
  • sloc: ansic: 16,165; sh: 3,515; yacc: 1,125; awk: 722; makefile: 251
file content (41 lines) | stat: -rw-r--r-- 975 bytes parent folder | download | duplicates (2)
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
/********************************************
zmalloc.h
copyright 2009,2010, Thomas E. Dickey
copyright 1991,1993, Michael D. Brennan

This is a source file for mawk, an implementation of
the AWK programming language.

Mawk is distributed without warranty under the terms of
the GNU General Public License, version 2, 1991.
********************************************/

/*
 * $MawkId: zmalloc.h,v 1.7 2010/12/10 17:00:00 tom Exp $
 * @Log: zmalloc.h,v @
 * Revision 1.2  1993/07/04  12:52:22  mike
 * start on autoconfig changes
 *
 * Revision 1.1.1.1  1993/07/03  18:58:23  mike
 * move source to cvs
 *
 * Revision 5.1  1991/12/05  07:59:41  brennan
 * 1.1 pre-release
 *
 */

/* zmalloc.h */

#ifndef  ZMALLOC_H
#define  ZMALLOC_H

#include "nstd.h"

extern PTR zmalloc(size_t);
extern void zfree(PTR, size_t);
extern PTR zrealloc(PTR, size_t, size_t);

#define ZMALLOC(type)  ((type*)zmalloc(sizeof(type)))
#define ZFREE(p)	zfree(p,sizeof(*(p)))

#endif /* ZMALLOC_H */