source: vendor/patch/current/util.h@ 3445

Last change on this file since 3445 was 3444, checked in by bird, 18 years ago

patch 2.5.9

File size: 2.4 KB
Line 
1/* utility functions for `patch' */
2
3/* $Id: util.h,v 1.20 2003/05/20 13:56:48 eggert Exp $ */
4
5/* Copyright (C) 1986 Larry Wall
6
7 Copyright (C) 1992, 1993, 1997, 1998, 1999, 2001, 2002, 2003 Free
8 Software Foundation, Inc.
9
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2, or (at your option)
13 any later version.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; see the file COPYING.
22 If not, write to the Free Software Foundation,
23 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
24
25/* An upper bound on the print length of a signed decimal line number.
26 Add one for the sign. */
27#define LINENUM_LENGTH_BOUND (sizeof (LINENUM) * CHAR_BIT / 3 + 1)
28
29XTERN enum backup_type backup_type;
30
31bool ok_to_reverse (char const *, ...) __attribute__ ((format (printf, 1, 2)));
32void ask (char const *, ...) __attribute__ ((format (printf, 1, 2)));
33void say (char const *, ...) __attribute__ ((format (printf, 1, 2)));
34
35void fatal (char const *, ...)
36 __attribute__ ((noreturn, format (printf, 1, 2)));
37void pfatal (char const *, ...)
38 __attribute__ ((noreturn, format (printf, 1, 2)));
39
40char *fetchname (char *, int, time_t *);
41char *savebuf (char const *, size_t);
42char *savestr (char const *);
43char const *version_controller (char const *, bool, struct stat const *, char **, char **);
44bool version_get (char const *, char const *, bool, bool, char const *, struct stat *);
45int create_file (char const *, int, mode_t);
46int systemic (char const *);
47char *format_linenum (char[LINENUM_LENGTH_BOUND + 1], LINENUM);
48void Fseek (FILE *, file_offset, int);
49void copy_file (char const *, char const *, int, mode_t);
50void exit_with_signal (int) __attribute__ ((noreturn));
51void ignore_signals (void);
52void init_time (void);
53void memory_fatal (void) __attribute__ ((noreturn));
54void move_file (char const *, int volatile *, char *, mode_t, bool);
55void read_fatal (void) __attribute__ ((noreturn));
56void remove_prefix (char *, size_t);
57void removedirs (char *);
58void set_signals (bool);
59void write_fatal (void) __attribute__ ((noreturn));
Note: See TracBrowser for help on using the repository browser.