1 /* @(#)gterror.c	1.1 18/06/16 Copyright 1985, 1989, 1995-2018 J. Schilling */
2 /*
3  *	fprintf() on standard error stdio stream
4  *
5  *	Copyright (c) 1985, 1989, 1995-2018 J. Schilling
6  */
7 /*
8  * The contents of this file are subject to the terms of the
9  * Common Development and Distribution License, Version 1.0 only
10  * (the "License").  You may not use this file except in compliance
11  * with the License.
12  *
13  * See the file CDDL.Schily.txt in this distribution for details.
14  * A copy of the CDDL is also available via the Internet at
15  * http://www.opensource.org/licenses/cddl1.txt
16  *
17  * When distributing Covered Code, include this CDDL HEADER in each
18  * file and include the License file CDDL.Schily.txt from this distribution.
19  */
20 
21 #include <schily/mconfig.h>
22 #include <schily/stdio.h>
23 #include <schily/standard.h>
24 #include <schily/varargs.h>
25 #include <schily/schily.h>
26 #include <schily/nlsdefs.h>
27 
28 /* VARARGS1 */
29 #ifdef	PROTOTYPES
30 EXPORT int
gterror(const char * fmt,...)31 gterror(const char *fmt, ...)
32 #else
33 EXPORT int
34 gterror(fmt, va_alist)
35 	char	*fmt;
36 	va_dcl
37 #endif
38 {
39 	va_list	args;
40 	int	ret;
41 
42 #ifdef	PROTOTYPES
43 	va_start(args, fmt);
44 #else
45 	va_start(args);
46 #endif
47 	ret = js_fprintf(stderr, "%r", _(fmt), args);
48 	va_end(args);
49 	return (ret);
50 }
51