1 ##rem $Id: Oberon_V38.sd 253 2014-02-18 11:15:58Z damato $
5 (****************************************************************
7 This file was created automatically by `%fv'
12 ****************************************************************)
18 lo := Locale, e := Exec, u := Utility, y := SYSTEM;
24 %i* = %d;\n%iSTR = %s;\n\n
32 AppStringArray = ARRAY %n OF AppString;
35 AppStrings = AppStringArray (
40 catalog : lo.CatalogPtr;
42 PROCEDURE CloseCatalog*();
44 IF catalog # NIL THEN lo.CloseCatalog (catalog); catalog:=NIL END;
47 PROCEDURE OpenCatalog*(loc:lo.LocalePtr; language:ARRAY OF CHAR);
51 IF (catalog = NIL) & (lo.base # NIL) THEN
52 Tag:= u.Tags4(lo.BuiltInLanguage, y.ADR(builtinlanguage),
53 u.skip, u.done, lo.Version, version, u.done, u.done);
55 Tag[1].tag:= lo.Language; Tag[1].data:= y.ADR(language);
57 catalog := lo.OpenCatalogA (loc, "%b.catalog", Tag);
61 PROCEDURE GetString* (num: LONGINT): e.STRPTR;
66 i := 0; WHILE (i < %n) AND (AppStrings[i].id # num) DO INC (i) END;
69 default := AppStrings[i].str;
75 RETURN lo.GetCatalogStr (catalog, num, default^);