Mercurial > libedl
diff README.md @ 4:c2408abb258a
*: add dumping to string, rename EDL_file to EDL
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Mon, 25 Dec 2023 16:24:16 -0500 |
parents | bd99b6549eb4 |
children | a6ab6d9c0dac |
line wrap: on
line diff
--- a/README.md Sun Dec 24 20:22:54 2023 -0500 +++ b/README.md Mon Dec 25 16:24:16 2023 -0500 @@ -1,8 +1,6 @@ # libedl libedl is a library for parsing Vegas Pro EDL files and translating them into usable C structures. -Currently, writing EDL files is not supported by this library. - ## Build ```console $ autoreconf -i @@ -19,9 +17,9 @@ #include <stdlib.h> #include "edl.h" -int main(){ +int main() { /* open the file */ - FILE* file = fopen("MyProject.txt", "rb"); + FILE* file = fopen("intensive care unit.TXT", "rb"); if (!file) return 1; @@ -37,15 +35,17 @@ fread(data, fsize, 1, file); + data[fsize] = '\0'; + fclose(file); /* pass it to libedl */ - EDL_file edl = EDL_parse(data, fsize + 1); + EDL edl = EDL_parse(data, fsize + 1); - /* do what we have to do with it */ - for (int i = 0; i < edl.size; i++) { - printf("%s\n", edl.arr[i].filename); - } + /* dump the EDL to */ + char* edl_str = EDL_dump(edl); + printf("%s\n", edl_str); + free(edl_str); /* free our memory */ EDL_free(edl);