home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / indent-1.9.1-base.tgz / indent-1.9.1-base.tar / fsf / indent / backup.h < prev    next >
C/C++ Source or Header  |  1994-01-29  |  2KB  |  53 lines

  1. /* Copyright (c) 1993,1994, Joseph Arceneaux.  All rights reserved.
  2.  
  3.    This file is subject to the terms of the GNU General Public License as
  4.    published by the Free Software Foundation.  A copy of this license is
  5.    included with this software distribution in the file COPYING.  If you
  6.    do not have a copy, you may obtain a copy by writing to the Free
  7.    Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  8.  
  9.    This software 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.  
  15. /* When to make backup files.  Analagous to 'version-control'
  16.    in Emacs. */
  17. enum backup_mode
  18. {
  19.   /* Uninitialized or indeterminate value */
  20.   unknown,
  21.  
  22.   /* Never make backups. */
  23.   none,
  24.  
  25.   /* Make simple backups of every file. */
  26.   simple,
  27.  
  28.   /* Make numbered backups of files that already have numbered backups,
  29.      and simple backups of the others. */
  30.   numbered_existing,
  31.  
  32.   /* Make numbered backups of every file. */
  33.   numbered
  34. };
  35.  
  36. struct version_control_values
  37. {
  38.   enum backup_mode value;
  39.   char *name;
  40. };
  41.  
  42. /* Determine the value of `version_control' by looking in the
  43.    environment variable "VERSION_CONTROL".  Defaults to
  44.    numbered_existing. */
  45. extern enum backup_mode version_control_value ();
  46.  
  47. /* Initialize information used in determining backup filenames. */
  48. extern void initialize_backups ();
  49.  
  50. /* Make a backup copy of FILE, taking into account version-control.
  51.    See the description at the beginning of the file for details. */
  52. extern void make_backup ();
  53.