Update copyright years.
[gnutls.git] / tests / utils.h
blobcf4c1a3cb8c43d1ef08e7b165ec88ec8f83b0704
1 /*
2 * Copyright (C) 2004, 2005, 2007, 2008, 2010 Free Software Foundation,
3 * Inc.
5 * Author: Simon Josefsson
7 * This file is part of GNUTLS.
9 * GNUTLS is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 3 of the License, or
12 * (at your option) any later version.
14 * GNUTLS is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with GNUTLS; if not, write to the Free Software Foundation,
21 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24 #ifndef UTILS_H
25 # define UTILS_H
27 # include <string.h>
28 # include <stdarg.h>
29 # include <gnutls/gnutls.h>
31 #ifndef __attribute__
32 # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
33 # define __attribute__(Spec) /* empty */
34 # endif
35 #endif
37 extern int debug;
38 extern int error_count;
39 extern int break_on_error;
41 extern const char *pkcs3;
43 extern void fail (const char *format, ...)
44 __attribute__ ((format (printf, 1, 2)));
45 extern void success (const char *format, ...)
46 __attribute__ ((format (printf, 1, 2)));
48 extern void escapeprint (const char *str, size_t len);
49 extern void hexprint (const char *str, size_t len);
50 extern void binprint (const char *str, size_t len);
52 /* This must be implemented elsewhere. */
53 extern void doit (void);
55 #endif /* UTILS_H */