1 /* @(#)format.h	1.4 18/09/10 Copyright 2018 J. Schilling */
2 /*
3  *	Definitions used in common by format.c and fconf.c
4  *
5  *	Copyright (c) 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 #ifndef	_FORMAT_H
22 #define	_FORMAT_H
23 
24 /*
25  * printf() modifier flags
26  */
27 #define	MINUSFLG	1	/* '-' flag */
28 #define	PLUSFLG		2	/* '+' flag */
29 #define	SPACEFLG	4	/* ' ' flag */
30 #define	HASHFLG		8	/* '#' flag */
31 #define	APOFLG		16	/* '\'' flag */
32 #define	GOTDOT		32	/* '.' found */
33 #define	GOTSTAR		64	/* '*' found */
34 #define	UPPERFLG	128	/* %E/%F/%G */
35 #define	PADZERO		256	/* '0' pad */
36 #define	STRIPZERO	512	/* %g like trailing '0' removal */
37 
38 #define	SIGNFLG		0x10000	/* sign flag from *cvt() */
39 
40 extern	int	_ftoes __PR((char *, double, int, int, int));
41 extern	int	_ftofs __PR((char *, double, int, int, int));
42 extern	int	_ftogs __PR((char *, double, int, int, int));
43 #ifdef	HAVE_LONGDOUBLE
44 extern	int	_qftoes __PR((char *, long double, int, int, int));
45 extern	int	_qftofs __PR((char *, long double, int, int, int));
46 extern	int	_qftogs __PR((char *, long double, int, int, int));
47 #endif
48 
49 #endif	/* _FORMAT_H */
50