Lines Matching refs:size
31 yaml_malloc(size_t size) in yaml_malloc() argument
33 return malloc(size ? size : 1); in yaml_malloc()
41 yaml_realloc(void *ptr, size_t size) in yaml_realloc() argument
43 return ptr ? realloc(ptr, size ? size : 1) : malloc(size ? size : 1); in yaml_realloc()
243 yaml_string_read_handler(void *data, unsigned char *buffer, size_t size, in yaml_string_read_handler() argument
253 if (size > (size_t)(parser->input.string.end in yaml_string_read_handler()
255 size = parser->input.string.end - parser->input.string.current; in yaml_string_read_handler()
258 memcpy(buffer, parser->input.string.current, size); in yaml_string_read_handler()
259 parser->input.string.current += size; in yaml_string_read_handler()
260 *size_read = size; in yaml_string_read_handler()
269 yaml_file_read_handler(void *data, unsigned char *buffer, size_t size, in yaml_file_read_handler() argument
274 *size_read = fread(buffer, 1, size, parser->input.file); in yaml_file_read_handler()
284 const unsigned char *input, size_t size) in yaml_parser_set_input_string() argument
295 parser->input.string.end = input+size; in yaml_parser_set_input_string()
414 yaml_string_write_handler(void *data, unsigned char *buffer, size_t size) in yaml_string_write_handler() argument
418 if (emitter->output.string.size - *emitter->output.string.size_written in yaml_string_write_handler()
419 < size) { in yaml_string_write_handler()
423 emitter->output.string.size in yaml_string_write_handler()
425 *emitter->output.string.size_written = emitter->output.string.size; in yaml_string_write_handler()
430 + *emitter->output.string.size_written, buffer, size); in yaml_string_write_handler()
431 *emitter->output.string.size_written += size; in yaml_string_write_handler()
440 yaml_file_write_handler(void *data, unsigned char *buffer, size_t size) in yaml_file_write_handler() argument
444 return (fwrite(buffer, 1, size, emitter->output.file) == size); in yaml_file_write_handler()
452 unsigned char *output, size_t size, size_t *size_written) in yaml_emitter_set_output_string() argument
462 emitter->output.string.size = size; in yaml_emitter_set_output_string()