xref: /freebsd/usr.bin/patch/backupfile.h (revision 42b388439bd3795e09258c57a74ce9eec3651c7b)
12dd076b8SGabor Kovesdan /*-
22dd076b8SGabor Kovesdan  * Copyright (C) 1990 Free Software Foundation, Inc.
32dd076b8SGabor Kovesdan  *
42dd076b8SGabor Kovesdan  * This program is free software; you can redistribute it and/or modify it
52dd076b8SGabor Kovesdan  * without restriction.
62dd076b8SGabor Kovesdan  *
72dd076b8SGabor Kovesdan  * This program is distributed in the hope that it will be useful, but WITHOUT
82dd076b8SGabor Kovesdan  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
92dd076b8SGabor Kovesdan  * FITNESS FOR A PARTICULAR PURPOSE.
102dd076b8SGabor Kovesdan  *
11*e56ef7d3SXin LI  * backupfile.h -- declarations for making Emacs style backup file names
12*e56ef7d3SXin LI  *
132dd076b8SGabor Kovesdan  * $OpenBSD: backupfile.h,v 1.6 2003/07/28 18:35:36 otto Exp $
142dd076b8SGabor Kovesdan  */
152dd076b8SGabor Kovesdan 
162dd076b8SGabor Kovesdan /* When to make backup files. */
172dd076b8SGabor Kovesdan enum backup_type {
182dd076b8SGabor Kovesdan 	/* Never make backups. */
192dd076b8SGabor Kovesdan 	none,
202dd076b8SGabor Kovesdan 
212dd076b8SGabor Kovesdan 	/* Make simple backups of every file. */
222dd076b8SGabor Kovesdan 	simple,
232dd076b8SGabor Kovesdan 
242dd076b8SGabor Kovesdan 	/*
252dd076b8SGabor Kovesdan 	 * Make numbered backups of files that already have numbered backups,
262dd076b8SGabor Kovesdan 	 * and simple backups of the others.
272dd076b8SGabor Kovesdan 	 */
282dd076b8SGabor Kovesdan 	numbered_existing,
292dd076b8SGabor Kovesdan 
302dd076b8SGabor Kovesdan 	/* Make numbered backups of every file. */
312dd076b8SGabor Kovesdan 	numbered
322dd076b8SGabor Kovesdan };
332dd076b8SGabor Kovesdan 
342dd076b8SGabor Kovesdan extern enum backup_type backup_type;
352dd076b8SGabor Kovesdan extern const char	*simple_backup_suffix;
362dd076b8SGabor Kovesdan 
372dd076b8SGabor Kovesdan char		*find_backup_file_name(const char *file);
382dd076b8SGabor Kovesdan enum backup_type get_version(const char *version);
39