Mercurial > msvpvf
diff include/common.h @ 79:8f90d5addda9 v2.0
*: refactor... basically everything!
The Win32 GUI version is now unicode-friendly. HOWEVER, ANSI still very
much works. you can configure which version to use through `-DUNICODE=0/1`
in CFLAGS.
the CLI is also friendlier and uses a more sane interface as well.
note: the command line flags (which were optional before) are now required.
Unicode filenames will not work on Windows because Windows sucks.
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Wed, 20 Mar 2024 17:06:26 -0400 |
parents | fcd4b9fe957b |
children |
line wrap: on
line diff
--- a/include/common.h Sun Oct 01 03:03:29 2023 -0400 +++ b/include/common.h Wed Mar 20 17:06:26 2024 -0400 @@ -1,2 +1,21 @@ -void set_data(unsigned char* magic, int version, FILE* target); -int copy_file(char* source_file, char* target_file); +#ifndef msvpvf_common_h +#define msvpvf_common_h + +#include <stdio.h> +#include <stdint.h> + +#ifndef ARRAYSIZE +#define ARRAYSIZE(x) \ + (sizeof(x)/sizeof((x)[0])) +#endif + +enum types { + TYPES_UNKNOWN = 0, + TYPES_VF, + TYPES_VEG +}; + +int set_file_information(FILE* target, uint8_t version, enum types type); +int get_file_information(FILE* input, uint8_t* version, enum types* type); + +#endif /* msvpvf_common_h */