2
* (c) Copyright 1992, 1993 by Panagiotis Tsirigotis
3
* All rights reserved. The file named COPYRIGHT specifies the terms
4
* and conditions for redistribution.
16
#define INT_NULL ((int *)0)
19
* The strx_* functions will never over-run the buffer
20
* The str_* functions may over-run the buffer
24
* Group 1: the strx_* functions
28
* This is the general purpose conversion function. It is invoked
29
* by all the other str[x]_* functions
31
void strx_printv( int *ccp, char *buf, int len, const char *format, va_list ap )
38
* First initialize the descriptor
39
* Notice that if no length is given, we initialize buf_end to the
40
* highest possible address.
42
od.buf = buf ; /* NOT NEEDED */
43
od.buf_end = len ? &buf[ len ] : (char *) ~0 ; /* NEEDED */
44
od.buffer_size = 0 ; /* NOT NEEDED */
45
od.start = buf ; /* NOT NEEDED */
46
od.nextb = buf ; /* NEEDED */
47
od.buftype = 0 ; /* NOT NEEDED */
52
cc = __sio_converter( &od, -1, format, ap ) ;
53
if ( len == 0 || od.nextb < od.buf_end )
61
void strx_print( int *ccp, char *buf, int len, const char *format, ... )
71
va_start( ap, format ) ;
72
strx_printv( ccp, buf, len, format, ap ) ;
77
char *strx_sprint( char *buf, int len, const char *format, ... )
84
va_start( ap, format ) ;
85
strx_printv( INT_NULL, buf, len, format, ap ) ;
91
int strx_nprint( char *buf, int len, const char *format, ...)
99
va_start( ap, format ) ;
100
strx_printv( &cc, buf, len, format, ap ) ;
106
int strx_nprintv( char *buf, int len, const char *format, va_list ap )
113
strx_printv( &cc, buf, len, format, ap ) ;