Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/games Use __dead and __printflike instead of __attribute__.



details:   https://anonhg.NetBSD.org/src/rev/e06df27b5e24
branches:  trunk
changeset: 768749:e06df27b5e24
user:      dholland <dholland%NetBSD.org@localhost>
date:      Fri Aug 26 06:18:16 2011 +0000

description:
Use __dead and __printflike instead of __attribute__.

diffstat:

 games/backgammon/common_source/back.h |   6 +++---
 games/backgammon/common_source/save.c |   6 +++---
 games/backgammon/teachgammon/tutor.h  |   6 +++---
 games/battlestar/extern.h             |   8 ++++----
 games/boggle/boggle/bog.c             |   6 +++---
 games/cribbage/cribbage.h             |  10 ++++------
 games/hack/extern.h                   |  23 +++++++++--------------
 games/hangman/hangman.h               |   4 ++--
 games/larn/extern.h                   |   4 ++--
 games/mille/mille.h                   |   6 +++---
 games/rogue/inventory.c               |   7 +++----
 games/rogue/rogue.h                   |  17 ++++++++---------
 games/rogue/score.c                   |   6 +++---
 games/sail/extern.h                   |  19 ++++++++-----------
 games/sail/pl_7.c                     |   8 ++++----
 15 files changed, 62 insertions(+), 74 deletions(-)

diffs (truncated from 510 to 300 lines):

diff -r b591b60e0fdc -r e06df27b5e24 games/backgammon/common_source/back.h
--- a/games/backgammon/common_source/back.h     Fri Aug 26 01:48:39 2011 +0000
+++ b/games/backgammon/common_source/back.h     Fri Aug 26 06:18:16 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: back.h,v 1.17 2010/03/22 05:10:19 mrg Exp $    */
+/*     $NetBSD: back.h,v 1.18 2011/08/26 06:18:16 dholland Exp $       */
 
 /*
  * Copyright (c) 1980, 1993
@@ -139,14 +139,14 @@
 void   cline(void);
 int    count(void);
 void   curmove(int, int);
-void   errexit(const char *) __attribute__((__noreturn__));
+void   errexit(const char *) __dead;
 void   fancyc(int);
 void   fboard(void);
 void   fixtty(struct termios *);
 void   getarg(char ***);
 int    getcaps(const char *);
 void   getmove(void);
-void   getout(int) __attribute__((__noreturn__));
+void   getout(int) __dead;
 void   gwrite(void);
 void   init(void);
 int    main(int, char *[]);
diff -r b591b60e0fdc -r e06df27b5e24 games/backgammon/common_source/save.c
--- a/games/backgammon/common_source/save.c     Fri Aug 26 01:48:39 2011 +0000
+++ b/games/backgammon/common_source/save.c     Fri Aug 26 06:18:16 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: save.c,v 1.13 2009/08/12 05:17:57 dholland Exp $       */
+/*     $NetBSD: save.c,v 1.14 2011/08/26 06:18:16 dholland Exp $       */
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)save.c     8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: save.c,v 1.13 2009/08/12 05:17:57 dholland Exp $");
+__RCSID("$NetBSD: save.c,v 1.14 2011/08/26 06:18:16 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -53,7 +53,7 @@
 static const char rec[] = "\" to recover your game.\n\n";
 static const char cantrec[] = "Can't recover file:  ";
 
-static void norec(const char *) __attribute__((__noreturn__));
+static void norec(const char *) __dead;
 
 void
 save(int n)
diff -r b591b60e0fdc -r e06df27b5e24 games/backgammon/teachgammon/tutor.h
--- a/games/backgammon/teachgammon/tutor.h      Fri Aug 26 01:48:39 2011 +0000
+++ b/games/backgammon/teachgammon/tutor.h      Fri Aug 26 06:18:16 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tutor.h,v 1.9 2009/08/12 05:17:57 dholland Exp $       */
+/*     $NetBSD: tutor.h,v 1.10 2011/08/26 06:18:16 dholland Exp $      */
 
 /*
  * Copyright (c) 1980, 1993
@@ -62,5 +62,5 @@
 extern const struct situatn    test[];
 
 
-void   leave(void) __attribute__((__noreturn__));
-void   tutor(void) __attribute__((__noreturn__));
+void   leave(void) __dead;
+void   tutor(void) __dead;
diff -r b591b60e0fdc -r e06df27b5e24 games/battlestar/extern.h
--- a/games/battlestar/extern.h Fri Aug 26 01:48:39 2011 +0000
+++ b/games/battlestar/extern.h Fri Aug 26 06:18:16 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: extern.h,v 1.32 2009/08/12 05:20:38 dholland Exp $ */
+/*     $NetBSD: extern.h,v 1.33 2011/08/26 06:18:17 dholland Exp $ */
 
 /*
  * Copyright (c) 1983, 1993
@@ -333,8 +333,8 @@
 void chime(void);
 void crash(void);
 int cypher(void);
-void die(void) __attribute__((__noreturn__));
-void diesig(int) __attribute__((__noreturn__));
+void die(void) __dead;
+void diesig(int) __dead;
 void dig(void);
 void dooropen(void);
 int draw(void);
@@ -353,7 +353,7 @@
 int land(void);
 int launch(void);
 void light(void);
-void live(void) __attribute__((__noreturn__));
+void live(void) __dead;
 void love(void);
 int moveplayer(int, int);
 void murder(void);
diff -r b591b60e0fdc -r e06df27b5e24 games/boggle/boggle/bog.c
--- a/games/boggle/boggle/bog.c Fri Aug 26 01:48:39 2011 +0000
+++ b/games/boggle/boggle/bog.c Fri Aug 26 06:18:16 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bog.c,v 1.26 2010/12/05 04:34:22 pgoyette Exp $        */
+/*     $NetBSD: bog.c,v 1.27 2011/08/26 06:18:17 dholland Exp $        */
 
 /*-
  * Copyright (c) 1993
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = "@(#)bog.c      8.2 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: bog.c,v 1.26 2010/12/05 04:34:22 pgoyette Exp $");
+__RCSID("$NetBSD: bog.c,v 1.27 2011/08/26 06:18:17 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -64,7 +64,7 @@
 static void checkdict(void);
 static void newgame(const char *);
 static int compar(const void *, const void *);
-static void usage(void) __attribute__((__noreturn__));
+static void usage(void) __dead;
 
 struct dictindex dictindex[26];
 
diff -r b591b60e0fdc -r e06df27b5e24 games/cribbage/cribbage.h
--- a/games/cribbage/cribbage.h Fri Aug 26 01:48:39 2011 +0000
+++ b/games/cribbage/cribbage.h Fri Aug 26 06:18:16 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cribbage.h,v 1.15 2009/08/12 05:48:04 dholland Exp $   */
+/*     $NetBSD: cribbage.h,v 1.16 2011/08/26 06:18:17 dholland Exp $   */
 
 /*
  * Copyright (c) 1980, 1993
@@ -56,8 +56,7 @@
 
 extern  char           explan[];               /* string for explanation */
 
-void    addmsg(const char *, ...)
-    __attribute__((__format__(__printf__, 1, 2)));
+void    addmsg(const char *, ...) __printflike(1, 2);
 int     adjust(const CARD [], CARD);
 int     anymove(const CARD [], int, int);
 void    bye(void);
@@ -75,15 +74,14 @@
 int     is_one(CARD, const CARD [], int);
 void    makedeck(CARD []);
 void    makeknown(const CARD [], int);
-void    msg(const char *, ...)
-    __attribute__((__format__(__printf__, 1, 2)));
+void    msg(const char *, ...) __printflike(1, 2);
 int     msgcard(CARD, BOOLEAN);
 int     number(int, int, const char *);
 int     pegscore(CARD, const CARD [], int, int);
 int     plyrhand(const CARD [], const char *);
 void    prcard(WINDOW *, int, int, CARD, BOOLEAN);
 void    prhand(const CARD [], int, WINDOW *, BOOLEAN);
-void    receive_intr(int) __attribute__((__noreturn__));
+void    receive_intr(int) __dead;
 int     scorehand(const CARD [], CARD, int, BOOLEAN, BOOLEAN);
 void    shuffle(CARD []);
 void    sorthand(CARD [], int);
diff -r b591b60e0fdc -r e06df27b5e24 games/hack/extern.h
--- a/games/hack/extern.h       Fri Aug 26 01:48:39 2011 +0000
+++ b/games/hack/extern.h       Fri Aug 26 06:18:16 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: extern.h,v 1.16 2011/08/06 20:18:26 dholland Exp $     */
+/*     $NetBSD: extern.h,v 1.17 2011/08/26 06:18:17 dholland Exp $     */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -137,7 +137,7 @@
 void done_in_by(struct monst *);
 void done(const char *);
 void clearlocks(void);
-void hang_up(int) __attribute__((__noreturn__));
+void hang_up(int) __dead;
 char *eos(char *);
 void charcat(char *, int);
 void prscore(int, char **);
@@ -208,8 +208,7 @@
 /* hack.main.c */
 void glo(int);
 void askname(void);
-void impossible(const char *, ...)
-    __attribute__((__format__(__printf__, 1, 2)));
+void impossible(const char *, ...) __printflike(1, 2);
 void stop_occupation(void);
 
 /* hack.makemon.c */
@@ -312,13 +311,12 @@
 
 /* hack.pri.c */
 void swallowed(void);
-void panic(const char *, ...)
-    __attribute__((__format__(__printf__, 1, 2)));
+void panic(const char *, ...) __printflike(1, 2);
 void atl(int, int, int);
 void on_scr(int, int);
 void tmp_at(schar, schar);
 void Tmp_at(schar, schar);
-void setclipped(void) __attribute__((__noreturn__));
+void setclipped(void) __dead;
 void at(xchar, xchar, int);
 void prme(void);
 int doredraw(void);
@@ -423,10 +421,8 @@
 void more(void);
 void cmore(const char *);
 void clrlin(void);
-void pline(const char *, ...)
-    __attribute__((__format__(__printf__, 1, 2)));
-void vpline(const char *, va_list)
-    __attribute__((__format__(__printf__, 1, 0)));
+void pline(const char *, ...) __printflike(1, 2);
+void vpline(const char *, va_list) __printflike(1, 0);
 void putsym(int);
 void putstr(const char *);
 
@@ -453,15 +449,14 @@
 void gettty(void);
 void settty(const char *);
 void setftty(void);
-void error(const char *, ...)
-    __attribute__((__format__(__printf__, 1, 2),__noreturn__));
+void error(const char *, ...) __printflike(1, 2);
 void getlin(char *);
 void getret(void);
 void cgetret(const char *);
 void xwaitforspace(const char *);
 char *parse(void);
 char readchar(void);
-void end_of_input(void) __attribute__((__noreturn__));
+void end_of_input(void) __dead;
 
 /* hack.u_init.c */
 void u_init(void);
diff -r b591b60e0fdc -r e06df27b5e24 games/hangman/hangman.h
--- a/games/hangman/hangman.h   Fri Aug 26 01:48:39 2011 +0000
+++ b/games/hangman/hangman.h   Fri Aug 26 06:18:16 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hangman.h,v 1.13 2004/01/27 20:30:29 jsm Exp $ */
+/*     $NetBSD: hangman.h,v 1.14 2011/08/26 06:18:17 dholland Exp $    */
 
 /*
  * Copyright (c) 1983, 1993
@@ -81,7 +81,7 @@
 
 extern off_t Dict_size;
 
-void    die(int) __attribute__((__noreturn__));
+void    die(int) __dead;
 void    endgame(void);
 int    main(int, char *[]);
 void   getguess(void);
diff -r b591b60e0fdc -r e06df27b5e24 games/larn/extern.h
--- a/games/larn/extern.h       Fri Aug 26 01:48:39 2011 +0000
+++ b/games/larn/extern.h       Fri Aug 26 06:18:16 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: extern.h,v 1.14 2009/10/21 01:07:45 snj Exp $  */
+/*     $NetBSD: extern.h,v 1.15 2011/08/26 06:18:17 dholland Exp $     */
 
 /*
  * Copyright (c) 1997 Christos Zoulas.  All rights reserved.
@@ -116,7 +116,7 @@
 void scbr(void);
 void sncbr(void);
 void newgame(void);
-void lprintf(const char *, ...) __attribute__((__format__(__printf__, 1, 2)));
+void lprintf(const char *, ...) __printflike(1, 2);
 void lprint(long);
 void lwrite(char *, int);
 long lgetc(void);
diff -r b591b60e0fdc -r e06df27b5e24 games/mille/mille.h
--- a/games/mille/mille.h       Fri Aug 26 01:48:39 2011 +0000
+++ b/games/mille/mille.h       Fri Aug 26 06:18:16 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mille.h,v 1.18 2011/08/16 11:14:04 christos Exp $      */
+/*     $NetBSD: mille.h,v 1.19 2011/08/26 06:18:17 dholland Exp $      */
 
 /*
  * Copyright (c) 1982, 1993
@@ -237,9 +237,9 @@
 int    canplay(const PLAY *, const PLAY *, CARD);
 int    check_ext(bool);
 void   check_more(void);
-void   die(int) __attribute__((__noreturn__));
+void   die(int) __dead;
 void   domove(void);
-bool   error(const char *, ...);
+bool   error(const char *, ...) __printflike(1,2);
 void   extrapolate(PLAY *);
 void   finalscore(PLAY *);
 CARD   getcard(void);
diff -r b591b60e0fdc -r e06df27b5e24 games/rogue/inventory.c
--- a/games/rogue/inventory.c   Fri Aug 26 01:48:39 2011 +0000
+++ b/games/rogue/inventory.c   Fri Aug 26 06:18:16 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: inventory.c,v 1.14 2009/08/12 08:44:45 dholland Exp $  */



Home | Main Index | Thread Index | Old Index