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