xref: /minix3/usr.bin/patch/backupfile.h (revision 757e83288ac54fa2d663d17e4a302156fdb3650a)
1 /*
2  * $OpenBSD: backupfile.h,v 1.6 2003/07/28 18:35:36 otto Exp $
3  * $DragonFly: src/usr.bin/patch/backupfile.h,v 1.3 2007/09/29 23:11:10 swildner Exp $
4  * $NetBSD: backupfile.h,v 1.6 2008/09/19 18:33:34 joerg Exp $
5  */
6 
7 /*
8  * backupfile.h -- declarations for making Emacs style backup file names
9  * Copyright (C) 1990 Free Software Foundation, Inc.
10  *
11  * This program is free software; you can redistribute it and/or modify it
12  * without restriction.
13  *
14  * This program is distributed in the hope that it will be useful, but WITHOUT
15  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16  * FITNESS FOR A PARTICULAR PURPOSE.
17  *
18  */
19 
20 /* When to make backup files. */
21 enum backup_type {
22 	/* Never make backups. */
23 	none,
24 
25 	/* Make simple backups of every file. */
26 	simple,
27 
28 	/*
29 	 * Make numbered backups of files that already have numbered backups,
30 	 * and simple backups of the others.
31 	 */
32 	numbered_existing,
33 
34 	/* Make numbered backups of every file. */
35 	numbered
36 };
37 
38 extern enum backup_type backup_type;
39 extern const char	*simple_backup_suffix;
40 
41 char		*find_backup_file_name(const char *file);
42 enum backup_type get_version(const char *version);
43