/* Copyright 1989, 1990, 1992 Digital Equipment Corporation All rights reserved. This software is furnished under a license and may be used and copied only in accordance with the terms of such license and with the inclusion of the above copyright notice. This software and any copies shall not be provided to any other person. No title to or ownership of the software is hereby transferred. The information in this software is subject to change without notice. DIGITAL assumes no responsibility for the use, functionality or reliability of its software on equipment which is not supplied by DIGITAL. defloc.h DEFLOC - DEFINE PSECT's and global entries for user defined LOCALES */ #ifndef __PDP11C$DEFLOC_H #define __PDP11C$DEFLOC_H /* *---------------------------------------------------------------------------- ** ** Define required PDP-11 C psects for locales. ** *---------------------------------------------------------------------------- */ /* Define the PDP-11 C PSECT name which is supposed to contain the ** locale name pointer and address of the character testing table ** for the LC_CTYPE macro. */ #pragma psect static_ro C$CT01,nosav #pragma psect static_ro /* The next three psect are bundled together to form the LC_COLL ** locale, and must be defined together in order to fully define ** the LC_COLL locale. Thus, all three tables must be defined by ** the user in order to fully define the LC_COLL locale. */ /* Define the PDP-11 C PSECT name which is suppose to contain the ** locale name pointer and address of the character collating table ** for the LC_COLL macro. */ #pragma psect static_ro C$CC01,nosav #pragma psect static_ro /* Define the PDP-11 C PSECT name which is suppose to contain the ** locale name pointer and address of the character to uppercase table ** for the LC_COLL macro. */ #pragma psect static_ro C$CU01,nosav #pragma psect static_ro /* Define the PDP-11 C PSECT name which is suppose to contain the ** locale name pointer and address of the character downcase table ** for the LC_COLL macro. */ #pragma psect static_ro C$CL01,nosav #pragma psect static_ro /* Define the PDP-11 C PSECT name which is suppose to contain the ** locale name pointer and address of the monetary formatting locale ** table for the LC_MONETARY macro. */ #pragma psect static_ro C$MFT1,nosav #pragma psect static_ro /* Define the PDP-11 C PSECT name which is suppose to contain the ** locale name pointer and address of the numeric formatting locale ** table for the LC_NUMERIC macro. */ #pragma psect static_ro C$NFT1,nosav #pragma psect static_ro /* Define the PDP-11 C PSECT name which is suppose to contain the ** locale name pointer and address of the time locales ** table for the LC_TIME macro. */ #pragma psect static_ro C$TIM1,nosav #pragma psect static_ro /* *---------------------------------------------------------------------------- ** ** End definitions of required PDP-11 C psects for locales. ** *---------------------------------------------------------------------------- */ /* *---------------------------------------------------------------------------- ** ** Now define the various locale macro's which will help the ** user interface to the PDP-11 C required locale format. ** *---------------------------------------------------------------------------- */ /* Define some macro's which will aid the user in setting up the ** character tables. */ #define _U ( 0x01 ) /* Upper Case Alpha */ #define _L ( 0x02 ) /* Lower Case Alpha */ #define _D ( 0x04 ) /* Digit */ #define _S ( 0x08 ) /* White Space */ #define _P ( 0x10 ) /* Punctuation */ #define _C ( 0x20 ) /* Control */ #define _X ( 0x40 ) /* Hex Alpha */ #define _V ( 0x80 ) /* Visible */ #define _XD ( _X | _D ) /* Hex Digit AND Base 10 Digit */ #define _XU ( _X | _U ) /* Hex Digit AND Upper Case */ #define _XL ( _X | _L ) /* Hex Digit AND Lower Case */ #define _SC ( _S | _C ) /* White Space AND Control */ /* Define the macro which will initialize the locale name string and ** table addresses in the appropriate psect's for the LC_COLL locale. ** ** Macro paramaters: ** ** locale_string - Is the pointer to the locale name, or string ** literal of the locale name (ie., "C"). ** ** locale_gbl_name6 - Is a maximum of 4 characters whose name will ** serve as the global entry points into the ** appropriate locale psects. The following ** global entry points will be made: ** ** (4-char-name)00 - Entry name which points to ** locale name area within ** the collating char. psect. ** ** (4-char-name)01 - Entry name which points to ** order table address within ** the collating char. psect. ** ** (4-char-name)02 - Entry name which points to ** locale name area within ** the collating upcase psect. ** ** (4-char-name)03 - Entry name which points to ** upcase table address within ** the collating upcase psect. ** ** (4-char-name)04 - Entry name which points to ** locale name area within ** the collating downcase psect. ** ** (4-char-name)05 - Entry name which points to ** downcase table address within ** the collating downcase psect. ** ** coll_table - Is the address of the collating character ** (order) table. ** ** upcase_table - Is the address of the collating upcase character ** table. ** ** downcase_table - Is the address of the collating downcase ** character table. */ #define DEFINE_LC_COLL(locale_string,locale_gbl_name6,coll_table,upcase_table,\ downcase_table) globaldef {"C$CC01"} const char * locale_gbl_name6 ## 00 \ = (void *) (locale_string); globaldef {"C$CC01"} const char * locale_gbl_name6 ## 01 \ = (void *) (coll_table); globaldef {"C$CU01"} const char * locale_gbl_name6 ## 02 \ = (void *) (locale_string); globaldef {"C$CU01"} const char * locale_gbl_name6 ## 03 \ = (void *) (upcase_table); globaldef {"C$CL01"} const char * locale_gbl_name6 ## 04 \ = (void *) (locale_string); globaldef {"C$CL01"} const char * locale_gbl_name6 ## 05 \ = (void *) (downcase_table); /* Define the macro which will initialize the locale name string and ** table address in the appropriate psect for the LC_CTYPE locale. ** ** Macro paramaters: ** ** locale_string - Is the pointer to the locale name, or string ** literal of the locale name (ie., "C"). ** ** locale_gbl_name2 - Is a maximum of 4 characters whose name will ** serve as the global entry points into the ** appropriate locale psects. The following ** global entry points will be made: ** ** (4-char-name)00 - Entry name which points to ** locale name area within ** the char. testing psect. ** ** (4-char-name)01 - Entry name which points to ** table address within ** the char. testing psect. ** ** ctype_table - Is the address of the character testing ** (ctype) table. */ #define DEFINE_LC_CTYPE(locale_string,locale_gbl_name2,ctype_table)\ globaldef {"C$CT01"} const char * locale_gbl_name2 ## 00 \ = (void *) (locale_string); globaldef {"C$CT01"} const char * locale_gbl_name2 ## 01 \ = (void *) (ctype_table); /* Define the macro which will initialize the locale name string and ** table address in the appropriate psect for the LC_MONETARY locale. ** ** Macro paramaters: ** ** locale_string - Is the pointer to the locale name, or string ** literal of the locale name (ie., "C"). ** ** locale_gbl_name2 - Is a maximum of 4 characters whose name will ** serve as the global entry points into the ** appropriate locale psects. The following ** global entry points will be made: ** ** (4-char-name)00 - Entry name which points to ** locale name area within ** the monetary formatting psect. ** ** (4-char-name)01 - Entry name which points to ** table address within ** the monetary formatting psect. ** ** monetary_table - Is the address of the monetary formatting ** table. */ #define DEFINE_LC_MONETARY(locale_string,locale_gbl_name2,monetary_table)\ globaldef {"C$MFT1"} const char * locale_gbl_name2 ## 00 \ = (void *) (locale_string); globaldef {"C$MFT1"} const char * locale_gbl_name2 ## 01 \ = (void *) (monetary_table); /* Define the macro which will initialize the locale name string and ** table address in the appropriate psect for the LC_NUMERIC locale. ** ** Macro paramaters: ** ** locale_string - Is the pointer to the locale name, or string ** literal of the locale name (ie., "C"). ** ** locale_gbl_name2 - Is a maximum of 4 characters whose name will ** serve as the global entry points into the ** appropriate locale psects. The following ** global entry points will be made: ** ** (4-char-name)00 - Entry name which points to ** locale name area within ** the numeric formatting psect. ** ** (4-char-name)01 - Entry name which points to ** table address within ** the numeric formatting psect. ** ** numeric_table - Is the address of the numeric formatting ** table. */ #define DEFINE_LC_NUMERIC(locale_string,locale_gbl_name2,numeric_table)\ globaldef {"C$NFT1"} const char * locale_gbl_name2 ## 00 \ = (void *) (locale_string); globaldef {"C$NFT1"} const char * locale_gbl_name2 ## 01 \ = (void *) (numeric_table); /* Define the macro which will initialize the locale name string and ** table address in the appropriate psect for the LC_TIME locale. ** ** Macro paramaters: ** ** locale_string - Is the pointer to the locale name, or string ** literal of the locale name (ie., "C"). ** ** locale_gbl_name2 - Is a maximum of 4 characters whose name will ** serve as the global entry points into the ** appropriate locale psects. The following ** global entry points will be made: ** ** (4-char-name)00 - Entry name which points to ** locale name area within ** the time formatting psect. ** ** (4-char-name)01 - Entry name which points to ** table address within ** the time formatting psect. ** ** time_table - Is the address of the time formatting ** table. */ #define DEFINE_LC_TIME(locale_string,locale_gbl_name2,time_table)\ globaldef {"C$TIM1"} const char * locale_gbl_name2 ## 00 \ = (void *) (locale_string); globaldef {"C$TIM1"} const char * locale_gbl_name2 ## 01 \ = (void *) (time_table); #endif /* End if we have not already been included. (__PDP11C$DEFLOC_H) */