DEFINITION MODULE LocaleD;(*$Implementation:=FALSE*)
(* 04-Sep-92/bp *)

(* V38 *)

FROM SYSTEM IMPORT
  LONGSET;
FROM ExecD IMPORT
  Library,Node;
FROM UtilityD IMPORT
  tagUser;


CONST
  localeName="locale.library";

TYPE
  CatalogPtr=POINTER TO Catalog;
  LocaleBasePtr=POINTER TO LocaleBase;
  LocalePtr=POINTER TO Locale;
  StrPtr=POINTER TO ARRAY [0..511] OF CHAR;
  UbytePtr=POINTER TO ARRAY [0..511] OF SHORTCARD;

  LocaleBase=RECORD
    libNode: Library;
    sysPatches: INTEGER; (* BOOL *)
  END;

CONST
(* measuringSystem *)
  msIso=0;
  msAmerican=1;
  msImperial=2;
  msBritish=3;

(* calendarType *)
  ct7SUN=0;
  ct7MON=1;
  ct7TUE=2;
  ct7WED=3;
  ct7THU=4;
  ct7FRI=5;
  ct7SAT=6;

(* monPositiveSpaceSep, monNegativeSpaceSep *)
  ssNoSpace=0;
  ssSpace=1;

(* monPositiveSignPos, monNegativeSignPos *)
  spParens=0;
  spPrecAll=1;
  spSuccAll=2;
  spPrecCurr=3;
  spSuccCurr=4;

(* monPositiveCSPos, monNegativeCSPos *)
  cspPrecedes=0;
  cspSucceeds=1;

TYPE
  Locale=RECORD
    localeName:StrPtr;
    languageName:StrPtr;
    prefLanguages:ARRAY [0..9] OF StrPtr;
    flags:LONGSET;

    codeSet:LONGCARD;
    countryCode:LONGCARD;
    telephoneCode:LONGCARD;
    gmtOffset:LONGINT;
    measuringSystem:SHORTCARD;
    calendarType:SHORTCARD;
    reserved01:SHORTCARD;
    reserved02:SHORTCARD;

    dateTimeFormat:StrPtr;
    dateFormat:StrPtr;
    timeFormat:StrPtr;

    shortDateTimeFormat:StrPtr;
    shortDateFormat:StrPtr;
    shortTimeFormat:StrPtr;

    decimalPoint:StrPtr;
    groupSeparator:StrPtr;
    fracGroupSeparator:StrPtr;
    grouping:UbytePtr;
    fracGrouping:UbytePtr;

    monDecimalPoint:StrPtr;
    monGroupSeparator:StrPtr;
    monFracGroupSeparator:StrPtr;
    monGrouping:UbytePtr;
    monFracGrouping:UbytePtr;
    monFracDigits:SHORTCARD;
    monIntFracDigits:SHORTCARD;
    reserved10:SHORTCARD;
    reserved11:SHORTCARD;

    monCS:StrPtr;
    monSmallCS:StrPtr;
    monIntCS:StrPtr;

    monPositiveSign:StrPtr;
    monPositiveSpaceSep:SHORTCARD;
    monPositiveSignPos:SHORTCARD;
    monPositiveCSPos:SHORTCARD;
    reserved2:SHORTCARD;

    monNegativeSign:StrPtr;
    monNegativeSpaceSep:SHORTCARD;
    monNegativeSignPos:SHORTCARD;
    monNegativeCSPos:SHORTCARD;
    reserved3:SHORTCARD;
  END;


(* GetLocaleStr(): *)
CONST
  day1=1;
  day2=2;
  day3=3;
  day4=4;
  day5=5;
  day6=6;
  day7=7;
  abday1=8;
  abday2=9;
  abday3=10;
  abday4=11;
  abday5=12;
  abday6=13;
  abday7=14;
  mon1=15;
  mon2=16;
  mon3=17;
  mon4=18;
  mon5=19;
  mon6=20;
  mon7=21;
  mon8=22;
  mon9=23;
  mon10=24;
  mon11=25;
  mon12=26;
  abmon1=27;
  abmon2=28;
  abmon3=29;
  abmon4=30;
  abmon5=31;
  abmon6=32;
  abmon7=33;
  abmon8=34;
  abmon9=35;
  abmon10=36;
  abmon11=37;
  abmon12=38;
  yesstr=39;
  nostr=40;
  amstr=41;
  pmstr=42;
  softhyphen=43;
  hardhyphen=44;
  openquote=45;
  closequote=46;
  maxstrmsg=47;

(* OpenCatalog() *)
  ocTagBase=tagUser+90000H;
  ocBuiltInLanguage=ocTagBase+1;
  ocBuiltInCodeSet=ocTagBase+2;
  ocVersion=ocTagBase+3;
  ocLanguage=ocTagBase+4;

(* StrnCmp() *)
  scAscii=0;
  scCollate1=1;
  scCollate2=2;


TYPE
  Catalog=RECORD
    link:Node;
    pad:CARDINAL;
    language:StrPtr;
    codeSet:LONGCARD;
    version:CARDINAL;
    revision:CARDINAL;
  END;

END LocaleD.noimp
