194 lines
5.9 KiB
C
Executable File
194 lines
5.9 KiB
C
Executable File
#ifndef h_global
|
|
#define h_global
|
|
/******************************************************************************
|
|
*
|
|
* Declarations of UniVerse global variables
|
|
*
|
|
* Module %M% Version %I% Date %H%
|
|
*
|
|
* (c) Copyright 1998 Ardent Software Inc. - All Rights Reserved
|
|
* This is unpublished proprietary source code of Ardent Software Inc.
|
|
* The copyright notice above does not evidence any actual or intented
|
|
* publication of such source code.
|
|
*
|
|
*******************************************************************************
|
|
*
|
|
* Maintenence log - insert most recent change descriptions at top
|
|
*
|
|
* Date.... GTAR# WHO Description.........................................
|
|
* 10/14/98 23801 SAP Change copyrights.
|
|
* 10/02/98 23765 CSM Implement device licensing
|
|
* 05/20/98 21718 LPC/WSM Add support for file suspension
|
|
* 05/11/98 17787 KAM Added TTYoff_flag for DIVERT.OUT TTY.OFF option
|
|
* 12/15/97 21984 DTM Changes to provide more complete dead process cleanup
|
|
* 01/03/97 19829 JBG Added STRING for in-line cdict calls
|
|
* 05/31/96 18423 GMM Added NT version of cont_tty
|
|
* 05/02/96 18403 DTM Added deadlocked bit
|
|
* 04/19/96 17706 PEJ Added nlslcoffset array for current locale
|
|
* 10/19/95 17162 DJD Added apiserver flag to pdata to tell if we are in
|
|
* the apiserver.
|
|
* 07/17/95 16713 AGM Ensure pdata.data_file is big enough to contain
|
|
* a temporary file name on WINNT
|
|
* 04/13/95 16346 PVW Remove Isolation and autocommit defines and
|
|
* change DefIsolation to DEFAULT_ISOLATION
|
|
* 03/27/95 16023 DTM Removed references to XUVSERVER
|
|
* 02/15/95 15921 ENF Add structure for server shared memory errors
|
|
* 01/28/94 15736 JSW Added nlsoff (per user overide of NLSON)
|
|
* 06/09/94 13992 RM Added defisolation
|
|
* 02/08/94 12535 JBG Added isolation , autocommit field to pdata, symbols.
|
|
* 09/23/94 12302 ALC Added top_mar to ttydim structure.
|
|
* 12/08/92 10693 DTM #def'd changes for XuVserver
|
|
* 11/09/92 9899 JKW add authid to struct pdata
|
|
* 06/01/92 9618 MAA Port of 6.3.3 to arix.
|
|
* 09/12/91 8710 RM Support for SQLerror, SQLwarning, SQLcode, SQLstate
|
|
* 08/21/91 8583 DTM Even more changes for Xuv server
|
|
* 08/15/91 8583 DTM Changes for Xuv server
|
|
* 07/19/91 8583 DTM Changes to control for UVSH in server mode
|
|
* 04/29/91 8001 JWT fix datastack bug
|
|
* 02/11/90 6819 JWT change DATA stack management to work in memory
|
|
* 02/02/90 6406 JWT take level counters out of shared memory
|
|
* 05/09/89 5792 JWT fix lock prompt
|
|
* 01/04/89 5307 PHH Change interrupt handling on sub-processes
|
|
* 07/25/88 - - Maintenence log purged at 5.2.1, see release 5.1.10.
|
|
*
|
|
*****************************************************************************/
|
|
|
|
#include "PFILE.h"
|
|
#include "term.h"
|
|
#include "uvsqlsrverr.h"
|
|
|
|
struct pfreblk
|
|
{
|
|
Pfreblk *link;
|
|
int size;
|
|
};
|
|
|
|
struct ttydim
|
|
{
|
|
short width,depth,bot_mar,top_mar;
|
|
};
|
|
|
|
struct termset
|
|
{
|
|
TTYdim crt,lptr;
|
|
int flag;
|
|
#if TTY_ucb
|
|
int Pinchrs[4];
|
|
#else
|
|
int Pinchrs[6];
|
|
#endif
|
|
};
|
|
|
|
struct dataset
|
|
{ int readptr,
|
|
inptr,
|
|
maxptr;
|
|
char *bufptr;
|
|
};
|
|
|
|
struct pdata
|
|
{
|
|
int fork_flag;
|
|
int data_flag;
|
|
int few_bytes;
|
|
char data_file[MAX_PATH+1];
|
|
TERMSET term;
|
|
Pblock block[Pmaxopen];
|
|
char *como_name;
|
|
int como_flag;
|
|
int hush_flag;
|
|
int break_disable;
|
|
int date_format;
|
|
int precision;
|
|
int echo_chan;
|
|
int wait_mode;
|
|
int tand_flag;
|
|
char tand_tty[16];
|
|
#ifdef MSWIN
|
|
HANDLE cont_tty;
|
|
#else
|
|
char cont_tty[16];
|
|
#endif
|
|
int src_set;
|
|
int src_value;
|
|
int err_value;
|
|
int paging;
|
|
TTYDEF emulated, physical;
|
|
int istty;
|
|
int ttymode;
|
|
int autologout;
|
|
int auth_id;
|
|
int login_seat; /* seat #(0 to m-1) if process took a license */
|
|
int signature;
|
|
int defisolation;
|
|
int nlsoff;
|
|
int deadlocked; /* flag to determine if we are deadlocked or not */
|
|
SRVERRBLK srverrblk; /* uV/SQL server errors here */
|
|
int apiserver_flag;
|
|
int nlslcoffset[ 8 ] ;
|
|
STRING cdictreply; /* <<< gtar 19829 <<<; compiled descriptor */
|
|
int ttyoff_flag;
|
|
int suspend;
|
|
};
|
|
|
|
struct pmemory
|
|
{
|
|
char memory[ Pmemsize - (sizeof(struct pdata) + sizeof(Pfreblk*)) ];
|
|
struct pdata control;
|
|
Pfreblk *freptr;
|
|
};
|
|
|
|
EXTERN int Pshmkey,Pmsksz,Pclose();
|
|
EXTERN Pmemory *Pshmseg;
|
|
EXTERN int job_leader;
|
|
|
|
EXTERN FILE *Como_file;
|
|
EXTERN FILE *Tand_file;
|
|
|
|
#define Como_name Pshmseg->control.como_name
|
|
#define Como_flag Pshmseg->control.como_flag
|
|
#define Hush_flag Pshmseg->control.hush_flag
|
|
#define Break_disable Pshmseg->control.break_disable
|
|
#define Date_format Pshmseg->control.date_format
|
|
#define Precision Pshmseg->control.precision
|
|
EXTERN DATASET Data_stack;
|
|
#define Data_flag Pshmseg->control.data_flag
|
|
#define Few_bytes Pshmseg->control.few_bytes
|
|
#define Data_file Pshmseg->control.data_file
|
|
#define Echo_chan Pshmseg->control.echo_chan
|
|
#define Wait_mode Pshmseg->control.wait_mode
|
|
#define Tand_flag Pshmseg->control.tand_flag
|
|
#define Tand_tty Pshmseg->control.tand_tty
|
|
#define Cont_tty Pshmseg->control.cont_tty
|
|
#define Auth_id Pshmseg->control.auth_id
|
|
#define DEFAULT_ISOLATION Pshmseg->control.defisolation
|
|
#define Nlsoff Pshmseg->control.nlsoff
|
|
#define SQLsrverr Pshmseg->control.srverrblk
|
|
#define CDictreply Pshmseg->control.cdictreply /* <<< gtar 19829 <<< */
|
|
#define Apiserver_flag Pshmseg->control.apiserver_flag
|
|
#define TTYoff_flag Pshmseg->control.ttyoff_flag
|
|
|
|
EXTERN int EXElevel;
|
|
EXTERN int PERlevel;
|
|
EXTERN int ALLlevel;
|
|
EXTERN int SQLerror;
|
|
EXTERN int SQLwarning;
|
|
EXTERN int SQLcode;
|
|
EXTERN char SQLstate[];
|
|
#define SRC_set Pshmseg->control.src_set
|
|
#define SRC_value Pshmseg->control.src_value
|
|
#define Paging Pshmseg->control.paging
|
|
#define Emulated_tty Pshmseg->control.emulated
|
|
#define Physical_tty Pshmseg->control.physical
|
|
#define Istty Pshmseg->control.istty
|
|
#define Ttymode Pshmseg->control.ttymode
|
|
#define Autologout Pshmseg->control.autologout
|
|
#define ERR_value Pshmseg->control.err_value
|
|
|
|
#define PFK_CLR 0
|
|
#define PFK_OK 1
|
|
#define PFK_RST 2
|
|
#define PFK_SH 4
|
|
|
|
#endif /* end of global.h */
|