;
; ** $VER: locale.h 38.12 (24.2.93)
; ** Includes Release 40.15
; **
; ** locale.library interface structures and definitions
; **
; ** (C) Copyright 1991-1993 Commodore-Amiga, Inc.
; ** All Rights Reserved
;

; ***************************************************************************

IncludePath   "PureInclude:"
XIncludeFile "exec/nodes.pb"
XIncludeFile "exec/lists.pb"
XIncludeFile "exec/libraries.pb"
XIncludeFile "utility/tagitem.pb"

; ***************************************************************************


;  constants for GetLocaleStr()
#DAY_1  = 1 ;  Sunday
#DAY_2  = 2 ;  Monday
#DAY_3  = 3 ;  Tuesday
#DAY_4  = 4 ;  Wednesday
#DAY_5  = 5 ;  Thursday
#DAY_6  = 6 ;  Friday
#DAY_7  = 7 ;  Saturday

#ABDAY_1 = 8 ;  Sun
#ABDAY_2 = 9 ;  Mon
#ABDAY_3 = 10 ;  Tue
#ABDAY_4 = 11 ;  Wed
#ABDAY_5 = 12 ;  Thu
#ABDAY_6 = 13 ;  Fri
#ABDAY_7 = 14 ;  Sat

#MON_1  = 15 ;  January
#MON_2  = 16 ;  February
#MON_3  = 17 ;  March
#MON_4  = 18 ;  April
#MON_5  = 19 ;  May
#MON_6  = 20 ;  June
#MON_7  = 21 ;  July
#MON_8  = 22 ;  August
#MON_9  = 23 ;  September
#MON_10  = 24 ;  October
#MON_11  = 25 ;  November
#MON_12  = 26 ;  December

#ABMON_1 = 27 ;  Jan
#ABMON_2 = 28 ;  Feb
#ABMON_3 = 29 ;  Mar
#ABMON_4 = 30 ;  Apr
#ABMON_5 = 31 ;  May
#ABMON_6 = 32 ;  Jun
#ABMON_7 = 33 ;  Jul
#ABMON_8 = 34 ;  Aug
#ABMON_9 = 35 ;  Sep
#ABMON_10 = 36 ;  Oct
#ABMON_11 = 37 ;  Nov
#ABMON_12 = 38 ;  Dec

#YESSTR  = 39 ;  affirmative response for yes/no queries
#NOSTR  = 40 ;  negative response for yes/no queries

#AM_STR  = 41 ;  AM
#PM_STR  = 42 ;  PM

#SOFTHYPHEN = 43 ;  soft hyphenation
#HARDHYPHEN = 44 ;  hard hyphenation

#OPENQUOTE = 45 ;  start of quoted block
#CLOSEQUOTE = 46 ;  end of quoted block

#YESTERDAYSTR = 47 ;  Yesterday
#TODAYSTR = 48 ;  Today
#TOMORROWSTR = 49 ;  Tomorrow
#FUTURESTR = 50 ;  Future

#MAXSTRMSG = 51 ;  current number of defined strings


; ***************************************************************************


;  OpenLibrary("locale.library",0) returns a pointer to this structure
Structure LocaleBase
    lb_LibNode.Library
    lb_SysPatches.w   ;  TRUE if locale installed its patches
EndStructure


; ***************************************************************************


;  This structure must only be allocated by locale.library and is READ-ONLY!
Structure Locale

    *loc_LocaleName.b       ;  locale's name
    *loc_LanguageName.b       ;  language of this locale
    *loc_PrefLanguages.b[10]    ;  preferred languages
    loc_Flags.l        ;  always 0 for now

    loc_CodeSet.l       ;  always 0 for now
    loc_CountryCode.l       ;  user's country code
    loc_TelephoneCode.l       ;  country's telephone code
    loc_GMTOffset.l       ;  minutes from GMT
    loc_MeasuringSystem.b      ;  what measuring system?
    loc_CalendarType.b       ;  what calendar type?
    loc_Reserved0.b[2]

    *loc_DateTimeFormat.b       ;  regular date & time format
    *loc_DateFormat.b       ;  date format by itself
    *loc_TimeFormat.b       ;  time format by itself

    *loc_ShortDateTimeFormat.b  ;  short date & time format
    *loc_ShortDateFormat.b      ;  short date format by itself
    *loc_ShortTimeFormat.b      ;  short time format by itself

    ;  for numeric values
    *loc_DecimalPoint.b       ;  character before the decimals
    *loc_GroupSeparator.b       ;  separates groups of digits
    *loc_FracGroupSeparator.b   ;  separates groups of digits
    *loc_Grouping.b       ;  size of each group
    *loc_FracGrouping.b       ;  size of each group

    ;  for monetary values
    *loc_MonDecimalPoint.b
    *loc_MonGroupSeparator.b
    *loc_MonFracGroupSeparator.b
    *loc_MonGrouping.b
    *loc_MonFracGrouping.b
    loc_MonFracDigits.b       ;  digits after the decimal point
    loc_MonIntFracDigits.b     ;  for international representation
    loc_Reserved1.b[2]

    ;  for currency symbols
    loc_MonCS.b        ;  currency symbol
    loc_MonSmallCS.b       ;  symbol for small amounts
    loc_MonIntCS.b       ;  internationl (ISO 4217) code

    ;  for positive monetary values
    *loc_MonPositiveSign.b      ;  indicate positive money value
    loc_MonPositiveSpaceSep.b  ;  determine if separated by space
    loc_MonPositiveSignPos.b   ;  position of positive sign
    loc_MonPositiveCSPos.b     ;  position of currency symbol
    loc_Reserved2.b

    ;  for negative monetary values
    *loc_MonNegativeSign.b      ;  indicate negative money value
    loc_MonNegativeSpaceSep.b  ;  determine if separated by space
    loc_MonNegativeSignPos.b   ;  position of negative sign
    loc_MonNegativeCSPos.b     ;  position of currency symbol
    loc_Reserved3.b
EndStructure

;  constants for Locale.loc_MeasuringSystem
#MS_ISO  = 0 ;  international metric system
#MS_AMERICAN = 1 ;  american system
#MS_IMPERIAL = 2 ;  imperial system
#MS_BRITISH = 3 ;  british system

;  constants for Locale.loc_CalendarType
#CT_7SUN = 0   ;  7 days a week, Sunday is the first day
#CT_7MON = 1   ;  7 days a week, Monday is the first day
#CT_7TUE = 2   ;  7 days a week, Tuesday is the first day
#CT_7WED = 3   ;  7 days a week, Wednesday is the first day
#CT_7THU = 4   ;  7 days a week, Thursday is the first day
#CT_7FRI = 5   ;  7 days a week, Friday is the first day
#CT_7SAT = 6   ;  7 days a week, Saturday is the first day

;  constants for Locale.loc_MonPositiveSpaceSep and Locale.loc_MonNegativeSpaceSep
#SS_NOSPACE = 0  ;  cur. symbol is NOT separated from value with a space
#SS_SPACE   = 1  ;  cur. symbol IS separated from value with a space

;  constants for Locale.loc_MonPositiveSignPos and Locale.loc_MonNegativeSignPos
#SP_PARENS    = 0 ;  () surround the quantity and currency_symbol
#SP_PREC_ALL  = 1 ;  sign string comes before amount and symbol
#SP_SUCC_ALL  = 2 ;  sign string comes after amount and symbol
#SP_PREC_CURR = 3 ;  sign string comes right before currency symbol
#SP_SUCC_CURR = 4 ;  sign string comes right after currency symbol

;  constants for Locale.loc_MonPositiveCSPos and Locale.loc_MonNegativeCSPos
#CSP_PRECEDES = 0 ;  currency symbol comes before value
#CSP_SUCCEEDS = 1 ;  currency symbol comes after value

;  elements of the byte arrays pointed to by:
;  *   Locale.loc_Grouping
;  *   Locale.loc_FracGrouping
;  *   Locale.loc_MonGrouping
;  *   Locale.loc_MonFracGrouping
;  * are interpreted as follows:
;  *
;  *    255     indicates that no further grouping is to be performed
;  *    0       indicates that the previous element is to be repeatedly used
;  *       for the remainder of the digits
;  *    <other> the number of digits that comprises the current group
;


; ***************************************************************************


;  Tags for OpenCatalog()
#OC_TagBase    = (#TAG_USER + $90000)
#OC_BuiltInLanguage = #OC_TagBase+1   ;  language of built-in strings
#OC_BuiltInCodeSet  = #OC_TagBase+2   ;  code set of built-in strings
#OC_Version    = #OC_TagBase+3   ;  catalog version number required
#OC_Language    = #OC_TagBase+4   ;  preferred language of catalog


; ***************************************************************************


;  Comparison types for StrnCmp()
#SC_ASCII    = 0
#SC_COLLATE1 = 1
#SC_COLLATE2 = 2


; ***************************************************************************


;  This structure must only be allocated by locale.library and is READ-ONLY!
Structure Catalog

    cat_Link.Node ;  for internal linkage
    cat_Pad.w ;  to longword align
    *cat_Language.b ;  language of the catalog
    cat_CodeSet.l ;  currently always 0
    cat_Version.w ;  version of the catalog
    cat_Revision.w ;  revision of the catalog
EndStructure


; ***************************************************************************


