Path: uunet!tektronix!tekgen!tekred!games From: games@tekred.CNA.TEK.COM Newsgroups: comp.sources.games Subject: v06i048: sun-tetris1 - tetris under SunView (first version), Patch1 Message-ID: <3815@tekred.CNA.TEK.COM> Date: 6 Apr 89 21:09:08 GMT Sender: billr@tekred.CNA.TEK.COM Lines: 73 Approved: billr@saab.CNA.TEK.COM Submitted-by: iwamoto%scoopybear@sun.COM (Rick Iwamoto) Posting-number: Volume 6, Issue 48 Archive-name: sun-tetris1.pch1 [This was posted to the bugs group already. I copied it here for archiving. -br] #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh 'Patches01' <<'END_OF_FILE' XThere is a bug in the update_hs (update highscores) routine which has Xeffect on many people using the same highscore file. The patch for this Xfollows. XAlso, some people's systems have trouble with the lockf() calls in the Xupdate_hs() routine. Those people may see some message about "fcntl" Xor their systems may hang for a bit. Those lockf() calls (there are Xtwo calls) can be removed if you see anything like this. X X-Rick X X*** suntetris_pw.c.OLD Tue Apr 4 16:42:12 1989 X--- suntetris_pw.c Mon Apr 3 16:07:26 1989 X*************** X*** 1,5 **** X #ifndef lint X! static char sccsid[] = "@(#)suntetris_pw.c 1.14 3/23/89"; X #endif X /* X * Copyright 1989, Rick Iwamoto iwamoto@sun.com X--- 1,5 ---- X #ifndef lint X! static char sccsid[] = "@(#)suntetris_pw.c 1.15 4/3/89"; X #endif X /* X * Copyright 1989, Rick Iwamoto iwamoto@sun.com X*************** X*** 478,484 **** X int score, level; X { X FILE *fp; X! int i, j; X struct passwd *passwd = getpwuid (getuid ()); X X if ((fp = fopen (HIGHSCOREFILE, "r")) != NULL) { /* read old scores */ X--- 478,484 ---- X int score, level; X { X FILE *fp; X! int i = 0, j; X struct passwd *passwd = getpwuid (getuid ()); X X if ((fp = fopen (HIGHSCOREFILE, "r")) != NULL) { /* read old scores */ X END_OF_FILE if test 1273 -ne `wc -c <'Patches01'`; then echo shar: \"'Patches01'\" unpacked with wrong size! fi # end of 'Patches01' fi echo shar: End of shell archive. exit 0