[BACK]Return to patch-af CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / games / xpipeman / patches

File: [cvs.NetBSD.org] / pkgsrc / games / xpipeman / patches / patch-af (download)

Revision 1.4, Wed Aug 2 19:58:54 2006 UTC (14 years, 1 month ago) by kristerw
Branch: MAIN
CVS Tags: pkgsrc-2020Q2-base, pkgsrc-2020Q2, pkgsrc-2020Q1-base, pkgsrc-2020Q1, pkgsrc-2019Q4-base, pkgsrc-2019Q4, pkgsrc-2019Q3-base, pkgsrc-2019Q3, pkgsrc-2019Q2-base, pkgsrc-2019Q2, pkgsrc-2019Q1-base, pkgsrc-2019Q1, pkgsrc-2018Q4-base, pkgsrc-2018Q4, pkgsrc-2018Q3-base, pkgsrc-2018Q3, pkgsrc-2018Q2-base, pkgsrc-2018Q2, pkgsrc-2018Q1-base, pkgsrc-2018Q1, pkgsrc-2017Q4-base, pkgsrc-2017Q4, pkgsrc-2017Q3-base, pkgsrc-2017Q3, pkgsrc-2017Q2-base, pkgsrc-2017Q2, pkgsrc-2017Q1-base, pkgsrc-2017Q1, pkgsrc-2016Q4-base, pkgsrc-2016Q4, pkgsrc-2016Q3-base, pkgsrc-2016Q3, pkgsrc-2016Q2-base, pkgsrc-2016Q2, pkgsrc-2016Q1-base, pkgsrc-2016Q1, pkgsrc-2015Q4-base, pkgsrc-2015Q4, pkgsrc-2015Q3-base, pkgsrc-2015Q3, pkgsrc-2015Q2-base, pkgsrc-2015Q2, pkgsrc-2015Q1-base, pkgsrc-2015Q1, pkgsrc-2014Q4-base, pkgsrc-2014Q4, pkgsrc-2014Q3-base, pkgsrc-2014Q3, pkgsrc-2014Q2-base, pkgsrc-2014Q2, pkgsrc-2014Q1-base, pkgsrc-2014Q1, pkgsrc-2013Q4-base, pkgsrc-2013Q4, pkgsrc-2013Q3-base, pkgsrc-2013Q3, pkgsrc-2013Q2-base, pkgsrc-2013Q2, pkgsrc-2013Q1-base, pkgsrc-2013Q1, pkgsrc-2012Q4-base, pkgsrc-2012Q4, pkgsrc-2012Q3-base, pkgsrc-2012Q3, pkgsrc-2012Q2-base, pkgsrc-2012Q2, pkgsrc-2012Q1-base, pkgsrc-2012Q1, pkgsrc-2011Q4-base, pkgsrc-2011Q4, pkgsrc-2011Q3-base, pkgsrc-2011Q3, pkgsrc-2011Q2-base, pkgsrc-2011Q2, pkgsrc-2011Q1-base, pkgsrc-2011Q1, pkgsrc-2010Q4-base, pkgsrc-2010Q4, pkgsrc-2010Q3-base, pkgsrc-2010Q3, pkgsrc-2010Q2-base, pkgsrc-2010Q2, pkgsrc-2010Q1-base, pkgsrc-2010Q1, pkgsrc-2009Q4-base, pkgsrc-2009Q4, pkgsrc-2009Q3-base, pkgsrc-2009Q3, pkgsrc-2009Q2-base, pkgsrc-2009Q2, pkgsrc-2009Q1-base, pkgsrc-2009Q1, pkgsrc-2008Q4-base, pkgsrc-2008Q4, pkgsrc-2008Q3-base, pkgsrc-2008Q3, pkgsrc-2008Q2-base, pkgsrc-2008Q2, pkgsrc-2008Q1-base, pkgsrc-2008Q1, pkgsrc-2007Q4-base, pkgsrc-2007Q4, pkgsrc-2007Q3-base, pkgsrc-2007Q3, pkgsrc-2007Q2-base, pkgsrc-2007Q2, pkgsrc-2007Q1-base, pkgsrc-2007Q1, pkgsrc-2006Q4-base, pkgsrc-2006Q4, pkgsrc-2006Q3-base, pkgsrc-2006Q3, cwrapper, cube-native-xorg-base, cube-native-xorg, HEAD
Changes since 1.3: +30 -6 lines

Fix "static declaration follows non-static" errors that prevented build
with gcc 4.1.

$NetBSD: patch-af,v 1.4 2006/08/02 19:58:54 kristerw Exp $

--- score.c.orig	1991-09-13 22:32:12.000000000 +0200
+++ score.c	2006-08-02 21:55:55.000000000 +0200
@@ -70,7 +70,7 @@
 	write_out_scores();
 
 static FILE *scorefile = 0;
-char *score_filename;
+extern AppData app_data;
 
 /*----------------------------------------------------------------------*/
 
@@ -87,7 +87,7 @@
   }
   if(scorefile) {
 #ifndef SYSV
-    flock(scorefile->_file, LOCK_UN);
+    flock(fileno(scorefile), LOCK_UN);
 #endif
     fclose(scorefile);
     show_scores();
@@ -95,17 +95,17 @@
 }
 
 
-static void
+void
 load_scores()
 {
   int i = 0;
 
-  if( !(scorefile = fopen(score_filename,"r+")) ) {
-    scorefile = fopen(score_filename, "w");
+  if( !(scorefile = fopen(app_data.score_filename,"r+")) ) {
+    scorefile = fopen(app_data.score_filename, "w");
     return;
   }
 #ifndef SYSV
-  flock(scorefile->_file, LOCK_EX);
+  flock(fileno(scorefile), LOCK_EX);
 #endif
   while( fgets(scores[i].score,6,scorefile) 	/* get score */
       && fgets(scores[i].name,26,scorefile) 	/* get name */
@@ -118,7 +118,7 @@
 }
 
 
-static void
+void
 new_high_score(current_score,level)
   int current_score,level;
 {
@@ -151,7 +151,7 @@
 }
 
 
-static void
+void
 write_out_scores()
 {
   int i;
@@ -281,7 +281,7 @@
 
   if(scorefile) {
 #ifndef SYSV
-    flock(scorefile->_file, LOCK_UN);
+    flock(fileno(scorefile), LOCK_UN);
 #endif
     fclose(scorefile);
     show_scores();