pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/pkg_install-renovation]: pkgsrc/pkgtools/pkg_install/files/lib Inline...
details: https://anonhg.NetBSD.org/pkgsrc/rev/a943c5d523ba
branches: pkg_install-renovation
changeset: 541575:a943c5d523ba
user: joerg <joerg%pkgsrc.org@localhost>
date: Fri Aug 01 19:14:42 2008 +0000
description:
Inline an obscuring debug macro.
diffstat:
pkgtools/pkg_install/files/lib/plist.c | 18 +++++-------------
1 files changed, 5 insertions(+), 13 deletions(-)
diffs (55 lines):
diff -r d912fbbb1c63 -r a943c5d523ba pkgtools/pkg_install/files/lib/plist.c
--- a/pkgtools/pkg_install/files/lib/plist.c Wed Jul 30 22:26:03 2008 +0000
+++ b/pkgtools/pkg_install/files/lib/plist.c Fri Aug 01 19:14:42 2008 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: plist.c,v 1.17.4.4 2008/07/30 15:38:37 joerg Exp $ */
+/* $NetBSD: plist.c,v 1.17.4.5 2008/08/01 19:14:42 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -11,7 +11,7 @@
#if 0
static const char *rcsid = "from FreeBSD Id: plist.c,v 1.24 1997/10/08 07:48:15 charnier Exp";
#else
-__RCSID("$NetBSD: plist.c,v 1.17.4.4 2008/07/30 15:38:37 joerg Exp $");
+__RCSID("$NetBSD: plist.c,v 1.17.4.5 2008/08/01 19:14:42 joerg Exp $");
#endif
#endif
@@ -684,14 +684,6 @@
return fail;
}
-#ifdef DEBUG
-#define RMDIR(dir) fexec(RMDIR_CMD, dir, NULL)
-#define REMOVE(dir,ie) fexec_skipemtpy(REMOVE_CMD, (ie) ? "-f " : "", dir, NULL)
-#else
-#define RMDIR rmdir
-#define REMOVE(file,ie) (remove(file) && !(ie))
-#endif
-
/*
* Selectively delete a hierarchy
* Returns 1 on error, 0 else.
@@ -711,10 +703,10 @@
if (fexec_skipempty(REMOVE_CMD, "-r", ign_err ? "-f" : "", dir, NULL))
return 1;
} else if (isdir(dir)) {
- if (RMDIR(dir) && !ign_err)
+ if (rmdir(dir) && !ign_err)
return 1;
} else {
- if (REMOVE(dir, ign_err))
+ if (remove(dir) && !ign_err)
return 1;
}
@@ -725,7 +717,7 @@
*cp2 = '\0';
if (!isemptydir(dir))
return 0;
- if (RMDIR(dir) && !ign_err) {
+ if (rmdir(dir) && !ign_err) {
if (!fexists(dir))
warnx("directory `%s' doesn't really exist", dir);
else
Home |
Main Index |
Thread Index |
Old Index