third_party/cairo/src/cairo-pdf-operators.c
static int
_word_wrap_stream_count_hexstring_up_to (word_wrap_stream_t *stream,
					 const unsigned char *data, int length)
{
    const unsigned char *s = data;
    int count = 0;
    cairo_bool_t newline = FALSE;

    while (length--) {
	count++;
	stream->column++;
	if (*s == '>') {
	    stream->state = WRAP_STATE_DELIMITER;
	    break;
	}

	if (stream->column > stream->max_column) {
	    newline = TRUE;
	    break;
	}
	s++;
    }

    if (count)
	_cairo_output_stream_write (stream->output, data, count);

    if (newline) {
	_cairo_output_stream_printf (stream->output, "\n");
	stream->column = 0;
    }

    return count;
}
/* Emit hexstring bytes up to either the end of the ASCII hexstring or the number
 * of columns remaining.
 */
Emit hexstring bytes up to either the end of the ASCII hexstring or the number
of columns remaining.
Emit hexstring bytes up to either the end of the ASCII hexstring or the number of columns remaining .
static int
_word_wrap_stream_count_hexstring_up_to (word_wrap_stream_t *stream,
					 const unsigned char *data, int length)
{
    const unsigned char *s = data;
    int count = 0;
    cairo_bool_t newline = FALSE;
    while (length--) {
	count++;
	stream->column++;
	if (*s == '>') {
	    stream->state = WRAP_STATE_DELIMITER;
	    break;
	}
	if (stream->column > stream->max_column) {
	    newline = TRUE;
	    break;
	}
	s++;
    }
    if (count)
	_cairo_output_stream_write (stream->output, data, count);
    if (newline) {
	_cairo_output_stream_printf (stream->output, "\n");
	stream->column = 0;
    }
    return count;
}
static int _word_wrap_stream_count_hexstring_up_to ( word_wrap_stream_t * stream , const unsigned char * data , int length ) { const unsigned char * s = data ; int count = 0 ; cairo_bool_t newline = FALSE ; while ( length -- ) { count ++ ; stream -> column ++ ; if ( * s == ' ' ) { stream -> state = WRAP_STATE_DELIMITER ; break ; } if ( stream -> column > stream -> max_column ) { newline = TRUE ; break ; } s ++ ; } if ( count ) _cairo_output_stream_write ( stream -> output , data , count ) ; if ( newline ) { _cairo_output_stream_printf ( stream -> output , " \n " ) ; stream -> column = 0 ; } return count ; }
Emit hexstring bytes up to either the end of the ASCII hexstring or the number
 of columns remaining.
Emit hexstring bytes up to either the end of the ASCII hexstring or the number of columns remaining .