1246074Sgabor/*- 2246074Sgabor * Copyright 1986, Larry Wall 3246074Sgabor * 4246074Sgabor * Redistribution and use in source and binary forms, with or without 5246074Sgabor * modification, are permitted provided that the following condition is met: 6246074Sgabor * 1. Redistributions of source code must retain the above copyright notice, 7246074Sgabor * this condition and the following disclaimer. 8246074Sgabor * 9246074Sgabor * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY 10246074Sgabor * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 11246074Sgabor * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 12246074Sgabor * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR 13246074Sgabor * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 14246074Sgabor * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 15246074Sgabor * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 16246074Sgabor * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 17246074Sgabor * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 18246074Sgabor * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 19246074Sgabor * SUCH DAMAGE. 20246074Sgabor * 21246074Sgabor * patch - a program to apply diffs to original files 22246074Sgabor * 23246074Sgabor * -C option added in 1998, original code by Marc Espie, based on FreeBSD 24246074Sgabor * behaviour 25246074Sgabor * 26276218Spfg * $OpenBSD: util.h,v 1.16 2014/12/13 10:31:07 tobias Exp $ 27246091Sdelphij * $FreeBSD: releng/11.0/usr.bin/patch/util.h 286795 2015-08-15 00:42:33Z delphij $ 28246074Sgabor */ 29246074Sgabor 30246074Sgaborchar *fetchname(const char *, bool *, int); 31246074Sgaborint backup_file(const char *); 32246074Sgaborint move_file(const char *, const char *); 33246074Sgaborint copy_file(const char *, const char *); 34246074Sgaborvoid say(const char *, ...) 35246074Sgabor __attribute__((__format__(__printf__, 1, 2))); 36246074Sgaborvoid fatal(const char *, ...) 37246074Sgabor __attribute__((__format__(__printf__, 1, 2))); 38246074Sgaborvoid pfatal(const char *, ...) 39246074Sgabor __attribute__((__format__(__printf__, 1, 2))); 40246074Sgaborvoid ask(const char *, ...) 41246074Sgabor __attribute__((__format__(__printf__, 1, 2))); 42246074Sgaborchar *savestr(const char *); 43276218Spfgchar *xstrdup(const char *); 44246074Sgaborvoid set_signals(int); 45246074Sgaborvoid ignore_signals(void); 46246074Sgaborvoid makedirs(const char *, bool); 47246074Sgaborvoid version(void); 48246074Sgaborvoid my_exit(int) __attribute__((noreturn)); 49246074Sgabor 50246074Sgabor/* in mkpath.c */ 51246074Sgaborextern int mkpath(char *); 52