Merge pull request #59 from philburk/build64
[debian/pforth] / csrc / pf_guts.h
1 /* @(#) pf_guts.h 98/01/28 1.4 */
2 #ifndef _pf_guts_h
3 #define _pf_guts_h
4
5 /***************************************************************
6 ** Include file for PForth, a Forth based on 'C'
7 **
8 ** Author: Phil Burk
9 ** Copyright 1994 3DO, Phil Burk, Larry Polansky, David Rosenboom
10 **
11 ** The pForth software code is dedicated to the public domain,
12 ** and any third party may reproduce, distribute and modify
13 ** the pForth software code or any derivative works thereof
14 ** without any compensation or license.  The pForth software
15 ** code is provided on an "as is" basis without any warranty
16 ** of any kind, including, without limitation, the implied
17 ** warranties of merchantability and fitness for a particular
18 ** purpose and their equivalents under the laws of any jurisdiction.
19 **
20 ***************************************************************/
21
22 /*
23 ** PFORTH_VERSION changes when PForth is modified and released.
24 ** See README file for version info.
25 */
26 #define PFORTH_VERSION "28"
27
28 /*
29 ** PFORTH_FILE_VERSION changes when incompatible changes are made
30 ** in the ".dic" file format.
31 **
32 ** FV3 - 950225 - Use ABS_TO_CODEREL for CodePtr. See file "pf_save.c".
33 ** FV4 - 950309 - Added NameSize and CodeSize to pfSaveForth().
34 ** FV5 - 950316 - Added Floats and reserved words.
35 ** FV6 - 961213 - Added ID_LOCAL_PLUSSTORE, ID_COLON_P, etc.
36 ** FV7 - 971203 - Added ID_FILL, (1LOCAL@),  etc., ran out of reserved, resorted.
37 ** FV8 - 980818 - Added Endian flag.
38 ** FV9 - 20100503 - Added support for 64-bit CELL.
39 ** FV10 - 20170103 - Added ID_FILE_FLUSH ID_FILE_RENAME ID_FILE_RESIZE
40 */
41 #define PF_FILE_VERSION (10)   /* Bump this whenever primitives added. */
42 #define PF_EARLIEST_FILE_VERSION (9)  /* earliest one still compatible */
43
44 /***************************************************************
45 ** Sizes and other constants
46 ***************************************************************/
47
48 #define TIB_SIZE (256)
49
50 #ifndef FALSE
51     #define FALSE (0)
52 #endif
53 #ifndef TRUE
54     #define TRUE (1)
55 #endif
56
57 #define FFALSE (0)
58 #define FTRUE (-1)
59 #define BLANK (' ')
60
61 #define FLAG_PRECEDENCE (0x80)
62 #define FLAG_IMMEDIATE  (0x40)
63 #define FLAG_SMUDGE     (0x20)
64 #define MASK_NAME_SIZE  (0x1F)
65
66 /* Debug TRACE flags */
67 #define TRACE_INNER     (0x0002)
68 #define TRACE_COMPILE   (0x0004)
69 #define TRACE_SPECIAL   (0x0008)
70
71 /* Numeric types returned by NUMBER? */
72 #define NUM_TYPE_BAD    (0)
73 #define NUM_TYPE_SINGLE (1)
74 #define NUM_TYPE_DOUBLE (2)
75 #define NUM_TYPE_FLOAT  (3)
76
77 #define CREATE_BODY_OFFSET  (3*sizeof(cell_t))
78
79 /***************************************************************
80 ** Primitive Token IDS
81 ** Do NOT change the order of these IDs or dictionary files will break!
82 ***************************************************************/
83 enum cforth_primitive_ids
84 {
85     ID_EXIT = 0,  /* ID_EXIT must always be zero. */
86 /* Do NOT change the order of these IDs or dictionary files will break! */
87     ID_1MINUS,
88     ID_1PLUS,
89     ID_2DUP,
90     ID_2LITERAL,
91     ID_2LITERAL_P,
92     ID_2MINUS,
93     ID_2OVER,
94     ID_2PLUS,
95     ID_2SWAP,
96     ID_2_R_FETCH,
97     ID_2_R_FROM,
98     ID_2_TO_R,
99     ID_ACCEPT_P,
100     ID_ALITERAL,
101     ID_ALITERAL_P,
102     ID_ALLOCATE,
103     ID_AND,
104     ID_ARSHIFT,
105     ID_BAIL,
106     ID_BODY_OFFSET,
107     ID_BRANCH,
108     ID_BYE,
109     ID_CALL_C,
110     ID_CFETCH,
111     ID_CMOVE,
112     ID_CMOVE_UP,
113     ID_COLON,
114     ID_COLON_P,
115     ID_COMPARE,
116     ID_COMP_EQUAL,
117     ID_COMP_GREATERTHAN,
118     ID_COMP_LESSTHAN,
119     ID_COMP_NOT_EQUAL,
120     ID_COMP_U_GREATERTHAN,
121     ID_COMP_U_LESSTHAN,
122     ID_COMP_ZERO_EQUAL,
123     ID_COMP_ZERO_GREATERTHAN,
124     ID_COMP_ZERO_LESSTHAN,
125     ID_COMP_ZERO_NOT_EQUAL,
126     ID_CR,
127     ID_CREATE,
128     ID_CREATE_P,
129     ID_CSTORE,
130     ID_DEFER,
131     ID_DEFER_P,
132     ID_DEPTH,
133     ID_DIVIDE,
134     ID_DOT,
135     ID_DOTS,
136     ID_DO_P,
137     ID_DROP,
138     ID_DUMP,
139     ID_DUP,
140     ID_D_MINUS,
141     ID_D_MTIMES,
142     ID_D_MUSMOD,
143     ID_D_PLUS,
144     ID_D_UMSMOD,
145     ID_D_UMTIMES,
146     ID_EMIT,
147     ID_EMIT_P,
148     ID_EOL,
149     ID_ERRORQ_P,
150     ID_EXECUTE,
151     ID_FETCH,
152     ID_FILE_CLOSE,
153     ID_FILE_CREATE,
154     ID_FILE_OPEN,
155     ID_FILE_POSITION,
156     ID_FILE_READ,
157     ID_FILE_REPOSITION,
158     ID_FILE_RO,
159     ID_FILE_RW,
160     ID_FILE_SIZE,
161     ID_FILE_WRITE,
162     ID_FILL,
163     ID_FIND,
164     ID_FINDNFA,
165     ID_FLUSHEMIT,
166     ID_FREE,
167     ID_HERE,
168     ID_NUMBERQ_P,
169     ID_I,
170     ID_INCLUDE_FILE,
171     ID_J,
172     ID_KEY,
173     ID_LEAVE_P,
174     ID_LITERAL,
175     ID_LITERAL_P,
176     ID_LOADSYS,
177     ID_LOCAL_COMPILER,
178     ID_LOCAL_ENTRY,
179     ID_LOCAL_EXIT,
180     ID_LOCAL_FETCH,
181     ID_LOCAL_FETCH_1,
182     ID_LOCAL_FETCH_2,
183     ID_LOCAL_FETCH_3,
184     ID_LOCAL_FETCH_4,
185     ID_LOCAL_FETCH_5,
186     ID_LOCAL_FETCH_6,
187     ID_LOCAL_FETCH_7,
188     ID_LOCAL_FETCH_8,
189     ID_LOCAL_PLUSSTORE,
190     ID_LOCAL_STORE,
191     ID_LOCAL_STORE_1,
192     ID_LOCAL_STORE_2,
193     ID_LOCAL_STORE_3,
194     ID_LOCAL_STORE_4,
195     ID_LOCAL_STORE_5,
196     ID_LOCAL_STORE_6,
197     ID_LOCAL_STORE_7,
198     ID_LOCAL_STORE_8,
199     ID_LOOP_P,
200     ID_LSHIFT,
201     ID_MAX,
202     ID_MIN,
203     ID_MINUS,
204     ID_NAME_TO_PREVIOUS,
205     ID_NAME_TO_TOKEN,
206     ID_NOOP,
207     ID_NUMBERQ,
208     ID_OR,
209     ID_OVER,
210     ID_PICK,
211     ID_PLUS,
212     ID_PLUSLOOP_P,
213     ID_PLUS_STORE,
214     ID_QDO_P,
215     ID_QDUP,
216     ID_QTERMINAL,
217     ID_QUIT_P,
218     ID_REFILL,
219     ID_RESIZE,
220     ID_SOURCE_LINE_NUMBER_FETCH, /* used to be ID_RESTORE_INPUT */
221     ID_ROLL,
222     ID_ROT,
223     ID_RP_FETCH,
224     ID_RP_STORE,
225     ID_RSHIFT,
226     ID_R_DROP,
227     ID_R_FETCH,
228     ID_R_FROM,
229     ID_SAVE_FORTH_P,
230     ID_SOURCE_LINE_NUMBER_STORE, /* used to be ID_SAVE_INPUT */
231     ID_SCAN,
232     ID_SEMICOLON,
233     ID_SKIP,
234     ID_SOURCE,
235     ID_SOURCE_ID,
236     ID_SOURCE_ID_POP,
237     ID_SOURCE_ID_PUSH,
238     ID_SOURCE_SET,
239     ID_SP_FETCH,
240     ID_SP_STORE,
241     ID_STORE,
242     ID_SWAP,
243     ID_TEST1,
244     ID_TEST2,
245     ID_TEST3,
246     ID_TICK,
247     ID_TIMES,
248     ID_TO_R,
249     ID_TYPE,
250     ID_TYPE_P,
251     ID_VAR_BASE,
252     ID_VAR_CODE_BASE,
253     ID_VAR_CODE_LIMIT,
254     ID_VAR_CONTEXT,
255     ID_VAR_DP,
256     ID_VAR_ECHO,
257     ID_VAR_HEADERS_BASE,
258     ID_VAR_HEADERS_LIMIT,
259     ID_VAR_HEADERS_PTR,
260     ID_VAR_NUM_TIB,
261     ID_VAR_OUT,
262     ID_VAR_RETURN_CODE,
263     ID_VAR_SOURCE_ID,
264     ID_VAR_STATE,
265     ID_VAR_TO_IN,
266     ID_VAR_TRACE_FLAGS,
267     ID_VAR_TRACE_LEVEL,
268     ID_VAR_TRACE_STACK,
269     ID_VLIST,
270     ID_WORD,
271     ID_WORD_FETCH,
272     ID_WORD_STORE,
273     ID_XOR,
274     ID_ZERO_BRANCH,
275     ID_CATCH,
276     ID_THROW,
277     ID_INTERPRET,
278     ID_FILE_WO,
279     ID_FILE_BIN,
280     /* Added to support 64 bit operation. */
281     ID_CELL,
282     ID_CELLS,
283     /* DELETE-FILE */
284     ID_FILE_DELETE,
285     ID_FILE_FLUSH,              /* FLUSH-FILE */
286     ID_FILE_RENAME,             /* (RENAME-FILE) */
287     ID_FILE_RESIZE,             /* RESIZE-FILE */
288 /* If you add a word here, take away one reserved word below. */
289 #ifdef PF_SUPPORT_FP
290 /* Only reserve space if we are adding FP so that we can detect
291 ** unsupported primitives when loading dictionary.
292 */
293     ID_RESERVED01,
294     ID_RESERVED02,
295     ID_RESERVED03,
296     ID_RESERVED04,
297     ID_RESERVED05,
298     ID_RESERVED06,
299     ID_RESERVED07,
300     ID_RESERVED08,
301     ID_RESERVED09,
302     ID_RESERVED10,
303     ID_FP_D_TO_F,
304     ID_FP_FSTORE,
305     ID_FP_FTIMES,
306     ID_FP_FPLUS,
307     ID_FP_FMINUS,
308     ID_FP_FSLASH,
309     ID_FP_F_ZERO_LESS_THAN,
310     ID_FP_F_ZERO_EQUALS,
311     ID_FP_F_LESS_THAN,
312     ID_FP_F_TO_D,
313     ID_FP_FFETCH,
314     ID_FP_FDEPTH,
315     ID_FP_FDROP,
316     ID_FP_FDUP,
317     ID_FP_FLITERAL,
318     ID_FP_FLITERAL_P,
319     ID_FP_FLOAT_PLUS,
320     ID_FP_FLOATS,
321     ID_FP_FLOOR,
322     ID_FP_FMAX,
323     ID_FP_FMIN,
324     ID_FP_FNEGATE,
325     ID_FP_FOVER,
326     ID_FP_FROT,
327     ID_FP_FROUND,
328     ID_FP_FSWAP,
329     ID_FP_FSTAR_STAR,
330     ID_FP_FABS,
331     ID_FP_FACOS,
332     ID_FP_FACOSH,
333     ID_FP_FALOG,
334     ID_FP_FASIN,
335     ID_FP_FASINH,
336     ID_FP_FATAN,
337     ID_FP_FATAN2,
338     ID_FP_FATANH,
339     ID_FP_FCOS,
340     ID_FP_FCOSH,
341     ID_FP_FLN,
342     ID_FP_FLNP1,
343     ID_FP_FLOG,
344     ID_FP_FSIN,
345     ID_FP_FSINCOS,
346     ID_FP_FSINH,
347     ID_FP_FSQRT,
348     ID_FP_FTAN,
349     ID_FP_FTANH,
350     ID_FP_FPICK,
351 #endif
352 /* Add new IDs by replacing reserved IDs or extending FP routines. */
353 /* Do NOT change the order of these IDs or dictionary files will break! */
354     NUM_PRIMITIVES     /* This must always be LAST */
355 };
356
357
358
359 /***************************************************************
360 ** THROW Codes
361 ***************************************************************/
362 /* ANSI standard definitions needed by pForth */
363 #define THROW_ABORT            (-1)
364 #define THROW_ABORT_QUOTE      (-2)
365 #define THROW_STACK_OVERFLOW   (-3)
366 #define THROW_STACK_UNDERFLOW  (-4)
367 #define THROW_UNDEFINED_WORD  (-13)
368 #define THROW_EXECUTING       (-14)
369 #define THROW_PAIRS           (-22)
370 #define THROW_FLOAT_STACK_UNDERFLOW  ( -45)
371 #define THROW_QUIT            (-56)
372 #define THROW_FLUSH_FILE      (-68)
373 #define THROW_RESIZE_FILE     (-74)
374
375 /* THROW codes unique to pForth */
376 #define THROW_BYE            (-256) /* Exit program. */
377 #define THROW_SEMICOLON      (-257) /* Error detected at ; */
378 #define THROW_DEFERRED       (-258) /* Not a deferred word. Used in system.fth */
379
380 /***************************************************************
381 ** Structures
382 ***************************************************************/
383
384 typedef struct pfTaskData_s
385 {
386     cell_t   *td_StackPtr;       /* Primary data stack */
387     cell_t   *td_StackBase;
388     cell_t   *td_StackLimit;
389     cell_t   *td_ReturnPtr;      /* Return stack */
390     cell_t   *td_ReturnBase;
391     cell_t   *td_ReturnLimit;
392 #ifdef PF_SUPPORT_FP
393     PF_FLOAT  *td_FloatStackPtr;
394     PF_FLOAT  *td_FloatStackBase;
395     PF_FLOAT  *td_FloatStackLimit;
396 #endif
397     cell_t   *td_InsPtr;          /* Instruction pointer, "PC" */
398     FileStream   *td_InputStream;
399 /* Terminal. */
400     char    td_TIB[TIB_SIZE];   /* Buffer for terminal input. */
401     cell_t    td_IN;              /* Index into Source */
402     cell_t    td_SourceNum;       /* #TIB after REFILL */
403     char   *td_SourcePtr;       /* Pointer to TIB or other source. */
404     cell_t   td_LineNumber;      /* Incremented on every refill. */
405     cell_t    td_OUT;             /* Current output column. */
406 } pfTaskData_t;
407
408 typedef struct pfNode
409 {
410     struct pfNode *n_Next;
411     struct pfNode *n_Prev;
412 } pfNode;
413
414 /* Structure of header entry in dictionary. These will be stored in dictionary specific endian format*/
415 typedef struct cfNameLinks
416 {
417     cell_t       cfnl_PreviousName;   /* name relative address of previous */
418     ExecToken  cfnl_ExecToken;      /* Execution token for word. */
419 /* Followed by variable length name field. */
420 } cfNameLinks;
421
422 #define PF_DICF_ALLOCATED_SEGMENTS  ( 0x0001)
423 typedef struct pfDictionary_s
424 {
425     pfNode  dic_Node;
426     ucell_t  dic_Flags;
427 /* Headers contain pointers to names and dictionary. */
428
429     ucell_t dic_HeaderBaseUnaligned;
430
431     ucell_t dic_HeaderBase;
432     ucell_t dic_HeaderPtr;
433     ucell_t dic_HeaderLimit;
434 /* Code segment contains tokenized code and data. */
435     ucell_t dic_CodeBaseUnaligned;
436     ucell_t dic_CodeBase;
437     union
438     {
439         cell_t  *Cell;
440         uint8_t *Byte;
441     } dic_CodePtr;
442     ucell_t dic_CodeLimit;
443 } pfDictionary_t;
444
445 /* Save state of include when nesting files. */
446 typedef struct IncludeFrame
447 {
448     FileStream   *inf_FileID;
449     cell_t         inf_LineNumber;
450     cell_t         inf_SourceNum;
451     cell_t         inf_IN;
452     char          inf_SaveTIB[TIB_SIZE];
453 } IncludeFrame;
454
455 #define MAX_INCLUDE_DEPTH (16)
456
457 /***************************************************************
458 ** Prototypes
459 ***************************************************************/
460
461 #ifdef __cplusplus
462 extern "C" {
463 #endif
464
465 ThrowCode pfCatch( ExecToken XT );
466
467 #ifdef __cplusplus
468 }
469 #endif
470
471 /***************************************************************
472 ** External Globals
473 ***************************************************************/
474 extern pfTaskData_t *gCurrentTask;
475 extern pfDictionary_t *gCurrentDictionary;
476 extern char          gScratch[TIB_SIZE];
477 extern cell_t         gNumPrimitives;
478
479 extern ExecToken     gLocalCompiler_XT;      /* CFA of (LOCAL) compiler. */
480 extern ExecToken     gNumberQ_XT;         /* XT of NUMBER? */
481 extern ExecToken     gQuitP_XT;           /* XT of (QUIT) */
482 extern ExecToken     gAcceptP_XT;         /* XT of ACCEPT */
483
484 #define DEPTH_AT_COLON_INVALID (-100)
485 extern cell_t         gDepthAtColon;
486
487 /* Global variables. */
488 extern cell_t        gVarContext;    /* Points to last name field. */
489 extern cell_t        gVarState;      /* 1 if compiling. */
490 extern cell_t        gVarBase;       /* Numeric Base. */
491 extern cell_t        gVarEcho;       /* Echo input from file. */
492 extern cell_t        gVarEchoAccept; /* Echo input from ACCEPT. */
493 extern cell_t        gVarTraceLevel;
494 extern cell_t        gVarTraceStack;
495 extern cell_t        gVarTraceFlags;
496 extern cell_t        gVarQuiet;      /* Suppress unnecessary messages, OK, etc. */
497 extern cell_t        gVarReturnCode; /* Returned to caller of Forth, eg. UNIX shell. */
498
499 extern IncludeFrame  gIncludeStack[MAX_INCLUDE_DEPTH];
500 extern cell_t         gIncludeIndex;
501 /***************************************************************
502 ** Macros
503 ***************************************************************/
504
505
506 /* Endian specific macros for creating target dictionaries for machines with
507
508 ** different endian-ness.
509
510 */
511
512 #if defined(PF_BIG_ENDIAN_DIC)
513
514 #define WRITE_FLOAT_DIC             WriteFloatBigEndian
515 #define WRITE_CELL_DIC(addr,data)   WriteCellBigEndian((uint8_t *)(addr),(ucell_t)(data))
516 #define WRITE_SHORT_DIC(addr,data)  Write16BigEndian((uint8_t *)(addr),(uint16_t)(data))
517 #define READ_FLOAT_DIC              ReadFloatBigEndian
518 #define READ_CELL_DIC(addr)         ReadCellBigEndian((const uint8_t *)(addr))
519 #define READ_SHORT_DIC(addr)        Read16BigEndian((const uint8_t *)(addr))
520
521 #elif defined(PF_LITTLE_ENDIAN_DIC)
522
523 #define WRITE_FLOAT_DIC             WriteFloatLittleEndian
524 #define WRITE_CELL_DIC(addr,data)   WriteCellLittleEndian((uint8_t *)(addr),(ucell_t)(data))
525 #define WRITE_SHORT_DIC(addr,data)  Write16LittleEndian((uint8_t *)(addr),(uint16_t)(data))
526 #define READ_FLOAT_DIC              ReadFloatLittleEndian
527 #define READ_CELL_DIC(addr)         ReadCellLittleEndian((const uint8_t *)(addr))
528 #define READ_SHORT_DIC(addr)        Read16LittleEndian((const uint8_t *)(addr))
529
530 #else
531
532 #define WRITE_FLOAT_DIC(addr,data)  { *((PF_FLOAT *)(addr)) = (PF_FLOAT)(data); }
533 #define WRITE_CELL_DIC(addr,data)   { *((cell_t *)(addr)) = (cell_t)(data); }
534 #define WRITE_SHORT_DIC(addr,data)  { *((int16_t *)(addr)) = (int16_t)(data); }
535 #define READ_FLOAT_DIC(addr)        ( *((PF_FLOAT *)(addr)) )
536 #define READ_CELL_DIC(addr)         ( *((const ucell_t *)(addr)) )
537 #define READ_SHORT_DIC(addr)        ( *((const uint16_t *)(addr)) )
538
539 #endif
540
541
542 #define HEADER_HERE (gCurrentDictionary->dic_HeaderPtr.Cell)
543 #define CODE_HERE (gCurrentDictionary->dic_CodePtr.Cell)
544 #define CODE_COMMA( N ) WRITE_CELL_DIC(CODE_HERE++,(N))
545 #define NAME_BASE (gCurrentDictionary->dic_HeaderBase)
546 #define CODE_BASE (gCurrentDictionary->dic_CodeBase)
547 #define NAME_SIZE (gCurrentDictionary->dic_HeaderLimit - gCurrentDictionary->dic_HeaderBase)
548 #define CODE_SIZE (gCurrentDictionary->dic_CodeLimit - gCurrentDictionary->dic_CodeBase)
549
550 #define IN_CODE_DIC(addr) ( ( ((uint8_t *)(addr)) >= gCurrentDictionary->dic_CodeBase)   && ( ((uint8_t *)(addr)) < gCurrentDictionary->dic_CodeLimit) )
551
552 #define IN_NAME_DIC(addr) ( ( ((uint8_t *)(addr)) >= gCurrentDictionary->dic_HeaderBase) && ( ((uint8_t *)(addr)) < gCurrentDictionary->dic_HeaderLimit) )
553 #define IN_DICS(addr) (IN_CODE_DIC(addr) || IN_NAME_DIC(addr))
554
555 /* Address conversion */
556 #define ABS_TO_NAMEREL( a ) ((cell_t)  (((ucell_t) a) - NAME_BASE ))
557 #define ABS_TO_CODEREL( a ) ((cell_t)  (((ucell_t) a) - CODE_BASE ))
558 #define NAMEREL_TO_ABS( a ) ((ucell_t) (((cell_t) a) + NAME_BASE))
559 #define CODEREL_TO_ABS( a ) ((ucell_t) (((cell_t) a) + CODE_BASE))
560
561 /* The check for >0 is only needed for CLONE testing. !!! */
562 #define IsTokenPrimitive(xt) ((xt<gNumPrimitives) && (xt>=0))
563
564 #define FREE_VAR(v) { if (v) { pfFreeMem((void *)(v)); v = 0; } }
565
566 #define DATA_STACK_DEPTH (gCurrentTask->td_StackBase - gCurrentTask->td_StackPtr)
567 #define DROP_DATA_STACK (gCurrentTask->td_StackPtr++)
568 #define POP_DATA_STACK (*gCurrentTask->td_StackPtr++)
569 #define PUSH_DATA_STACK(x) {*(--(gCurrentTask->td_StackPtr)) = (cell_t) x; }
570
571 /* Force Quad alignment. */
572 #define QUADUP(x) (((x)+3)&~3)
573
574 #ifndef MIN
575 #define MIN(a,b)  ( ((a)<(b)) ? (a) : (b) )
576 #endif
577 #ifndef MAX
578 #define MAX(a,b)  ( ((a)>(b)) ? (a) : (b) )
579 #endif
580
581 #ifndef TOUCH
582     #define TOUCH(argument) ((void)argument)
583 #endif
584
585 /***************************************************************
586 ** I/O related macros
587 ***************************************************************/
588
589 #define EMIT(c)  ioEmit(c)
590 #define EMIT_CR  EMIT('\n');
591
592 #define MSG(cs)   pfMessage(cs)
593 #define ERR(x)    MSG(x)
594
595 #define DBUG(x)  /* PRT(x) */
596 #define DBUGX(x) /* DBUG(x) */
597
598 #define MSG_NUM_D(msg,num) { MSG(msg); ffDot((cell_t) num); EMIT_CR; }
599 #define MSG_NUM_H(msg,num) { MSG(msg); ffDotHex((cell_t) num); EMIT_CR; }
600
601 #define DBUG_NUM_D(msg,num) { pfDebugMessage(msg); pfDebugPrintDecimalNumber((cell_t) num); pfDebugMessage("\n"); }
602
603 #endif  /* _pf_guts_h */