[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] International question




On Wed, 31 Jan 2001, Petr Stehlik wrote:

> On Wed, 31 Jan 2001, Konrad M. Kokoszkiewicz wrote:
> 
> > Despite that, generally, I would like to change this somehow. For now the
> > international support in MiNT means that there are as many versions of all
> > messages compiled into, as much languages we support. Since we use one at
> > once, the rest of messages just waste memory.
> > 
> > So I was thinking about changing all this so that only English messages
> > could be compiled into, and if one wishes to have MiNT speaking another
> > language, the local version of the messages could be soft loaded. Sort of
> > RSC file, but simpler a lot.
> 
> the code for loading and parsing the file will take more memory than the
> other languages texts compiled in.

I tend not to agree.  I don't know how many messages are stored in the
kernal, but if it is like magic and has a text version of every TOS error
message, plus additional messages, and in several languages, then it would
almost have to be more.  Assuming there were 100 messages, the code could
be very simple, simply reading 100 lines from a text file and storing them
in memory.  There could be in the mint kernal, an array with the same
number of entries as messages.  The array would be of pointers to the
strings, and the loader would update these as it read in the text file and
put the strings in memory.  If the pointer was nil for any reason (failure
to load the file), then the message printer routine could simply
detect this and print "message #xxx".  I can't immagine this code would
take much space compared to the message text if the number of messages and
languages were very large at all.

- noah silva

 > 
> Petr
> --
> News: Clocky 3.10b, PARCP 3.80!, Atari800 1.04 at http://joy.atari.org/
> 
> 
>