[AD] Little patch for XXtext.cfg correct reading.

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Hi.

As mentioned on the Allegro ML here's the patch which lowers any case
string as language variable before rading .cfg files, which makes things
work on linux as long as xxtext.cfg files are lower case (which should be
the usual thing).

Hopefully it's ok to ustrlwr the string returned by get_config_string,
even when it's in an internal buffer. At least works for me without
problems and I can play my sub game happy again ;-)

--- config.c.old	Sun Apr 30 13:05:20 2000
+++ config.c	Sun Apr 30 13:18:26 2000
@@ -1094,6 +1094,7 @@
    name = get_config_string(NULL, uconvert_ascii("language", tmp1), NULL);
 
    if ((name) && (ugetc(name))) {
+      ustrlwr (name);
       if ((ustrlen(name)<4) || (ustricmp(name+uoffset(name, -4), uconvert_ascii("text", tmp1)) != 0))
 	 ext = uconvert_ascii("text.cfg", tmp1);
       else

 Grzegorz Adam Hankiewicz   gradha@xxxxxxxxxx - http://gradha.infierno.org
 Other web pages:  http://glub.ehu.es/  -  http://welcome.to/gogosoftware/



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/