ReactOS  r74227
Printf

Functions

TRIO_PUBLIC int trio_printf TRIO_VARGS2 ((format, va_alist), TRIO_CONST char *format, TRIO_VA_DECL)
 
TRIO_PUBLIC int trio_vprintf TRIO_ARGS2 ((format, args), TRIO_CONST char *format, va_list args)
 
TRIO_PUBLIC int trio_printfv TRIO_ARGS2 ((format, args), TRIO_CONST char *format, trio_pointer_t *args)
 
TRIO_PUBLIC int trio_fprintf TRIO_VARGS3 ((file, format, va_alist), FILE *file, TRIO_CONST char *format, TRIO_VA_DECL)
 
TRIO_PUBLIC int trio_vfprintf TRIO_ARGS3 ((file, format, args), FILE *file, TRIO_CONST char *format, va_list args)
 
TRIO_PUBLIC int trio_fprintfv TRIO_ARGS3 ((file, format, args), FILE *file, TRIO_CONST char *format, trio_pointer_t *args)
 
TRIO_PUBLIC int trio_dprintf TRIO_VARGS3 ((fd, format, va_alist), int fd, TRIO_CONST char *format, TRIO_VA_DECL)
 
TRIO_PUBLIC int trio_vdprintf TRIO_ARGS3 ((fd, format, args), int fd, TRIO_CONST char *format, va_list args)
 
TRIO_PUBLIC int trio_dprintfv TRIO_ARGS3 ((fd, format, args), int fd, TRIO_CONST char *format, trio_pointer_t *args)
 
TRIO_PUBLIC int trio_cprintf TRIO_VARGS4 ((stream, closure, format, va_alist), trio_outstream_t stream, trio_pointer_t closure, TRIO_CONST char *format, TRIO_VA_DECL)
 
TRIO_PUBLIC int trio_vcprintf TRIO_ARGS4 ((stream, closure, format, args), trio_outstream_t stream, trio_pointer_t closure, TRIO_CONST char *format, va_list args)
 
TRIO_PUBLIC int trio_cprintfv TRIO_ARGS4 ((stream, closure, format, args), trio_outstream_t stream, trio_pointer_t closure, TRIO_CONST char *format, void **args)
 
TRIO_PUBLIC int trio_sprintf TRIO_VARGS3 ((buffer, format, va_alist), char *buffer, TRIO_CONST char *format, TRIO_VA_DECL)
 
TRIO_PUBLIC int trio_vsprintf TRIO_ARGS3 ((buffer, format, args), char *buffer, TRIO_CONST char *format, va_list args)
 
TRIO_PUBLIC int trio_sprintfv TRIO_ARGS3 ((buffer, format, args), char *buffer, TRIO_CONST char *format, trio_pointer_t *args)
 
TRIO_PUBLIC int trio_snprintf TRIO_VARGS4 ((buffer, max, format, va_alist), char *buffer, size_t max, TRIO_CONST char *format, TRIO_VA_DECL)
 
TRIO_PUBLIC int trio_vsnprintf TRIO_ARGS4 ((buffer, max, format, args), char *buffer, size_t max, TRIO_CONST char *format, va_list args)
 
TRIO_PUBLIC int trio_snprintfv TRIO_ARGS4 ((buffer, max, format, args), char *buffer, size_t max, TRIO_CONST char *format, trio_pointer_t *args)
 
TRIO_PUBLIC int trio_asprintf TRIO_VARGS3 ((result, format, va_alist), char **result, TRIO_CONST char *format, TRIO_VA_DECL)
 
TRIO_PUBLIC int trio_vasprintf TRIO_ARGS3 ((result, format, args), char **result, TRIO_CONST char *format, va_list args)
 

Detailed Description

Function Documentation

TRIO_PUBLIC int trio_vscanf TRIO_ARGS2 ( (format, args ,
TRIO_CONST char format,
va_list  args 
)

Print to standard output stream.

Parameters
formatFormatting string.
argsArguments.
Returns
Number of printed characters.

Definition at line 3671 of file trio.c.

3674 {
3675  assert(VALID(format));
3676 
3677  return TrioFormat(stdout, 0, TrioOutStreamFile, format, TRIO_VA_LIST_ADDR(args), NULL);
3678 }
#define VALID(x)
Definition: trio.c:117
#define assert(x)
Definition: debug.h:53
Definition: match.c:295
FILE * stdout
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define TRIO_VA_LIST_ADDR(l)
Definition: trio.c:131
#define NULL
Definition: trio.c:107
TRIO_PUBLIC int trio_scanfv TRIO_ARGS2 ( (format, args ,
TRIO_CONST char format,
trio_pointer_t args 
)

Print to standard output stream.

Parameters
formatFormatting string.
argsArguments.
Returns
Number of printed characters.

Definition at line 3689 of file trio.c.

3692 {
3693  assert(VALID(format));
3694 
3695  return TrioFormat(stdout, 0, TrioOutStreamFile, format, NULL, args);
3696 }
#define VALID(x)
Definition: trio.c:117
#define assert(x)
Definition: debug.h:53
Definition: match.c:295
FILE * stdout
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define NULL
Definition: trio.c:107
TRIO_PUBLIC int trio_vfscanf TRIO_ARGS3 ( (file, format, args ,
FILE file,
TRIO_CONST char format,
va_list  args 
)

Print to file.

Parameters
fileFile pointer.
formatFormatting string.
argsArguments.
Returns
Number of printed characters.

Definition at line 3739 of file trio.c.

3743 {
3744  assert(VALID(file));
3745  assert(VALID(format));
3746 
3747  return TrioFormat(file, 0, TrioOutStreamFile, format, TRIO_VA_LIST_ADDR(args), NULL);
3748 }
#define VALID(x)
Definition: trio.c:117
#define assert(x)
Definition: debug.h:53
Definition: match.c:295
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define TRIO_VA_LIST_ADDR(l)
Definition: trio.c:131
#define NULL
Definition: trio.c:107
TRIO_PUBLIC int trio_fscanfv TRIO_ARGS3 ( (file, format, args ,
FILE file,
TRIO_CONST char format,
trio_pointer_t args 
)

Print to file.

Parameters
fileFile pointer.
formatFormatting string.
argsArguments.
Returns
Number of printed characters.

Definition at line 3760 of file trio.c.

3764 {
3765  assert(VALID(file));
3766  assert(VALID(format));
3767 
3768  return TrioFormat(file, 0, TrioOutStreamFile, format, NULL, args);
3769 }
#define VALID(x)
Definition: trio.c:117
#define assert(x)
Definition: debug.h:53
Definition: match.c:295
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define NULL
Definition: trio.c:107
TRIO_PUBLIC int trio_vdscanf TRIO_ARGS3 ( (fd, format, args ,
int  fd,
TRIO_CONST char format,
va_list  args 
)

Print to file descriptor.

Parameters
fdFile descriptor.
formatFormatting string.
argsArguments.
Returns
Number of printed characters.

Definition at line 3811 of file trio.c.

3815 {
3816  assert(VALID(format));
3817 
3818  return TrioFormat(&fd, 0, TrioOutStreamFileDescriptor, format, TRIO_VA_LIST_ADDR(args), NULL);
3819 }
#define VALID(x)
Definition: trio.c:117
#define assert(x)
Definition: debug.h:53
Definition: match.c:295
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define TRIO_VA_LIST_ADDR(l)
Definition: trio.c:131
static HANDLE fd
Definition: io.c:55
#define NULL
Definition: trio.c:107
TRIO_PUBLIC int trio_dscanfv TRIO_ARGS3 ( (fd, format, args ,
int  fd,
TRIO_CONST char format,
trio_pointer_t args 
)

Print to file descriptor.

Parameters
fdFile descriptor.
formatFormatting string.
argsArguments.
Returns
Number of printed characters.

Definition at line 3831 of file trio.c.

3835 {
3836  assert(VALID(format));
3837 
3838  return TrioFormat(&fd, 0, TrioOutStreamFileDescriptor, format, NULL, args);
3839 }
#define VALID(x)
Definition: trio.c:117
#define assert(x)
Definition: debug.h:53
Definition: match.c:295
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
static HANDLE fd
Definition: io.c:55
#define NULL
Definition: trio.c:107
TRIO_PUBLIC int trio_vsprintf TRIO_ARGS3 ( (buffer, format, args ,
char buffer,
TRIO_CONST char format,
va_list  args 
)

Print to string.

Parameters
bufferOutput string.
formatFormatting string.
argsArguments.
Returns
Number of printed characters.

Definition at line 3945 of file trio.c.

3949 {
3950  int status;
3951 
3952  assert(VALID(buffer));
3953  assert(VALID(format));
3954 
3955  status = TrioFormat(&buffer, 0, TrioOutStreamString, format, TRIO_VA_LIST_ADDR(args), NULL);
3956  *buffer = NIL;
3957  return status;
3958 }
#define VALID(x)
Definition: trio.c:117
#define assert(x)
Definition: debug.h:53
GLuint buffer
Definition: glext.h:5915
Definition: match.c:295
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define TRIO_VA_LIST_ADDR(l)
Definition: trio.c:131
#define NIL
Definition: trio.c:109
static SERVICE_STATUS status
Definition: service.c:26
#define NULL
Definition: trio.c:107
TRIO_PUBLIC int trio_sprintfv TRIO_ARGS3 ( (buffer, format, args ,
char buffer,
TRIO_CONST char format,
trio_pointer_t args 
)

Print to string.

Parameters
bufferOutput string.
formatFormatting string.
argsArguments.
Returns
Number of printed characters.

Definition at line 3970 of file trio.c.

3974 {
3975  int status;
3976 
3977  assert(VALID(buffer));
3978  assert(VALID(format));
3979 
3980  status = TrioFormat(&buffer, 0, TrioOutStreamString, format, NULL, args);
3981  *buffer = NIL;
3982  return status;
3983 }
#define VALID(x)
Definition: trio.c:117
#define assert(x)
Definition: debug.h:53
GLuint buffer
Definition: glext.h:5915
Definition: match.c:295
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define NIL
Definition: trio.c:109
static SERVICE_STATUS status
Definition: service.c:26
#define NULL
Definition: trio.c:107
TRIO_PUBLIC int trio_vasprintf TRIO_ARGS3 ( (result, format, args ,
char **  result,
TRIO_CONST char format,
va_list  args 
)

Definition at line 4227 of file trio.c.

4231 {
4232  int status;
4234 
4235  assert(VALID(format));
4236 
4237  *result = NULL;
4238 
4239  info = trio_xstring_duplicate("");
4240  if (info == NULL)
4241  {
4242  status = TRIO_ERROR_RETURN(TRIO_ENOMEM, 0);
4243  }
4244  else
4245  {
4246  status = TrioFormat(info, 0, TrioOutStreamStringDynamic,
4248  if (status >= 0)
4249  {
4250  trio_string_terminate(info);
4251  *result = trio_string_extract(info);
4252  }
4253  trio_string_destroy(info);
4254  }
4255  return status;
4256 }
#define VALID(x)
Definition: trio.c:117
#define TRIO_ERROR_RETURN(x, y)
Definition: trio.c:124
#define assert(x)
Definition: debug.h:53
Definition: match.c:295
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define TRIO_VA_LIST_ADDR(l)
Definition: trio.c:131
const XML_Char XML_Encoding * info
Definition: expat.h:530
GLuint64EXT * result
Definition: glext.h:11304
static SERVICE_STATUS status
Definition: service.c:26
#define NULL
Definition: trio.c:107
TRIO_PUBLIC int trio_vcprintf TRIO_ARGS4 ( (stream, closure, format, args ,
trio_outstream_t  stream,
trio_pointer_t  closure,
TRIO_CONST char format,
va_list  args 
)

Definition at line 3869 of file trio.c.

3874 {
3876 
3877  assert(VALID(stream));
3878  assert(VALID(format));
3879 
3880  data.stream.out = stream;
3881  data.closure = closure;
3882  return TrioFormat(&data, 0, TrioOutStreamCustom, format, TRIO_VA_LIST_ADDR(args), NULL);
3883 }
#define VALID(x)
Definition: trio.c:117
trio_pointer_t closure
Definition: trio.c:695
#define assert(x)
Definition: debug.h:53
Definition: match.c:295
GLuint GLuint stream
Definition: glext.h:7522
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
Definition: parse.h:22
#define TRIO_VA_LIST_ADDR(l)
Definition: trio.c:131
trio_outstream_t out
Definition: trio.c:692
#define NULL
Definition: trio.c:107
union trio_custom_t::@3463 stream
TRIO_PUBLIC int trio_cprintfv TRIO_ARGS4 ( (stream, closure, format, args ,
trio_outstream_t  stream,
trio_pointer_t  closure,
TRIO_CONST char format,
void **  args 
)

Definition at line 3887 of file trio.c.

3892 {
3894 
3895  assert(VALID(stream));
3896  assert(VALID(format));
3897 
3898  data.stream.out = stream;
3899  data.closure = closure;
3900  return TrioFormat(&data, 0, TrioOutStreamCustom, format, NULL, args);
3901 }
#define VALID(x)
Definition: trio.c:117
trio_pointer_t closure
Definition: trio.c:695
#define assert(x)
Definition: debug.h:53
GLuint GLuint stream
Definition: glext.h:7522
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
Definition: parse.h:22
trio_outstream_t out
Definition: trio.c:692
#define NULL
Definition: trio.c:107
union trio_custom_t::@3463 stream
TRIO_PUBLIC int trio_vsnprintfcat TRIO_ARGS4 ( (buffer, max, format, args ,
char buffer,
size_t  max,
TRIO_CONST char format,
va_list  args 
)

Print at most max characters to string.

Parameters
bufferOutput string.
maxMaximum number of characters to print.
formatFormatting string.
argsArguments.
Returns
Number of printed characters.

Definition at line 4032 of file trio.c.

4037 {
4038  int status;
4039 
4040  assert(VALID(buffer));
4041  assert(VALID(format));
4042 
4043  status = TrioFormat(&buffer, max > 0 ? max - 1 : 0,
4044  TrioOutStreamStringMax, format, TRIO_VA_LIST_ADDR(args), NULL);
4045  if (max > 0)
4046  *buffer = NIL;
4047  return status;
4048 }
#define VALID(x)
Definition: trio.c:117
#define assert(x)
Definition: debug.h:53
GLuint buffer
Definition: glext.h:5915
Definition: match.c:295
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define TRIO_VA_LIST_ADDR(l)
Definition: trio.c:131
#define NIL
Definition: trio.c:109
#define max(a, b)
Definition: slicer.cc:81
static SERVICE_STATUS status
Definition: service.c:26
#define NULL
Definition: trio.c:107
TRIO_PUBLIC int trio_snprintfv TRIO_ARGS4 ( (buffer, max, format, args ,
char buffer,
size_t  max,
TRIO_CONST char format,
trio_pointer_t args 
)

Print at most max characters to string.

Parameters
bufferOutput string.
maxMaximum number of characters to print.
formatFormatting string.
argsArguments.
Returns
Number of printed characters.

Definition at line 4061 of file trio.c.

4066 {
4067  int status;
4068 
4069  assert(VALID(buffer));
4070  assert(VALID(format));
4071 
4072  status = TrioFormat(&buffer, max > 0 ? max - 1 : 0,
4073  TrioOutStreamStringMax, format, NULL, args);
4074  if (max > 0)
4075  *buffer = NIL;
4076  return status;
4077 }
#define VALID(x)
Definition: trio.c:117
#define assert(x)
Definition: debug.h:53
GLuint buffer
Definition: glext.h:5915
Definition: match.c:295
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define NIL
Definition: trio.c:109
#define max(a, b)
Definition: slicer.cc:81
static SERVICE_STATUS status
Definition: service.c:26
#define NULL
Definition: trio.c:107
TRIO_PUBLIC int trio_scanf TRIO_VARGS2 ( (format, va_alist)  ,
TRIO_CONST char format,
TRIO_VA_DECL   
)

Print to standard output stream.

Parameters
formatFormatting string.
...Arguments.
Returns
Number of printed characters.

Scan characters from standard input stream.

Parameters
formatFormatting string.
...Arguments.
Returns
Number of scanned characters.

Definition at line 3647 of file trio.c.

3650 {
3651  int status;
3652  va_list args;
3653 
3654  assert(VALID(format));
3655 
3656  TRIO_VA_START(args, format);
3657  status = TrioFormat(stdout, 0, TrioOutStreamFile, format, TRIO_VA_LIST_ADDR(args), NULL);
3658  TRIO_VA_END(args);
3659  return status;
3660 }
#define VALID(x)
Definition: trio.c:117
#define assert(x)
Definition: debug.h:53
FILE * stdout
char * va_list
Definition: acmsvcex.h:78
#define TRIO_VA_END(x)
Definition: triodef.h:149
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define TRIO_VA_LIST_ADDR(l)
Definition: trio.c:131
static SERVICE_STATUS status
Definition: service.c:26
#define args
Definition: format.c:66
#define TRIO_VA_START(x, y)
Definition: triodef.h:148
#define NULL
Definition: trio.c:107
TRIO_PUBLIC int trio_fscanf TRIO_VARGS3 ( (file, format, va_alist)  ,
FILE file,
TRIO_CONST char format,
TRIO_VA_DECL   
)

Print to file.

Parameters
fileFile pointer.
formatFormatting string.
...Arguments.
Returns
Number of printed characters.

Definition at line 3712 of file trio.c.

3716 {
3717  int status;
3718  va_list args;
3719 
3720  assert(VALID(file));
3721  assert(VALID(format));
3722 
3723  TRIO_VA_START(args, format);
3724  status = TrioFormat(file, 0, TrioOutStreamFile, format, TRIO_VA_LIST_ADDR(args), NULL);
3725  TRIO_VA_END(args);
3726  return status;
3727 }
#define VALID(x)
Definition: trio.c:117
#define assert(x)
Definition: debug.h:53
char * va_list
Definition: acmsvcex.h:78
#define TRIO_VA_END(x)
Definition: triodef.h:149
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define TRIO_VA_LIST_ADDR(l)
Definition: trio.c:131
static SERVICE_STATUS status
Definition: service.c:26
#define args
Definition: format.c:66
#define TRIO_VA_START(x, y)
Definition: triodef.h:148
#define NULL
Definition: trio.c:107
TRIO_PUBLIC int trio_dscanf TRIO_VARGS3 ( (fd, format, va_alist)  ,
int  fd,
TRIO_CONST char format,
TRIO_VA_DECL   
)

Print to file descriptor.

Parameters
fdFile descriptor.
formatFormatting string.
...Arguments.
Returns
Number of printed characters.

Definition at line 3785 of file trio.c.

3789 {
3790  int status;
3791  va_list args;
3792 
3793  assert(VALID(format));
3794 
3795  TRIO_VA_START(args, format);
3796  status = TrioFormat(&fd, 0, TrioOutStreamFileDescriptor, format, TRIO_VA_LIST_ADDR(args), NULL);
3797  TRIO_VA_END(args);
3798  return status;
3799 }
#define VALID(x)
Definition: trio.c:117
#define assert(x)
Definition: debug.h:53
char * va_list
Definition: acmsvcex.h:78
#define TRIO_VA_END(x)
Definition: triodef.h:149
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define TRIO_VA_LIST_ADDR(l)
Definition: trio.c:131
static HANDLE fd
Definition: io.c:55
static SERVICE_STATUS status
Definition: service.c:26
#define args
Definition: format.c:66
#define TRIO_VA_START(x, y)
Definition: triodef.h:148
#define NULL
Definition: trio.c:107
TRIO_PUBLIC int trio_sprintf TRIO_VARGS3 ( (buffer, format, va_alist)  ,
char buffer,
TRIO_CONST char format,
TRIO_VA_DECL   
)

Print to string.

Parameters
bufferOutput string.
formatFormatting string.
...Arguments.
Returns
Number of printed characters.

Definition at line 3917 of file trio.c.

3921 {
3922  int status;
3923  va_list args;
3924 
3925  assert(VALID(buffer));
3926  assert(VALID(format));
3927 
3928  TRIO_VA_START(args, format);
3929  status = TrioFormat(&buffer, 0, TrioOutStreamString, format, TRIO_VA_LIST_ADDR(args), NULL);
3930  *buffer = NIL; /* Terminate with NIL character */
3931  TRIO_VA_END(args);
3932  return status;
3933 }
#define VALID(x)
Definition: trio.c:117
#define assert(x)
Definition: debug.h:53
GLuint buffer
Definition: glext.h:5915
char * va_list
Definition: acmsvcex.h:78
#define TRIO_VA_END(x)
Definition: triodef.h:149
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define TRIO_VA_LIST_ADDR(l)
Definition: trio.c:131
#define NIL
Definition: trio.c:109
static SERVICE_STATUS status
Definition: service.c:26
#define args
Definition: format.c:66
#define TRIO_VA_START(x, y)
Definition: triodef.h:148
#define NULL
Definition: trio.c:107
TRIO_PUBLIC int trio_asprintf TRIO_VARGS3 ( (result, format, va_alist)  ,
char **  result,
TRIO_CONST char format,
TRIO_VA_DECL   
)

Definition at line 4191 of file trio.c.

4195 {
4196  va_list args;
4197  int status;
4199 
4200  assert(VALID(format));
4201 
4202  *result = NULL;
4203 
4204  info = trio_xstring_duplicate("");
4205  if (info == NULL)
4206  {
4207  status = TRIO_ERROR_RETURN(TRIO_ENOMEM, 0);
4208  }
4209  else
4210  {
4211  TRIO_VA_START(args, format);
4212  status = TrioFormat(info, 0, TrioOutStreamStringDynamic,
4213  format, TRIO_VA_LIST_ADDR(args), NULL);
4214  TRIO_VA_END(args);
4215  if (status >= 0)
4216  {
4217  trio_string_terminate(info);
4218  *result = trio_string_extract(info);
4219  }
4220  trio_string_destroy(info);
4221  }
4222  return status;
4223 }
#define VALID(x)
Definition: trio.c:117
#define TRIO_ERROR_RETURN(x, y)
Definition: trio.c:124
#define assert(x)
Definition: debug.h:53
char * va_list
Definition: acmsvcex.h:78
#define TRIO_VA_END(x)
Definition: triodef.h:149
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define TRIO_VA_LIST_ADDR(l)
Definition: trio.c:131
const XML_Char XML_Encoding * info
Definition: expat.h:530
GLuint64EXT * result
Definition: glext.h:11304
static SERVICE_STATUS status
Definition: service.c:26
#define args
Definition: format.c:66
#define TRIO_VA_START(x, y)
Definition: triodef.h:148
#define NULL
Definition: trio.c:107
TRIO_PUBLIC int trio_cprintf TRIO_VARGS4 ( (stream, closure, format, va_alist)  ,
trio_outstream_t  stream,
trio_pointer_t  closure,
TRIO_CONST char format,
TRIO_VA_DECL   
)

Definition at line 3846 of file trio.c.

3851 {
3852  int status;
3853  va_list args;
3855 
3856  assert(VALID(stream));
3857  assert(VALID(format));
3858 
3859  TRIO_VA_START(args, format);
3860  data.stream.out = stream;
3861  data.closure = closure;
3862  status = TrioFormat(&data, 0, TrioOutStreamCustom, format, TRIO_VA_LIST_ADDR(args), NULL);
3863  TRIO_VA_END(args);
3864  return status;
3865 }
#define VALID(x)
Definition: trio.c:117
trio_pointer_t closure
Definition: trio.c:695
#define assert(x)
Definition: debug.h:53
GLuint GLuint stream
Definition: glext.h:7522
char * va_list
Definition: acmsvcex.h:78
#define TRIO_VA_END(x)
Definition: triodef.h:149
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
Definition: parse.h:22
#define TRIO_VA_LIST_ADDR(l)
Definition: trio.c:131
trio_outstream_t out
Definition: trio.c:692
static SERVICE_STATUS status
Definition: service.c:26
#define args
Definition: format.c:66
#define TRIO_VA_START(x, y)
Definition: triodef.h:148
#define NULL
Definition: trio.c:107
union trio_custom_t::@3463 stream
TRIO_PUBLIC int trio_snprintfcat TRIO_VARGS4 ( (buffer, max, format, va_alist)  ,
char buffer,
size_t  max,
TRIO_CONST char format,
TRIO_VA_DECL   
)

Print at most max characters to string.

Parameters
bufferOutput string.
maxMaximum number of characters to print.
formatFormatting string.
...Arguments.
Returns
Number of printed characters.

Definition at line 4000 of file trio.c.

4005 {
4006  int status;
4007  va_list args;
4008 
4009  assert(VALID(buffer));
4010  assert(VALID(format));
4011 
4012  TRIO_VA_START(args, format);
4013  status = TrioFormat(&buffer, max > 0 ? max - 1 : 0,
4014  TrioOutStreamStringMax, format, TRIO_VA_LIST_ADDR(args), NULL);
4015  if (max > 0)
4016  *buffer = NIL;
4017  TRIO_VA_END(args);
4018  return status;
4019 }
#define VALID(x)
Definition: trio.c:117
#define assert(x)
Definition: debug.h:53
GLuint buffer
Definition: glext.h:5915
char * va_list
Definition: acmsvcex.h:78
#define TRIO_VA_END(x)
Definition: triodef.h:149
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define TRIO_VA_LIST_ADDR(l)
Definition: trio.c:131
#define NIL
Definition: trio.c:109
#define max(a, b)
Definition: slicer.cc:81
static SERVICE_STATUS status
Definition: service.c:26
#define args
Definition: format.c:66
#define TRIO_VA_START(x, y)
Definition: triodef.h:148
#define NULL
Definition: trio.c:107