|
| struct | xtra_base |
| | The bases of the views: the .xtra as loaded and the kept source header (src[0..x->hdr) of xtra_load, wherever it is now). More...
|
| struct | xtra_text |
| | A text: a view (in, off, len) or the caller's bytes (XTRA_IN_SET: set, len). More...
|
| struct | xtra_max |
| | One object maximum. More...
|
| struct | xtra_maxima |
| | The maxima: the {lib, max} pairs of the .xtra (off: the first pair), the "Max NAME" lines of the header (off: the first one's line, n lines; a NAME given twice is there twice, the last one counts) or the caller's array (xtra_set_maxima). More...
|
| struct | xtra_editor |
| | The editor part: not in a Blitz 2 .xtra; from a BB22 header or the AmiBlitz3 header. More...
|
| struct | xtra_ab3 |
| | Numbers only AmiBlitz3 has (LabelSearch: XTRA_F_LABEL_SEARCH). More...
|
| struct | xtra |
| | The settings. More...
|
| struct | xtra_error |
| | Where an error is: file (XTRA_IN_XTRA or XTRA_IN_HEADER = the source), byte offset (binary formats) or line (1-based, AB3). More...
|
| struct | xtra_iter |
| | An iterator over the maxima, one by one, in file order. More...
|
|
| enum | xtra_switch {
XTRA_SW_RUNTIME_ERRORS
, XTRA_SW_DEBUGGER
, XTRA_SW_LONG_ARRAYS
, XTRA_SW_EXPAND_MACROS
,
XTRA_SW_QUOTED_MACROS
, XTRA_SW_MAKE_SMALLEST
, XTRA_SW_DEBUG_INFO
, XTRA_SW_AUTO_RUN
,
XTRA_SW_INTERRUPT_CHECK
, XTRA_SW_ASSEMBLER_CHECK
, XTRA_SW_OVERFLOW_CHECK
, XTRA_SW_WARNINGS
,
XTRA_SW_DEFAULT_INTERRUPT
, XTRA_SW_DEFAULT_OVERFLOW
} |
| | The switch words in file order (offset 2 + 2 * index); each is the Flags word of the option gadget: XTRA_ON (GFLG_SELECTED) = on. More...
|
| enum | xtra_buffer {
XTRA_BUF_OBJECT
, XTRA_BUF_LIBS
, XTRA_BUF_SYSTEM
, XTRA_BUF_DATA
,
XTRA_BUF_MACRO
, XTRA_BUF_STRING
} |
| | The buffer sizes in file order (offset 30 + 4 * index). More...
|
| enum | xtra_type {
XTRA_T_TED
, XTRA_T_BB22
, XTRA_T_AB3
, XTRA_T_TEXT
,
XTRA_T_COUNT
} |
| | The type of a source file (xtra_detect, xtra_load). More...
|
| enum | xtra_source { XTRA_SRC_NONE
, XTRA_SRC_BLITZ2
, XTRA_SRC_AB3_TEXT
} |
| | Where the settings came from. More...
|
| enum | xtra_in { XTRA_IN_NONE
, XTRA_IN_XTRA
, XTRA_IN_HEADER
, XTRA_IN_SET
} |
| | Where the bytes of a view are; also the file of an error. More...
|
| enum | xtra_field {
XTRA_F_EXE_PATH
, XTRA_F_EXE_NAME
, XTRA_F_CLI
, XTRA_F_LABEL_SEARCH
,
XTRA_F_RES0
, XTRA_F_COUNT = XTRA_F_RES0 + XTRA_NRES
} |
| | The text fields (xtra_get_text, xtra_set_text). More...
|
| enum | xtra_ab3_key {
XTRA_K_EXEPATH
, XTRA_K_EXEFILE
, XTRA_K_CREATEICON
, XTRA_K_RESIDENTS
,
XTRA_K_STRINGBUFFER
, XTRA_K_MAKESMALLEST
, XTRA_K_FUNCOPTIMIZE
, XTRA_K_VERSION
,
XTRA_K_NUMBEROFBUILDS
, XTRA_K_CLIARGS
, XTRA_K_STACKSIZE
, XTRA_K_RUNTIMEDEBUG
,
XTRA_K_DEBUGINFO
, XTRA_K_CREATEDBGFILE
, XTRA_K_OVERFLOWCHECK
, XTRA_K_ASSEMBLERCHECK
,
XTRA_K_INTERRUPTCHECK
, XTRA_K_AUTORUN
, XTRA_K_CURSORLINE
, XTRA_K_CURSORCOLUMN
,
XTRA_K_LABELSEARCH
, XTRA_K_LABELREMARK
, XTRA_K_LABELALL
, XTRA_K_LABELCASE
,
XTRA_K_LABELPOSITION
, XTRA_K_MAX
, XTRA_K_COUNT
} |
| | Keys of the AmiBlitz3 header: bit (1 << key) in xtra_ab3.seen when the header has the key (docs/formats.md 7.2). More...
|
| enum | xtra_err {
XTRA_OK
, XTRA_E_SHORT
, XTRA_E_SIZE
, XTRA_E_VERS
,
XTRA_E_UNTERMINATED
, XTRA_E_SPACE
, XTRA_E_BB22
, XTRA_E_AB3_LINE
,
XTRA_E_AB3_END
, XTRA_E_AB3_NUMBER
, XTRA_E_AB3_QUOTE
, XTRA_E_LONG
,
XTRA_E_AB3_RESIDENTS
, XTRA_E_AB3_VERSION
, XTRA_E_AB3_NAME
, XTRA_E_TYPE
,
XTRA_E_FIELD
, XTRA_E_TEXT
, XTRA_E_BASE
, XTRA_E_COUNT
} |
| | The error codes of the functions (XTRA_OK = 0: no error). More...
|
| enum | xtra_mode { XTRA_MODE_DETECT
, XTRA_MODE_BB2
, XTRA_MODE_AB3
} |
| | The mode a program is compiled in by blitz2-ab3 (xtra_mode). More...
|
|
| const char * | xtra_strerror (int code) |
| | The message of an error code (English, without position).
|
| int | xtra_detect (const uint8_t *buf, size_t len, const char *path) |
| | The type of a source.
|
| int | xtra_has_companion (int type) |
| | Whether the settings of a source of this type are in NAME.xtra.
|
| int | xtra_companion_name (const char *path, char *out, size_t cap) |
| | The name of the companion of the source path: path + ".xtra" (as TED and blitz2 make it).
|
| int | xtra_is_ab3_xtra (const uint8_t *xtra, size_t len) |
| | Whether a companion .xtra has AmiBlitz3's binary format with 15 switch words (since AmiBlitz/AmiBlitz3@bdae3f9e, docs/formats.md 1.3) - not Blitz 2's 14.
|
| 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_load (struct xtra *x, int type, const uint8_t *src, size_t len, const uint8_t *xtra, size_t xlen, struct xtra_error *err) |
| | Load the settings of a source.
|
| void | xtra_init (struct xtra *x) |
| | Initialise settings with the defaults.
|
| void | xtra_apply_vers0 (struct xtra *x) |
| | What blitz2's loadxtra does after reading a vers 0 file.
|
| const uint8_t * | xtra_get_text (const struct xtra *x, const struct xtra_base *b, int field, size_t *len) |
| | A text field.
|
| size_t | xtra_text_cap (int field) |
| | The bytes of a text field in a Blitz 2 .xtra (with the 0): a text is shorter than this.
|
| int | xtra_set_text (struct xtra *x, int field, const void *p, size_t len) |
| | Set a text field to the caller's bytes.
|
| void | xtra_set_maxima (struct xtra *x, const struct xtra_max *m, uint32_t n) |
| | The maxima from the caller's array instead of those of the .xtra/header.
|
| void | xtra_max_begin (struct xtra_iter *it, const struct xtra *x, const struct xtra_base *b) |
| | Start iterating the maxima of x.
|
| int | xtra_next_max (struct xtra_iter *it, struct xtra_max *m) |
| | The next maximum.
|
| void | xtra_take_blitz2 (struct xtra *to, const struct xtra *from) |
| | Take what a Blitz 2 .xtra holds from from into to.
|
| size_t | xtra_blitz2_size (const struct xtra *x) |
| | The bytes xtra_write_blitz2 writes: the fixed part of x->vers and 4 per maximum with a library number.
|
| int | xtra_write_blitz2 (const struct xtra *x, const struct xtra_base *b, uint8_t *out, size_t cap, size_t *len, unsigned *skipped, struct xtra_error *err) |
| | Write x as Blitz 2 .xtra.
|
| int | xtra_write_ab3 (const struct xtra *x, const struct xtra_base *b, char *out, size_t cap, size_t *len, unsigned *skipped) |
| | Write x as AmiBlitz3 header (not 0-terminated).
|
| size_t | xtra_ab3_size (const struct xtra *x, const struct xtra_base *b) |
| | The bytes xtra_write_ab3 writes.
|
| const char * | xtra_ab3_keyname (int key) |
| | The name of an AmiBlitz3 key ("ExePath", ..., "Max").
|
| void xtra_init |
( |
struct xtra * | x | ) |
|
Initialise settings with the defaults.
Blitz 2's defaults (options.src, the initial gadget flags), no residents, empty texts, no maxima, no editor part, AmiBlitz3's defaults for its own numbers; vers 1, type XTRA_T_TED, XTRA_SRC_NONE.
- Parameters
-
| int xtra_is_ab3_xtra |
( |
const uint8_t * | xtra, |
|
|
size_t | len ) |
Whether a companion .xtra has AmiBlitz3's binary format with 15 switch words (since AmiBlitz/AmiBlitz3@bdae3f9e, docs/formats.md 1.3) - not Blitz 2's 14.
The layout as AmiBlitz3's write_xtrafile writes it: vers 1, icon, 15 switch words, 6 buffer sizes at 32, 8 residents at 56, path and name of the executable at 600 and 792, CLI argument (116 bytes) and stack, version, builds at 984 (fixed part XTRA_AB3_FIXED), the {lib, max} pairs, 4 more bytes, maybe PED's XtraExtend. Recognised by: at least the fixed part + 4 bytes, a multiple of 4 (a Blitz 2 .xtra is 982/1110
- 4n), vers 1, icon and switch words 0 or XTRA_ON, every buffer size below 16 MB (in the 14-word layout's place a buffer's low word would be the next one's high word), the text fields 0-terminated. An older AmiBlitz3 .xtra with 14 switch words is not recognised.
- Parameters
-
| xtra | the file, xtra[0..len) (NULL: none) |
| len | its length |
- Returns
- 1 or 0
| void xtra_take_blitz2 |
( |
struct xtra * | to, |
|
|
const struct xtra * | from ) |
Take what a Blitz 2 .xtra holds from from into to.
vers, icon, switches, buffers, residents (texts, pointers), executable path and name, CLI argument - not the maxima, the editor part, AmiBlitz3's own fields. from's views keep pointing into its .xtra: the base used with to needs from's .xtra (e.g. an .ab3 header updated from a .xtra).
- Parameters
-
| to | the settings to change |
| from | the settings to take from |