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

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


[sigh]
These patchs solves many problems that were preventing some authors (around 10) from appearing in the demo.exe credits. I've sent an email to Evert about this yesterday:

[...]

There's also a lot of contributors whose name doesn't appear in the demo.exe credits. If you wish, I may submit a patch to thanks._tx and demo.c that should fix this problem within few days.

Basically, the problem is that the demo.c parser (that parses thanks._tx) in search for author credits, ignores any author line that doesn't have a " (<email>" string after the author's name (notice the blank space before the opening parentheses ). There are around 10 authors (including me) in this situation.

To solve this problem, I would:
Add an empty space before every opening parentheses '(' after author names.
 Change the line 1593 in demo.c from
     if (strncmp(p2, " (<email>", 9) == 0) {
 to
if ( (strncmp(p2, " (<email>", 9) == 0) || (strncmp(p2, " (email", 7) == 0) {

To allow people with (email unknow) after their names to appear in the demo.exe credits

I'm open for suggestions.

So here are the patches.

In decreasing order of problem severity (most severe first), I did:
- Fixed demo.c so every authors with " (email unknown)." after their name will appear in the credits. (Up to now, demo.exe ignores every author whose name is not followed by a " (<email>" string. Note the blank space before '(' ). - Fixed "Grzegorz Godlewski" and "Haruhiko Okumura" entries so they will appear in the credits. - Added a blank space (required by demo.exe) before the "(<email>" string in the entries "Marcio Fialho" (me) and "Nicholas Davies", so we will appear in demo.exe credits. - Fixed "Tobi Vollebregt" entry. So his contribution will be displayed correctly in demo.exe
- Added a closing ')' that was missing to the "Greg Lee" entry.
- Removed some unnecessary blank spaces in the blank lines that separates the author credits entries.

After making these fixes, I've tested demo.exe.
Happily, everybody listed in the "@startoutput AUTHORS" section of thanks._tx was displayed in the demo.exe credits (with 98% of confidence. The remaining 2 % is the probability I missed someone and I didn't noticed it :-) ). However none of those listed in the "@startoutput THANKS" where listed. I belive this is the expected behaviour of demo.exe, although I'm not sure.

However, there remained some issues, that I hadn't fix, because to fix them I would have to hear from other people: - "Haruhiko Okumura" : His street address was being in the place of his e-mail (I belive it was a very old record in thanks._tx). So I added the (email unknown) after his name, to make him visible in the demo game. But that would make the first line of his entry too long. I don't know if this can lead to problems. So I moved his street address to the last line of his entry. So now, his address will appear after his contribution in the demo. Is this OK or we should think in another solution? Simply delete his address doesn't seems to me to be a good one, because then we would lost contact with him. - "Julien Cugnière" and "Ville Skyttä" names aren't displayed correctly in the demo program, because it doesn't recognises letters with diacritical marks (accents). - The file doesn't follow strict alphabetic order in the authors names. e.g.: "Alex Demko" comes before "Alessandro Monopoli".
 - Perhaps, there are still more bugs to be found.
- Perhaps, some contributors are still missing in the list (e.g, due to accidental deletions (I hope not) ).

Besides that, I also added the following description to my credit:
"Fixed some bugs related to authors credits." I did that because I wanted to save time for who is coordinating Allegro (whoose I belive is currently Evert), so he would not have to write a complement to my credit line in case he whished to acknoledge this small contribution. You may remove it or change it to whatever text you think is more appropriate. I hope I haven't been unpolite to write a credit addon for myself :-; Anyway, it's easier to remove text than to write it.
  Here I have a doubt. According to the english grammar, should it be:
"Fixed some bugs related to authors credits." or
    "Fixed some bugs related to the authors credits."  ?


In case someone is interested, I've gathered some interesting statistics with this job:
  There are around 231 contributors listed in thanks._tx
Demo.exe took 36:43 (thirty six minutes and fourty three seconds) to display all authors credits in a Celeron 450 MHz machine, with 96 MB of RAM and a Intel 810 on-board graphics adapter, running in plain DOS (DOS 7.10? that comes with Windows 98 SE ), using the default graphics mode and drawing technique. This contribution costed around 6 man hours (including the time to write this e-mail).


The diff files are attached:
thanks.diff
demo.diff

Best Regards,
Marcio.

--- docs/src/thanks._tx.orig	2005-02-10 07:52:00.000000000 +0000
+++ docs/src/thanks._tx	2005-02-13 12:30:26.000000000 +0000
@@ -19,7 +19,7 @@
 
    Acho A. Tang (<email>acho@xxxxxxxxxx</a>).<br>
    Added a Sidewinder Precision Pro joystick driver to the DOS port.
-   
+
    Adrian Oboroc (<email>doba@xxxxxxxxxx</a>).<br>
    Wrote the LBM loader.
 
@@ -182,7 +182,7 @@
    Made dat2c work better with ISO C90 compilers, made dat2c correctly detect
    the native line ending, fixed a problem with the include guard generated
    by dat2c and fixed a bug in the 24-bit graphics code of fixup_datafile().
-   
+
    Christian Schueler (<email>cschueler@xxxxxxxxxx</a>).<br>
    Changed the optimisation settings for better performance.
 
@@ -234,7 +234,7 @@
 
    Doug Eleveld (<email>D.J.Eleveld@xxxxxxxxxx</a>).<br>
    Wrote the d_textbox_proc() dialog object and the new grabber help system.
-   
+
    Dustin Dettmer (<email>dustin@xxxxxxxxxx</a>).<br>
    Spotted a typo in save_bitmap.
 
@@ -318,7 +318,7 @@
    Greg Hackmann (<email>hacker@xxxxxxxxxx</a>).<br>
    Contributed the Borland C++ Builder port.
 
-   Greg Lee (<email>greg@xxxxxxxxxx</a>.<br>
+   Greg Lee (<email>greg@xxxxxxxxxx</a>).<br>
    Pointed out that Linux joystick driver should read all events.
 
    Grzegorz Adam Hankiewicz (<email>gradha@xxxxxxxxxx</a>).<br>
@@ -329,7 +329,7 @@
    texi2dvi output, improved the makedoc utility and contributed a new doc
    format, added reload_config_texts() and did plenty of other things too.
 
-   Grzegorz Godlewski.<br>
+   Grzegorz Godlewski (email unknown).<br>
    Contributed a Polish localization patch, and added support for lower and
    upper altgr tables.
 
@@ -344,8 +344,9 @@
    Wrote the OS/2 detection routines and added the three-button mouse
    emulation.
 
-   Haruhiko Okumura, 12-2-404 Green Heights, 580 Nagasawa, Yokosuka 239, JP.<br>
+   Haruhiko Okumura (email unknown).<br>
    Wrote the original version of the LZSS compression code.
+   12-2-404 Green Heights, 580 Nagasawa, Yokosuka 239, JP.
 
    Hein Zelle (<email>hein@xxxxxxxxxx</a>).<br>
    Revamped the cross-compilation section of docs/build/mingw32.txt,
@@ -387,14 +388,14 @@
    James Hyman (<email>frooge@xxxxxxxxxx</a>).<br>
    Added support for quoted strings in the get_config_argv() function and
    the dithering code for paletted images.
-   
+
    James Lohr (email unknown).<br>
    Fixed a problem with mouse acceleration in fullscreen modes under Windows.
 
    James Ponder (<email>james@xxxxxxxxxx</a>).<br>
    Suggested to remove the DJGPP makefile from the Unix tar archive and
    clarified a requirement when cross-compiling from Linux.
-   
+
    Jan Bruun Andersen (<email>jba-dk@xxxxxxxxxx</a>).<br>
    Fixed a compilation problem with Cygwin.
 
@@ -504,7 +505,7 @@
    Lee Killough (email unknown).<br>
    Added the low-level hook routine to the keyboard handler and fixed a
    couple of bugs.
-   
+
    Lennart Rolland (<email>chimeni@xxxxxxxxxx</a>).<br>
    Contributed the Norwegian message translation.
 
@@ -528,7 +529,7 @@
    Magnus Henoch (<email>mange@xxxxxxxxxx</a>).<br>
    Made the gfx mode selector keep the current selection as much as possible
    and fixed a problem when compiling without 8bpp support.
-   
+
    Maiolino Carmelo (<email>cmaiolino@xxxxxxxxxx</a>).<br>
    Added the Italian keyboard mapping table.
 
@@ -547,9 +548,10 @@
    facing the screen, corrected an error in the packfile format write-up and
    made the show_video_bitmap() method of the Windows windowed driver wait
    for a vsync.
-   
-   Marcio Fialho(<email>maaf1980@xxxxxxxxxx</a>).<br>
-   Fixed several issues with the DJGPP port and the VBE/AF driver.
+
+   Marcio Fialho (<email>maaf1980@xxxxxxxxxx</a>).<br>
+   Fixed several issues with the DJGPP port and the VBE/AF driver. Fixed some
+   bugs related to authors credits.
 
    Marco Campinoti (<email>marco@xxxxxxxxxx</a>).<br>
    Added 15 and 24 bit support to the native Tseng ET4000 driver (now
@@ -634,7 +636,7 @@
 
    Michail Pishchagin (<email>mblsha@xxxxxxxxxx</a>).<br>
    Contributed the ustrnicmp() function.
-   
+
    Milan Mimica (<email>milan.mimica1@xxxxxxxxxx</a>).<br>
    Fixed a bug in the keyconf utility.
 
@@ -653,7 +655,7 @@
    Neil Roy (<email>neilroy@xxxxxxxxxx</a>).<br>
    Suggested many improvements to the documentation.
 
-   Nicholas Davies(<email>master_goodbytes@xxxxxxxxxx</a>).<br>
+   Nicholas Davies (<email>master_goodbytes@xxxxxxxxxx</a>).<br>
    Made the fix class not trigger warnings with gcc -Weffc++.
 
    Nick Kochakian (<email>nickk@xxxxxxxxxx</a>).<br>
@@ -751,7 +753,7 @@
 
    Phil Frisbie, Jr. (<email>pfrisbie@xxxxxxxxxx</a>).<br>
    Wrote the CPU type detection code.
-   
+
    Phil Shenk (email unknown).<br>
    Improved the MSVC build instructions.
 
@@ -919,8 +921,9 @@
    Timothy Terriberry (<email>sundance@xxxxxxxxxx</a>).<br>
    Fixed several bugs in the RGB &lt-&gt HSV conversion routines.
 
-   Tobi Vollebregt (email unknown) spotted a bug in ustrerror(), which was
-   not returning a pointer to a static buffer.
+   Tobi Vollebregt (email unknown).<br>
+   Spotted a bug in ustrerror(), which was not returning a pointer to
+   a static buffer.
 
    Tom Breton (<email>tob@xxxxxxxxxx</a>).<br>
    Added the functionality selection #ifndefs to allegro.h.
@@ -936,7 +939,7 @@
    and other keys to the input handler, organised getting the IF-SEGA
    joystick drivers by S.Suzuki merged into my codebase and added a more
    aggressive Sidewinder joystick driver.
-   
+
    Tore Halse (<email>gnolam@xxxxxxxxxx</a>).<br>
    Made Allegro windows always popup centred in Windows.
 
@@ -956,7 +959,7 @@
 
    Vitaliy Chetverikov (email unknown).<br>
    Fixed a bug in the GUI where the return value of MSG_IDLE was ignored.
-   
+
    VolkerOth (<email>VolkerOth@xxxxxxxxxx</a>).<br>
    Integrated the concepts of scrolling and edit_proc objects.
 


--- demo/demo.c.orig	2004-08-23 09:19:36.000000000 +0000
+++ demo/demo.c	2005-02-12 16:47:36.000000000 +0000
@@ -1590,7 +1590,8 @@
       while ((*p2) && ((!uisspace(*p2)) || (*(p2+1) != '(')))
 	 p2++;
 
-      if (strncmp(p2, " (<email>", 9) == 0) {
+      if ( (strncmp(p2, " (<email>", 9) == 0) ||
+	   (strncmp(p2, " (email", 7) == 0) ) {
 	 *p2 = 0;
 
 	 c = malloc(sizeof(CREDIT_NAME));




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