home *** CD-ROM | disk | FTP | other *** search
/ Whiteline: Alpha / Whiteline Alpha.iso / progtool / c / xacclib / gemext.h next >
Encoding:
C/C++ Source or Header  |  1994-09-22  |  2.0 KB  |  57 lines

  1. /*
  2.  * gemext : extension for gemlib bindings (++jrb    bammi@cadence.com)
  3.  */
  4.  
  5. #ifndef _COMMON_H
  6. #define _COMMON_H
  7.  
  8. /* Array sizes in vdi control block */
  9.  
  10. #define CNTRLMAX    12   /* It seems that 11 is enough - max reached
  11.                                     for vex_* functions */
  12. #define INTINMAX   255    /* This library will allow strings up to this
  13.                                       size in v_gtext and vr[qm]_string */
  14. #define INTOUTMAX   45    /* A limit for number of elements in _intout
  15.                                    for usual functions - reached for v_opnwk */
  16. #define PTSINMAX  1024    /* Max number of points in _ptsin - 2 shorts
  17.                                    for a point.  Value raised to accomodate
  18.                                    TT and fsmgdos printer drivers */
  19. #define PTSOUTMAX    6    /* Max number of points in _ptsout - 2 shorts
  20.                                    for a point.  Max reached in v_opnwk    */
  21.  
  22. /* Size for _global in aes control block - most other stuff overlapped
  23.    with arrays for vdi - sizes needed for _control, _int_in, _int_out,
  24.    respectively are 5, 16 and 7 shorts and 2 and 1 longs for
  25.    _addrin and addrout */
  26.  
  27. #define GLOBMAX    15
  28.  
  29. #define _control    (&_contrl[0])
  30. #define _int_in    (&_intin[0])
  31. #define _int_out    (&_intout[0])
  32. #define _addrin    ((void **)(&_ptsin[0]))
  33. #define _addrout    ((void **)(&_ptsout[0]))
  34.  
  35.  
  36. /* code up _control[] elements for __aes__() calls
  37.  * (evaluated at compile time,  no runtime overhead)
  38.  * see common.c for encoding semantics.
  39.  */
  40. #define AES_CONTROL_ENCODE(A, B, C, D) (unsigned long)  \
  41.             (                     \
  42.                     (((unsigned long)A) << 24) |   \
  43.                     (((unsigned long)B) << 16) |   \
  44.                     (((unsigned long)C) <<  8) |   \
  45.                     (((unsigned long)D)      )     \
  46.         )
  47.  
  48. extern short                _intin[INTINMAX], _intout[INTOUTMAX];
  49. extern short                _ptsin[2 * PTSINMAX], _ptsout[2 * PTSOUTMAX];
  50. extern unsigned short    _contrl[CNTRLMAX], _global[GLOBMAX];
  51. extern int                    gl_apid, gl_ap_version;
  52. extern void                    *_vdiparams[];
  53. #endif
  54.  
  55. /* aes trap interface func */
  56. extern int __aes__(unsigned long coded_control);
  57.