Lines Matching refs:len
168 … _out_rev(out_fct_type out, char * buffer, size_t idx, size_t maxlen, const char * buf, size_t len, in _out_rev() argument
176 for(i = len; i < width; i++) { in _out_rev()
182 while(len) { in _out_rev()
183 out(buf[--len], buffer, idx++, maxlen); in _out_rev()
197 …_t _ntoa_format(out_fct_type out, char * buffer, size_t idx, size_t maxlen, char * buf, size_t len, in _ntoa_format() argument
205 while((len < prec) && (len < PRINTF_NTOA_BUFFER_SIZE)) { in _ntoa_format()
206 buf[len++] = '0'; in _ntoa_format()
208 while((flags & FLAGS_ZEROPAD) && (len < width) && (len < PRINTF_NTOA_BUFFER_SIZE)) { in _ntoa_format()
209 buf[len++] = '0'; in _ntoa_format()
215 if(!(flags & FLAGS_PRECISION) && len && ((len == prec) || (len == width))) { in _ntoa_format()
216 len--; in _ntoa_format()
217 if(len && (base == 16U)) { in _ntoa_format()
218 len--; in _ntoa_format()
221 if((base == 16U) && !(flags & FLAGS_UPPERCASE) && (len < PRINTF_NTOA_BUFFER_SIZE)) { in _ntoa_format()
222 buf[len++] = 'x'; in _ntoa_format()
224 else if((base == 16U) && (flags & FLAGS_UPPERCASE) && (len < PRINTF_NTOA_BUFFER_SIZE)) { in _ntoa_format()
225 buf[len++] = 'X'; in _ntoa_format()
227 else if((base == 2U) && (len < PRINTF_NTOA_BUFFER_SIZE)) { in _ntoa_format()
228 buf[len++] = 'b'; in _ntoa_format()
230 if(len < PRINTF_NTOA_BUFFER_SIZE) { in _ntoa_format()
231 buf[len++] = '0'; in _ntoa_format()
235 if(len < PRINTF_NTOA_BUFFER_SIZE) { in _ntoa_format()
237 buf[len++] = '-'; in _ntoa_format()
240 buf[len++] = '+'; // ignore the space if the '+' exists in _ntoa_format()
243 buf[len++] = ' '; in _ntoa_format()
247 return _out_rev(out, buffer, idx, maxlen, buf, len, width, flags); in _ntoa_format()
255 size_t len = 0U; in _ntoa_long() local
266 … buf[len++] = digit < 10 ? '0' + digit : (flags & FLAGS_UPPERCASE ? 'A' : 'a') + digit - 10; in _ntoa_long()
268 } while(value && (len < PRINTF_NTOA_BUFFER_SIZE)); in _ntoa_long()
271 …return _ntoa_format(out, buffer, idx, maxlen, buf, len, negative, (unsigned int)base, prec, width,… in _ntoa_long()
280 size_t len = 0U; in _ntoa_long_long() local
291 … buf[len++] = digit < 10 ? '0' + digit : (flags & FLAGS_UPPERCASE ? 'A' : 'a') + digit - 10; in _ntoa_long_long()
293 } while(value && (len < PRINTF_NTOA_BUFFER_SIZE)); in _ntoa_long_long()
296 …return _ntoa_format(out, buffer, idx, maxlen, buf, len, negative, (unsigned int)base, prec, width,… in _ntoa_long_long()
313 size_t len = 0U; in _ftoa() local
350 while((len < PRINTF_FTOA_BUFFER_SIZE) && (prec > 9U)) { in _ftoa()
351 buf[len++] = '0'; in _ftoa()
386 while(len < PRINTF_FTOA_BUFFER_SIZE) { in _ftoa()
388 buf[len++] = (char)(48U + (frac % 10U)); in _ftoa()
394 while((len < PRINTF_FTOA_BUFFER_SIZE) && (count-- > 0U)) { in _ftoa()
395 buf[len++] = '0'; in _ftoa()
397 if(len < PRINTF_FTOA_BUFFER_SIZE) { in _ftoa()
399 buf[len++] = '.'; in _ftoa()
404 while(len < PRINTF_FTOA_BUFFER_SIZE) { in _ftoa()
405 buf[len++] = (char)(48 + (whole % 10)); in _ftoa()
416 while((len < width) && (len < PRINTF_FTOA_BUFFER_SIZE)) { in _ftoa()
417 buf[len++] = '0'; in _ftoa()
421 if(len < PRINTF_FTOA_BUFFER_SIZE) { in _ftoa()
423 buf[len++] = '-'; in _ftoa()
426 buf[len++] = '+'; // ignore the space if the '+' exists in _ftoa()
429 buf[len++] = ' '; in _ftoa()
433 return _out_rev(out, buffer, idx, maxlen, buf, len, width, flags); in _ftoa()