util.h revision 1.10 1 /* $NetBSD: util.h,v 1.10 2003/07/12 13:47:44 itojun Exp $ */
2
3 /*
4 * Copyright (c) 1988, Larry Wall
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following condition
8 * is met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this condition and the following disclaimer.
11 *
12 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
13 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22 * SUCH DAMAGE.
23 */
24
25 int move_file(char *, char *);
26 void copy_file(char *, char *);
27 void *xmalloc(size_t);
28 void *xrealloc(void *, size_t);
29 char *xstrdup(const char *);
30 void say(const char *, ...)
31 __attribute__((__format__(__printf__, 1, 2)));
32 void fatal(const char *, ...)
33 __attribute__((__format__(__printf__, 1, 2)));
34 void pfatal(const char *, ...)
35 __attribute__((__format__(__printf__, 1, 2)));
36 void ask(const char *, ...)
37 __attribute__((__format__(__printf__, 1, 2)));
38 void set_signals(int);
39 void ignore_signals(void);
40 void makedirs(char *, bool);
41 char *fetchname(char *, int, int);
42