1992-11-01 04:42:48 +08:00
|
|
|
/* backupfile.h -- declarations for making Emacs style backup file names
|
2003-08-18 17:44:49 +08:00
|
|
|
|
2004-07-28 07:12:17 +08:00
|
|
|
Copyright (C) 1990, 1991, 1992, 1997, 1998, 1999, 2003, 2004 Free
|
2003-08-18 17:44:49 +08:00
|
|
|
Software Foundation, Inc.
|
1992-11-01 04:42:48 +08: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 17:41:25 +08:00
|
|
|
along with this program; see the file COPYING.
|
|
|
|
If not, write to the Free Software Foundation,
|
2005-05-14 15:58:06 +08:00
|
|
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
1992-11-01 04:42:48 +08:00
|
|
|
|
1998-09-28 01:44:49 +08:00
|
|
|
#ifndef BACKUPFILE_H_
|
|
|
|
# define BACKUPFILE_H_
|
|
|
|
|
2004-08-06 07:01:03 +08:00
|
|
|
# ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
# endif
|
|
|
|
|
|
|
|
|
1997-05-27 17:41:25 +08:00
|
|
|
/* When to make backup files. */
|
1992-11-01 04:42:48 +08:00
|
|
|
enum backup_type
|
|
|
|
{
|
1997-05-27 17:41:25 +08:00
|
|
|
/* Never make backups. */
|
2004-09-13 20:11:34 +08:00
|
|
|
no_backups,
|
1992-11-01 04:42:48 +08:00
|
|
|
|
1997-05-27 17:41:25 +08:00
|
|
|
/* Make simple backups of every file. */
|
2004-09-13 20:11:34 +08:00
|
|
|
simple_backups,
|
1992-11-01 04:42:48 +08:00
|
|
|
|
|
|
|
/* Make numbered backups of files that already have numbered backups,
|
1997-05-27 17:41:25 +08:00
|
|
|
and simple backups of the others. */
|
2004-09-13 20:11:34 +08:00
|
|
|
numbered_existing_backups,
|
1992-11-01 04:42:48 +08:00
|
|
|
|
1997-05-27 17:41:25 +08:00
|
|
|
/* Make numbered backups of every file. */
|
2004-09-13 20:11:34 +08:00
|
|
|
numbered_backups
|
1992-11-01 04:42:48 +08:00
|
|
|
};
|
|
|
|
|
1998-09-28 01:44:49 +08:00
|
|
|
# define VALID_BACKUP_TYPE(Type) \
|
2004-09-13 20:11:34 +08:00
|
|
|
((unsigned int) (Type) <= numbered_backups)
|
1998-01-21 23:55:12 +08:00
|
|
|
|
1997-05-27 17:41:25 +08:00
|
|
|
extern char const *simple_backup_suffix;
|
|
|
|
|
2003-06-18 15:46:31 +08: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);
|
2004-08-06 07:01:03 +08:00
|
|
|
void addext (char *, char const *, int);
|
|
|
|
|
|
|
|
|
|
|
|
# ifdef __cplusplus
|
|
|
|
}
|
|
|
|
# endif
|
1998-09-28 01:44:49 +08:00
|
|
|
|
|
|
|
#endif /* ! BACKUPFILE_H_ */
|