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.
This commit is contained in:
bjh21 2001-10-15 22:11:12 +00:00
parent 3527006336
commit 92fa26019d
2 changed files with 8 additions and 2 deletions

View File

@ -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 <string.h>
#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) {

5
usr.bin/msgc/pathnames.h Normal file
View File

@ -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