Changeset 212
- Timestamp:
- 07/25/06 16:54:28 (2 years ago)
- Files:
-
- libyaml/trunk/include/yaml.h (modified) (2 diffs)
- libyaml/trunk/src/Makefile.am (modified) (1 diff)
- libyaml/trunk/src/api.c (modified) (3 diffs)
- libyaml/trunk/src/emitter.c (added)
- libyaml/trunk/src/parser.c (modified) (1 diff)
- libyaml/trunk/src/yaml_private.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
libyaml/trunk/include/yaml.h
r211 r212 1140 1140 * 1141 1141 * @param[in] emitter An emitter object. 1142 * @param[in] indent The indentation increment ( > 1).1142 * @param[in] indent The indentation increment (1 < . < 10). 1143 1143 */ 1144 1144 … … 1147 1147 1148 1148 /** 1149 * Set the preferred line width. @c 0means unlimited.1149 * Set the preferred line width. @c -1 means unlimited. 1150 1150 * 1151 1151 * @param[in] emitter An emitter object. libyaml/trunk/src/Makefile.am
r211 r212 1 1 AM_CPPFLAGS = -I$(top_srcdir)/include 2 2 lib_LTLIBRARIES = libyaml.la 3 libyaml_la_SOURCES = api.c reader.c scanner.c parser.c writer.c 3 libyaml_la_SOURCES = api.c reader.c scanner.c parser.c writer.c emitter.c 4 4 libyaml_la_LDFLAGS = -release $(YAML_LT_RELEASE) -version-info $(YAML_LT_CURRENT):$(YAML_LT_REVISION):$(YAML_LT_AGE) libyaml/trunk/src/api.c
r211 r212 58 58 */ 59 59 60 YAML_DECLARE(char *) 61 yaml_strdup(const char *str) 62 { 63 return strdup(str); 60 YAML_DECLARE(yaml_char_t *) 61 yaml_strdup(const yaml_char_t *str) 62 { 63 if (!str) 64 return NULL; 65 66 return (yaml_char_t *)strdup((char *)str); 64 67 } 65 68 … … 390 393 } 391 394 STACK_DEL(emitter, emitter->indents); 395 yaml_event_delete(&emitter->event); 392 396 while (!STACK_EMPTY(empty, emitter->tag_directives)) { 393 397 yaml_tag_directive_t tag_directive = POP(emitter, emitter->tag_directives); … … 537 541 assert(emitter); /* Non-NULL emitter object expected. */ 538 542 539 emitter->best_width = (width > 0) ? width : 0;543 emitter->best_width = (width >= 0) ? width : -1; 540 544 } 541 545 libyaml/trunk/src/parser.c
r211 r212 1336 1336 } 1337 1337 1338 copy.handle = (yaml_char_t *)yaml_strdup((char *)value.handle);1339 copy.prefix = (yaml_char_t *)yaml_strdup((char *)value.prefix);1338 copy.handle = yaml_strdup(value.handle); 1339 copy.prefix = yaml_strdup(value.prefix); 1340 1340 if (!copy.handle || !copy.prefix) { 1341 1341 parser->error = YAML_MEMORY_ERROR; libyaml/trunk/src/yaml_private.h
r211 r212 21 21 yaml_free(void *ptr); 22 22 23 YAML_DECLARE( char*)24 yaml_strdup(const char*);23 YAML_DECLARE(yaml_char_t *) 24 yaml_strdup(const yaml_char_t *); 25 25 26 26 /*
