12 main(int argc, char *argv[])
17 printf("Usage: %s file1.yaml ...\n", argv[0]);
21 for (number = 1; number < argc; number ++)
25 yaml_document_t document;
30 printf("[%d] Loading '%s': ", number, argv[number]);
33 file = fopen(argv[number], "rb");
36 assert(yaml_parser_initialize(&parser));
38 yaml_parser_set_input_file(&parser, file);
42 if (!yaml_parser_load(&parser, &document)) {
47 done = (!yaml_document_get_root_node(&document));
49 yaml_document_delete(&document);
54 yaml_parser_delete(&parser);
56 assert(!fclose(file));
58 printf("%s (%d documents)\n", (error ? "FAILURE" : "SUCCESS"), count);