mark local constant stuff as const, so that it's pushed to text segment
This commit is contained in:
parent
384bb56925
commit
03cec6311e
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: zlib.c,v 1.10 2000/03/30 09:45:41 augustss Exp $ */
|
||||
/* $NetBSD: zlib.c,v 1.11 2001/01/17 18:52:41 jdolecek Exp $ */
|
||||
/*
|
||||
* This file is derived from various .h and .c files from the zlib-1.0.4
|
||||
* distribution by Jean-loup Gailly and Mark Adler, with some additions
|
||||
@ -11,7 +11,7 @@
|
||||
* - added inflateIncomp and deflateOutputPending
|
||||
* - allow strm->next_out to be NULL, meaning discard the output
|
||||
*
|
||||
* $Id: zlib.c,v 1.10 2000/03/30 09:45:41 augustss Exp $
|
||||
* $Id: zlib.c,v 1.11 2001/01/17 18:52:41 jdolecek Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -90,7 +90,7 @@ typedef unsigned short ush;
|
||||
typedef ush FAR ushf;
|
||||
typedef unsigned long ulg;
|
||||
|
||||
extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */
|
||||
extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
|
||||
/* (size given to avoid silly warnings with Visual C++) */
|
||||
|
||||
#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]
|
||||
@ -591,7 +591,7 @@ void _tr_stored_type_only OF((deflate_state *));
|
||||
|
||||
/* #include "deflate.h" */
|
||||
|
||||
char deflate_copyright[] = " deflate 1.0.4 Copyright 1995-1996 Jean-loup Gailly ";
|
||||
const char deflate_copyright[] = " deflate 1.0.4 Copyright 1995-1996 Jean-loup Gailly ";
|
||||
/*
|
||||
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
|
||||
@ -662,7 +662,7 @@ typedef struct config_s {
|
||||
compress_func func;
|
||||
} config;
|
||||
|
||||
local config configuration_table[10] = {
|
||||
const local config configuration_table[10] = {
|
||||
/* good lazy nice chain */
|
||||
/* 0 */ {0, 0, 0, 0, deflate_stored}, /* store only */
|
||||
/* 1 */ {4, 4, 8, 4, deflate_fast}, /* maximum speed, no lazy matches */
|
||||
@ -5128,7 +5128,7 @@ struct internal_state {int dummy;}; /* for buggy compilers */
|
||||
extern void exit OF((int));
|
||||
#endif
|
||||
|
||||
const char *z_errmsg[10] = {
|
||||
const char * const z_errmsg[10] = {
|
||||
"need dictionary", /* Z_NEED_DICT 2 */
|
||||
"stream end", /* Z_STREAM_END 1 */
|
||||
"", /* Z_OK 0 */
|
||||
|
Loading…
Reference in New Issue
Block a user