home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / dev / m2 / CycloneModules.lha / modules / txt / LocaleD.def < prev    next >
Text File  |  1996-11-28  |  9KB  |  248 lines

  1. (*$Implementation- *)
  2.  
  3. DEFINITION MODULE LocaleD;
  4. (*  27-Nov-96, Stefan Tiemann for Cyclone, converted from
  5. **  locale.h 38.12 (24.2.93),    Includes Release 40.15
  6. **  locale.library interface structures and definitions
  7. **)
  8.  
  9. IMPORT ED: ExecD;
  10. IMPORT UD: UtilityD;
  11. FROM SYSTEM IMPORT LONGSET;
  12.  
  13.  
  14. CONST
  15.    localeName="locale.library";
  16.  
  17. TYPE
  18.    StrPtr=POINTER TO ARRAY [0..511] OF CHAR;
  19.    UbytePtr=POINTER TO ARRAY [0..511] OF SHORTCARD;
  20.  
  21.  
  22. (* constants for GetLocaleStr() *)
  23. CONST
  24.  
  25. day1=    1;    (* Sunday    *)
  26. day2=    2;    (* Monday    *)
  27. day3=    3;    (* Tuesday   *)
  28. day4=    4;    (* Wednesday *)
  29. day5=    5;    (* Thursday  *)
  30. day6=    6;    (* Friday    *)
  31. day7=    7;    (* Saturday  *)
  32.  
  33. abday1=    8;    (* Sun *)
  34. abday2=    9;    (* Mon *)
  35. abday3=    10;    (* Tue *)
  36. abday4=    11;    (* Wed *)
  37. abday5=    12;    (* Thu *)
  38. abday6=    13;    (* Fri *)
  39. abday7=    14;    (* Sat *)
  40.  
  41. mon1=        15;    (* January   *)
  42. mon2=        16;    (* February  *)
  43. mon3=        17;    (* March     *)
  44. mon4=        18;    (* April     *)
  45. mon5=        19;    (* May         *)
  46. mon6=        20;    (* June      *)
  47. mon7=        21;    (* July      *)
  48. mon8=        22;    (* August    *)
  49. mon9=        23;    (* September *)
  50. mon10=        24;    (* October   *)
  51. mon11=        25;    (* November  *)
  52. mon12=        26;    (* December  *)
  53.  
  54. abmon1=    27;    (* Jan *)
  55. abmon2=    28;    (* Feb *)
  56. abmon3=    29;    (* Mar *)
  57. abmon4=    30;    (* Apr *)
  58. abmon5=    31;    (* May *)
  59. abmon6=    32;    (* Jun *)
  60. abmon7=    33;    (* Jul *)
  61. abmon8=    34;    (* Aug *)
  62. abmon9=    35;    (* Sep *)
  63. abmon10=    36;    (* Oct *)
  64. abmon11=    37;    (* Nov *)
  65. abmon12=    38;    (* Dec *)
  66.  
  67. yesstr=        39;    (* affirmative response for yes/no queries *)
  68. nostr=        40;    (* negative response for yes/no queries    *)
  69.  
  70. amstr=        41;    (* AM *)
  71. pmstr=        42;    (* PM *)
  72.  
  73. softhyphen=    43;    (* soft hyphenation *)
  74. hardhyphen=    44;    (* hard hyphenation *)
  75.  
  76. openquote=    45;    (* start of quoted block *)
  77. closequote=    46;    (* end of quoted block     *)
  78.  
  79. yesterdaystr=    47;    (* Yesterday *)
  80. todaystr=     48;    (* Today     *)
  81. tomorrowstr=    49;    (* Tomorrow  *)
  82. futurestr=    50;    (* Future    *)
  83.  
  84. maxstrmsg=    51;    (* current number of defined strings *)
  85.  
  86.  
  87. (*****************************************************************************)
  88.  
  89. TYPE
  90.  (* OpenLibrary("locale.library",0) returns a pointer to this structure *)
  91.  LocaleBase= RECORD
  92.                 libNode: ED.Library;
  93.                 sysPatches: INTEGER;   (* TRUE if locale installed its patches *)
  94.              END;
  95.  LocaleBasePtr= POINTER TO LocaleBase;
  96.  
  97.  
  98. (*****************************************************************************)
  99.  
  100.   (* This structure must only be allocated by locale.library and is READ-ONLY! *)
  101.   Locale= RECORD
  102.            localeName:StrPtr;          (* locale's name             *)
  103.            languageName:StrPtr;          (* language of this locale     *)
  104.            prefLanguages:ARRAY [0..9] OF StrPtr;    (* preferred languages         *)
  105.            flags: LONGSET;              (* always 0 for now         *)
  106.  
  107.            codeSet:LONGCARD;          (* always 0 for now         *)
  108.            countryCode:LONGCARD;          (* user's country code         *)
  109.            telephoneCode:LONGCARD;          (* country's telephone code    *)
  110.            gmtOffset:LONGINT;          (* minutes from GMT         *)
  111.            measuringSystem:SHORTCARD;      (* what measuring system?      *)
  112.            calendarType:SHORTCARD;          (* what calendar type?         *)
  113.            reserved01:SHORTCARD;
  114.            reserved02:SHORTCARD;
  115.  
  116.            dateTimeFormat:StrPtr;       (* regular date & time format  *)
  117.            dateFormat:StrPtr;          (* date format by itself         *)
  118.            timeFormat:StrPtr;          (* time format by itself         *)
  119.  
  120.            shortDateTimeFormat:StrPtr;  (* short date & time format    *)
  121.            shortDateFormat:StrPtr;      (* short date format by itself *)
  122.            shortTimeFormat:StrPtr;      (* short time format by itself *)
  123.  
  124.            (* for numeric values *)
  125.            decimalPoint:StrPtr;          (* character before the decimals *)
  126.            groupSeparator:StrPtr;       (* separates groups of digits    *)
  127.            fracGroupSeparator:StrPtr;   (* separates groups of digits    *)
  128.            grouping:UbytePtr;          (* size of each group           *)
  129.            fracGrouping:UbytePtr;          (* size of each group           *)
  130.  
  131.            (* for monetary values *)
  132.            monDecimalPoint:StrPtr;
  133.            monGroupSeparator:StrPtr;
  134.            monFracGroupSeparator:StrPtr;
  135.            monGrouping:UbytePtr;
  136.            monFracGrouping:UbytePtr;
  137.            monFracDigits:SHORTCARD;          (* digits after the decimal point   *)
  138.            monIntFracDigits:SHORTCARD;     (* for international representation *)
  139.            reserved10:SHORTCARD;
  140.            reserverd11:SHORTCARD;
  141.  
  142.            (* for currency symbols *)
  143.            monCS:StrPtr;              (* currency symbol          *)
  144.            monSmallCS:StrPtr;          (* symbol for small amounts     *)
  145.            monIntCS:StrPtr;          (* internationl (ISO 4217) code *)
  146.  
  147.            (* for positive monetary values *)
  148.            monPositiveSign:StrPtr;      (* indicate positive money value     *)
  149.            monPositiveSpaceSep:SHORTCARD;  (* determine if separated by space *)
  150.            monPositiveSignPos:SHORTCARD;   (* position of positive sign     *)
  151.            monPositiveCSPos:SHORTCARD;     (* position of currency symbol     *)
  152.            reserved2:SHORTCARD;
  153.  
  154.            (* for negative monetary values *)
  155.            monNegativeSign:StrPtr;      (* indicate negative money value     *)
  156.            monNegativeSpaceSep:SHORTCARD;  (* determine if separated by space *)
  157.            monNegativeSignPos:SHORTCARD;   (* position of negative sign     *)
  158.            monNegativeCSPos:SHORTCARD;     (* position of currency symbol     *)
  159.            reserved3:SHORTCARD;
  160.           END;
  161.  LocalePtr= POINTER TO Locale;
  162.  
  163.  
  164. CONST
  165. (* constants for Locale.loc_MeasuringSystem *)
  166. msIso=        0;    (* international metric system *)
  167. msAmerican=    1;    (* american system           *)
  168. msImperial=    2;    (* imperial system           *)
  169. msBritish=    3;    (* british system           *)
  170.  
  171. (* constants for Locale.loc_CalendarType *)
  172. ct7SUN= 0;   (* 7 days a week, Sunday is the first day     *)
  173. ct7MON= 1;   (* 7 days a week, Monday is the first day     *)
  174. ct7TUE= 2;   (* 7 days a week, Tuesday is the first day     *)
  175. ct7WED= 3;   (* 7 days a week, Wednesday is the first day *)
  176. ct7THU= 4;   (* 7 days a week, Thursday is the first day  *)
  177. ct7FRI= 5;   (* 7 days a week, Friday is the first day     *)
  178. ct7SAT= 6;   (* 7 days a week, Saturday is the first day  *)
  179.  
  180. (* constants for Locale.loc_MonPositiveSpaceSep and Locale.loc_MonNegativeSpaceSep *)
  181. ssNoSpace= 0;  (* cur. symbol is NOT separated from value with a space *)
  182. ssSpace=   1;  (* cur. symbol IS separated from value with a space     *)
  183.  
  184. (* constants for Locale.loc_MonPositiveSignPos and Locale.loc_MonNegativeSignPos *)
  185. spParens=   0;    (* () surround the quantity and currency_symbol   *)
  186. spPrecAll=  1;    (* sign string comes before amount and symbol      *)
  187. spSuccAll=  2;    (* sign string comes after amount and symbol      *)
  188. spPrecCurr= 3;    (* sign string comes right before currency symbol *)
  189. spSuccCurr= 4;    (* sign string comes right after currency symbol  *)
  190.  
  191. (* constants for Locale.loc_MonPositiveCSPos and Locale.loc_MonNegativeCSPos *)
  192. cspPrecedes= 0;    (* currency symbol comes before value *)
  193. cspSucceeds= 1;    (* currency symbol comes after value  *)
  194.  
  195. (* elements of the byte arrays pointed to by:
  196.  *   Locale.loc_Grouping
  197.  *   Locale.loc_FracGrouping
  198.  *   Locale.loc_MonGrouping
  199.  *   Locale.loc_MonFracGrouping
  200.  * are interpreted as follows:
  201.  *
  202.  *    255     indicates that no further grouping is to be performed
  203.  *    0       indicates that the previous element is to be repeatedly used
  204.  *          for the remainder of the digits
  205.  *    <other> the number of digits that comprises the current group
  206.  *)
  207.  
  208.  
  209. (*****************************************************************************)
  210.  
  211.  
  212. (* Tags for OpenCatalog() *)
  213.  ocTagBase= UD.tagUser+90000H;
  214.  ocBuiltInLanguage=ocTagBase+1;  (* language of built-in strings    *)
  215.  ocBuiltInCodeSet=ocTagBase+2;   (* code set of built-in strings    *)
  216.  ocVersion=ocTagBase+3;          (* catalog version number required *)
  217.  ocLanguage=ocTagBase+4;         (* preferred language of catalog   *)
  218.  
  219.  
  220. (*****************************************************************************)
  221.  
  222.  
  223. (* Comparison types for StrnCmp() *)
  224.  scAscii=    0;
  225.  scCollate1= 1;
  226.  scCollate2= 2;
  227.  
  228.  
  229. (*****************************************************************************)
  230.  
  231. TYPE
  232. (* This structure must only be allocated by locale.library and is READ-ONLY! *)
  233.  Catalog= RECORD
  234.            link:ED.Node;    (* for internal linkage    *)
  235.            pad:CARDINAL;    (* to longword align       *)
  236.            language:StrPtr;    (* language of the catalog *)
  237.            codeSet:LONGCARD;    (* currently always 0       *)
  238.            version:CARDINAL;    (* version of the catalog  *)
  239.            revision:CARDINAL;    (* revision of the catalog *)
  240.           END;
  241.  CatalogPtr= POINTER TO Catalog;
  242.  
  243.  
  244.  
  245. (*****************************************************************************)
  246.  
  247. END LocaleD.
  248.