Wild Life  2.29
 All Data Structures Files Functions Variables Typedefs Macros
info2.c
Go to the documentation of this file.
1 /* Copyright 1991 Digital Equipment Corporation.
2 ** All Rights Reserved.
3 *****************************************************************/
4 /* $Id: info.c,v 1.4 1995/01/30 21:03:55 duchier Exp $ */
5 
6 #include "defs.h"
7 
8 /******** PNF(s,n)
9  This prints one line of info cleanly. The string S is the name of the
10  structure, N the number of bytes it uses
11 */
12 static void pnf(s,n)
13 char *s;
14 int n;
15 {
16  long i;
17 
18  printf(" %s ",s);
19  i=strlen(s);
20  while(++i<40) printf(".");
21  printf(" %3d bytes.\n",n);
22 }
23 
24 
25 
26 /******** TITLE()
27  This routine marks the start of Life. It prints info about the compile DATE,
28  some blurb about the author etc... Who cares anyway??
29  [I do! -hak]
30 */
31 void title()
32 {
33  if(quietflag)
34  return; /* RM: Feb 17 1993 */
35 
36  printf("Wild_Life Interpreter Version 2.28 Mon Oct 24 22:05:39 CDT 2016\n");
37  printf("Copyright (C) 1991-93 DEC Paris Research Laboratory\n");
38  printf("Extensions, Copyright (C) 1994-1995 Intelligent Software Group, SFU\n");
39  // should comment next 4 lines for test suite
40  // printf("OS/2 Port by Dennis J. Darland 06/17/96\n");
41  // printf("SUSE Linux Port by Dennis J. Darland May 2014\n");
42  // printf("Cygwin Port by Dennis J. Darland March 2015\n");
43  // printf("Further Debugging of Port by Dennis J. Darland June 2016\n");
44  // I don't understand why I cannot have above lines.
45  // has to to with title call in lib.c & life.c - related to memory.c
46  // may be important to understand even not just for above printf's
47 
48 #ifndef X11
49  printf("X interface not installed.\n");
50 #endif
51 
52 #if 0
53  printf("\n- Main data-structure sizes:\n");
54  pnf("rule",sizeof(struct pair_list));
55  pnf("psi_term",sizeof(struct psi_term));
56  pnf("binary tree node",sizeof(struct node));
57  pnf("stacked goal",sizeof(struct goal));
58  pnf("stacked choice-point",sizeof(struct choice_point));
59  pnf("backtracking action",sizeof(struct ptr_stack));
60  pnf("symbol definition",sizeof(struct definition));
61  pnf("code node",sizeof(struct int_list));
62  pnf("list node",sizeof(struct list));
63  pnf("real number",sizeof(REAL));
64 
65  printf("\n- Size of C built-in types:\n");
66  pnf("REAL",sizeof(REAL));
67  pnf("long",sizeof(long));
68  pnf("int",sizeof(unsigned long));
69  pnf("pointer",sizeof(char *));
70 
71  printf("\n- System constants:\n");
72  pnf("Maximum string or line length:",STRLEN);
73  pnf("Parser stack depth:",PARSER_STACK_SIZE);
74  pnf("Size of real numbers:",sizeof(REAL));
75  printf("\n\n");
76 #endif
77 }
#define PARSER_STACK_SIZE
Definition: def_const.h:100
static void pnf(char *s, int n)
Definition: info2.c:12
long quietflag
Definition: def_glob.h:271
#define REAL
Definition: def_const.h:72
void title()
Definition: info2.c:31
#define STRLEN
Definition: def_const.h:86