a68g-defines.h

You can download the current version of Algol 68 Genie and its documentation here.

   1 //! @file a68g-defines.h
   2 //! @author J. Marcel van der Veer
   3 //!
   4 //! @section Copyright
   5 //!
   6 //! This file is part of Algol68G - an Algol 68 compiler-interpreter.
   7 //! Copyright 2001-2023 J. Marcel van der Veer .
   8 //!
   9 //! @section License
  10 //!
  11 //! This program is free software; you can redistribute it and/or modify it 
  12 //! under the terms of the GNU General Public License as published by the 
  13 //! Free Software Foundation; either version 3 of the License, or 
  14 //! (at your option) any later version.
  15 //!
  16 //! This program is distributed in the hope that it will be useful, but 
  17 //! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
  18 //! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 
  19 //! more details. You should have received a copy of the GNU General Public 
  20 //! License along with this program. If not, see .
  21 
  22 #if !defined (__A68G_DEFINES_H__)
  23 #define __A68G_DEFINES_H__
  24 
  25 // Constants
  26 
  27 #define KILOBYTE ((unt) 1024)
  28 #define MEGABYTE (KILOBYTE * KILOBYTE)
  29 #define GIGABYTE (KILOBYTE * MEGABYTE)
  30 
  31 #define A68_TRUE ((BOOL_T) 1)
  32 #define A68_FALSE ((BOOL_T) 0)
  33 
  34 #define BACKSLASH_CHAR '\\'
  35 #define BLANK_CHAR ' '
  36 #define CR_CHAR '\r'
  37 #define EOF_CHAR (EOF)
  38 #define ERROR_CHAR '*'
  39 #define ESCAPE_CHAR '\033'
  40 #define EXPONENT_CHAR 'e'
  41 #define FLIP_CHAR 'T'
  42 #define FLOP_CHAR 'F'
  43 #define FORMFEED_CHAR '\f'
  44 #define NEWLINE_CHAR '\n'
  45 #define NULL_CHAR '\0'
  46 #define POINT_CHAR '.'
  47 #define QUOTE_CHAR '"'
  48 #define RADIX_CHAR 'r'
  49 #define TAB_CHAR '\t'
  50 
  51 // File extensions
  52 #define BINARY_EXTENSION ".o"
  53 #define PLUGIN_EXTENSION ".so"
  54 #define LISTING_EXTENSION ".l"
  55 #define OBJECT_EXTENSION ".c"
  56 #define PRETTY_EXTENSION ".f"
  57 #define SCRIPT_EXTENSION ""
  58 
  59 // Static options for GCC.
  60 // 
  61 // -fno-stack-protector is needed for Ubuntu etcetera that enforce -fstack-protector-strong 
  62 // which may give an undefined reference to `__stack_chk_fail_local'.
  63 // 
  64 // -Wno-parentheses-equality is needed for OpenBSD.  
  65 //
  66 
  67 #define A68_GCC_OPTIONS "-DA68_OPTIMISE -ggdb -fno-stack-protector -Wno-parentheses-equality"
  68 
  69 // Formats
  70 #define DIGIT_BLANK ((unt) 0x2)
  71 #define DIGIT_NORMAL ((unt) 0x1)
  72 #define INSERTION_BLANK ((unt) 0x20)
  73 #define INSERTION_NORMAL ((unt) 0x10)
  74 
  75 #define MAX_RESTART 256
  76 
  77 #define A68_DIR ".a68g"
  78 #define A68_HISTORY_FILE ".a68g.edit.hist"
  79 #define A68_NO_FILENO ((FILE_T) -1)
  80 #define A68_PROTECTION (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)  // -rw-r--r--
  81 #define A68_READ_ACCESS (O_RDONLY)
  82 #define A68_WRITE_ACCESS (O_WRONLY | O_CREAT | O_TRUNC)
  83 #define BUFFER_SIZE (KILOBYTE)
  84 #define DEFAULT_WIDTH (-1)
  85 
  86 #define EMBEDDED_FORMAT A68_TRUE
  87 #define EVEN(k) ((k) % 2 == 0)
  88 #define HIDDEN_TEMP_FILE_NAME ".a68g.tmp"
  89 #define ITEM_NOT_USED (-1)
  90 #define MAX_ERRORS 5
  91 #define MAX_PRIORITY 9
  92 #define MAX_TERM_HEIGTH 24
  93 #define MAX_TERM_WIDTH (BUFFER_SIZE / 2)
  94 #define MIN_MEM_SIZE (128 * KILOBYTE)
  95 #define MOID_ERROR_WIDTH 80
  96 #define MOID_WIDTH 80
  97 #define MONADS "%^&+-~!?"
  98 #define NEWLINE_STRING "\n"
  99 #define NOMADS "> 100 #define NOT_EMBEDDED_FORMAT A68_FALSE
 101 #define NOT_PRINTED 1
 102 #define OVER_2G(n) ((REAL_T) (n) > (REAL_T) (2 * GIGABYTE)) 
 103 #define PRIMAL_SCOPE 0
 104 #define SKIP_PATTERN A68_FALSE
 105 #define SMALL_BUFFER_SIZE 128
 106 #define SNPRINTF_SIZE ((size_t) (BUFFER_SIZE - 1))
 107 #define TRANSPUT_BUFFER_SIZE BUFFER_SIZE
 108 #define WANT_PATTERN A68_TRUE
 109 
 110 // Macros
 111 
 112 #define _SKIP_ { (void) 0;}
 113 
 114 #define MAX(u, v) (((u) > (v) ? (u) : (v)))
 115 #define MAXIMISE(u, v) ((u) = MAX (u, v))
 116 
 117 #define MIN(u, v) (((u) < (v) ? (u) : (v)))
 118 #define MINIMISE(u, v) ((u) = MIN (u, v))
 119 
 120 #define COPY(d, s, n) {\
 121   int _m_k = (n); BYTE_T *_m_u = (BYTE_T *) (d), *_m_v = (BYTE_T *) (s);\
 122   while (_m_k--) {*_m_u++ = *_m_v++;}}
 123 
 124 #define COPY_ALIGNED(d, s, n) {\
 125   int _m_k = (n); A68_ALIGN_T *_m_u = (A68_ALIGN_T *) (d), *_m_v = (A68_ALIGN_T *) (s);\
 126   while (_m_k > 0) {*_m_u++ = *_m_v++; _m_k -= A68_ALIGNMENT;}}
 127 
 128 #define MOVE(d, s, n) {\
 129   int _m_k = (int) (n); BYTE_T *_m_d = (BYTE_T *) (d), *_m_s = (BYTE_T *) (s);\
 130   if (_m_s < _m_d) {\
 131     _m_d += _m_k; _m_s += _m_k;\
 132     while (_m_k--) {*(--_m_d) = *(--_m_s);}\
 133   } else {\
 134     while (_m_k--) {*(_m_d++) = *(_m_s++);}\
 135   }}
 136 
 137 #define FILL(d, s, n) {\
 138    int _m_k = (n); BYTE_T *_m_u = (BYTE_T *) (d), _m_v = (BYTE_T) (s);\
 139    while (_m_k--) {*_m_u++ = _m_v;}}
 140 
 141 #define FILL_ALIGNED(d, s, n) {\
 142    int _m_k = (n); A68_ALIGN_T *_m_u = (A68_ALIGN_T *) (d), _m_v = (A68_ALIGN_T) (s);\
 143    while (_m_k > 0) {*_m_u++ = _m_v; _m_k -= A68_ALIGNMENT;}}
 144 
 145 #define ABEND(p, reason, info) {\
 146   if (p) {\
 147     abend ((char *) reason, (char *) info, __FILE__, __LINE__);\
 148   }}
 149 
 150 #if defined (HAVE_CURSES)
 151 #define ASSERT(f) {\
 152   if (!(f)) {\
 153     if (A68 (curses_mode) == A68_TRUE) {\
 154       (void) attrset (A_NORMAL);\
 155       (void) endwin ();\
 156       A68 (curses_mode) = A68_FALSE;\
 157     }\
 158     ABEND (A68_TRUE, ERROR_ASSERTION, __func__)\
 159   }}
 160 #else
 161 #define ASSERT(f) {\
 162   ABEND((!(f)), ERROR_ASSERTION, __func__)\
 163   }
 164 #endif
 165 
 166 // Some macros to overcome the ambiguity in having signed or unt char 
 167 // on various systems. PDP-11s and IBM 370s are still haunting us with this.
 168 
 169 #define IS_ALNUM(c) isalnum ((unt char) (c))
 170 #define IS_ALPHA(c) isalpha ((unt char) (c))
 171 #define IS_CNTRL(c) iscntrl ((unt char) (c))
 172 #define IS_DIGIT(c) isdigit ((unt char) (c))
 173 #define IS_GRAPH(c) isgraph ((unt char) (c))
 174 #define IS_LOWER(c) islower ((unt char) (c))
 175 #define IS_PRINT(c) isprint ((unt char) (c))
 176 #define IS_PUNCT(c) ispunct ((unt char) (c))
 177 #define IS_SPACE(c) isspace ((unt char) (c))
 178 #define IS_UPPER(c) isupper ((unt char) (c))
 179 #define IS_XDIGIT(c) isxdigit ((unt char) (c))
 180 #define TO_LOWER(c) (char) tolower ((unt char) (c))
 181 #define TO_UCHAR(c) ((c) >= 0 ? (int) (c) : (int) (UCHAR_MAX + (int) (c) + 1))
 182 #define TO_UPPER(c) (char) toupper ((unt char) (c))
 183 
 184 // Macro's for fat A68 pointers
 185 
 186 #define ADDRESS(z) (&(((IS_IN_HEAP (z) || IS_IN_COMMON (z)) ? REF_POINTER (z) : A68_STACK)[REF_OFFSET (z)]))
 187 #define ARRAY_ADDRESS(z) (&(REF_POINTER (z)[REF_OFFSET (z)]))
 188 #define DEREF(mode, expr) ((mode *) ADDRESS (expr))
 189 #define FILE_DEREF(p) DEREF (A68_FILE, (p))
 190 #define HEAP_ADDRESS(n) ((BYTE_T *) & (A68_HEAP[n]))
 191 #define IS_IN_FRAME(z) (STATUS (z) & IN_FRAME_MASK)
 192 #define IS_IN_HEAP(z) (STATUS (z) & IN_HEAP_MASK)
 193 #define IS_IN_COMMON(z) (STATUS (z) & IN_COMMON_MASK)
 194 #define IS_IN_STACK(z) (STATUS (z) & IN_STACK_MASK)
 195 #define IS_NIL(p) ((BOOL_T) ((STATUS (&(p)) & NIL_MASK) != 0))
 196 #define LOCAL_ADDRESS(z) (& A68_STACK[REF_OFFSET (z)])
 197 #define REF_HANDLE(z) (HANDLE (z))
 198 #define REF_OFFSET(z) (OFFSET (z))
 199 #define REF_POINTER(z) (POINTER (REF_HANDLE (z)))
 200 #define REF_SCOPE(z) (SCOPE (z))
 201 #define STACK_ADDRESS(n) ((BYTE_T *) &(A68_STACK[(n)]))
 202 #define STACK_OFFSET(n) (STACK_ADDRESS (A68_SP + (int) (n)))
 203 #define STACK_TOP (STACK_ADDRESS (A68_SP))
 204 
 205 // Miscellaneous macros
 206 
 207 #define IN_PRELUDE(p) (LINE_NUMBER (p) <= 0)
 208 #define EOL(c) ((c) == NEWLINE_CHAR || (c) == NULL_CHAR)
 209 
 210 #define SIZE_ALIGNED(p) ((int) A68_ALIGN (sizeof (p)))
 211 #define A68_REF_SIZE (SIZE_ALIGNED (A68_REF))
 212 #define A68_UNION_SIZE (SIZE_ALIGNED (A68_UNION))
 213 
 214 #define A68_SOUND_BYTES(s) ((int) (BITS_PER_SAMPLE (s)) / 8 + (int) (BITS_PER_SAMPLE (s) % 8 == 0 ? 0 : 1))
 215 #define A68_SOUND_DATA_SIZE(s) ((int) (NUM_SAMPLES (s)) * (int) (NUM_CHANNELS (s)) * (int) (A68_SOUND_BYTES (s)))
 216 #define ABS(n) ((n) >= 0 ? (n) : -(n))
 217 #define BACKWARD(p) (p = PREVIOUS (p))
 218 #define BITS_WIDTH ((int) (1 + ceil (log ((REAL_T) A68_MAX_INT) / log ((REAL_T) 2))))
 219 #define DEFLEX(p) (DEFLEXED (p) != NO_MOID ? DEFLEXED(p) : (p))
 220 #define FORWARD(p) ((p) = NEXT (p))
 221 #define INT_WIDTH ((int) (1 + floor (log ((REAL_T) A68_MAX_INT) / log ((REAL_T) 10))))
 222 #define LONG_INT_WIDTH (1 + LONG_WIDTH)
 223 #define PM(m) (moid_to_string (m, 132, NO_NODE))
 224 #define SIGN(n) ((n) == 0 ? 0 : ((n) > 0 ? 1 : -1))
 225 #define STATUS_CLEAR(p, q) {STATUS (p) &= (~(q));}
 226 #define STATUS_SET(p, q) {STATUS (p) |= (q);}
 227 #define STATUS_TEST(p, q) ((STATUS (p) & (q)) != (unt) 0)
 228 #define WIS(p) where_in_source (STDOUT_FILENO, (p))
 229 #define WRITE(f, s) io_write_string ((f), (s));
 230 #define WRITELN(f, s) {WRITE ((f), "\n"); WRITE ((f), (s));}
 231 
 232 // Access macros
 233 
 234 #define A(p) ((p)->a)
 235 #define A68_STANDENV_PROC(p) ((p)->a68_standenv_proc)
 236 #define ACTION(p) ((p)->action)
 237 #define ACTIVE(p) ((p)->active)
 238 #define ADDR(p) ((p)->addr)
 239 #define ANNOTATION(p) ((p)->annotation)
 240 #define ANONYMOUS(p) ((p)->anonymous)
 241 #define APPLICATIONS(p) ((p)->applications)
 242 #define AP_INCREMENT(p) ((p)->ap_increment)
 243 #define ARGSIZE(p) ((p)->argsize)
 244 #define ARRAY(p) ((p)->array)
 245 #define ATTRIBUTE(p) ((p)->attribute)
 246 #define B(p) ((p)->b)
 247 #define BEGIN(p) ((p)->begin)
 248 #define BIN(p) ((p)->bin)
 249 #define BITS_PER_SAMPLE(p) ((p)->bits_per_sample)
 250 #define BLUE(p) ((p)->blue)
 251 #define BODY(p) ((p)->body)
 252 #define BSTATE(p) ((p)->bstate)
 253 #define BYTES(p) ((p)->bytes)
 254 #define CAST(p) ((p)->cast)
 255 #define CAT(p) ((p)->cat)
 256 #define CHANNEL(p) ((p)->channel)
 257 #define CHAR_IN_LINE(p) ((p)->char_in_line)
 258 #define CHAR_MOOD(p) ((p)->char_mood)
 259 #define CMD(p) ((p)->cmd)
 260 #define CMD_ROW(p) ((p)->cmd_row)
 261 #define CODE(p) ((p)->code)
 262 #define CODEX(p) ((p)->codex)
 263 #define COLLECT(p) ((p)->collect)
 264 #define COMPILED(p) ((p)->compiled)
 265 #define COMPILE_NAME(p) ((p)->compile_name)
 266 #define COMPILE_NODE(p) ((p)->compile_node)
 267 #define COMPRESS(p) ((p)->compress)
 268 #define CONNECTION(p) ((p)->connection)
 269 #define CONSTANT(p) ((p)->constant)
 270 #define COUNT(p) ((p)->count)
 271 #define CROSS_REFERENCE_SAFE(p) ((p)->cross_reference_safe)
 272 #define CUR_PTR(p) ((p)->cur_ptr)
 273 #define DATA(p) ((p)->data)
 274 #define DATA_SIZE(p) ((p)->data_size)
 275 #define DATE(p) ((p)->date)
 276 #define DEF(p) ((p)->def)
 277 #define DEFLEXED(p) ((p)->deflexed_mode)
 278 #define DERIVATE(p) ((p)->derivate)
 279 #define DEVICE(p) ((p)->device)
 280 #define DEVICE_HANDLE(p) ((p)->device_handle)
 281 #define DEVICE_MADE(p) ((p)->device_made)
 282 #define DEVICE_OPENED(p) ((p)->device_opened)
 283 #define DIAGNOSTICS(p) ((p)->diagnostics)
 284 #define DIGITS(p) ((p)->digits)
 285 #define DIGITSC(p) ((p)->digitsc)
 286 #define DIM(p) ((p)->dim)
 287 #define DISPLAY(p) ((p)->display)
 288 #define DRAW(p) ((p)->draw)
 289 #define DRAW_MOOD(p) ((p)->draw_mood)
 290 #define DUMP(p) ((p)->dump)
 291 #define DYNAMIC_LINK(p) ((p)->dynamic_link)
 292 #define DYNAMIC_SCOPE(p) ((p)->dynamic_scope)
 293 #define D_NAME(p) ((p)->d_name)
 294 #define ELEM_SIZE(p) ((p)->elem_size)
 295 #define END(p) ((p)->end)
 296 #define END_OF_FILE(p) ((p)->end_of_file)
 297 #define ENVIRON(p) ((p)->fp_environ)
 298 #define EQUIVALENT(p) ((p)->equivalent_mode)
 299 #define EQUIVALENT_MODE(p) ((p)->equivalent_mode)
 300 #define ERROR_COUNT(p) ((p)->error_count)
 301 #define RENDEZ_VOUS(p) ((p)->rendez_vous)
 302 #define EXPR(p) ((p)->expr)
 303 #define F(p) ((p)->f)
 304 #define FACTOR(p) ((p)->factor)
 305 #define FD(p) ((p)->fd)
 306 #define FIELD_OFFSET(p) ((p)->field_offset)
 307 #define FILENAME(p) ((p)->filename)
 308 #define FILES(p) ((p)->files)
 309 #define FILE_BINARY_NAME(p) (FILES (p).binary.name)
 310 #define FILE_BINARY_OPENED(p) (FILES (p).binary.opened)
 311 #define FILE_BINARY_WRITEMOOD(p) (FILES (p).binary.writemood)
 312 #define FILE_DIAGS_FD(p) (FILES (p).diags.fd)
 313 #define FILE_DIAGS_NAME(p) (FILES (p).diags.name)
 314 #define FILE_DIAGS_OPENED(p) (FILES (p).diags.opened)
 315 #define FILE_DIAGS_WRITEMOOD(p) (FILES (p).diags.writemood)
 316 #define FILE_END_MENDED(p) ((p)->file_end_mended)
 317 #define FILE_ENTRY(p) ((p)->file_entry)
 318 #define FILE_GENERIC_NAME(p) (FILES (p).generic_name)
 319 #define FILE_INITIAL_NAME(p) (FILES (p).initial_name)
 320 #define FILE_PLUGIN_NAME(p) (FILES (p).plugin.name)
 321 #define FILE_PLUGIN_OPENED(p) (FILES (p).plugin.opened)
 322 #define FILE_PLUGIN_WRITEMOOD(p) (FILES (p).plugin.writemood)
 323 #define FILE_LISTING_FD(p) (FILES (p).listing.fd)
 324 #define FILE_LISTING_NAME(p) (FILES (p).listing.name)
 325 #define FILE_LISTING_OPENED(p) (FILES (p).listing.opened)
 326 #define FILE_LISTING_WRITEMOOD(p) (FILES (p).listing.writemood)
 327 #define FILE_OBJECT_FD(p) (FILES (p).object.fd)
 328 #define FILE_OBJECT_NAME(p) (FILES (p).object.name)
 329 #define FILE_OBJECT_OPENED(p) (FILES (p).object.opened)
 330 #define FILE_OBJECT_WRITEMOOD(p) (FILES (p).object.writemood)
 331 #define FILE_PATH(p) (FILES (p).path)
 332 #define FILE_PRETTY_FD(p) (FILES (p).pretty.fd)
 333 #define FILE_PRETTY_NAME(p) (FILES (p).pretty.name)
 334 #define FILE_PRETTY_OPENED(p) (FILES (p).pretty.opened)
 335 #define FILE_PRETTY_WRITEMOOD(p) (FILES (p).pretty.writemood)
 336 #define FILE_SCRIPT_NAME(p) (FILES (p).script.name)
 337 #define FILE_SCRIPT_OPENED(p) (FILES (p).script.opened)
 338 #define FILE_SCRIPT_WRITEMOOD(p) (FILES (p).script.writemood)
 339 #define FILE_SOURCE_FD(p) (FILES (p).source.fd)
 340 #define FILE_SOURCE_NAME(p) (FILES (p).source.name)
 341 #define FILE_SOURCE_OPENED(p) (FILES (p).source.opened)
 342 #define FILE_SOURCE_WRITEMOOD(p) (FILES (p).source.writemood)
 343 #define FIND(p) ((p)->find)
 344 #define FORMAT(p) ((p)->format)
 345 #define FORMAT_END_MENDED(p) ((p)->format_end_mended)
 346 #define FORMAT_ERROR_MENDED(p) ((p)->format_error_mended)
 347 #define FRAME(p) ((p)->frame)
 348 #define FRAME_LEVEL(p) ((p)->frame_level)
 349 #define FRAME_NO(p) ((p)->frame_no)
 350 #define FRAME_POINTER(p) ((p)->frame_pointer)
 351 #define FUNCTION(p) ((p)->function)
 352 #define G(p) ((p)->g)
 353 #define GINFO(p) ((p)->genie)
 354 #define GET(p) ((p)->get)
 355 #define GLOBAL_PROP(p) ((p)->global_prop)
 356 #define GPARENT(p) (PARENT (GINFO (p)))
 357 #define GREEN(p) ((p)->green)
 358 #define H(p) ((p)->h)
 359 #define HANDLE(p) ((p)->handle)
 360 #define HAS_ROWS(p) ((p)->has_rows)
 361 #define HEAP(p) ((p)->heap)
 362 #define HEAP_POINTER(p) ((p)->heap_pointer)
 363 #define H_ADDR(p) ((p)->h_addr)
 364 #define H_LENGTH(p) ((p)->h_length)
 365 #define ID(p) ((p)->id)
 366 #define IDENTIFICATION(p) ((p)->identification)
 367 #define IDENTIFIERS(p) ((p)->identifiers)
 368 #define IDF(p) ((p)->idf)
 369 #define IM(z) (VALUE (&(z)[1]))
 370 #define IN(p) ((p)->in)
 371 #define INDEX(p) ((p)->index)
 372 #define INDICANTS(p) ((p)->indicants)
 373 #define INFO(p) ((p)->info)
 374 #define INITIALISE_ANON(p) ((p)->initialise_anon)
 375 #define INITIALISE_FRAME(p) ((p)->initialise_frame)
 376 #define INI_PTR(p) ((p)->ini_ptr)
 377 #define INS_MODE(p) ((p)->ins_mode)
 378 #define IN_CMD(p) ((p)->in_cmd)
 379 #define IN_FORBIDDEN(p) ((p)->in_forbidden)
 380 #define IN_PREFIX(p) ((p)->in_prefix)
 381 #define IN_PROC(p) ((p)->in_proc)
 382 #define IN_TEXT(p) ((p)->in_text)
 383 #define IS_COMPILED(p) ((p)->is_compiled)
 384 #define IS_OPEN(p) ((p)->is_open)
 385 #define IS_TMP(p) ((p)->is_tmp)
 386 #define JUMP_STAT(p) ((p)->jump_stat)
 387 #define JUMP_TO(p) ((p)->jump_to)
 388 #define K(q) ((q)->k)
 389 #define LABELS(p) ((p)->labels)
 390 #define LAST(p) ((p)->last)
 391 #define LAST_LINE(p) ((p)->last_line)
 392 #define LESS(p) ((p)->less)
 393 #define LEVEL(p) ((p)->level)
 394 #define LEX_LEVEL(p) (LEVEL (TABLE (p)))
 395 #define LINBUF(p) ((p)->linbuf)
 396 #define LINE(p) ((p)->line)
 397 #define LINE_APPLIED(p) ((p)->line_applied)
 398 #define LINE_DEFINED(p) ((p)->line_defined)
 399 #define LINE_END_MENDED(p) ((p)->line_end_mended)
 400 #define LINE_NUMBER(p) (NUMBER (LINE (INFO (p))))
 401 #define LINSIZ(p) ((p)->linsiz)
 402 #define LIST(p) ((p)->list)
 403 #define ln(x) (log (x))
 404 #define LOCALE(p) ((p)->locale)
 405 #define LOC_ASSIGNED(p) ((p)->loc_assigned)
 406 #define LOWER_BOUND(p) ((p)->lower_bound)
 407 #define LWB(p) ((p)->lower_bound)
 408 #define MARKER(p) ((p)->marker)
 409 #define MATCH(p) ((p)->match)
 410 #define MODIFIED(p) ((p)->modified)
 411 #define MOID(p) ((p)->type)
 412 #define MORE(p) ((p)->more)
 413 #define MSGS(p) ((p)->msgs)
 414 #define MULTIPLE(p) ((p)->multiple_mode)
 415 #define MULTIPLE_MODE(p) ((p)->multiple_mode)
 416 #define M_EO(p) ((p)->m_eo)
 417 #define M_MATCH(p) ((p)->match)
 418 #define M_SO(p) ((p)->m_so)
 419 #define NAME(p) ((p)->name)
 420 #define NEED_DNS(p) ((p)->need_dns)
 421 #define NEGATE(p) ((p)->negate)
 422 #define NEST(p) ((p)->nest)
 423 #define NEW_FILE(p) ((p)->new_file)
 424 #define NEXT(p) ((p)->next)
 425 #define NEXT_NEXT(p) (NEXT (NEXT (p)))
 426 #define NEXT_NEXT_NEXT(p) (NEXT (NEXT_NEXT (p)))
 427 #define NEXT_SUB(p) (NEXT (SUB (p)))
 428 #define NF(p) ((p)->nf)
 429 #define NODE(p) ((p)->node)
 430 #define NODE_DEFINED(p) ((p)->node_defined)
 431 #define NODE_PACK(p) ((p)->pack)
 432 #define NON_LOCAL(p) ((p)->non_local)
 433 #define NCHAR_IN_LINE(p) (CHAR_IN_LINE (INFO (p)))
 434 #define NPRAGMENT(p) (PRAGMENT (INFO (p)))
 435 #define NPRAGMENT_TYPE(p) (PRAGMENT_TYPE (INFO (p)))
 436 #define NSYMBOL(p) (SYMBOL (INFO (p)))
 437 #define NUM(p) ((p)->num)
 438 #define NUMBER(p) ((p)->number)
 439 #define NUM_CHANNELS(p) ((p)->num_channels)
 440 #define NUM_MATCH(p) ((p)->num_match)
 441 #define NUM_SAMPLES(p) ((p)->num_samples)
 442 #define OFFSET(p) ((p)->offset)
 443 #define OPENED(p) ((p)->opened)
 444 #define OPEN_ERROR_MENDED(p) ((p)->open_error_mended)
 445 #define OPEN_EXCLUSIVE(p) ((p)->open_exclusive)
 446 #define OPER(p) ((p)->oper)
 447 #define OPERATORS(p) ((p)->operators)
 448 #define OPTIONS(p) ((p)->options)
 449 #define OPTION_BACKTRACE(p) (OPTIONS (p).backtrace)
 450 #define OPTION_BRACKETS(p) (OPTIONS (p).brackets)
 451 #define OPTION_CHECK_ONLY(p) (OPTIONS (p).check_only)
 452 #define OPTION_CLOCK(p) (OPTIONS (p).clock)
 453 #define OPTION_COMPILE(p) (OPTIONS (p).compile)
 454 #define OPTION_COMPILE_CHECK(p) (OPTIONS (p).compile_check)
 455 #define OPTION_CROSS_REFERENCE(p) (OPTIONS (p).cross_reference)
 456 #define OPTION_DEBUG(p) (OPTIONS (p).debug)
 457 #define OPTION_FOLD(p) (OPTIONS (p).fold)
 458 #define OPTION_INDENT(p) (OPTIONS (p).indent)
 459 #define OPTION_KEEP(p) (OPTIONS (p).keep)
 460 #define OPTION_LICENSE(p) (OPTIONS (p).license)
 461 #define OPTION_LIST(p) (OPTIONS (p).list)
 462 #define OPTION_LOCAL(p) (OPTIONS (p).local)
 463 #define OPTION_MOID_LISTING(p) (OPTIONS (p).moid_listing)
 464 #define OPTION_NODEMASK(p) (OPTIONS (p).nodemask)
 465 #define OPTION_NO_WARNINGS(p) (OPTIONS (p).no_warnings)
 466 #define OPTION_OBJECT_LISTING(p) (OPTIONS (p).object_listing)
 467 #define OPTION_OPT_LEVEL(p) (OPTIONS (p).opt_level)
 468 #define OPTION_PORTCHECK(p) (OPTIONS (p).portcheck)
 469 #define OPTION_PRAGMAT_SEMA(p) (OPTIONS (p).pragmat_sema)
 470 #define OPTION_PRETTY(p) (OPTIONS (p).pretty)
 471 #define OPTION_QUIET(p) (OPTIONS (p).quiet)
 472 #define OPTION_REDUCTIONS(p) (OPTIONS (p).reductions)
 473 #define OPTION_REGRESSION_TEST(p) (OPTIONS (p).regression_test)
 474 #define OPTION_RERUN(p) (OPTIONS (p).rerun)
 475 #define OPTION_RUN(p) (OPTIONS (p).run)
 476 #define OPTION_RUN_SCRIPT(p) (OPTIONS (p).run_script)
 477 #define OPTION_SOURCE_LISTING(p) (OPTIONS (p).source_listing)
 478 #define OPTION_STANDARD_PRELUDE_LISTING(p) (OPTIONS (p).standard_prelude_listing)
 479 #define OPTION_STATISTICS_LISTING(p) (OPTIONS (p).statistics_listing)
 480 #define OPTION_STRICT(p) (OPTIONS (p).strict)
 481 #define OPTION_STROPPING(p) (OPTIONS (p).stropping)
 482 #define OPTION_TIME_LIMIT(p) (OPTIONS (p).time_limit)
 483 #define OPTION_TRACE(p) (OPTIONS (p).trace)
 484 #define OPTION_TREE_LISTING(p) (OPTIONS (p).tree_listing)
 485 #define OPTION_UNUSED(p) (OPTIONS (p).unused)
 486 #define OPTION_VERBOSE(p) (OPTIONS (p).verbose)
 487 #define OPTION_VERSION(p) (OPTIONS (p).version)
 488 #define OUT(p) ((p)->out)
 489 #define OUTER(p) ((p)->outer)
 490 #define P(q) ((q)->p)
 491 #define PACK(p) ((p)->pack)
 492 #define PAGE_END_MENDED(p) ((p)->page_end_mended)
 493 #define A68_PAGE_SIZE(p) ((p)->page_size)
 494 #define PARAMETERS(p) ((p)->parameters)
 495 #define PARAMETER_LEVEL(p) ((p)->parameter_level)
 496 #define GSL_PARAMS(p) ((p)->params)
 497 #define PARENT(p) ((p)->parent)
 498 #define PARTIAL_LOCALE(p) ((p)->partial_locale)
 499 #define PARTIAL_PROC(p) ((p)->partial_proc)
 500 #define PATTERN(p) ((p)->pattern)
 501 #define PERM(p) ((p)->perm)
 502 #define PERMS(p) ((p)->perms)
 503 #define IDF_ROW(p) ((p)->idf_row)
 504 #define PHASE(p) ((p)->phase)
 505 #define PLOTTER(p) ((p)->plotter)
 506 #define PLOTTER_PARAMS(p) ((p)->plotter_params)
 507 #define POINTER(p) ((p)->pointer)
 508 #define PORTABLE(p) ((p)->portable)
 509 #define POS(p) ((p)->pos)
 510 #define PRAGMENT(p) ((p)->pragment)
 511 #define PRAGMENT_TYPE(p) ((p)->pragment_type)
 512 #define PRECMD(p) ((p)->precmd)
 513 #define PREVIOUS(p) ((p)->previous)
 514 #define PRINT_STATUS(p) ((p)->print_status)
 515 #define PRIO(p) ((p)->priority)
 516 #define PROCEDURE(p) ((p)->procedure)
 517 #define PROCEDURE_LEVEL(p) ((p)->procedure_level)
 518 #define PROCESSED(p) ((p)->processed)
 519 #define PROC_FRAME(p) ((p)->proc_frame)
 520 #define PROC_OPS(p) ((p)->proc_ops)
 521 #define GPROP(p) (GINFO (p)->propagator)
 522 #define PROP(p) ((p)->propagator)
 523 #define PS(p) ((p)->ps)
 524 #define PUT(p) ((p)->put)
 525 #define P_PROTO(p) ((p)->p_proto)
 526 #define R(p) ((p)->r)
 527 #define RE(z) (VALUE (&(z)[0]))
 528 #define READ_MOOD(p) ((p)->read_mood)
 529 #define RED(p) ((p)->red)
 530 #define REPL(p) ((p)->repl)
 531 #define RESERVED(p) ((p)->reserved)
 532 #define RESET(p) ((p)->reset)
 533 #define RESULT(p) ((p)->result)
 534 #define RE_NSUB(p) ((p)->re_nsub)
 535 #define RLIM_CUR(p) ((p)->rlim_cur)
 536 #define RLIM_MAX(p) ((p)->rlim_max)
 537 #define RM_EO(p) ((p)->rm_eo)
 538 #define RM_SO(p) ((p)->rm_so)
 539 #define ROWED(p) ((p)->rowed)
 540 #define S(p) ((p)->s)
 541 #define SAMPLE_RATE(p) ((p)->sample_rate)
 542 #define SCAN_STATE_C(p) ((p)->scan_state.save_c)
 543 #define SCAN_STATE_L(p) ((p)->scan_state.save_l)
 544 #define SCAN_STATE_S(p) ((p)->scan_state.save_s)
 545 #define SCALE_ROW(p) ((p)->scale_row)
 546 #define SCAN(p) ((p)->scan)
 547 #define SCAN_ERROR(c, u, v, txt) if (c) {scan_error (u, v, txt);}
 548 #define SCAN_WARNING(c, u, v, txt) if (c) {scan_warning (u, v, txt);}
 549 #define SCOPE(p) ((p)->scope)
 550 #define SCOPE_ASSIGNED(p) ((p)->scope_assigned)
 551 #define SEARCH(p) ((p)->search)
 552 #define SELECT(p) ((p)->select)
 553 #define SEQUENCE(p) ((p)->sequence)
 554 #define SET(p) ((p)->set)
 555 #define SHIFT(p) ((p)->shift)
 556 #define SHORT_ID(p) ((p)->short_id)
 557 #define SIN_ADDR(p) ((p)->sin_addr)
 558 #define SIN_FAMILY(p) ((p)->sin_family)
 559 #define SIN_PORT(p) ((p)->sin_port)
 560 #define SIZE(p) ((p)->size)
 561 #define SIZE1(p) ((p)->size1)
 562 #define SIZE2(p) ((p)->size2)
 563 #define SIZEC(p) ((p)->sizec)
 564 #define SLICE(p) ((p)->slice)
 565 #define SLICE_OFFSET(p) ((p)->slice_offset)
 566 #define SO(p) ((p)->so)
 567 #define SORT(p) ((p)->sort)
 568 #define SOURCE(p) ((p)->source)
 569 #define SOURCE_SCAN(p) ((p)->source_scan)
 570 #define SPAN(p) ((p)->span)
 571 #define STACK(p) ((p)->stack)
 572 #define STACK_POINTER(p) ((p)->stack_pointer)
 573 #define STACK_USED(p) ((p)->stack_used)
 574 #define STANDENV_MOID(p) ((p)->standenv_moid)
 575 #define START(p) ((p)->start)
 576 #define STATIC_LINK(p) ((p)->static_link)
 577 #define STATUS(p) ((p)->status)
 578 #define STATUS_IM(z) (STATUS (&(z)[1]))
 579 #define STATUS_RE(z) (STATUS (&(z)[0]))
 580 #define STR(p) ((p)->str)
 581 #define STREAM(p) ((p)->stream)
 582 #define STRING(p) ((p)->string)
 583 #define STRPOS(p) ((p)->strpos)
 584 #define ST_MODE(p) ((p)->st_mode)
 585 #define ST_MTIME(p) ((p)->st_mtime)
 586 #define SUB(p) ((p)->sub)
 587 #define SUBSET(p) ((p)->subset)
 588 #define SUB_MOID(p) (SUB (MOID (p)))
 589 #define SUB_NEXT(p) (SUB (NEXT (p)))
 590 #define SUB_SUB(p) (SUB (SUB (p)))
 591 #define SWAP(p) ((p)->swap)
 592 #define SYMBOL(p) ((p)->symbol)
 593 #define SYNC(p) ((p)->sync)
 594 #define SYNC_INDEX(p) ((p)->sync_index)
 595 #define SYNC_LINE(p) ((p)->sync_line)
 596 #define S_PORT(p) ((p)->s_port)
 597 #define TABLE(p) ((p)->symbol_table)
 598 #define TABS(p) ((p)->tabs)
 599 #define TAG_LEX_LEVEL(p) (LEVEL (TAG_TABLE (p)))
 600 #define TAG_TABLE(p) ((p)->symbol_table)
 601 #define TAX(p) ((p)->tag)
 602 #define TERM(p) ((p)->term)
 603 #define TERMINATOR(p) ((p)->terminator)
 604 #define TEXT(p) ((p)->text)
 605 #define THREAD_ID(p) ((p)->thread_id)
 606 #define THREAD_STACK_OFFSET(p) ((p)->thread_stack_offset)
 607 #define TMP_FILE(p) ((p)->tmp_file)
 608 #define TMP_TEXT(p) ((p)->tmp_text)
 609 #define TM_HOUR(p) ((p)->tm_hour)
 610 #define TM_ISDST(p) ((p)->tm_isdst)
 611 #define TM_MDAY(p) ((p)->tm_mday)
 612 #define TM_MIN(p) ((p)->tm_min)
 613 #define TM_MON(p) ((p)->tm_mon)
 614 #define TM_SEC(p) ((p)->tm_sec)
 615 #define TM_WDAY(p) ((p)->tm_wday)
 616 #define TM_YEAR(p) ((p)->tm_year)
 617 #define TOF(p) ((p)->tof)
 618 #define TOP_LINE(p) ((p)->top_line)
 619 #define TOP_MOID(p) ((p)->top_moid)
 620 #define TOP_NODE(p) ((p)->top_node)
 621 #define TOP_REFINEMENT(p) ((p)->top_refinement)
 622 #define TRANS(p) ((p)->trans)
 623 #define TRANSIENT(p) ((p)->transient)
 624 #define TRANSPUT_BUFFER(p) ((p)->transput_buffer)
 625 #define TRANSPUT_ERROR_MENDED(p) ((p)->transput_error_mended)
 626 #define TREE_LISTING_SAFE(p) ((p)->tree_listing_safe)
 627 #define TRIM(p) ((p)->trim)
 628 #define TUPLE(p) ((p)->tuple)
 629 #define TV_SEC(p) ((p)->tv_sec)
 630 #define TV_USEC(p) ((p)->tv_usec)
 631 #define UNDO(p) ((p)->undo)
 632 #define UNDO_LINE(p) ((p)->undo_line)
 633 #define UNION_OFFSET (SIZE_ALIGNED (A68_UNION))
 634 #define UNIT(p) ((p)->unit)
 635 #define UPB(p) ((p)->upper_bound)
 636 #define UPPER_BOUND(p) ((p)->upper_bound)
 637 #define USE(p) ((p)->use)
 638 #define VAL(p) ((p)->val)
 639 #define VALUE(p) ((p)->value)
 640 #define VALUE_ERROR_MENDED(p) ((p)->value_error_mended)
 641 #define WARNING_COUNT(p) ((p)->warning_count)
 642 #define WHERE(p) ((p)->where)
 643 #define IF_ROW(m) (IS_FLEX (m) || IS_ROW (m) || m == M_STRING)
 644 #define IS_COERCION(p) ((p)->is_coercion)
 645 #define IS_FLEX(m) IS ((m), FLEX_SYMBOL)
 646 #define IS_LITERALLY(p, s) (strcmp (NSYMBOL (p), s) == 0)
 647 #define IS_NEW_LEXICAL_LEVEL(p) ((p)->is_new_lexical_level)
 648 #define ISNT(p, s) (! IS (p, s))
 649 #define IS(p, s) (ATTRIBUTE (p) == (s))
 650 #define IS_REF_FLEX(m) (IS (m, REF_SYMBOL) && IS (SUB (m), FLEX_SYMBOL))
 651 #define IS_REF(m) IS ((m), REF_SYMBOL)
 652 #define IS_ROW(m) IS ((m), ROW_SYMBOL)
 653 #define IS_STRUCT(m) IS ((m), STRUCT_SYMBOL)
 654 #define IS_UNION(m) IS ((m), UNION_SYMBOL)
 655 #define WINDOW_X_SIZE(p) ((p)->window_x_size)
 656 #define WINDOW_Y_SIZE(p) ((p)->window_y_size)
 657 #define WRITE_MOOD(p) ((p)->write_mood)
 658 #define X(p) ((p)->x)
 659 #define X_COORD(p) ((p)->x_coord)
 660 #define Y(p) ((p)->y)
 661 #define YOUNGEST_ENVIRON(p) ((p)->youngest_environ)
 662 #define Y_COORD(p) ((p)->y_coord)
 663 
 664 #endif