NAME
country.h - include file for data formatting
SYNOPSIS
#include <cbase/country.h>
DESCRIPTION
This include file contains the symbolic definitions for the data structures and constants needed for external data formats. These are used by the library formatting routines.
CONTENTS
/*
* include/cbase/country.h 11.1 Delta date: 5/5/87
*
* @(#)country.h 11.1
*
* This file contains the internal structure definition
* used to record formatting information.
*/
/* default country codes */
#define USA "01"
#define ITALY "39"
#define RF_USA 16384
#define RF_ITALY 16385
/* format sizes */
#define FCNTRYZ 10 /* length of country field */
#define FDATEZ 40 /* length of date/time formats */
#define FREALZ 50 /* length of real/money formats */
#define FBOOLZ 10 /* length of boolean formats */
#define FCURRZ 4 /* length of currency symbol */
#define FNAMEZ 20 /* length of names (month/day) */
#define FANAMEZ 4 /* length of abbreviated names */
#define FCYCLEZ 20 /* length of time cycle names */
#define FMONTH 12 /* number of months */
#define FDAY 7 /* number of days */
#define FCYCLES 4 /* number of time cycles (AM/PM/Noon/Mid) */
#define FMAXFMT FREALZ /* largest format */
#define FMAXSTR FNAMEZ*FMONTH /* largest "format" string */
/* Special characters used in formats */
#define FMTSEP ';' /* separator character between formats */
#define FDIGIT '#' /* digit placeholder */
#define FFORCE '0' /* forced digit */
#define FTHOUS ',' /* thousands separator */
#define FPOINT '.' /* decimal point */
#define FCURR '$' /* currency symbol */
#define FSIGN '-' /* floating minus sign */
#define FLIT '\\' /* insert literal character */
#define FROUND '5' /* round previous digit */
#define FTRUNC '#' /* truncate after previous digit */
/* Structure for reading external formats */
typedef struct {
char cf_country[FCNTRYZ]; /* country code */
char cf_date[FDATEZ]; /* date format */
char cf_time[FDATEZ]; /* time format */
char cf_money[FREALZ]; /* money format */
char cf_real[FREALZ]; /* real format */
char cf_boolean[FBOOLZ]; /* boolean format */
char cf_integer[FREALZ]; /* integer format */
char cf_currency[FCURRZ]; /* Currency symbol */
char cf_decimal; /* Decimal Point */
char cf_thous; /* Thousands separator */
short cf_place; /* # of decimal places */
short cf_order; /* Input date order */
char cf_month[FMONTH][FNAMEZ]; /* Full month names */
char cf_amonth[FMONTH][FANAMEZ]; /* Abbreviated month names */
char cf_day[FDAY][FNAMEZ]; /* Full day names */
char cf_aday[FDAY][FANAMEZ]; /* Abbreviated day names */
char cf_cycle[FCYCLES][FCYCLEZ]; /* Time cycle names */
} CFMT;
/* Internal functions for formatting */
char *getnfstr(); /* get nth format from string */