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