src/cx/printf.h

changeset 890
54565fd74e74
parent 849
edb9f875b7f9
equal deleted inserted replaced
889:f549fd9fbd8f 890:54565fd74e74
62 */ 62 */
63 __attribute__((__nonnull__(1, 2, 3), __format__(printf, 3, 4))) 63 __attribute__((__nonnull__(1, 2, 3), __format__(printf, 3, 4)))
64 int cx_fprintf( 64 int cx_fprintf(
65 void *stream, 65 void *stream,
66 cx_write_func wfc, 66 cx_write_func wfc,
67 char const *fmt, 67 const char *fmt,
68 ... 68 ...
69 ); 69 );
70 70
71 /** 71 /**
72 * A \c vfprintf like function which writes the output to a stream by 72 * A \c vfprintf like function which writes the output to a stream by
81 */ 81 */
82 __attribute__((__nonnull__)) 82 __attribute__((__nonnull__))
83 int cx_vfprintf( 83 int cx_vfprintf(
84 void *stream, 84 void *stream,
85 cx_write_func wfc, 85 cx_write_func wfc,
86 char const *fmt, 86 const char *fmt,
87 va_list ap 87 va_list ap
88 ); 88 );
89 89
90 /** 90 /**
91 * A \c asprintf like function which allocates space for a string 91 * A \c asprintf like function which allocates space for a string
99 * @return the formatted string 99 * @return the formatted string
100 * @see cx_strfree_a() 100 * @see cx_strfree_a()
101 */ 101 */
102 __attribute__((__nonnull__(1, 2), __format__(printf, 2, 3))) 102 __attribute__((__nonnull__(1, 2), __format__(printf, 2, 3)))
103 cxmutstr cx_asprintf_a( 103 cxmutstr cx_asprintf_a(
104 CxAllocator const *allocator, 104 const CxAllocator *allocator,
105 char const *fmt, 105 const char *fmt,
106 ... 106 ...
107 ); 107 );
108 108
109 /** 109 /**
110 * A \c asprintf like function which allocates space for a string 110 * A \c asprintf like function which allocates space for a string
132 * @return the formatted string 132 * @return the formatted string
133 * @see cx_asprintf_a() 133 * @see cx_asprintf_a()
134 */ 134 */
135 __attribute__((__nonnull__)) 135 __attribute__((__nonnull__))
136 cxmutstr cx_vasprintf_a( 136 cxmutstr cx_vasprintf_a(
137 CxAllocator const *allocator, 137 const CxAllocator *allocator,
138 char const *fmt, 138 const char *fmt,
139 va_list ap 139 va_list ap
140 ); 140 );
141 141
142 /** 142 /**
143 * A \c vasprintf like function which allocates space for a string 143 * A \c vasprintf like function which allocates space for a string

mercurial