/************************************************************************
*                       - INFOFLEX System -
* This source code is CONFIDENTIAL and PROPRIETARY to CUSTOMWARE COMPUTING,
* INC. (CWC). The information contained herein may not be used, copied or
* disclosed in whole or in part except as permitted by written agreement
* signed by an officer of CWC.
*
* COPYRIGHT (c) 1986 CUSTOMWARE COMPUTING, INC., BURLINGAME, CALIFORNIA.
* ALL RIGHTS RESERVED.
*************************************************************************/

#ifndef SQSYSCAT_H
#define SQSYSCAT_H

#include "sqport.h"
#include "fxstruct.h"

#define SYSLOG	"syslog"
#define SYSANSI	"ANSI"

struct _S_SYSTABLE {
     char      st_tabname[TBLNAMSIZ+1];
     char      st_owner[8 + 1];
     char      st_dirpath[TBLPTHSIZ+1];
     long      st_tabid;
     short     st_rowsize;
     short     st_ncols;
     short     st_nindexes;
     long      st_nrows;
     long      st_created;
     long      st_version;
     char      st_tabtype[1 + 1];
     char      st_audpath[TBLPTHSIZ+1];
};
typedef struct _S_SYSTABLE SYSTABLE;

struct _S_SYSCOLUMNS {
     char      sc_colname[FLDNAMSIZ+1];
     long      sc_tabid;
     short     sc_colno;
     short     sc_coltype;
     short     sc_collength;
};
typedef struct _S_SYSCOLUMNS SYSCOLUMNS;

struct _S_SYSINDEXES {
     char      si_idxname[IDXNAMSIZ+1];
     char      si_owner[8 + 1];
     long      si_tabid;
     char      si_idxtype[1 + 1];
     char      si_clustered[1 + 1];
     short     si_part[ NPARTS];
};
typedef struct _S_SYSINDEXES SYSINDEXES;

/* in 'lib/sqsyscat.c': */
M_TLS extern SYSTABLE systables;
M_TLS extern DBHEAD *psystables;

M_TLS extern SYSINDEXES sysindexes;
M_TLS extern DBHEAD *psysindexes;

M_TLS extern SYSCOLUMNS syscolumns;
M_TLS extern DBHEAD *psyscolumns;

M_TLS extern DBHEAD *psystbauth;
M_TLS extern DBHEAD *psysclauth;
M_TLS extern DBHEAD *psysusers;

#endif
