home *** CD-ROM | disk | FTP | other *** search
- /***
- *
- * Extend.api
- *
- * C language definitions for Clipper EXTEND system
- *
- * Copyright (c) 1987-1995, Computer Associates International, Inc.
- * All rights reserved.
- *
- * CA-Clipper uses Microsoft C large model calling conventions
- *
- */
-
-
- #ifndef _EXTEND_API
-
- #define _EXTEND_API
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #ifndef _CLIPDEFS_H
- #include "clipdefs.h"
- #endif
-
- #ifndef CLIPPERDEFS
- typedef double XDOUBLE;
- #endif
-
- #define UNDEF 0
- #define CHARACTER 1
- #define NUMERIC 2
- #define LOGICAL 4
- #define DATE 8
- #define ALIAS 16
- #define MPTR 32 /* or'ed with type when passed by reference */
- #define MEMO 64
- #define ARRAY 512
- #define BLOCK 1024
- #define DOUBLE 2048
-
-
- // value types
-
- #define S_ANY 0xFFFF
- #define S_UNDEF 0
- #define S_WORD 1
- #define S_LNUM 2
- #define S_RES1 4
- #define S_DNUM 8
- #define S_RES2 16
- #define S_LDATE 32
- #define S_RES3 64
- #define S_LOG 128
- #define S_SYM 256
- #define S_ALIAS 512
- #define S_CHAR 1024
- #define S_MEMO (2048 | S_CHAR)
- #define S_BLOCK 4096
- #define S_VREF 8192
- #define S_MREF 16384
- #define S_ARRAY 0x8000
-
- #define S_ANYNUM (S_LNUM | S_DNUM)
- #define S_ANYEXP (S_ANYNUM | S_CHAR | S_LDATE | S_LOG)
-
-
- /* parameter count/type */
- extern int _parinfo( int );
- extern int _parinfa( int, unsigned int );
-
-
- /* parameter values */
- extern char * _parc(int, ...);
- extern unsigned int _parcsiz(int, ...);
- extern unsigned int _parclen(int, ...);
- extern int _parni(int, ...);
- extern long _parnl(int, ...);
- extern XDOUBLE _parnd(int, ...);
- extern int _parl(int, ...);
- extern char * _pards(int, ...);
-
-
- /* return a value */
- extern void _retc(BYTEP);
- extern void _retclen(char far *, unsigned int);
- extern void _retni(int);
- extern void _retnl(long);
- extern void _retnd(XDOUBLE);
- extern void _retl(BOOL);
- extern void _retds(char far *);
-
-
- /* return no value (NIL) */
- extern void _ret(void);
-
-
- /* store values */
- int _storc(char far *, int, ...);
- int _storclen(char far *, int, ...);
- int _storni(int, int, ...);
- int _stornl(long, int, ...);
- int _stornd(XDOUBLE, int, ...);
- int _storl(int, int, ...);
- int _stords(char far *, int, ...);
-
-
- /* parameter check macros */
- #define PCOUNT (_parinfo(0))
- #define ISCHAR(n) (_parinfo(n) & CHARACTER)
- #define ISNUM(n) (_parinfo(n) & NUMERIC)
- #define ISLOG(n) (_parinfo(n) & LOGICAL)
- #define ISDATE(n) (_parinfo(n) & DATE)
- #define ISMEMO(n) (_parinfo(n) & MEMO)
- #define ISBYREF(n) (_parinfo(n) & MPTR)
- #define ISARRAY(n) (_parinfo(n) & ARRAY)
- #define ALENGTH(n) (_parinfa(n, 0))
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif
-