home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / lifeos2.zip / LIFE-1.02 / SOURCE / INFO.C < prev    next >
C/C++ Source or Header  |  1996-06-17  |  2KB  |  79 lines

  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. #ifndef lint
  7. static char vcid[] = "$Id: info.c,v 1.4 1995/01/30 21:03:55 duchier Exp $";
  8. #endif /* lint */
  9.  
  10. #include "extern.h"
  11. #include "info.h"
  12.  
  13.  
  14. /******** PNF(s,n)
  15.   This prints one line of info cleanly. The string S is the name of the
  16.   structure, N the number of bytes it uses
  17. */
  18. static void pnf(s,n)
  19. char *s;
  20. long n;
  21. {
  22.   long i;
  23.   
  24.   printf("        %s ",s);
  25.   i=strlen(s);
  26.   while(++i<40) printf(".");
  27.   printf(" %3d bytes.\n",n);
  28. }
  29.  
  30.  
  31.  
  32. /******** TITLE()
  33.   This routine marks the start of Life. It prints info about the compile DATE,
  34.   some blurb about the author etc... Who cares anyway??
  35.   [I do! -hak]
  36. */
  37. void title()
  38. {
  39.   if(quietflag)
  40.     return; /*  RM: Feb 17 1993  */
  41.   
  42.   printf("Wild_Life Interpreter Version 1.02 06/17/96\n");
  43.   printf("Copyright (C) 1991-93 DEC Paris Research Laboratory\n");
  44.   printf("Extensions, Copyright (C) 1994-1995 Intelligent Software Group, SFU\n");
  45. #ifdef OS2_PORT
  46.   printf("OS/2 Port by Dennis J. Darland 06/17/96\n");
  47. #endif
  48.   
  49. #ifndef X11
  50.   printf("X interface not installed.\n");
  51. #endif
  52.   
  53. #if 0
  54.     printf("\n- Main data-structure sizes:\n");
  55.     pnf("rule",sizeof(struct pair_list));
  56.     pnf("psi_term",sizeof(struct psi_term));
  57.     pnf("binary tree node",sizeof(struct node));
  58.     pnf("stacked goal",sizeof(struct goal));
  59.     pnf("stacked choice-point",sizeof(struct choice_point));
  60.     pnf("backtracking action",sizeof(struct ptr_stack));
  61.     pnf("symbol definition",sizeof(struct definition));
  62.     pnf("code node",sizeof(struct int_list));
  63.     pnf("list node",sizeof(struct list));
  64.     pnf("real number",sizeof(REAL));
  65.     
  66.     printf("\n- Size of C built-in types:\n");
  67.     pnf("REAL",sizeof(REAL));
  68.     pnf("long",sizeof(long));
  69.     pnf("int",sizeof(unsigned long));
  70.     pnf("pointer",sizeof(char *));
  71.     
  72.     printf("\n- System constants:\n");
  73.     pnf("Maximum string or line length:",STRLEN);
  74.     pnf("Parser stack depth:",PARSER_STACK_SIZE);
  75.     pnf("Size of real numbers:",sizeof(REAL));
  76.     printf("\n\n");
  77. #endif
  78. }
  79.