Changeset 238 for libyaml/trunk/tests/example-deconstructor.c
- Timestamp:
- 01/07/07 15:11:16 (6 years ago)
- File:
-
- 1 edited
-
libyaml/trunk/tests/example-deconstructor.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
libyaml/trunk/tests/example-deconstructor.c
r220 r238 337 337 tag ++) 338 338 { 339 /* Write '{'. */ 340 341 if (!yaml_mapping_start_event_initialize(&output_event, 342 NULL, "tag:yaml.org,2002:map", 1, 343 YAML_FLOW_MAPPING_STYLE)) 344 goto event_error; 345 if (!yaml_emitter_emit(&emitter, &output_event)) 346 goto emitter_error; 347 348 /* Write 'handle'. */ 349 350 if (!yaml_scalar_event_initialize(&output_event, 351 NULL, "tag:yaml.org,2002:str", "handle", -1, 352 1, 1, YAML_PLAIN_SCALAR_STYLE)) 353 goto event_error; 354 if (!yaml_emitter_emit(&emitter, &output_event)) 355 goto emitter_error; 356 357 /* Write the tag directive handle. */ 358 359 if (!yaml_scalar_event_initialize(&output_event, 360 NULL, "tag:yaml.org,2002:str", 361 tag->handle, -1, 362 0, 1, YAML_DOUBLE_QUOTED_SCALAR_STYLE)) 363 goto event_error; 364 if (!yaml_emitter_emit(&emitter, &output_event)) 365 goto emitter_error; 366 367 /* Write 'prefix'. */ 368 369 if (!yaml_scalar_event_initialize(&output_event, 370 NULL, "tag:yaml.org,2002:str", "prefix", -1, 371 1, 1, YAML_PLAIN_SCALAR_STYLE)) 372 goto event_error; 373 if (!yaml_emitter_emit(&emitter, &output_event)) 374 goto emitter_error; 375 376 /* Write the tag directive prefix. */ 377 378 if (!yaml_scalar_event_initialize(&output_event, 379 NULL, "tag:yaml.org,2002:str", 380 tag->prefix, -1, 381 0, 1, YAML_DOUBLE_QUOTED_SCALAR_STYLE)) 382 goto event_error; 383 if (!yaml_emitter_emit(&emitter, &output_event)) 384 goto emitter_error; 385 386 /* Write '}'. */ 387 388 if (!yaml_mapping_end_event_initialize(&output_event)) 389 goto event_error; 390 if (!yaml_emitter_emit(&emitter, &output_event)) 391 goto emitter_error; 392 } 393 394 /* End a block sequence. */ 395 396 if (!yaml_sequence_end_event_initialize(&output_event)) 339 /* Write '{'. */ 340 341 if (!yaml_mapping_start_event_initialize(&output_event, 342 NULL, "tag:yaml.org,2002:map", 1, 343 YAML_FLOW_MAPPING_STYLE)) 397 344 goto event_error; 398 345 if (!yaml_emitter_emit(&emitter, &output_event)) 399 346 goto emitter_error; 347 348 /* Write 'handle'. */ 349 350 if (!yaml_scalar_event_initialize(&output_event, 351 NULL, "tag:yaml.org,2002:str", "handle", -1, 352 1, 1, YAML_PLAIN_SCALAR_STYLE)) 353 goto event_error; 354 if (!yaml_emitter_emit(&emitter, &output_event)) 355 goto emitter_error; 356 357 /* Write the tag directive handle. */ 358 359 if (!yaml_scalar_event_initialize(&output_event, 360 NULL, "tag:yaml.org,2002:str", 361 tag->handle, -1, 362 0, 1, YAML_DOUBLE_QUOTED_SCALAR_STYLE)) 363 goto event_error; 364 if (!yaml_emitter_emit(&emitter, &output_event)) 365 goto emitter_error; 366 367 /* Write 'prefix'. */ 368 369 if (!yaml_scalar_event_initialize(&output_event, 370 NULL, "tag:yaml.org,2002:str", "prefix", -1, 371 1, 1, YAML_PLAIN_SCALAR_STYLE)) 372 goto event_error; 373 if (!yaml_emitter_emit(&emitter, &output_event)) 374 goto emitter_error; 375 376 /* Write the tag directive prefix. */ 377 378 if (!yaml_scalar_event_initialize(&output_event, 379 NULL, "tag:yaml.org,2002:str", 380 tag->prefix, -1, 381 0, 1, YAML_DOUBLE_QUOTED_SCALAR_STYLE)) 382 goto event_error; 383 if (!yaml_emitter_emit(&emitter, &output_event)) 384 goto emitter_error; 385 386 /* Write '}'. */ 387 388 if (!yaml_mapping_end_event_initialize(&output_event)) 389 goto event_error; 390 if (!yaml_emitter_emit(&emitter, &output_event)) 391 goto emitter_error; 392 } 393 394 /* End a block sequence. */ 395 396 if (!yaml_sequence_end_event_initialize(&output_event)) 397 goto event_error; 398 if (!yaml_emitter_emit(&emitter, &output_event)) 399 goto emitter_error; 400 400 } 401 401
Note: See TracChangeset
for help on using the changeset viewer.
