home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / misc / b186_1 / Source / h / template < prev    next >
Text File  |  1987-09-27  |  2KB  |  75 lines

  1. /*
  2.  
  3.        This file is part of the PDP software package.
  4.          
  5.        Copyright 1987 by James L. McClelland and David E. Rumelhart.
  6.        
  7.        Please refer to licensing information in the file license.txt,
  8.        which is in the same directory with this source file and is
  9.        included here by reference.
  10. */
  11.  
  12.  
  13. /* template.h
  14.  
  15.     Header file for reading templates.
  16.  
  17.     First version implemented by Elliot Jaffe.
  18.     
  19.     Date of last revision:  8-12-87/JLM.
  20. */
  21.  
  22. struct Template {
  23.     char   *name;
  24.     int     type;        /* type: from list that follows this
  25.                    definition */
  26.     int     display_level;    /* necessary level to display item */
  27.     int     x,
  28.             y;            /* starting point for x and y */
  29.             boolean orientation;/* on for horizontal, off for vertical */
  30.     int     min_x,
  31.             min_y;        /* for use by vectors and arrays */
  32.     int     max_x,
  33.             max_y;        /* for use by vectors and arrays */
  34.     int     digits;        /* number of digits to display */
  35.     float   precision;        /* scale factor of precision */
  36.     int        spacing;        /* spacing between successive items on
  37.                    orientation dimension */
  38.     struct Look *look;        /* pointer to the look */
  39.     struct Variable *var;    /* pointer to the actual variable */
  40.     int     defined;        /* 0 = no, 1 = yes, -1 = label */
  41.     struct Template *next;    /* pointer to the next one */
  42. };
  43.  
  44. extern struct Template *tlist;
  45. extern struct Template **torder;
  46. extern int ntemplates;
  47.  
  48. /* these are the various types of displays that are supported */
  49.  
  50. #define COMMAND        30    /* the command line */
  51. #define    VECTOR        31    /* a vector of numbers */
  52. #define    MATRIX        32    /* a matrix of numbers */
  53. #define    LABEL        34    /* a character string */
  54. #define    LABEL_ARRAY    35    /* an array of character strings */
  55. #define    VARIABLE    36    /* one of the basic variables */
  56. #define LOOK        38    /* get the format from a look file */
  57. #define    FLOATVAR    39    /* float variable printed as Float */
  58. #define LABEL_LOOK      41      /* labels formated from a look file */
  59.  
  60. #define HORIZONTAL    TRUE
  61. #define VERTICAL    FALSE
  62.  
  63. #define MAXSLOTS    100
  64.  
  65. struct Look {
  66.     int     look_x,
  67.             look_y;        /* rows and columns in the look matrix */
  68.     char    **look_template;    /* pointer to the array */
  69. };
  70.  
  71. #define NOCELL        NULL    /* marker meaning there is no value here */
  72.  
  73. extern boolean    layout_defined;
  74. extern char    **background;
  75.