home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 10 / Fresh_Fish_10_2352.bin / useful / cbm / nduk / nduk-v39 / include / libraries / locale.h < prev    next >
C/C++ Source or Header  |  1992-09-24  |  9KB  |  261 lines

  1. #ifndef LIBRARIES_LOCALE_H
  2. #define LIBRARIES_LOCALE_H
  3. /*
  4. **    $VER: locale.h 38.10 (23.03.92)
  5. **    Includes Release 39.108
  6. **
  7. **    locale.library interface structures and definitions
  8. **
  9. **    (C) Copyright 1991-1992 Commodore-Amiga, Inc.
  10. **    All Rights Reserved
  11. */
  12.  
  13. /*****************************************************************************/
  14.  
  15.  
  16. #ifndef EXEC_TYPES_H
  17. #include <exec/types.h>
  18. #endif
  19.  
  20. #ifndef EXEC_NODES_H
  21. #include <exec/nodes.h>
  22. #endif
  23.  
  24. #ifndef EXEC_LISTS_H
  25. #include <exec/lists.h>
  26. #endif
  27.  
  28. #ifndef EXEC_LIBRARIES_H
  29. #include <exec/libraries.h>
  30. #endif
  31.  
  32. #ifndef UTILITY_TAGITEM_H
  33. #include <utility/tagitem.h>
  34. #endif
  35.  
  36.  
  37. /*****************************************************************************/
  38.  
  39.  
  40. /* constants for GetLocaleStr() */
  41. #define DAY_1        1    /* Sunday    */
  42. #define DAY_2        2    /* Monday    */
  43. #define DAY_3        3    /* Tuesday   */
  44. #define DAY_4        4    /* Wednesday */
  45. #define DAY_5        5    /* Thursday  */
  46. #define DAY_6        6    /* Friday    */
  47. #define DAY_7        7    /* Saturday  */
  48.  
  49. #define ABDAY_1    8    /* Sun */
  50. #define ABDAY_2    9    /* Mon */
  51. #define ABDAY_3    10    /* Tue */
  52. #define ABDAY_4    11    /* Wed */
  53. #define ABDAY_5    12    /* Thu */
  54. #define ABDAY_6    13    /* Fri */
  55. #define ABDAY_7    14    /* Sat */
  56.  
  57. #define MON_1        15    /* January   */
  58. #define MON_2        16    /* February  */
  59. #define MON_3        17    /* March     */
  60. #define MON_4        18    /* April     */
  61. #define MON_5        19    /* May         */
  62. #define MON_6        20    /* June      */
  63. #define MON_7        21    /* July      */
  64. #define MON_8        22    /* August    */
  65. #define MON_9        23    /* September */
  66. #define MON_10        24    /* October   */
  67. #define MON_11        25    /* November  */
  68. #define MON_12        26    /* December  */
  69.  
  70. #define ABMON_1    27    /* Jan      */
  71. #define ABMON_2    28    /* Feb      */
  72. #define ABMON_3    29    /* Mar      */
  73. #define ABMON_4    30    /* Apr      */
  74. #define ABMON_5    31    /* May      */
  75. #define ABMON_6    32    /* Jun      */
  76. #define ABMON_7    33    /* Jul      */
  77. #define ABMON_8    34    /* Aug      */
  78. #define ABMON_9    35    /* Sep      */
  79. #define ABMON_10    36    /* Oct      */
  80. #define ABMON_11    37    /* Nov      */
  81. #define ABMON_12    38    /* Dec      */
  82.  
  83. #define YESSTR        39    /* affirmative response for yes/no queries */
  84. #define NOSTR        40    /* negative response for yes/no queries    */
  85.  
  86. #define AM_STR        41    /* AM                       */
  87. #define PM_STR        42    /* PM                       */
  88.  
  89. #define SOFTHYPHEN    43    /* soft hyphenation               */
  90. #define HARDHYPHEN    44    /* hard hyphenation               */
  91.  
  92. #define OPENQUOTE    45    /* start of quoted block           */
  93. #define CLOSEQUOTE    46    /* end of quoted block               */
  94.  
  95. #define YESTERDAYSTR    47    /* Yesterday                   */
  96. #define TODAYSTR    48    /* Today                   */
  97. #define TOMORROWSTR    49    /* Tomorrow                   */
  98. #define FUTURESTR    50    /* Future                   */
  99.  
  100. #define MAXSTRMSG    51    /* current number of defined strings       */
  101.  
  102.  
  103. /*****************************************************************************/
  104.  
  105.  
  106. /* OpenLibrary("locale.library",0) returns a pointer to this structure */
  107. struct LocaleBase
  108. {
  109.     struct Library lb_LibNode;
  110.     BOOL       lb_SysPatches;   /* TRUE if locale installed its patches */
  111. };
  112.  
  113.  
  114. /*****************************************************************************/
  115.  
  116.  
  117. /* This structure must only be allocated by locale.library and is READ-ONLY! */
  118. struct Locale
  119. {
  120.     STRPTR    loc_LocaleName;      /* locale's name         */
  121.     STRPTR    loc_LanguageName;      /* language of this locale     */
  122.     STRPTR    loc_PrefLanguages[10];      /* preferred languages     */
  123.     ULONG    loc_Flags;          /* always 0 for now         */
  124.  
  125.     ULONG    loc_CodeSet;          /* always 0 for now         */
  126.     ULONG    loc_CountryCode;      /* user's country code     */
  127.     ULONG    loc_TelephoneCode;      /* country's telephone code     */
  128.     LONG    loc_GMTOffset;          /* minutes from GMT         */
  129.     UBYTE    loc_MeasuringSystem;      /* what measuring system?     */
  130.     UBYTE    loc_CalendarType;      /* what calendar type?     */
  131.     UBYTE    loc_Reserved0[2];
  132.  
  133.     STRPTR    loc_DateTimeFormat;      /* regular date & time format  */
  134.     STRPTR    loc_DateFormat;      /* date format by itself     */
  135.     STRPTR    loc_TimeFormat;      /* time format by itself     */
  136.  
  137.     STRPTR    loc_ShortDateTimeFormat;  /* short date & time format     */
  138.     STRPTR    loc_ShortDateFormat;      /* short date format by itself */
  139.     STRPTR    loc_ShortTimeFormat;      /* short time format by itself */
  140.  
  141.     /* for numeric values */
  142.     STRPTR    loc_DecimalPoint;      /* character before the decimals   */
  143.     STRPTR    loc_GroupSeparator;      /* separates groups of digits      */
  144.     STRPTR    loc_FracGroupSeparator;   /* separates groups of digits      */
  145.     UBYTE      *loc_Grouping;          /* size of each group         */
  146.     UBYTE      *loc_FracGrouping;      /* size of each group         */
  147.  
  148.     /* for monetary values */
  149.     STRPTR    loc_MonDecimalPoint;
  150.     STRPTR    loc_MonGroupSeparator;
  151.     STRPTR    loc_MonFracGroupSeparator;
  152.     UBYTE      *loc_MonGrouping;
  153.     UBYTE      *loc_MonFracGrouping;
  154.     UBYTE    loc_MonFracDigits;      /* digits after the decimal point  */
  155.     UBYTE    loc_MonIntFracDigits;      /* for international representation*/
  156.     UBYTE    loc_Reserved1[2];
  157.  
  158.     /* for currency symbols */
  159.     STRPTR    loc_MonCS;          /* currency symbol             */
  160.     STRPTR    loc_MonSmallCS;      /* symbol for small amounts         */
  161.     STRPTR    loc_MonIntCS;          /* internationl (ISO 4217) code    */
  162.  
  163.     /* for positive monetary values */
  164.     STRPTR    loc_MonPositiveSign;      /* indicate positive money value   */
  165.     UBYTE    loc_MonPositiveSpaceSep;  /* determine if separated by space */
  166.     UBYTE    loc_MonPositiveSignPos;   /* position of positive sign         */
  167.     UBYTE    loc_MonPositiveCSPos;      /* position of currency symbol     */
  168.     UBYTE    loc_Reserved2;
  169.  
  170.     /* for negative monetary values */
  171.     STRPTR    loc_MonNegativeSign;      /* indicate negative money value   */
  172.     UBYTE    loc_MonNegativeSpaceSep;  /* determine if separated by space */
  173.     UBYTE    loc_MonNegativeSignPos;   /* position of negative sign         */
  174.     UBYTE    loc_MonNegativeCSPos;      /* position of currency symbol     */
  175.     UBYTE    loc_Reserved3;
  176. };
  177.  
  178. /* constants for Locale.loc_MeasuringSystem */
  179. #define MS_ISO        0    /* international metric system */
  180. #define MS_AMERICAN    1    /* american system           */
  181. #define MS_IMPERIAL    2    /* imperial system           */
  182. #define MS_BRITISH    3    /* british system           */
  183.  
  184. /* constants for Locale.loc_CalendarType */
  185. #define CT_7SUN 0   /* 7 days a week, Sunday is the first day     */
  186. #define CT_7MON 1   /* 7 days a week, Monday is the first day     */
  187. #define CT_7TUE 2   /* 7 days a week, Tuesday is the first day     */
  188. #define CT_7WED 3   /* 7 days a week, Wednesday is the first day */
  189. #define CT_7THU 4   /* 7 days a week, Thursday is the first day  */
  190. #define CT_7FRI 5   /* 7 days a week, Friday is the first day     */
  191. #define CT_7SAT 6   /* 7 days a week, Saturday is the first day  */
  192.  
  193. /* constants for Locale.loc_MonPositiveSpaceSep and Locale.loc_MonNegativeSpaceSep */
  194. #define SS_NOSPACE 0  /* cur. symbol is NOT separated from value with a space */
  195. #define SS_SPACE   1  /* cur. symbol IS separated from value with a space     */
  196.  
  197. /* constants for Locale.loc_MonPositiveSignPos and Locale.loc_MonNegativeSignPos */
  198. #define SP_PARENS    0    /* () surround the quantity and currency_symbol   */
  199. #define SP_PREC_ALL  1    /* sign string comes before amount and symbol      */
  200. #define SP_SUCC_ALL  2    /* sign string comes after amount and symbol      */
  201. #define SP_PREC_CURR 3    /* sign string comes right before currency symbol */
  202. #define SP_SUCC_CURR 4    /* sign string comes right after currency symbol  */
  203.  
  204. /* constants for Locale.loc_MonPositiveCSPos and Locale.loc_MonNegativeCSPos */
  205. #define CSP_PRECEDES 0    /* currency symbol comes before value */
  206. #define CSP_SUCCEEDS 1    /* currency symbol comes after value  */
  207.  
  208. /* elements of the byte arrays pointed to by:
  209.  *   Locale.loc_Grouping
  210.  *   Locale.loc_FracGrouping
  211.  *   Locale.loc_MonGrouping
  212.  *   Locale.loc_MonFracGrouping
  213.  * are interpreted as follows:
  214.  *
  215.  *    255     indicates that no further grouping is to be performed
  216.  *    0       indicates that the previous element is to be repeatedly used
  217.  *          for the remainder of the digits
  218.  *    <other> the number of digits that comprises the current group
  219.  */
  220.  
  221.  
  222. /*****************************************************************************/
  223.  
  224.  
  225. /* Tags for OpenCatalog() */
  226. #define OC_TagBase       (TAG_USER + 0x90000)
  227. #define OC_BuiltInLanguage OC_TagBase+1   /* language of built-in strings    */
  228. #define OC_BuiltInCodeSet  OC_TagBase+2   /* code set of built-in strings    */
  229. #define OC_