From ea13b9803b8a849cb95aa4a9b15b1f007b9fd3b0 Mon Sep 17 00:00:00 2001 From: ru Date: Wed, 4 Dec 2002 18:57:46 +0000 Subject: Consistently mark std(in|out|err) with .Dv, because that's how they are marked up in stdio(3), and because they are defined expressions of type "FILE *". Approved by: re --- lib/libc/gen/fmtmsg.3 | 12 ++++++------ lib/libc/net/rcmd.3 | 8 ++++---- lib/libc/net/rcmdsh.3 | 5 ++++- lib/libc/stdio/fgets.3 | 2 +- lib/libc/stdio/fopen.3 | 5 ++--- lib/libc/stdio/fputs.3 | 2 +- lib/libc/stdio/getwc.3 | 2 +- lib/libc/stdio/printf.3 | 2 +- lib/libc/stdio/putc.3 | 2 +- lib/libc/stdio/putwc.3 | 2 +- lib/libc/stdio/scanf.3 | 2 +- lib/libc/stdio/setbuf.3 | 7 ++++--- lib/libc/stdio/stdio.3 | 4 ++-- lib/libc/stdio/wprintf.3 | 2 +- lib/libc/stdio/wscanf.3 | 2 +- lib/libc/stdlib/getopt.3 | 2 +- lib/libc/stdlib/malloc.3 | 8 ++++++-- lib/libcompat/4.3/rexec.3 | 8 ++++---- lib/libdisk/libdisk.3 | 3 ++- lib/libkvm/kvm.3 | 4 +++- lib/libkvm/kvm_open.3 | 4 +++- 21 files changed, 50 insertions(+), 38 deletions(-) (limited to 'lib') diff --git a/lib/libc/gen/fmtmsg.3 b/lib/libc/gen/fmtmsg.3 index 8ecd8aa..7995d7b 100644 --- a/lib/libc/gen/fmtmsg.3 +++ b/lib/libc/gen/fmtmsg.3 @@ -45,7 +45,7 @@ The .Fn fmtmsg function displays a detailed diagnostic message, based on the supplied arguments, to -.Em stderr +.Dv stderr and/or the system console. .Pp The @@ -64,7 +64,7 @@ may be specified. .Bl -tag -width ".Dv MM_CONSOLE" .It Dv MM_PRINT Output should take place on -.Em stderr . +.Dv stderr . .It Dv MM_CONSOLE Output should take place on the system console. .El @@ -169,13 +169,13 @@ function returns upon success, .Dv MM_NOMSG to indicate output to -.Em stderr +.Dv stderr failed, .Dv MM_NOCON to indicate output to the system console failed, or .Dv MM_NOTOK to indicate output to -.Em stderr +.Dv stderr and the system console failed. .Sh ENVIRONMENT The @@ -184,7 +184,7 @@ The environment variable specifies which arguments to .Fn fmtmsg will be output to -.Em stderr , +.Dv stderr , and in which order. .Ev MSGVERB should be a colon @@ -214,7 +214,7 @@ TO FIX: refer to manual BSD:ls:001 .Ed .Pp to -.Em stderr . +.Dv stderr . .Pp The same code, with .Ev MSGVERB diff --git a/lib/libc/net/rcmd.3 b/lib/libc/net/rcmd.3 index ba2cc55..5367655 100644 --- a/lib/libc/net/rcmd.3 +++ b/lib/libc/net/rcmd.3 @@ -105,9 +105,9 @@ a socket in the Internet domain of type .Dv SOCK_STREAM is returned to the caller, and given to the remote command as -.Em stdin +.Dv stdin and -.Em stdout . +.Dv stdout . If .Fa fd2p is non-zero, then an auxiliary channel to a control @@ -123,10 +123,10 @@ forwarded to the process group of the command. If .Fa fd2p is 0, then the -.Em stderr +.Dv stderr (unit 2 of the remote command) will be made the same as the -.Em stdout +.Dv stdout and no provision is made for sending arbitrary signals to the remote process, although you may be able to get its attention by using out-of-band data. diff --git a/lib/libc/net/rcmdsh.3 b/lib/libc/net/rcmdsh.3 index f10073e..10d95a2 100644 --- a/lib/libc/net/rcmdsh.3 +++ b/lib/libc/net/rcmdsh.3 @@ -90,7 +90,10 @@ a socket in the domain of type .Dv SOCK_STREAM is returned to the caller, and given to the remote -command as stdin, stdout, and stderr. +command as +.Dv stdin , stdout , +and +.Dv stderr . .Sh RETURN VALUES The .Fn rcmdsh diff --git a/lib/libc/stdio/fgets.3 b/lib/libc/stdio/fgets.3 index 7a63039..fee8c92 100644 --- a/lib/libc/stdio/fgets.3 +++ b/lib/libc/stdio/fgets.3 @@ -78,7 +78,7 @@ with an infinite and a .Fa stream of -.Em stdin , +.Dv stdin , except that the newline character (if any) is not stored in the string. It is the caller's responsibility to ensure that the input line, if any, is sufficiently short to fit in the string. diff --git a/lib/libc/stdio/fopen.3 b/lib/libc/stdio/fopen.3 index a4614d7..502a049 100644 --- a/lib/libc/stdio/fopen.3 +++ b/lib/libc/stdio/fopen.3 @@ -164,10 +164,9 @@ The primary use of the function is to change the file associated with a standard text stream -.Pf ( Em stderr , -.Em stdin , +.Dv ( stderr , stdin , or -.Em stdout ) . +.Dv stdout ) . .Sh RETURN VALUES Upon successful completion .Fn fopen , diff --git a/lib/libc/stdio/fputs.3 b/lib/libc/stdio/fputs.3 index 12486bd..c51213d 100644 --- a/lib/libc/stdio/fputs.3 +++ b/lib/libc/stdio/fputs.3 @@ -68,7 +68,7 @@ writes the string .Fa str , and a terminating newline character, to the stream -.Em stdout . +.Dv stdout . .Sh RETURN VALUES The .Fn fputs diff --git a/lib/libc/stdio/getwc.3 b/lib/libc/stdio/getwc.3 index aea2e84..e308870 100644 --- a/lib/libc/stdio/getwc.3 +++ b/lib/libc/stdio/getwc.3 @@ -78,7 +78,7 @@ function is equivalent to .Fn getwc with the argument -.Em stdin . +.Dv stdin . .Sh RETURN VALUES If successful, these routines return the next wide-character from the diff --git a/lib/libc/stdio/printf.3 b/lib/libc/stdio/printf.3 index d17f27d..3f8e640 100644 --- a/lib/libc/stdio/printf.3 +++ b/lib/libc/stdio/printf.3 @@ -78,7 +78,7 @@ as described below. and .Fn vprintf write output to -.Pa stdout , +.Dv stdout , the standard output stream; .Fn fprintf and diff --git a/lib/libc/stdio/putc.3 b/lib/libc/stdio/putc.3 index 2c7439a..31bc57f 100644 --- a/lib/libc/stdio/putc.3 +++ b/lib/libc/stdio/putc.3 @@ -84,7 +84,7 @@ macro is identical to .Fn putc with an output stream of -.Em stdout . +.Dv stdout . .Pp The .Fn putw diff --git a/lib/libc/stdio/putwc.3 b/lib/libc/stdio/putwc.3 index cbb3cd0..b1c15c2 100644 --- a/lib/libc/stdio/putwc.3 +++ b/lib/libc/stdio/putwc.3 @@ -78,7 +78,7 @@ function is identical to .Fn putwc with an output stream of -.Em stdout . +.Dv stdout . .Sh RETURN VALUES The .Fn fputwc , diff --git a/lib/libc/stdio/scanf.3 b/lib/libc/stdio/scanf.3 index ea99c0e..5067e29 100644 --- a/lib/libc/stdio/scanf.3 +++ b/lib/libc/stdio/scanf.3 @@ -80,7 +80,7 @@ The .Fn scanf function reads input from the standard input stream -.Em stdin , +.Dv stdin , .Fn fscanf reads input from the stream pointer .Fa stream , diff --git a/lib/libc/stdio/setbuf.3 b/lib/libc/stdio/setbuf.3 index cb16fa3..d10b5bc 100644 --- a/lib/libc/stdio/setbuf.3 +++ b/lib/libc/stdio/setbuf.3 @@ -65,7 +65,8 @@ destination file or terminal as soon as written; when it is block buffered many characters are saved up and written as a block; when it is line buffered characters are saved up until a newline is output or input is read from any stream attached to a terminal device -(typically stdin). +(typically +.Dv stdin ) . The function .Xr fflush 3 may be used to force the block out early. @@ -81,10 +82,10 @@ is called, and an optimally-sized buffer is obtained. If a stream refers to a terminal (as -.Em stdout +.Dv stdout normally does) it is line buffered. The standard error stream -.Em stderr +.Dv stderr is always unbuffered. .Pp The diff --git a/lib/libc/stdio/stdio.3 b/lib/libc/stdio/stdio.3 index d1e53c3..637f3c1 100644 --- a/lib/libc/stdio/stdio.3 +++ b/lib/libc/stdio/stdio.3 @@ -127,9 +127,9 @@ opened explicitly: (for writing diagnostic output). .El These streams are abbreviated -.Em stdin , stdout +.Dv stdin , stdout and -.Em stderr . +.Dv stderr . Initially, the standard error stream is unbuffered; the standard input and output streams are fully buffered if and only if the streams do not refer to diff --git a/lib/libc/stdio/wprintf.3 b/lib/libc/stdio/wprintf.3 index 9d2874a..150ed5d 100644 --- a/lib/libc/stdio/wprintf.3 +++ b/lib/libc/stdio/wprintf.3 @@ -74,7 +74,7 @@ and .Fn vwprintf functions write output to -.Pa stdout , +.Dv stdout , the standard output stream; .Fn fwprintf and diff --git a/lib/libc/stdio/wscanf.3 b/lib/libc/stdio/wscanf.3 index bb432ad..e552246 100644 --- a/lib/libc/stdio/wscanf.3 +++ b/lib/libc/stdio/wscanf.3 @@ -82,7 +82,7 @@ The .Fn wscanf function reads input from the standard input stream -.Em stdin , +.Dv stdin , .Fn fwscanf reads input from the stream pointer .Fa stream , diff --git a/lib/libc/stdlib/getopt.3 b/lib/libc/stdlib/getopt.3 index 14c5fb4..8df433c 100644 --- a/lib/libc/stdlib/getopt.3 +++ b/lib/libc/stdlib/getopt.3 @@ -145,7 +145,7 @@ function encounters a character not found in the string .Va optstring or detects a missing option argument it writes an error message to the -.Em stderr +.Dv stderr and returns .Ql ?\& . Setting diff --git a/lib/libc/stdlib/malloc.3 b/lib/libc/stdlib/malloc.3 index 65173cf..8b8eafb 100644 --- a/lib/libc/stdlib/malloc.3 +++ b/lib/libc/stdlib/malloc.3 @@ -223,7 +223,9 @@ This option is incompatible with the option. .It X Rather than return failure for any allocation function, -display a diagnostic message on stderr and cause the program to drop +display a diagnostic message on +.Dv stderr +and cause the program to drop core (using .Xr abort 3 ) . This option should be set at compile time by including the following in @@ -390,7 +392,9 @@ The .Va _malloc_message variable allows the programmer to override the function which emits the text strings forming the errors and warnings if for some reason -the stderr filedescriptor is not suitable for this. +the +.Dv stderr +file descriptor is not suitable for this. Please note that doing anything which tries to allocate memory in this function will assure death of the process. .Pp diff --git a/lib/libcompat/4.3/rexec.3 b/lib/libcompat/4.3/rexec.3 index 14ef11b..4f25ca8 100644 --- a/lib/libcompat/4.3/rexec.3 +++ b/lib/libcompat/4.3/rexec.3 @@ -87,9 +87,9 @@ a socket in the Internet domain of type .Dv SOCK_STREAM is returned to the caller, and given to the remote command as -.Em stdin +.Dv stdin and -.Em stdout . +.Dv stdout . If .Fa fd2p is non-zero, then an auxiliary channel to a control @@ -108,10 +108,10 @@ verified. If .Fa fd2p is 0, then the -.Em stderr +.Dv stderr (unit 2 of the remote command) will be made the same as the -.Em stdout +.Dv stdout and no provision is made for sending arbitrary signals to the remote process, although you may be able to get its attention by using out-of-band data. diff --git a/lib/libdisk/libdisk.3 b/lib/libdisk/libdisk.3 index 272346e..4b38b26 100644 --- a/lib/libdisk/libdisk.3 +++ b/lib/libdisk/libdisk.3 @@ -214,7 +214,8 @@ or .Fn Clone_Disk . .Pp .Fn Debug_Disk -prints the content of the tree to stdout. +prints the content of the tree to +.Dv stdout . .Pp .Fn Set_Bios_Geom sets the geometry the bios uses. diff --git a/lib/libkvm/kvm.3 b/lib/libkvm/kvm.3 index 560f83d..dfa369a 100644 --- a/lib/libkvm/kvm.3 +++ b/lib/libkvm/kvm.3 @@ -83,7 +83,9 @@ issue since any code that manipulates processes is inherently machine dependent. .Pp Finally, the Sun kvm error reporting semantics are poorly defined. -The library can be configured either to print errors to stderr automatically, +The library can be configured either to print errors to +.Dv stderr +automatically, or to print no error messages at all. In the latter case, the nature of the error cannot be determined. To overcome this, the diff --git a/lib/libkvm/kvm_open.3 b/lib/libkvm/kvm_open.3 index c037850..86a4cae 100644 --- a/lib/libkvm/kvm_open.3 +++ b/lib/libkvm/kvm_open.3 @@ -118,7 +118,9 @@ no errors are reported and the application cannot know the specific nature of the failed kvm call. If it is not .Dv NULL , -errors are printed to stderr with +errors are printed to +.Dv stderr +with .Fa errstr prepended to the message, as in .Xr perror 3 . -- cgit v1.1