Implement NL_CAT_LOCALE
Manpages cleanup
This commit is contained in:
parent
d95038c45e
commit
c897062234
@ -1,4 +1,4 @@
|
||||
.\" $Id$
|
||||
.\" $Id: catclose.3,v 1.4 1997/02/22 15:00:44 peter Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1994 Winning Strategies, Inc.
|
||||
.\" All rights reserved.
|
||||
@ -50,5 +50,5 @@ function closes the message catalog specified by the argument
|
||||
The
|
||||
.Fn catclose
|
||||
function conforms to
|
||||
.St -xpg3 .
|
||||
.St -xpg4 .
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $Id$
|
||||
.\" $Id: catgets.3,v 1.4 1997/02/22 15:00:46 peter Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1994 Winning Strategies, Inc.
|
||||
.\" All rights reserved.
|
||||
@ -37,7 +37,7 @@
|
||||
.Sh SYNOPSIS
|
||||
.Fd #include <nl_types.h>
|
||||
.Ft char *
|
||||
.Fn catgets "nl_catd catd" "int set_id" "int msg_id" "char *s"
|
||||
.Fn catgets "nl_catd catd" "int set_id" "int msg_id" "const char *s"
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Fn catgets
|
||||
@ -63,4 +63,5 @@ otherwise it returns
|
||||
.Sh STANDARDS
|
||||
The
|
||||
.Fn catgets
|
||||
function conforms to \fBxpg3\fR.
|
||||
function conforms to
|
||||
.St -xpg4 .
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $Id$
|
||||
.\" $Id: catopen.3,v 1.4 1997/02/22 15:00:48 peter Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1994 Winning Strategies, Inc.
|
||||
.\" All rights reserved.
|
||||
@ -57,9 +57,24 @@ is used with
|
||||
.Fa name
|
||||
substituted for %N.
|
||||
.Pp
|
||||
The
|
||||
If the
|
||||
.Fa oflag
|
||||
argument is reserved for future use and should be set to zero.
|
||||
argument is set to the
|
||||
.Dv NL_CAT_LOCALE
|
||||
constant,
|
||||
.Dv LC_MESSAGES
|
||||
locale category used to open the message catalog; using
|
||||
.Dv NL_CAT_LOCALE
|
||||
conforms to the
|
||||
.St -xpg4
|
||||
standard. You can specify 0 for compatibility with
|
||||
.St -xpg3 ;
|
||||
when
|
||||
.Fa oflag
|
||||
is set to 0, the
|
||||
.Ev LANG
|
||||
environment variable
|
||||
determines the message catalog locale.
|
||||
.Sh RETURN VALUE
|
||||
Upon successful completion,
|
||||
.Fn catopen
|
||||
@ -79,4 +94,4 @@ Insufficient memory is available.
|
||||
The
|
||||
.Fn catopen
|
||||
function conforms to
|
||||
.St -xpg3 .
|
||||
.St -xpg4 .
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: msgcat.c,v 1.12 1998/01/15 09:58:08 jb Exp $ */
|
||||
/* $Id: msgcat.c,v 1.13 1998/04/30 10:14:55 ache Exp $ */
|
||||
|
||||
/***********************************************************
|
||||
Copyright 1990, by Alfalfa Software Incorporated, Cambridge, Massachusetts.
|
||||
@ -57,6 +57,7 @@ static char *rcsid = "$NetBSD: msgcat.c,v 1.11 1995/02/27 13:06:51 cgd Exp $";
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <locale.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -99,8 +100,12 @@ int type;
|
||||
catpath = name;
|
||||
if (stat(catpath, &sbuf)) return(NLERR);
|
||||
} else {
|
||||
if ((lang = (char *) getenv("LANG")) == NULL)
|
||||
lang = "C";
|
||||
if (type == NL_CAT_LOCALE)
|
||||
lang = setlocale(LC_MESSAGES, NULL);
|
||||
else {
|
||||
if ((lang = (char *) getenv("LANG")) == NULL)
|
||||
lang = "C";
|
||||
}
|
||||
if ((nlspath = (char *) getenv("NLSPATH")) == NULL
|
||||
#ifndef __NETBSD_SYSCALLS
|
||||
|| issetugid()
|
||||
|
Loading…
x
Reference in New Issue
Block a user