File: zmisc.h

package info (click to toggle)
libspiro 20071029-10
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,312 kB
  • ctags: 90
  • sloc: sh: 7,917; ansic: 1,097; makefile: 101
file content (15 lines) | stat: -rw-r--r-- 310 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#ifndef _ZMISC_H
# define _ZMISC_H
/**
 * Misc portability and convenience macros.
 **/

#include <stdlib.h>

#define zalloc malloc
#define zrealloc realloc
#define zfree free

#define znew(type, n) (type *)zalloc(sizeof(type) * (n))
#define zrenew(type, p, n) (type *)zrealloc((p), sizeof(type) * (n))
#endif