From 92fa26019d4a4362bd129a2dcd8082ed115be8e3 Mon Sep 17 00:00:00 2001 From: bjh21 Date: Mon, 15 Oct 2001 22:11:12 +0000 Subject: [PATCH] Move the default path definition from msgdb.c to a new pathnames.h, as required by KNF. This will also be required to allow msgc to be installed into ${TOOLDIR} properly. --- usr.bin/msgc/msgdb.c | 5 +++-- usr.bin/msgc/pathnames.h | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 usr.bin/msgc/pathnames.h diff --git a/usr.bin/msgc/msgdb.c b/usr.bin/msgc/msgdb.c index bfd77d6497e6..8da74f25b750 100644 --- a/usr.bin/msgc/msgdb.c +++ b/usr.bin/msgc/msgdb.c @@ -1,4 +1,4 @@ -/* $NetBSD: msgdb.c,v 1.11 1999/07/04 22:55:48 cgd Exp $ */ +/* $NetBSD: msgdb.c,v 1.12 2001/10/15 22:11:12 bjh21 Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -43,6 +43,7 @@ #include #include "defs.h" +#include "pathnames.h" static struct id_rec *head = NULL, *tail = NULL; static int msg_no = 0; @@ -111,7 +112,7 @@ write_msg_file () /* Open the msg_sys file first. */ sys_prefix = getenv ("MSGDEF"); 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 --git a/usr.bin/msgc/pathnames.h b/usr.bin/msgc/pathnames.h new file mode 100644 index 000000000000..6316d78d1421 --- /dev/null +++ b/usr.bin/msgc/pathnames.h @@ -0,0 +1,5 @@ +/* $NetBSD: pathnames.h,v 1.1 2001/10/15 22:11:12 bjh21 Exp $ */ + +#ifndef _PATH_DEFSYSPREFIX +#define _PATH_DEFSYSPREFIX "/usr/share/misc" +#endif