.ad 8
.bm 8
.fm 4
.bt $Copyright (c) 1997-2004 SAP AG$$Page %$
.tm 12
.hm 6
.hs 3
.tt 1 $SQL$Project Distributed Database System$VSP00C$
.tt 2 $$$
.tt 3 $$                        $1998-07-01$
***********************************************************
.nf

.nf


    ========== licence begin  GPL
    Copyright (c) 1997-2004 SAP AG

    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
    as published by the Free Software Foundation; either version 2
    of the License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    ========== licence end

.fo


.fo
.nf
.sp
Module  : basic_constants_and_types
=========
.sp
Purpose : This are the constants and types
          of the database project,
          which are the basis for
	  all C moduls.
.CM *-END-* purpose -------------------------------------
.sp
.cp 3
Define  :
 
.CM *-END-* define --------------------------------------
.sp;.cp 3
Use     :
 
.CM *-END-* use -----------------------------------------
.sp;.cp 3
Synonym :
 
.CM *-END-* synonym -------------------------------------
.sp;.cp 3
Author  :
.sp
.cp 3
Created :
.sp
.cp 3
Version : 1997-07-09
.sp
.cp 3
Release :      Date : 1998-07-01
.sp
***********************************************************
.sp
.cp 10
.fo
.oc _/1
Specification:
 
.CM *-END-* specification -------------------------------
.sp 2
***********************************************************
.sp
.cp 10
.fo
.oc _/1
Description:
 
.CM *-END-* description ---------------------------------
.sp 2
***********************************************************
.sp
.cp 10
.nf
.oc _/1
Structure:
 
.CM *-END-* structure -----------------------------------
.sp 2
**********************************************************
.sp
.cp 10
.nf
.oc _/1
.CM -lll-
Code    :
/*PRETTY*/
 
/*
 * ===========================================================================
 *      Includes
 * ===========================================================================
 */
 
#if MSDOS || OS2 ||  _WIN32
 
#include           <time.h>
#include           <ctype.h>
#include           <memory.h>
#include           <errno.h>
#include           <string.h>
#include           <stdlib.h>
#include           <signal.h>
#include           <stddef.h>
#include           <limits.h>
#include           <math.h>
#include           <stdio.h>
#include           <process.h>
 
#if defined(_WIN32)
 #include        <windows.h>
#endif
 
#else
#if	HP9
#define	_CLASSIC_XOPEN_TYPES
#endif
 
#if ! T35 && ! T33
#include	<stdlib.h>
#endif
#if T31
#include	<libc.h>
#endif
#if ! MSDOS && ! OS2 && ! _WIN32
#include        <unistd.h>
#endif
#include        <stdio.h>
#include        <string.h>
#include        <memory.h>
#include        <errno.h>
#include        <sys/types.h>
#endif
 
/*
 * ===========================================================================
 *      Constants
 * ===========================================================================
 */
&if $OSSPEC not in [ OSF1 ]
#undef          NULL
#define         NULL                    0L
&endif
#undef          FALSE
#define         FALSE                   0
#undef          TRUE
#define         TRUE                    1
 
#define         UNDEF                   -1
 
/*
 *  Move/Size constants
 */
#define         MX_IDENTIFIER           64      /*vsp00*/
#define         MX_SQLPW                18      /*vsp00*/
#define         MX_LINE                 132     /*vsp00*/
#define         MXSP_NAME               18
#define         MXSP_C2                 2
#define         MXSP_C8                 8
#define         MXSP_C18                18
#define         MXSP_C24                24
#define         MXSP_C64                64
#define         MXSP_C70                70
#define         MXSP_C80                80
#define         MXSP_PACKETHEAD         40
#define         MXSP_TERMID             18
 
 
#define         MX_DBNAME               18      /*vsp00*/
 
#define         MX_NODEID               64      /*vsp00*/
 
#define  CSP_UNICODE  20
#define  CSP_UNICODE_SWAP 19
#define  CSP_DEFINED_BYTE  '\00'
 
#define  BSP_C1  ' '
#define  BSP_C18  "                  "
#define  BSP_C64 \
 "                                                                "
#define  BSP_NAME      BSP_C18
#define  BSP_DBNAME    BSP_C18
#define  BSP_NODEID    BSP_C64
 
/*
 *
 */
#define         MAX_CRYPT               6
#define         MAXARGLINELENGTH        132
#ifdef vers80
#define         MAXBUFFERLENGTH        32768 // PTS 1116801 E.Z.
#else
#define         MAXBUFFERLENGTH         8192
#endif
#define         MAXPAGELENGTH           8192
#define         DEVSPACE_PAGE_SHFT        13    // - 13 bit = 8192
#define         MAXCRYPTNAMELENGTH      6
#define         MAXCRYPTPWLENGTH        24
#define         MAXDEVNAMELENGTH        40
#define         MAXERRORTEXT            40
#define         MAXNAMELENGTH           18
 
#define         MAXUSERIDLENGTH         18
#define         MAXSQLDBNAMELENGTH      18
 
#define         MAXSQLNODEIDLENGTH      64
#define         MAXVFNLENGTH            256
#define         MAX_VF_LABEL_LENGTH     132
 
#define         csp_pool_buffers        16
 
/*
 tsp00_DataType
 */

#define  DFIXED  0
#define  DFLOAT  1
#define  DCHA  2
#define  DCHE  3
#define  DCHB  4
#define  DROWID  5
#define  DSTRA  6
#define  DSTRE  7
#define  DSTRB  8
#define  DSTRDB  9
#define  DDATE  10
#define  DTIME  11
#define  DVFLOAT  12
#define  DTIMESTAMP  13
#define  DUNKNOWN  14 	/* used for typecheck in dml */
#define  DNUMBER  15 	/*        "      " */
#define  DNONUMBER  16	/*        "      " */
#define  DDURATION  17 	/*        "      " */
#define  DDBYTEEBCDIC  18
#define  DLONGA  19
#define  DLONGE  20
#define  DLONGB  21
#define  DLONGDB  22
#define  DBOOLEAN  23
#define  DUNICODE  24
#define  DDTFILLER1  25
#define  DDTFILLER2  26
#define  DDTFILLER3  27
#define  DDTFILLER4  28
#define  DSMALLINT  29
#define  DINTEGER  30
#define  DVARCHARA  31
#define  DVARCHARE  32
#define  DVARCHARB  33
#define  DSTRUNI  34
#define  DLONGUNI  35
#define  DVARCHARUNI  36
#define  DUDT  37

#define  CSP_DCOM_WRONG_FIRST_PARAM				0x80040200L
#define  CSP_DCOM_TOO_MANY_OUT_PARAM			0x80040201L
#define  CSP_DCOM_UNSUPPORTED_PARAM_TYPE   		0x80040202L
#define  CSP_DCOM_MISSING_USERTYPE_GUID   		0x80040203L
#define  CSP_DCOM_TOO_MANY_INTERFACES   		0x80040204L
#define  CSP_DCOM_PROGID_NOT_FOUND      		0x80040205L
#define  CSP_DCOM_INPROCSERVER_NOT_FOUND   		0x80040206L
#define  CSP_DCOM_LOCALSERVER_NOT_FOUND    		0x80040207L
#define  CSP_DCOM_METHOD_NOT_FOUND    			0x80040208L
#define  CSP_DCOM_COGUID_NOT_FOUND_IN_TYPELIB   0x80040209L
#define  CSP_DCOM_NO_COCLASS_OBJECT_FOUND       0x80040210L
#define  CSP_DCOM_DBPROC_CRASHED                0x80040211L
/*
 * ===========================================================================
 *      Types
 * ===========================================================================
 */
 
/*
 *  conditional int. used for strncpy(arg3),... fread(arg2),...
 */
#if     ( T35 && ! TOS41 ) || SCO
#       define          CINT            unsigned
#else
#   if     OSF1
#       define          CINT            size_t
#   else
#       define          CINT            int
#   endif
#endif
 
typedef long                    tsp00_Longint ;
typedef char                    tsp00_Uint1 ; /* VSP00: Range 0-127 */
typedef unsigned char           UINT1 ;
typedef short                   tsp00_Int2 ;
typedef unsigned short          UINT2 ;
#ifdef BIT64
typedef int                     tsp00_Int4 ;
typedef unsigned int            UINT4 ;
#else
typedef long                    tsp00_Int4 ;
typedef unsigned long           UINT4 ;
#endif
typedef unsigned char           BOOLEAN ;
#ifndef WIN32
#ifndef _CHAR
#define _CHAR
typedef unsigned char           CHAR ;
#endif
#endif
#ifndef	_UCHAR
#define	_UCHAR
typedef unsigned char           UCHAR ;
#endif
typedef unsigned char           enum1 ;
typedef float                   FLOAT4 ;
typedef double                  FLOAT8 ;
typedef long                    LONG ;
#ifndef	_ULONG
#define	_ULONG
typedef unsigned long           ULONG;
#endif
 
typedef tsp00_Int4                PROCESS_ID ;
typedef tsp00_Int4                REGION_ID ;
typedef tsp00_Int2                isolation_level ;
 
typedef FLOAT4                  tsp00_Shortreal ;
typedef FLOAT8                  tsp00_Longreal ;

/* 
kollidiert mit Definition in vjk001c
typedef char*                   tsp00_Addr ;
*/
/*
typedef char                    C2   [ 2 ];
typedef char                    C3   [ 3 ];
typedef char                    C4   [ 4 ];
typedef char                    C8   [ 8 ];
typedef char                    C9   [ 9 ];
typedef char                    C10  [ 10 ];
typedef char                    C12  [ 12 ];
typedef char                    C16  [ 16 ];
typedef char                    C18  [ 18 ];
typedef char                    C19  [ 19 ];
typedef char                    C20  [ 20 ];
typedef char                    C24  [ 24 ];
typedef char                    C40  [ 40 ];
typedef char                    C64  [ 64 ];
typedef char                    C80  [ 80 ];
typedef char                    C132 [ 132 ];
typedef char                    C256 [ 256 ];
*/
typedef char                    C80C [ 81 ];
 
typedef char                    tsp00_C2   [ 2 ];
typedef char                    tsp00_C3   [ 3 ];
typedef char                    tsp00_C4   [ 4 ];
typedef char                    tsp00_C5   [ 5 ];
typedef char                    tsp00_C6   [ 6 ];
typedef char                    tsp00_C8   [ 8 ];
typedef char                    tsp00_C9   [ 9 ];
typedef char                    tsp00_C10  [ 10 ];
typedef char                    tsp00_C12  [ 12 ];
typedef char                    tsp00_C16  [ 16 ];
typedef char                    tsp00_C18  [ 18 ];
typedef char                    tsp_c19  [ 19 ];
typedef char                    tsp00_C20  [ 20 ];
typedef char                    tsp00_C24  [ 24 ];
typedef char                    tsp00_C40  [ 40 ];
typedef char                    tsp00_C64  [ 64 ];
typedef char                    tsp00_C70  [ 70 ];
typedef char                    tsp00_C80  [ 80 ];
typedef char                    tsp00_C132 [ 132 ];
typedef char                    tsp00_C256 [ 256 ];
 
#if OSF1	/* shared mem: each element must be 4- or 8-byte aligned */
typedef char                    C64C [ 68 ];
typedef char                    C40C [ 44 ];
typedef char                    SQL_NODEIDC [ MX_NODEID + 4 ];
typedef char                    SQL_DBNAMEC [ MX_DBNAME + 4 ];
typedef char                    C8C  [ 12 ];
typedef char                    DEVSPACENAMEC [ MAXDEVNAMELENGTH + 4 ];
typedef char                    VF_FILENAMEC  [ MAXVFNLENGTH + 4 ];
#else
typedef char                    C64C [ 65 ];
typedef char                    C40C [ 41 ];
typedef char                    SQL_NODEIDC [ MX_NODEID + 1 ];
typedef char                    SQL_DBNAMEC [ MX_DBNAME + 1 ];
typedef char                    C8C  [ 9 ];
typedef char                    DEVSPACENAMEC [ MAXDEVNAMELENGTH + 1 ];
typedef char                    VF_FILENAMEC [ MAXVFNLENGTH + 1 ];
#endif
 
typedef char                    tsp_argline [ MAXARGLINELENGTH ];
typedef CHAR                    tsp00_Buf [ MAXBUFFERLENGTH ];
typedef CHAR                    tsp00_Page [ MAXPAGELENGTH ];
typedef tsp00_Int4                tsp00_CryptName [ MAX_CRYPT ];
typedef CHAR                    tsp00_CryptPw  [ MAXCRYPTPWLENGTH ];
typedef CHAR                    CRYPTPWC [ MAXCRYPTPWLENGTH + 1 ];
typedef char                    tsp00_DevName   [ MAXDEVNAMELENGTH ];
typedef char                    tsp00_ErrText [ MAXERRORTEXT ];
typedef char                    tsp00_Line  [ MX_LINE ];
typedef char                    LINEC [ MX_LINE + 1 ];
typedef char                    tsp00_Name  [ MAXNAMELENGTH ] ;
typedef char                    NAMEC [ MAXNAMELENGTH + 1 ];
typedef tsp00_C12                 tsp00_Sname;
typedef char                    tsp00_Lname[32];
typedef tsp00_C18                 SQL_CHARSETNAME ;
typedef char                    tsp00_DbName  [ MX_DBNAME ];
typedef char                    tsp00_NodeId  [ MX_NODEID ];
typedef char                    SQL_PASSWORD  [ MX_SQLPW ]; /*vsp00*/
typedef char                    SQL_PASSWORDC [ MX_SQLPW + 1 ]; /*vsp00*/
typedef char                    tsp00_KnlIdentifier [ MX_IDENTIFIER ]; /*vsp00*/
typedef char                    tsp_knl_identifierC [ MX_IDENTIFIER+1];
 
/*
 *  For vsp001c
 */
typedef char                    tsp00_MoveObj [ 8192000 ];
typedef tsp00_MoveObj*          tsp00_MoveObjPtr;
typedef char                    tsp00_ResNum [ 7 ];
typedef char                    tsp00_SqlState [ 5 ];
typedef char                    tsp00_WarningSet [ 2 ];
typedef char                    tsp00_SwapKind [ 1 ];
typedef char                    tsp00_DataType [ 1 ];
#define	CSP_MAXVARIABLES	2000
 
typedef tsp00_Page                * BUFFERADDRESS ;
 
typedef enum1                           tsp00_CodeType ;
#define         is_ascii                0
#define         is_ebcdic               1
#define         is_codeneutral          2
 
typedef enum1                           tsp_process_type ;
#define         PT_RTE                  0
#define         PT_UTILITY              1
#define         PT_TIMEOUT              2
#define         PT_USER                 3
#define         PT_LOGWRITER1           4
#define         PT_LOGWRITER2           5
#define         PT_BUFWRITER            6
#define         PT_SENDER               7
#define         PT_RECEIVER             8
#define         PT_SERVER               9
#define         PT_BUFREADER            10
 
typedef enum1                           tsp_shutdown_mod ;
#define         SHUTDOWN_KILL           0
#define         SHUTDOWN_NORMAL         1
#define         SHUTDOWN_REINIT         2
 
struct tsp00_RteCommRec
{
	BOOLEAN                         to_cancel ;
	BOOLEAN                         rte_fill1 ;
	tsp00_Int2                        virt_reads ;
	tsp00_Int4                        file_root ;
	tsp00_Int4                        file_record_cnt ;
};
 
/*
 *  *********************************************************
 */
typedef char                            tsp00_NumError ;
#define         num_ok                  0
#define         num_trunc               1
#define         num_overflow            2
#define         num_invalid             3
#define         num_incompatible        4
#define         num_missing_addr        5
 
typedef	enum1				tsp00_VaReturn ;
#define		va_ok			0
#define		va_notok		1
#define		va_eof			2
#define		va_wait_first		3
 
/*
 *  Virtual printer *****************************************
 */
typedef enum1                   tsp00_VpLinefeeds ;
#define         VP_NOLF         0
#define         VP_ONELF        1
#define         VP_TWOLF        2
#define         VP_THREELF      3
#define         VP_PAGE         4
 
#define MX_PRLINE               256     /*vsp00*/
typedef tsp00_C256                tsp00_PrtLine ;
typedef tsp00_C64                 tsp00_PrtName ;
typedef C64C                    PRINTERNAMEC ;
 
/*
 *  Virtual file *****************************************
 */
typedef enum1                           tsp00_VFileOpCodes ;
#define         VREAD                   0
#define         VWRITE                  1
#define         VAPPEND                 2
#define         VOVERWRITE              3
#define         VREAD_ORA               4
 
typedef enum1                           tsp00_VfFormat ;
#define         vf_plaintext            0
#define         vf_record               1
#define         vf_stream               2
#define         vf_unknown              3
#define         vf_4k_block             4
 
typedef enum1                           tsp00_VfReturn ;
#define         VF_OK                   0
#define         VF_NOTOK                1
#define         VF_EOF                  2
#define         VF_NOSEEK               3
 
typedef enum1                           tsp00_VfResource ;
#define         vf_stack                0
#define         vf_bufferpool           1
 
typedef enum1                           tsp00_VfType ;
#define         vf_t_unknown            0
#define         vf_t_file               1
#define         vf_t_pipe               2
#define         vf_t_raw                3
#define         vf_t_tape_norew         4
#define         vf_t_tape_rew           5
 
typedef tsp00_Page                tsp_vf_buffer [ 16 ];
typedef char                    * tsp_vf_bufaddr ; /* different type in vsp00 */
typedef char                    tsp00_VFilename[ MAXVFNLENGTH ];
typedef char       		tsp_vf_label [MAX_VF_LABEL_LENGTH] ;
 
/* ***** sqlexec ********************************************** */
 
typedef enum1                           tsp00_ExecMode ;
#define         ASYNC                   0
#define         SYNC_NEW_SESSION        1
#define         SYNC_SAME_SESSION       2
 
typedef enum1                           tsp00_ExecReturn ;
#define         E_OK                    0
#define         E_NOTOK                 1
#define         E_NO_EXEC               2
#define         E_NO_ASYNC              3
#define         E_NO_SYNC               4
#define         E_NO_SYNC_NEW           5
#define         E_NO_SYNC_SAME          6
 
#define         MX_EXECPROG             64
#define         MX_EXECARG              512
#define         MX_EXECLINE             512
 
#define  VM_DATAPART  0
#define  VM_ALLDATA  1
#define  VM_LASTDATA  2
#define  VM_NODATA  3
#define  VM_NO_MORE_DATA  4
#define  VM_LAST_PUTVAL  5
#define  VM_DATA_TRUNC  6
#define  VM_CLOSE  7
#define  VM_ERROR  8
 
typedef signed char tsp00_ValMode;
 
typedef BOOLEAN *tsp00_BoolAddr;
 
 
typedef  char tsp00_ExecProg    [ MX_EXECPROG ] ;
typedef  char tsp00_ExecArgLine [ MX_EXECARG  ] ;
typedef  char exec_progname_c [ MX_EXECPROG + 1 ] ;
typedef  char exec_argline_c  [ MX_EXECARG  + 1 ] ;
typedef  char tsp00_ExecLine    [ MX_EXECLINE ] ;
 
/*
 *  Communication *****************************************
 */
 
typedef	enum1				SQL_OS ;
#define         os_unix                 0
#define         OS_UNIX                 os_unix
#define         OS_VMS                  1
#define         OS_WINDOWS              2
#define         OS_WIN32                3
#define         OS_OS2                  4
typedef signed char tsp00_Os;
 
typedef enum1                           tsp_comm_error ;
#define         SQLOK                   0
#define         SQLNOTOK                1
#define         SQLTASKLIMIT            2
#define         SQLTIMEOUT              3
#define         SQLCRASH                4
#define         SQLSTART_REQUIRED       5
#define         SQLSHUTDOWN             6
#define         SQLSEND_LINE_DOWN       7
#define         SQLRECEIVE_LINE_DOWN    8
#define         SQLPACKETLIMIT          9
#define         SQLRELEASED             10
 
typedef enum1                           tsp00_Service ;
#define         SQL_USER                0
#define         SQL_ASYNC_USER          1
#define         SQL_UTILITY             2
#define         SQL_DISTRIBUTION        3
 
/*
 *  Disk IO *****************************************
 */
 
typedef enum1                           tsp_io_op_code ;
#define         DEV_READ                0
#define         DEV_WRITE               1
 
typedef enum1                           tsp_v2_return ;
#define         V2_OK                   0
#define         V2_NOTOK                1
#define         V2_NOSUPPORT            2
 
typedef enum1                           tsp_v2_devno ;
#define         V2_DEV1                 0
#define         V2_DEV2                 1
#define         V2_DEV1_2               2
 
typedef tsp00_Int4                        tsp00_PageNo ;
typedef	tsp00_Buf				*tsp00_Maxiobufaddr ;
 
/*
 *  VCOLD *****************************************
 */
 
typedef enum1                           VCOLD_RESULT ;
#define         VCOLD_OK                0
 
typedef	tsp00_VFilename			tsp_vbackup_devices [ 16 ];
 
/*
 *  Console *****************************************
 */
 
typedef enum1                           tsp_process_state ;
#define         session_wait            0
#define         command_wait            1
#define         io_wait                 2
#define         system_resource_wait    3
#define         user_lock_wait          4
#define         region_wait             5
#define         running                 6
#define         sleeping                7
 
typedef enum1                           tsp_database_state ;
#define         cold                    0
#define         warm                    1
 
/*
 * ===========================================================================
 *      Macros
 * ===========================================================================
 */
 
#define         global                  /* clarifies the scope of symbols */
 
#define         BEGIN                   {
#define         END                     }
#define         NOT                     !
#define         OR                      ||
#define         AND                     &&
#define         DIV                     /
#define         MOD                     %
 
#if T31
#define         REGISTER                register
#else
#define         REGISTER
#endif
 
/*
 *  Macros for PASCAL-functions
 */
#ifndef	odd
#define odd(i)          ( (i) & 1 )
#endif
#ifndef	even
#define even(i)         ( ~ (i) & 1 )
#endif
#ifndef	min
#define min(a,b)        ( ( (a) <= (b) ) ? (a) : (b) )
#endif
#ifndef	max
#define max(a,b)        ( ( (a) >= (b) ) ? (a) : (b) )
#endif
 
/*
 *  Macros for string handling
 */
#define COPY(d,s,l)     (void) memcpy ( (char*)(d) , (char*)(s) , (CINT)(l) )
#define FILL(d,s,l)     (void) memset ( (char*)(d) ,   (int)(s) , (CINT)(l) )
 
typedef tsp00_Int2 tsp_lineposition ;
struct  tsp00_DataLine
        {
	    tsp00_Line               text ;
	    tsp_lineposition       pos ;
	    tsp_lineposition       tength ;
	} ;
 
#define  CSP_M_ADBS  0x0
#define  CSP_M_ADBSPARSE  0x1
#define  CSP_M_ADBSEXECUTE  0x2
#define  CSP_M_ADBSINFO  0x3
#define  CSP_M_AUTILITY  0x4
#define  CSP_M_AINCOPY  0x5
#define  CSP_M_AENDINCOPY  0x6
#define  CSP_M_AOUTCOPY  0x7
#define  CSP_M_AENDOUTCOPY  0x8
#define  CSP_M_AHELLO  0x9
#define  CSP_M_AFILE  0xA
#define  CSP_M_ADBSSYNTAX  0xB
#define  CSP_M_ADBSCOMMIT  0xC
#define  CSP_M_ADBSINFOCOMMIT  0xD
#define  CSP_M_ADBSLOAD  0xE
#define  CSP_M_ADBSCATALOG  0xF
#define  CSP_M_ADBSUNLOAD  0x10
#define  CSP_M_ADBSGETPARSE  0x12
#define  CSP_M_ADBSGETEXECUTE  0x13
#define  CSP_M_APUTVAL  0x1C
#define  CSP_M_AGETVAL  0x1D
#define  CSP_M_ADBSCOMMIT_EXECUTE  0x1E
#define  CSP_M_VREPLY  0x5000
 
#define  CSP_P_NONE  0
#define  CSP_P_COMMAND_EXECUTED  1
#define  CSP_P_USE_ADBS  2
#define  CSP_P_RELEASE_FOUND  10
#define  CSP_P_FAST_SELECT_DIR_POSSIBLE  20
#define  CSP_P_NOT_ALLOWED_FOR_PROGRAM  30
#define  CSP_P_CLOSE_FOUND  40
#define  CSP_P_DESCRIBE_FOUND  41
#define  CSP_P_FETCH_FOUND  42
#define  CSP_P_MFETCH_FOUND  43
#define  CSP_P_MASS_SELECT_FOUND  44
#define  CSP_P_SELECT_FOR_UPDATE_FOUND  45
#define  CSP_P_REUSE_MASS_SELECT_FOUND  46
#define  CSP_P_REUSE_UPDATE_SEL_FOUND   47
#define  CSP_P_DIALOG_CALL  60
#define  CSP_P_MASS_COMMAND  70
#define  CSP_P_MSELECT_FOUND  114
#define  CSP_P_FOR_UPD_MSELECT_FOUND  115
#define  CSP_P_REUSE_MSELECT_FOUND    116
#define  CSP_P_REUSE_UPD_MSELECT_FOUND 117


#if defined(_WIN32)

/* COM Definitions */

typedef int integer;

typedef  struct tsp_dcom_init_sink_parms {
 void*    acv_addr;
 void*    sink_addr;
 tsp00_Int4 sink_size;
} tsp_dcom_init_sink_parms;

typedef  struct tsp_dcom_co_create_instance_parms {
 union {
 tsp00_C16 coclsid;
 GUID    guid_coclsid;
 };
 union {
 tsp00_C16 iid;
 GUID    guid_iid;
 };
 void*   ifactory;
 void*   idispatch;
 void*   ikernel_sink;
 tsp00_Int4 ret;
 union {
 tsp00_C4        session;
 unsigned long i4_session;
 }; 
 boolean in_proc_server;
 boolean debug_mode;
 void*   debug_location;
 tsp00_C64 errtext;
} tsp_dcom_co_create_instance_parms;

typedef  struct tsp_dcom_dispatch_parms {
 void* idispatch;
 void* ifactory;
 void* session_context;
 tsp00_Int4 dispid;
 tsp00_Int4 hresult;
 tsp00_MoveObjPtr param_stack;
 tsp00_Int4 param_stack_len;
 boolean debug_mode;
 void*   debug_location;
 tsp00_C64 errtext;
} tsp_dcom_dispatch_parms;


typedef  struct tsp_dcom_release_instance_parms {
 union {
 tsp00_C4        session;
 unsigned long i4_session;
 }; 
} tsp_dcom_release_instance_parms;

#define  DBO_METHOD  0
#define  DBO_DBPROC  1
#define  DBO_DBFUNC  2
typedef  signed char tsp00_DbObjectType;

typedef  struct tsp_dcom_paraminfo_parms {
 tsp00_C64 prog_id;
 tsp00_KnlIdentifier method;
 tsp00_C16 coclsid;
 tsp00_C16 iid;
 tsp00_MoveObjPtr packet;
 void*  typeinfo_ptr;
 tsp00_Int4 dispid;
 tsp00_Int2 const_dispid;
 tsp00_Int2 const_type;
 tsp00_Int4 const_typeid;
 integer func_idx;
 boolean in_proc_server;
 tsp00_DbObjectType db_obj_type;
 tsp00_C64 errtext;
} tsp_dcom_paraminfo_parms;

#endif

.CM *-END-* code ----------------------------------------
.SP 2 
***********************************************************
*-PRETTY-*  statements    :        607
*-PRETTY-*  lines of code :        607        PRETTY  3.09 
*-PRETTY-*  lines in file :        695         1992-11-23 
.PA 
