home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / e / e065 / 2.ddi / UIO_STRC.H < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-28  |  5.8 KB  |  197 lines

  1. /*******************************************************************/
  2. /*                                                                 */
  3. /*    uio_strc.h - structure definitions for UserIO interface      */
  4. /*                 arguments                                       */
  5. /*    Author: John C. Fairman           August 31, 1990            */
  6. /*    Copyright 1990 by NeuralWare Inc.                            */
  7. /*                                                                 */
  8. /*    $Author   :  $                                               */
  9. /*    $Date     :  $                                               */
  10. /*    $Source   :  $                                               */
  11. /*    $Revision :  $                                               */
  12. /*    $Log      :  $                                               */
  13. /*                                                                 */
  14. /*******************************************************************/
  15.  
  16. #ifndef UIO_STRC_H
  17. #define UIO_STRC_H 1
  18.  
  19.  
  20.  
  21. #if 0 /* If you want a full test you must define FULLTEST here
  22.      since THINK_C doesn't have command line defines */
  23. #ifdef THINK_C
  24. #define FULLTEST       1
  25. #endif  /* THINK_C */
  26. #endif
  27.  
  28.  
  29.  
  30. /* */
  31. typedef struct {
  32.   SREAL        ape_I;                 /* sum */
  33.   SREAL        ape_Tran;              /* tran */
  34.   SREAL        ape_Output;            /* output */
  35.   SREAL        ape_Err;               /* error */
  36.   SREAL        ape_CumErr;            /* cumulative error */
  37.   UNINT        ape_Flags;             /* flags */
  38. } APE;
  39.  
  40. typedef struct {
  41.   SL           asc_recall;            /* recall counter */
  42.   SREAL        asc_rcl[5];            /* recall data */
  43.   SL           asc_learn;             /* learn counter */
  44.   SREAL        asc_lrn[4];            /* learn data */
  45. } ASCOL;
  46.  
  47. typedef struct {
  48.   TEXT         asc_nam[16];           /* schedule name */
  49.   ASCOL        asc_col[5];            /* data columns */
  50. } ASCHED;
  51.  
  52. typedef struct {
  53.   UNINT        start_in;
  54.   UNINT        start_out;
  55.   SREAL        min_in;
  56.   SREAL        max_in;
  57.   SREAL        min_out;
  58.   SREAL        max_out;
  59. } IOPARMS;
  60.  
  61. #ifndef N2PRUNE
  62. #ifndef NPHIST
  63. #define NPHIST   100          /* # of items in histogram */
  64. #endif
  65. typedef struct {
  66.   SL       PRNwts;          /* # of weights in network */
  67.  
  68.   SREAL    PRMin;           /* smallest weight */
  69.   SREAL    PRMax;           /* maximum weight */
  70.   SREAL    PRSum;           /* sum of weights */
  71.   SREAL    PRAverage;       /* average weight */
  72.   SREAL    PRMedian;        /* median value */
  73.   NINT     PRHist[NPHIST];  /* histogram of weights */
  74.  
  75.   SREAL    PRMinA;          /* min absolute magnitude */
  76.   SREAL    PRMaxA;          /* max absolute magnitude */
  77.   SREAL    PRSumA;          /* sum of abs values */
  78.   SREAL    PRAverageA;      /* average absolute weight */
  79.   SREAL    PRMedianA;       /* median of magnitudes */
  80.   NINT     PRHistA[NPHIST]; /* histogram of magnitudes */
  81. } PRSTATS;                    /* prune statistics */
  82. #endif
  83.  
  84. /* Window management */
  85. #if defined(USES_WINDOWS) && !defined(TEST)
  86. struct _uwin                    /* user i/o window */
  87. {
  88.   UB        uw_flag;          /* flag for in use */
  89. #define UWF_INUSE   0x01   /* this window is "inuse" */
  90. #define UWF_UNDISP  0x02   /* window has been erased */
  91.   UB        uw_color;         /* background color */
  92.   RECTANGLE uw_box;           /* coordinates of the box */
  93. };
  94. typedef struct _uwin       UWIN;
  95.  
  96. #define NWINS          8
  97. #endif /* defined(USES_WINDOWS) && !defined(TEST) */
  98.  
  99. /* Host UIO errors */
  100. #define UNABLE_TO_ALLOCATE_VEC      0x80
  101.  
  102. /* Server UIO errors */
  103. #define BAD_WINDOW_NUMBER           0x90
  104.  
  105. /* User Return Values */
  106. #define UIO_OK                      0
  107. #define UIO_UPDATE                  1
  108. #define UIO_EXIT                    2
  109. #define UIO_ERROR                  -1
  110.  
  111.  
  112. #ifdef HOME_FOR_UIO_DATA
  113.  
  114.  
  115. #ifdef UIO_SERVER
  116. NINT                  gm_intcolor;        /* interior color */
  117. NINT                  gm_outcolor;        /* outline color */
  118. NINT                  gm_txtcolor;        /* text color */
  119. #endif
  120.  
  121. #if !defined(UIO_SERVER) || !defined(EMULATING)
  122. NINT                  UIO_error_value = 0;
  123. #else /* !defined(UIO_SERVER) || !defined(EMULATING) */
  124. IMPORT NINT           UIO_error_value;
  125. #endif /* else of !defined(UIO_SERVER) || !defined(EMULATING) */
  126.  
  127. #else  /* HOME_FOR_UIO_DATA */
  128.  
  129. IMPORT NINT           UIO_error_value;
  130.  
  131.  
  132. #ifdef UIO_SERVER
  133. IMPORT NINT           gm_intcolor;        /* interior color */
  134. IMPORT NINT           gm_outcolor;        /* outline color */
  135. IMPORT NINT           gm_txtcolor;        /* text color */
  136. #endif
  137.  
  138. #endif /* HOME_FOR_UIO_DATA */
  139.  
  140.  
  141. #ifndef SKIP_COMPAT_DATA
  142.  
  143. #ifdef HOME_FOR_COMPAT_DATA
  144. SREAL *IODATA  = (SREAL *)NULL;
  145. NINT  IOCOUNT  = 0;
  146. NINT  IOLAYER  = 0;
  147. NINT  IOREQCDE = 0;
  148. NINT  IORTNCDE = 0;
  149. #else /* HOME_FOR_COMPAT_DATA */
  150. IMPORT SREAL *IODATA;
  151. IMPORT NINT  IOCOUNT;
  152. IMPORT NINT  IOLAYER;
  153. IMPORT NINT  IOREQCDE;
  154. IMPORT NINT  IORTNCDE;
  155. #endif /* else of HOME_FOR_COMPAT_DATA */
  156.  
  157. #endif /* USES_COMPAT_DATA */
  158.  
  159. /* */
  160.  
  161. #ifdef MAC
  162. #include   "macuio.h"
  163. #endif
  164.  
  165. /* Usual configuration */
  166. #define GRUPDATE(a, b, c) GRUpdate(a, b, c); /* <- note ';' */
  167. #define MOVEMEM(a, b, c) memcpy((char *)a, (char *)b, (size_t)c)
  168. #define SET_STRUCTS_EQ(a, b) a = (b)
  169. #define CTRIO_T long
  170. #define TRIAL_NUM_T long
  171. #define MSGLEN_T int
  172. #define MSGDIR_T int
  173.  
  174. /* Variants from the usual configuration */
  175. #if defined(IBP) || defined(I860) || defined(IBM)
  176. #ifdef HOST
  177. #undef CTRIO_T
  178. #define CTRIO_T int
  179. #undef TRIAL_NUM_TYPE
  180. #define TRIAL_NUM_TYPE int
  181. #endif
  182. #if defined(NDP) || defined (__ZTC__)
  183. #define REAL_ARGS_PROBLEM
  184. #endif
  185. #endif
  186.  
  187. #if defined(MAC)
  188. #ifdef HOST
  189. #undef MSGLEN_T
  190. #define MSGLEN_T short
  191. #undef MSGDIR_T
  192. #define MSGDIR_T short
  193. #endif
  194. #endif
  195.  
  196. #endif /* ifndef UIO_STRC_H */
  197.