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

178 lines
6.8 KiB
C
Raw Normal View History

2024-09-09 21:51:08 +00:00
/******************************************************************************
*
* fn_priv.h - Used by the ICI convertion routines.
*
* 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.
* 16/03/94 12306 JC Changed max rec.id to be 255
* 13.12.93 12306 JC Creation of Module. Based on the PI/open version.
*
*
*
*
*
*****************************************************************************/
/* START-DESCRIPTION:
This file contains parameters used by the conversion routines,
and a collection of useful typedefs,
END-DESCRIPTION */
/* START-DESIGN:
END-DESIGN */
/* START-FUTURES:
No future.
END-FUTURES */
/* START-CODE: */
#define MAXSIZ 255 /* maximum size of strings */
#define MAX_DIGITS 63 /* maximum number of digits... */
/* allowed in PD conversion */
/*****************************************************************************
Date parameters
*****************************************************************************/
#define BASEDATE 718737 /* number of days till 1968 */
#define DAYSINQUADCENT 146097 /* number of days in 400 years */
#define DAYSINQUADYEAR 1461 /* number of days in 4 years */
#define DAYSIN5MONTHS 153 /* number of days in 5 months ? */
#define THISMILLENNIUM 1000 /* current millennium in years */
#define THISCENTURY 1900 /* current century in years */
#define YEARTURNPOINT 30 /* if only two digits of the .. */
/* .. year are entered then .. */
/* .. any entry that is less .. */
/* .. than YearTurnPoint is .. */
/* .. part of the next century */
/*****************************************************************************
DATE type definitions
date_info is returned by pdate
***************************************************************************/
typedef struct
{
char delim;
char order[3];
struct
{
char type;
short int size;
} field[3];
char ge_delim;
short int ge_count;
} date_info;
/*****************************************************************************
Masked Decimal type definitions
masked_decimal_info is returned by pmdec, ppifmt and psmafmt
format_info is returned by ppifmt and psmafmt
*replaced: number_type is used to DNUMB descriptors returned by ATD or
passed to FDTA by the new descriptor format in
***************************************************************************/
typedef struct
{
short int fract; /* number of fractional digits */
short int scale; /* scaling factor */
char *prefix; /* prefix */
short int prefixl; /* prefix length */
char *pprefix; /* positive prefix */
short int pprefixl; /* positive prefix length */
char *nprefix; /* negative prefix */
short int nprefixl; /* negative prefix length */
char *tdelim; /* thousand's delimiter */
short int tdeliml; /* thousand's delimiter length */
char *fdelim; /* fractional delimiter */
short int fdeliml; /* fractional delimiter length */
char *suffix; /* suffix */
short int suffixl; /* suffix length */
char *psuffix; /* positive suffix */
short int psuffixl; /* positive suffix length */
char *nsuffix; /* negative suffix */
short int nsuffixl; /* negative suffix length */
short int dpoint; /* contains a decimal point */
short int zero; /* zero value return null */
short int round; /* round data instead of truncating */
short int rtposn; /* round/truncate position */
short int fillen; /* fill field length */
char filchr; /* fill character */
short int numeric;
} masked_decimal_info;
/* This is to be replaced by the new descr format FLOAT in rm_descrs.h
* typedef struct
* {
* int32 value; double precision integer value
* short int unused;
* unsigned int desc :4; descriptor, 0 floating, 1 integer
* unsigned int dplace :4; implied decimal point position
* unsigned int exponent :8; exponent in excess-128 form
*} number_type;
*/
typedef struct
{
char justification;
char *mask;
short int msize;
short int holes;
} format_mask_info;
/* Start 001 *****************************************************************
IO_FLT_INT keys
***************************************************************************/
#define DBL_FLOAT_TO_STRING 1
#define SGL_FLOAT_TO_STRING 2
#define DBL_INTEGER_TO_STRING 3
#define SGL_INTEGER_TO_STRING 4
#define STRING_TO_DBL_FLOAT 5
#define STRING_TO_SGL_FLOAT 6
#define STRING_TO_DBL_INTEGER 7
#define STRING_TO_SGL_INTEGER 8
/* ***************************************************************************
Keys used in function routines
***************************************************************************/
#define I_CONV 1
#define O_CONV 2
/* End 001 *******************************************************************/
#define INPUT 1
#define OUTPUT 2
/* ***************************************************************************
Constants
***************************************************************************/
#define FALSE 0
#define TRUE 1
#define DYN_BUFF_SIZE 65536 /* 64kb */
#define DYN_BUFF_SIZE_WITH_SLOP 40960 /* 40 kb */