/usr/include/udport/udalloc.h is in libxgks-dev 2.6.1+dfsg.2-3ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | /*
* $Id: udalloc.h,v 1.1 2000/08/07 23:15:04 emmerson Exp $
*/
#ifndef UD_ALLOC_H_INCLUDED
#define UD_ALLOC_H_INCLUDED
#include <stddef.h> /* for `size_t' */
#include <stdlib.h> /* for `*alloc()' */
/*
* Interface to the Unidata memory-allocation abstraction:
*/
UD_EXTERN_FUNC(voidp udmalloc, (size_t nbytes));
UD_EXTERN_FUNC(voidp udrealloc, (voidp ptr, size_t nbytes));
UD_EXTERN_FUNC(char *udstrdup, (const char *s));
UD_EXTERN_FUNC(char *udstrndup, (const char *s, size_t nbytes));
/*
* Some macros to make life easier:
*/
#define UD_ALLOC(theNum, theType) \
(theType*)udmalloc((size_t)(sizeof(theType)*(theNum)))
#define UD_REALLOC(ptr, theNum, theType) \
(theType*)udrealloc((voidp)(ptr), \
(size_t)(sizeof(theType)*(theNum)))
#define FREE(ptr) (void)free((voidp)(ptr))
#endif /* !UD_ALLOC_H_INCLUDED */
|