Blame trio/triop.h

Packit Service 8f0814
/*************************************************************************
Packit Service 8f0814
 *
Packit Service 8f0814
 * $Id: triop.h,v 1.15 2005/03/24 15:43:03 breese Exp $
Packit Service 8f0814
 *
Packit Service 8f0814
 * Copyright (C) 2000 Bjorn Reese and Daniel Stenberg.
Packit Service 8f0814
 *
Packit Service 8f0814
 * Permission to use, copy, modify, and distribute this software for any
Packit Service 8f0814
 * purpose with or without fee is hereby granted, provided that the above
Packit Service 8f0814
 * copyright notice and this permission notice appear in all copies.
Packit Service 8f0814
 *
Packit Service 8f0814
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
Packit Service 8f0814
 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
Packit Service 8f0814
 * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
Packit Service 8f0814
 * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
Packit Service 8f0814
 *
Packit Service 8f0814
 ************************************************************************
Packit Service 8f0814
 *
Packit Service 8f0814
 * Private functions, types, etc. used for callback functions.
Packit Service 8f0814
 *
Packit Service 8f0814
 * The ref pointer is an opaque type and should remain as such.
Packit Service 8f0814
 * Private data must only be accessible through the getter and
Packit Service 8f0814
 * setter functions.
Packit Service 8f0814
 *
Packit Service 8f0814
 ************************************************************************/
Packit Service 8f0814
Packit Service 8f0814
#ifndef TRIO_TRIOP_H
Packit Service 8f0814
#define TRIO_TRIOP_H
Packit Service 8f0814
Packit Service 8f0814
#include "triodef.h"
Packit Service 8f0814
Packit Service 8f0814
#include <stdlib.h>
Packit Service 8f0814
#if defined(TRIO_COMPILER_ANCIENT)
Packit Service 8f0814
# include <varargs.h>
Packit Service 8f0814
#else
Packit Service 8f0814
# include <stdarg.h>
Packit Service 8f0814
#endif
Packit Service 8f0814
Packit Service 8f0814
#ifdef __cplusplus
Packit Service 8f0814
extern "C" {
Packit Service 8f0814
#endif
Packit Service 8f0814
Packit Service 8f0814
/*************************************************************************
Packit Service 8f0814
 * Supported standards
Packit Service 8f0814
 */
Packit Service 8f0814
Packit Service 8f0814
/*
Packit Service 8f0814
 * TRIO_C99 (=0 or =1)
Packit Service 8f0814
 *
Packit Service 8f0814
 * Define this to 0 to disable C99 format specifier extensions, or
Packit Service 8f0814
 * define to 1 to enable them.  The format specifiers that are
Packit Service 8f0814
 * disabled by this switch are labelled with [C99] in the format
Packit Service 8f0814
 * specifier documentation.
Packit Service 8f0814
 */
Packit Service 8f0814
#if !defined(TRIO_C99)
Packit Service 8f0814
# define TRIO_C99 1
Packit Service 8f0814
#endif
Packit Service 8f0814
Packit Service 8f0814
/*
Packit Service 8f0814
 * TRIO_BSD (=0 or =1)
Packit Service 8f0814
 *
Packit Service 8f0814
 * Define this to 0 to disable BSD format specifier extensions, or
Packit Service 8f0814
 * define to 1 to enable them.  The format specifiers that are
Packit Service 8f0814
 * disabled by this switch are labelled with [BSD] in the format
Packit Service 8f0814
 * specifier documentation.
Packit Service 8f0814
 */
Packit Service 8f0814
#if !defined(TRIO_BSD)
Packit Service 8f0814
# define TRIO_BSD 1
Packit Service 8f0814
#endif
Packit Service 8f0814
Packit Service 8f0814
/*
Packit Service 8f0814
 * TRIO_GNU (=0 or =1)
Packit Service 8f0814
 *
Packit Service 8f0814
 * Define this to 0 to disable GNU format specifier extensions, or
Packit Service 8f0814
 * define to 1 to enable them.  The format specifiers that are
Packit Service 8f0814
 * disabled by this switch are labelled with [GNU] in the format
Packit Service 8f0814
 * specifier documentation.
Packit Service 8f0814
 */
Packit Service 8f0814
#if !defined(TRIO_GNU)
Packit Service 8f0814
# define TRIO_GNU 1
Packit Service 8f0814
#endif
Packit Service 8f0814
Packit Service 8f0814
/*
Packit Service 8f0814
 * TRIO_MISC (=0 or =1)
Packit Service 8f0814
 *
Packit Service 8f0814
 * Define this to 0 to disable miscellaneous format specifier
Packit Service 8f0814
 * extensions, or define to 1 to enable them.  The format specifiers
Packit Service 8f0814
 * that are disabled by this switch are labelled with [MISC] in the
Packit Service 8f0814
 * format specifier documentation.
Packit Service 8f0814
 */
Packit Service 8f0814
#if !defined(TRIO_MISC)
Packit Service 8f0814
# define TRIO_MISC 1
Packit Service 8f0814
#endif
Packit Service 8f0814
Packit Service 8f0814
/*
Packit Service 8f0814
 * TRIO_UNIX98 (=0 or =1)
Packit Service 8f0814
 *
Packit Service 8f0814
 * Define this to 0 to disable UNIX98 format specifier extensions,
Packit Service 8f0814
 * or define to 1 to enable them.  The format specifiers that are
Packit Service 8f0814
 * disabled by this switch are labelled with [UNIX98] in the format
Packit Service 8f0814
 * specifier documentation.
Packit Service 8f0814
 */
Packit Service 8f0814
#if !defined(TRIO_UNIX98)
Packit Service 8f0814
# define TRIO_UNIX98 1
Packit Service 8f0814
#endif
Packit Service 8f0814
  
Packit Service 8f0814
/*
Packit Service 8f0814
 * TRIO_MICROSOFT (=0 or =1)
Packit Service 8f0814
 *
Packit Service 8f0814
 * Define this to 0 to disable Microsoft Visual C format specifier
Packit Service 8f0814
 * extensions, or define to 1 to enable them.  The format specifiers
Packit Service 8f0814
 * that are disabled by this switch are labelled with [MSVC] in the
Packit Service 8f0814
 * format specifier documentation.
Packit Service 8f0814
 */
Packit Service 8f0814
#if !defined(TRIO_MICROSOFT)
Packit Service 8f0814
# define TRIO_MICROSOFT 1
Packit Service 8f0814
#endif
Packit Service 8f0814
Packit Service 8f0814
/*
Packit Service 8f0814
 * TRIO_EXTENSION (=0 or =1)
Packit Service 8f0814
 *
Packit Service 8f0814
 * Define this to 0 to disable Trio-specific extensions, or define
Packit Service 8f0814
 * to 1 to enable them.  This has two effects: it controls whether
Packit Service 8f0814
 * or not the Trio user-defined formating mechanism
Packit Service 8f0814
 * (trio_register() etc) is supported, and it enables or disables
Packit Service 8f0814
 * Trio's own format specifier extensions.  The format specifiers
Packit Service 8f0814
 * that are disabled by this switch are labelled with [TRIO] in
Packit Service 8f0814
 * the format specifier documentation.
Packit Service 8f0814
 */
Packit Service 8f0814
#if !defined(TRIO_EXTENSION)
Packit Service 8f0814
# define TRIO_EXTENSION 1
Packit Service 8f0814
#endif
Packit Service 8f0814
Packit Service 8f0814
/*************************************************************************
Packit Service 8f0814
 * Features
Packit Service 8f0814
 */
Packit Service 8f0814
Packit Service 8f0814
#if defined(TRIO_SNPRINTF_ONLY)
Packit Service 8f0814
# define TRIO_FEATURE_SCANF 0
Packit Service 8f0814
# define TRIO_FEATURE_FILE 0
Packit Service 8f0814
# define TRIO_FEATURE_STDIO 0
Packit Service 8f0814
# define TRIO_FEATURE_FD 0
Packit Service 8f0814
# define TRIO_FEATURE_DYNAMICSTRING 0
Packit Service 8f0814
# define TRIO_FEATURE_CLOSURE 0
Packit Service 8f0814
# define TRIO_FEATURE_STRERR 0
Packit Service 8f0814
# define TRIO_FEATURE_LOCALE 0
Packit Service 8f0814
# define TRIO_EMBED_NAN 1
Packit Service 8f0814
# define TRIO_EMBED_STRING 1
Packit Service 8f0814
#endif
Packit Service 8f0814
  
Packit Service 8f0814
/*
Packit Service 8f0814
 * TRIO_FEATURE_SCANF (=0 or =1)
Packit Service 8f0814
 *
Packit Service 8f0814
 * Define this to 0 to disable all the scanf() variants, or define to 1
Packit Service 8f0814
 * to enable them.
Packit Service 8f0814
 */
Packit Service 8f0814
#if !defined(TRIO_FEATURE_SCANF)
Packit Service 8f0814
# define TRIO_FEATURE_SCANF 1
Packit Service 8f0814
#endif
Packit Service 8f0814
  
Packit Service 8f0814
/*
Packit Service 8f0814
 * TRIO_FEATURE_FILE (=0 or =1)
Packit Service 8f0814
 *
Packit Service 8f0814
 * Define this to 0 to disable compilation of the trio_fprintf() and
Packit Service 8f0814
 * trio_fscanf() family of functions, or define to 1 to enable them.
Packit Service 8f0814
 *
Packit Service 8f0814
 * This may be useful on an embedded platform with no filesystem.
Packit Service 8f0814
 * Note that trio_printf() uses fwrite to write to stdout, so if you
Packit Service 8f0814
 * do not have an implementation of fwrite() at all then you must also
Packit Service 8f0814
 * define TRIO_FEATURE_STDIO to 0.
Packit Service 8f0814
 */
Packit Service 8f0814
#if !defined(TRIO_FEATURE_FILE)
Packit Service 8f0814
# define TRIO_FEATURE_FILE 1
Packit Service 8f0814
#endif
Packit Service 8f0814
Packit Service 8f0814
/*
Packit Service 8f0814
 * TRIO_FEATURE_STDIO (=0 or =1)
Packit Service 8f0814
 *
Packit Service 8f0814
 * Define this to 0 to disable compilation of the trio_printf() and
Packit Service 8f0814
 * trio_scanf() family of functions, or define to 1 to enable them.
Packit Service 8f0814
 *
Packit Service 8f0814
 * This may be useful on an embedded platform with no standard I/O.
Packit Service 8f0814
 */
Packit Service 8f0814
#if !defined(TRIO_FEATURE_STDIO)
Packit Service 8f0814
# define TRIO_FEATURE_STDIO 1
Packit Service 8f0814
#endif
Packit Service 8f0814
Packit Service 8f0814
/*
Packit Service 8f0814
 * TRIO_FEATURE_FD (=0 or =1)
Packit Service 8f0814
 *
Packit Service 8f0814
 * Define this to 0 to disable compilation of the trio_dprintf() and
Packit Service 8f0814
 * trio_dscanf() family of functions, or define to 1 to enable them.
Packit Service 8f0814
 *
Packit Service 8f0814
 * This may be useful on an embedded platform with no filesystem, or on
Packit Service 8f0814
 * a platform that supports file I/O using FILE* but not using raw file
Packit Service 8f0814
 * descriptors.
Packit Service 8f0814
 */
Packit Service 8f0814
#if !defined(TRIO_FEATURE_FD)
Packit Service 8f0814
# define TRIO_FEATURE_FD 1
Packit Service 8f0814
#endif
Packit Service 8f0814
Packit Service 8f0814
/*
Packit Service 8f0814
 * TRIO_FEATURE_DYNAMICSTRING (=0 or =1)
Packit Service 8f0814
 *
Packit Service 8f0814
 * Define this to 0 to disable compilation of the trio_aprintf() 
Packit Service 8f0814
 * family of functions, or define to 1 to enable them.
Packit Service 8f0814
 *
Packit Service 8f0814
 * If you define both this and TRIO_MINIMAL to 0, then Trio will never
Packit Service 8f0814
 * call malloc or free.
Packit Service 8f0814
 */
Packit Service 8f0814
#if !defined(TRIO_FEATURE_DYNAMICSTRING)
Packit Service 8f0814
# define TRIO_FEATURE_DYNAMICSTRING 1
Packit Service 8f0814
#endif
Packit Service 8f0814
Packit Service 8f0814
/*
Packit Service 8f0814
 * TRIO_FEATURE_CLOSURE (=0 or =1)
Packit Service 8f0814
 *
Packit Service 8f0814
 * Define this to 0 to disable compilation of the trio_cprintf() and
Packit Service 8f0814
 * trio_cscanf() family of functions, or define to 1 to enable them.
Packit Service 8f0814
 *
Packit Service 8f0814
 * These functions are rarely needed. This saves a (small) amount of code.
Packit Service 8f0814
 */
Packit Service 8f0814
#if !defined(TRIO_FEATURE_CLOSURE)
Packit Service 8f0814
# define TRIO_FEATURE_CLOSURE 1
Packit Service 8f0814
#endif
Packit Service 8f0814
Packit Service 8f0814
/*
Packit Service 8f0814
 * TRIO_FEATURE_ERRORCODE (=0 or =1)
Packit Service 8f0814
 *
Packit Service 8f0814
 * Define this to 0 to return -1 from the print and scan function on
Packit Service 8f0814
 * error, or define to 1 to return a negative number with debugging
Packit Service 8f0814
 * information as part of the return code.
Packit Service 8f0814
 *
Packit Service 8f0814
 * If enabled, the return code will be a negative number, which encodes
Packit Service 8f0814
 * an error code and an error location. These can be decoded with the
Packit Service 8f0814
 * TRIO_ERROR_CODE and TRIO_ERROR_POSITION macros.
Packit Service 8f0814
 */
Packit Service 8f0814
#if defined(TRIO_ERRORS)
Packit Service 8f0814
# define TRIO_FEATURE_ERRORCODE TRIO_ERRORS
Packit Service 8f0814
#endif
Packit Service 8f0814
#if !defined(TRIO_FEATURE_ERRORCODE)
Packit Service 8f0814
# define TRIO_FEATURE_ERRORCODE 1
Packit Service 8f0814
#endif
Packit Service 8f0814
Packit Service 8f0814
/*
Packit Service 8f0814
 * TRIO_FEATURE_STRERR (=0 or =1)
Packit Service 8f0814
 *
Packit Service 8f0814
 * Define this to 0 if you do not use trio_strerror(), or define to 1 if
Packit Service 8f0814
 * you do use it.
Packit Service 8f0814
 *
Packit Service 8f0814
 * This saves a (small) amount of code.
Packit Service 8f0814
 */
Packit Service 8f0814
#if !defined(TRIO_FEATURE_STRERR)
Packit Service 8f0814
# define TRIO_FEATURE_STRERR 1
Packit Service 8f0814
#endif
Packit Service 8f0814
Packit Service 8f0814
/*
Packit Service 8f0814
 * TRIO_FEATURE_FLOAT (=0 or =1)
Packit Service 8f0814
 *
Packit Service 8f0814
 * Define this to 0 to disable all floating-point support, or define
Packit Service 8f0814
 * to 1 to enable it.
Packit Service 8f0814
 *
Packit Service 8f0814
 * This is useful in restricted embedded platforms that do not support
Packit Service 8f0814
 * floating-point.  Obviously you cannot use floating-point format
Packit Service 8f0814
 * specifiers if you define this.
Packit Service 8f0814
 *
Packit Service 8f0814
 * Do not compile trionan.c if you disable this.
Packit Service 8f0814
 */
Packit Service 8f0814
#if !defined(TRIO_FEATURE_FLOAT)
Packit Service 8f0814
# define TRIO_FEATURE_FLOAT 1
Packit Service 8f0814
#endif
Packit Service 8f0814
Packit Service 8f0814
/*
Packit Service 8f0814
 * TRIO_FEATURE_LOCALE (=0 or =1)
Packit Service 8f0814
 *
Packit Service 8f0814
 * Define this to 0 to disable customized locale support, or define
Packit Service 8f0814
 * to 1 to enable it.
Packit Service 8f0814
 *
Packit Service 8f0814
 * This saves a (small) amount of code.
Packit Service 8f0814
 */
Packit Service 8f0814
#if !defined(TRIO_FEATURE_LOCALE)
Packit Service 8f0814
# define TRIO_FEATURE_LOCALE 1
Packit Service 8f0814
#endif
Packit Service 8f0814
Packit Service 8f0814
/*
Packit Service 8f0814
 * TRIO_MINIMAL
Packit Service 8f0814
 *
Packit Service 8f0814
 * Define this to disable building the public trionan.h and triostr.h.
Packit Service 8f0814
 * If you define this, then you must not compile trionan.c and triostr.c
Packit Service 8f0814
 * separately.
Packit Service 8f0814
 */
Packit Service 8f0814
#if defined(TRIO_MINIMAL)
Packit Service 8f0814
# if !defined(TRIO_EMBED_NAN)
Packit Service 8f0814
#  define TRIO_EMBED_NAN
Packit Service 8f0814
# endif
Packit Service 8f0814
# if !defined(TRIO_EMBED_STRING)
Packit Service 8f0814
#  define TRIO_EMBED_STRING
Packit Service 8f0814
# endif
Packit Service 8f0814
#endif
Packit Service 8f0814
  
Packit Service 8f0814
/* Does not work yet. Do not enable */
Packit Service 8f0814
#ifndef TRIO_FEATURE_WIDECHAR
Packit Service 8f0814
# define TRIO_FEATURE_WIDECHAR 0
Packit Service 8f0814
#endif
Packit Service 8f0814
Packit Service 8f0814
/*************************************************************************
Packit Service 8f0814
 * Mapping standards to internal features
Packit Service 8f0814
 */
Packit Service 8f0814
Packit Service 8f0814
#if !defined(TRIO_FEATURE_HEXFLOAT)
Packit Service 8f0814
# define TRIO_FEATURE_HEXFLOAT (TRIO_C99 && TRIO_FEATURE_FLOAT)
Packit Service 8f0814
#endif
Packit Service 8f0814
Packit Service 8f0814
#if !defined(TRIO_FEATURE_LONGDOUBLE)
Packit Service 8f0814
# define TRIO_FEATURE_LONGDOUBLE TRIO_FEATURE_FLOAT
Packit Service 8f0814
#endif
Packit Service 8f0814
Packit Service 8f0814
#if !defined(TRIO_FEATURE_ERRNO)
Packit Service 8f0814
# define TRIO_FEATURE_ERRNO TRIO_GNU
Packit Service 8f0814
#endif
Packit Service 8f0814
Packit Service 8f0814
#if !defined(TRIO_FEATURE_QUAD)
Packit Service 8f0814
# define TRIO_FEATURE_QUAD (TRIO_BSD || TRIO_GNU)
Packit Service 8f0814
#endif
Packit Service 8f0814
Packit Service 8f0814
#if !defined(TRIO_FEATURE_SIZE_T)
Packit Service 8f0814
# define TRIO_FEATURE_SIZE_T TRIO_C99
Packit Service 8f0814
#endif
Packit Service 8f0814
Packit Service 8f0814
#if !defined(TRIO_FEATURE_SIZE_T_UPPER)
Packit Service 8f0814
# define TRIO_FEATURE_SIZE_T_UPPER TRIO_GNU
Packit Service 8f0814
#endif
Packit Service 8f0814
  
Packit Service 8f0814
#if !defined(TRIO_FEATURE_PTRDIFF_T)
Packit Service 8f0814
# define TRIO_FEATURE_PTRDIFF_T TRIO_C99
Packit Service 8f0814
#endif
Packit Service 8f0814
Packit Service 8f0814
#if !defined(TRIO_FEATURE_INTMAX_T)
Packit Service 8f0814
# define TRIO_FEATURE_INTMAX_T TRIO_C99
Packit Service 8f0814
#endif
Packit Service 8f0814
Packit Service 8f0814
#if !defined(TRIO_FEATURE_FIXED_SIZE)
Packit Service 8f0814
# define TRIO_FEATURE_FIXED_SIZE TRIO_MICROSOFT
Packit Service 8f0814
#endif
Packit Service 8f0814
Packit Service 8f0814
#if !defined(TRIO_FEATURE_POSITIONAL)
Packit Service 8f0814
# define TRIO_FEATURE_POSITIONAL TRIO_UNIX98
Packit Service 8f0814
#endif
Packit Service 8f0814
Packit Service 8f0814
#if !defined(TRIO_FEATURE_USER_DEFINED)
Packit Service 8f0814
# define TRIO_FEATURE_USER_DEFINED TRIO_EXTENSION
Packit Service 8f0814
#endif
Packit Service 8f0814
Packit Service 8f0814
#if !defined(TRIO_FEATURE_BINARY)
Packit Service 8f0814
# define TRIO_FEATURE_BINARY TRIO_EXTENSION
Packit Service 8f0814
#endif
Packit Service 8f0814
Packit Service 8f0814
#if !defined(TRIO_FEATURE_QUOTE)
Packit Service 8f0814
# define TRIO_FEATURE_QUOTE TRIO_EXTENSION
Packit Service 8f0814
#endif
Packit Service 8f0814
  
Packit Service 8f0814
#if !defined(TRIO_FEATURE_STICKY)
Packit Service 8f0814
# define TRIO_FEATURE_STICKY TRIO_EXTENSION
Packit Service 8f0814
#endif
Packit Service 8f0814
  
Packit Service 8f0814
#if !defined(TRIO_FEATURE_VARSIZE)
Packit Service 8f0814
# define TRIO_FEATURE_VARSIZE TRIO_EXTENSION
Packit Service 8f0814
#endif
Packit Service 8f0814
Packit Service 8f0814
#if !defined(TRIO_FEATURE_ROUNDING)
Packit Service 8f0814
# define TRIO_FEATURE_ROUNDING TRIO_EXTENSION
Packit Service 8f0814
#endif
Packit Service 8f0814
  
Packit Service 8f0814
/*************************************************************************
Packit Service 8f0814
 * Memory handling
Packit Service 8f0814
 */
Packit Service 8f0814
#ifndef TRIO_MALLOC
Packit Service 8f0814
# define TRIO_MALLOC(n) malloc(n)
Packit Service 8f0814
#endif
Packit Service 8f0814
#ifndef TRIO_REALLOC
Packit Service 8f0814
# define TRIO_REALLOC(x,n) realloc((x),(n))
Packit Service 8f0814
#endif
Packit Service 8f0814
#ifndef TRIO_FREE
Packit Service 8f0814
# define TRIO_FREE(x) free(x)
Packit Service 8f0814
#endif
Packit Service 8f0814
Packit Service 8f0814
Packit Service 8f0814
/*************************************************************************
Packit Service 8f0814
 * User-defined specifiers
Packit Service 8f0814
 */
Packit Service 8f0814
Packit Service 8f0814
typedef int (*trio_callback_t) TRIO_PROTO((trio_pointer_t));
Packit Service 8f0814
Packit Service 8f0814
trio_pointer_t trio_register TRIO_PROTO((trio_callback_t callback, const char *name));
Packit Service 8f0814
void trio_unregister TRIO_PROTO((trio_pointer_t handle));
Packit Service 8f0814
Packit Service 8f0814
TRIO_CONST char *trio_get_format TRIO_PROTO((trio_pointer_t ref));
Packit Service 8f0814
trio_pointer_t trio_get_argument TRIO_PROTO((trio_pointer_t ref));
Packit Service 8f0814
Packit Service 8f0814
/* Modifiers */
Packit Service 8f0814
int  trio_get_width TRIO_PROTO((trio_pointer_t ref));
Packit Service 8f0814
void trio_set_width TRIO_PROTO((trio_pointer_t ref, int width));
Packit Service 8f0814
int  trio_get_precision TRIO_PROTO((trio_pointer_t ref));
Packit Service 8f0814
void trio_set_precision TRIO_PROTO((trio_pointer_t ref, int precision));
Packit Service 8f0814
int  trio_get_base TRIO_PROTO((trio_pointer_t ref));
Packit Service 8f0814
void trio_set_base TRIO_PROTO((trio_pointer_t ref, int base));
Packit Service 8f0814
int  trio_get_padding TRIO_PROTO((trio_pointer_t ref));
Packit Service 8f0814
void trio_set_padding TRIO_PROTO((trio_pointer_t ref, int is_padding));
Packit Service 8f0814
int  trio_get_short TRIO_PROTO((trio_pointer_t ref)); /* h */
Packit Service 8f0814
void trio_set_shortshort TRIO_PROTO((trio_pointer_t ref, int is_shortshort));
Packit Service 8f0814
int  trio_get_shortshort TRIO_PROTO((trio_pointer_t ref)); /* hh */
Packit Service 8f0814
void trio_set_short TRIO_PROTO((trio_pointer_t ref, int is_short));
Packit Service 8f0814
int  trio_get_long TRIO_PROTO((trio_pointer_t ref)); /* l */
Packit Service 8f0814
void trio_set_long TRIO_PROTO((trio_pointer_t ref, int is_long));
Packit Service 8f0814
int  trio_get_longlong TRIO_PROTO((trio_pointer_t ref)); /* ll */
Packit Service 8f0814
void trio_set_longlong TRIO_PROTO((trio_pointer_t ref, int is_longlong));
Packit Service 8f0814
int  trio_get_longdouble TRIO_PROTO((trio_pointer_t ref)); /* L */
Packit Service 8f0814
void trio_set_longdouble TRIO_PROTO((trio_pointer_t ref, int is_longdouble));
Packit Service 8f0814
int  trio_get_alternative TRIO_PROTO((trio_pointer_t ref)); /* # */
Packit Service 8f0814
void trio_set_alternative TRIO_PROTO((trio_pointer_t ref, int is_alternative));
Packit Service 8f0814
int  trio_get_alignment TRIO_PROTO((trio_pointer_t ref)); /* - */
Packit Service 8f0814
void trio_set_alignment TRIO_PROTO((trio_pointer_t ref, int is_leftaligned));
Packit Service 8f0814
int  trio_get_spacing TRIO_PROTO((trio_pointer_t ref)); /*  TRIO_PROTO((space) */
Packit Service 8f0814
void trio_set_spacing TRIO_PROTO((trio_pointer_t ref, int is_space));
Packit Service 8f0814
int  trio_get_sign TRIO_PROTO((trio_pointer_t ref)); /* + */
Packit Service 8f0814
void trio_set_sign TRIO_PROTO((trio_pointer_t ref, int is_showsign));
Packit Service 8f0814
#if TRIO_FEATURE_QUOTE
Packit Service 8f0814
int  trio_get_quote TRIO_PROTO((trio_pointer_t ref)); /* ' */
Packit Service 8f0814
void trio_set_quote TRIO_PROTO((trio_pointer_t ref, int is_quote));
Packit Service 8f0814
#endif
Packit Service 8f0814
int  trio_get_upper TRIO_PROTO((trio_pointer_t ref));
Packit Service 8f0814
void trio_set_upper TRIO_PROTO((trio_pointer_t ref, int is_upper));
Packit Service 8f0814
#if TRIO_FEATURE_INTMAX_T
Packit Service 8f0814
int  trio_get_largest TRIO_PROTO((trio_pointer_t ref)); /* j */
Packit Service 8f0814
void trio_set_largest TRIO_PROTO((trio_pointer_t ref, int is_largest));
Packit Service 8f0814
#endif
Packit Service 8f0814
#if TRIO_FEATURE_PTRDIFF_T
Packit Service 8f0814
int  trio_get_ptrdiff TRIO_PROTO((trio_pointer_t ref)); /* t */
Packit Service 8f0814
void trio_set_ptrdiff TRIO_PROTO((trio_pointer_t ref, int is_ptrdiff));
Packit Service 8f0814
#endif
Packit Service 8f0814
#if TRIO_FEATURE_SIZE_T
Packit Service 8f0814
int  trio_get_size TRIO_PROTO((trio_pointer_t ref)); /* z / Z */
Packit Service 8f0814
void trio_set_size TRIO_PROTO((trio_pointer_t ref, int is_size));
Packit Service 8f0814
#endif
Packit Service 8f0814
Packit Service 8f0814
/* Printing */
Packit Service 8f0814
int trio_print_ref TRIO_PROTO((trio_pointer_t ref, const char *format, ...));
Packit Service 8f0814
int trio_vprint_ref TRIO_PROTO((trio_pointer_t ref, const char *format, va_list args));
Packit Service 8f0814
int trio_printv_ref TRIO_PROTO((trio_pointer_t ref, const char *format, trio_pointer_t *args));
Packit Service 8f0814
Packit Service 8f0814
void trio_print_int TRIO_PROTO((trio_pointer_t ref, int number));
Packit Service 8f0814
void trio_print_uint TRIO_PROTO((trio_pointer_t ref, unsigned int number));
Packit Service 8f0814
/*  void trio_print_long TRIO_PROTO((trio_pointer_t ref, long number)); */
Packit Service 8f0814
/*  void trio_print_ulong TRIO_PROTO((trio_pointer_t ref, unsigned long number)); */
Packit Service 8f0814
void trio_print_double TRIO_PROTO((trio_pointer_t ref, double number));
Packit Service 8f0814
void trio_print_string TRIO_PROTO((trio_pointer_t ref, char *string));
Packit Service 8f0814
void trio_print_pointer TRIO_PROTO((trio_pointer_t ref, trio_pointer_t pointer));
Packit Service 8f0814
Packit Service 8f0814
#ifdef __cplusplus
Packit Service 8f0814
} /* extern "C" */
Packit Service 8f0814
#endif
Packit Service 8f0814
Packit Service 8f0814
#endif /* TRIO_TRIOP_H */