🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: bit.software.international
Article #298

Re: Message Catalog Systems

#298
From: Mitchum DSouza
Date: Tue, 23 Nov 1993 09:23
43 lines
2536 bytes
> Sender: William Crocca (William_T_Crocca.Roch817@xerox.com)
> Subject: Re: INSOFT-L List Manager's Notes (received 4/11/1993)

> There was a comment in the posting regarding "message catalog libraries"
> by Roger Nelson.  What do these libraries do?  (If there was an earlier
> message regarding them, I missed it).

Message cataloging allows one to generate messages in any number of languages.
Statements like

	printf("Good Morning");

which make no allowance for the other non-english speaking countries, are
good candidates for message cataloging. The above statement will become (for
example - omitting the catopen(), etc...)

	printf(catgets(cat_fd, XSet, X1, "Good Morning");

And will be able to output (for example) "Bonjour" if a french catalog is
installed.  The default English message is returned if a catalog is not
found/corrupt. The catgets() function is also able to return format messages
like
	"time = %s, count = %d\n"

Anyway I have implemented this cataloging in the standard Linux shared C
library making it possible to have system/errno messages in any language one
prefers.

As an aside, because the preformance hit from message cataloging the C library
internally, stemming from unecessary copying using read() functions, is
fairly significant, I have rewritten the catgets()/loadSet() functions using
mmap()/mmunmap() which improves perormance by a noticeable factor. Should I
post the patches here for those who would like to try it ??

[Note from Jeff: Mitch's software is now available on our anonymous ftp
                 server

                      Site:      rhino.cis.vutbr.cz (147.229.3.10)
                      Directory: pub/lists/insoft-l/software/messagecat
                      File:      msgcat-mmap-1.0.tar.Z
]

Mitch
Technical Details
Message-ID: <2cskqg$4iq@rhino.cis.vutbr.cz>
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!pipex!uunet!europa.eng.gtefsd.com!paladin.american.edu!news.univie.ac.at!aci.cvut.cz!rhino.cis.vutbr.cz!gateway

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 110cdc,14f35141b555e75f,start
X-Google-Attributes: gid110cdc,public
X-Google-ArrivalTime: 1993-11-23 03:54:52 PST
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!pipex!uunet!europa.eng.gtefsd.com!paladin.american.edu!news.univie.ac.at!aci.cvut.cz!rhino.cis.vutbr.cz!gateway
From: m.dsouza@mrc-apu.cam.ac.uk (Mitchum DSouza)
Newsgroups: bit.software.international
Subject: Re: Message Catalog Systems
Date: 23 Nov 1993 10:23:28 +0100
Organization: Technical University of Brno, Czech Republic
Lines: 46
Sender: root@rhino.cis.vutbr.cz
Approved: insoft-l-moderator@cis.vutbr.cz
Message-ID: <2cskqg$4iq@rhino.cis.vutbr.cz>
Reply-To: <insoft-l@cis.vutbr.cz>