Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/menuc Move hard-coded /usr/share/misc from mdb.c to ...
details: https://anonhg.NetBSD.org/src/rev/e575c472f799
branches: trunk
changeset: 516098:e575c472f799
user: bjh21 <bjh21%NetBSD.org@localhost>
date: Mon Oct 15 22:20:03 2001 +0000
description:
Move hard-coded /usr/share/misc from mdb.c to pathnames.h, in accordance
with KNF.
diffstat:
usr.bin/menuc/mdb.c | 5 +++--
usr.bin/menuc/pathnames.h | 5 +++++
2 files changed, 8 insertions(+), 2 deletions(-)
diffs (35 lines):
diff -r 1fe3f25b0f56 -r e575c472f799 usr.bin/menuc/mdb.c
--- a/usr.bin/menuc/mdb.c Mon Oct 15 22:11:12 2001 +0000
+++ b/usr.bin/menuc/mdb.c Mon Oct 15 22:20:03 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mdb.c,v 1.21 2001/02/20 23:52:55 cgd Exp $ */
+/* $NetBSD: mdb.c,v 1.22 2001/10/15 22:20:03 bjh21 Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -43,6 +43,7 @@
#include <string.h>
#include "mdb.h"
#include "defs.h"
+#include "pathnames.h"
/* Data */
#define MAX 1000
@@ -128,7 +129,7 @@
/* Open the menu_sys file first. */
sys_prefix = getenv ("MENUDEF");
if (sys_prefix == NULL)
- sys_prefix = "/usr/share/misc";
+ sys_prefix = _PATH_DEFSYSPREFIX;
snprintf (sname, 1024, "%s/%s", sys_prefix, sys_name);
sys_file = fopen (sname, "r");
if (sys_file == NULL) {
diff -r 1fe3f25b0f56 -r e575c472f799 usr.bin/menuc/pathnames.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/usr.bin/menuc/pathnames.h Mon Oct 15 22:20:03 2001 +0000
@@ -0,0 +1,5 @@
+/* $NetBSD: pathnames.h,v 1.1 2001/10/15 22:20:03 bjh21 Exp $ */
+
+#ifndef _PATH_DEFSYSPREFIX
+#define _PATH_DEFSYSPREFIX "/usr/share/misc"
+#endif
Home |
Main Index |
Thread Index |
Old Index