File: alloc.h

package info (click to toggle)
bsmtpd 2.3pl8b-16
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 228 kB
  • ctags: 241
  • sloc: ansic: 2,008; makefile: 180; sh: 24
file content (30 lines) | stat: -rw-r--r-- 597 bytes parent folder | download | duplicates (3)
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
/* (c) 1992, 1993, 1994 by Axel Zinser aka Fifi (fifi@hiss.han.de) */
#ifndef EXTERN
# ifdef MAIN
#  define	EXTERN	
#  define	INIT(x)	= (x)
# else
#  define	EXTERN	extern
#  define	INIT(x)
# endif
#endif

#ifndef __alloc_h__
#define __alloc_h__ 1

/* extern char *calloc(); */

#ifdef __STDC__
extern char *ckalloc(unsigned long n, unsigned long s);
#else
extern char *ckalloc();
#endif

/* #define strsave(x)	(char *)strcpy(ckalloc(1, (strlen(x) + 1)), (x)) */
#define	ckstrdup(x)	(char *)strcpy(ckalloc(1, (strlen(x) + 1)), (x))
#ifndef MDEBUG
#define	ckfree(x)	free((char*)(x))
#endif

#endif