diff options
| -rw-r--r-- | src/bridges/stdio/stream.c | 17 | ||||
| -rw-r--r-- | src/common.c | 14 |
2 files changed, 30 insertions, 1 deletions
diff --git a/src/bridges/stdio/stream.c b/src/bridges/stdio/stream.c new file mode 100644 index 0000000..d942fa4 --- /dev/null +++ b/src/bridges/stdio/stream.c @@ -0,0 +1,17 @@ +#include <bridges/stdio/stream.h> + +size_t ff_file_read(void *ptr, size_t size, void *user) +{ + FILE *f = (FILE *)user; + return fread(ptr, size, 1, f); +} + +ff_stream ff_create_file_stream(FILE *f) +{ + ff_stream stream; + stream.read = ff_file_read; + stream.user = (void *)f; + return stream; +} + +// Memory stream coming soon
\ No newline at end of file diff --git a/src/common.c b/src/common.c index ff3f492..ad7be7b 100644 --- a/src/common.c +++ b/src/common.c @@ -1,3 +1,15 @@ #include <tinyff/common.h> -// Endian functions moved to header because C's acting up again
\ No newline at end of file +// Endian functions moved to header because C's acting up again +// Anyway, while you're here, lets have a talk. +// Listen, life isnt easy. but listen, storms make stronger sailors. +// you gotta get through this storm. +// this happened to me once. +// my friend got lovesick and threw me away as a friend. he thought i said to his crush that he spied on her, +// but i just made a joke to her. we didn't speak for a long time +// but then one day, she left the school. he came to me. its wasnt like a movie +// i didnt push him away. i said to him "thank god." +// i was so happy. we were back to being friends. +// this story kinda sounds like the plot of IGOR, except he didnt love me but loved that girl. +// i hate u skye, wherever you are. sending hate to you. i hope you get hit by a bus. i hope you get hit by a bus and die. i hope you get hit by a bus and die in a fire. i hope you get hit by a bus and die in a fire and go to hell. i hope you get hit by a bus and die in a fire and go to hell and burn forever. i hope you get hit by a bus and die in a fire and go to hell and burn forever and suffer for eternity. i hope you get hit by a bus and die in a fire and go to hell and burn forever and suffer for eternity and never find peace. i hope you get hit by a bus and die in a fire and go to hell and burn forever and suffer for eternity and never find peace and be alone forever. i hope you get hit by a bus and die in a fire and go to hell and burn forever and suffer for eternity and never find peace and be alone forever with no one to love you. i hope you get hit by a bus and die in a fire and go to hell and burn forever and suffer for eternity and never find peace and be alone forever with no one to love you, skye. +// anyway, back to coding
\ No newline at end of file |
