Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libz do not declare OF() in header. use __P().
details: https://anonhg.NetBSD.org/src/rev/21cc8d2dfa41
branches: trunk
changeset: 501859:21cc8d2dfa41
user: itojun <itojun%NetBSD.org@localhost>
date: Mon Jan 08 14:48:19 2001 +0000
description:
do not declare OF() in header. use __P().
maybe we could have ansified it, but did not for possible feedback to the
original zlib distribution
diffstat:
lib/libz/crc32.c | 4 +-
lib/libz/deflate.c | 28 +++++++-------
lib/libz/deflate.h | 12 +++---
lib/libz/example.c | 26 ++++++------
lib/libz/gzio.c | 16 ++++----
lib/libz/infblock.h | 14 +++---
lib/libz/infcodes.h | 8 ++--
lib/libz/inffast.h | 4 +-
lib/libz/inftrees.c | 4 +-
lib/libz/inftrees.h | 8 ++--
lib/libz/infutil.h | 4 +-
lib/libz/minigzip.c | 20 +++++-----
lib/libz/trees.c | 38 +++++++++---------
lib/libz/zconf.h | 4 +-
lib/libz/zlib.h | 104 ++++++++++++++++++++++++++--------------------------
lib/libz/zutil.c | 8 ++--
lib/libz/zutil.h | 18 ++++----
17 files changed, 161 insertions(+), 159 deletions(-)
diffs (truncated from 962 to 300 lines):
diff -r a61690053862 -r 21cc8d2dfa41 lib/libz/crc32.c
--- a/lib/libz/crc32.c Mon Jan 08 14:37:48 2001 +0000
+++ b/lib/libz/crc32.c Mon Jan 08 14:48:19 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: crc32.c,v 1.6 1999/07/03 12:30:53 simonb Exp $ */
+/* $NetBSD: crc32.c,v 1.7 2001/01/08 14:48:19 itojun Exp $ */
/* crc32.c -- compute the CRC-32 of a data stream
* Copyright (C) 1995-1998 Mark Adler
@@ -15,7 +15,7 @@
local int crc_table_empty = 1;
local uLongf crc_table[256];
-local void make_crc_table OF((void));
+local void make_crc_table __P((void));
/*
Generate a table for a byte-wise 32-bit CRC calculation on the polynomial:
diff -r a61690053862 -r 21cc8d2dfa41 lib/libz/deflate.c
--- a/lib/libz/deflate.c Mon Jan 08 14:37:48 2001 +0000
+++ b/lib/libz/deflate.c Mon Jan 08 14:48:19 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: deflate.c,v 1.6 1999/07/03 12:30:53 simonb Exp $ */
+/* $NetBSD: deflate.c,v 1.7 2001/01/08 14:48:19 itojun Exp $ */
/* deflate.c -- compress data using the deflation algorithm
* Copyright (C) 1995-1998 Jean-loup Gailly.
@@ -72,26 +72,26 @@
finish_done /* finish done, accept no more input or output */
} block_state;
-typedef block_state (*compress_func) OF((deflate_state *s, int flush));
+typedef block_state (*compress_func) __P((deflate_state *s, int flush));
/* Compression function. Returns the block state after the call. */
-local void fill_window OF((deflate_state *s));
-local block_state deflate_stored OF((deflate_state *s, int flush));
-local block_state deflate_fast OF((deflate_state *s, int flush));
-local block_state deflate_slow OF((deflate_state *s, int flush));
-local void lm_init OF((deflate_state *s));
-local void putShortMSB OF((deflate_state *s, uInt b));
-local void flush_pending OF((z_streamp strm));
-local int read_buf OF((z_streamp strm, Bytef *buf, unsigned size));
+local void fill_window __P((deflate_state *s));
+local block_state deflate_stored __P((deflate_state *s, int flush));
+local block_state deflate_fast __P((deflate_state *s, int flush));
+local block_state deflate_slow __P((deflate_state *s, int flush));
+local void lm_init __P((deflate_state *s));
+local void putShortMSB __P((deflate_state *s, uInt b));
+local void flush_pending __P((z_streamp strm));
+local int read_buf __P((z_streamp strm, Bytef *buf, unsigned size));
#ifdef ASMV
- void match_init OF((void)); /* asm code initialization */
- uInt longest_match OF((deflate_state *s, IPos cur_match));
+ void match_init __P((void)); /* asm code initialization */
+ uInt longest_match __P((deflate_state *s, IPos cur_match));
#else
-local uInt longest_match OF((deflate_state *s, IPos cur_match));
+local uInt longest_match __P((deflate_state *s, IPos cur_match));
#endif
#ifdef DEBUG
-local void check_match OF((deflate_state *s, IPos start, IPos match,
+local void check_match __P((deflate_state *s, IPos start, IPos match,
int length));
#endif
diff -r a61690053862 -r 21cc8d2dfa41 lib/libz/deflate.h
--- a/lib/libz/deflate.h Mon Jan 08 14:37:48 2001 +0000
+++ b/lib/libz/deflate.h Mon Jan 08 14:48:19 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: deflate.h,v 1.6 1999/07/03 12:30:53 simonb Exp $ */
+/* $NetBSD: deflate.h,v 1.7 2001/01/08 14:48:19 itojun Exp $ */
/* deflate.h -- internal compression state
* Copyright (C) 1995-1998 Jean-loup Gailly
@@ -268,12 +268,12 @@
*/
/* in trees.c */
-void _tr_init OF((deflate_state *s));
-int _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc));
-void _tr_flush_block OF((deflate_state *s, charf *buf, ulg stored_len,
+void _tr_init __P((deflate_state *s));
+int _tr_tally __P((deflate_state *s, unsigned dist, unsigned lc));
+void _tr_flush_block __P((deflate_state *s, charf *buf, ulg stored_len,
int eof));
-void _tr_align OF((deflate_state *s));
-void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len,
+void _tr_align __P((deflate_state *s));
+void _tr_stored_block __P((deflate_state *s, charf *buf, ulg stored_len,
int eof));
#define d_code(dist) \
diff -r a61690053862 -r 21cc8d2dfa41 lib/libz/example.c
--- a/lib/libz/example.c Mon Jan 08 14:37:48 2001 +0000
+++ b/lib/libz/example.c Mon Jan 08 14:48:19 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: example.c,v 1.7 1999/07/03 12:30:53 simonb Exp $ */
+/* $NetBSD: example.c,v 1.8 2001/01/08 14:48:20 itojun Exp $ */
/* example.c -- usage example of the zlib compression library
* Copyright (C) 1995-1998 Jean-loup Gailly.
@@ -14,7 +14,7 @@
# include <string.h>
# include <stdlib.h>
#else
- extern void exit OF((int));
+ extern void exit __P((int));
#endif
#if defined(VMS) || defined(RISCOS)
@@ -38,24 +38,24 @@
const char dictionary[] = "hello";
uLong dictId; /* Adler32 value of the dictionary */
-void test_compress OF((Byte *compr, uLong comprLen,
+void test_compress __P((Byte *compr, uLong comprLen,
Byte *uncompr, uLong uncomprLen));
-void test_gzio OF((const char *out, const char *in,
+void test_gzio __P((const char *out, const char *in,
Byte *uncompr, int uncomprLen));
-void test_deflate OF((Byte *compr, uLong comprLen));
-void test_inflate OF((Byte *compr, uLong comprLen,
+void test_deflate __P((Byte *compr, uLong comprLen));
+void test_inflate __P((Byte *compr, uLong comprLen,
Byte *uncompr, uLong uncomprLen));
-void test_large_deflate OF((Byte *compr, uLong comprLen,
+void test_large_deflate __P((Byte *compr, uLong comprLen,
Byte *uncompr, uLong uncomprLen));
-void test_large_inflate OF((Byte *compr, uLong comprLen,
+void test_large_inflate __P((Byte *compr, uLong comprLen,
Byte *uncompr, uLong uncomprLen));
-void test_flush OF((Byte *compr, uLong *comprLen));
-void test_sync OF((Byte *compr, uLong comprLen,
+void test_flush __P((Byte *compr, uLong *comprLen));
+void test_sync __P((Byte *compr, uLong comprLen,
Byte *uncompr, uLong uncomprLen));
-void test_dict_deflate OF((Byte *compr, uLong comprLen));
-void test_dict_inflate OF((Byte *compr, uLong comprLen,
+void test_dict_deflate __P((Byte *compr, uLong comprLen));
+void test_dict_inflate __P((Byte *compr, uLong comprLen,
Byte *uncompr, uLong uncomprLen));
-int main OF((int argc, char *argv[]));
+int main __P((int argc, char *argv[]));
/* ===========================================================================
* Test compress() and uncompress()
diff -r a61690053862 -r 21cc8d2dfa41 lib/libz/gzio.c
--- a/lib/libz/gzio.c Mon Jan 08 14:37:48 2001 +0000
+++ b/lib/libz/gzio.c Mon Jan 08 14:48:19 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gzio.c,v 1.9 1999/07/03 12:30:53 simonb Exp $ */
+/* $NetBSD: gzio.c,v 1.10 2001/01/08 14:48:20 itojun Exp $ */
/* gzio.c -- IO on .gz files
* Copyright (C) 1995-1998 Jean-loup Gailly.
@@ -55,13 +55,13 @@
} gz_stream;
-local gzFile gz_open OF((const char *path, const char *mode, int fd));
-local int do_flush OF((gzFile file, int flush));
-local int get_byte OF((gz_stream *s));
-local void check_header OF((gz_stream *s));
-local int destroy OF((gz_stream *s));
-local void putLong OF((FILE *file, uLong x));
-local uLong getLong OF((gz_stream *s));
+local gzFile gz_open __P((const char *path, const char *mode, int fd));
+local int do_flush __P((gzFile file, int flush));
+local int get_byte __P((gz_stream *s));
+local void check_header __P((gz_stream *s));
+local int destroy __P((gz_stream *s));
+local void putLong __P((FILE *file, uLong x));
+local uLong getLong __P((gz_stream *s));
/* ===========================================================================
Opens a gzip (.gz) file for reading or writing. The mode parameter
diff -r a61690053862 -r 21cc8d2dfa41 lib/libz/infblock.h
--- a/lib/libz/infblock.h Mon Jan 08 14:37:48 2001 +0000
+++ b/lib/libz/infblock.h Mon Jan 08 14:48:19 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: infblock.h,v 1.5 1999/07/03 12:30:55 simonb Exp $ */
+/* $NetBSD: infblock.h,v 1.6 2001/01/08 14:48:20 itojun Exp $ */
/* infblock.h -- header to use infblock.c
* Copyright (C) 1995-1998 Mark Adler
@@ -13,29 +13,29 @@
struct inflate_blocks_state;
typedef struct inflate_blocks_state FAR inflate_blocks_statef;
-extern inflate_blocks_statef * inflate_blocks_new OF((
+extern inflate_blocks_statef * inflate_blocks_new __P((
z_streamp z,
check_func c, /* check function */
uInt w)); /* window size */
-extern int inflate_blocks OF((
+extern int inflate_blocks __P((
inflate_blocks_statef *,
z_streamp ,
int)); /* initial return code */
-extern void inflate_blocks_reset OF((
+extern void inflate_blocks_reset __P((
inflate_blocks_statef *,
z_streamp ,
uLongf *)); /* check value on output */
-extern int inflate_blocks_free OF((
+extern int inflate_blocks_free __P((
inflate_blocks_statef *,
z_streamp));
-extern void inflate_set_dictionary OF((
+extern void inflate_set_dictionary __P((
inflate_blocks_statef *s,
const Bytef *d, /* dictionary */
uInt n)); /* dictionary length */
-extern int inflate_blocks_sync_point OF((
+extern int inflate_blocks_sync_point __P((
inflate_blocks_statef *s));
diff -r a61690053862 -r 21cc8d2dfa41 lib/libz/infcodes.h
--- a/lib/libz/infcodes.h Mon Jan 08 14:37:48 2001 +0000
+++ b/lib/libz/infcodes.h Mon Jan 08 14:48:19 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: infcodes.h,v 1.5 1999/07/03 12:30:56 simonb Exp $ */
+/* $NetBSD: infcodes.h,v 1.6 2001/01/08 14:48:20 itojun Exp $ */
/* infcodes.h -- header to use infcodes.c
* Copyright (C) 1995-1998 Mark Adler
@@ -13,17 +13,17 @@
struct inflate_codes_state;
typedef struct inflate_codes_state FAR inflate_codes_statef;
-extern inflate_codes_statef *inflate_codes_new OF((
+extern inflate_codes_statef *inflate_codes_new __P((
uInt, uInt,
inflate_huft *, inflate_huft *,
z_streamp ));
-extern int inflate_codes OF((
+extern int inflate_codes __P((
inflate_blocks_statef *,
z_streamp ,
int));
-extern void inflate_codes_free OF((
+extern void inflate_codes_free __P((
inflate_codes_statef *,
z_streamp ));
diff -r a61690053862 -r 21cc8d2dfa41 lib/libz/inffast.h
--- a/lib/libz/inffast.h Mon Jan 08 14:37:48 2001 +0000
+++ b/lib/libz/inffast.h Mon Jan 08 14:48:19 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: inffast.h,v 1.5 1999/07/03 12:30:56 simonb Exp $ */
+/* $NetBSD: inffast.h,v 1.6 2001/01/08 14:48:20 itojun Exp $ */
/* inffast.h -- header to use inffast.c
* Copyright (C) 1995-1998 Mark Adler
@@ -10,7 +10,7 @@
subject to change. Applications should only use zlib.h.
*/
-extern int inflate_fast OF((
+extern int inflate_fast __P((
uInt,
uInt,
inflate_huft *,
diff -r a61690053862 -r 21cc8d2dfa41 lib/libz/inftrees.c
--- a/lib/libz/inftrees.c Mon Jan 08 14:37:48 2001 +0000
+++ b/lib/libz/inftrees.c Mon Jan 08 14:48:19 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: inftrees.c,v 1.5 1999/07/03 12:30:56 simonb Exp $ */
+/* $NetBSD: inftrees.c,v 1.6 2001/01/08 14:48:20 itojun Exp $ */
/* inftrees.c -- generate Huffman trees for efficient decoding
* Copyright (C) 1995-1998 Mark Adler
@@ -27,7 +27,7 @@
#define bits word.what.Bits
-local int huft_build OF((
+local int huft_build __P((
uIntf *, /* code lengths in bits */
uInt, /* number of codes */
uInt, /* number of "simple" codes */
diff -r a61690053862 -r 21cc8d2dfa41 lib/libz/inftrees.h
--- a/lib/libz/inftrees.h Mon Jan 08 14:37:48 2001 +0000
+++ b/lib/libz/inftrees.h Mon Jan 08 14:48:19 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: inftrees.h,v 1.5 1999/07/03 12:30:57 simonb Exp $ */
+/* $NetBSD: inftrees.h,v 1.6 2001/01/08 14:48:21 itojun Exp $ */
/* inftrees.h -- header to use inftrees.c
* Copyright (C) 1995-1998 Mark Adler
@@ -34,14 +34,14 @@
value below is more than safe. */
Home |
Main Index |
Thread Index |
Old Index