DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: B T

⟦a73b44867⟧ TextFile

    Length: 861 (0x35d)
    Types: TextFile
    Names: »Bugfix01«

Derivation

└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
    └─⟦this⟧ »EUUGD18/General/Article/Bugfix01« 

TextFile

>Well, I compiled and run it, but at the end of producing its amusing
>output, it constantly gives "Segmentation fault - core dumped". This
>is on a VAX running 4.3BSD.

Same here.  It's just a sloppy pointer thing...  The DIFFs follow.
Also, the roll(n) function was returning large integers, outside the
range.  Please note that the low-order bits of most rand() functions
are junk!!!!  If you have random(), use it.

	Douglas

141c141
< 		srand ((unsigned) atoi (optarg));
---
> 		srand (atoi (optarg));
377c377
<     return (int) (n * (double) rand() / 32768.);
---
>     return ((((rand()>>8)&0x7fff)*n)/0x7fff);
403c403
< 	if (tp == NULL)
---
> 	if (p->scnod == (struct node *) NULL || tp == (char *) NULL)
ARPA:  trainor@locus.ucla.edu
UUCP:  ..!{sch-loki,silogic,randvax,ihnp4,sdcrdcf,trwspp,ucbvax}!ucla-cs!trainor
SNAKE: trainor@eric.sidewinder.snake