Lines Matching refs:buf

216 static inline char* _Stl_ecvtR(double x, int n, int* pt, int* sign, char* buf)  in _Stl_ecvtR()  argument
217 { return ecvtbuf(x, n, pt, sign, buf); } in _Stl_ecvtR()
218 static inline char* _Stl_fcvtR(double x, int n, int* pt, int* sign, char* buf) in _Stl_fcvtR() argument
219 { return fcvtbuf(x, n, pt, sign, buf); } in _Stl_fcvtR()
224 static inline char* _Stl_ecvtR(long double x, int n, int* pt, int* sign, char* buf) in _Stl_ecvtR() argument
225 { return ecvtbuf(x, n, pt, sign, buf); } in _Stl_ecvtR()
226 static inline char* _Stl_fcvtR(long double x, int n, int* pt, int* sign, char* buf) in _Stl_fcvtR() argument
227 { return fcvtbuf(x, n, pt, sign, buf); } in _Stl_fcvtR()
231 static inline char* _Stl_ecvtR(double x, int n, int* pt, int* sign, char* buf, size_t bsize) in _Stl_ecvtR() argument
232 { return ecvt_r(x, n, pt, sign, buf, bsize) == 0 ? buf : 0; } in _Stl_ecvtR()
233 static inline char* _Stl_fcvtR(double x, int n, int* pt, int* sign, char* buf, size_t bsize) in _Stl_fcvtR() argument
234 { return fcvt_r(x, n, pt, sign, buf, bsize) == 0 ? buf : 0; } in _Stl_fcvtR()
236 static inline char* _Stl_ecvtR(long double x, int n, int* pt, int* sign, char* buf, size_t bsize) in _Stl_ecvtR() argument
237 { return qecvt_r(x, n, pt, sign, buf, bsize) == 0 ? buf : 0; } in _Stl_ecvtR()
238 static inline char* _Stl_fcvtR(long double x, int n, int* pt, int* sign, char* buf, size_t bsize) in _Stl_fcvtR() argument
239 { return qfcvt_r(x, n, pt, sign, buf, bsize) == 0 ? buf : 0; } in _Stl_fcvtR()
243 static inline char* _Stl_ecvtR(double x, int n, int* pt, int* sign, char* buf) in _Stl_ecvtR() argument
244 { return econvert(x, n, pt, sign, buf); } in _Stl_ecvtR()
245 static inline char* _Stl_fcvtR(double x, int n, int* pt, int* sign, char* buf) in _Stl_fcvtR() argument
246 { return fconvert(x, n, pt, sign, buf); } in _Stl_fcvtR()
248 static inline char* _Stl_ecvtR(long double x, int n, int* pt, int* sign, char* buf) in _Stl_ecvtR() argument
249 { return qeconvert(&x, n, pt, sign, buf); } in _Stl_ecvtR()
250 static inline char* _Stl_fcvtR(long double x, int n, int* pt, int* sign, char* buf) in _Stl_fcvtR() argument
251 { return qfconvert(&x, n, pt, sign, buf); } in _Stl_fcvtR()
254 static inline char* _Stl_ecvtR(double x, int n, int* pt, int* sign, char* buf, size_t bsize) in _Stl_ecvtR() argument
255 { return (ecvt_r(x, n, pt, sign, buf, bsize) == 0 ? buf : 0); } in _Stl_ecvtR()
256 static inline char* _Stl_fcvtR(double x, int n, int* pt, int* sign, char* buf, size_t bsize) in _Stl_fcvtR() argument
257 { return (fcvt_r(x, n, pt, sign, buf, bsize) == 0 ? buf : 0); } in _Stl_fcvtR()
260 static inline char* _Stl_ecvtR(long double x, int n, int* pt, int* sign, char* buf, size_t bsize) in _Stl_ecvtR() argument
261 { return (ecvt_r((double)x, n, pt, sign, buf, bsize) == 0 ? buf : 0) ; } in _Stl_ecvtR()
262 static inline char* _Stl_fcvtR(long double x, int n, int* pt, int* sign, char* buf, size_t bsize) in _Stl_fcvtR() argument
263 { return (fcvt_r((double)x, n, pt, sign, buf, bsize) == 0 ? buf : 0); } in _Stl_fcvtR()
279 static inline char* _Stl_ecvtR(double x, int n, int* pt, int* sign, char* buf) in _Stl_ecvtR() argument
280 { return ecvt_r(x, n, pt, sign, buf); } in _Stl_ecvtR()
281 static inline char* _Stl_fcvtR(double x, int n, int* pt, int* sign, char* buf) in _Stl_fcvtR() argument
282 { return fcvt_r(x, n, pt, sign, buf); } in _Stl_fcvtR()
284 static inline char* _Stl_ecvtR(long double x, int n, int* pt, int* sign, char* buf) in _Stl_ecvtR() argument
285 { return qecvt_r(x, n, pt, sign, buf); } in _Stl_ecvtR()
286 static inline char* _Stl_fcvtR(long double x, int n, int* pt, int* sign, char* buf) in _Stl_fcvtR() argument
287 { return qfcvt_r(x, n, pt, sign, buf); } in _Stl_fcvtR()
292 # define _STLP_BUF_PARAMS , char* buf, size_t bsize
293 …ine _STLP_SECURE_FUN(F, X, N, PT, SIGN) _STLP_APPEND(F, _s)(buf, bsize, X, N, PT, SIGN); return buf
305 # define _STLP_PARAMS , buf, bsize
322 static inline char* _Stl_ecvtR(double x, int n, int* pt, int* sign, char* buf) in _Stl_ecvtR() argument
323 { return _fp_ecvt( x, n, pt, sign, buf); } in _Stl_ecvtR()
324 static inline char* _Stl_fcvtR(double x, int n, int* pt, int* sign, char* buf) in _Stl_fcvtR() argument
325 { return _fp_fcvt(x, n, pt, sign, buf); } in _Stl_fcvtR()
327 static inline char* _Stl_ecvtR(long double x, int n, int* pt, int* sign, char* buf) in _Stl_ecvtR() argument
328 { return _fp_ecvt( x, n, pt, sign, buf); } in _Stl_ecvtR()
329 static inline char* _Stl_fcvtR(long double x, int n, int* pt, int* sign, char* buf) in _Stl_fcvtR() argument
330 { return _fp_fcvt(x, n, pt, sign, buf); } in _Stl_fcvtR()
359 static inline char* _Stl_ecvtR(double x, int n, int* pt, int* sign, char* buf) { in _Stl_ecvtR() argument
361 strcpy(buf, _Stl_ecvtR(x, n, pt, sign)); return buf; in _Stl_ecvtR()
363 static inline char* _Stl_fcvtR(double x, int n, int* pt, int* sign, char* buf) { in _Stl_fcvtR() argument
365 strcpy(buf, _Stl_fcvtR(x, n, pt, sign)); return buf; in _Stl_fcvtR()
368 static inline char* _Stl_ecvtR(long double x, int n, int* pt, int* sign, char* buf) { in _Stl_ecvtR() argument
370 strcpy(buf, _Stl_ecvtR(x, n, pt, sign)); return buf; in _Stl_ecvtR()
372 static inline char* _Stl_fcvtR(long double x, int n, int* pt, int* sign, char* buf) { in _Stl_fcvtR() argument
374 strcpy(buf, _Stl_fcvtR(x, n, pt, sign)); return buf; in _Stl_fcvtR()
401 static char* _Stl_ecvtR(long double x, int n, int* pt, int* sign, char* buf) { in _Stl_ecvtR() argument
406 return _Stl_ecvtR(y, n, pt, sign, buf); in _Stl_ecvtR()
410 sprintf(buf, fmtbuf, n, x < 0.0l ? -x : x); in _Stl_ecvtR()
416 while (buf[++i] != 0 && n != 0) { in _Stl_ecvtR()
417 if (buf[i] >= '0' && buf[i] <= '9') { in _Stl_ecvtR()
420 buf[i - offset] = buf[i]; in _Stl_ecvtR()
429 buf[i - offset] = 0; in _Stl_ecvtR()
432 while (buf[++i] != 0) { in _Stl_ecvtR()
433 if (buf[i] >= '0' && buf[i] <= '9') { in _Stl_ecvtR()
434 e = e * 10 + (buf[i] - '0'); in _Stl_ecvtR()
438 return buf; in _Stl_ecvtR()
441 static char* _Stl_fcvtR(long double x, int n, int* pt, int* sign, char* buf) { in _Stl_fcvtR() argument
446 return _Stl_fcvtR(y, n, pt, sign, buf); in _Stl_fcvtR()
450 sprintf(buf, fmtbuf, n, x < 0.0l ? -x : x); in _Stl_fcvtR()
455 while (buf[++i] != 0 && (offset == 0 || n != 0)) { in _Stl_fcvtR()
456 if (buf[i] >= '0' && buf[i] <= '9') { in _Stl_fcvtR()
459 buf[i - offset] = buf[i]; in _Stl_fcvtR()
468 buf[i - offset] = 0; in _Stl_fcvtR()
471 return buf; in _Stl_fcvtR()
486 static size_t __format_float_scientific( __iostring& buf, const char *bp, in __format_float_scientific() argument
492 buf += '-'; in __format_float_scientific()
494 buf += '+'; in __format_float_scientific()
497 buf += *bp++; in __format_float_scientific()
502 size_t __group_pos = buf.size(); in __format_float_scientific()
506 buf += '.'; in __format_float_scientific()
511 buf += *bp++; in __format_float_scientific()
515 buf.append(precision, '0'); in __format_float_scientific()
545 buf += suffix; in __format_float_scientific()
549 static size_t __format_float_fixed( __iostring &buf, const char *bp, in __format_float_fixed() argument
554 buf += '-'; in __format_float_fixed()
556 buf += '+'; in __format_float_fixed()
561 buf += (nnn <= 0 || *bp == 0) ? '0' : *bp++; in __format_float_fixed()
565 size_t __group_pos = buf.size(); in __format_float_fixed()
569 buf += '.'; in __format_float_fixed()
574 buf += (++decpt <= 0) ? '0' : *bp++; in __format_float_fixed()
579 buf.append(precision, '0'); in __format_float_fixed()
614 static size_t __format_nan_or_inf(__iostring& buf, _FloatT x, ios_base::fmtflags flags) { in __format_nan_or_inf() argument
622 buf += '-'; in __format_nan_or_inf()
624 buf += '+'; in __format_nan_or_inf()
628 buf += '-'; in __format_nan_or_inf()
630 buf += '+'; in __format_nan_or_inf()
641 buf += '-'; in __format_nan_or_inf()
643 buf += '+'; in __format_nan_or_inf()
645 size_t ret = buf.size(); in __format_nan_or_inf()
646 buf += inf_or_nan[flags & ios_base::uppercase ? 1 : 0]; in __format_nan_or_inf()
650 static inline size_t __format_float(__iostring &buf, const char * bp, in __format_float() argument
657 __group_pos = __format_float_scientific( buf, bp, decpt, sign, is_zero, in __format_float()
661 __group_pos = __format_float_fixed( buf, bp, decpt, sign, in __format_float()
686 __group_pos = __format_float_scientific( buf, bp, decpt, sign, is_zero, in __format_float()
690 __group_pos = __format_float_fixed( buf, bp, decpt, sign, in __format_float()
748 static size_t __write_floatT(__iostring &buf, ios_base::fmtflags flags, int precision, argument
761 buf = static_buf;
762 return find_if(buf.begin(), buf.end(), GroupPos()) - buf.begin();
770 return __format_nan_or_inf(buf, x, flags);
776 return __format_nan_or_inf(buf, x, flags);
782 return __format_nan_or_inf(buf, x, flags);
817 return __format_float(buf, bp, decpt, sign, x == 0.0, flags, precision);
822 __write_float(__iostring &buf, ios_base::fmtflags flags, int precision, argument
824 return __write_floatT(buf, flags, precision, x
833 __write_float(__iostring &buf, ios_base::fmtflags flags, int precision, argument
835 return __write_floatT(buf, flags, precision, x