Made dropin compile again

This commit is contained in:
Felix Krause 2017-10-13 20:31:48 +02:00
parent 11ede47ea7
commit dbd15d48fa
2 changed files with 19 additions and 6 deletions

View File

@ -6,7 +6,9 @@ void put_properties(yaml_char_t* anchor, yaml_char_t* tag) {
printf(" &%s", anchor);
}
if (*tag != 0) {
printf(" <%s>", tag);
if (strcmp((const char*)tag, "?") != 0) {
printf(" <%s>", tag);
}
}
}
@ -71,6 +73,15 @@ int main(int argc, char* argv[]) {
}
puts((char*)event.data.scalar.value);
break;
case YAML_ANNOTATION_START_EVENT:
printf("+ANN");
put_properties(event.data.annotation_start.anchor,
event.data.annotation_start.tag);
printf(" @%s\n", event.data.annotation_start.name);
break;
case YAML_ANNOTATION_END_EVENT:
puts("-ANN");
break;
case YAML_NO_EVENT:
puts(":NIL");
break;

View File

@ -6,10 +6,12 @@ library project Libyaml_Dropin is
for Object_Dir use "obj";
for Library_Dir use "lib";
for Library_Kind use "relocatable";
for Library_Interface use ("Yaml", "Yaml.C", "Yaml.Parser",
"Yaml.Source", "Yaml.Source.File", "Yaml.Lexer",
"Yaml.Source.Text_IO", "Yaml.Stacks",
"Yaml.Stream_Concept", "Text", "Text.Pool",
for Library_Interface use ("Yaml", "Yaml.C", "Yaml.Parser", "Yaml.Tags",
"Lexer", "Lexer.Base", "Lexer.Source",
"Lexer.Source.File", "Yaml.Source",
"Yaml.Lexer", "Lexer.Source.Text_IO",
"Yaml.Stacks", "Yaml.Stream_Concept", "Text",
"Text.Pool", "Text.Builder",
"Yaml.Lexer.Evaluation", "Yaml.Text_Set",
"Yaml.Destination", "Yaml.Destination.Text_IO",
"Yaml.Destination.C_String", "Yaml.Presenter",
@ -18,7 +20,7 @@ library project Libyaml_Dropin is
for Library_Auto_Init use "true";
for Source_Dirs use ("dropin/src", "dropin/include", "src/interface", "src/implementation",
"text/src/interface", "text/src/implementation");
"Parser_Tools/src/interface", "Parser_Tools/src/implementation");
type Mode_Type is ("debug", "release");
Mode : Mode_Type := external ("Mode", "debug");