Path: utzoo!utgpu!attcan!uunet!mcvax!unido!sbsvax!greim From: greim@sbsvax.UUCP (Michael Greim) Newsgroups: comp.sources.bugs Subject: Re: Attempting to compile ADL; a quick question Summary: I just looked in the sources. Maybe I found the bugs. Message-ID: <590@sbsvax.UUCP> Date: 9 Aug 88 11:00:33 GMT References: <423@coplex.UUCP> <579@sbsvax.UUCP> <5400002@hpfcdc.HP.COM> Organization: Universitaet des Saarlandes, Saarbruecken, West Germany Lines: 111 In article <5400002@hpfcdc.HP.COM>, cunniff@hpfcdc.HP.COM (Ross Cunniff) writes: > In article <579@sbsvax.UUCP> greim@sbsvax.UUCP (Michael Greim) writes: > >I played around a bit with adl. When I wrote my first dungeon I tried > >to get some demon running. I got a lot of core dumps until I > >figured out that I had specified too much brackets "(" and ")". > > What flags (in adltypes.h) did you compile with? If you compiled > without the error checking code, errors WILL cause core dumps. The > error checking code will catch most problems, but will cause the > adventures to run more slowly. Or course I did not compile with error checking code :-) > > >The code for "adlrun -h" is buggy. I had some problems to get it > >running, and it still does not look very nice. Maybe if I have the > >time someday I will try to rewrite it. > What bugs have you found in it? What kind of terminal are you using? > It's been tested on HP terminals and on vt100's. I am using a mostly vt100 compatible (sounds like "half pregnant" :-}) terminal with lots of more features. Thus I am using TERMCAP. I just checked, it seems I have set up the variables correctly. But of course I don't know if the program uses them correctly :-) I had to change some things. I don't know what the results were, but looking at the code they could be the reason for the problems of the original poster. The bugs were in adlscrn.c. Apply the following context diff: *** adlscrn.c.old Tue Aug 9 12:43:24 1988 --- adlscrn.c Tue Jun 7 17:46:22 1988 *************** *** 77,83 **** --- 76,85 ---- /* Initialize termcap */ if( (value = getenv( "TERM" )) == (char *)0 ) error( 29 ); /* Bad termcap */ + /* mg,7.jun.88, was if( tgetent( bp, value ) <= 0 ) + */ + if( tgetent( BUFF, value ) <= 0 ) error( 29 ); /* Bad termcap */ /* Get the number of lines on the screen */ *************** *** 89,96 **** (void)mygetstr( "se", STANDEND, 0 ); if( mygetstr( "cd", CLEAR, 0 ) == 0 ) (void)mygetstr( "cl", CLEAR, 1 ); ! (void)mygetstr( "ml", LOCK ); ! (void)mygetstr( "mu", NOLOCK ); #endif #if AMIGA --- 91,99 ---- (void)mygetstr( "se", STANDEND, 0 ); if( mygetstr( "cd", CLEAR, 0 ) == 0 ) (void)mygetstr( "cl", CLEAR, 1 ); ! /* mg,7.jun.88 : the third parameter from the next two calls was missing */ ! (void)mygetstr( "ml", LOCK, 0 ); ! (void)mygetstr( "mu", NOLOCK, 0 ); #endif #if AMIGA *************** *** 168,174 **** --- 171,180 ---- } } else { + /* mg,7.jun.88, was : *temp = '\0'; + */ + *where = '\0'; retval = 1; } return retval; My biggest complaint with adlrun is that is does not use the termcap capability CS to split the screen in two pieces. The top line is used to hold room name and score but it is scrolled off the screen every time when the rest of the screen scrolls. I had too much to do to fix this. Maybe you could look into it. > Likewise. If you've written a dungeon with ADL, I'd be *GREATLY* interested > in seeing a copy of it. Post it to comp.sources.games, or e-mail me > a copy. Hm. I have written a small test dungeon with 5 rooms, 2 problems and 1 dragon to try some of the features of adl. I am planning with some friends to write a big dungeon. Maybe on the AMIGA, maybe on UNIX, well we will post if anything comes out of it. Now something different: ADL is really quite nice, I enjoyed playing aard (What the heck is an "aardvark" anyway ??), and I am really amazed that adlcomp and adlrun are so *small*. So here's a big hand for the authors. ------------------------------------- (Even if the programs have bugs. What big program doesn't ??:-) -mg -- +------------------------------------------------------------------------------+ | UUCP: ...!uunet!unido!sbsvax!greim | Michael T. Greim | | or greim@sbsvax.UUCP | Universitaet des Saarlandes | | CSNET: greim%sbsvax.uucp@Germany.CSnet| FB 10 - Informatik (Dept. of CS) | | ARPA: greim%sbsvax.uucp@uunet.UU.NET | Bau 36, Im Stadtwald 15 | | Phone: +49 681 302 2434 | D-6600 Saarbruecken 11, West Germany | +------------------------------------------------------------------------------+ | # include| +------------------------------------------------------------------------------+