home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 18
/
aminetcdnumber181997.iso
/
Aminet
/
dev
/
m2
/
CycloneModules.lha
/
modules
/
txt
/
LocaleD.def
< prev
next >
Wrap
Text File
|
1996-11-28
|
9KB
|
248 lines
(*$Implementation- *)
DEFINITION MODULE LocaleD;
(* 27-Nov-96, Stefan Tiemann for Cyclone, converted from
** locale.h 38.12 (24.2.93), Includes Release 40.15
** locale.library interface structures and definitions
**)
IMPORT ED: ExecD;
IMPORT UD: UtilityD;
FROM SYSTEM IMPORT LONGSET;
CONST
localeName="locale.library";
TYPE
StrPtr=POINTER TO ARRAY [0..511] OF CHAR;
UbytePtr=POINTER TO ARRAY [0..511] OF SHORTCARD;
(* constants for GetLocaleStr() *)
CONST
day1= 1; (* Sunday *)
day2= 2; (* Monday *)
day3= 3; (* Tuesday *)
day4= 4; (* Wednesday *)
day5= 5; (* Thursday *)
day6= 6; (* Friday *)
day7= 7; (* Saturday *)
abday1= 8; (* Sun *)
abday2= 9; (* Mon *)
abday3= 10; (* Tue *)
abday4= 11; (* Wed *)
abday5= 12; (* Thu *)
abday6= 13; (* Fri *)
abday7= 14; (* Sat *)
mon1= 15; (* January *)
mon2= 16; (* February *)
mon3= 17; (* March *)
mon4= 18; (* April *)
mon5= 19; (* May *)
mon6= 20; (* June *)
mon7= 21; (* July *)
mon8= 22; (* August *)
mon9= 23; (* September *)
mon10= 24; (* October *)
mon11= 25; (* November *)
mon12= 26; (* December *)
abmon1= 27; (* Jan *)
abmon2= 28; (* Feb *)
abmon3= 29; (* Mar *)
abmon4= 30; (* Apr *)
abmon5= 31; (* May *)
abmon6= 32; (* Jun *)
abmon7= 33; (* Jul *)
abmon8= 34; (* Aug *)
abmon9= 35; (* Sep *)
abmon10= 36; (* Oct *)
abmon11= 37; (* Nov *)
abmon12= 38; (* Dec *)
yesstr= 39; (* affirmative response for yes/no queries *)
nostr= 40; (* negative response for yes/no queries *)
amstr= 41; (* AM *)
pmstr= 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 *)
(*****************************************************************************)
TYPE
(* OpenLibrary("locale.library",0) returns a pointer to this structure *)
LocaleBase= RECORD
libNode: ED.Library;
sysPatches: INTEGER; (* TRUE if locale installed its patches *)
END;
LocaleBasePtr= POINTER TO LocaleBase;
(*****************************************************************************)
(* This structure must only be allocated by locale.library and is READ-ONLY! *)
Locale= RECORD
localeName:StrPtr; (* locale's name *)
languageName:StrPtr; (* language of this locale *)
prefLanguages:ARRAY [0..9] OF StrPtr; (* preferred languages *)
flags: LONGSET; (* always 0 for now *)
codeSet:LONGCARD; (* always 0 for now *)
countryCode:LONGCARD; (* user's country code *)
telephoneCode:LONGCARD; (* country's telephone code *)
gmtOffset:LONGINT; (* minutes from GMT *)
measuringSystem:SHORTCARD; (* what measuring system? *)
calendarType:SHORTCARD; (* what calendar type? *)
reserved01:SHORTCARD;
reserved02:SHORTCARD;
dateTimeFormat:StrPtr; (* regular date & time format *)
dateFormat:StrPtr; (* date format by itself *)
timeFormat:StrPtr; (* time format by itself *)
shortDateTimeFormat:StrPtr; (* short date & time format *)
shortDateFormat:StrPtr; (* short date format by itself *)
shortTimeFormat:StrPtr; (* short time format by itself *)
(* for numeric values *)
decimalPoint:StrPtr; (* character before the decimals *)
groupSeparator:StrPtr; (* separates groups of digits *)
fracGroupSeparator:StrPtr; (* separates groups of digits *)
grouping:UbytePtr; (* size of each group *)
fracGrouping:UbytePtr; (* size of each group *)
(* for monetary values *)
monDecimalPoint:StrPtr;
monGroupSeparator:StrPtr;
monFracGroupSeparator:StrPtr;
monGrouping:UbytePtr;
monFracGrouping:UbytePtr;
monFracDigits:SHORTCARD; (* digits after the decimal point *)
monIntFracDigits:SHORTCARD; (* for international representation *)
reserved10:SHORTCARD;
reserverd11:SHORTCARD;
(* for currency symbols *)
monCS:StrPtr; (* currency symbol *)
monSmallCS:StrPtr; (* symbol for small amounts *)
monIntCS:StrPtr; (* internationl (ISO 4217) code *)
(* for positive monetary values *)
monPositiveSign:StrPtr; (* indicate positive money value *)
monPositiveSpaceSep:SHORTCARD; (* determine if separated by space *)
monPositiveSignPos:SHORTCARD; (* position of positive sign *)
monPositiveCSPos:SHORTCARD; (* position of currency symbol *)
reserved2:SHORTCARD;
(* for negative monetary values *)
monNegativeSign:StrPtr; (* indicate negative money value *)
monNegativeSpaceSep:SHORTCARD; (* determine if separated by space *)
monNegativeSignPos:SHORTCARD; (* position of negative sign *)
monNegativeCSPos:SHORTCARD; (* position of currency symbol *)
reserved3:SHORTCARD;
END;
LocalePtr= POINTER TO Locale;
CONST
(* constants for Locale.loc_MeasuringSystem *)
msIso= 0; (* international metric system *)
msAmerican= 1; (* american system *)
msImperial= 2; (* imperial system *)
msBritish= 3; (* british system *)
(* constants for Locale.loc_CalendarType *)
ct7SUN= 0; (* 7 days a week, Sunday is the first day *)
ct7MON= 1; (* 7 days a week, Monday is the first day *)
ct7TUE= 2; (* 7 days a week, Tuesday is the first day *)
ct7WED= 3; (* 7 days a week, Wednesday is the first day *)
ct7THU= 4; (* 7 days a week, Thursday is the first day *)
ct7FRI= 5; (* 7 days a week, Friday is the first day *)
ct7SAT= 6; (* 7 days a week, Saturday is the first day *)
(* constants for Locale.loc_MonPositiveSpaceSep and Locale.loc_MonNegativeSpaceSep *)
ssNoSpace= 0; (* cur. symbol is NOT separated from value with a space *)
ssSpace= 1; (* cur. symbol IS separated from value with a space *)
(* constants for Locale.loc_MonPositiveSignPos and Locale.loc_MonNegativeSignPos *)
spParens= 0; (* () surround the quantity and currency_symbol *)
spPrecAll= 1; (* sign string comes before amount and symbol *)
spSuccAll= 2; (* sign string comes after amount and symbol *)
spPrecCurr= 3; (* sign string comes right before currency symbol *)
spSuccCurr= 4; (* sign string comes right after currency symbol *)
(* constants for Locale.loc_MonPositiveCSPos and Locale.loc_MonNegativeCSPos *)
cspPrecedes= 0; (* currency symbol comes before value *)
cspSucceeds= 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() *)
ocTagBase= UD.tagUser+90000H;
ocBuiltInLanguage=ocTagBase+1; (* language of built-in strings *)
ocBuiltInCodeSet=ocTagBase+2; (* code set of built-in strings *)
ocVersion=ocTagBase+3; (* catalog version number required *)
ocLanguage=ocTagBase+4; (* preferred language of catalog *)
(*****************************************************************************)
(* Comparison types for StrnCmp() *)
scAscii= 0;
scCollate1= 1;
scCollate2= 2;
(*****************************************************************************)
TYPE
(* This structure must only be allocated by locale.library and is READ-ONLY! *)
Catalog= RECORD
link:ED.Node; (* for internal linkage *)
pad:CARDINAL; (* to longword align *)
language:StrPtr; (* language of the catalog *)
codeSet:LONGCARD; (* currently always 0 *)
version:CARDINAL; (* version of the catalog *)
revision:CARDINAL; (* revision of the catalog *)
END;
CatalogPtr= POINTER TO Catalog;
(*****************************************************************************)
END LocaleD.