Subject: lib/1064: sys_errlist and sys_nerr are not documented
To: None <gnats-admin@sun-lamp.cs.berkeley.edu>
From: John Hawkinson <jhawk@MIT.EDU>
List: netbsd-bugs
Date: 05/19/1995 00:35:03
>Number: 1064
>Category: lib
>Synopsis: sys_errlist and sys_nerr are not documented
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: lib-bug-people (Library Bug People)
>State: open
>Class: doc-bug
>Submitter-Id: net
>Arrival-Date: Fri May 19 00:35:01 1995
>Originator: John Hawkinson
>Organization:
MIT SIPB
>Release: Fri May 19 03:28:38 EDT 1995
>Environment:
System: NetBSD lola-granola 1.0A NetBSD 1.0A (LOLA) #14: Thu May 18 15:17:31 EDT 1995 mycroft@limekiller:/afs/sipb.mit.edu/system/i386_nbsd1/usr/src/sys/arch/i386/compile/LOLA i386
>Description:
sys_errlist and sys_nerr are not documented.
Makefile.inc also needs a $NetBSD$
>How-To-Repeat:
>Fix:
Taking the example of psignal(3), I've added them
to the perror(3) man page (rather than either strerror(3) or
their own man page). It should be noted that sys_errlist(3) is
referenced in strerror(3).
*** perror.3 1995/05/19 07:22:32 1.1
--- /usr/src/lib/libc/stdio/perror.3 1995/05/19 07:27:19 1.2
***************
*** 37,52 ****
.\"
.\" @(#)strerror.3 6.9 (Berkeley) 6/29/91
.\"
! .Dd June 29, 1991
.Dt PERROR 3
.Os BSD 4
.Sh NAME
! .Nm perror
! .Nd write error messages to standard error
.Sh SYNOPSIS
.Fd #include <stdio.h>
.Ft void
.Fn perror "const char *string"
.Sh DESCRIPTION
The
.Fn perror
--- 37,56 ----
.\"
.\" @(#)strerror.3 6.9 (Berkeley) 6/29/91
.\"
! .Dd May 19, 1995
.Dt PERROR 3
.Os BSD 4
.Sh NAME
! .Nm perror ,
! .Nm sys_errlist ,
! .Nm sys_nerr
! .Nd system error messages
.Sh SYNOPSIS
.Fd #include <stdio.h>
.Ft void
.Fn perror "const char *string"
+ .Vt extern const char *sys_errlist[];
+ .Vt extern int sys_nerr;
.Sh DESCRIPTION
The
.Fn perror
***************
*** 71,76 ****
--- 75,89 ----
.Fn strerror
with argument
.Fa errno .
+ .Pp
+ The message strings can be accessed directly using the external array
+ .Va sys_errlist ,
+ indexed by
+ .Va errno
+ numbers. The external variable
+ .Va sys_nerr
+ contains a count of the strings in
+ .Va sys_errlist .
.Sh SEE ALSO
.Xr intro 2 ,
.Xr psignal 3 ,
*** Makefile.inc Fri May 19 03:33:02 1995
--- /usr/src/lib/libc/stdio/Makefile.inc Fri May 19 03:32:31 1995
***************
*** 1,5 ****
# from: @(#)Makefile.inc 5.7 (Berkeley) 6/27/91
! # $Id: Makefile.inc,v 1.10 1995/02/25 17:06:28 cgd Exp $
# stdio sources
.PATH: ${.CURDIR}/stdio
--- 1,5 ----
# from: @(#)Makefile.inc 5.7 (Berkeley) 6/27/91
! # $NetBSD: Makefile.inc,v 1.10 1995/02/25 17:06:28 cgd Exp $
# stdio sources
.PATH: ${.CURDIR}/stdio
***************
*** 31,36 ****
--- 31,37 ----
MLINKS+=funopen.3 fropen.3 funopen.3 fwopen.3
MLINKS+=getc.3 fgetc.3 getc.3 getchar.3 getc.3 getw.3
MLINKS+=mktemp.3 mkstemp.3
+ MLINKS+=perror.3 sys_errlist.3 sys_nerr.3
MLINKS+=printf.3 fprintf.3 printf.3 snprintf.3 printf.3 sprintf.3 \
printf.3 vfprintf.3 printf.3 vprintf.3 printf.3 vsnprintf.3 \
printf.3 vsprintf.3
>Audit-Trail:
>Unformatted: