rem@remsit.UUCP (Roger Murray) (11/12/88)
Well, it had been a couple of days and like all good programs, dotplan has an update. This update does two things: 1) It corrects an obscure bug in the Insertion Sort routine that causes only some of the text string to be printed under certain conditions. 2) It adds a new style called "Wheel of Fortune". It's a lot like the "ASCIIbet" style, but it looked so much like the game show, I had to put it in. To install this with patch, save this to a file and type "patch dotplan.c file" at the nearest shell prompt. If you don't have patch (I know...I know...Life without patch is like a bowl without cherries, or something to that effect), just remove the "else" in line 340 and you'll be all set. 7c7 < * Last Update: Mon Oct 17 13:55:14 PDT 1988 --- > * Last Update: Wed Nov 9 10:01:51 PST 1988 340,342c340,341 < else < if(string[loop] > max) < max = string[loop]; --- > if(string[loop] > max) > max = string[loop]; 363a363,399 > /* AI */ > > int Wheel(string) > char *string; > { > char *ptr; > int i, j, flag=0, change; > > ptr = (char *) malloc(strlen(string)+1); > > for (i = 0; i < strlen(string); i++) > { > ptr[i] = '_'; > if (string[i] > flag) > flag = string[i]; > } > > ptr[strlen(string)] = '\0'; > > for (j = ' '; j <= flag; j++) > { > change = 0; > for (i = 0; i < strlen(string) ; i++) > { > if (string[i] == j) > { > ptr[i] = j; > change = 1; > } > } > if (change == 1) > printf("%s\r", ptr); > } > putchar('\n'); > free(ptr); > } > 372a409 > * AI tony@gvgpvd.gvg.tek.com 389a427 > { "Wheel of Fortune", Wheel }, /* AI */ -- Roger Murray "Look ma! No ihnp4!" :-) UUCP: ...!{randvax,sdcrdcf,ucbvax}!ucla-cs!cepu!ucla-an!remsit!rem ARPA: cepu!ucla-an!remsit!rem@CS.UCLA.EDU