summaryrefslogtreecommitdiff
path: root/usr.bin/patch/backupfile.c
diff options
context:
space:
mode:
authormartin <martin@NetBSD.org>2021-02-26 13:29:16 +0000
committermartin <martin@NetBSD.org>2021-02-26 13:29:16 +0000
commitf01d8beb5e00a20bf2d70369594af95500b6eb7d (patch)
treed05d4288bbc8a1fce797a2222c34ebfd755b117d /usr.bin/patch/backupfile.c
parent66a44ab683e5ee8903339613333723471db02908 (diff)
Pull up following revision(s) (requested by nia in ticket #1215):
usr.bin/patch/backupfile.c: revision 1.16 usr.bin/patch/backupfile.h: revision 1.7 usr.bin/patch/patch.c: revision 1.30 patch: make '-V none' work in the expected way Internally the code confuses the concept of "the user doesn't want a backup file" and "the user hasn't defined a type of backup file". Introduce a new "undefined" backup type to serve the purpose "none" previously did, and make "none" not generate backup files, as expected. http://mail-index.netbsd.org/tech-userlevel/2021/02/19/msg012901.html XXX pullup?
Diffstat (limited to 'usr.bin/patch/backupfile.c')
-rw-r--r--usr.bin/patch/backupfile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/patch/backupfile.c b/usr.bin/patch/backupfile.c
index 25d60768cc2..7cb8eb7a936 100644
--- a/usr.bin/patch/backupfile.c
+++ b/usr.bin/patch/backupfile.c
@@ -1,7 +1,7 @@
/*
* $OpenBSD: backupfile.c,v 1.19 2006/03/11 19:41:30 otto Exp $
* $DragonFly: src/usr.bin/patch/backupfile.c,v 1.5 2008/08/11 00:05:06 joerg Exp $
- * $NetBSD: backupfile.c,v 1.15 2014/04/11 17:30:03 christos Exp $
+ * $NetBSD: backupfile.c,v 1.15.26.1 2021/02/26 13:29:16 martin Exp $
*/
/*
@@ -22,7 +22,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: backupfile.c,v 1.15 2014/04/11 17:30:03 christos Exp $");
+__RCSID("$NetBSD: backupfile.c,v 1.15.26.1 2021/02/26 13:29:16 martin Exp $");
#include <ctype.h>
#include <dirent.h>
@@ -38,7 +38,7 @@ __RCSID("$NetBSD: backupfile.c,v 1.15 2014/04/11 17:30:03 christos Exp $");
#define ISDIGIT(c) (isascii ((unsigned char)c) && isdigit ((unsigned char)c))
/* Which type of backup file names are generated. */
-enum backup_type backup_type = none;
+enum backup_type backup_type = undefined;
/*
* The extension added to file names to produce a simple (as opposed to