xref: /titanic_51/usr/src/cmd/lp/lib/msgs/getmessage.c (revision b76c14595f2dd8b4765b40057467eb8796111fde)
1 /*
2  * CDDL HEADER START
3  *
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
7  * with the License.
8  *
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.
13  *
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]
19  *
20  * CDDL HEADER END
21  */
22 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23 /*	  All Rights Reserved  	*/
24 
25 
26 #ident	"%Z%%M%	%I%	%E% SMI"	/* SVr4.0 1.7	*/
27 /* LINTLIBRARY */
28 /*
29 */
30 
31 #if	defined(__STDC__)
32 # include	<stdarg.h>
33 #else
34 # include	<varargs.h>
35 #endif
36 
37 /* VARARGS */
38 #if	defined(__STDC__)
39 int getmessage ( char * buf, short type, ... )
40 #else
41 int getmessage (buf, type, va_alist)
42     char	*buf;
43     short	type;
44     va_dcl
45 #endif
46 {
47     va_list	arg;
48     int		rval;
49     int	_getmessage();
50 
51 #if	defined(__STDC__)
52     va_start(arg, type);
53 #else
54     va_start(arg);
55 #endif
56 
57     rval = _getmessage(buf, type, arg);
58     va_end(arg);
59     return(rval);
60 }
61