floor, ceil, trunc, truncf, truncl: Defeat GCC optimizations.
[gnulib.git] / lib / backupfile.h
blobe22b0d0676a00e9178613df0a5f823a84e95fd2c
1 /* backupfile.h -- declarations for making Emacs style backup file names
3 Copyright (C) 1990-1992, 1997-1999, 2003-2004, 2009-2018 Free Software
4 Foundation, Inc.
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 3 of the License, or
9 (at your option) any later version.
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.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <https://www.gnu.org/licenses/>. */
19 #ifndef BACKUPFILE_H_
20 # define BACKUPFILE_H_
22 # ifdef __cplusplus
23 extern "C" {
24 # endif
27 /* When to make backup files. */
28 enum backup_type
30 /* Never make backups. */
31 no_backups,
33 /* Make simple backups of every file. */
34 simple_backups,
36 /* Make numbered backups of files that already have numbered backups,
37 and simple backups of the others. */
38 numbered_existing_backups,
40 /* Make numbered backups of every file. */
41 numbered_backups
44 # define VALID_BACKUP_TYPE(Type) \
45 ((unsigned int) (Type) <= numbered_backups)
47 extern char const *simple_backup_suffix;
49 void set_simple_backup_suffix (char const *);
50 char *backup_file_rename (char const *, enum backup_type);
51 char *find_backup_file_name (char const *, enum backup_type);
52 enum backup_type get_version (char const *context, char const *arg);
53 enum backup_type xget_version (char const *context, char const *arg);
54 void addext (char *, char const *, int);
57 # ifdef __cplusplus
59 # endif
61 #endif /* ! BACKUPFILE_H_ */