ReactOS 0.4.15-dev-7953-g1f49173
triop.h
Go to the documentation of this file.
1/*************************************************************************
2 *
3 * $Id$
4 *
5 * Copyright (C) 2000 Bjorn Reese and Daniel Stenberg.
6 *
7 * Permission to use, copy, modify, and distribute this software for any
8 * purpose with or without fee is hereby granted, provided that the above
9 * copyright notice and this permission notice appear in all copies.
10 *
11 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
12 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
13 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
14 * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
15 *
16 ************************************************************************
17 *
18 * Private functions, types, etc. used for callback functions.
19 *
20 * The ref pointer is an opaque type and should remain as such.
21 * Private data must only be accessible through the getter and
22 * setter functions.
23 *
24 ************************************************************************/
25
26#ifndef TRIO_TRIOP_H
27#define TRIO_TRIOP_H
28
29#include "triodef.h"
30
31#include <stdlib.h>
32#if defined(TRIO_COMPILER_ANCIENT)
33# include <varargs.h>
34#else
35# include <stdarg.h>
36#endif
37
38#ifdef __cplusplus
39extern "C" {
40#endif
41
42#ifndef TRIO_C99
43# define TRIO_C99 1
44#endif
45#ifndef TRIO_BSD
46# define TRIO_BSD 1
47#endif
48#ifndef TRIO_GNU
49# define TRIO_GNU 1
50#endif
51#ifndef TRIO_MISC
52# define TRIO_MISC 1
53#endif
54#ifndef TRIO_UNIX98
55# define TRIO_UNIX98 1
56#endif
57#ifndef TRIO_MICROSOFT
58# define TRIO_MICROSOFT 1
59#endif
60#ifndef TRIO_EXTENSION
61# define TRIO_EXTENSION 1
62#endif
63#ifndef TRIO_WIDECHAR /* Does not work yet. Do not enable */
64# define TRIO_WIDECHAR 0
65#endif
66#ifndef TRIO_ERRORS
67# define TRIO_ERRORS 1
68#endif
69
70#ifndef TRIO_MALLOC
71# define TRIO_MALLOC(n) malloc(n)
72#endif
73#ifndef TRIO_REALLOC
74# define TRIO_REALLOC(x,n) realloc((x),(n))
75#endif
76#ifndef TRIO_FREE
77# define TRIO_FREE(x) free(x)
78#endif
79
80
81/*************************************************************************
82 * User-defined specifiers
83 */
84
85typedef int (*trio_callback_t) TRIO_PROTO((trio_pointer_t));
86
87trio_pointer_t trio_register TRIO_PROTO((trio_callback_t callback, const char *name));
88void trio_unregister TRIO_PROTO((trio_pointer_t handle));
89
90TRIO_CONST char *trio_get_format TRIO_PROTO((trio_pointer_t ref));
91trio_pointer_t trio_get_argument TRIO_PROTO((trio_pointer_t ref));
92
93/* Modifiers */
94int trio_get_width TRIO_PROTO((trio_pointer_t ref));
95void trio_set_width TRIO_PROTO((trio_pointer_t ref, int width));
96int trio_get_precision TRIO_PROTO((trio_pointer_t ref));
97void trio_set_precision TRIO_PROTO((trio_pointer_t ref, int precision));
98int trio_get_base TRIO_PROTO((trio_pointer_t ref));
99void trio_set_base TRIO_PROTO((trio_pointer_t ref, int base));
100int trio_get_padding TRIO_PROTO((trio_pointer_t ref));
101void trio_set_padding TRIO_PROTO((trio_pointer_t ref, int is_padding));
102int trio_get_short TRIO_PROTO((trio_pointer_t ref)); /* h */
103void trio_set_shortshort TRIO_PROTO((trio_pointer_t ref, int is_shortshort));
104int trio_get_shortshort TRIO_PROTO((trio_pointer_t ref)); /* hh */
105void trio_set_short TRIO_PROTO((trio_pointer_t ref, int is_short));
106int trio_get_long TRIO_PROTO((trio_pointer_t ref)); /* l */
107void trio_set_long TRIO_PROTO((trio_pointer_t ref, int is_long));
108int trio_get_longlong TRIO_PROTO((trio_pointer_t ref)); /* ll */
109void trio_set_longlong TRIO_PROTO((trio_pointer_t ref, int is_longlong));
110int trio_get_longdouble TRIO_PROTO((trio_pointer_t ref)); /* L */
111void trio_set_longdouble TRIO_PROTO((trio_pointer_t ref, int is_longdouble));
112int trio_get_alternative TRIO_PROTO((trio_pointer_t ref)); /* # */
113void trio_set_alternative TRIO_PROTO((trio_pointer_t ref, int is_alternative));
114int trio_get_alignment TRIO_PROTO((trio_pointer_t ref)); /* - */
115void trio_set_alignment TRIO_PROTO((trio_pointer_t ref, int is_leftaligned));
116int trio_get_spacing TRIO_PROTO((trio_pointer_t ref)); /* TRIO_PROTO((space) */
117void trio_set_spacing TRIO_PROTO((trio_pointer_t ref, int is_space));
118int trio_get_sign TRIO_PROTO((trio_pointer_t ref)); /* + */
119void trio_set_sign TRIO_PROTO((trio_pointer_t ref, int is_showsign));
120int trio_get_quote TRIO_PROTO((trio_pointer_t ref)); /* ' */
121void trio_set_quote TRIO_PROTO((trio_pointer_t ref, int is_quote));
122int trio_get_upper TRIO_PROTO((trio_pointer_t ref));
123void trio_set_upper TRIO_PROTO((trio_pointer_t ref, int is_upper));
124#if TRIO_C99
125int trio_get_largest TRIO_PROTO((trio_pointer_t ref)); /* j */
126void trio_set_largest TRIO_PROTO((trio_pointer_t ref, int is_largest));
127int trio_get_ptrdiff TRIO_PROTO((trio_pointer_t ref)); /* t */
128void trio_set_ptrdiff TRIO_PROTO((trio_pointer_t ref, int is_ptrdiff));
129int trio_get_size TRIO_PROTO((trio_pointer_t ref)); /* z / Z */
130void trio_set_size TRIO_PROTO((trio_pointer_t ref, int is_size));
131#endif
132
133/* Printing */
134int trio_print_ref TRIO_PROTO((trio_pointer_t ref, const char *format, ...));
135int trio_vprint_ref TRIO_PROTO((trio_pointer_t ref, const char *format, va_list args));
136int trio_printv_ref TRIO_PROTO((trio_pointer_t ref, const char *format, trio_pointer_t *args));
137
138void trio_print_int TRIO_PROTO((trio_pointer_t ref, int number));
139void trio_print_uint TRIO_PROTO((trio_pointer_t ref, unsigned int number));
140/* void trio_print_long TRIO_PROTO((trio_pointer_t ref, long number)); */
141/* void trio_print_ulong TRIO_PROTO((trio_pointer_t ref, unsigned long number)); */
142void trio_print_double TRIO_PROTO((trio_pointer_t ref, double number));
143void trio_print_string TRIO_PROTO((trio_pointer_t ref, char *string));
145
146#ifdef __cplusplus
147} /* extern "C" */
148#endif
149
150#endif /* TRIO_TRIOP_H */
char * va_list
Definition: acmsvcex.h:78
#define is_space(c)
Definition: astoll.c:38
#define is_upper(c)
Definition: astoll.c:45
char * trio_pointer_t
Definition: triodef.h:133
#define TRIO_CONST
Definition: triodef.h:129
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
GLint GLint GLsizei width
Definition: gl.h:1546
GLsizei const GLvoid * pointer
Definition: glext.h:5848
GLenum GLint GLint * precision
Definition: glext.h:7539
static IPrintDialogCallback callback
Definition: printdlg.c:326
static unsigned int number
Definition: dsound.c:1479
Definition: match.c:390
Definition: name.c:39
Definition: send.c:48
int trio_callback_t TRIO_PROTO((trio_pointer_t))
Definition: triop.h:85