1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-20 02:36:16 +02:00
Files
coreutils/lib/backupfile.h

55 lines
1.7 KiB
C
Raw Normal View History

1992-10-31 20:42:48 +00:00
/* backupfile.h -- declarations for making Emacs style backup file names
2003-08-18 09:44:49 +00:00
Copyright (C) 1990, 1991, 1992, 1997, 1998, 1999, 2003 Free
Software Foundation, Inc.
1992-10-31 20:42:48 +00:00
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
1997-05-27 09:41:25 +00:00
along with this program; see the file COPYING.
If not, write to the Free Software Foundation,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
1992-10-31 20:42:48 +00:00
#ifndef BACKUPFILE_H_
# define BACKUPFILE_H_
1997-05-27 09:41:25 +00:00
/* When to make backup files. */
1992-10-31 20:42:48 +00:00
enum backup_type
{
1997-05-27 09:41:25 +00:00
/* Never make backups. */
none,
1992-10-31 20:42:48 +00:00
1997-05-27 09:41:25 +00:00
/* Make simple backups of every file. */
1992-10-31 20:42:48 +00:00
simple,
/* Make numbered backups of files that already have numbered backups,
1997-05-27 09:41:25 +00:00
and simple backups of the others. */
1992-10-31 20:42:48 +00:00
numbered_existing,
1997-05-27 09:41:25 +00:00
/* Make numbered backups of every file. */
1992-10-31 20:42:48 +00:00
numbered
};
# define VALID_BACKUP_TYPE(Type) \
((Type) == none \
|| (Type) == simple \
|| (Type) == numbered_existing \
|| (Type) == numbered)
1997-05-27 09:41:25 +00:00
extern char const *simple_backup_suffix;
2003-06-18 07:46:31 +00:00
char *find_backup_file_name (char const *, enum backup_type);
enum backup_type get_version (char const *context, char const *arg);
enum backup_type xget_version (char const *context, char const *arg);
void addext (char *, char const *, int);
#endif /* ! BACKUPFILE_H_ */