Back to index

opendkim  2.6.2
dkim-util.h
Go to the documentation of this file.
00001 /*
00002 **  Copyright (c) 2007, 2008 Sendmail, Inc. and its suppliers.
00003 **    All rights reserved.
00004 **
00005 **  Copyright (c) 2009, The OpenDKIM Project.  All rights reserved.
00006 */
00007 
00008 #ifndef _DKIM_UTIL_H_
00009 #define _DKIM_UTIL_H_
00010 
00011 #ifndef lint
00012 static char dkim_util_h_id[] = "@(#)$Id: dkim-util.h,v 1.5.58.1 2010/10/27 21:43:08 cm-msk Exp $";
00013 #endif /* !lint */
00014 
00015 #include "build-config.h"
00016 
00017 /* system includes */
00018 #include <sys/types.h>
00019 #include <sys/param.h>
00020 #ifdef HAVE_STDBOOL_H
00021 # include <stdbool.h>
00022 #endif /* HAVE_STDBOOL_H */
00023 
00024 /* libopendkim includes */
00025 #include "dkim.h"
00026 
00027 /* macros */
00028 #define       DKIM_MALLOC(x,y)     dkim_malloc((x)->dkim_libhandle, \
00029                                         (x)->dkim_closure, y)
00030 #define       DKIM_FREE(x,y)              dkim_mfree((x)->dkim_libhandle, \
00031                                        (x)->dkim_closure, y)
00032 
00033 extern void *dkim_malloc __P((DKIM_LIB *, void *, size_t));
00034 extern void dkim_mfree __P((DKIM_LIB *, void *, void *));
00035 extern unsigned char *dkim_strdup __P((DKIM *, const unsigned char *, size_t));
00036 extern DKIM_STAT dkim_tmpfile __P((DKIM *, int *, _Bool));
00037 
00038 extern void dkim_dstring_blank __P((struct dkim_dstring *));
00039 extern _Bool dkim_dstring_cat __P((struct dkim_dstring *, u_char *));
00040 extern _Bool dkim_dstring_cat1 __P((struct dkim_dstring *, int));
00041 extern _Bool dkim_dstring_catn __P((struct dkim_dstring *, u_char *, size_t));
00042 extern _Bool dkim_dstring_copy __P((struct dkim_dstring *, u_char *));
00043 extern void dkim_dstring_free __P((struct dkim_dstring *));
00044 extern u_char *dkim_dstring_get __P((struct dkim_dstring *));
00045 extern int dkim_dstring_len __P((struct dkim_dstring *));
00046 extern struct dkim_dstring *dkim_dstring_new __P((DKIM *, int, int));
00047 extern size_t dkim_dstring_printf __P((struct dkim_dstring *dstr, char *fmt,
00048                                        ...));
00049 
00050 #endif /* _DKIM_UTIL_H_ */