From cfaedfa9c8882da08d917a1e18db652bc45cc830 Mon Sep 17 00:00:00 2001 From: Martin Nilsson <mani@lysator.liu.se> Date: Mon, 27 Sep 2004 23:45:35 +0200 Subject: [PATCH] Clenup. More const. Rev: src/modules/_Charset/charsetmod.c:1.47 Rev: src/modules/_Charset/iso2022.h:1.8 Rev: src/modules/_Charset/tables.c:1.22 --- src/modules/_Charset/charsetmod.c | 8 +------- src/modules/_Charset/iso2022.h | 12 +++++++++--- src/modules/_Charset/tables.c | 7 +------ 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/src/modules/_Charset/charsetmod.c b/src/modules/_Charset/charsetmod.c index 49c263d08f..778439142b 100644 --- a/src/modules/_Charset/charsetmod.c +++ b/src/modules/_Charset/charsetmod.c @@ -2,7 +2,7 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: charsetmod.c,v 1.46 2004/09/18 21:34:44 nilsson Exp $ +|| $Id: charsetmod.c,v 1.47 2004/09/27 21:45:35 nilsson Exp $ */ #ifdef HAVE_CONFIG_H @@ -31,12 +31,6 @@ p_wchar1 *misc_charset_lookup(const char *name, int *rlo, int *rhi); -struct multichar_table { - const unsigned int lo; - const unsigned int hi; - UNICHAR const *table; -}; - extern const struct multichar_table GBK[]; extern const struct multichar_table cp949[]; diff --git a/src/modules/_Charset/iso2022.h b/src/modules/_Charset/iso2022.h index a869e99029..419a4a68e7 100644 --- a/src/modules/_Charset/iso2022.h +++ b/src/modules/_Charset/iso2022.h @@ -2,7 +2,7 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: iso2022.h,v 1.7 2004/07/24 22:55:32 nilsson Exp $ +|| $Id: iso2022.h,v 1.8 2004/09/27 21:45:35 nilsson Exp $ */ #include "global.h" @@ -28,7 +28,13 @@ typedef p_wchar1 UNICHAR; #define VARIANT_JP2 4 struct charset_def { - char const *name; - UNICHAR const *table; + const char *const name; + const UNICHAR *const table; const int mode; }; + +struct multichar_table { + const unsigned int lo; + const unsigned int hi; + const UNICHAR *const table; +}; diff --git a/src/modules/_Charset/tables.c b/src/modules/_Charset/tables.c index e290f9337f..76e75a0c22 100644 --- a/src/modules/_Charset/tables.c +++ b/src/modules/_Charset/tables.c @@ -2,7 +2,7 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: tables.c,v 1.21 2004/09/18 21:35:23 nilsson Exp $ +|| $Id: tables.c,v 1.22 2004/09/27 21:45:35 nilsson Exp $ */ #include "iso2022.h" @@ -13802,11 +13802,6 @@ static const UNICHAR map_GBK_FE[] = { 0xfa0c, 0xfa0d, 0xfa0e, 0xfa0f, 0xfa11, 0xfa13, 0xfa14, 0xfa18, 0xfa1f, 0xfa20, 0xfa21, 0xfa23, 0xfa24, 0xfa27, 0xfa28, 0xfa29, }; -struct multichar_table { - const unsigned int lo; - const unsigned int hi; - UNICHAR const *table; -}; const struct multichar_table GBK[] = { { 64, sizeof(map_GBK_81)/sizeof(UNICHAR)+63, map_GBK_81 }, { 64, sizeof(map_GBK_82)/sizeof(UNICHAR)+63, map_GBK_82 }, -- GitLab