X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=sbr%2Fm_backup.c;h=e8c55662fed75fb59fa9eda834c6a71fd82c8435;hb=ced6090a330d3d83d0bce709f756aa3d7d65fea4;hp=c34c40974343f1b92e0de5c685090d916f05fc38;hpb=5dd6771b28c257af405d7248639ed0e3bcdce38b;p=mmh diff --git a/sbr/m_backup.c b/sbr/m_backup.c index c34c409..e8c5566 100644 --- a/sbr/m_backup.c +++ b/sbr/m_backup.c @@ -1,11 +1,10 @@ - /* - * m_backup.c -- construct a backup file - * - * This code is Copyright (c) 2002, by the authors of nmh. See the - * COPYRIGHT file in the root directory of the nmh distribution for - * complete copyright information. - */ +** m_backup.c -- construct a backup file +** +** This code is Copyright (c) 2002, by the authors of nmh. See the +** COPYRIGHT file in the root directory of the nmh distribution for +** complete copyright information. +*/ #include @@ -13,16 +12,15 @@ char * m_backup (char *file) { - char *cp; - static char buffer[BUFSIZ]; + char *cp; + static char buffer[BUFSIZ]; - if ((cp = r1bindex(file, '/')) == file) - snprintf(buffer, sizeof(buffer), "%s%s", - BACKUP_PREFIX, cp); - else - snprintf(buffer, sizeof(buffer), "%.*s%s%s", (int)(cp - file), file, - BACKUP_PREFIX, cp); + if ((cp = r1bindex(file, '/')) == file) + snprintf(buffer, sizeof(buffer), "%s%s", backup_prefix, cp); + else + snprintf(buffer, sizeof(buffer), "%.*s%s%s", (int)(cp - file), + file, backup_prefix, cp); - unlink(buffer); - return buffer; + unlink(buffer); + return buffer; }