Added MACHINES to EXTRA_DIST so that it gets put in the distribution.
[mmh] / docs / historical / mh-6.8.5 / sbr / m_backup.c
1 /* m_backup.c - construct a backup file */
2
3 #include "../h/mh.h"
4 #include <stdio.h>
5
6
7 char   *m_backup (file)
8 register char   *file;
9 {
10     register char  *cp;
11     static char buffer[BUFSIZ];
12
13     if ((cp = r1bindex (file, '/')) == file)
14         (void) sprintf (buffer, "%s%s", SBACKUP, cp);
15     else
16         (void) sprintf (buffer, "%.*s%s%s", cp - file, file, SBACKUP, cp);
17     (void) (unlink (buffer));
18
19     return buffer;
20 }