Wild Life  2.30
 All Data Structures Files Functions Variables Typedefs Macros
def_const.h
Go to the documentation of this file.
1 
6 // from built_ins.h
7 
8 #define least_sel 0
9 #define greatest_sel 1
10 #define op_sel 2
11 
12 // from c_life.h
13 
19 #define WFno 0
20 
26 #define WFyes 1
27 
32 #define WFmore 2
33 
34 // from externs.h
35 
41 #define WORDALIGN 1
42 
48 #define WORD sizeof(long)
49 
50 #ifdef WORDALIGN
51 #define ALIGN WORD
52 #else
53 #define ALIGN 8
54 #endif
55 
61 #define TS 1
62 
63 #ifdef CLIFE
64 #include "blockdef.h"
65 #endif /* CLIFE */
66 
67 /*************************** CONSTANTS **************************/
68 
69 /* Enable looking first for local set_up file */
70 /* In the final release, LOCALSETUP should be undefined. */
71 #define LOCALSETUP
72 #define LOCALSETUPFILE "./.set_up"
73 
74 /* RM: Mar 1 1994: replaced macros with variables. */
75 
76 /* Memory is determined in words by the variable "alloc_words", this may be
77  specified on the command line and defaults to the macro "ALLOC_WORDS". mem_size
78  is in bytes and is the product of alloc_words by the size of a machine word.
79  This system is thus consistent between 32 and 64-bit architectures: the same
80  number of psi-terms can be allocated in either.
81  */
82 
83 // from extern.h
84 
91 #define GC_THRESHOLD (alloc_words>>3)
92 
99 #define COPY_THRESHOLD (GC_THRESHOLD>>3)
100 
106 #define REAL double
107 
114 #define WL_MAXINT 9007199254740991.0
115 
121 #define PRETTY_SIZE 20000L
122 
128 #define MAX_BUILT_INS 300L
129 
136 #define STRLEN 10000L
137 
143 #define PAGE_WIDTH 80L
144 
150 #define PRINT_DEPTH 1000000000L
151 
157 #define PRINT_SPLIT 1000000000L
158 
164 #define PRINT_POWER 9L
165 
172 #define PARSER_STACK_SIZE 10000L
173 
179 #define MAX_PRECEDENCE 1200L
180 
185 #define PRINT_BUFFER 100000L
186 
192 #define PROMPT "> "
193 
199 #define PROMPT_BUFFER 200L
200 
206 #define MAX_LEVEL ((PROMPT_BUFFER-4-strlen(PROMPT))/2)
207 
214 #define XEVENTDELAY 1000L
215 
221 #define MAX_TRACE_INDENT 40L
222 
228 #define QUOTED_TRUE 1L
229 
235 #define UNFOLDED_TRUE 2L
236 
242 #define TRUE 1L
243 
249 #define FALSE 0L
250 
256 #define TRUEMASK 1L
257 
262 #define UNDEF 2L
263 
268 #define NOT_CODED 0L
269 
276 #define DEFRULES -1L
277 
283 #define EOLN 10L
284 
291 #define INT_SIZE 8*sizeof(unsigned long)
292 
298 #define HEAP TRUE
299 
305 #define STACK FALSE
306 
311 #define FACT 100L
312 
317 #define QUERY 200L
318 
324 #define ERROR 999L
325 
326 
332 #define RMASK 256L
333 
340 #define SMASK 255L
341 
347 #ifdef TS
348 #define INIT_TIME_STAMP 1L
349 #endif
350 
357 typedef long type_ptr;
358 
359 #define psi_term_ptr 0
360 #define resid_ptr 1
361 #define int_ptr 2
362 #define def_ptr 3
363 #define code_ptr 4
364 #define goal_ptr 5
365 #define cut_ptr 6 /* 22.9 */
366 
367 #ifdef CLIFE
368 #define block_ptr 12
369 #define value_ptr 13
370 #endif /* CLIFE */
371 
377 #define destroy_window 7+32
378 
384 #define show_window 8+32
385 
391 #define hide_window 9+32
392 
398 #define show_subwindow 10+32
399 
405 #define hide_subwindow 11+32
406 
412 #define undo_action 32
413 
414 // from lefun.h
415 
416 /* Set constants for deref_args */
417 #define set_empty 0
418 #define set_1 1
419 #define set_2 2
420 #define set_1_2 3
421 #define set_1_2_3 7
422 #define set_1_2_3_4 15
423 
424 // from list.h
425 
426 #ifndef NULL
427 #define NULL 0
428 #endif
429 
430 // from sys.h
431 
432 #define OPTIONAL 0
433 #define REQUIRED 1
434 #define UNEVALED (1<<1)
435 #define JUSTFAIL (1<<2)
436 #define POLYTYPE (1<<3)
437 #define MANDATORY (1<<4)
438 #define NOVALUE (1<<5)
439 
440 // from token.h
441 
442 /* Names of the features */
443 #define STREAM "stream"
444 #define INPUT_FILE_NAME "input_file_name"
445 #define LINE_COUNT "line_count"
446 #define START_OF_LINE "start_of_line"
447 #define SAVED_CHAR "saved_char"
448 #define OLD_SAVED_CHAR "old_saved_char"
449 #define SAVED_PSI_TERM "saved_psi_term"
450 #define OLD_SAVED_PSI_TERM "old_saved_psi_term"
451 #define EOF_FLAG "eof_flag"
452 #define CURRENT_MODULE "current_module"
453 
454 // from xdisplaylist.h
455 
456 #define xDefaultFont -1
457 #define xDefaultLineWidth -1
458 
459 // from error.h
460 
461 // from templates.h
462 
463 /* constants */
464 
465 #define MAXNBARGS 20
466 
467 // from error.h
468 
469 // #define Warningline if (warningflag) warningline // this would not work!
470 // #define Warningline warningline
471 
472 #define STRCMP 1L
473 #define INTCMP 2L
474 #define FEATCMP 3L
475 
476 // were enum (operator) but va_arg could not handle
477 #define nop 0
478 #define xf 1
479 #define fx 2
480 #define yf 3
481 #define fy 4
482 #define xfx 5
483 /* yfy, */
484 #define xfy 6
485 #define yfx 7
486 
487 // were enum (goal) -- but must be long for error.c
488 #define fail 0L
489 #define prove 1L
490 #define unify 2L
491 #define unify_noeval 3L
492 #define disj 4L
493 #define what_next 5L
494 #define eval 6L
495 #define eval_cut 7L
496 #define freeze_cut 8L
497 #define implies_cut 9L
498 #define general_cut 10L
499 #define match 11L
500 #define type_disj 12L
501 #define clause 13L
502 #define del_clause 14L
503 #define retract 15L
504 #define load 16L
505 #define c_what_next 17L
506 /* RM: Mar 31 1993 */
507 
508 // from bi_math.c
509 #define SINFLAG 1
510 #define COSFLAG 2
511 #define TANFLAG 3
512 
513 // from bi_type.c
514 
515 #define isa_le_sel 0
516 #define isa_lt_sel 1
517 #define isa_ge_sel 2
518 #define isa_gt_sel 3
519 #define isa_eq_sel 4
520 #define isa_nle_sel 5
521 #define isa_nlt_sel 6
522 #define isa_nge_sel 7
523 #define isa_ngt_sel 8
524 #define isa_neq_sel 9
525 #define isa_cmp_sel 10
526 #define isa_ncmp_sel 11
527 
528 // from copy.c
529 /* Size of hash table; must be a power of 2 */
530 /* A big hash table means it is sparse and therefore fast */
531 #define HASHSIZE 2048L
532 
533 /* Total number of buckets in initial hash table; */
534 /* this is dynamically increased if necessary. */
535 #define NUMBUCKETS 1024L
536 
537 /* Tail of hash bucket */
538 #define HASHEND (-1)
539 
540 #define EXACT_FLAG 0
541 #define QUOTE_FLAG 1
542 #define EVAL_FLAG 2
543 /* See mark_quote_c: */ /* 15.9 */
544 #define QUOTE_STUB 3
545 
546 // from parser.c
547 #define NOP 2000
548 
549 // from print.c
550 #define DOTDOT ": " /* RM: Dec 14 1992, should be " : " */
551 
552 #define NOTOP 0
553 #define INFIX 1
554 #define PREFIX 2
555 #define POSTFIX 3
556 
557 #ifndef NORAW
558 #define stdin_fileno fileno (stdin)
559 #endif
560 
561 // from sys.h
562 #define ARGNN 10
563 
564 // from xdisplaylist.h
565 #ifdef X11
566 #define xDefaultFont -1
567 #define xDefaultLineWidth -1
568 #endif
569 
570 // was enum (def_type) now there is typedef ptr_definition
571 #define undef_it 1
572 #define predicate_it 2
573 #define function_it 3
574 #define type_it 4
575 #define global_it 5
576  /* RM: Feb 8 1993 */
577 #ifdef CLIFE
578 #define block_it 6
579  /* AA: Mar 8 1993 */
580 #endif /* CLIFE */
581 
582 #ifdef X11
583 
588 #define DRAW_LINE 1
589 #define DRAW_RECTANGLE 2
590 #define DRAW_ARC 3
591 #define DRAW_POLYGON 4
592 #define FILL_RECTANGLE 5
593 #define FILL_ARC 6
594 #define FILL_POLYGON 7
595 #define DRAW_STRING 8
596 #define DRAW_IMAGE_STRING 9
597 
598 #endif
long type_ptr
Used to identify the object on the undo_stack.
Definition: def_const.h:357