1 ##rem $Id: Oberon_V39.sd 253 2014-02-18 11:15:58Z damato $
5 (****************************************************************
7 This file was created automatically by `%fv'
12 ****************************************************************)
17 lo := Locale, e := Exec, u := Utility, y := SYSTEM;
23 %i* = %d;\n%iSTR = %s;\n\n
31 AppStringArray = ARRAY %n OF AppString;
34 AppStrings = AppStringArray (
39 catalog : lo.CatalogPtr;
41 PROCEDURE CloseCatalog*();
43 IF catalog # NIL THEN lo.CloseCatalog (catalog); catalog:=NIL END;
46 PROCEDURE OpenCatalog*(loc:lo.LocalePtr; language:ARRAY OF CHAR);
50 IF (catalog = NIL) & (lo.base # NIL) THEN
51 Tag:= u.Tags4(lo.BuiltInLanguage, y.ADR(builtinlanguage),
52 u.skip, u.done, lo.version, version, u.done, u.done);
54 Tag[1].tag:= lo.language; Tag[1].data:= y.ADR(language);
56 catalog := lo.OpenCatalogA (loc, "%b.catalog", Tag);
60 PROCEDURE GetString* (num: LONGINT): e.STRPTR;
65 i := 0; WHILE (i < %n) AND (AppStrings[i].id # num) DO INC (i) END;
68 default := AppStrings[i].str;
74 RETURN lo.GetCatalogStr (catalog, num, default^);