home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Database / CLIPR503.W96 / EXTEND.AP_ / EXTEND.AP
Text File  |  1995-06-26  |  3KB  |  125 lines

  1. /***
  2. *
  3. *   Extend.api
  4. *
  5. *   C language definitions for Clipper EXTEND system
  6. *
  7. *   Copyright (c) 1987-1995, Computer Associates International, Inc.
  8. *   All rights reserved.
  9. *
  10. *   CA-Clipper uses Microsoft C large model calling conventions
  11. *
  12. */
  13.  
  14.  
  15. #ifndef _EXTEND_API
  16.  
  17.    #define _EXTEND_API
  18.  
  19.    #ifdef __cplusplus
  20.       extern "C" {
  21.    #endif
  22.  
  23.    #ifndef _CLIPDEFS_H
  24.       #include "clipdefs.h"
  25.    #endif
  26.  
  27.    #ifndef CLIPPERDEFS
  28.       typedef double XDOUBLE;
  29.    #endif
  30.  
  31.    #define UNDEF        0
  32.    #define CHARACTER    1
  33.    #define NUMERIC      2
  34.    #define LOGICAL      4
  35.    #define DATE         8
  36.    #define ALIAS       16
  37.    #define MPTR        32      /* or'ed with type when passed by reference */
  38.    #define MEMO        64
  39.    #define ARRAY      512
  40.    #define BLOCK     1024
  41.    #define DOUBLE    2048
  42.  
  43.  
  44.    // value types
  45.  
  46.    #define S_ANY                0xFFFF
  47.    #define S_UNDEF                  0
  48.    #define S_WORD                   1
  49.    #define S_LNUM                   2
  50.    #define S_RES1                   4
  51.    #define S_DNUM                   8
  52.    #define S_RES2                  16
  53.    #define S_LDATE                 32
  54.    #define S_RES3                  64
  55.    #define S_LOG                  128
  56.    #define S_SYM                  256
  57.    #define S_ALIAS                512
  58.    #define S_CHAR                1024
  59.    #define S_MEMO     (2048 | S_CHAR)
  60.    #define S_BLOCK               4096
  61.    #define S_VREF                8192
  62.    #define S_MREF               16384
  63.    #define S_ARRAY             0x8000
  64.  
  65.    #define S_ANYNUM   (S_LNUM   | S_DNUM)
  66.    #define S_ANYEXP   (S_ANYNUM | S_CHAR | S_LDATE | S_LOG)
  67.  
  68.  
  69.    /* parameter count/type */
  70.    extern int _parinfo( int );
  71.    extern int _parinfa( int, unsigned int );
  72.  
  73.  
  74.    /* parameter values */
  75.    extern char *       _parc(int, ...);
  76.    extern unsigned int _parcsiz(int, ...);
  77.    extern unsigned int _parclen(int, ...);
  78.    extern int          _parni(int, ...);
  79.    extern long         _parnl(int, ...);
  80.    extern XDOUBLE      _parnd(int, ...);
  81.    extern int          _parl(int, ...);
  82.    extern char *       _pards(int, ...);
  83.  
  84.  
  85.    /* return a value */
  86.    extern void _retc(BYTEP);
  87.    extern void _retclen(char far *, unsigned int);
  88.    extern void _retni(int);
  89.    extern void _retnl(long);
  90.    extern void _retnd(XDOUBLE);
  91.    extern void _retl(BOOL);
  92.    extern void _retds(char far *);
  93.  
  94.  
  95.    /* return no value (NIL) */
  96.    extern void _ret(void);
  97.  
  98.  
  99.    /* store values */
  100.    int _storc(char far *, int, ...);
  101.    int _storclen(char far *, int, ...);
  102.    int _storni(int, int, ...);
  103.    int _stornl(long, int, ...);
  104.    int _stornd(XDOUBLE, int, ...);
  105.    int _storl(int, int, ...);
  106.    int _stords(char far *, int, ...);
  107.  
  108.  
  109.    /* parameter check macros */
  110.    #define PCOUNT       (_parinfo(0))
  111.    #define ISCHAR(n)    (_parinfo(n) & CHARACTER)
  112.    #define ISNUM(n)     (_parinfo(n) & NUMERIC)
  113.    #define ISLOG(n)     (_parinfo(n) & LOGICAL)
  114.    #define ISDATE(n)    (_parinfo(n) & DATE)
  115.    #define ISMEMO(n)    (_parinfo(n) & MEMO)
  116.    #define ISBYREF(n)   (_parinfo(n) & MPTR)
  117.    #define ISARRAY(n)   (_parinfo(n) & ARRAY)
  118.    #define ALENGTH(n)   (_parinfa(n, 0))
  119.  
  120.    #ifdef __cplusplus
  121.       }
  122.    #endif
  123.  
  124. #endif
  125.