2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License, Version 1.0 only
2N/A * (the "License"). You may not use this file except in compliance
2N/A * with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A
2N/A/* Copyright (c) 1988 AT&T */
2N/A/* All Rights Reserved */
2N/A
2N/A/*
2N/A * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
2N/A * Use is subject to license terms.
2N/A */
2N/A
2N/A#ifndef _PRINT_H
2N/A#define _PRINT_H
2N/A
2N/A#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.9 */
2N/A
2N/A#include "file64.h"
2N/A#include <floatingpoint.h>
2N/A#include <thread.h>
2N/A#include <synch.h>
2N/A#include <stdio.h>
2N/A#include "stdiom.h"
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/Aextern ssize_t
2N/A_doprnt(const char *format, va_list in_args, FILE *iop);
2N/A
2N/Aextern ssize_t
2N/A_ndoprnt(const char *format, va_list in_args, FILE *iop, int flag);
2N/A
2N/Aextern ssize_t
2N/A_wndoprnt(const wchar_t *format, va_list in_args, FILE *iop, int flag);
2N/A
2N/Aextern void
2N/A__aconvert(double arg, int ndigits, int *exp, int *sign, char *buf);
2N/A
2N/Aextern void
2N/A__qaconvert(long double *arg, int ndigits, int *exp, int *sign, char *buf);
2N/A
2N/A/* Maximum number of digits in any integer representation */
2N/A#define MAXDIGS 11
2N/A
2N/A/* Maximum number of digits in any long long representation */
2N/A#define MAXLLDIGS 21
2N/A
2N/A/* Maximum total number of digits in E format */
2N/A#define MAXECVT (DECIMAL_STRING_LENGTH-1)
2N/A
2N/A/* Maximum number of digits after decimal point in F format */
2N/A#define MAXFCVT (DECIMAL_STRING_LENGTH-1)
2N/A
2N/A/* Maximum significant figures in a floating-point number */
2N/A/* DECIMAL_STRING_LENGTH in floatingpoint.h is max buffer size */
2N/A#define MAXFSIG (DECIMAL_STRING_LENGTH-1)
2N/A
2N/A/* Maximum number of characters in an exponent */
2N/A#define MAXESIZ 7 /* Max for quadruple precision */
2N/A
2N/A/* Maximum (positive) exponent */
2N/A#define MAXEXP 4950 /* Max for quadruple precision */
2N/A
2N/A/* Number of hex digits in a fp type when normalized with a leading 1 */
2N/A#define HEXFP_SINGLE_DIG 7
2N/A#define HEXFP_DOUBLE_DIG 14
2N/A#define HEXFP_EXTENDED_DIG 17
2N/A#define HEXFP_QUAD_DIG 29
2N/A
2N/A/* Data type for flags */
2N/Atypedef char bool;
2N/A
2N/A/* Convert a digit character to the corresponding number */
2N/A#define tonumber(x) ((x)-'0')
2N/A
2N/A/* Convert a number between 0 and 9 to the corresponding digit */
2N/A#define todigit(x) ((x)+'0')
2N/A
2N/A/* Max and Min macros */
2N/A#define max(a, b) ((a) > (b)? (a): (b))
2N/A#define min(a, b) ((a) < (b)? (a): (b))
2N/A
2N/A/* Max neg. long long */
2N/A#define HIBITLL (1ULL << 63)
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* _PRINT_H */