BB2 C port
API reference: Blitz libraries in C and the shared code
Loading...
Searching...
No Matches
xtra_int.h
Go to the documentation of this file.
1/*
2 * xtra_int.h - what xtra.c and xtra_ab3.c share inside shared/xtra (not
3 * for the users: they include xtra.h).
4 */
5#ifndef XTRA_INT_H
6#define XTRA_INT_H
7
8#include "xtra.h"
9
10/* sets err (may be NULL) and gives code */
11int xtra_fail(struct xtra_error *err, int code, int in, size_t offset, uint32_t line);
12
13/* 1 if the first line of buf[0..size) is "; XTRA" */
14int xtra_ab3_has_header(const uint8_t *buf, size_t size);
15
16/* AmiBlitz3's defaults for what its header can set (x initialised) */
17void xtra_ab3_defaults(struct xtra *x);
18
19/* reads the embedded header of buf[0..size) into x (initialised by
20 xtra_load): x->hdr, the views, the numbers; 0 or enum xtra_err */
21int xtra_ab3_read(struct xtra *x, const uint8_t *buf, size_t size, struct xtra_error *err);
22
23/* the next "Max NAME = N" line of the header h from *pos (before end) into
24 m, *pos behind it; 0 if there is none */
25int xtra_ab3_next_max(const uint8_t *h, uint32_t *pos, uint32_t end, struct xtra_max *m);
26
27#endif
ULONG x
Definition 2dlib.c:2491
UWORD size
Definition 2dlib.c:1170
struct TagItem end
Definition asllib.c:144
struct TagItem h
Definition asllib.c:193
static void line(WORD x1, WORD y1, WORD x2, WORD y2, ULONG c)
Definition blitzoslib.c:392
static UWORD buf
Definition rawkeylib.c:83
UBYTE code[4]
Definition ridisasmlib.c:375
static UWORD offset
Definition scrolllib.c:107
Where an error is: file (XTRA_IN_XTRA or XTRA_IN_HEADER = the source), byte offset (binary formats) o...
Definition xtra.h:285
One object maximum.
Definition xtra.h:165
The settings.
Definition xtra.h:239
int xtra_ab3_has_header(const uint8_t *buf, size_t size)
Definition xtra_ab3.c:387
void xtra_ab3_defaults(struct xtra *x)
Definition xtra_ab3.c:398
int xtra_ab3_read(struct xtra *x, const uint8_t *buf, size_t size, struct xtra_error *err)
Definition xtra_ab3.c:418
int xtra_fail(struct xtra_error *err, int code, int in, size_t offset, uint32_t line)
Definition xtra.c:86
int xtra_ab3_next_max(const uint8_t *h, uint32_t *pos, uint32_t end, struct xtra_max *m)
Definition xtra_ab3.c:453