--- freem/src/global_bltin.h 2025/04/11 16:23:18 1.12 +++ freem/src/global_bltin.h 2025/04/13 04:22:43 1.13 @@ -1,5 +1,5 @@ /* - * $Id: global_bltin.h,v 1.12 2025/04/11 16:23:18 snw Exp $ + * $Id: global_bltin.h,v 1.13 2025/04/13 04:22:43 snw Exp $ * built-in global handler header * * @@ -24,6 +24,9 @@ * along with FreeM. If not, see . * * $Log: global_bltin.h,v $ + * Revision 1.13 2025/04/13 04:22:43 snw + * Fix snprintf calls + * * Revision 1.12 2025/04/11 16:23:18 snw * Avoid re-reading the same block consecutively when possible * @@ -73,6 +76,45 @@ #define GBL_HDR_BADVERSION 3 #define GBL_HDR_BADBLOCKSIZE 4 +#define ROOT 0L + +/* end of line symbol in global module is 30, which is a code not */ +/* otherwise used in subscripts */ +#define g_EOL 30 + +#define EOL1 EOL + +/* numerics (('.'<<1)&037)==28 ; (('-'<<1)&037)==26; */ +#define POINT 28 +#define MINUS 26 + +/* ALPHA and OMEGA are dummy subscripts in $order processing */ +/* ALPHA sorts before all other subscripts */ +/* OMEGA sorts after all other subscripts */ +/* e.g. ("abc") -> "abc",OMEGA ; ("abc","") -> "abc",ALPHA */ +#define OMEGA 29 +#define ALPHA 31 + +/* length of blocks. status bytes defined as offset to blocklength */ +/* BLOCKLEN 1024 is defined in mpsdef0 include file */ +#define DATALIM (BLOCKLEN-11) +#define LLPTR (BLOCKLEN-10) +#define NRBLK LLPTR +#define COLLA (BLOCKLEN- 7) +#define RLPTR (BLOCKLEN- 6) +#define FREE RLPTR +#define BTYP (BLOCKLEN- 3) +#define OFFS (BLOCKLEN- 2) + +/* length of blockpointers in bytes */ +#define PLEN 3 + +#define EMPTY 0 +#define FBLK 1 +#define POINTER 2 +#define BOTTOM 6 +#define DATA 8 + typedef struct global_header { char magic[5]; /* FRMGL */