guy@sun.uucp (Guy Harris) (07/31/86)
Index: games/mille/mille.c games/mille/move.c 4.3BSD Description: "NULL" is defined as 0, which is an integral type. The second argument to "setbuf" should be of type "char *". Thus, "NULL" by itself is not the correct argument to "setbuf". Repeat-By: Try "lint"ing "mille". If it passes, either your "lint" is wrong (some S5 versions allow that sort of bullshit, but they shouldn't) or your definition of NULL is wrong (it should NOT be defined as "(char *)0", since that causes problems if you want to pass a null pointer of another type). Fix: *** /arch/4.3/usr/src/games/mille/mille.c Sat Jan 11 11:47:31 1986 --- mille/mille.c Tue Jul 29 15:27:32 1986 *************** *** 21,27 **** if (strcmp(av[0], "a.out") == 0) { outf = fopen("q", "w"); ! setbuf(outf, NULL); Debug = TRUE; } restore = FALSE; --- 21,27 ---- if (strcmp(av[0], "a.out") == 0) { outf = fopen("q", "w"); ! setbuf(outf, (char *)NULL); Debug = TRUE; } restore = FALSE; *** /arch/4.3/usr/src/games/mille/move.c Wed Jan 22 16:32:18 1986 --- mille/move.c Tue Jul 29 15:28:31 1986 *************** *** 406,412 **** leaveok(Board, TRUE); if ((outf = fopen(buf, "w")) == NULL) perror(buf); ! setbuf(outf, NULL); } Debug = !Debug; break; --- 406,412 ---- leaveok(Board, TRUE); if ((outf = fopen(buf, "w")) == NULL) perror(buf); ! setbuf(outf, (char *)NULL); } Debug = !Debug; break; -- Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com (or guy@sun.arpa)