home *** CD-ROM | disk | FTP | other *** search
/ Program Metropolis - Software Boutique 95 / SOFTWARECD.iso / stat45 / disk1 / develop.exe / DEMO.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-12-02  |  2.2 KB  |  67 lines

  1. /*--------- definition of data structures and function prototypes ----------*/
  2.  
  3. #define BYTE unsigned char
  4.  
  5. struct HeadTag {
  6.     char     Title[4];        /* title identifier - "CSS " */
  7.     long    Code;                /* -9876L */
  8.     long    NC;                /* number of cases */
  9.     long    NV;                /* number of variables */
  10.     long    Prec;                /* precision 4B or 8B */
  11.     long    NArr;                /* number of description arrays (from 5 to 8)*/
  12.     int    NCLen;            /* length of addit. information - currently 20 */
  13.     int    HLen;                /* length of header - currently 80 */
  14.     int    VLen;                /* total lenght of variable names - 8 * NV */
  15.     int    FLen;                /* total lenght of variable formats - 2 * NV */
  16.     int    MDLen;            /* total lenght of variable MD codes - Prec * NV */
  17.     int    SL1Len;            /* total length of first alpha descr. table - present
  18.                                     only if NArr >= 6 */
  19.     int    SL2Len;            /* total length of second alpha descr. table - present
  20.                                     only if NArr >= 7 */
  21.     int    SL3Len;            /* total length of third alpha descr. table - present
  22.                                     only if NArr >= 8 */
  23. };
  24.  
  25. #define SizeFH  (sizeof(struct HeadTag))
  26.  
  27. struct InfoTag {
  28.     long    MemVar;            /* total length of variable long names (labels/formulas) */
  29.     long    MemSvl;            /* total length of short alpha information */
  30.     long    MemLvl;            /* total length of long alpha information */
  31.     long    LCName;            /* length of case name (up to 20) */
  32.     long    ExtraInfo;        /* reserved (must by 0) for CSS3 and this is
  33.                            a length of extra info for STAT/W */
  34. };
  35.  
  36. #define    SizeFI     (sizeof(struct InfoTag))
  37.  
  38. struct FmTag {
  39.     char     Nz,        /* length of field */
  40.             Nd;        /* number of decimal places */
  41. };
  42.  
  43. union ValueTag {
  44.     double    d;        
  45.     float        f;
  46. };
  47.  
  48. struct LabTag {
  49.     float    V;        /* value of variable */
  50.     char    T[8];    /* alphanumeric for that value */
  51.     int    Offs;    /* offset for long label for that value */
  52. };
  53.  
  54. #define SizeLT    sizeof(struct LabTag)
  55.  
  56. /*--------------------------- function prototypes --------------------------*/
  57.  
  58. int    main(int  argc,char  * *argv);
  59. void    InitInputFile(void);
  60. void    PrintInputInfo(void);
  61. void    CreateOutputHeader(void);
  62. void    ProcessData(void);
  63. void fcopy( FILE * out, FILE * in, unsigned int size );
  64. void Ceil512( long * pL );
  65.  
  66. /*--------------------------------------------------------------------------*/
  67.