Re: [AD] Patch to thanks._tx and demo.c

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


Grzegorz Adam Hankiewicz wrote:
On 2005-02-15, Marcio wrote:
  
What about to replace all accented characters in thanks._tx for
their 7-bit ASCII counterparts (e.g á -> a)? For me, it seems to
be the easiest solution.
    
The easiest solution should be to put set_uformat(U_ASCII); in line
2058 before allegro_init(); Do accents look ok then?
  
[...]

Unfortunately, the solution proposed by Grzegorz doesn't work, unless we edit demo.dat and update TITLE_FONT.  The TITLE_FONT in demo.dat (dated 2004.10.03) provides meaningful glyphs only for the 7-bit ASCII characters (even though it has 224 glyphs, all glyphs for 8-bit characters are blank). If this font were complete, the solution proposed by Grzegorz would work fine (I've tested it, replacing TITLE_FONT by END_FONT and the accented characters were displayed fine).

After greping thanks._tx I've found only 3 accented characters. Allegro has many contributors, a lot of them are foreigners. It seems to me to be unlikely that out of 231+ contributors only 3 have names with accented characters. So I think we should drop these accents (by the way, many foreign authors might have their names written in thanks._tx with accented characters reduced to their 7-bit equivalents). I'm sending a patch to thanks._tx, against the last weekly CVS snapshot.

At least, this would be the easiest solution. A nicer solution would be to fix demo.dat, but does three names justify adding some extra kbytes to demo.dat to save accented characters in TITLE_FONT ?  I think not, and chances are this demo game might be replaced by something better (see message http://sourceforge.net/mailarchive/message.php?msg_id=11268528 ).  I don't mind to have the accent removed from my name. Even though it's written as Márcio, in many documents (in my country), it appears as Marcio (without the accent).

I'm attaching the program I've used to grep thanks._tx to find those 3 accents (source code in Portuguese: acento.c) If you wish a translated version to English, let me know.

P.S: Let me know when Allegro 4.2 beta will be released. I'll have time to test it's DJGPP version on weekends.

Best regards,
Marcio.

--- thanks._tx.orig	2005-02-19 05:05:20.000000000 +0000
+++ thanks._tx	2005-03-29 16:35:46.000000000 +0000
@@ -466,7 +466,7 @@
    Joshua Heyer (<email>joshua_heyer@xxxxxxxxxx</a>).<br>
    Wrote the original version of the OSS sound driver.
 
-   Julien Cugnière (<email>jcugniere@xxxxxxxxxx</a>).<br>
+   Julien Cugniere (<email>jcugniere@xxxxxxxxxx</a>).<br>
    Improved the support for non-blocking menus, fixed a bug related to the
    retrieval of the inital volume when no primary buffer was present under
    Windows, fixed the crash on exit with the aRts sound driver and added an 
@@ -549,7 +549,7 @@
    made the show_video_bitmap() method of the Windows windowed driver wait
    for a vsync.
 
-   Márcio Fialho (<email>maaf1980@xxxxxxxxxx</a>).<br>
+   Marcio Fialho (<email>maaf1980@xxxxxxxxxx</a>).<br>
    Fixed several issues with the DJGPP port and the VBE/AF driver and fixed
    some bugs related to author credits.
 
@@ -946,7 +946,7 @@
    V Karthik Kumar (<email>karthikkumar@xxxxxxxxxx</a>).<br>
    Added a Tamil language greeting to exunicode.
 
-   Ville Skyttä (<email>scop@xxxxxxxxxx</a>).<br>
+   Ville Skytta (<email>scop@xxxxxxxxxx</a>).<br>
    Fixed a problem with make install libdir= and modules on Unix systems.
 
    Vincent Penquerc'h (<email>lyrian@xxxxxxxxxx</a>).<br>
/* Programa usado para encontrar caracteres acentuados em um arquivo texto
   (caracteres com código ascii acima de 0x7F), informando em que linha
 	aparecem

   Por Márcio A. A. Fialho - 29/03/2005
 */

#include <stdio.h>
#include <stdlib.h>

#define NL 0x0A

int main (int argc, char *argv[])
 {
	int linha=0;
 	if (argc<2)
	 {
		printf ("ACENTO - Encontra caracteres com código ascii acima de 0x7F, informando a linha\n"
			"em que aparecem.\n"
			"Uso: Acento <nome_arquivo>\n");
		return 0;
	 }

	int c;
	FILE *src;
	src=fopen(argv[1],"rt");
	if (src==NULL)
	 {
	 	printf ("Não foi possível ler o arquivo \"%s\"\a\n",argv[1]);
		exit(1);
	 }

	c=fgetc(src);
	while (!feof(src))
	 {
		if (c > 0x7F)
			printf ("Caractere %c encontrado na linha %d.\n",c,linha+1);

		if (c == NL)
			linha++;

		c=fgetc(src);
	 }
	fclose(src);
	return 0;
 }



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