1 ##rem $Id: Oberon-A.sd 253 2014-02-18 11:15:58Z damato $
6 (****************************************************************
8 This file was created automatically by `%fv'
12 Oberon-A source description (C) 1994 by Albert Weinert
13 Using with Oberon-A Interfaces for AmigaOS Release 3.1
20 ****************************************************************)
25 lo := Locale, e := Exec, u := Utility, y := SYSTEM;
39 AppStringArray = ARRAY %n OF AppString;
42 AppStrings : AppStringArray;
43 catalog : lo.CatalogPtr;
47 AppStrings[%e].id := %i; AppStrings[%e].str := y.ADR( %s );
50 PROCEDURE CloseCatalog*();
52 IF catalog # NIL THEN lo.base.CloseCatalog (catalog); catalog:=NIL END;
55 PROCEDURE OpenCatalog*(loc:lo.LocalePtr; language:ARRAY OF CHAR);
56 VAR Tag : ARRAY 4 OF u.TagItem;
59 IF (catalog = NIL) & (lo.base # NIL) THEN
60 Tag[0].tag := lo.ocBuiltInLanguage; Tag[0].data := y.ADR( builtinlanguage );
61 Tag[1].tag := u.tagSkip; Tag[1].data := y.ADR( language );
62 Tag[2].tag := lo.ocVersion; Tag[2].data := version;
63 Tag[3].tag := u.tagDone;
66 Tag[1].tag:= lo.ocLanguage;
68 catalog := lo.base.OpenCatalogA (loc, "%b.catalog", Tag);
72 PROCEDURE GetString* (num: LONGINT): e.STRPTR;
77 i := 0; WHILE (i < %n) & (AppStrings[i].id # num) DO INC (i) END;
80 default := AppStrings[i].str;
86 RETURN lo.base.GetCatalogStr (catalog, num, default^);