dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Re: What function loads a .lang file?

Re: What function loads a .lang file?

From: TP Diffenbach <>
Date: Sat, 26 Apr 2003 20:38:00 -0400

Well, I'm thinking I'll do it another way anyhow.

But we do have code that assigns pointers to the language strings. For example, in settings.c, function set_time, line 1687:
    char *dayname[] = {str(LANG_WEEKDAY_SUNDAY),

I wanted to maintain arrays that were subsets of the language_strings array, and change mine whenver language_strings was changed. Instead I'm thinking of indexing directly into language_strings. Admittly, that fails if the strings in english.lang are reorderd, but it doesn't seem to be too much of a burden on maintainers to insist that like strings be kept together, and in a certain order.

Quoting Linus Nielsen Feltzing <>:

> TP Diffenbach wrote:
> > I have code that wants to know when a .lang file is loaded, so it
> can
> > update its pointers to the language strings it cares about.
> Then your code does the wrong thing. You should not assign pointers
> directly to the language strings.
> /Linus

Archos FM needs a Rockbox!
Received on 2003-04-27

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy