Minor bugfixes

This commit is contained in:
llsth 2015-04-08 23:01:23 +02:00
parent 5c0e528980
commit 7a53ed1691
8 changed files with 24 additions and 23 deletions

View File

@ -44,25 +44,22 @@ AmigaLanguage::AmigaLanguage()
base = (struct LocaleBase*)OpenLibrary("locale.library", 38L); base = (struct LocaleBase*)OpenLibrary("locale.library", 38L);
locale = OpenLocale(NULL); locale = OpenLocale(NULL);
help = OpenCatalog(NULL, "amath-help.catalog", helpcatalog = OpenCatalog(locale, "amath-help.catalog",
OC_BuiltInLanguage,"english", OC_BuiltInLanguage,"english",
OC_Language,"dansk", TAG_DONE);
TAG_DONE); identcatalog = OpenCatalog(locale, "amath-ident.catalog",
ident = OpenCatalog(NULL, "amath-ident.catalog", OC_BuiltInLanguage,"english",
OC_BuiltInLanguage,"english", TAG_DONE);
OC_Language,"dansk", textcatalog = OpenCatalog(locale, "amath-text.catalog",
TAG_DONE); OC_BuiltInLanguage,"english",
text = OpenCatalog(NULL, "amath-text.catalog", TAG_DONE);
OC_BuiltInLanguage,"english",
OC_Language,"dansk",
TAG_DONE);
} }
AmigaLanguage::~AmigaLanguage() AmigaLanguage::~AmigaLanguage()
{ {
CloseCatalog(help); CloseCatalog(helpcatalog);
CloseCatalog(ident); CloseCatalog(identcatalog);
CloseCatalog(text); CloseCatalog(textcatalog);
CloseLocale(locale); CloseLocale(locale);
CloseLibrary((struct Library*)base); CloseLibrary((struct Library*)base);
} }
@ -82,7 +79,7 @@ char* AmigaLanguage::GetText(int id)
return (char*)(HELPNOHELP); return (char*)(HELPNOHELP);
} }
const char *text = GetCatalogStr(help, def->id, (char*)def->text); const char *text = GetCatalogStr(helpcatalog, def->id, (char*)def->text);
char *untagged = UntagText(text); char *untagged = UntagText(text);
return untagged; return untagged;
} }
@ -102,7 +99,7 @@ char* AmigaLanguage::GetHelpText(char* ident)
return (char*)(HELPNOHELP); return (char*)(HELPNOHELP);
} }
const char *text = GetCatalogStr(help, def->id, (char*)def->text); const char *text = GetCatalogStr(identcatalog, def->id, (char*)def->text);
char *untagged = UntagText(text); char *untagged = UntagText(text);
return untagged; return untagged;
} }
@ -122,7 +119,7 @@ char* AmigaLanguage::GetHelpText(Symbol symbol)
return (char*)(HELPNOHELP); return (char*)(HELPNOHELP);
} }
const char *text = GetCatalogStr(help, def->id, (char*)def->text); const char *text = GetCatalogStr(textcatalog, def->id, (char*)def->text);
char *untagged = UntagText(text); char *untagged = UntagText(text);
return untagged; return untagged;
} }

View File

@ -51,9 +51,9 @@ public:
private: private:
struct LocaleBase* base; struct LocaleBase* base;
struct Locale* locale; struct Locale* locale;
struct Catalog *help; struct Catalog *helpcatalog;
struct Catalog *ident; struct Catalog *identcatalog;
struct Catalog *text; struct Catalog *textcatalog;
}; };
#endif #endif

Binary file not shown.

View File

@ -1,4 +1,4 @@
## version $VER: amath-help.catalog 1.60 (08.04.2015) ## version $VER: amath-ident.catalog 1.60 (08.04.2015)
## language dansk ## language dansk
## codeset 0 ## codeset 0
; ############################################################################# ; #############################################################################

Binary file not shown.

View File

@ -1,4 +1,4 @@
## version $VER: amath-help.catalog 1.60 (08.04.2015) ## version $VER: amath-text.catalog 1.60 (08.04.2015)
## language dansk ## language dansk
## codeset 0 ## codeset 0
; ############################################################################# ; #############################################################################

View File

@ -9,6 +9,8 @@
; Build with: ; Build with:
; flexcat ident.cd ../app/localize/ident.h=ident.sd ; flexcat ident.cd ../app/localize/ident.h=ident.sd
; ############################################################################# ; #############################################################################
#language english
#version 0
abs (/40/) abs (/40/)
The absolute value (or modulus) |x| of a real number x is the#NEWLINE#non-negative value of x without regard to its sign.#NEWLINE##SYNTAXHIGHLIGHT#Example: abs(-237.25)#NORMALTEXT##NEWLINE# The absolute value (or modulus) |x| of a real number x is the#NEWLINE#non-negative value of x without regard to its sign.#NEWLINE##SYNTAXHIGHLIGHT#Example: abs(-237.25)#NORMALTEXT##NEWLINE#
sgn (/40/) sgn (/40/)

View File

@ -27,6 +27,8 @@
; Build with: ; Build with:
; flexcat text.cd ../app/localize/text.h=text.sd ; flexcat text.cd ../app/localize/text.h=text.sd
; ############################################################################# ; #############################################################################
#language english
#version 0
INTROMSG (/4/) INTROMSG (/4/)
#NORMALTEXT##BOLD##STARTMSG##NEWLINE##NORMALTEXT##COLOR02##ITALICS#Type help to show info.#NEWLINE# #NORMALTEXT##BOLD##STARTMSG##NEWLINE##NORMALTEXT##COLOR02##ITALICS#Type help to show info.#NEWLINE#
TXTLISTDIRHEADER (/4/) TXTLISTDIRHEADER (/4/)