summaryrefslogtreecommitdiff
path: root/hwpfilter
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2012-03-10 14:24:40 +0100
committerLuboš Luňák <l.lunak@suse.cz>2012-03-10 16:39:22 +0100
commit80e4b4e5c6cdb33dbd7aff62a71a5112ead214e2 (patch)
tree797fefbfa20ee7b8a7156efbbe84ee9653864021 /hwpfilter
parent1ed8aae1050a0900998726e0484a032c097b6a60 (diff)
mark static data that is const as const
Diffstat (limited to 'hwpfilter')
-rw-r--r--hwpfilter/source/datecode.h14
-rw-r--r--hwpfilter/source/hbox.cxx19
-rw-r--r--hwpfilter/source/hwpreader.cxx2
3 files changed, 18 insertions, 17 deletions
diff --git a/hwpfilter/source/datecode.h b/hwpfilter/source/datecode.h
index 8d49e659b6d6..3bc13ddae264 100644
--- a/hwpfilter/source/datecode.h
+++ b/hwpfilter/source/datecode.h
@@ -29,27 +29,27 @@
#ifndef __DATECODE_H__
#define __DATACODE_H__
-static hchar defaultform[] =
+static const hchar defaultform[] =
{
'1', 0x9165, 32, '2', 0xB6A9, 32, '3', 0xB7A9, 0
};
#ifdef _DATECODE_WEEK_DEFINES_
-static hchar kor_week[] =
+static const hchar kor_week[] =
{
0xB7A9, 0xB6A9, 0xD1C1, 0xAE81, 0xA1A2, 0x8B71, 0xC9A1
};
-static hchar china_week[] =
+static const hchar china_week[] =
{
0x4CC8, 0x4BE4, 0x525A, 0x48D8, 0x45AB, 0x4270, 0x50B4
};
-static char eng_week[] = { "SunMonTueWedThuFriSat" };
-static char eng_mon[] = { "JanFebMarAprMayJunJulAugSepOctNovDec" };
-static const char *en_mon[] =
+static const char eng_week[] = { "SunMonTueWedThuFriSat" };
+static const char eng_mon[] = { "JanFebMarAprMayJunJulAugSepOctNovDec" };
+static const char * const en_mon[] =
{
"January", "February", "March", "April", "May", "June", "July",
"August", "September", "October", "November", "December"
};
-static const char *en_week[] =
+static const char * const en_week[] =
{
"Sunday", "Monday", "Tuesday", "Wednesday",
"Thursday", "Friday", "Saturday"
diff --git a/hwpfilter/source/hbox.cxx b/hwpfilter/source/hbox.cxx
index df334ac94bad..8d6210bd946f 100644
--- a/hwpfilter/source/hbox.cxx
+++ b/hwpfilter/source/hbox.cxx
@@ -57,7 +57,7 @@ HBox::~HBox()
int HBox::WSize(void)
{
- static int wsize[32] =
+ static const int wsize[32] =
{
1, 4, 4, 4, 4, 4, 4, 42, /* dateform */
48, 4, 4, 4, 4, 1, 4, 4, /* hidden */
@@ -154,7 +154,8 @@ DateCode::DateCode(void):HBox(CH_DATE_CODE)
int DateCode::GetString(hchar * hstr, int slen)
{
- hchar *fmt, *d;
+ const hchar *fmt;
+ hchar *d;
int i, num;
const char *form;
char cbuf[256];
@@ -458,10 +459,10 @@ int MailMerge::GetString(hchar * hstr, int )
static hchar olHanglJaso(int num, int type)
{
- static unsigned char han_init[] =
+ static const unsigned char han_init[] =
{ "\x88\x90\x94\x9c\xa0\xa4\xac\xb4\xb8\xc0\xc4\xc8\xcc\xd0" };
- static unsigned char jung[] = { 3, 5, 7, 11, 13, 19, 20, 26, 27, 29, 30 };
- static unsigned char jung2[] = { 3, 7, 13, 20, 27, 29, 30 };
+ static const unsigned char jung[] = { 3, 5, 7, 11, 13, 19, 20, 26, 27, 29, 30 };
+ static const unsigned char jung2[] = { 3, 7, 13, 20, 27, 29, 30 };
hchar hh = 0;
@@ -490,9 +491,9 @@ static hchar olHanglJaso(int num, int type)
}
-static hchar *GetOutlineStyleChars(int style)
+static const hchar *GetOutlineStyleChars(int style)
{
- static hchar out_bul_style_entry[5][8] = // extern
+ static const hchar out_bul_style_entry[5][8] = // extern
{
{ // 0 OLSTY_BULLET1
0x2f18, 0x2f12, 0x2f08, 0x2f02, 0x2f06, 0x2f00, 0x2043, 0x0000
@@ -523,7 +524,7 @@ static void getOutlineNumStr(int style, int level, int num, hchar * hstr)
U_ROM = 0x01, L_ROM = 0x02, U_ENG = 0x04, L_ENG = 0x08,
HAN = 0x10, NUM = 0x20, L_BR = 0x40, R_BR = 0x80
};
- static unsigned char type_tbl[][MAX_OUTLINE_LEVEL] =
+ static const unsigned char type_tbl[][MAX_OUTLINE_LEVEL] =
{
{
U_ROM, HAN, NUM, HAN | R_BR, L_BR | NUM | R_BR,
@@ -590,7 +591,7 @@ enum
*/
hchar *Outline::GetUnicode(hchar * hstr, int)
{
- hchar *p;
+ const hchar *p;
hchar buffer[255];
buffer[0] = 0;
diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx
index 4d4732523a26..f254d95257dc 100644
--- a/hwpfilter/source/hwpreader.cxx
+++ b/hwpfilter/source/hwpreader.cxx
@@ -3311,7 +3311,7 @@ void HwpReader::makeDateFormat(DateCode * hbox)
int zero_check = 0;
hbox->format[DATE_SIZE -1] = 0;
- hchar *fmt = hbox->format[0] ? hbox->format : defaultform;
+ const hchar *fmt = hbox->format[0] ? hbox->format : defaultform;
for( ; *fmt ; fmt++ )
{