Re: [AD] dat2c ready for testing

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


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

(Thanks also to Javier and Peter for information on trigraphs - this is
now fixed). New version available from:
  http://www.lwithers.demon.co.uk/dat2c/
as dat2c.tar.gz and dat2c.tar.bz2 .

On Saturday 17 August 2002 09:52, Eric Botcazou wrote:
[snip - newlines]
> Yes, I tend to think it's an overkill here. Let's keep the code as
> simple as possible.

OK, but I rewrote the conversion output to use a nice, simple function,
where $n$ represents a newline. Have a look at the new code - it's much
simpler. Besides, the default is to output the correct newline
character for the system.

[snip - should we support constructors?]
> I think we should support them because of backward compatibility at
> the source level between 4.0.x and 4.1.x

OK, I changed the code to emit a constructor.

[snip]
> '-o' is very meaningfull for all gcc users. Moreover, as datafiles
> are the default input for the program, I think they shouldn't need an
> option to be processed.

OK, changed.

[snip]
> It's related to the '-n' option. The default name should be
> PREFIX_data instead of PREFIX_dat.

OK, done.

> The 4.1.1 WIP release will wait for it anyways.

Good. Well, I have addressed all the aboveissues, and it now seems to
work OK. However, there was a small bug in initialise_datafile(), so
please apply attached patch against allegro/src/datafile.c . Thanks.

Bye for now,
- --
Laurence Withers,  lwithers@xxxxxxxxxx
(GnuPG 04A646EA) http://www.lwithers.demon.co.uk/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9XlHvUdhclgSmRuoRAvQBAKCW2rUhpz4oV7DuYVcwXaSbz3kMgwCeMLTU
zMrqAxiw4NbuBg1fLRH2kPY=
=BTEK
-----END PGP SIGNATURE-----
--- datafile.c.old	Sat Aug 17 14:27:26 2002
+++ datafile.c	Sat Aug 17 14:27:10 2002
@@ -1853,7 +1853,7 @@
  */
 static void initialise_datafile(DATAFILE *data)
 {
-   int c, c2;
+   int c, c2, col_font;
    FONT *f;
    SAMPLE *s;
    MIDI *m;
@@ -1872,8 +1872,8 @@
 
 	 case DAT_FONT:
 	    f = data[c].dat;
-	    c = (int)f->vtable;  /* color flag */
-	    if (c == 1) {
+	    col_font = (int)f->vtable;  /* color flag */
+	    if (col_font == 1) {
 	       FONT_COLOR_DATA *cf = (FONT_COLOR_DATA *)f->data;
 	       while (cf) {
 		  for (c2 = cf->begin; c2 < cf->end; c2++)


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