diff options
Diffstat (limited to 'apps/codecs/dumb/src/it/itload.c')
-rw-r--r-- | apps/codecs/dumb/src/it/itload.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/apps/codecs/dumb/src/it/itload.c b/apps/codecs/dumb/src/it/itload.c new file mode 100644 index 0000000000..a377619a88 --- /dev/null +++ b/apps/codecs/dumb/src/it/itload.c | |||
@@ -0,0 +1,43 @@ | |||
1 | /* _______ ____ __ ___ ___ | ||
2 | * \ _ \ \ / \ / \ \ / / ' ' ' | ||
3 | * | | \ \ | | || | \/ | . . | ||
4 | * | | | | | | || ||\ /| | | ||
5 | * | | | | | | || || \/ | | ' ' ' | ||
6 | * | | | | | | || || | | . . | ||
7 | * | |_/ / \ \__// || | | | ||
8 | * /_______/ynamic \____/niversal /__\ /____\usic /| . . ibliotheque | ||
9 | * / \ | ||
10 | * / . \ | ||
11 | * itload.c - Code to read an Impulse Tracker / / \ \ | ||
12 | * file, opening and closing it for | < / \_ | ||
13 | * you. | \/ /\ / | ||
14 | * \_ / > / | ||
15 | * By entheh. Don't worry Bob, you're credited | \ / / | ||
16 | * in itread.c! | ' / | ||
17 | * \__/ | ||
18 | */ | ||
19 | |||
20 | #include "dumb.h" | ||
21 | #include "internal/it.h" | ||
22 | |||
23 | |||
24 | |||
25 | /* dumb_load_it(): loads an IT file into a DUH struct, returning a pointer to | ||
26 | * the DUH struct. When you have finished with it, you must pass the pointer | ||
27 | * to unload_duh() so that the memory can be freed. | ||
28 | */ | ||
29 | DUH *dumb_load_it(const char *filename) | ||
30 | { | ||
31 | DUH *duh; | ||
32 | DUMBFILE *f = dumbfile_open(filename); | ||
33 | |||
34 | if (!f) | ||
35 | return NULL; | ||
36 | |||
37 | duh = dumb_read_it(f); | ||
38 | |||
39 | dumbfile_close(f); | ||
40 | |||
41 | return duh; | ||
42 | } | ||
43 | |||