Annotation-System/hmmlib/example.c

29 lines
421 B
C

#if 0
cc $0 -o ${0/.c/} hmml.a
exit
#endif
#include "hmmlib.h"
#include <stdio.h>
int main(int argc, char** argv){
if(argc < 2){
fputs("gimme a file.\n", stderr);
return 1;
}
FILE* f = fopen(argv[1], "r");
if(f){
printf("Reading file: %s\n", argv[1]);
HMML_Output hmml = hmml_parse_file(f);
hmml_dump(&hmml);
hmml_free(&hmml);
fclose(f);
} else {
perror("Error reading file");
}
return 0;
}