ReactOS 0.4.16-dev-106-g10b08aa
UserDefined

Functions

TRIO_PUBLIC trio_pointer_t trio_register TRIO_ARGS2 ((callback, name), trio_callback_t callback, TRIO_CONST char *name)
 
void trio_unregister TRIO_ARGS1 ((handle), trio_pointer_t handle)
 
TRIO_CONST char *trio_get_format TRIO_ARGS1 ((ref), trio_pointer_t ref)
 
void trio_set_width TRIO_ARGS2 ((ref, width), trio_pointer_t ref, int width)
 
void trio_set_precision TRIO_ARGS2 ((ref, precision), trio_pointer_t ref, int precision)
 
void trio_set_base TRIO_ARGS2 ((ref, base), trio_pointer_t ref, int base)
 
void trio_set_long TRIO_ARGS2 ((ref, is_long), trio_pointer_t ref, int is_long)
 
void trio_set_longlong TRIO_ARGS2 ((ref, is_longlong), trio_pointer_t ref, int is_longlong)
 
void trio_set_longdouble TRIO_ARGS2 ((ref, is_longdouble), trio_pointer_t ref, int is_longdouble)
 
void trio_set_short TRIO_ARGS2 ((ref, is_short), trio_pointer_t ref, int is_short)
 
void trio_set_shortshort TRIO_ARGS2 ((ref, is_shortshort), trio_pointer_t ref, int is_shortshort)
 
void trio_set_alternative TRIO_ARGS2 ((ref, is_alternative), trio_pointer_t ref, int is_alternative)
 
void trio_set_alignment TRIO_ARGS2 ((ref, is_leftaligned), trio_pointer_t ref, int is_leftaligned)
 
void trio_set_spacing TRIO_ARGS2 ((ref, is_space), trio_pointer_t ref, int is_space)
 
void trio_set_sign TRIO_ARGS2 ((ref, is_sign), trio_pointer_t ref, int is_sign)
 
void trio_set_padding TRIO_ARGS2 ((ref, is_padding), trio_pointer_t ref, int is_padding)
 
void trio_set_quote TRIO_ARGS2 ((ref, is_quote), trio_pointer_t ref, int is_quote)
 
void trio_set_upper TRIO_ARGS2 ((ref, is_upper), trio_pointer_t ref, int is_upper)
 
void trio_set_largest TRIO_ARGS2 ((ref, is_largest), trio_pointer_t ref, int is_largest)
 
void trio_set_ptrdiff TRIO_ARGS2 ((ref, is_ptrdiff), trio_pointer_t ref, int is_ptrdiff)
 
void trio_set_size TRIO_ARGS2 ((ref, is_size), trio_pointer_t ref, int is_size)
 
void trio_print_int TRIO_ARGS2 ((ref, number), trio_pointer_t ref, int number)
 
void trio_print_uint TRIO_ARGS2 ((ref, number), trio_pointer_t ref, unsigned int number)
 
void trio_print_double TRIO_ARGS2 ((ref, number), trio_pointer_t ref, double number)
 
void trio_print_string TRIO_ARGS2 ((ref, string), trio_pointer_t ref, char *string)
 
int trio_print_ref TRIO_VARGS3 ((ref, format, va_alist), trio_pointer_t ref, TRIO_CONST char *format, TRIO_VA_DECL)
 
int trio_vprint_ref TRIO_ARGS3 ((ref, format, arglist), trio_pointer_t ref, TRIO_CONST char *format, va_list arglist)
 
int trio_printv_ref TRIO_ARGS3 ((ref, format, argarray), trio_pointer_t ref, TRIO_CONST char *format, trio_pointer_t *argarray)
 
void trio_print_pointer TRIO_ARGS2 ((ref, pointer), trio_pointer_t ref, trio_pointer_t pointer)
 

Detailed Description

Function Documentation

◆ TRIO_ARGS1() [1/2]

void trio_unregister TRIO_ARGS1 ( (handle ,
trio_pointer_t  handle 
)

Unregister an existing user-defined specifier.

Parameters
handle

Definition at line 4356 of file trio.c.

4358{
4360 trio_userdef_t *def;
4361 trio_userdef_t *prev = NULL;
4362
4363 assert(VALID(self));
4364
4365 if (self->name)
4366 {
4367 def = TrioFindNamespace(self->name, &prev);
4368 if (def)
4369 {
4372
4373 if (prev == NULL)
4375 else
4376 prev->next = def->next;
4377
4380 }
4381 trio_destroy(self->name);
4382 }
4383 TRIO_FREE(self);
4384}
#define assert(x)
Definition: debug.h:53
char * name
Definition: trio.c:744
struct _trio_userdef_t * next
Definition: trio.c:742
#define NULL
Definition: trio.c:104
#define VALID(x)
Definition: trio.c:114
static trio_userdef_t * internalUserDef
Definition: trio.c:793
static TRIO_VOLATILE trio_callback_t internalEnterCriticalRegion
Definition: trio.c:791
static TRIO_VOLATILE trio_callback_t internalLeaveCriticalRegion
Definition: trio.c:792
#define TRIO_FREE(x)
Definition: triop.h:77

◆ TRIO_ARGS1() [2/2]

int trio_get_size TRIO_ARGS1 ( (ref ,
trio_pointer_t  ref 
)

Definition at line 4391 of file trio.c.

4393{
4394#if defined(FORMAT_USER_DEFINED)
4395 assert(((trio_reference_t *)ref)->parameter->type == FORMAT_USER_DEFINED);
4396#endif
4397
4398 return (((trio_reference_t *)ref)->parameter->user_data);
4399}
Definition: send.c:48
#define FORMAT_USER_DEFINED
Definition: trio.c:422

◆ TRIO_ARGS2() [1/24]

TRIO_PUBLIC trio_pointer_t trio_register TRIO_ARGS2 ( (callback, name ,
trio_callback_t  callback,
TRIO_CONST char name 
)

Register new user-defined specifier.

Parameters
callback
name
Returns
Handle.

Definition at line 4286 of file trio.c.

4289{
4290 trio_userdef_t *def;
4291 trio_userdef_t *prev = NULL;
4292
4293 if (callback == NULL)
4294 return NULL;
4295
4296 if (name)
4297 {
4298 /* Handle built-in namespaces */
4299 if (name[0] == ':')
4300 {
4301 if (trio_equal(name, ":enter"))
4302 {
4304 }
4305 else if (trio_equal(name, ":leave"))
4306 {
4308 }
4309 return NULL;
4310 }
4311
4312 /* Bail out if namespace is too long */
4313 if (trio_length(name) >= MAX_USER_NAME)
4314 return NULL;
4315
4316 /* Bail out if namespace already is registered */
4317 def = TrioFindNamespace(name, &prev);
4318 if (def)
4319 return NULL;
4320 }
4321
4322 def = (trio_userdef_t *)TRIO_MALLOC(sizeof(trio_userdef_t));
4323 if (def)
4324 {
4327
4328 if (name)
4329 {
4330 /* Link into internal list */
4331 if (prev == NULL)
4332 internalUserDef = def;
4333 else
4334 prev->next = def;
4335 }
4336 /* Initialize */
4337 def->callback = callback;
4338 def->name = (name == NULL)
4339 ? NULL
4340 : trio_duplicate(name);
4341 def->next = NULL;
4342
4345 }
4346 return (trio_pointer_t)def;
4347}
char * trio_pointer_t
Definition: triodef.h:133
static IPrintDialogCallback callback
Definition: printdlg.c:326
trio_callback_t callback
Definition: trio.c:743
Definition: name.c:39
@ MAX_USER_NAME
Definition: trio.c:394
#define TRIO_MALLOC(n)
Definition: triop.h:71

◆ TRIO_ARGS2() [2/24]

void trio_set_base TRIO_ARGS2 ( (ref, base ,
trio_pointer_t  ref,
int  base 
)

Definition at line 4469 of file trio.c.

4472{
4473 ((trio_reference_t *)ref)->parameter->base = base;
4474}

◆ TRIO_ARGS2() [3/24]

void trio_set_alternative TRIO_ARGS2 ( (ref, is_alternative)  ,
trio_pointer_t  ref,
int  is_alternative 
)

Definition at line 4616 of file trio.c.

4619{
4620 if (is_alternative)
4621 ((trio_reference_t *)ref)->parameter->flags |= FLAGS_ALTERNATIVE;
4622 else
4623 ((trio_reference_t *)ref)->parameter->flags &= ~FLAGS_ALTERNATIVE;
4624}
@ FLAGS_ALTERNATIVE
Definition: trio.c:338

◆ TRIO_ARGS2() [4/24]

void trio_set_largest TRIO_ARGS2 ( (ref, is_largest)  ,
trio_pointer_t  ref,
int  is_largest 
)

Definition at line 4792 of file trio.c.

4795{
4796 if (is_largest)
4797 ((trio_reference_t *)ref)->parameter->flags |= FLAGS_INTMAX_T;
4798 else
4799 ((trio_reference_t *)ref)->parameter->flags &= ~FLAGS_INTMAX_T;
4800}
@ FLAGS_INTMAX_T
Definition: trio.c:346

◆ TRIO_ARGS2() [5/24]

void trio_set_alignment TRIO_ARGS2 ( (ref, is_leftaligned)  ,
trio_pointer_t  ref,
int  is_leftaligned 
)

Definition at line 4641 of file trio.c.

4644{
4645 if (is_leftaligned)
4646 ((trio_reference_t *)ref)->parameter->flags |= FLAGS_LEFTADJUST;
4647 else
4648 ((trio_reference_t *)ref)->parameter->flags &= ~FLAGS_LEFTADJUST;
4649}
@ FLAGS_LEFTADJUST
Definition: trio.c:337

◆ TRIO_ARGS2() [6/24]

void trio_set_long TRIO_ARGS2 ( (ref, is_long)  ,
trio_pointer_t  ref,
int  is_long 
)

Definition at line 4491 of file trio.c.

4494{
4495 if (is_long)
4496 ((trio_reference_t *)ref)->parameter->flags |= FLAGS_LONG;
4497 else
4498 ((trio_reference_t *)ref)->parameter->flags &= ~FLAGS_LONG;
4499}
@ FLAGS_LONG
Definition: trio.c:341

◆ TRIO_ARGS2() [7/24]

void trio_set_longdouble TRIO_ARGS2 ( (ref, is_longdouble)  ,
trio_pointer_t  ref,
int  is_longdouble 
)

Definition at line 4541 of file trio.c.

4544{
4545 if (is_longdouble)
4546 ((trio_reference_t *)ref)->parameter->flags |= FLAGS_LONGDOUBLE;
4547 else
4548 ((trio_reference_t *)ref)->parameter->flags &= ~FLAGS_LONGDOUBLE;
4549}
@ FLAGS_LONGDOUBLE
Definition: trio.c:343

◆ TRIO_ARGS2() [8/24]

void trio_set_longlong TRIO_ARGS2 ( (ref, is_longlong)  ,
trio_pointer_t  ref,
int  is_longlong 
)

Definition at line 4516 of file trio.c.

4519{
4520 if (is_longlong)
4521 ((trio_reference_t *)ref)->parameter->flags |= FLAGS_QUAD;
4522 else
4523 ((trio_reference_t *)ref)->parameter->flags &= ~FLAGS_QUAD;
4524}
@ FLAGS_QUAD
Definition: trio.c:342

◆ TRIO_ARGS2() [9/24]

void trio_set_padding TRIO_ARGS2 ( (ref, is_padding)  ,
trio_pointer_t  ref,
int  is_padding 
)

Definition at line 4716 of file trio.c.

4719{
4720 if (is_padding)
4721 ((trio_reference_t *)ref)->parameter->flags |= FLAGS_NILPADDING;
4722 else
4723 ((trio_reference_t *)ref)->parameter->flags &= ~FLAGS_NILPADDING;
4724}
@ FLAGS_NILPADDING
Definition: trio.c:347

◆ TRIO_ARGS2() [10/24]

void trio_set_ptrdiff TRIO_ARGS2 ( (ref, is_ptrdiff)  ,
trio_pointer_t  ref,
int  is_ptrdiff 
)

Definition at line 4818 of file trio.c.

4821{
4822 if (is_ptrdiff)
4823 ((trio_reference_t *)ref)->parameter->flags |= FLAGS_PTRDIFF_T;
4824 else
4825 ((trio_reference_t *)ref)->parameter->flags &= ~FLAGS_PTRDIFF_T;
4826}
@ FLAGS_PTRDIFF_T
Definition: trio.c:345

◆ TRIO_ARGS2() [11/24]

void trio_set_quote TRIO_ARGS2 ( (ref, is_quote)  ,
trio_pointer_t  ref,
int  is_quote 
)

Definition at line 4741 of file trio.c.

4744{
4745 if (is_quote)
4746 ((trio_reference_t *)ref)->parameter->flags |= FLAGS_QUOTE;
4747 else
4748 ((trio_reference_t *)ref)->parameter->flags &= ~FLAGS_QUOTE;
4749}
@ FLAGS_QUOTE
Definition: trio.c:358

◆ TRIO_ARGS2() [12/24]

void trio_set_short TRIO_ARGS2 ( (ref, is_short)  ,
trio_pointer_t  ref,
int  is_short 
)

Definition at line 4566 of file trio.c.

4569{
4570 if (is_short)
4571 ((trio_reference_t *)ref)->parameter->flags |= FLAGS_SHORT;
4572 else
4573 ((trio_reference_t *)ref)->parameter->flags &= ~FLAGS_SHORT;
4574}
@ FLAGS_SHORT
Definition: trio.c:339

◆ TRIO_ARGS2() [13/24]

void trio_set_shortshort TRIO_ARGS2 ( (ref, is_shortshort)  ,
trio_pointer_t  ref,
int  is_shortshort 
)

Definition at line 4591 of file trio.c.

4594{
4595 if (is_shortshort)
4596 ((trio_reference_t *)ref)->parameter->flags |= FLAGS_SHORTSHORT;
4597 else
4598 ((trio_reference_t *)ref)->parameter->flags &= ~FLAGS_SHORTSHORT;
4599}
@ FLAGS_SHORTSHORT
Definition: trio.c:340

◆ TRIO_ARGS2() [14/24]

void trio_set_sign TRIO_ARGS2 ( (ref, is_sign)  ,
trio_pointer_t  ref,
int  is_sign 
)

Definition at line 4691 of file trio.c.

4694{
4695 if (is_sign)
4696 ((trio_reference_t *)ref)->parameter->flags |= FLAGS_SHOWSIGN;
4697 else
4698 ((trio_reference_t *)ref)->parameter->flags &= ~FLAGS_SHOWSIGN;
4699}
@ FLAGS_SHOWSIGN
Definition: trio.c:336

◆ TRIO_ARGS2() [15/24]

void trio_set_size TRIO_ARGS2 ( (ref, is_size)  ,
trio_pointer_t  ref,
int  is_size 
)

Definition at line 4844 of file trio.c.

4847{
4848 if (is_size)
4849 ((trio_reference_t *)ref)->parameter->flags |= FLAGS_SIZE_T;
4850 else
4851 ((trio_reference_t *)ref)->parameter->flags &= ~FLAGS_SIZE_T;
4852}
@ FLAGS_SIZE_T
Definition: trio.c:344

◆ TRIO_ARGS2() [16/24]

void trio_set_spacing TRIO_ARGS2 ( (ref, is_space ,
trio_pointer_t  ref,
int  is_space 
)

Definition at line 4666 of file trio.c.

4669{
4670 if (is_space)
4671 ((trio_reference_t *)ref)->parameter->flags |= FLAGS_SPACE;
4672 else
4673 ((trio_reference_t *)ref)->parameter->flags &= ~FLAGS_SPACE;
4674}
#define is_space(c)
Definition: astoll.c:38
@ FLAGS_SPACE
Definition: trio.c:335

◆ TRIO_ARGS2() [17/24]

void trio_set_upper TRIO_ARGS2 ( (ref, is_upper ,
trio_pointer_t  ref,
int  is_upper 
)

Definition at line 4766 of file trio.c.

4769{
4770 if (is_upper)
4771 ((trio_reference_t *)ref)->parameter->flags |= FLAGS_UPPER;
4772 else
4773 ((trio_reference_t *)ref)->parameter->flags &= ~FLAGS_UPPER;
4774}
#define is_upper(c)
Definition: astoll.c:45
@ FLAGS_UPPER
Definition: trio.c:349

◆ TRIO_ARGS2() [18/24]

void trio_print_double TRIO_ARGS2 ( (ref, number ,
trio_pointer_t  ref,
double  number 
)

Definition at line 4898 of file trio.c.

4901{
4903
4904 TrioWriteDouble(self->data,
4905 number,
4906 self->parameter->flags,
4907 self->parameter->width,
4908 self->parameter->precision,
4909 self->parameter->base);
4910}
static unsigned int number
Definition: dsound.c:1479
trio_class_t * data
Definition: trio.c:736
trio_parameter_t * parameter
Definition: trio.c:737
trio_flags_t flags
Definition: trio.c:653
int precision
Definition: trio.c:657

◆ TRIO_ARGS2() [19/24]

void trio_print_int TRIO_ARGS2 ( (ref, number ,
trio_pointer_t  ref,
int  number 
)

Definition at line 4860 of file trio.c.

4863{
4865
4866 TrioWriteNumber(self->data,
4868 self->parameter->flags,
4869 self->parameter->width,
4870 self->parameter->precision,
4871 self->parameter->base);
4872}
trio_ulonglong_t trio_uintmax_t
Definition: trio.c:247

◆ TRIO_ARGS2() [20/24]

void trio_print_uint TRIO_ARGS2 ( (ref, number ,
trio_pointer_t  ref,
unsigned int  number 
)

Definition at line 4879 of file trio.c.

4882{
4884
4885 TrioWriteNumber(self->data,
4888 self->parameter->width,
4889 self->parameter->precision,
4890 self->parameter->base);
4891}
@ FLAGS_UNSIGNED
Definition: trio.c:348

◆ TRIO_ARGS2() [21/24]

void trio_print_pointer TRIO_ARGS2 ( (ref, pointer ,
trio_pointer_t  ref,
trio_pointer_t  pointer 
)

Definition at line 4988 of file trio.c.

4991{
4995
4996 if (NULL == pointer)
4997 {
4998 TRIO_CONST char *string = internalNullString;
4999 while (*string)
5000 self->data->OutStream(self->data, *string++);
5001 }
5002 else
5003 {
5004 /*
5005 * The subtraction of the null pointer is a workaround
5006 * to avoid a compiler warning. The performance overhead
5007 * is negligible (and likely to be removed by an
5008 * optimizing compiler). The (char *) casting is done
5009 * to please ANSI C++.
5010 */
5011 number = (trio_uintmax_t)((char *)pointer - (char *)0);
5012 /* Shrink to size of pointer */
5013 number &= (trio_uintmax_t)-1;
5014 flags = self->parameter->flags;
5017 TrioWriteNumber(self->data,
5018 number,
5019 flags,
5022 BASE_HEX);
5023 }
5024}
#define TRIO_CONST
Definition: triodef.h:129
GLsizei const GLvoid * pointer
Definition: glext.h:5848
GLbitfield flags
Definition: glext.h:7161
static TRIO_CONST char internalNullString[]
Definition: trio.c:764
@ BASE_HEX
Definition: trio.c:386
@ NO_PRECISION
Definition: trio.c:376
#define POINTER_WIDTH
Definition: trio.c:311
unsigned long trio_flags_t
Definition: trio.c:136

◆ TRIO_ARGS2() [22/24]

void trio_set_precision TRIO_ARGS2 ( (ref, precision ,
trio_pointer_t  ref,
int  precision 
)

Definition at line 4449 of file trio.c.

4452{
4453 ((trio_reference_t *)ref)->parameter->precision = precision;
4454}
GLenum GLint GLint * precision
Definition: glext.h:7539

◆ TRIO_ARGS2() [23/24]

void trio_print_string TRIO_ARGS2 ( (ref, string ,
trio_pointer_t  ref,
char string 
)

Definition at line 4917 of file trio.c.

4920{
4922
4923 TrioWriteString(self->data,
4924 string,
4925 self->parameter->flags,
4926 self->parameter->width,
4927 self->parameter->precision);
4928}

◆ TRIO_ARGS2() [24/24]

void trio_set_width TRIO_ARGS2 ( (ref, width ,
trio_pointer_t  ref,
int  width 
)

Definition at line 4429 of file trio.c.

4432{
4433 ((trio_reference_t *)ref)->parameter->width = width;
4434}
GLint GLint GLsizei width
Definition: gl.h:1546

◆ TRIO_ARGS3() [1/2]

int trio_printv_ref TRIO_ARGS3 ( (ref, format, argarray)  ,
trio_pointer_t  ref,
TRIO_CONST char format,
trio_pointer_t argarray 
)

Definition at line 4971 of file trio.c.

4975{
4977
4978 return TrioFormatRef((trio_reference_t *)ref, format, NULL, argarray);
4979}
Definition: format.c:58

◆ TRIO_ARGS3() [2/2]

int trio_vprint_ref TRIO_ARGS3 ( (ref, format, arglist ,
trio_pointer_t  ref,
TRIO_CONST char format,
va_list  arglist 
)

Definition at line 4956 of file trio.c.

4960{
4962
4963 return TrioFormatRef((trio_reference_t *)ref, format, TRIO_VA_LIST_ADDR(arglist), NULL);
4964}
va_lists_t arglist[FMT_ARGMAX+1]
Definition: format.c:284
#define TRIO_VA_LIST_ADDR(l)
Definition: trio.c:128

◆ TRIO_VARGS3()

int trio_print_ref TRIO_VARGS3 ( (ref, format, va_alist)  ,
trio_pointer_t  ref,
TRIO_CONST char format,
TRIO_VA_DECL   
)

Definition at line 4935 of file trio.c.

4939{
4940 int status;
4942
4944
4948 return status;
4949}
char * va_list
Definition: acmsvcex.h:78
#define TRIO_VA_START(x, y)
Definition: triodef.h:148
#define TRIO_VA_END(x)
Definition: triodef.h:149
Definition: ps.c:97