2 * Copyright (C) 2000 Werner Koch (dd9jn)
4 * This file is part of GPGME.
6 * GPGME is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * GPGME is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
26 void *_gpgme_malloc (size_t n );
27 void *_gpgme_calloc (size_t n, size_t m );
28 void *_gpgme_realloc (void *p, size_t n);
29 char *_gpgme_strdup (const char *p);
30 void _gpgme_free ( void *a );
32 #define xtrymalloc(a) _gpgme_malloc((a))
33 #define xtrycalloc(a,b) _gpgme_calloc((a),(b))
34 #define xtryrealloc(a,b) _gpgme_realloc((a),(b))
35 #define xtrystrdup(a) _gpgme_strdup((a))
36 #define xfree(a) _gpgme_free((a))
39 #define mk_error(a) ( GPGME_##a )
41 #define DIM(v) (sizeof(v)/sizeof((v)[0]))
42 #define DIMof(type,member) DIM(((type *)0)->member)
47 char *stpcpy (char *a, const char *b);