coreutils/lib/backupfile.h

62 lines
1.7 KiB
C
Raw Normal View History

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
#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. */
no_backups,
1992-11-01 04:42:48 +08:00
1997-05-27 17:41:25 +08:00
/* Make simple backups of every file. */
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. */
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. */
numbered_backups
1992-11-01 04:42:48 +08:00
};
# define VALID_BACKUP_TYPE(Type) \
((unsigned int) (Type) <= numbered_backups)
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
#endif /* ! BACKUPFILE_H_ */