ansilove

ANSI and ASCII art to PNG converter in C
Log | Files | Refs | README | LICENSE

commit 1a2c9a281db1412a3c83ff8dbb85bdca2ac94497
parent 75c3cb766f7b5fa5cd88a9db937e20b37099823f
Author: Frederic Cambus <fred@statdns.com>
Date:   Fri, 14 Feb 2020 18:13:49 +0100

Define macros for each file type, and an array of filetypes.

Diffstat:
Msrc/types.c | 11+++++++++++
Msrc/types.h | 9+++++++++
2 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/src/types.c b/src/types.c @@ -11,6 +11,7 @@ */ #include "ansilove.h" +#include "types.h" char *types[] = { "ans", @@ -22,6 +23,16 @@ char *types[] = { "xb", }; +int filetypes[] = { + ANSILOVE_FILETYPE_ANS, + ANSILOVE_FILETYPE_ADF, + ANSILOVE_FILETYPE_BIN, + ANSILOVE_FILETYPE_IDF, + ANSILOVE_FILETYPE_PCB, + ANSILOVE_FILETYPE_TND, + ANSILOVE_FILETYPE_XB +}; + int (*loaders[])(struct ansilove_ctx *, struct ansilove_options *) = { ansilove_ansi, ansilove_artworx, diff --git a/src/types.h b/src/types.h @@ -13,7 +13,16 @@ #ifndef TYPES_H #define TYPES_H +#define ANSILOVE_FILETYPE_ANS 1 +#define ANSILOVE_FILETYPE_ADF 2 +#define ANSILOVE_FILETYPE_BIN 3 +#define ANSILOVE_FILETYPE_IDF 4 +#define ANSILOVE_FILETYPE_PCB 5 +#define ANSILOVE_FILETYPE_TND 6 +#define ANSILOVE_FILETYPE_XB 7 + extern char *types[]; +extern int filetypes[]; extern int (*loaders[])(struct ansilove_ctx *, struct ansilove_options *); #endif /* TYPES_H */