|
BB2 C port
API reference: Blitz libraries in C and the shared code
|
#include "xtra.h"Functions | |
| int | xtra_mode (int force, const uint8_t *src, size_t len, const char *path, const uint8_t *xtra, size_t xlen) |
| The mode of a source (xtra_mode.c; docs/ab3/variant.md). | |
| int xtra_mode | ( | int | force, |
| const uint8_t * | src, | ||
| size_t | len, | ||
| const char * | path, | ||
| const uint8_t * | xtra, | ||
| size_t | xlen ) |
The mode of a source (xtra_mode.c; docs/ab3/variant.md).
force XTRA_MODE_BB2 or XTRA_MODE_AB3 (the command line's -mode): that mode. Otherwise by xtra_detect: XTRA_T_AB3 (a text with the embedded header, or a text named *.ab3) is AB3; XTRA_T_TED (tokenised) is AB3 if its companion .xtra has AmiBlitz3's format (xtra_is_ab3_xtra), else BB2; everything else (BB22, text without header) is BB2. The same rule gives the mode of a tokenised include.
| force | an enum xtra_mode; XTRA_MODE_DETECT (or another value): detect |
| src | the source, src[0..len) |
| len | its length |
| path | its file name (may be NULL) |
| xtra | its companion .xtra, xtra[0..xlen) (NULL: none) |
| xlen | its length |