tldm-universe/Ardent/UV/gcidir/include/shcat.h

74 lines
2.6 KiB
C
Raw Permalink Normal View History

2024-09-09 21:51:08 +00:00
/******************************************************************************
*
* shmcat.h: structures related to shared catalog memory
*
* 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 intended
* 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.
* 04/03/95 16273 AGM Rename S_OK to avoid conflict on Windows-NT
* 11/13/90 7728 MAA Increased MAX_CAT to 4096
* 02/14/89 5749 DTW add Voc_fd
* 11/27/88 - - New file
*
******************************************************************************/
#define MAX_IDLEN 256
#define EXTRA_DIR 4
#define MAX_CAT 4096
/*
* Header for shared catalog space
*/
#define SHCATHDR struct shcathdr
struct shcathdr
{
int state; /* current state of shared memory */
int progcnt; /* current number of programs loaded */
int dir, /* offset to array of directory entries */
nameblk, /* offset to block containing unix pathnames */
codeblk, /* offset to block containing basic code */
shcatend; /* offset to last byte in shared memory */
};
/* values for shcathdr state variable */
#define S_DETACHED 0x1 /* segment has been detached */
#define S_LOADING 0x2 /* segment is new and being loaded */
#define S_MODIFIED 0x3 /* segment is being modified */
#define S_OK_FOR_USE 0x4 /* segment is okay for use */
/* command values for modify_shm */
#define S_DELETE 0x1 /* delete a program */
#define S_ADD 0x2 /* add a new program */
#define S_UPDATE 0x3 /* replace a program with a new copy */
#define S_DESTROY 0x4 /* remove the entire shared memory segment */
/*
* directory entry for programs stored in shared memory
*/
#define DIR_ENTRY struct dir_entry
struct dir_entry
{
int pathname; /* offset to unix pathname */
int size; /* size of program shared memory*/
int code; /* offset to program structure */
int totref, /* count of all references */
curref; /* current number of users */
};
extern char *Unix_name[]; /* full unix pathnames */
extern char *Recstr[]; /* record name */
extern char *Filestr[]; /* pathname for directory (account & file) */
extern SHCATHDR *Hdrblk;
extern DBFILE *Voc_fd; /* VOC file ptr */