****************************************************************************** * * UVNLSLOC.H: BASIC include file for NLS locales (UNIVERSE.INCLUDE) * * 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. * 07/03/97 20965 CSM Add error conditions * 05/16/97 20613 NDP Renamed LC$xxx tokens to UVLC$xxx. * 01/26/97 19974 DTM Removed GCI definitions for GET/SET...LOCALEINFO() * 02/06/96 17998 LDG Module created. * ******************************************************************************* * * Portions of this file are echoed in uvsrc/include/NLSlc.h * Please ensure any changes made here are also made there if relevant. * ==================================================================== * * Tokens for SETLOCALE(), GETLOCALE(), LOCALEINFO() categories: EQU UVLC$INDEX TO 0 ;* hook library info etc. (LOCALEINFO only) EQU UVLC$TIME TO 1 ;* time and date conventions EQU UVLC$NUMERIC TO 2 ;* numeric conventions EQU UVLC$MONETARY TO 3 ;* monetary (currency) conventions EQU UVLC$CTYPE TO 4 ;* character type conventions EQU UVLC$COLLATE TO 5 ;* collating sequence (sort) conventions EQU UVLC$WEIGHTS TO 6 ;* sort weights (LOCALEINFO only) EQU UVLC$ALL TO -1 ;* all current categories (SETLOCALE/GETLOCALE) EQU UVLC$SAVED TO -2 ;* all saved categories (SETLOCALE/GETLOCALE) EQU UVLC$SAVE TO -3 ;* save all categories (SETLOCALE only) EQU UVLC$OFF TO "OFF" ;* pseudo-locale name to turn locales off * Tokens for GETLOCALE() returned array fields, per convention category. * ALL categories: EQU LCA$NAME TO 1 ;* category name always * UVLC$TIME category: EQU LCT$TIMEDATE.FMT TO 2 ;* date and time conversion code (TM-separated) EQU LCT$FULLDATE.FMT TO 3 ;* date and time conversion code (TM-separated) EQU LCT$D.FMT TO 4 ;* default date conversion code ('D') EQU LCT$DI.FMT TO 5 ;* international date conversion code ('DI') EQU LCT$T.FMT TO 6 ;* default time conversion code ('MT') EQU LCT$TI.FMT TO 7 ;* international date conversion code ('TI') EQU LCT$DAYS TO 8 ;* (multivalued) days of week names (Sunday = 1) EQU LCT$ABDAYS TO 9 ;* (multivalued) and their abbreviations EQU LCT$MONS TO 10 ;* (multivalued) month names (January = 1) EQU LCT$ABMONS TO 11 ;* (multivalued) and their abbreviations EQU LCT$YEARS TO 12 ;* (multivalued) Chinese year names (monkey-sheep) EQU LCT$AM.STR TO 13 ;* string to use with 12-hour clock before noon EQU LCT$PM.STR TO 14 ;* string to use with 12-hour clock after noon EQU LCT$BC.STR TO 15 ;* string to use with years before 1 AD EQU LCT$ERA.NAMES TO 16 ;* (multivalued) era names, most recent first EQU LCT$ERA.STARTS TO 17 ;* (multivalued) and their start dates EQU LCT$HDR.D.FMT TO 18 ;* conversion code for 'D' option HEAD/FOOTING EQU LCT$HDR.T.FMT TO 19 ;* conversion codes for 'T' option HEAD/FOOTING EQU LCT$GREG.DAY1 TO 20 ;* start date of the Gregorian calendar EQU LCT$GREG.SKIP TO 21 ;* number of days omitted at end of Julian era EQU LCT$DMYORDER TO 22 ;* default day-month year order EQU LCT$DMYSEP TO 23 ;* default day-month-year separator EQU LCT$DEFTIMESEP TO 24 ;* default time separator * UVLC$NUMERIC category: EQU LCN$DEC.SEP TO 2 ;* decimal separator character EQU LCN$THOU.SEP TO 3 ;* thousands separator character EQU LCN$ZERO.SUP TO 4 ;* 0 if zero NOT omitted before decimal separator EQU LCN$ALT.DIGITS TO 5 ;* (multivalued) Unicodes for alt.digits, 0 first * UVLC$MONETARY category: EQU LCM$DEC.SEP TO 2 ;* decimal separator character EQU LCM$THOU.SEP TO 3 ;* thousands separator character EQU LCM$CURR.SYMBOL TO 4 ;* local currency symbol EQU LCM$INTL.CURR.SYMBOL TO 5 ;* international currency symbol EQU LCM$DEC.PLACES TO 6 ;* default num of decimal places, local currency EQU LCM$INTL.DEC.PLACES TO 7 ;* ditto, international currency EQU LCM$POS.SIGN TO 8 ;* character used for positive amounts if any EQU LCM$NEG.SIGN TO 9 ;* character(s) used for negative amounts EQU LCM$POS.FMT TO 10 ;* format of positive currency amounts EQU LCM$NEG.FMT TO 11 ;* format of negative currency amounts * UVLC$CTYPE category: * Each field after the first represents a single character's properties. * Only those characters with some properties, or case values different from * the character itself, are returned - they are in Unicode order. * Values in the field are: EQU LCP$CHAR TO 1 ;* Unicode value in decimal EQU LCP$PROPERTIES TO 2 ;* bit-significant EQU LCP$PROP.NUMVAL TO 15 ;* (mask) LS 4 bits may be numeric value EQU LCP$PROP.NUM TO 4 ;* (bit4) 1 if numeric EQU LCP$PROP.ALPHA TO 5 ;* (bit5) 1 if alphabetic EQU LCP$PROP.NOPRINT TO 6 ;* (bit6) 1 if non-printable EQU LCP$PROP.TRIM TO 7 ;* (bit7) 1 if trimmable EQU LCP$PROP.NEW TO 8 ;* (bit8) char differs from default properties EQU LCP$PROP.NEWCASE TO 9 ;* (bit9) char differs from default casing EQU LCP$UPPER TO 3 ;* upper case decimal Unicode value if any EQU LCP$LOWER TO 4 ;* lower case decimal Unicode value if any * UVLC$COLLATE category: EQU LCC$ACCENTED.SORT TO 2 ;* 0 if accented sort NOT required EQU LCC$REVERSE.ACCENTS TO 3 ;* 0 if sort of accents in reverse NOT required EQU LCC$CASED.SORT TO 4 ;* 0 if case-dependent sort NOT required EQU LCC$LOWERCASE.FIRST TO 5 ;* 0 if sort upper case before lower EQU LCC$EXPANSIONS TO 6 ;* (multivalued) hex Unicodes of chars to expand EQU LCC$EXPANDED TO 7 ;* (multivalued) and what chars they become EQU LCC$EXPANDS.BEFORE TO 8 ;* (multivalued) 0 if do NOT expand before EQU LCC$CONTRACTIONS TO 9 ;* (multivalued) hex Unicodes of contractions EQU LCC$CONTRACTS.BEFORE TO 10;* (multivalued) and what chars they sort before EQU LCC$WEIGHT.TABLES TO 11 ;* (multivalued) list of weight tables used * UVLC$WEIGHTS pseudo-category: * Each field after the first represents a single character's weights * as an integer (first value only). Subtract 2 from field # to get Unicode. * Values in a weight field are: EQU LCW$VALUE TO 1 ;* value 1 = the actual weight * This is a 31-bit integer divided into 4 sections as follows: * [ BW = 7 bits ][ SW = 15 bits ][ AW = 6 bits ][CW=3bits] EQU LCW$BWBITS TO 7 ;* width of block weight field EQU LCW$BWSHIFT TO 24 ;* ...and its position EQU LCW$SWBITS TO 15 ;* width of shared weight field EQU LCW$SWSHIFT TO 9 ;* ...and its position EQU LCW$AWBITS TO 6 ;* width of accent weight field EQU LCW$AWSHIFT TO 3 ;* ...and its position EQU LCW$CWBITS TO 3 ;* width of case weight field EQU LCW$CWSHIFT TO 0 ;* ...and its position * Masks for bit extraction are generated from the above as follows: EQU LCW$BWMASK TO ((2 ** LCW$BWBITS) - 1) * (2 ** LCW$BWSHIFT) EQU LCW$SWMASK TO ((2 ** LCW$SWBITS) - 1) * (2 ** LCW$SWSHIFT) EQU LCW$AWMASK TO ((2 ** LCW$AWBITS) - 1) * (2 ** LCW$AWSHIFT) EQU LCW$CWMASK TO ((2 ** LCW$CWBITS) - 1) * (2 ** LCW$CWSHIFT) EQU LCW$NOT.DEFAULTED TO 2 ;* value 2 = 1, char explicitly in a weight table * UVLC$INDEX pseudo-category: * First 6 fields here contain the compiled category names for the locale: EQU LCI$TIME TO 2 ;* TIME category EQU LCI$NUMERIC TO 3 ;* NUMERIC category EQU LCI$MONETARY TO 4 ;* MONETARY category EQU LCI$CTYPE TO 5 ;* CTYPE category EQU LCI$COLLATE TO 6 ;* COLLATE category EQU LCI$WEIGHTS TO 7 ;* WEIGHTS category EQU LCI$HOOK.LIBID TO 8 ;* library name used to identify hook routines EQU LCI$HOOK.MAPNAME TO 9 ;* map for passing strings to hooks (def.NLSOSMAP) * Tokens for logical errors from SETLOCALE(), GETLOCALE() and LOCALEINFO(); * any other non-zero return codes are internal errors: EQU LCE$NO.LOCALES TO -1 ;* NLS locales are not in force EQU LCE$BAD.LOCALE TO -2 ;* locale.name is not loaded into shared memory EQU LCE$BAD.CATEGORY TO -3 ;* category number is invalid EQU LCE$NULL.LOCALE TO -4 ;* multi-valued locale array incomplete EQU LCE$HK.INFN.NOTF TO -13 ;* Hook initialization function not found EQU LCE$HK.NO.MAPN TO -14 ;* Locale has Hook id but no map name EQU LCE$HK.MAPN.UNKN TO -15 ;* NLS mapname for NLS hook library not found