summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJörn Engel <joern@wohnheim.fh-wedel.de>2003-06-05 02:13:43 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2003-06-05 02:13:43 -0700
commit3e3addbbd8cc5520f188b4ccf498c919c411d68b (patch)
tree240b5677944185871afa447a24d53814906eeab7 /include
parente5a74b6757a76ba570e55dd66a3839affb03ddde (diff)
[PATCH] zlib cleanup: OF
Remove the stale support for K&R function declarations through the OF() macro. This is the last patch to clean up zconf.h, at least for now.
Diffstat (limited to 'include')
-rw-r--r--include/linux/zconf.h5
-rw-r--r--include/linux/zlib.h70
-rw-r--r--include/linux/zutil.h4
3 files changed, 35 insertions, 44 deletions
diff --git a/include/linux/zconf.h b/include/linux/zconf.h
index dc4d77ff98ab..4557b3a55068 100644
--- a/include/linux/zconf.h
+++ b/include/linux/zconf.h
@@ -37,14 +37,9 @@
/* Type declarations */
-# define OF(args) args
-
typedef unsigned char Byte; /* 8 bits */
typedef unsigned int uInt; /* 16 bits or more */
typedef unsigned long uLong; /* 32 bits or more */
typedef void *voidp;
-#include <linux/types.h> /* for off_t */
-#include <linux/unistd.h> /* for SEEK_* and off_t */
-
#endif /* _ZCONF_H */
diff --git a/include/linux/zlib.h b/include/linux/zlib.h
index 4c4b55a34202..25c5b7bab0a4 100644
--- a/include/linux/zlib.h
+++ b/include/linux/zlib.h
@@ -161,14 +161,14 @@ typedef z_stream *z_streamp;
/* basic functions */
-extern const char * zlib_zlibVersion OF((void));
+extern const char * zlib_zlibVersion (void);
/* The application can compare zlibVersion and ZLIB_VERSION for consistency.
If the first character differs, the library code actually used is
not compatible with the zlib.h header file used by the application.
This check is automatically made by deflateInit and inflateInit.
*/
-extern int zlib_deflate_workspacesize OF((void));
+extern int zlib_deflate_workspacesize (void);
/*
Returns the number of bytes that needs to be allocated for a per-
stream workspace. A pointer to this number of bytes should be
@@ -176,7 +176,7 @@ extern int zlib_deflate_workspacesize OF((void));
*/
/*
-extern int deflateInit OF((z_streamp strm, int level));
+extern int deflateInit (z_streamp strm, int level);
Initializes the internal stream state for compression. The fields
zalloc, zfree and opaque must be initialized before by the caller.
@@ -198,7 +198,7 @@ extern int deflateInit OF((z_streamp strm, int level));
*/
-extern int zlib_deflate OF((z_streamp strm, int flush));
+extern int zlib_deflate (z_streamp strm, int flush);
/*
deflate compresses as much data as possible, and stops when the input
buffer becomes empty or the output buffer becomes full. It may introduce some
@@ -276,7 +276,7 @@ extern int zlib_deflate OF((z_streamp strm, int flush));
*/
-extern int zlib_deflateEnd OF((z_streamp strm));
+extern int zlib_deflateEnd (z_streamp strm);
/*
All dynamically allocated data structures for this stream are freed.
This function discards any unprocessed input and does not flush any
@@ -290,7 +290,7 @@ extern int zlib_deflateEnd OF((z_streamp strm));
*/
-extern int zlib_inflate_workspacesize OF((void));
+extern int zlib_inflate_workspacesize (void);
/*
Returns the number of bytes that needs to be allocated for a per-
stream workspace. A pointer to this number of bytes should be
@@ -298,7 +298,7 @@ extern int zlib_inflate_workspacesize OF((void));
*/
/*
-extern int zlib_inflateInit OF((z_streamp strm));
+extern int zlib_inflateInit (z_streamp strm);
Initializes the internal stream state for decompression. The fields
next_in, avail_in, and workspace must be initialized before by
@@ -318,7 +318,7 @@ extern int zlib_inflateInit OF((z_streamp strm));
*/
-extern int zlib_inflate OF((z_streamp strm, int flush));
+extern int zlib_inflate (z_streamp strm, int flush);
/*
inflate decompresses as much data as possible, and stops when the input
buffer becomes empty or the output buffer becomes full. It may some
@@ -387,7 +387,7 @@ extern int zlib_inflate OF((z_streamp strm, int flush));
*/
-extern int zlib_inflateEnd OF((z_streamp strm));
+extern int zlib_inflateEnd (z_streamp strm);
/*
All dynamically allocated data structures for this stream are freed.
This function discards any unprocessed input and does not flush any
@@ -405,12 +405,12 @@ extern int zlib_inflateEnd OF((z_streamp strm));
*/
/*
-extern int deflateInit2 OF((z_streamp strm,
+extern int deflateInit2 (z_streamp strm,
int level,
int method,
int windowBits,
int memLevel,
- int strategy));
+ int strategy);
This is another version of deflateInit with more compression options. The
fields next_in, zalloc, zfree and opaque must be initialized before by
@@ -448,9 +448,9 @@ extern int deflateInit2 OF((z_streamp strm,
not perform any compression: this will be done by deflate().
*/
-extern int zlib_deflateSetDictionary OF((z_streamp strm,
+extern int zlib_deflateSetDictionary (z_streamp strm,
const Byte *dictionary,
- uInt dictLength));
+ uInt dictLength);
/*
Initializes the compression dictionary from the given byte sequence
without producing any compressed output. This function must be called
@@ -484,8 +484,7 @@ extern int zlib_deflateSetDictionary OF((z_streamp strm,
perform any compression: this will be done by deflate().
*/
-extern int zlib_deflateCopy OF((z_streamp dest,
- z_streamp source));
+extern int zlib_deflateCopy (z_streamp dest, z_streamp source);
/*
Sets the destination stream as a complete copy of the source stream.
@@ -502,7 +501,7 @@ extern int zlib_deflateCopy OF((z_streamp dest,
destination.
*/
-extern int zlib_deflateReset OF((z_streamp strm));
+extern int zlib_deflateReset (z_streamp strm);
/*
This function is equivalent to deflateEnd followed by deflateInit,
but does not free and reallocate all the internal compression state.
@@ -513,9 +512,7 @@ extern int zlib_deflateReset OF((z_streamp strm));
stream state was inconsistent (such as zalloc or state being NULL).
*/
-extern int zlib_deflateParams OF((z_streamp strm,
- int level,
- int strategy));
+extern int zlib_deflateParams (z_streamp strm, int level, int strategy);
/*
Dynamically update the compression level and compression strategy. The
interpretation of level and strategy is as in deflateInit2. This can be
@@ -535,8 +532,7 @@ extern int zlib_deflateParams OF((z_streamp strm,
*/
/*
-extern int inflateInit2 OF((z_streamp strm,
- int windowBits));
+extern int inflateInit2 (z_streamp strm, int windowBits);
This is another version of inflateInit with an extra parameter. The
fields next_in, avail_in, zalloc, zfree and opaque must be initialized
@@ -557,9 +553,9 @@ extern int inflateInit2 OF((z_streamp strm,
modified, but next_out and avail_out are unchanged.)
*/
-extern int zlib_inflateSetDictionary OF((z_streamp strm,
+extern int zlib_inflateSetDictionary (z_streamp strm,
const Byte *dictionary,
- uInt dictLength));
+ uInt dictLength);
/*
Initializes the decompression dictionary from the given uncompressed byte
sequence. This function must be called immediately after a call of inflate
@@ -576,7 +572,7 @@ extern int zlib_inflateSetDictionary OF((z_streamp strm,
inflate().
*/
-extern int zlib_inflateSync OF((z_streamp strm));
+extern int zlib_inflateSync (z_streamp strm);
/*
Skips invalid compressed data until a full flush point (see above the
description of deflate with Z_FULL_FLUSH) can be found, or until all
@@ -591,7 +587,7 @@ extern int zlib_inflateSync OF((z_streamp strm));
until success or end of the input data.
*/
-extern int zlib_inflateReset OF((z_streamp strm));
+extern int zlib_inflateReset (z_streamp strm);
/*
This function is equivalent to inflateEnd followed by inflateInit,
but does not free and reallocate all the internal decompression state.
@@ -601,7 +597,7 @@ extern int zlib_inflateReset OF((z_streamp strm));
stream state was inconsistent (such as zalloc or state being NULL).
*/
-extern int zlib_inflateIncomp OF((z_stream *strm));
+extern int zlib_inflateIncomp (z_stream *strm);
/*
This function adds the data at next_in (avail_in bytes) to the output
history without performing any output. There must be no pending output,
@@ -615,16 +611,16 @@ extern int zlib_inflateIncomp OF((z_stream *strm));
/* deflateInit and inflateInit are macros to allow checking the zlib version
* and the compiler's view of z_stream:
*/
-extern int zlib_deflateInit_ OF((z_streamp strm, int level,
- const char *version, int stream_size));
-extern int zlib_inflateInit_ OF((z_streamp strm,
- const char *version, int stream_size));
-extern int zlib_deflateInit2_ OF((z_streamp strm, int level, int method,
+extern int zlib_deflateInit_ (z_streamp strm, int level,
+ const char *version, int stream_size);
+extern int zlib_inflateInit_ (z_streamp strm,
+ const char *version, int stream_size);
+extern int zlib_deflateInit2_ (z_streamp strm, int level, int method,
int windowBits, int memLevel,
int strategy, const char *version,
- int stream_size));
-extern int zlib_inflateInit2_ OF((z_streamp strm, int windowBits,
- const char *version, int stream_size));
+ int stream_size);
+extern int zlib_inflateInit2_ (z_streamp strm, int windowBits,
+ const char *version, int stream_size);
#define zlib_deflateInit(strm, level) \
zlib_deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream))
#define zlib_inflateInit(strm) \
@@ -640,9 +636,9 @@ extern int zlib_inflateInit2_ OF((z_streamp strm, int windowBits,
struct internal_state {int dummy;}; /* hack for buggy compilers */
#endif
-extern const char * zlib_zError OF((int err));
-extern int zlib_inflateSyncPoint OF((z_streamp z));
-extern const uLong * zlib_get_crc_table OF((void));
+extern const char * zlib_zError (int err);
+extern int zlib_inflateSyncPoint (z_streamp z);
+extern const uLong * zlib_get_crc_table (void);
#ifdef __cplusplus
}
diff --git a/include/linux/zutil.h b/include/linux/zutil.h
index 70f966997e20..76ba90983496 100644
--- a/include/linux/zutil.h
+++ b/include/linux/zutil.h
@@ -62,8 +62,8 @@ typedef unsigned long ulg;
/* functions */
-typedef uLong (*check_func) OF((uLong check, const Byte *buf,
- uInt len));
+typedef uLong (*check_func) (uLong check, const Byte *buf,
+ uInt len);
/* checksum functions */