Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Apr 2001 13:14:13 -0400 (EDT)
From:      "Andrew R. Reiter" <arr@watson.org>
To:        Dima Dorfman <dima@unixfreak.org>
Cc:        freebsd-doc@freebsd.org
Subject:   Updated uprintf.9 (was Re: uprintf.9)
Message-ID:  <Pine.NEB.3.96L.1010430131148.32108A-200000@fledge.watson.org>
In-Reply-To: <20010428061557.26E213E2C@bazooka.unixfreak.org>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
Hey,

Attached is the updated uprintf.9 with tprintf() and printf() als
described in it.  anyway.. not sure how i did on the move from uprintf()
only to the group of these functions... so I welcome comments.

andrew

*-------------.................................................
| Andrew R. Reiter 
| arr@fledge.watson.org
| "It requires a very unusual mind
|   to undertake the analysis of the obvious" -- A.N. Whitehead

[-- Attachment #2 --]
.\"
.\" Copyright (c) 2001 Andrew R. Reiter.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\"
.Dd April 25, 2001 
.Dt UPRINTF 9
.Os FreeBSD
.Sh NAME
.Nm uprintf
.Nd formatted output to the controlling terminal
.Sh SYNOPSIS
.Fd #include <sys/types.h>
.Fd #include <sys/systm.h>
.Ft int
.Fn uprintf "const char *fmt" "..."
.Ft void
.Fn tprintf "struct proc *p" "int pri" "const char *fmt" "..."
.Ft int
.Fn printf "const char *fmt" "..."
.Sh DESCRIPTION
The
.Nm
functions act very similar to how the libc
.Fn printf
call works, but each has a specific output stream depending on which is called. 
The
.Fn uprintf
function outputs to the currect process' controlling tty, while 
.Fn printf
will write to the console as well as the logging facility.  
.Fn tprintf
on the other hand will output to the associated tty found from the 
.Fa struct proc *p
parameter, but will also write to the logging facility if the 
.Fa int pri
value is not -1.
.Pp 
Each of these related functions all use the 
.Fa const char *fmt
parameters in the same manner as the libc 
.Fn printf
function.
.Pp
.El
.Sh RETURN VALUES
The
.Fn uprintf
and the
.Fn printf
functions both return 0 on success as well as on failure. 
.El
.Sh SEE ALSO
.Xr printf 3
help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1010430131148.32108A-200000>