X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;ds=sidebyside;f=sbr%2Fm_backup.c;h=e8c55662fed75fb59fa9eda834c6a71fd82c8435;hb=ced6090a330d3d83d0bce709f756aa3d7d65fea4;hp=41598507ba9cd68c2b58d0d8e2f8d2110a28d7c0;hpb=6c40d481d661d532dd527eaf34cebb6d3f8ed086;p=mmh diff --git a/sbr/m_backup.c b/sbr/m_backup.c index 4159850..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; }