Lines Matching defs:buffer

446    longer, no need for a maximum buffer size parameter. */
448 change_decimal_from_locale_to_dot(char* buffer)
456 if (*buffer == '+' || *buffer == '-')
457 buffer++;
458 while (Py_ISDIGIT(*buffer))
459 buffer++;
460 if (strncmp(buffer, decimal_point, decimal_point_len) == 0) {
461 *buffer = '.';
462 buffer++;
464 /* buffer needs to get smaller */
465 size_t rest_len = strlen(buffer +
467 memmove(buffer,
468 buffer + (decimal_point_len - 1),
470 buffer[rest_len] = 0;
486 ensure_minimum_exponent_length(char* buffer, size_t buf_size)
488 char *p = strpbrk(buffer, "eE");
540 < buffer + buf_size) {
554 remove_trailing_zeros(char *buffer)
558 p = buffer;
592 /* Ensure that buffer has a decimal point in it. The decimal point will not
597 Returns a pointer to the fixed buffer, or NULL on failure.
600 ensure_decimal_point(char* buffer, size_t buf_size, int precision)
607 char *p = buffer;
652 size_t buf_len = strlen(buffer);
654 /* If there is not enough room in the buffer
660 buffer + strlen(buffer) - p + 1);
673 assert(p <= buf_size+buffer);
674 buf_avail = buf_size+buffer-p;
685 remove_trailing_zeros(buffer);
687 return buffer;
695 * @buffer: A buffer to place the resulting string in
696 * @buf_size: The length of the buffer.
710 * Return value: The pointer to the buffer with the converted string.
714 _PyOS_ascii_formatd(char *buffer,
767 PyOS_snprintf(buffer, buf_size, format, d);
773 change_decimal_from_locale_to_dot(buffer);
776 MIN_EXPONENT_DIGITS digits, providing the buffer is large enough
780 ensure_minimum_exponent_length(buffer, buf_size);
788 buffer = ensure_decimal_point(buffer, buf_size, precision);
790 return buffer;
845 /* Here's a quick-and-dirty calculation to figure out how big a buffer