]>
diplodocus.org Git - nmh/blob - sbr/m_backup.c
3 * m_backup.c -- construct a backup file
5 * This code is Copyright (c) 2002, by the authors of nmh. See the
6 * COPYRIGHT file in the root directory of the nmh distribution for
7 * complete copyright information.
14 m_backup (const char *file
)
17 static char buffer
[BUFSIZ
];
19 if ((cp
= r1bindex((char *) file
, '/')) == file
)
20 snprintf(buffer
, sizeof(buffer
), "%s%s",
23 snprintf(buffer
, sizeof(buffer
), "%.*s%s%s", (int)(cp
- file
), file
,
26 (void) m_unlink(buffer
);