home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 13 / 13.iso / p / p064 / 3.ddi / PROGRAM.H < prev    next >
Encoding:
C/C++ Source or Header  |  1991-07-01  |  5.3 KB  |  174 lines

  1. /****************************************************************************/
  2. /*        Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991                  */
  3. /*          By MicroSim Corporation, All Rights Reserved                    */
  4. /****************************************************************************/
  5. /* program.h
  6.  *   $Revision:   1.17  $
  7.  *   $Author:   sv  $
  8.  *   $Date:   30 Apr 1991 07:40:32  $ */
  9.  
  10.  
  11. /*
  12.  * Declarations for files, IO, and other data specific to one PSpice
  13.  *   run but independent of any circuit
  14.  */
  15. struct PrgDef {
  16.   FILE        *PrgInFl;        /* Circuit file */
  17.   char        PrgInNm[MBUFF];        /* Circuit file name */
  18.   FILE        *PrgOutFl;        /* Output file */
  19.   char         PrgOutNm[MBUFF];    /* Output file name */
  20.   FILE        *PrgPrbFl;        /* Probe data file */
  21.   char         PrgPrbNm[MBUFF];    /* Probe data file name */
  22.   FILE        *PrgPrFl;        /* Print data file */
  23.   char         PrgPrNm[MBUFF];        /* Print data file name */
  24.   FILE        *PrgPlFl;        /* Plot  data file */
  25.   char         PrgPlNm[MBUFF];        /* Plot  data file name */
  26.   FILE        *PrgMCFl;        /* MonteCarlo  data file */
  27.   char        PrgMCNm[MBUFF];        /* MonteCarlo  data file name */
  28.   FILE        *PrgDigFl;        /* Digital probe data file (temp)*/
  29.   char         PrgDigNm[MBUFF];    /* Digital probe data file name*/
  30.   int        PrgFstatus;        /* EOF = input file closed
  31.                      * 0 = normal (not EOL),
  32.                      * ATEOL = end of line
  33.                      * PUSHTOKEN = return same token */
  34.   int        PrgNstatus;        /* next status from NewGets */
  35.   int           PrgDspLvl;        /* /D CRT display level option */
  36.   int        PrgNoDate;        /* /T Suppress date, ver, ... in .OUT */
  37.   int        PrgIntFl;        /* YES: user has aborted run */
  38.   char         PrgHdr[MBUFF];        /* PSpice ver. no. and release date */
  39.   long        PrgSN;            /* Program serial number (ID) */
  40.   int        PrgMessWn[4];        /* Message window coordinates */
  41.   int        PrgStatWn[4];        /* Status window coordinates */
  42.   int        PrgTmpWn[4];        /* Temporary window coordinates */
  43.   int        PrgFFFlag;        /* set to true to enable FF's */
  44.   int        PrgNeedMC;        /* YES if used MC - specific */
  45.   int        PrgNeedPAD;        /* YES if Parallel Analog/Digital in use */
  46.   int        PrgInCS;        /* YES if run as Control Shell */
  47.   int        PrgAlias;        /* YES if has .ALIAS */
  48.   };
  49.  
  50. #define DSPNONE        0
  51. #define DSPFULL        7
  52.  
  53. #define    INFILE        (PrgData->PrgInFl)
  54. #define    INFILEN        (PrgData->PrgInNm)
  55. #define    OUTFILE        (PrgData->PrgOutFl)
  56. #define    OUTFILEN    (PrgData->PrgOutNm)
  57. #define    PRBFILE        (PrgData->PrgPrbFl)
  58. #define    PRBFILEN    (PrgData->PrgPrbNm)
  59. #define PRFILE        (PrgData->PrgPrFl)
  60. #define PRFILEN        (PrgData->PrgPrNm)
  61. #define PLFILE        (PrgData->PrgPlFl)
  62. #define PLFILEN        (PrgData->PrgPlNm)
  63. #define MCFILE        (PrgData->PrgMCFl)
  64. #define MCFILEN        (PrgData->PrgMCNm)
  65. #define    DIGFILE        (PrgData->PrgDigFl)
  66. #define    DIGFILEN    (PrgData->PrgDigNm)
  67. #define    FSTATUS        (PrgData->PrgFstatus)
  68. #define NEXTSTATUS    (PrgData->PrgNstatus)
  69. #define DSPLVL        (PrgData->PrgDspLvl)
  70. #define    NODATE        (PrgData->PrgNoDate)
  71. #define    INTRFL        (PrgData->PrgIntFl)
  72. #define PRGHDR        (PrgData->PrgHdr)
  73. #define PRGSN        (PrgData->PrgSN)
  74. #define    MESSWN        (PrgData->PrgMessWn)
  75. #define    STATWN        (PrgData->PrgStatWn)
  76. #define    TEMPWN        (PrgData->PrgTmpWn)
  77. #define FORMFEEDFLAG    (PrgData->PrgFFFlag)
  78. #define NEEDSMCOPTION    (PrgData->PrgNeedMC)
  79. #define NEEDPADOPTION    (PrgData->PrgNeedPAD)
  80. #define INCS        (PrgData->PrgInCS)
  81. #define  USESALIASES   (PrgData->PrgAlias)
  82.  
  83. GLOBAL    struct PrgDef    *PrgData;
  84.  
  85. GLOBAL char    *Heads[27];
  86. GLOBAL char    *MHeads[27];
  87. #define AD_HEAD 26      /* Header index for "invisable" analog half
  88.                            of mixed devices */
  89.  
  90. /* device type flag values for mixed devices */
  91.  
  92. #define UADC_TYPE       1
  93. #define UDAC_TYPE       2
  94.  
  95. GLOBAL unsigned ConfigFlags[26]; /* for suppressing analyses */
  96.  
  97. /* number of expression pointers in devices a - z */
  98. /* models are subject to change by users so handled differently. */
  99. GLOBAL struct {
  100.   int nnodes;
  101.   int nexprs;
  102.   int nstr_exprs;
  103. }  Nexprs[26]
  104. #ifdef Main_Pgm
  105. = {
  106.   {0,    0, 0},    /* a */
  107.   {4,    3, 0},    /* b */
  108.   {2,    2, 0},    /* c */
  109.   {3,    2, 0},    /* d */
  110.   {2,    0, 0},    /* e - not general model */
  111.   {2,    0, 0},    /* f -  "  */
  112.   {2,    0, 0},    /* g -  "  */
  113.   {2,    0, 0},    /* h -  "  */
  114.   {2,    4, 0},    /* i */
  115.   {4,    3, 0},    /* j */
  116.   {0,    2, 0},    /* k */
  117.   {2,    2, 0},    /* l */
  118.   {5,    14, 0},    /* m */    /* M instance param added */
  119.   {3,    0, 2},    /* n */
  120.   {2,    0, 1},    /* o */
  121.   {0,    0, 0},    /* p */
  122.   {5,    3, 0},    /* q */
  123.   {2,    1, 0},    /* r */
  124.   {5,    3, 0},    /* s */
  125.   {8,    6, 0},    /* t */      /* t modified to fit the struct gen_ pattern */
  126.   {0,    0, 0},    /* u - not general model */
  127.   {2,    4, 0},    /* v */
  128.   {3,    3, 0},    /* w */
  129.   {0,    0, 0},    /* x */
  130.   {0,    0, 0},    /* y */
  131.   {0,    0, 0},    /* z */
  132.   }
  133. #endif
  134. ;
  135.  
  136. GLOBAL int
  137.     EndRead,
  138.     InputLineNumber,
  139.     ErrorFlag,
  140.     WarningFlag,
  141.     FatalErrorFlag;
  142.  
  143.     /* FSTATUS values */
  144. #define ATEOL        1
  145. #define PUSHTOKEN    2
  146. #define    NEWCARD        3
  147.  
  148. GLOBAL    char    *InputCharPtr;
  149.  
  150. GLOBAL    double    RDSec;        /* time needed for ReadIn */
  151. #define    RDTIM    RDSec
  152.  
  153. GLOBAL    int    SuppressPrint;
  154. #define    SUPPRESS    SuppressPrint
  155.  
  156.     /* define the names of the probe.dat and probe.txt files */
  157. GLOBAL    char    ProbeBinaryFile[MBUFF];
  158. GLOBAL    char    ProbeTextFile[MBUFF];
  159.  
  160. #if CTYPE & ( DOS | D16 )
  161. GLOBAL    char    ConfigSys[]
  162. #ifdef Main_Pgm
  163.  = "\nIncrease the \"FILES\" parameter in file \"\\CONFIG.SYS\" then reboot.\n\n"
  164. #endif
  165.                 ;
  166. #define    CONFIG_SYS_MSG    printf(ConfigSys)
  167. #define CONFIG_SYS_TEST    TestConfigSys()
  168. #else
  169. #define    CONFIG_SYS_MSG
  170. #define    CONFIG_SYS_TEST
  171. #endif
  172.  
  173.  
  174.