Commit 7cbe6514 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.2.15-20020407

parent d8da737a
DOXYGEN Version 1.2.15 DOXYGEN Version 1.2.15-20020407
Please read the installation section of the manual for instructions. Please read the installation section of the manual for instructions.
-------- --------
Dimitri van Heesch (01 April 2002) Dimitri van Heesch (07 April 2002)
DOXYGEN Version 1.2.15 DOXYGEN Version 1.2.15_20020407
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives. ...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy, Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (01 April 2002) Dimitri van Heesch (dimitri@stack.nl) (07 April 2002)
1.2.15 1.2.15-20020407
...@@ -133,13 +133,13 @@ GENERATE_AUTOGEN_DEF = NO ...@@ -133,13 +133,13 @@ GENERATE_AUTOGEN_DEF = NO
# Configuration options related to the preprocessor # Configuration options related to the preprocessor
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO MACRO_EXPANSION = YES
EXPAND_ONLY_PREDEF = NO EXPAND_ONLY_PREDEF = YES
SEARCH_INCLUDES = YES SEARCH_INCLUDES = YES
INCLUDE_PATH = INCLUDE_PATH =
INCLUDE_FILE_PATTERNS = INCLUDE_FILE_PATTERNS =
PREDEFINED = PREDEFINED =
EXPAND_AS_DEFINED = EXPAND_AS_DEFINED = DEFINE_CLS_IMPL
SKIP_FUNCTION_MACROS = YES SKIP_FUNCTION_MACROS = YES
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Configuration::addtions related to external references # Configuration::addtions related to external references
...@@ -153,7 +153,7 @@ PERL_PATH = ...@@ -153,7 +153,7 @@ PERL_PATH =
# Configuration options related to the dot tool # Configuration options related to the dot tool
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
CLASS_DIAGRAMS = NO CLASS_DIAGRAMS = NO
HAVE_DOT = NO HAVE_DOT = YES
CLASS_GRAPH = YES CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES COLLABORATION_GRAPH = YES
TEMPLATE_RELATIONS = YES TEMPLATE_RELATIONS = YES
......
...@@ -179,7 +179,7 @@ Thanks go to: ...@@ -179,7 +179,7 @@ Thanks go to:
<li>Petr Prikryl for coordinating the internationalisation support. <li>Petr Prikryl for coordinating the internationalisation support.
All language maintainers for providing translations into many languages. All language maintainers for providing translations into many languages.
<li>Erik Jan Lingen of <a href="http://www.habanera.nl/">Habanera</a>, Mark <li>Erik Jan Lingen of <a href="http://www.habanera.nl/">Habanera</a>, Mark
Roddy, Paul Schwartz, Charles Duffy, and Vadym Voznyuk Roddy, Paul Schwartz, Charles Duffy, Vadym Voznyuk, and Philip Walton
for donating money. for donating money.
<li>The Comms group of <a href="http://www.symbian.com">Symbian</a> for donating <li>The Comms group of <a href="http://www.symbian.com">Symbian</a> for donating
an ultra cool <a href="http://www.psion.com/revoplus>Revo plus</a> an ultra cool <a href="http://www.psion.com/revoplus>Revo plus</a>
......
/* adler32.c -- compute the Adler-32 checksum of a data stream /* adler32.c -- compute the Adler-32 checksum of a data stream
* Copyright (C) 1995-1998 Mark Adler * Copyright (C) 1995-2002 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h * For conditions of distribution and use, see copyright notice in zlib.h
*/ */
...@@ -18,10 +18,7 @@ ...@@ -18,10 +18,7 @@
#define DO16(buf) DO8(buf,0); DO8(buf,8); #define DO16(buf) DO8(buf,0); DO8(buf,8);
/* ========================================================================= */ /* ========================================================================= */
uLong ZEXPORT adler32(adler, buf, len) uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len)
uLong adler;
const Bytef *buf;
uInt len;
{ {
unsigned long s1 = adler & 0xffff; unsigned long s1 = adler & 0xffff;
unsigned long s2 = (adler >> 16) & 0xffff; unsigned long s2 = (adler >> 16) & 0xffff;
......
/* compress.c -- compress a memory buffer /* compress.c -- compress a memory buffer
* Copyright (C) 1995-1998 Jean-loup Gailly. * Copyright (C) 1995-2002 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h * For conditions of distribution and use, see copyright notice in zlib.h
*/ */
...@@ -18,12 +18,7 @@ ...@@ -18,12 +18,7 @@
memory, Z_BUF_ERROR if there was not enough room in the output buffer, memory, Z_BUF_ERROR if there was not enough room in the output buffer,
Z_STREAM_ERROR if the level parameter is invalid. Z_STREAM_ERROR if the level parameter is invalid.
*/ */
int ZEXPORT compress2 (dest, destLen, source, sourceLen, level) int ZEXPORT compress2 (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen, int level)
Bytef *dest;
uLongf *destLen;
const Bytef *source;
uLong sourceLen;
int level;
{ {
z_stream stream; z_stream stream;
int err; int err;
...@@ -58,11 +53,7 @@ int ZEXPORT compress2 (dest, destLen, source, sourceLen, level) ...@@ -58,11 +53,7 @@ int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
/* =========================================================================== /* ===========================================================================
*/ */
int ZEXPORT compress (dest, destLen, source, sourceLen) int ZEXPORT compress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen)
Bytef *dest;
uLongf *destLen;
const Bytef *source;
uLong sourceLen;
{ {
return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION); return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION);
} }
/* crc32.c -- compute the CRC-32 of a data stream /* crc32.c -- compute the CRC-32 of a data stream
* Copyright (C) 1995-1998 Mark Adler * Copyright (C) 1995-2002 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h * For conditions of distribution and use, see copyright notice in zlib.h
*/ */
...@@ -124,7 +124,7 @@ local const uLongf crc_table[256] = { ...@@ -124,7 +124,7 @@ local const uLongf crc_table[256] = {
/* ========================================================================= /* =========================================================================
* This function can be used by asm versions of crc32() * This function can be used by asm versions of crc32()
*/ */
const uLongf * ZEXPORT get_crc_table() const uLongf * ZEXPORT get_crc_table(void)
{ {
#ifdef DYNAMIC_CRC_TABLE #ifdef DYNAMIC_CRC_TABLE
if (crc_table_empty) make_crc_table(); if (crc_table_empty) make_crc_table();
...@@ -139,10 +139,7 @@ const uLongf * ZEXPORT get_crc_table() ...@@ -139,10 +139,7 @@ const uLongf * ZEXPORT get_crc_table()
#define DO8(buf) DO4(buf); DO4(buf); #define DO8(buf) DO4(buf); DO4(buf);
/* ========================================================================= */ /* ========================================================================= */
uLong ZEXPORT crc32(crc, buf, len) uLong ZEXPORT crc32(uLong crc, const Bytef *buf, uInt len)
uLong crc;
const Bytef *buf;
uInt len;
{ {
if (buf == Z_NULL) return 0L; if (buf == Z_NULL) return 0L;
#ifdef DYNAMIC_CRC_TABLE #ifdef DYNAMIC_CRC_TABLE
......
/* deflate.c -- compress data using the deflation algorithm /* deflate.c -- compress data using the deflation algorithm
* Copyright (C) 1995-1998 Jean-loup Gailly. * Copyright (C) 1995-2002 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h * For conditions of distribution and use, see copyright notice in zlib.h
*/ */
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
#include "deflate.h" #include "deflate.h"
const char deflate_copyright[] = const char deflate_copyright[] =
" deflate 1.1.3 Copyright 1995-1998 Jean-loup Gailly "; " deflate 1.1.4 Copyright 1995-2002 Jean-loup Gailly ";
/* /*
If you use the zlib library in a product, an acknowledgment is welcome If you use the zlib library in a product, an acknowledgment is welcome
in the documentation of your product. If for some reason you cannot in the documentation of your product. If for some reason you cannot
...@@ -187,11 +187,7 @@ struct static_tree_desc_s {int dummy;}; /* for buggy compilers */ ...@@ -187,11 +187,7 @@ struct static_tree_desc_s {int dummy;}; /* for buggy compilers */
zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head)); zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head));
/* ========================================================================= */ /* ========================================================================= */
int ZEXPORT deflateInit_(strm, level, version, stream_size) int ZEXPORT deflateInit_(z_streamp strm, int level, const char *version, int stream_size)
z_streamp strm;
int level;
const char *version;
int stream_size;
{ {
return deflateInit2_(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, return deflateInit2_(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL,
Z_DEFAULT_STRATEGY, version, stream_size); Z_DEFAULT_STRATEGY, version, stream_size);
...@@ -199,16 +195,7 @@ int ZEXPORT deflateInit_(strm, level, version, stream_size) ...@@ -199,16 +195,7 @@ int ZEXPORT deflateInit_(strm, level, version, stream_size)
} }
/* ========================================================================= */ /* ========================================================================= */
int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy, int ZEXPORT deflateInit2_(z_streamp strm, int level, int method, int windowBits, int memLevel, int strategy, const char *version, int stream_size)
version, stream_size)
z_streamp strm;
int level;
int method;
int windowBits;
int memLevel;
int strategy;
const char *version;
int stream_size;
{ {
deflate_state *s; deflate_state *s;
int noheader = 0; int noheader = 0;
...@@ -242,7 +229,7 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy, ...@@ -242,7 +229,7 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
windowBits = -windowBits; windowBits = -windowBits;
} }
if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED || if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED ||
windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || windowBits < 9 || windowBits > 15 || level < 0 || level > 9 ||
strategy < 0 || strategy > Z_HUFFMAN_ONLY) { strategy < 0 || strategy > Z_HUFFMAN_ONLY) {
return Z_STREAM_ERROR; return Z_STREAM_ERROR;
} }
...@@ -288,10 +275,7 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy, ...@@ -288,10 +275,7 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
} }
/* ========================================================================= */ /* ========================================================================= */
int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength) int ZEXPORT deflateSetDictionary (z_streamp strm, const Bytef *dictionary, uInt dictLength)
z_streamp strm;
const Bytef *dictionary;
uInt dictLength;
{ {
deflate_state *s; deflate_state *s;
uInt length = dictLength; uInt length = dictLength;
...@@ -329,8 +313,7 @@ int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength) ...@@ -329,8 +313,7 @@ int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength)
} }
/* ========================================================================= */ /* ========================================================================= */
int ZEXPORT deflateReset (strm) int ZEXPORT deflateReset (z_streamp strm)
z_streamp strm;
{ {
deflate_state *s; deflate_state *s;
...@@ -359,10 +342,7 @@ int ZEXPORT deflateReset (strm) ...@@ -359,10 +342,7 @@ int ZEXPORT deflateReset (strm)
} }
/* ========================================================================= */ /* ========================================================================= */
int ZEXPORT deflateParams(strm, level, strategy) int ZEXPORT deflateParams(z_streamp strm, int level, int strategy)
z_streamp strm;
int level;
int strategy;
{ {
deflate_state *s; deflate_state *s;
compress_func func; compress_func func;
...@@ -399,9 +379,7 @@ int ZEXPORT deflateParams(strm, level, strategy) ...@@ -399,9 +379,7 @@ int ZEXPORT deflateParams(strm, level, strategy)
* IN assertion: the stream state is correct and there is enough room in * IN assertion: the stream state is correct and there is enough room in
* pending_buf. * pending_buf.
*/ */
local void putShortMSB (s, b) local void putShortMSB (deflate_state *s, uInt b)
deflate_state *s;
uInt b;
{ {
put_byte(s, (Byte)(b >> 8)); put_byte(s, (Byte)(b >> 8));
put_byte(s, (Byte)(b & 0xff)); put_byte(s, (Byte)(b & 0xff));
...@@ -413,8 +391,7 @@ local void putShortMSB (s, b) ...@@ -413,8 +391,7 @@ local void putShortMSB (s, b)
* to avoid allocating a large strm->next_out buffer and copying into it. * to avoid allocating a large strm->next_out buffer and copying into it.
* (See also read_buf()). * (See also read_buf()).
*/ */
local void flush_pending(strm) local void flush_pending(z_streamp strm)
z_streamp strm;
{ {
unsigned len = strm->state->pending; unsigned len = strm->state->pending;
...@@ -433,9 +410,7 @@ local void flush_pending(strm) ...@@ -433,9 +410,7 @@ local void flush_pending(strm)
} }
/* ========================================================================= */ /* ========================================================================= */
int ZEXPORT deflate (strm, flush) int ZEXPORT deflate (z_streamp strm, int flush)
z_streamp strm;
int flush;
{ {
int old_flush; /* value of flush param for previous deflate call */ int old_flush; /* value of flush param for previous deflate call */
deflate_state *s; deflate_state *s;
...@@ -567,8 +542,7 @@ int ZEXPORT deflate (strm, flush) ...@@ -567,8 +542,7 @@ int ZEXPORT deflate (strm, flush)
} }
/* ========================================================================= */ /* ========================================================================= */
int ZEXPORT deflateEnd (strm) int ZEXPORT deflateEnd (z_streamp strm)
z_streamp strm;
{ {
int status; int status;
...@@ -597,9 +571,7 @@ int ZEXPORT deflateEnd (strm) ...@@ -597,9 +571,7 @@ int ZEXPORT deflateEnd (strm)
* To simplify the source, this is not supported for 16-bit MSDOS (which * To simplify the source, this is not supported for 16-bit MSDOS (which
* doesn't have enough memory anyway to duplicate compression states). * doesn't have enough memory anyway to duplicate compression states).
*/ */
int ZEXPORT deflateCopy (dest, source) int ZEXPORT deflateCopy (z_streamp dest, z_streamp source)
z_streamp dest;
z_streamp source;
{ {
#ifdef MAXSEG_64K #ifdef MAXSEG_64K
return Z_STREAM_ERROR; return Z_STREAM_ERROR;
...@@ -659,10 +631,7 @@ int ZEXPORT deflateCopy (dest, source) ...@@ -659,10 +631,7 @@ int ZEXPORT deflateCopy (dest, source)
* allocating a large strm->next_in buffer and copying from it. * allocating a large strm->next_in buffer and copying from it.
* (See also flush_pending()). * (See also flush_pending()).
*/ */
local int read_buf(strm, buf, size) local int read_buf(z_streamp strm, Bytef *buf, unsigned int size)
z_streamp strm;
Bytef *buf;
unsigned size;
{ {
unsigned len = strm->avail_in; unsigned len = strm->avail_in;
...@@ -684,8 +653,7 @@ local int read_buf(strm, buf, size) ...@@ -684,8 +653,7 @@ local int read_buf(strm, buf, size)
/* =========================================================================== /* ===========================================================================
* Initialize the "longest match" routines for a new zlib stream * Initialize the "longest match" routines for a new zlib stream
*/ */
local void lm_init (s) local void lm_init (deflate_state *s)
deflate_state *s;
{ {
s->window_size = (ulg)2L*s->w_size; s->window_size = (ulg)2L*s->w_size;
...@@ -723,9 +691,9 @@ local void lm_init (s) ...@@ -723,9 +691,9 @@ local void lm_init (s)
* match.S. The code will be functionally equivalent. * match.S. The code will be functionally equivalent.
*/ */
#ifndef FASTEST #ifndef FASTEST
local uInt longest_match(s, cur_match) local uInt longest_match(deflate_state *s, IPos cur_match)
deflate_state *s;
IPos cur_match; /* current match */ /* current match */
{ {
unsigned chain_length = s->max_chain_length;/* max hash chain length */ unsigned chain_length = s->max_chain_length;/* max hash chain length */
register Bytef *scan = s->window + s->strstart; /* current string */ register Bytef *scan = s->window + s->strstart; /* current string */
...@@ -865,9 +833,7 @@ local uInt longest_match(s, cur_match) ...@@ -865,9 +833,7 @@ local uInt longest_match(s, cur_match)
/* --------------------------------------------------------------------------- /* ---------------------------------------------------------------------------
* Optimized version for level == 1 only * Optimized version for level == 1 only
*/ */
local uInt longest_match(s, cur_match) local uInt longest_match(deflate_state *s, IPos cur_match)
deflate_state *s;
IPos cur_match; /* current match */
{ {
register Bytef *scan = s->window + s->strstart; /* current string */ register Bytef *scan = s->window + s->strstart; /* current string */
register Bytef *match; /* matched string */ register Bytef *match; /* matched string */
...@@ -924,10 +890,7 @@ local uInt longest_match(s, cur_match) ...@@ -924,10 +890,7 @@ local uInt longest_match(s, cur_match)
/* =========================================================================== /* ===========================================================================
* Check that the match at match_start is indeed a match. * Check that the match at match_start is indeed a match.
*/ */
local void check_match(s, start, match, length) local void check_match(default_state *s, IPos start, IPos match, int length)
deflate_state *s;
IPos start, match;
int length;
{ {
/* check that the match is indeed a match */ /* check that the match is indeed a match */
if (zmemcmp(s->window + match, if (zmemcmp(s->window + match,
...@@ -958,8 +921,7 @@ local void check_match(s, start, match, length) ...@@ -958,8 +921,7 @@ local void check_match(s, start, match, length)
* performed for at least two bytes (required for the zip translate_eol * performed for at least two bytes (required for the zip translate_eol
* option -- not supported here). * option -- not supported here).
*/ */
local void fill_window(s) local void fill_window(deflate_state *s)
deflate_state *s;
{ {
register unsigned n, m; register unsigned n, m;
register Posf *p; register Posf *p;
...@@ -1078,9 +1040,7 @@ local void fill_window(s) ...@@ -1078,9 +1040,7 @@ local void fill_window(s)
* NOTE: this function should be optimized to avoid extra copying from * NOTE: this function should be optimized to avoid extra copying from
* window to pending_buf. * window to pending_buf.
*/ */
local block_state deflate_stored(s, flush) local block_state deflate_stored(deflate_state *s, int flush)
deflate_state *s;
int flush;
{ {
/* Stored blocks are limited to 0xffff bytes, pending_buf is limited /* Stored blocks are limited to 0xffff bytes, pending_buf is limited
* to pending_buf_size, and each stored block has a 5 byte header: * to pending_buf_size, and each stored block has a 5 byte header:
...@@ -1136,9 +1096,7 @@ local block_state deflate_stored(s, flush) ...@@ -1136,9 +1096,7 @@ local block_state deflate_stored(s, flush)
* new strings in the dictionary only for unmatched strings or for short * new strings in the dictionary only for unmatched strings or for short
* matches. It is used only for the fast compression options. * matches. It is used only for the fast compression options.
*/ */
local block_state deflate_fast(s, flush) local block_state deflate_fast(deflate_state *s, int flush)
deflate_state *s;
int flush;
{ {
IPos hash_head = NIL; /* head of the hash chain */ IPos hash_head = NIL; /* head of the hash chain */
int bflush; /* set if current block must be flushed */ int bflush; /* set if current block must be flushed */
...@@ -1232,9 +1190,7 @@ local block_state deflate_fast(s, flush) ...@@ -1232,9 +1190,7 @@ local block_state deflate_fast(s, flush)
* evaluation for matches: a match is finally adopted only if there is * evaluation for matches: a match is finally adopted only if there is
* no better match at the next window position. * no better match at the next window position.
*/ */
local block_state deflate_slow(s, flush) local block_state deflate_slow(deflate_state *s, int flush)
deflate_state *s;
int flush;
{ {
IPos hash_head = NIL; /* head of hash chain */ IPos hash_head = NIL; /* head of hash chain */
int bflush; /* set if current block must be flushed */ int bflush; /* set if current block must be flushed */
......
/* deflate.h -- internal compression state /* deflate.h -- internal compression state
* Copyright (C) 1995-1998 Jean-loup Gailly * Copyright (C) 1995-2002 Jean-loup Gailly
* For conditions of distribution and use, see copyright notice in zlib.h * For conditions of distribution and use, see copyright notice in zlib.h
*/ */
......
/* gzio.c -- IO on .gz files /* gzio.c -- IO on .gz files
* Copyright (C) 1995-1998 Jean-loup Gailly. * Copyright (C) 1995-2002 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h * For conditions of distribution and use, see copyright notice in zlib.h
* *
* Compile this file with -DNO_DEFLATE to avoid the compression code. * Compile this file with -DNO_DEFLATE to avoid the compression code.
...@@ -70,10 +70,7 @@ local uLong getLong OF((gz_stream *s)); ...@@ -70,10 +70,7 @@ local uLong getLong OF((gz_stream *s));
can be checked to distinguish the two cases (if errno is zero, the can be checked to distinguish the two cases (if errno is zero, the
zlib error is Z_MEM_ERROR). zlib error is Z_MEM_ERROR).
*/ */
local gzFile gz_open (path, mode, fd) local gzFile gz_open (const char *path, const char *mode, int fd)
const char *path;
const char *mode;
int fd;
{ {
int err; int err;
int level = Z_DEFAULT_COMPRESSION; /* compression level */ int level = Z_DEFAULT_COMPRESSION; /* compression level */
...@@ -180,9 +177,7 @@ local gzFile gz_open (path, mode, fd) ...@@ -180,9 +177,7 @@ local gzFile gz_open (path, mode, fd)
/* =========================================================================== /* ===========================================================================
Opens a gzip (.gz) file for reading or writing. Opens a gzip (.gz) file for reading or writing.
*/ */
gzFile ZEXPORT gzopen (path, mode) gzFile ZEXPORT gzopen (const char *path, const char *mode)
const char *path;
const char *mode;
{ {
return gz_open (path, mode, -1); return gz_open (path, mode, -1);
} }
...@@ -191,9 +186,7 @@ gzFile ZEXPORT gzopen (path, mode) ...@@ -191,9 +186,7 @@ gzFile ZEXPORT gzopen (path, mode)
Associate a gzFile with the file descriptor fd. fd is not dup'ed here Associate a gzFile with the file descriptor fd. fd is not dup'ed here
to mimic the behavio(u)r of fdopen. to mimic the behavio(u)r of fdopen.
*/ */
gzFile ZEXPORT gzdopen (fd, mode) gzFile ZEXPORT gzdopen (int fd, const char *mode)
int fd;
const char *mode;
{ {
char name[20]; char name[20];
...@@ -206,10 +199,7 @@ gzFile ZEXPORT gzdopen (fd, mode) ...@@ -206,10 +199,7 @@ gzFile ZEXPORT gzdopen (fd, mode)
/* =========================================================================== /* ===========================================================================
* Update the compression level and strategy * Update the compression level and strategy
*/ */
int ZEXPORT gzsetparams (file, level, strategy) int ZEXPORT gzsetparams (gzFile file, int level, int strategy)
gzFile file;
int level;
int strategy;
{ {
gz_stream *s = (gz_stream*)file; gz_stream *s = (gz_stream*)file;
...@@ -233,8 +223,7 @@ int ZEXPORT gzsetparams (file, level, strategy) ...@@ -233,8 +223,7 @@ int ZEXPORT gzsetparams (file, level, strategy)
for end of file. for end of file.
IN assertion: the stream s has been sucessfully opened for reading. IN assertion: the stream s has been sucessfully opened for reading.
*/ */
local int get_byte(s) local int get_byte(gz_stream *s)
gz_stream *s;
{ {
if (s->z_eof) return EOF; if (s->z_eof) return EOF;
if (s->stream.avail_in == 0) { if (s->stream.avail_in == 0) {
...@@ -260,8 +249,7 @@ local int get_byte(s) ...@@ -260,8 +249,7 @@ local int get_byte(s)
s->stream.avail_in is zero for the first time, but may be non-zero s->stream.avail_in is zero for the first time, but may be non-zero
for concatenated .gz files. for concatenated .gz files.
*/ */
local void check_header(s) local void check_header(gz_stream *s)
gz_stream *s;
{ {
int method; /* method byte */ int method; /* method byte */
int flags; /* flags byte */ int flags; /* flags byte */
...@@ -313,8 +301,7 @@ local void check_header(s) ...@@ -313,8 +301,7 @@ local void check_header(s)
* Cleanup then free the given gz_stream. Return a zlib error code. * Cleanup then free the given gz_stream. Return a zlib error code.
Try freeing in the reverse order of allocations. Try freeing in the reverse order of allocations.
*/ */
local int destroy (s) local int destroy (gz_stream *s)
gz_stream *s;
{ {
int err = Z_OK; int err = Z_OK;
...@@ -352,10 +339,7 @@ local int destroy (s) ...@@ -352,10 +339,7 @@ local int destroy (s)
Reads the given number of uncompressed bytes from the compressed file. Reads the given number of uncompressed bytes from the compressed file.
gzread returns the number of bytes actually read (0 for end of file). gzread returns the number of bytes actually read (0 for end of file).
*/ */
int ZEXPORT gzread (file, buf, len) int ZEXPORT gzread (gzFile file, voidp buf, unsigned int len)
gzFile file;
voidp buf;
unsigned len;
{ {
gz_stream *s = (gz_stream*)file; gz_stream *s = (gz_stream*)file;
Bytef *start = (Bytef*)buf; /* starting point for crc computation */ Bytef *start = (Bytef*)buf; /* starting point for crc computation */
...@@ -446,8 +430,7 @@ int ZEXPORT gzread (file, buf, len) ...@@ -446,8 +430,7 @@ int ZEXPORT gzread (file, buf, len)
Reads one byte from the compressed file. gzgetc returns this byte Reads one byte from the compressed file. gzgetc returns this byte
or -1 in case of end of file or error. or -1 in case of end of file or error.
*/ */
int ZEXPORT gzgetc(file) int ZEXPORT gzgetc(gzFile file)
gzFile file;
{ {
unsigned char c; unsigned char c;
...@@ -464,10 +447,7 @@ int ZEXPORT gzgetc(file) ...@@ -464,10 +447,7 @@ int ZEXPORT gzgetc(file)
The current implementation is not optimized at all. The current implementation is not optimized at all.
*/ */
char * ZEXPORT gzgets(file, buf, len) char * ZEXPORT gzgets(gzFile file, char *buf, int len)
gzFile file;
char *buf;
int len;
{ {
char *b = buf; char *b = buf;
if (buf == Z_NULL || len <= 0) return Z_NULL; if (buf == Z_NULL || len <= 0) return Z_NULL;
...@@ -483,10 +463,7 @@ char * ZEXPORT gzgets(file, buf, len) ...@@ -483,10 +463,7 @@ char * ZEXPORT gzgets(file, buf, len)
Writes the given number of uncompressed bytes into the compressed file. Writes the given number of uncompressed bytes into the compressed file.
gzwrite returns the number of bytes actually written (0 in case of error). gzwrite returns the number of bytes actually written (0 in case of error).
*/ */
int ZEXPORT gzwrite (file, buf, len) int ZEXPORT gzwrite (gzFile file, const voidp buf, unsigned int len)
gzFile file;
const voidp buf;
unsigned len;
{ {
gz_stream *s = (gz_stream*)file; gz_stream *s = (gz_stream*)file;
...@@ -542,12 +519,11 @@ int ZEXPORTVA gzprintf (gzFile file, const char *format, /* args */ ...) ...@@ -542,12 +519,11 @@ int ZEXPORTVA gzprintf (gzFile file, const char *format, /* args */ ...)
} }
#else /* not ANSI C */ #else /* not ANSI C */
int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, int ZEXPORTVA gzprintf (gzFile file, const char *format,
a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) int a1, int a2, int a3, int a4, int a5,
gzFile file; int a6, int a7, int a8, int a9, int a10,
const char *format; int a11, int a12, int a13, int a14, int a15,
int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, int a16, int a17, int a18, int a19, int a20)
a11, a12, a13, a14, a15, a16, a17, a18, a19, a20;
{ {
char buf[Z_PRINTF_BUFSIZE]; char buf[Z_PRINTF_BUFSIZE];
int len; int len;
...@@ -570,9 +546,7 @@ int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, ...@@ -570,9 +546,7 @@ int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
Writes c, converted to an unsigned char, into the compressed file. Writes c, converted to an unsigned char, into the compressed file.
gzputc returns the value that was written, or -1 in case of error. gzputc returns the value that was written, or -1 in case of error.
*/ */
int ZEXPORT gzputc(file, c) int ZEXPORT gzputc(gzFile file, int c)
gzFile file;
int c;
{ {
unsigned char cc = (unsigned char) c; /* required for big endian systems */ unsigned char cc = (unsigned char) c; /* required for big endian systems */
...@@ -585,9 +559,7 @@ int ZEXPORT gzputc(file, c) ...@@ -585,9 +559,7 @@ int ZEXPORT gzputc(file, c)
the terminating null character. the terminating null character.
gzputs returns the number of characters written, or -1 in case of error. gzputs returns the number of characters written, or -1 in case of error.
*/ */
int ZEXPORT gzputs(file, s) int ZEXPORT gzputs(gzFile file, const char *s)
gzFile file;
const char *s;
{ {
return gzwrite(file, (char*)s, (unsigned)strlen(s)); return gzwrite(file, (char*)s, (unsigned)strlen(s));
} }
...@@ -597,9 +569,7 @@ int ZEXPORT gzputs(file, s) ...@@ -597,9 +569,7 @@ int ZEXPORT gzputs(file, s)
Flushes all pending output into the compressed file. The parameter Flushes all pending output into the compressed file. The parameter
flush is as in the deflate() function. flush is as in the deflate() function.
*/ */
local int do_flush (file, flush) local int do_flush (gzFile file, int flush)
gzFile file;
int flush;
{ {
uInt len; uInt len;
int done = 0; int done = 0;
...@@ -636,9 +606,7 @@ local int do_flush (file, flush) ...@@ -636,9 +606,7 @@ local int do_flush (file, flush)
return s->z_err == Z_STREAM_END ? Z_OK : s->z_err; return s->z_err == Z_STREAM_END ? Z_OK : s->z_err;
} }
int ZEXPORT gzflush (file, flush) int ZEXPORT gzflush (gzFile file, int flush)
gzFile file;
int flush;
{ {
gz_stream *s = (gz_stream*)file; gz_stream *s = (gz_stream*)file;
int err = do_flush (file, flush); int err = do_flush (file, flush);
...@@ -657,10 +625,7 @@ int ZEXPORT gzflush (file, flush) ...@@ -657,10 +625,7 @@ int ZEXPORT gzflush (file, flush)
SEEK_END is not implemented, returns error. SEEK_END is not implemented, returns error.
In this version of the library, gzseek can be extremely slow. In this version of the library, gzseek can be extremely slow.
*/ */
z_off_t ZEXPORT gzseek (file, offset, whence) z_off_t ZEXPORT gzseek (gzFile file, long int offset, int whence)
gzFile file;
z_off_t offset;
int whence;
{ {
gz_stream *s = (gz_stream*)file; gz_stream *s = (gz_stream*)file;
...@@ -738,8 +703,7 @@ z_off_t ZEXPORT gzseek (file, offset, whence) ...@@ -738,8 +703,7 @@ z_off_t ZEXPORT gzseek (file, offset, whence)
/* =========================================================================== /* ===========================================================================
Rewinds input file. Rewinds input file.
*/ */
int ZEXPORT gzrewind (file) int ZEXPORT gzrewind (gzFile file)
gzFile file;
{ {
gz_stream *s = (gz_stream*)file; gz_stream *s = (gz_stream*)file;
...@@ -765,8 +729,7 @@ int ZEXPORT gzrewind (file) ...@@ -765,8 +729,7 @@ int ZEXPORT gzrewind (file)
given compressed file. This position represents a number of bytes in the given compressed file. This position represents a number of bytes in the
uncompressed data stream. uncompressed data stream.
*/ */
z_off_t ZEXPORT gztell (file) z_off_t ZEXPORT gztell (gzFile file)
gzFile file;
{ {
return gzseek(file, 0L, SEEK_CUR); return gzseek(file, 0L, SEEK_CUR);
} }
...@@ -775,8 +738,7 @@ z_off_t ZEXPORT gztell (file) ...@@ -775,8 +738,7 @@ z_off_t ZEXPORT gztell (file)
Returns 1 when EOF has previously been detected reading the given Returns 1 when EOF has previously been detected reading the given
input stream, otherwise zero. input stream, otherwise zero.
*/ */
int ZEXPORT gzeof (file) int ZEXPORT gzeof (gzFile file)
gzFile file;
{ {
gz_stream *s = (gz_stream*)file; gz_stream *s = (gz_stream*)file;
...@@ -786,9 +748,7 @@ int ZEXPORT gzeof (file) ...@@ -786,9 +748,7 @@ int ZEXPORT gzeof (file)
/* =========================================================================== /* ===========================================================================
Outputs a long in LSB order to the given file Outputs a long in LSB order to the given file
*/ */
local void putLong (file, x) local void putLong (FILE *file, uLong x)
FILE *file;
uLong x;
{ {
int n; int n;
for (n = 0; n < 4; n++) { for (n = 0; n < 4; n++) {
...@@ -801,8 +761,7 @@ local void putLong (file, x) ...@@ -801,8 +761,7 @@ local void putLong (file, x)
Reads a long in LSB order from the given gz_stream. Sets z_err in case Reads a long in LSB order from the given gz_stream. Sets z_err in case
of error. of error.
*/ */
local uLong getLong (s) local uLong getLong (gz_stream *s)
gz_stream *s;
{ {
uLong x = (uLong)get_byte(s); uLong x = (uLong)get_byte(s);
int c; int c;
...@@ -819,8 +778,7 @@ local uLong getLong (s) ...@@ -819,8 +778,7 @@ local uLong getLong (s)
Flushes all pending output if necessary, closes the compressed file Flushes all pending output if necessary, closes the compressed file
and deallocates all the (de)compression state. and deallocates all the (de)compression state.
*/ */
int ZEXPORT gzclose (file) int ZEXPORT gzclose (gzFile file)
gzFile file;
{ {
int err; int err;
gz_stream *s = (gz_stream*)file; gz_stream *s = (gz_stream*)file;
...@@ -848,9 +806,7 @@ int ZEXPORT gzclose (file) ...@@ -848,9 +806,7 @@ int ZEXPORT gzclose (file)
errnum is set to Z_ERRNO and the application may consult errno errnum is set to Z_ERRNO and the application may consult errno
to get the exact error code. to get the exact error code.
*/ */
const char* ZEXPORT gzerror (file, errnum) const char* ZEXPORT gzerror (gzFile file, int *errnum)
gzFile file;
int *errnum;
{ {
char *m; char *m;
gz_stream *s = (gz_stream*)file; gz_stream *s = (gz_stream*)file;
......
/* infblock.c -- interpret and process block types to last block /* infblock.c -- interpret and process block types to last block
* Copyright (C) 1995-1998 Mark Adler * Copyright (C) 1995-2002 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h * For conditions of distribution and use, see copyright notice in zlib.h
*/ */
...@@ -65,10 +65,7 @@ local const uInt border[] = { /* Order of the bit length code lengths */ ...@@ -65,10 +65,7 @@ local const uInt border[] = { /* Order of the bit length code lengths */
*/ */
void inflate_blocks_reset(s, z, c) void inflate_blocks_reset(inflate_blocks_statef *s, z_streamp z, uLongf *c)
inflate_blocks_statef *s;
z_streamp z;
uLongf *c;
{ {
if (c != Z_NULL) if (c != Z_NULL)
*c = s->check; *c = s->check;
...@@ -86,10 +83,7 @@ uLongf *c; ...@@ -86,10 +83,7 @@ uLongf *c;
} }
inflate_blocks_statef *inflate_blocks_new(z, c, w) inflate_blocks_statef *inflate_blocks_new(z_streamp z, check_func c, uInt w)
z_streamp z;
check_func c;
uInt w;
{ {
inflate_blocks_statef *s; inflate_blocks_statef *s;
...@@ -117,10 +111,7 @@ uInt w; ...@@ -117,10 +111,7 @@ uInt w;
} }
int inflate_blocks(s, z, r) int inflate_blocks(inflate_blocks_statef *s, z_streamp z, int r)
inflate_blocks_statef *s;
z_streamp z;
int r;
{ {
uInt t; /* temporary storage */ uInt t; /* temporary storage */
uLong b; /* bit buffer */ uLong b; /* bit buffer */
...@@ -249,10 +240,12 @@ int r; ...@@ -249,10 +240,12 @@ int r;
&s->sub.trees.tb, s->hufts, z); &s->sub.trees.tb, s->hufts, z);
if (t != Z_OK) if (t != Z_OK)
{ {
ZFREE(z, s->sub.trees.blens);
r = t; r = t;
if (r == Z_DATA_ERROR) if (r == Z_DATA_ERROR)
{
ZFREE(z, s->sub.trees.blens);
s->mode = BAD; s->mode = BAD;
}
LEAVE LEAVE
} }
s->sub.trees.index = 0; s->sub.trees.index = 0;
...@@ -313,11 +306,13 @@ int r; ...@@ -313,11 +306,13 @@ int r;
t = inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), t = inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f),
s->sub.trees.blens, &bl, &bd, &tl, &td, s->sub.trees.blens, &bl, &bd, &tl, &td,
s->hufts, z); s->hufts, z);
ZFREE(z, s->sub.trees.blens);
if (t != Z_OK) if (t != Z_OK)
{ {
if (t == (uInt)Z_DATA_ERROR) if (t == (uInt)Z_DATA_ERROR)
{
ZFREE(z, s->sub.trees.blens);
s->mode = BAD; s->mode = BAD;
}
r = t; r = t;
LEAVE LEAVE
} }
...@@ -329,6 +324,7 @@ int r; ...@@ -329,6 +324,7 @@ int r;
} }
s->sub.decode.codes = c; s->sub.decode.codes = c;
} }
ZFREE(z, s->sub.trees.blens);
s->mode = CODES; s->mode = CODES;
case CODES: case CODES:
UPDATE UPDATE
...@@ -364,9 +360,7 @@ int r; ...@@ -364,9 +360,7 @@ int r;
} }
int inflate_blocks_free(s, z) int inflate_blocks_free(inflate_blocks_statef *s, z_streamp z)
inflate_blocks_statef *s;
z_streamp z;
{ {
inflate_blocks_reset(s, z, Z_NULL); inflate_blocks_reset(s, z, Z_NULL);
ZFREE(z, s->window); ZFREE(z, s->window);
...@@ -377,10 +371,7 @@ z_streamp z; ...@@ -377,10 +371,7 @@ z_streamp z;
} }
void inflate_set_dictionary(s, d, n) void inflate_set_dictionary(inflate_blocks_statef *s, const Bytef *d, uInt n)
inflate_blocks_statef *s;
const Bytef *d;
uInt n;
{ {
zmemcpy(s->window, d, n); zmemcpy(s->window, d, n);
s->read = s->write = s->window + n; s->read = s->write = s->window + n;
...@@ -391,8 +382,7 @@ uInt n; ...@@ -391,8 +382,7 @@ uInt n;
* by Z_SYNC_FLUSH or Z_FULL_FLUSH. * by Z_SYNC_FLUSH or Z_FULL_FLUSH.
* IN assertion: s != Z_NULL * IN assertion: s != Z_NULL
*/ */
int inflate_blocks_sync_point(s) int inflate_blocks_sync_point(inflate_blocks_statef *s)
inflate_blocks_statef *s;
{ {
return s->mode == LENS; return s->mode == LENS;
} }
/* infblock.h -- header to use infblock.c /* infblock.h -- header to use infblock.c
* Copyright (C) 1995-1998 Mark Adler * Copyright (C) 1995-2002 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h * For conditions of distribution and use, see copyright notice in zlib.h
*/ */
......
/* infcodes.c -- process literals and length/distance pairs /* infcodes.c -- process literals and length/distance pairs
* Copyright (C) 1995-1998 Mark Adler * Copyright (C) 1995-2002 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h * For conditions of distribution and use, see copyright notice in zlib.h
*/ */
...@@ -56,11 +56,11 @@ struct inflate_codes_state { ...@@ -56,11 +56,11 @@ struct inflate_codes_state {
}; };
inflate_codes_statef *inflate_codes_new(bl, bd, tl, td, z) inflate_codes_statef *inflate_codes_new(uInt bl, uInt bd, inflate_huft *tl, inflate_huft *td, z_streamp z)
uInt bl, bd;
inflate_huft *tl;
inflate_huft *td; /* need separate declaration for Borland C++ */ /* need separate declaration for Borland C++ */
z_streamp z;
{ {
inflate_codes_statef *c; inflate_codes_statef *c;
...@@ -78,10 +78,7 @@ z_streamp z; ...@@ -78,10 +78,7 @@ z_streamp z;
} }
int inflate_codes(s, z, r) int inflate_codes(inflate_blocks_statef *s, z_streamp z, int r)
inflate_blocks_statef *s;
z_streamp z;
int r;
{ {
uInt j; /* temporary storage */ uInt j; /* temporary storage */
inflate_huft *t; /* temporary pointer */ inflate_huft *t; /* temporary pointer */
...@@ -196,15 +193,9 @@ int r; ...@@ -196,15 +193,9 @@ int r;
Tracevv((stderr, "inflate: distance %u\n", c->sub.copy.dist)); Tracevv((stderr, "inflate: distance %u\n", c->sub.copy.dist));
c->mode = COPY; c->mode = COPY;
case COPY: /* o: copying bytes in window, waiting for space */ case COPY: /* o: copying bytes in window, waiting for space */
#ifndef __TURBOC__ /* Turbo C bug for following expression */
f = (uInt)(q - s->window) < c->sub.copy.dist ?
s->end - (c->sub.copy.dist - (q - s->window)) :
q - c->sub.copy.dist;
#else
f = q - c->sub.copy.dist; f = q - c->sub.copy.dist;
if ((uInt)(q - s->window) < c->sub.copy.dist) while (f < s->window) /* modulo window size-"while" instead */
f = s->end - (c->sub.copy.dist - (uInt)(q - s->window)); f += s->end - s->window; /* of "if" handles invalid distances */
#endif
while (c->len) while (c->len)
{ {
NEEDOUT NEEDOUT
...@@ -248,9 +239,7 @@ int r; ...@@ -248,9 +239,7 @@ int r;
} }
void inflate_codes_free(c, z) void inflate_codes_free(inflate_codes_statef *c, z_streamp z)
inflate_codes_statef *c;
z_streamp z;
{ {
ZFREE(z, c); ZFREE(z, c);
Tracev((stderr, "inflate: codes free\n")); Tracev((stderr, "inflate: codes free\n"));
......
/* infcodes.h -- header to use infcodes.c /* infcodes.h -- header to use infcodes.c
* Copyright (C) 1995-1998 Mark Adler * Copyright (C) 1995-2002 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h * For conditions of distribution and use, see copyright notice in zlib.h
*/ */
......
/* inffast.c -- process literals and length/distance pairs fast /* inffast.c -- process literals and length/distance pairs fast
* Copyright (C) 1995-1998 Mark Adler * Copyright (C) 1995-2002 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h * For conditions of distribution and use, see copyright notice in zlib.h
*/ */
...@@ -25,12 +25,12 @@ struct inflate_codes_state {int dummy;}; /* for buggy compilers */ ...@@ -25,12 +25,12 @@ struct inflate_codes_state {int dummy;}; /* for buggy compilers */
at least ten. The ten bytes are six bytes for the longest length/ at least ten. The ten bytes are six bytes for the longest length/
distance pair plus four bytes for overloading the bit buffer. */ distance pair plus four bytes for overloading the bit buffer. */
int inflate_fast(bl, bd, tl, td, s, z) int inflate_fast(uInt bl, uInt bd, inflate_huft *tl, inflate_huft *td, inflate_blocks_statef *s, z_streamp z)
uInt bl, bd;
inflate_huft *tl;
inflate_huft *td; /* need separate declaration for Borland C++ */ /* need separate declaration for Borland C++ */
inflate_blocks_statef *s;
z_streamp z;
{ {
inflate_huft *t; /* temporary pointer */ inflate_huft *t; /* temporary pointer */
uInt e; /* extra bits or operation */ uInt e; /* extra bits or operation */
...@@ -93,28 +93,41 @@ z_streamp z; ...@@ -93,28 +93,41 @@ z_streamp z;
/* do the copy */ /* do the copy */
m -= c; m -= c;
if ((uInt)(q - s->window) >= d) /* offset before dest */ r = q - d;
{ /* just copy */ if (r < s->window) /* wrap if needed */
r = q - d;
*q++ = *r++; c--; /* minimum count is three, */
*q++ = *r++; c--; /* so unroll loop a little */
}
else /* else offset after destination */
{ {
e = d - (uInt)(q - s->window); /* bytes from offset to end */ do {
r = s->end - e; /* pointer to offset */ r += s->end - s->window; /* force pointer in window */
if (c > e) /* if source crosses, */ } while (r < s->window); /* covers invalid distances */
e = s->end - r;
if (c > e)
{ {
c -= e; /* copy to end of window */ c -= e; /* wrapped copy */
do { do {
*q++ = *r++; *q++ = *r++;
} while (--e); } while (--e);
r = s->window; /* copy rest from start of window */ r = s->window;
do {
*q++ = *r++;
} while (--c);
} }
else /* normal copy */
{
*q++ = *r++; c--;
*q++ = *r++; c--;
do {
*q++ = *r++;
} while (--c);
}
}
else /* normal copy */
{
*q++ = *r++; c--;
*q++ = *r++; c--;
do {
*q++ = *r++;
} while (--c);
} }
do { /* copy all or what's left */
*q++ = *r++;
} while (--c);
break; break;
} }
else if ((e & 64) == 0) else if ((e & 64) == 0)
......
/* inffast.h -- header to use inffast.c /* inffast.h -- header to use inffast.c
* Copyright (C) 1995-1998 Mark Adler * Copyright (C) 1995-2002 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h * For conditions of distribution and use, see copyright notice in zlib.h
*/ */
......
/* inflate.c -- zlib interface to inflate modules /* inflate.c -- zlib interface to inflate modules
* Copyright (C) 1995-1998 Mark Adler * Copyright (C) 1995-2002 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h * For conditions of distribution and use, see copyright notice in zlib.h
*/ */
...@@ -50,8 +50,7 @@ struct internal_state { ...@@ -50,8 +50,7 @@ struct internal_state {
}; };
int ZEXPORT inflateReset(z) int ZEXPORT inflateReset(z_streamp z)
z_streamp z;
{ {
if (z == Z_NULL || z->state == Z_NULL) if (z == Z_NULL || z->state == Z_NULL)
return Z_STREAM_ERROR; return Z_STREAM_ERROR;
...@@ -64,8 +63,7 @@ z_streamp z; ...@@ -64,8 +63,7 @@ z_streamp z;
} }
int ZEXPORT inflateEnd(z) int ZEXPORT inflateEnd(z_streamp z)
z_streamp z;
{ {
if (z == Z_NULL || z->state == Z_NULL || z->zfree == Z_NULL) if (z == Z_NULL || z->state == Z_NULL || z->zfree == Z_NULL)
return Z_STREAM_ERROR; return Z_STREAM_ERROR;
...@@ -78,11 +76,7 @@ z_streamp z; ...@@ -78,11 +76,7 @@ z_streamp z;
} }
int ZEXPORT inflateInit2_(z, w, version, stream_size) int ZEXPORT inflateInit2_(z_streamp z, int w, const char *version, int stream_size)
z_streamp z;
int w;
const char *version;
int stream_size;
{ {
if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
stream_size != sizeof(z_stream)) stream_size != sizeof(z_stream))
...@@ -135,10 +129,7 @@ int stream_size; ...@@ -135,10 +129,7 @@ int stream_size;
} }
int ZEXPORT inflateInit_(z, version, stream_size) int ZEXPORT inflateInit_(z_streamp z, const char *version, int stream_size)
z_streamp z;
const char *version;
int stream_size;
{ {
return inflateInit2_(z, DEF_WBITS, version, stream_size); return inflateInit2_(z, DEF_WBITS, version, stream_size);
} }
...@@ -147,9 +138,7 @@ int stream_size; ...@@ -147,9 +138,7 @@ int stream_size;
#define NEEDBYTE {if(z->avail_in==0)return r;r=f;} #define NEEDBYTE {if(z->avail_in==0)return r;r=f;}
#define NEXTBYTE (z->avail_in--,z->total_in++,*z->next_in++) #define NEXTBYTE (z->avail_in--,z->total_in++,*z->next_in++)
int ZEXPORT inflate(z, f) int ZEXPORT inflate(z_streamp z, int f)
z_streamp z;
int f;
{ {
int r; int r;
uInt b; uInt b;
...@@ -275,10 +264,7 @@ int f; ...@@ -275,10 +264,7 @@ int f;
} }
int ZEXPORT inflateSetDictionary(z, dictionary, dictLength) int ZEXPORT inflateSetDictionary(z_streamp z, const Bytef *dictionary, uInt dictLength)
z_streamp z;
const Bytef *dictionary;
uInt dictLength;
{ {
uInt length = dictLength; uInt length = dictLength;
...@@ -299,8 +285,7 @@ uInt dictLength; ...@@ -299,8 +285,7 @@ uInt dictLength;
} }
int ZEXPORT inflateSync(z) int ZEXPORT inflateSync(z_streamp z)
z_streamp z;
{ {
uInt n; /* number of bytes to look at */ uInt n; /* number of bytes to look at */
Bytef *p; /* pointer to bytes */ Bytef *p; /* pointer to bytes */
...@@ -357,8 +342,7 @@ z_streamp z; ...@@ -357,8 +342,7 @@ z_streamp z;
* decompressing, PPP checks that at the end of input packet, inflate is * decompressing, PPP checks that at the end of input packet, inflate is
* waiting for these length bytes. * waiting for these length bytes.
*/ */
int ZEXPORT inflateSyncPoint(z) int ZEXPORT inflateSyncPoint(z_streamp z)
z_streamp z;
{ {
if (z == Z_NULL || z->state == Z_NULL || z->state->blocks == Z_NULL) if (z == Z_NULL || z->state == Z_NULL || z->state->blocks == Z_NULL)
return Z_STREAM_ERROR; return Z_STREAM_ERROR;
......
/* inftrees.c -- generate Huffman trees for efficient decoding /* inftrees.c -- generate Huffman trees for efficient decoding
* Copyright (C) 1995-1998 Mark Adler * Copyright (C) 1995-2002 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h * For conditions of distribution and use, see copyright notice in zlib.h
*/ */
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#endif #endif
const char inflate_copyright[] = const char inflate_copyright[] =
" inflate 1.1.3 Copyright 1995-1998 Mark Adler "; " inflate 1.1.4 Copyright 1995-2002 Mark Adler ";
/* /*
If you use the zlib library in a product, an acknowledgment is welcome If you use the zlib library in a product, an acknowledgment is welcome
in the documentation of your product. If for some reason you cannot in the documentation of your product. If for some reason you cannot
...@@ -90,22 +90,21 @@ local const uInt cpdext[30] = { /* Extra bits for distance codes */ ...@@ -90,22 +90,21 @@ local const uInt cpdext[30] = { /* Extra bits for distance codes */
/* If BMAX needs to be larger than 16, then h and x[] should be uLong. */ /* If BMAX needs to be larger than 16, then h and x[] should be uLong. */
#define BMAX 15 /* maximum bit length of any code */ #define BMAX 15 /* maximum bit length of any code */
local int huft_build(b, n, s, d, e, t, m, hp, hn, v) local int huft_build(uIntf *b, uInt n, uInt s, const uIntf *d, const uIntf *e, inflate_huft **t, uIntf *m, inflate_huft *hp, uInt *hn, uIntf *v)
uIntf *b; /* code lengths in bits (all assumed <= BMAX) */ /* code lengths in bits (all assumed <= BMAX) */
uInt n; /* number of codes (assumed <= 288) */ /* number of codes (assumed <= 288) */
uInt s; /* number of simple-valued codes (0..s-1) */ /* number of simple-valued codes (0..s-1) */
const uIntf *d; /* list of base values for non-simple codes */ /* list of base values for non-simple codes */
const uIntf *e; /* list of extra bits for non-simple codes */ /* list of extra bits for non-simple codes */
inflate_huft * FAR *t; /* result: starting table */ /* result: starting table */
uIntf *m; /* maximum lookup bits, returns actual */ /* maximum lookup bits, returns actual */
inflate_huft *hp; /* space for trees */ /* space for trees */
uInt *hn; /* hufts used in space */ /* hufts used in space */
uIntf *v; /* working area: values in order of bit length */ /* working area: values in order of bit length */
/* Given a list of code lengths and a maximum table size, make a set of /* Given a list of code lengths and a maximum table size, make a set of
tables to decode that set of codes. Return Z_OK on success, Z_BUF_ERROR tables to decode that set of codes. Return Z_OK on success, Z_BUF_ERROR
if the given code set is incomplete (the tables are still built in this if the given code set is incomplete (the tables are still built in this
case), Z_DATA_ERROR if the input is invalid (an over-subscribed set of case), or Z_DATA_ERROR if the input is invalid. */
lengths), or Z_MEM_ERROR if not enough memory. */
{ {
uInt a; /* counter for codes of length k */ uInt a; /* counter for codes of length k */
...@@ -231,7 +230,7 @@ uIntf *v; /* working area: values in order of bit length */ ...@@ -231,7 +230,7 @@ uIntf *v; /* working area: values in order of bit length */
/* allocate new table */ /* allocate new table */
if (*hn + z > MANY) /* (note: doesn't matter for fixed) */ if (*hn + z > MANY) /* (note: doesn't matter for fixed) */
return Z_MEM_ERROR; /* not enough memory */ return Z_DATA_ERROR; /* overflow of MANY */
u[h] = q = hp + *hn; u[h] = q = hp + *hn;
*hn += z; *hn += z;
...@@ -291,12 +290,12 @@ uIntf *v; /* working area: values in order of bit length */ ...@@ -291,12 +290,12 @@ uIntf *v; /* working area: values in order of bit length */
} }
int inflate_trees_bits(c, bb, tb, hp, z) int inflate_trees_bits(uIntf *c, uIntf *bb, inflate_huft **tb, inflate_huft *hp, z_streamp z)
uIntf *c; /* 19 code lengths */ /* 19 code lengths */
uIntf *bb; /* bits tree desired/actual depth */ /* bits tree desired/actual depth */
inflate_huft * FAR *tb; /* bits tree result */ /* bits tree result */
inflate_huft *hp; /* space for trees */ /* space for trees */
z_streamp z; /* for messages */ /* for messages */
{ {
int r; int r;
uInt hn = 0; /* hufts used in space */ uInt hn = 0; /* hufts used in space */
...@@ -318,16 +317,16 @@ z_streamp z; /* for messages */ ...@@ -318,16 +317,16 @@ z_streamp z; /* for messages */
} }
int inflate_trees_dynamic(nl, nd, c, bl, bd, tl, td, hp, z) int inflate_trees_dynamic(uInt nl, uInt nd, uIntf *c, uIntf *bl, uIntf *bd, inflate_huft **tl, inflate_huft **td, inflate_huft *hp, z_streamp z)
uInt nl; /* number of literal/length codes */ /* number of literal/length codes */
uInt nd; /* number of distance codes */ /* number of distance codes */
uIntf *c; /* that many (total) code lengths */ /* that many (total) code lengths */
uIntf *bl; /* literal desired/actual bit depth */ /* literal desired/actual bit depth */
uIntf *bd; /* distance desired/actual bit depth */ /* distance desired/actual bit depth */
inflate_huft * FAR *tl; /* literal/length tree result */ /* literal/length tree result */
inflate_huft * FAR *td; /* distance tree result */ /* distance tree result */
inflate_huft *hp; /* space for trees */ /* space for trees */
z_streamp z; /* for messages */ /* for messages */
{ {
int r; int r;
uInt hn = 0; /* hufts used in space */ uInt hn = 0; /* hufts used in space */
...@@ -396,12 +395,12 @@ local inflate_huft *fixed_td; ...@@ -396,12 +395,12 @@ local inflate_huft *fixed_td;
#endif #endif
int inflate_trees_fixed(bl, bd, tl, td, z) int inflate_trees_fixed(uIntf *bl, uIntf *bd, inflate_huft **tl, inflate_huft **td, z_streamp z)
uIntf *bl; /* literal desired/actual bit depth */ /* literal desired/actual bit depth */
uIntf *bd; /* distance desired/actual bit depth */ /* distance desired/actual bit depth */
inflate_huft * FAR *tl; /* literal/length tree result */ /* literal/length tree result */
inflate_huft * FAR *td; /* distance tree result */ /* distance tree result */
z_streamp z; /* for memory allocation */ /* for memory allocation */
{ {
#ifdef BUILDFIXED #ifdef BUILDFIXED
/* build fixed tables if not already */ /* build fixed tables if not already */
......
/* inftrees.h -- header to use inftrees.c /* inftrees.h -- header to use inftrees.c
* Copyright (C) 1995-1998 Mark Adler * Copyright (C) 1995-2002 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h * For conditions of distribution and use, see copyright notice in zlib.h
*/ */
......
/* inflate_util.c -- data and routines common to blocks and codes /* inflate_util.c -- data and routines common to blocks and codes
* Copyright (C) 1995-1998 Mark Adler * Copyright (C) 1995-2002 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h * For conditions of distribution and use, see copyright notice in zlib.h
*/ */
...@@ -20,10 +20,7 @@ uInt inflate_mask[17] = { ...@@ -20,10 +20,7 @@ uInt inflate_mask[17] = {
/* copy as much as possible from the sliding window to the output area */ /* copy as much as possible from the sliding window to the output area */
int inflate_flush(s, z, r) int inflate_flush(inflate_blocks_statef *s, z_streamp z, int r)
inflate_blocks_statef *s;
z_streamp z;
int r;
{ {
uInt n; uInt n;
Bytef *p; Bytef *p;
......
/* infutil.h -- types and macros common to blocks and codes /* infutil.h -- types and macros common to blocks and codes
* Copyright (C) 1995-1998 Mark Adler * Copyright (C) 1995-2002 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h * For conditions of distribution and use, see copyright notice in zlib.h
*/ */
......
This diff is collapsed.
/* uncompr.c -- decompress a memory buffer /* uncompr.c -- decompress a memory buffer
* Copyright (C) 1995-1998 Jean-loup Gailly. * Copyright (C) 1995-2002 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h * For conditions of distribution and use, see copyright notice in zlib.h
*/ */
...@@ -22,11 +22,7 @@ ...@@ -22,11 +22,7 @@
enough memory, Z_BUF_ERROR if there was not enough room in the output enough memory, Z_BUF_ERROR if there was not enough room in the output
buffer, or Z_DATA_ERROR if the input data was corrupted. buffer, or Z_DATA_ERROR if the input data was corrupted.
*/ */
int ZEXPORT uncompress (dest, destLen, source, sourceLen) int ZEXPORT uncompress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen)
Bytef *dest;
uLongf *destLen;
const Bytef *source;
uLong sourceLen;
{ {
z_stream stream; z_stream stream;
int err; int err;
......
/* zconf.h -- configuration of the zlib compression library /* zconf.h -- configuration of the zlib compression library
* Copyright (C) 1995-1998 Jean-loup Gailly. * Copyright (C) 1995-2002 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h * For conditions of distribution and use, see copyright notice in zlib.h
*/ */
......
/* zlib.h -- interface of the 'zlib' general purpose compression library /* zlib.h -- interface of the 'zlib' general purpose compression library
version 1.1.3, July 9th, 1998 version 1.1.4, March 11th, 2002
Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
extern "C" { extern "C" {
#endif #endif
#define ZLIB_VERSION "1.1.3" #define ZLIB_VERSION "1.1.4"
/* /*
The 'zlib' compression library provides in-memory compression and The 'zlib' compression library provides in-memory compression and
......
/* zutil.c -- target dependent utility functions for the compression library /* zutil.c -- target dependent utility functions for the compression library
* Copyright (C) 1995-1998 Jean-loup Gailly. * Copyright (C) 1995-2002 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h * For conditions of distribution and use, see copyright notice in zlib.h
*/ */
...@@ -26,7 +26,7 @@ const char *z_errmsg[10] = { ...@@ -26,7 +26,7 @@ const char *z_errmsg[10] = {
""}; ""};
const char * ZEXPORT zlibVersion() const char * ZEXPORT zlibVersion(void)
{ {
return ZLIB_VERSION; return ZLIB_VERSION;
} }
...@@ -38,8 +38,7 @@ const char * ZEXPORT zlibVersion() ...@@ -38,8 +38,7 @@ const char * ZEXPORT zlibVersion()
# endif # endif
int z_verbose = verbose; int z_verbose = verbose;
void z_error (m) void z_error (char *m)
char *m;
{ {
fprintf(stderr, "%s\n", m); fprintf(stderr, "%s\n", m);
exit(1); exit(1);
...@@ -49,8 +48,7 @@ void z_error (m) ...@@ -49,8 +48,7 @@ void z_error (m)
/* exported to allow conversion of error code to string for compress() and /* exported to allow conversion of error code to string for compress() and
* uncompress() * uncompress()
*/ */
const char * ZEXPORT zError(err) const char * ZEXPORT zError(int err)
int err;
{ {
return ERR_MSG(err); return ERR_MSG(err);
} }
...@@ -58,10 +56,7 @@ const char * ZEXPORT zError(err) ...@@ -58,10 +56,7 @@ const char * ZEXPORT zError(err)
#ifndef HAVE_MEMCPY #ifndef HAVE_MEMCPY
void zmemcpy(dest, source, len) void zmemcpy(Bytef *dest, const Bytef *source, uint len)
Bytef* dest;
const Bytef* source;
uInt len;
{ {
if (len == 0) return; if (len == 0) return;
do { do {
...@@ -69,10 +64,7 @@ void zmemcpy(dest, source, len) ...@@ -69,10 +64,7 @@ void zmemcpy(dest, source, len)
} while (--len != 0); } while (--len != 0);
} }
int zmemcmp(s1, s2, len) int zmemcmp(const Bytef *s1, const Bytef *s2, uint len)
const Bytef* s1;
const Bytef* s2;
uInt len;
{ {
uInt j; uInt j;
...@@ -82,9 +74,7 @@ int zmemcmp(s1, s2, len) ...@@ -82,9 +74,7 @@ int zmemcmp(s1, s2, len)
return 0; return 0;
} }
void zmemzero(dest, len) void zmemzero(Bytef *dest, uInt len)
Bytef* dest;
uInt len;
{ {
if (len == 0) return; if (len == 0) return;
do { do {
...@@ -205,18 +195,13 @@ extern voidp calloc OF((uInt items, uInt size)); ...@@ -205,18 +195,13 @@ extern voidp calloc OF((uInt items, uInt size));
extern void free OF((voidpf ptr)); extern void free OF((voidpf ptr));
#endif #endif
voidpf zcalloc (opaque, items, size) voidpf zcalloc (voidpf opaque, unsigned int items, unsigned int size)
voidpf opaque;
unsigned items;
unsigned size;
{ {
if (opaque) items += size - size; /* make compiler happy */ if (opaque) items += size - size; /* make compiler happy */
return (voidpf)calloc(items, size); return (voidpf)calloc(items, size);
} }
void zcfree (opaque, ptr) void zcfree (voidpf opaque, voidpf ptr)
voidpf opaque;
voidpf ptr;
{ {
free(ptr); free(ptr);
if (opaque) return; /* make compiler happy */ if (opaque) return; /* make compiler happy */
......
/* zutil.h -- internal interface and configuration of the compression library /* zutil.h -- internal interface and configuration of the compression library
* Copyright (C) 1995-1998 Jean-loup Gailly. * Copyright (C) 1995-2002 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h * For conditions of distribution and use, see copyright notice in zlib.h
*/ */
......
Summary: A documentation system for C/C++. Summary: A documentation system for C/C++.
Name: doxygen Name: doxygen
Version: 1.2.15 Version: 1.2.15_20020407
Release: 1 Release: 1
Epoch: 1 Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
......
...@@ -957,7 +957,7 @@ FILE ({FILESCHAR}*{FILEECHAR}+("."{FILESCHAR}*{FILEECHAR}+)*)|("\""[^\n\"]+ ...@@ -957,7 +957,7 @@ FILE ({FILESCHAR}*{FILEECHAR}+("."{FILESCHAR}*{FILEECHAR}+)*)|("\""[^\n\"]+
ID [a-z_A-Z][a-z_A-Z0-9]* ID [a-z_A-Z][a-z_A-Z0-9]*
SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID}) SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
SCOPEMASK {ID}?(("::"|"#")?(~)?{ID})+ SCOPEMASK {ID}?(("::"|"#")?(~)?{ID})+
URLCHAR [a-z_A-Z0-9\~\:\?\@\&\%\#\.\-\+\/\=] URLCHAR [a-z_A-Z0-9\!\~\:\;\'\$\?\@\&\%\#\.\-\+\/\=\(\)]
URLMASK ([a-z_A-Z][^\>\"\n]*{URLCHAR})|({URLCHAR}+) URLMASK ([a-z_A-Z][^\>\"\n]*{URLCHAR})|({URLCHAR}+)
NONTERM [\{\}\[\]\`\~\@\|\-\+\#\$\/\\\!\%\^\&\*()a-z_A-Z<>0-9\x80-\xff] NONTERM [\{\}\[\]\`\~\@\|\-\+\#\$\/\\\!\%\^\&\*()a-z_A-Z<>0-9\x80-\xff]
WORD ({NONTERM}+([^\n\t ]*{NONTERM}+)?)|("\""[^\n\"]*"\"") WORD ({NONTERM}+([^\n\t ]*{NONTERM}+)?)|("\""[^\n\"]*"\"")
......
...@@ -2213,6 +2213,28 @@ static void transferFunctionDocumentation() ...@@ -2213,6 +2213,28 @@ static void transferFunctionDocumentation()
} }
mdec->mergeMemberSpecifiers(mdef->getMemberSpecifiers()); mdec->mergeMemberSpecifiers(mdef->getMemberSpecifiers());
mdef->mergeMemberSpecifiers(mdec->getMemberSpecifiers()); mdef->mergeMemberSpecifiers(mdec->getMemberSpecifiers());
ArgumentList *decAl = mdec->argumentList();
ArgumentList *defAl = mdef->argumentList();
if (decAl && defAl)
{
ArgumentListIterator decAli(*decAl);
ArgumentListIterator defAli(*defAl);
Argument *decA,*defA;
for (decAli.toFirst(),defAli.toFirst();
(decA=decAli.current()) && (defA=defAli.current());
++decAli,++defAli)
{
if (decA->docs.isEmpty() && !defA->docs.isEmpty())
{
decA->docs = defA->docs.copy();
}
else if (!defA->docs.isEmpty() && defA->docs.isEmpty())
{
defA->docs = decA->docs.copy();
}
}
}
// copy group info. // copy group info.
//if (mdec->getGroupDef()==0 && mdef->getGroupDef()!=0) //if (mdec->getGroupDef()==0 && mdef->getGroupDef()!=0)
...@@ -2686,6 +2708,18 @@ static bool findTemplateInstanceRelation(Entry *root, ...@@ -2686,6 +2708,18 @@ static bool findTemplateInstanceRelation(Entry *root,
return TRUE; return TRUE;
} }
static bool isRecursiveBaseClass(const QCString &scope,const QCString &name)
{
QCString n=name;
int index=n.find('<');
if (index!=-1)
{
n=n.left(index);
}
bool result = rightScopeMatch(scope,n);
return result;
}
static bool findClassRelation( static bool findClassRelation(
Entry *root, Entry *root,
ClassDef *cd, ClassDef *cd,
...@@ -2732,16 +2766,18 @@ static bool findClassRelation( ...@@ -2732,16 +2766,18 @@ static bool findClassRelation(
QCString templSpec; QCString templSpec;
ClassDef *baseClass=getResolvedClass(cd,baseClassName,&baseClassIsTypeDef,&templSpec); ClassDef *baseClass=getResolvedClass(cd,baseClassName,&baseClassIsTypeDef,&templSpec);
//printf("baseClassName=%s baseClass=%p cd=%p\n",baseClassName.data(),baseClass,cd); //printf("baseClassName=%s baseClass=%p cd=%p\n",baseClassName.data(),baseClass,cd);
//printf(" baseClassName=`%s' baseClass=%s templSpec=%s\n", //printf(" root->name=`%s' baseClassName=`%s' baseClass=%s templSpec=%s\n",
// root->name.data(),
// baseClassName.data(), // baseClassName.data(),
// baseClass?baseClass->name().data():"<none>", // baseClass?baseClass->name().data():"<none>",
// templSpec.data() // templSpec.data()
// ); // );
if (baseClassName.left(root->name.length())!=root->name || //if (baseClassName.left(root->name.length())!=root->name ||
baseClassName.at(root->name.length())!='<' // baseClassName.at(root->name.length())!='<'
) // Check for base class with the same name. // ) // Check for base class with the same name.
// If found then look in the outer scope for a match // // If found then look in the outer scope for a match
// and prevent recursion. // // and prevent recursion.
if (!isRecursiveBaseClass(root->name,baseClassName))
{ {
Debug::print( Debug::print(
Debug::Classes,0," class relation %s inherited by %s found (%s and %s)\n", Debug::Classes,0," class relation %s inherited by %s found (%s and %s)\n",
......
...@@ -89,6 +89,7 @@ void FileDef::computeAnchors() ...@@ -89,6 +89,7 @@ void FileDef::computeAnchors()
void FileDef::distributeMemberGroupDocumentation() void FileDef::distributeMemberGroupDocumentation()
{ {
//printf("FileDef::distributeMemberGroupDocumentation()\n");
MemberGroupSDict::Iterator mgli(*memberGroupSDict); MemberGroupSDict::Iterator mgli(*memberGroupSDict);
MemberGroup *mg; MemberGroup *mg;
for (;(mg=mgli.current());++mgli) for (;(mg=mgli.current());++mgli)
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include <png.h> #include <png.h>
#include <stdio.h> #include <stdio.h>
#include <malloc.h> #include <stdlib.h>
#include "pngenc.h" #include "pngenc.h"
#include "message.h" #include "message.h"
......
...@@ -586,6 +586,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -586,6 +586,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
%x NSAliasArg %x NSAliasArg
%x PackageName %x PackageName
%x GetCallType %x GetCallType
%x JavaImport
%% %%
...@@ -992,6 +993,29 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -992,6 +993,29 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<NSAliasArg>";" { <NSAliasArg>";" {
BEGIN( FindMembers ); BEGIN( FindMembers );
} }
<JavaImport>({ID}{BN}*"."{BN}*)+"*" { // package import => add as a using directive
lineCount();
QCString scope=yytext;
current->name=removeRedundantWhiteSpace(substitute(scope.left(scope.length()-2),".","::"));
current->fileName = yyFileName;
current->section=Entry::USINGDIR_SEC;
current_root->addSubEntry(current);
current = new Entry ;
initEntry();
BEGIN(Using);
}
<JavaImport>({ID}{BN}*"."{BN}*)+{ID} { // class import => add as a using declaration
lineCount();
QCString scope=yytext;
current->name=removeRedundantWhiteSpace(substitute(scope,".","::"));
printf("import name = %s -> %s\n",yytext,current->name.data());
current->fileName = yyFileName;
current->section=Entry::USINGDECL_SEC;
current_root->addSubEntry(current);
current = new Entry ;
initEntry();
BEGIN(Using);
}
<FindMembers>"using"{BN}+ { <FindMembers>"using"{BN}+ {
current->startLine=yyLineNr; current->startLine=yyLineNr;
lineCount(); lineCount();
...@@ -999,6 +1023,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -999,6 +1023,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
} }
<Using>"namespace"{BN}+ { lineCount(); BEGIN(UsingDirective); } <Using>"namespace"{BN}+ { lineCount(); BEGIN(UsingDirective); }
<Using>{ID}{BN}*"::"{BN}*{ID}({BN}*"::"{BN}*{ID})* { <Using>{ID}{BN}*"::"{BN}*{ID}({BN}*"::"{BN}*{ID})* {
lineCount();
current->name=yytext; current->name=yytext;
current->fileName = yyFileName; current->fileName = yyFileName;
current->section=Entry::USINGDECL_SEC; current->section=Entry::USINGDECL_SEC;
...@@ -1109,7 +1134,10 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -1109,7 +1134,10 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
} }
else if ((insideIDL || insideJava) && yyleng==6 && strcmp(yytext,"import")==0) else if ((insideIDL || insideJava) && yyleng==6 && strcmp(yytext,"import")==0)
{ {
BEGIN(NextSemi); if (insideIDL)
BEGIN(NextSemi);
else // insideJava
BEGIN(JavaImport);
} }
else if (insideIDL && strcmp(yytext,"case")==0) else if (insideIDL && strcmp(yytext,"case")==0)
{ {
...@@ -2108,7 +2136,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -2108,7 +2136,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
} }
} }
<CopyArgComment>^{B}*"*"+/{BN}+ <CopyArgComment>^{B}*"*"+/{BN}+
<CopyArgComment>[^\n\*]+ { fullArgString+=yytext; } <CopyArgComment>[^\n\\\@\*]+ { fullArgString+=yytext; }
<CopyArgComment>"*/" { fullArgString+=yytext; <CopyArgComment>"*/" { fullArgString+=yytext;
if (lastCopyArgChar!=0) if (lastCopyArgChar!=0)
unput(lastCopyArgChar); unput(lastCopyArgChar);
...@@ -2120,7 +2148,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -2120,7 +2148,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
unput(lastCopyArgChar); unput(lastCopyArgChar);
BEGIN( ReadFuncArgType ); BEGIN( ReadFuncArgType );
} }
<CopyArgCommentLine>[^\n]+ { fullArgString+=yytext; } <CopyArgCommentLine>[^\\\@\n]+ { fullArgString+=yytext; }
<CopyArgComment>\n { fullArgString+=*yytext; yyLineNr++; } <CopyArgComment>\n { fullArgString+=*yytext; yyLineNr++; }
<CopyArgComment>. { fullArgString+=*yytext; } <CopyArgComment>. { fullArgString+=*yytext; }
<ReadTempArgs>"<" { <ReadTempArgs>"<" {
...@@ -4092,7 +4120,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -4092,7 +4120,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<Doc,ClassDoc,PageDoc,ExampleDoc,AfterDoc>"\\"[a-z_A-Z][a-z_A-Z0-9]*[\\] { // directory type of text <Doc,ClassDoc,PageDoc,ExampleDoc,AfterDoc>"\\"[a-z_A-Z][a-z_A-Z0-9]*[\\] { // directory type of text
current->doc+=yytext; current->doc+=yytext;
} }
<Doc,ClassDoc,PageDoc,ExampleDoc,AfterDoc>{CMD}[a-z_A-Z][a-z_A-Z0-9]* { <Doc,ClassDoc,PageDoc,ExampleDoc,AfterDoc,CopyArgComment>{CMD}[a-z_A-Z][a-z_A-Z0-9]* {
QCString *pValue=Doxygen::aliasDict[yytext+1]; QCString *pValue=Doxygen::aliasDict[yytext+1];
if (pValue) if (pValue)
{ {
...@@ -4104,13 +4132,16 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -4104,13 +4132,16 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
} }
else else
{ {
current->doc+=yytext; if (YY_START==CopyArgComment)
fullArgString+=yytext;
else
current->doc+=yytext;
} }
} }
<JavaDoc,LineDoc,ClassDocBrief,AfterDocBrief,AfterDocLine>"\\"[a-z_A-Z][a-z_A-Z0-9]*[\\] { // directory type of text <JavaDoc,LineDoc,ClassDocBrief,AfterDocBrief,AfterDocLine>"\\"[a-z_A-Z][a-z_A-Z0-9]*[\\] { // directory type of text
current->brief+=yytext; current->brief+=yytext;
} }
<JavaDoc,LineDoc,ClassDocBrief,AfterDocBrief,AfterDocLine>{CMD}[a-z_A-Z][a-z_A-Z0-9]* { <JavaDoc,LineDoc,ClassDocBrief,AfterDocBrief,AfterDocLine,CopyArgCommentLine>{CMD}[a-z_A-Z][a-z_A-Z0-9]* {
QCString *pValue=Doxygen::aliasDict[yytext+1]; QCString *pValue=Doxygen::aliasDict[yytext+1];
if (pValue) if (pValue)
{ {
...@@ -4122,7 +4153,10 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -4122,7 +4153,10 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
} }
else else
{ {
current->brief+=yytext; if (YY_START==CopyArgCommentLine)
fullArgString+=yytext;
else
current->brief+=yytext;
} }
} }
<DefLineDoc,LineDoc,ClassDoc,PageDoc,ExampleDoc,Doc>"/*"|"//" { current->doc += yytext; } <DefLineDoc,LineDoc,ClassDoc,PageDoc,ExampleDoc,Doc>"/*"|"//" { current->doc += yytext; }
......
...@@ -3137,11 +3137,41 @@ const char *getOverloadDocs() ...@@ -3137,11 +3137,41 @@ const char *getOverloadDocs()
void addMembersToMemberGroup(MemberList *ml, void addMembersToMemberGroup(MemberList *ml,
MemberGroupSDict *memberGroupSDict,Definition *context) MemberGroupSDict *memberGroupSDict,Definition *context)
{ {
//printf("addMemberToMemberGroup()\n");
MemberListIterator mli(*ml); MemberListIterator mli(*ml);
MemberDef *md; MemberDef *md;
uint index; uint index;
for (index=0;(md=mli.current());) for (index=0;(md=mli.current());)
{ {
if (md->isEnumerate()) // insert enum value of this enum into groups
{
QList<MemberDef> *fmdl=md->enumFieldList();
if (fmdl)
{
MemberDef *fmd=fmdl->first();
while (fmd)
{
int groupId=fmd->getMemberGroupId();
if (groupId!=-1)
{
QCString *pGrpHeader = Doxygen::memberHeaderDict[groupId];
QCString *pDocs = Doxygen::memberDocDict[groupId];
if (pGrpHeader)
{
MemberGroup *mg = memberGroupSDict->find(groupId);
if (mg==0)
{
mg = new MemberGroup(groupId,*pGrpHeader,pDocs ? pDocs->data() : 0);
memberGroupSDict->append(groupId,mg);
}
mg->insertMember(context,fmd); // insert in member group
fmd->setMemberGroup(mg);
}
}
fmd=fmdl->next();
}
}
}
int groupId=md->getMemberGroupId(); int groupId=md->getMemberGroupId();
if (groupId!=-1) if (groupId!=-1)
{ {
...@@ -3156,23 +3186,6 @@ void addMembersToMemberGroup(MemberList *ml, ...@@ -3156,23 +3186,6 @@ void addMembersToMemberGroup(MemberList *ml,
memberGroupSDict->append(groupId,mg); memberGroupSDict->append(groupId,mg);
} }
md = ml->take(index); // remove from member list md = ml->take(index); // remove from member list
//if (allMembers) // remove from all member list as well
//{
// MemberNameInfo *mni = allMembers->find(md->name());
// if (mni)
// {
// QListIterator<MemberInfo> mii(*mni);
// MemberInfo *mi;
// for (;(mi=mii.current());++mii)
// {
// if (mi->memberDef==md)
// {
// mni->remove(mi);
// break;
// }
// }
// }
//}
mg->insertMember(context,md); // insert in member group mg->insertMember(context,md); // insert in member group
md->setMemberGroup(mg); md->setMemberGroup(mg);
continue; continue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment