Add extern "C" for C++.
[gnulib.git] / lib / backupfile.h
1 /* backupfile.h -- declarations for making Emacs style backup file names
2
3    Copyright (C) 1990, 1991, 1992, 1997, 1998, 1999, 2003, 2004 Free
4    Software Foundation, Inc.
5
6    This program is free software; you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation; either version 2, or (at your option)
9    any later version.
10
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15
16    You should have received a copy of the GNU General Public License
17    along with this program; see the file COPYING.
18    If not, write to the Free Software Foundation,
19    59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
20
21 #ifndef BACKUPFILE_H_
22 # define BACKUPFILE_H_
23
24 # ifdef __cplusplus
25 extern "C" {
26 # endif
27
28
29 /* When to make backup files. */
30 enum backup_type
31 {
32   /* Never make backups. */
33   none,
34
35   /* Make simple backups of every file. */
36   simple,
37
38   /* Make numbered backups of files that already have numbered backups,
39      and simple backups of the others. */
40   numbered_existing,
41
42   /* Make numbered backups of every file. */
43   numbered
44 };
45
46 # define VALID_BACKUP_TYPE(Type)        \
47   ((Type) == none                       \
48    || (Type) == simple                  \
49    || (Type) == numbered_existing       \
50    || (Type) == numbered)
51
52 extern char const *simple_backup_suffix;
53
54 char *find_backup_file_name (char const *, enum backup_type);
55 enum backup_type get_version (char const *context, char const *arg);
56 enum backup_type xget_version (char const *context, char const *arg);
57 void addext (char *, char const *, int);
58
59
60 # ifdef __cplusplus
61 }
62 # endif
63
64 #endif /* ! BACKUPFILE_H_ */