53#define XTRA_NSWITCH 14
56#define XTRA_RESNAME 64
57#define XTRA_PATHLEN 192
58#define XTRA_CLILEN 128
59#define XTRA_LABELLEN 32
60#define XTRA_FIXED_V0 982
61#define XTRA_FIXED_V1 1110
62#define XTRA_AB3_NSWITCH 15
63#define XTRA_AB3_FIXED 1112
88#define XTRA_WARN_ERRORS 0x0180
172#define XTRA_MAX_LIB 0x01
173#define XTRA_MAX_NAME 0x02
198#define XTRA_ED_CURSOR 0x01
199#define XTRA_ED_TOP 0x02
583 size_t *
len,
unsigned *skipped);
ULONG x
Definition 2dlib.c:2491
ULONG WORD UWORD UWORD border ULONG ULONG to
Definition 2dlib.c:2493
ULONG WORD UWORD UWORD border ULONG ULONG struct bb_bitmap *dst void UWORD n
Definition 2dlib.c:2498
ULONG WORD UWORD UWORD border ULONG from
Definition 2dlib.c:2493
ULONG len
Definition asllib.c:158
struct TagItem path
Definition asllib.c:188
static UBYTE * key
Definition blitzkeyslib.c:101
UWORD type
Definition editlib.c:263
static UWORD buf
Definition rawkeylib.c:83
UBYTE code[4]
Definition ridisasmlib.c:375
struct IntuiText it
Definition riintuilib.c:123
Definition rilvcallhooklib.c:108
Numbers only AmiBlitz3 has (LabelSearch: XTRA_F_LABEL_SEARCH).
Definition xtra.h:218
uint32_t label_position
Definition xtra.h:222
uint8_t header
Definition xtra.h:224
uint16_t label_case
Definition xtra.h:223
uint32_t builds
Definition xtra.h:221
uint8_t version[3]
Definition xtra.h:227
uint32_t unknown
Definition xtra.h:230
uint32_t seen
Definition xtra.h:219
uint8_t create_dbgfile
Definition xtra.h:226
uint16_t label_remark
Definition xtra.h:223
uint32_t stack
Definition xtra.h:220
uint8_t func_optimize
Definition xtra.h:225
uint16_t label_all
Definition xtra.h:223
uint32_t unknown_line
Definition xtra.h:231
The bases of the views: the .xtra as loaded and the kept source header (src[0..x->hdr) of xtra_load,...
Definition xtra.h:131
const uint8_t * xtra
Definition xtra.h:132
const uint8_t * header
Definition xtra.h:133
The editor part: not in a Blitz 2 .xtra; from a BB22 header or the AmiBlitz3 header.
Definition xtra.h:192
uint8_t flags
Definition xtra.h:193
uint32_t top
Definition xtra.h:196
uint32_t column
Definition xtra.h:195
uint32_t line
Definition xtra.h:194
Where an error is: file (XTRA_IN_XTRA or XTRA_IN_HEADER = the source), byte offset (binary formats) o...
Definition xtra.h:285
uint32_t line
Definition xtra.h:289
int in
Definition xtra.h:287
size_t offset
Definition xtra.h:288
int code
Definition xtra.h:286
An iterator over the maxima, one by one, in file order.
Definition xtra.h:491
uint32_t left
Definition xtra.h:495
const struct xtra_max * set
Definition xtra.h:494
const uint8_t * base
Definition xtra.h:493
const struct xtra * x
Definition xtra.h:492
uint32_t pos
Definition xtra.h:495
One object maximum.
Definition xtra.h:165
uint16_t lib
Definition xtra.h:168
uint16_t max
Definition xtra.h:169
const uint8_t * name
Definition xtra.h:166
uint8_t flags
Definition xtra.h:170
uint16_t namelen
Definition xtra.h:167
The maxima: the {lib, max} pairs of the .xtra (off: the first pair), the "Max NAME" lines of the head...
Definition xtra.h:181
uint32_t n
Definition xtra.h:184
const struct xtra_max * set
Definition xtra.h:182
uint8_t in
Definition xtra.h:185
uint32_t off
Definition xtra.h:183
A text: a view (in, off, len) or the caller's bytes (XTRA_IN_SET: set, len).
Definition xtra.h:152
uint16_t len
Definition xtra.h:155
uint32_t off
Definition xtra.h:154
const uint8_t * set
Definition xtra.h:153
uint8_t in
Definition xtra.h:156
The settings.
Definition xtra.h:239
uint32_t res_ptr[XTRA_NRES]
Definition xtra.h:249
uint8_t source
Definition xtra.h:241
uint8_t type
Definition xtra.h:240
struct xtra_editor editor
Definition xtra.h:253
uint8_t vers
Definition xtra.h:242
struct xtra_ab3 ab3
Definition xtra.h:254
uint16_t sw[XTRA_NSWITCH]
Definition xtra.h:247
uint32_t hdr
Definition xtra.h:244
struct xtra_text text[XTRA_F_COUNT]
Definition xtra.h:251
uint8_t icon
Definition xtra.h:243
uint32_t buf[XTRA_NBUFFER]
Definition xtra.h:248
struct xtra_maxima max
Definition xtra.h:252
xtra_mode
The mode a program is compiled in by blitz2-ab3 (xtra_mode).
Definition xtra.h:356
@ XTRA_MODE_BB2
Definition xtra.h:358
@ XTRA_MODE_AB3
Definition xtra.h:359
@ XTRA_MODE_DETECT
Definition xtra.h:357
#define XTRA_NRES
Definition xtra.h:55
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.
Definition xtra.c:543
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...
Definition xtra.c:507
void xtra_take_blitz2(struct xtra *to, const struct xtra *from)
Take what a Blitz 2 .xtra holds from from into to.
Definition xtra.c:281
size_t xtra_ab3_size(const struct xtra *x, const struct xtra_base *b)
The bytes xtra_write_ab3 writes.
Definition xtra_ab3.c:892
#define XTRA_NSWITCH
Definition xtra.h:53
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.
Definition xtra.c:228
xtra_type
The type of a source file (xtra_detect, xtra_load).
Definition xtra.h:97
@ XTRA_T_TED
Definition xtra.h:98
@ XTRA_T_TEXT
Definition xtra.h:105
@ XTRA_T_BB22
Definition xtra.h:100
@ XTRA_T_AB3
Definition xtra.h:102
@ XTRA_T_COUNT
Definition xtra.h:107
int xtra_next_max(struct xtra_iter *it, struct xtra_max *m)
The next maximum.
Definition xtra.c:253
const char * xtra_ab3_keyname(int key)
The name of an AmiBlitz3 key ("ExePath", ..., "Max").
Definition xtra_ab3.c:147
xtra_in
Where the bytes of a view are; also the file of an error.
Definition xtra.h:118
@ XTRA_IN_NONE
Definition xtra.h:119
@ XTRA_IN_SET
Definition xtra.h:123
@ XTRA_IN_XTRA
Definition xtra.h:120
@ XTRA_IN_HEADER
Definition xtra.h:121
xtra_ab3_key
Keys of the AmiBlitz3 header: bit (1 << key) in xtra_ab3.seen when the header has the key (docs/forma...
Definition xtra.h:203
@ XTRA_K_CURSORLINE
Definition xtra.h:209
@ XTRA_K_INTERRUPTCHECK
Definition xtra.h:208
@ XTRA_K_CURSORCOLUMN
Definition xtra.h:209
@ XTRA_K_LABELALL
Definition xtra.h:210
@ XTRA_K_OVERFLOWCHECK
Definition xtra.h:208
@ XTRA_K_VERSION
Definition xtra.h:206
@ XTRA_K_MAKESMALLEST
Definition xtra.h:205
@ XTRA_K_EXEPATH
Definition xtra.h:204
@ XTRA_K_RUNTIMEDEBUG
Definition xtra.h:207
@ XTRA_K_DEBUGINFO
Definition xtra.h:207
@ XTRA_K_LABELPOSITION
Definition xtra.h:211
@ XTRA_K_MAX
Definition xtra.h:211
@ XTRA_K_EXEFILE
Definition xtra.h:204
@ XTRA_K_STRINGBUFFER
Definition xtra.h:205
@ XTRA_K_LABELREMARK
Definition xtra.h:210
@ XTRA_K_LABELCASE
Definition xtra.h:211
@ XTRA_K_ASSEMBLERCHECK
Definition xtra.h:208
@ XTRA_K_STACKSIZE
Definition xtra.h:206
@ XTRA_K_CREATEDBGFILE
Definition xtra.h:207
@ XTRA_K_LABELSEARCH
Definition xtra.h:210
@ XTRA_K_FUNCOPTIMIZE
Definition xtra.h:205
@ XTRA_K_AUTORUN
Definition xtra.h:209
@ XTRA_K_NUMBEROFBUILDS
Definition xtra.h:206
@ XTRA_K_RESIDENTS
Definition xtra.h:204
@ XTRA_K_CLIARGS
Definition xtra.h:206
@ XTRA_K_CREATEICON
Definition xtra.h:204
@ XTRA_K_COUNT
Definition xtra.h:212
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.
Definition xtra.c:169
xtra_err
The error codes of the functions (XTRA_OK = 0: no error).
Definition xtra.h:260
@ XTRA_E_VERS
Definition xtra.h:264
@ XTRA_E_AB3_NAME
Definition xtra.h:275
@ XTRA_E_LONG
Definition xtra.h:272
@ XTRA_E_AB3_VERSION
Definition xtra.h:274
@ XTRA_E_SPACE
Definition xtra.h:266
@ XTRA_E_TEXT
Definition xtra.h:278
@ XTRA_E_UNTERMINATED
Definition xtra.h:265
@ XTRA_OK
Definition xtra.h:261
@ XTRA_E_SHORT
Definition xtra.h:262
@ XTRA_E_AB3_END
Definition xtra.h:269
@ XTRA_E_FIELD
Definition xtra.h:277
@ XTRA_E_TYPE
Definition xtra.h:276
@ XTRA_E_BB22
Definition xtra.h:267
@ XTRA_E_AB3_QUOTE
Definition xtra.h:271
@ XTRA_E_SIZE
Definition xtra.h:263
@ XTRA_E_AB3_LINE
Definition xtra.h:268
@ XTRA_E_BASE
Definition xtra.h:279
@ XTRA_E_AB3_NUMBER
Definition xtra.h:270
@ XTRA_E_COUNT
Definition xtra.h:280
@ XTRA_E_AB3_RESIDENTS
Definition xtra.h:273
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/AmiBlitz...
Definition xtra.c:362
xtra_source
Where the settings came from.
Definition xtra.h:111
@ XTRA_SRC_BLITZ2
Definition xtra.h:113
@ XTRA_SRC_AB3_TEXT
Definition xtra.h:114
@ XTRA_SRC_NONE
Definition xtra.h:112
int xtra_set_text(struct xtra *x, int field, const void *p, size_t len)
Set a text field to the caller's bytes.
Definition xtra.c:209
const char * xtra_strerror(int code)
The message of an error code (English, without position).
Definition xtra.c:104
#define XTRA_NBUFFER
Definition xtra.h:54
xtra_switch
The switch words in file order (offset 2 + 2 * index); each is the Flags word of the option gadget: X...
Definition xtra.h:69
@ XTRA_SW_ASSEMBLER_CHECK
Definition xtra.h:79
@ XTRA_SW_LONG_ARRAYS
Definition xtra.h:72
@ XTRA_SW_DEBUG_INFO
Definition xtra.h:76
@ XTRA_SW_WARNINGS
Definition xtra.h:81
@ XTRA_SW_DEFAULT_OVERFLOW
Definition xtra.h:85
@ XTRA_SW_QUOTED_MACROS
Definition xtra.h:74
@ XTRA_SW_MAKE_SMALLEST
Definition xtra.h:75
@ XTRA_SW_OVERFLOW_CHECK
Definition xtra.h:80
@ XTRA_SW_RUNTIME_ERRORS
Definition xtra.h:70
@ XTRA_SW_EXPAND_MACROS
Definition xtra.h:73
@ XTRA_SW_INTERRUPT_CHECK
Definition xtra.h:78
@ XTRA_SW_AUTO_RUN
Definition xtra.h:77
@ XTRA_SW_DEBUGGER
Definition xtra.h:71
@ XTRA_SW_DEFAULT_INTERRUPT
Definition xtra.h:84
void xtra_apply_vers0(struct xtra *x)
What blitz2's loadxtra does after reading a vers 0 file.
Definition xtra.c:159
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).
Definition xtra_ab3.c:868
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.
Definition xtra.c:475
int xtra_detect(const uint8_t *buf, size_t len, const char *path)
The type of a source.
Definition xtra.c:302
const uint8_t * xtra_get_text(const struct xtra *x, const struct xtra_base *b, int field, size_t *len)
A text field.
Definition xtra.c:181
xtra_field
The text fields (xtra_get_text, xtra_set_text).
Definition xtra.h:137
@ XTRA_F_LABEL_SEARCH
Definition xtra.h:141
@ XTRA_F_EXE_NAME
Definition xtra.h:139
@ XTRA_F_EXE_PATH
Definition xtra.h:138
@ XTRA_F_COUNT
Definition xtra.h:144
@ XTRA_F_CLI
Definition xtra.h:140
@ XTRA_F_RES0
Definition xtra.h:142
void xtra_init(struct xtra *x)
Initialise settings with the defaults.
Definition xtra.c:130
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).
Definition xtra.c:337
int xtra_has_companion(int type)
Whether the settings of a source of this type are in NAME.xtra.
Definition xtra.c:332
xtra_buffer
The buffer sizes in file order (offset 30 + 4 * index).
Definition xtra.h:91
@ XTRA_BUF_MACRO
Definition xtra.h:93
@ XTRA_BUF_OBJECT
Definition xtra.h:92
@ XTRA_BUF_SYSTEM
Definition xtra.h:92
@ XTRA_BUF_STRING
Definition xtra.h:93
@ XTRA_BUF_DATA
Definition xtra.h:92
@ XTRA_BUF_LIBS
Definition xtra.h:92
void xtra_max_begin(struct xtra_iter *it, const struct xtra *x, const struct xtra_base *b)
Start iterating the maxima of x.
Definition xtra.c:236