2 * This file has been modified for the cdrkit suite.
4 * The behaviour and appearence of the program code below can differ to a major
5 * extent from the version distributed by the original author(s).
7 * For details, see Changelog file distributed with the cdrkit package. If you
8 * received this file from another source then ask the distributing person for
9 * a log of modifications.
13 /* $Id: util.c,v 1.3 2006/07/04 04:57:42 hpa Exp $ */
14 /* ----------------------------------------------------------------------- *
16 * Copyright 2001-2006 H. Peter Anvin - All Rights Reserved
18 * This program is free software; you can redistribute it and/or modify
19 * it under the terms of the GNU General Public License as published by
20 * the Free Software Foundation, Inc., 675 Mass Ave, Cambridge MA 02139,
21 * USA; either version 2 of the License, or (at your option) any later
22 * version; incorporated herein by reference.
24 * ----------------------------------------------------------------------- */
26 #include "mkzftree.h" /* Must be included first! */
34 /* Convenience functions */
35 void *xmalloc(size_t size)
37 void *p = malloc(size);
47 char *xstrdup(const char *str)
49 char *s = strdup(str);
59 void message(enum verbosity level, const char *format, ...)
64 if ( opt.verbosity >= level )
65 vfprintf(stderr, format, ap);