Use __dead and __printflike instead of __attribute__.

This commit is contained in:
dholland 2011-08-26 06:18:16 +00:00
parent ed20f4b6ec
commit ae56ae8f3f
15 changed files with 62 additions and 74 deletions

View File

@ -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 clend(void);
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 *[]);

View File

@ -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 type[] = "'.\nType \"backgammon ";
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)

View File

@ -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 char *const stragy[];
extern const struct situatn test[];
void leave(void) __attribute__((__noreturn__));
void tutor(void) __attribute__((__noreturn__));
void leave(void) __dead;
void tutor(void) __dead;

View File

@ -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 @@ int card(const char *, int);
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 @@ void kiss(void);
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);

View File

@ -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 @@ __COPYRIGHT("@(#) Copyright (c) 1993\
#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 int validword(const char *);
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];

View File

@ -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 BOOLEAN quiet; /* if suppress random mess */
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 @@ void instructions(void);
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);

View File

@ -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 done1(int);
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 @@ void mklev(void);
/* 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 @@ int dodip(void);
/* 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 addtopl(const char *);
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 drown(void);
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);

View File

@ -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 FILE *Dict;
extern off_t Dict_size;
void die(int) __attribute__((__noreturn__));
void die(int) __dead;
void endgame(void);
int main(int, char *[]);
void getguess(void);

View File

@ -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 @@ int ttgetch(void);
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);

View File

@ -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 @@ void calcmove(void);
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);

View File

@ -1,4 +1,4 @@
/* $NetBSD: inventory.c,v 1.14 2009/08/12 08:44:45 dholland Exp $ */
/* $NetBSD: inventory.c,v 1.15 2011/08/26 06:18:17 dholland Exp $ */
/*
* Copyright (c) 1988, 1993
@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)inventory.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: inventory.c,v 1.14 2009/08/12 08:44:45 dholland Exp $");
__RCSID("$NetBSD: inventory.c,v 1.15 2011/08/26 06:18:17 dholland Exp $");
#endif
#endif /* not lint */
@ -470,8 +470,7 @@ struct sbuf {
static void sbuf_init(struct sbuf *s, char *buf, size_t maxlen);
static void sbuf_addstr(struct sbuf *s, const char *str);
static void sbuf_addf(struct sbuf *s, const char *fmt, ...)
__attribute__((__format__(__printf__, 2, 3)));
static void sbuf_addf(struct sbuf *s, const char *fmt, ...) __printflike(2,3);
static void desc_count(struct sbuf *s, int n);
static void desc_called(struct sbuf *s, const object *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: rogue.h,v 1.21 2011/05/23 23:01:17 joerg Exp $ */
/* $NetBSD: rogue.h,v 1.22 2011/08/26 06:18:17 dholland Exp $ */
/*
* Copyright (c) 1988, 1993
@ -466,7 +466,7 @@ void check_gold_seeker(object *);
boolean check_imitator(object *);
void check_message(void);
int check_up(void);
void clean_up(const char *) __attribute__((__noreturn__));
void clean_up(const char *) __dead;
void clear_level(void);
void cnfs(void);
int coin_toss(void);
@ -483,7 +483,7 @@ void drop(void);
int drop_check(void);
void eat(void);
void edit_opts(void);
void error_save(int) __attribute__((__noreturn__));
void error_save(int) __dead;
void fight(boolean);
boolean flame_broil(object *);
void free_object(object *);
@ -526,7 +526,7 @@ boolean is_direction(short, short *);
boolean is_passable(int, int);
boolean is_vowel(short);
void kick_into_pack(void);
void killed_by(const object *, short) __attribute__((__noreturn__));
void killed_by(const object *, short) __dead;
long lget_number(const char *);
void light_passage(int, int);
void light_up_room(int);
@ -534,7 +534,7 @@ boolean m_confuse(object *);
void make_level(void);
void make_scroll_titles(void);
boolean md_df(const char *);
void md_exit(int) __attribute__((__noreturn__));
void md_exit(int) __dead;
void md_gct(struct rogue_time *);
int md_get_file_id(const char *);
void md_gfmt(const char *, struct rogue_time *);
@ -547,8 +547,7 @@ void md_shell(const char *);
void md_sleep(int);
void md_slurp(void);
/*void message(const char *, boolean);*/
void messagef(boolean, const char *, ...)
__attribute__((__format__(__printf__, 2, 3)));
void messagef(boolean, const char *, ...) __printflike(2, 3);
void mix_colors(void);
int mon_can_go(const object *, short, short);
int mon_damage(object *, short);
@ -577,7 +576,7 @@ void put_mons(void);
void put_objects(void);
void put_on_ring(void);
void put_player(short);
void put_scores(const object *, short) __attribute__((__noreturn__));
void put_scores(const object *, short) __dead;
void put_stairs(void);
void quaff(void);
void quit(boolean);
@ -631,7 +630,7 @@ void wake_up(object *);
void wanderer(void);
void wear(void);
void wield(void);
void win(void) __attribute__((__noreturn__));
void win(void) __dead;
void wizardize(void);
long xxx(boolean);
void xxxx(char *, short);

View File

@ -1,4 +1,4 @@
/* $NetBSD: score.c,v 1.15 2009/08/12 08:44:45 dholland Exp $ */
/* $NetBSD: score.c,v 1.16 2011/08/26 06:18:17 dholland Exp $ */
/*
* Copyright (c) 1988, 1993
@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)score.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: score.c,v 1.15 2009/08/12 08:44:45 dholland Exp $");
__RCSID("$NetBSD: score.c,v 1.16 2011/08/26 06:18:17 dholland Exp $");
#endif
#endif /* not lint */
@ -61,7 +61,7 @@ static void center(short, const char *);
static int get_value(const object *);
static void id_all(void);
static void sell_pack(void);
static void sf_error(void) __attribute__((__noreturn__));
static void sf_error(void) __dead;
void
killed_by(const object *monster, short other)

View File

@ -1,4 +1,4 @@
/* $NetBSD: extern.h,v 1.36 2010/08/06 09:14:40 dholland Exp $ */
/* $NetBSD: extern.h,v 1.37 2011/08/26 06:18:18 dholland Exp $ */
/*
* Copyright (c) 1983, 1993
@ -313,13 +313,13 @@ int boarding(struct ship *, int);
void unboard(struct ship *, struct ship *, int);
/* pl_1.c */
void leave(int) __attribute__((__noreturn__));
void choke(int) __attribute__((__noreturn__));
void leave(int) __dead;
void choke(int) __dead;
void child(int);
/* pl_2.c */
void newturn(int);
void play(void) __attribute__((__noreturn__));
void play(void) __dead;
/* pl_3.c */
void acceptcombat(void);
@ -344,10 +344,8 @@ void loadplayer(void);
/* pl_7.c */
void initscreen(void);
void cleanupscreen(void);
void Signal(const char *, struct ship *, ...)
__attribute__((__format__(__printf__,1,3)));
void Msg(const char *, ...)
__attribute__((__format__(__printf__,1,2)));
void Signal(const char *, struct ship *, ...) __printflike(1,3);
void Msg(const char *, ...) __printflike(1,2);
int sgetch(const char *, struct ship *, int);
void sgetstr(const char *, char *, int);
void centerview(void);
@ -365,9 +363,8 @@ void pl_main(void);
/* sync.c */
void fmtship(char *, size_t, const char *, struct ship *);
void makesignal(struct ship *, const char *, struct ship *, ...)
__attribute__((__format__(__printf__,2,4)));
void makemsg(struct ship *, const char *, ...)
__attribute__((__format__(__printf__,2,3)));
__printflike(2,4);
void makemsg(struct ship *, const char *, ...) __printflike(2, 3);
int sync_exists(int);
int sync_open(void);
void sync_close(int);

View File

@ -1,4 +1,4 @@
/* $NetBSD: pl_7.c,v 1.41 2011/08/25 16:18:28 christos Exp $ */
/* $NetBSD: pl_7.c,v 1.42 2011/08/26 06:18:18 dholland Exp $ */
/*
* Copyright (c) 1983, 1993
@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)pl_7.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: pl_7.c,v 1.41 2011/08/25 16:18:28 christos Exp $");
__RCSID("$NetBSD: pl_7.c,v 1.42 2011/08/26 06:18:18 dholland Exp $");
#endif
#endif /* not lint */
@ -238,7 +238,7 @@ mvaddselstr(int y, int x0, int item, int curitem,
/*
* Likewise but a printf.
*/
static void __attribute__((__format__(__printf__, 6, 7)))
static void __printflike(6, 7)
mvselprintw(int y, int x0, int item, int curitem,
size_t width, const char *fmt, ...)
{
@ -296,7 +296,7 @@ down(int *posp, int *scrollp, int max, int visible)
/*
* Complain briefly.
*/
static void __attribute__((__format__(__printf__, 3, 4)))
static void __printflike(3, 4)
oops(int y, int x, const char *fmt, ...)
{
int oy, ox;