00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef TRIO_TRIOP_H
00027 #define TRIO_TRIOP_H
00028
00029 #include "triodef.h"
00030
00031 #include <stdlib.h>
00032 #if defined(TRIO_COMPILER_ANCIENT)
00033 # include <varargs.h>
00034 #else
00035 # include <stdarg.h>
00036 #endif
00037
00038 #ifdef __cplusplus
00039 extern "C" {
00040 #endif
00041
00042 #ifndef TRIO_C99
00043 # define TRIO_C99 1
00044 #endif
00045 #ifndef TRIO_BSD
00046 # define TRIO_BSD 1
00047 #endif
00048 #ifndef TRIO_GNU
00049 # define TRIO_GNU 1
00050 #endif
00051 #ifndef TRIO_MISC
00052 # define TRIO_MISC 1
00053 #endif
00054 #ifndef TRIO_UNIX98
00055 # define TRIO_UNIX98 1
00056 #endif
00057 #ifndef TRIO_MICROSOFT
00058 # define TRIO_MICROSOFT 1
00059 #endif
00060 #ifndef TRIO_EXTENSION
00061 # define TRIO_EXTENSION 1
00062 #endif
00063 #ifndef TRIO_WIDECHAR
00064 # define TRIO_WIDECHAR 0
00065 #endif
00066 #ifndef TRIO_ERRORS
00067 # define TRIO_ERRORS 1
00068 #endif
00069
00070 #ifndef TRIO_MALLOC
00071 # define TRIO_MALLOC(n) malloc(n)
00072 #endif
00073 #ifndef TRIO_REALLOC
00074 # define TRIO_REALLOC(x,n) realloc((x),(n))
00075 #endif
00076 #ifndef TRIO_FREE
00077 # define TRIO_FREE(x) free(x)
00078 #endif
00079
00080
00081
00082
00083
00084
00085 typedef int (*trio_callback_t) TRIO_PROTO((trio_pointer_t));
00086
00087 trio_pointer_t trio_register TRIO_PROTO((trio_callback_t callback, const char *name));
00088 void trio_unregister TRIO_PROTO((trio_pointer_t handle));
00089
00090 TRIO_CONST char *trio_get_format TRIO_PROTO((trio_pointer_t ref));
00091 trio_pointer_t trio_get_argument TRIO_PROTO((trio_pointer_t ref));
00092
00093
00094 int trio_get_width TRIO_PROTO((trio_pointer_t ref));
00095 void trio_set_width TRIO_PROTO((trio_pointer_t ref, int width));
00096 int trio_get_precision TRIO_PROTO((trio_pointer_t ref));
00097 void trio_set_precision TRIO_PROTO((trio_pointer_t ref, int precision));
00098 int trio_get_base TRIO_PROTO((trio_pointer_t ref));
00099 void trio_set_base TRIO_PROTO((trio_pointer_t ref, int base));
00100 int trio_get_padding TRIO_PROTO((trio_pointer_t ref));
00101 void trio_set_padding TRIO_PROTO((trio_pointer_t ref, int is_padding));
00102 int trio_get_short TRIO_PROTO((trio_pointer_t ref));
00103 void trio_set_shortshort TRIO_PROTO((trio_pointer_t ref, int is_shortshort));
00104 int trio_get_shortshort TRIO_PROTO((trio_pointer_t ref));
00105 void trio_set_short TRIO_PROTO((trio_pointer_t ref, int is_short));
00106 int trio_get_long TRIO_PROTO((trio_pointer_t ref));
00107 void trio_set_long TRIO_PROTO((trio_pointer_t ref, int is_long));
00108 int trio_get_longlong TRIO_PROTO((trio_pointer_t ref));
00109 void trio_set_longlong TRIO_PROTO((trio_pointer_t ref, int is_longlong));
00110 int trio_get_longdouble TRIO_PROTO((trio_pointer_t ref));
00111 void trio_set_longdouble TRIO_PROTO((trio_pointer_t ref, int is_longdouble));
00112 int trio_get_alternative TRIO_PROTO((trio_pointer_t ref));
00113 void trio_set_alternative TRIO_PROTO((trio_pointer_t ref, int is_alternative));
00114 int trio_get_alignment TRIO_PROTO((trio_pointer_t ref));
00115 void trio_set_alignment TRIO_PROTO((trio_pointer_t ref, int is_leftaligned));
00116 int trio_get_spacing TRIO_PROTO((trio_pointer_t ref));
00117 void trio_set_spacing TRIO_PROTO((trio_pointer_t ref, int is_space));
00118 int trio_get_sign TRIO_PROTO((trio_pointer_t ref));
00119 void trio_set_sign TRIO_PROTO((trio_pointer_t ref, int is_showsign));
00120 int trio_get_quote TRIO_PROTO((trio_pointer_t ref));
00121 void trio_set_quote TRIO_PROTO((trio_pointer_t ref, int is_quote));
00122 int trio_get_upper TRIO_PROTO((trio_pointer_t ref));
00123 void trio_set_upper TRIO_PROTO((trio_pointer_t ref, int is_upper));
00124 #if TRIO_C99
00125 int trio_get_largest TRIO_PROTO((trio_pointer_t ref));
00126 void trio_set_largest TRIO_PROTO((trio_pointer_t ref, int is_largest));
00127 int trio_get_ptrdiff TRIO_PROTO((trio_pointer_t ref));
00128 void trio_set_ptrdiff TRIO_PROTO((trio_pointer_t ref, int is_ptrdiff));
00129 int trio_get_size TRIO_PROTO((trio_pointer_t ref));
00130 void trio_set_size TRIO_PROTO((trio_pointer_t ref, int is_size));
00131 #endif
00132
00133
00134 int trio_print_ref TRIO_PROTO((trio_pointer_t ref, const char *format, ...));
00135 int trio_vprint_ref TRIO_PROTO((trio_pointer_t ref, const char *format, va_list args));
00136 int trio_printv_ref TRIO_PROTO((trio_pointer_t ref, const char *format, trio_pointer_t *args));
00137
00138 void trio_print_int TRIO_PROTO((trio_pointer_t ref, int number));
00139 void trio_print_uint TRIO_PROTO((trio_pointer_t ref, unsigned int number));
00140
00141
00142 void trio_print_double TRIO_PROTO((trio_pointer_t ref, double number));
00143 void trio_print_string TRIO_PROTO((trio_pointer_t ref, char *string));
00144 void trio_print_pointer TRIO_PROTO((trio_pointer_t ref, trio_pointer_t pointer));
00145
00146 #ifdef __cplusplus
00147 }
00148 #endif
00149
00150 #endif