Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/compress Use __printflike and __dead
details: https://anonhg.NetBSD.org/src/rev/8edd00728faa
branches: trunk
changeset: 769079:8edd00728faa
user: joerg <joerg%NetBSD.org@localhost>
date: Tue Aug 30 23:08:05 2011 +0000
description:
Use __printflike and __dead
diffstat:
usr.bin/compress/compress.c | 37 ++++++++++++++++++-------------------
1 files changed, 18 insertions(+), 19 deletions(-)
diffs (110 lines):
diff -r c19905efd810 -r 8edd00728faa usr.bin/compress/compress.c
--- a/usr.bin/compress/compress.c Tue Aug 30 23:06:00 2011 +0000
+++ b/usr.bin/compress/compress.c Tue Aug 30 23:08:05 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: compress.c,v 1.25 2009/04/11 12:24:37 lukem Exp $ */
+/* $NetBSD: compress.c,v 1.26 2011/08/30 23:08:05 joerg Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)compress.c 8.2 (Berkeley) 1/7/94";
#else
-__RCSID("$NetBSD: compress.c,v 1.25 2009/04/11 12:24:37 lukem Exp $");
+__RCSID("$NetBSD: compress.c,v 1.26 2011/08/30 23:08:05 joerg Exp $");
#endif
#endif /* not lint */
@@ -55,19 +55,18 @@
#include <string.h>
#include <unistd.h>
-void compress(const char *, const char *, int);
-void cwarn(const char *, ...) __attribute__((__format__(__printf__,1,2)));
-void cwarnx(const char *, ...) __attribute__((__format__(__printf__,1,2)));
-void decompress(const char *, const char *, int);
-int permission(const char *);
-void setfile(const char *, struct stat *);
-void usage(int);
+static void compress(const char *, const char *, int);
+static void cwarn(const char *, ...) __printflike(1, 2);
+static void cwarnx(const char *, ...) __printflike(1, 2);
+static void decompress(const char *, const char *, int);
+static int permission(const char *);
+static void setfile(const char *, struct stat *);
+__dead static void usage(int);
-int main(int, char *[]);
extern FILE *zopen(const char *fname, const char *mode, int bits);
-int eval, force, verbose;
-int isstdout, isstdin;
+static int eval, force, verbose;
+static int isstdout, isstdin;
int
main(int argc, char **argv)
@@ -198,7 +197,7 @@
exit (eval);
}
-void
+static void
compress(const char *in, const char *out, int bits)
{
size_t nr;
@@ -297,7 +296,7 @@
(void)fclose(ifp);
}
-void
+static void
decompress(const char *in, const char *out, int bits)
{
size_t nr;
@@ -376,7 +375,7 @@
(void)fclose(ifp);
}
-void
+static void
setfile(const char *name, struct stat *fs)
{
static struct timeval tv[2];
@@ -411,7 +410,7 @@
cwarn("chflags: %s", name);
}
-int
+static int
permission(const char *fname)
{
int ch, first;
@@ -425,7 +424,7 @@
return (first == 'y');
}
-void
+static void
usage(int iscompress)
{
if (iscompress)
@@ -437,7 +436,7 @@
exit(1);
}
-void
+static void
cwarnx(const char *fmt, ...)
{
va_list ap;
@@ -448,7 +447,7 @@
eval = 1;
}
-void
+static void
cwarn(const char *fmt, ...)
{
va_list ap;
Home |
Main Index |
Thread Index |
Old Index