/**************************************************************************/
/*                                                                        */
/*                                 Sources                                */
/*                                from  the                               */
/*                           XSC SOFTWARE PACKAGE                         */
/*                                                                        */
/*                Copyright (c) 1997 University of Karlsruhe              */
/*                     Institute for Appl. Mathematics                    */
/*                                                                        */
/* This program is free software for non-commercial use. For details, see */
/* the file LICENSE.XSC, distributed with this software package.          */
/*                                                                        */
/* This program is distributed WITHOUT ANY WARRANTY. For details, see the */
/* file LICENSE.XSC, distributed with this software package.              */
/*                                                                        */
/**************************************************************************/

/* RCS $Id: o_type.h,v 1.2 1997/09/25 16:45:59 ae59 Exp $ */
/*
$Log: o_type.h,v $
 * Revision 1.2  1997/09/25  16:45:59  ae59
 * Copyright-message
 *
 * Revision 1.1  1994/01/27  13:23:41  ae59
 * Put under RCS control
 *
 */
/****************************************************************/
/*                                                              */
/*      Filename        : o_type.h                              */
/*                                                              */
/*      Date            : 1992-10-06                            */
/*      1992-11-06 : corrected ifdef 2 if 4 SUn_cpp_c =b=       */
/*      1992-07-21 : add sun4_gnuc and sun4_cpp_c =b=           */
/*                   changed new to new_d in a_pptr             */
/*      1992-06-23 : switched back to 80bit SW (SPARC)          */
/*      1992-05-11 : tenbyte (quad) support for SPARC FPU       */
/*      1991-08-05 : tenbyte defined by TByte                   */
/*      1991-07-08 : struct a_pptr changed                      */
/*      1991-06-20 : new type tenbyte                           */
/*      1991-06-12 : type a_pptr corrected                      */
/*      1991-04-18 : new type a_pptr                            */
/*      1991-01-23 : e_mtyp changed                             */
/*      1990-11-26 : ?_type.h files included in o_type.h        */
/****************************************************************/

typedef d_otpr dotprecision;

typedef struct bent {
                int line;
                char *function;
                char *filename;
                struct bent *pred;
                struct bent *succ;
               } bentry;

typedef struct aent {
                a_btyp   code;                  /* condition code group */
                unsigned int active : 1;        /* output generated     */
                unsigned int back : 1;          /* traceback generated  */
                unsigned int cont : 1;          /* execution continued  */
                unsigned int def : 1;           /* default action       */
                unsigned int stat : 1;          /* statically defined   */
                struct aent *succ;              /* linkage              */
                                                /* exception handler    */
#ifdef LINT_ARGS
                void (*action)(a_btyp,int,va_list);
#else
                void (*action)();
#endif
               } aentry;

typedef struct { int msgid; char *text; } e_mtyp;

struct intern
       {
       unsigned int z : 1; /* z    ==  0  number is non-zero           */
                           /* z    ==  1  identifies number zero       */
       unsigned int s : 1; /* s    ==  0 identifies positive numbers   */
                           /* s    ==  1 identifies negative numbers   */
       unsigned int r : 2; /* number of ulps for outer bound           */
       unsigned int f : 1; /* f    ==  0 permanent value               */
                           /* f    ==  1 temporary value               */
       a_intg e;           /* exponent of most significant a_btyp      */
                           /* mantissa digit m[0]                      */
                           /* the exponent of m[i] is e-i              */
       a_btyp l;           /* number of mantissa digits                */
       a_btyp *m;          /* mantissa digits                          */
       };

typedef struct intern *multiprecision;

typedef struct a_pptr
      {
      a_VOID new_d,  /* New Display. NULL if already installed. */
             old;    /* Old Display. */
      struct a_pptr * prev;
      } a_pptr;

#ifdef IEEE_HARDWARE
#if SUN4_OS4_C+SUN4_GNU_C+SUN4_CPP_C
/* #define __CB_SUN4_OS4_HARDWARE */
#endif
#endif

#ifdef __CB_SUN4_OS4_HARDWARE
#define t_size          16
#define ExtMantLen      14
#define ExtMantLenTenbyte 8	/* fuer t_dcnv, t_dmsc, t_rtrg */
#else
#define t_size          10
#define ExtMantLen       8
#define ExtMantLenTenbyte 8
#endif

typedef unsigned short int  ExtExp;
typedef unsigned char Digit;

typedef union {
   unsigned char c[t_size];
#if SUN4_CPP_C
   struct {
#else
   struct s{
#endif
#if INTEL
      Digit  digit[ExtMantLen];
      ExtExp exp;
#else
      ExtExp exp;
      Digit  digit[ExtMantLen];
#endif
   } s;
} TByte;

typedef TByte tenbyte;

/*
typedef struct a_tenb { unsigned char c[t_size]; } tenbyte;
*/
