4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
22 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
23 /* All Rights Reserved */
26 #pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 2. */
29 Tout - Print surrogate debug output
32 void Tout(char *subname, char *msg, ...)
35 Tout prints debugging output if surrogate tracing
36 has been turned on (-T specified). The message will
37 also go to the debug output if debugging is turned
38 on (-x specified). The subroutine name is printed
39 if it is not a null string.
48 /* VARARGS2 PRINTFLIKE2 */
51 Tout(char *subname
, char *fmt
, ...)
54 Tout(Xsubname
, Xfmt
, va_alist
)
55 char *Xsubname
, *Xfmt
;
69 #if !defined(__STDC__) && defined(lint)
79 subname
= va_arg(args
, char *);
80 fmt
= va_arg(args
, char *);
82 if (subname
&& *subname
) {
83 fprintf(dbgfp
,"%s(): ", subname
);
85 vfprintf(dbgfp
, fmt
, args
);
94 subname
= va_arg(args
, char *);
95 fmt
= va_arg(args
, char *);
97 vfprintf(stdout
, fmt
, args
);