No empty .Rs/.Re
[netbsd-mini2440.git] / usr.bin / patch / pch.h
blob13a88dd2aad719f2502333c17e0e844ecea8d8b4
1 /*
2 * $OpenBSD: pch.h,v 1.9 2003/10/31 20:20:45 millert Exp $
3 * $DragonFly: src/usr.bin/patch/pch.h,v 1.1 2004/09/24 18:44:28 joerg Exp $
4 * $NetBSD$
5 */
7 /*
8 * patch - a program to apply diffs to original files
9 *
10 * Copyright 1986, Larry Wall
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following condition is met:
14 * 1. Redistributions of source code must retain the above copyright notice,
15 * this condition and the following disclaimer.
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
18 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20 * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
21 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
29 * -C option added in 1998, original code by Marc Espie, based on FreeBSD
30 * behaviour
33 #define OLD_FILE 0
34 #define NEW_FILE 1
35 #define INDEX_FILE 2
36 #define MAX_FILE 3
38 struct file_name {
39 char *path;
40 bool exists;
43 void re_patch(void);
44 void open_patch_file(const char *);
45 void set_hunkmax(void);
46 bool there_is_another_patch(void);
47 bool another_hunk(void);
48 bool pch_swap(void);
49 char *pfetch(LINENUM);
50 short pch_line_len(LINENUM);
51 LINENUM pch_first(void);
52 LINENUM pch_ptrn_lines(void);
53 LINENUM pch_newfirst(void);
54 LINENUM pch_repl_lines(void);
55 LINENUM pch_end(void);
56 LINENUM pch_context(void);
57 LINENUM pch_hunk_beg(void);
58 char pch_char(LINENUM);
59 void do_ed_script(void);