/************************************************************************
*                       - 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 _SQEXTERN_H
#define _SQEXTERN_H

#include <stdlib.h>
#include <setjmp.h>
#include "sqport.h"
#include "sqstdio.h"
#include "fxstruct.h"

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
M_TLS extern char *fxuser;
M_TLS extern char *msgenvvar;
M_TLS extern char mnyprefix[];
M_TLS extern char mnysuffix[];
M_TLS extern char msgbuf[];
M_TLS extern char sqdbdir[];
M_TLS extern HDHEAD ghdhead;
M_TLS extern long curdate;
M_TLS extern long fxauthdate;
M_TLS extern long fxmaxrecord;
M_TLS extern short ansimode;
M_TLS extern short intrans;
M_TLS extern short transmode;
M_TLS extern jmp_buf jmpenv;

M_TLS extern int eclineno;
M_TLS extern int fmintrp;

/* no M_TLS -- read only structures */
extern int n_syscat;
extern char mnydelim;
extern int fxfmdelflag;
extern char *blankline;
extern short daymax[2][12];

#ifdef __cplusplus
}
#endif /* __cplusplus */

/* VPI */
M_TLS extern int client_uid;
M_TLS extern int client_gid;
/* VPI end */

#ifndef ANSIPROTO

#ifndef ISDOSMSC

extern FILE *fopen();
extern char *fgets();
extern char *getcwd();
extern char *getenv();
extern char *mktemp();
extern double atof();
extern double strtod();
extern long atol();
extern long ftell();
extern long time();
extern double sq_lddbl();
extern float sq_ldfloat();
extern long sq_ldlong();
extern short sq_ldshort();

#ifndef FREEBSD
extern long lseek();
#endif

#endif /* ! ISDOSMSC */

#ifndef ISDOSMSC
#ifndef IBMAIX
extern char *strcat();
extern char *strchr();
extern char *strcpy();
extern char *strrchr();
extern int strcmp();
#ifndef HP9800
extern char *strncpy();
#else
#define strncpy  memcpy
#endif /* HP9800 */
#endif /* ! IBMAIX */
#endif /* ! ISDOSMSC */

#ifdef NOTUSED
#if ! defined(MSDOS)  &&  ! defined(SUNSOLARIS)  &&  ! defined(UNIXWARE)  &&  ! defined(HP9800)  &&  ! defined(SGI)
extern char *calloc();
#endif
#endif /* NOTUSED */

#ifndef ISDOSMSC
#if ! defined(SUNOS)  &&  ! defined(SUNSOLARIS)
extern void free();
#endif
#endif /* ! ISDOSMSC */

#endif /* ! ANSIPROTO */

#ifdef TRACE
M_TLS extern int expltrace;
M_TLS extern int isamtrace;
M_TLS extern int memtrace;
M_TLS extern int tbtrace;
M_TLS extern int itfd;
M_TLS extern int mtfd;
M_TLS extern int ttfd;
#endif /* TRACE */

#endif
