Skip to content

Commit 0658a6a

Browse files
committed
Formatting cleanup.
1 parent 804f6b8 commit 0658a6a

File tree

1 file changed

+42
-41
lines changed

1 file changed

+42
-41
lines changed

src/backend/utils/mb/wchar.c

Lines changed: 42 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* conversion functions between pg_wchar and multibyte streams.
33
* Tatsuo Ishii
4-
* $PostgreSQL: pgsql/src/backend/utils/mb/wchar.c,v 1.48 2005/12/24 09:35:36 ishii Exp $
4+
* $PostgreSQL: pgsql/src/backend/utils/mb/wchar.c,v 1.49 2005/12/24 16:49:48 momjian Exp $
55
*
66
* WIN1250 client encoding updated by Pavel Behal
77
*
@@ -28,7 +28,8 @@
2828
/*
2929
* SQL/ASCII
3030
*/
31-
static int pg_ascii2wchar_with_len
31+
static int
32+
pg_ascii2wchar_with_len
3233
(const unsigned char *from, pg_wchar *to, int len)
3334
{
3435
int cnt = 0;
@@ -40,19 +41,19 @@ static int pg_ascii2wchar_with_len
4041
cnt++;
4142
}
4243
*to = 0;
43-
return (cnt);
44+
return cnt;
4445
}
4546

4647
static int
4748
pg_ascii_mblen(const unsigned char *s)
4849
{
49-
return (1);
50+
return 1;
5051
}
5152

5253
static int
5354
pg_ascii_dsplen(const unsigned char *s)
5455
{
55-
return (1);
56+
return 1;
5657
}
5758

5859
/*
@@ -93,7 +94,7 @@ static int pg_euc2wchar_with_len
9394
cnt++;
9495
}
9596
*to = 0;
96-
return (cnt);
97+
return cnt;
9798
}
9899

99100
static int
@@ -109,7 +110,7 @@ pg_euc_mblen(const unsigned char *s)
109110
len = 2;
110111
else
111112
len = 1;
112-
return (len);
113+
return len;
113114
}
114115

115116
static int
@@ -125,7 +126,7 @@ pg_euc_dsplen(const unsigned char *s)
125126
len = 2;
126127
else
127128
len = 1;
128-
return (len);
129+
return len;
129130
}
130131

131132
/*
@@ -134,13 +135,13 @@ pg_euc_dsplen(const unsigned char *s)
134135
static int pg_eucjp2wchar_with_len
135136
(const unsigned char *from, pg_wchar *to, int len)
136137
{
137-
return (pg_euc2wchar_with_len(from, to, len));
138+
return pg_euc2wchar_with_len(from, to, len);
138139
}
139140

140141
static int
141142
pg_eucjp_mblen(const unsigned char *s)
142143
{
143-
return (pg_euc_mblen(s));
144+
return pg_euc_mblen(s);
144145
}
145146

146147
static int
@@ -156,7 +157,7 @@ pg_eucjp_dsplen(const unsigned char *s)
156157
len = 2;
157158
else
158159
len = 1;
159-
return (len);
160+
return len;
160161
}
161162

162163
/*
@@ -165,19 +166,19 @@ pg_eucjp_dsplen(const unsigned char *s)
165166
static int pg_euckr2wchar_with_len
166167
(const unsigned char *from, pg_wchar *to, int len)
167168
{
168-
return (pg_euc2wchar_with_len(from, to, len));
169+
return pg_euc2wchar_with_len(from, to, len);
169170
}
170171

171172
static int
172173
pg_euckr_mblen(const unsigned char *s)
173174
{
174-
return (pg_euc_mblen(s));
175+
return pg_euc_mblen(s);
175176
}
176177

177178
static int
178179
pg_euckr_dsplen(const unsigned char *s)
179180
{
180-
return (pg_euc_dsplen(s));
181+
return pg_euc_dsplen(s);
181182
}
182183

183184
/*
@@ -220,7 +221,7 @@ static int pg_euccn2wchar_with_len
220221
cnt++;
221222
}
222223
*to = 0;
223-
return (cnt);
224+
return cnt;
224225
}
225226

226227
static int
@@ -232,7 +233,7 @@ pg_euccn_mblen(const unsigned char *s)
232233
len = 2;
233234
else
234235
len = 1;
235-
return (len);
236+
return len;
236237
}
237238

238239
static int
@@ -244,7 +245,7 @@ pg_euccn_dsplen(const unsigned char *s)
244245
len = 2;
245246
else
246247
len = 1;
247-
return (len);
248+
return len;
248249
}
249250

250251
/*
@@ -288,7 +289,7 @@ static int pg_euctw2wchar_with_len
288289
cnt++;
289290
}
290291
*to = 0;
291-
return (cnt);
292+
return cnt;
292293
}
293294

294295
static int
@@ -304,7 +305,7 @@ pg_euctw_mblen(const unsigned char *s)
304305
len = 2;
305306
else
306307
len = 1;
307-
return (len);
308+
return len;
308309
}
309310

310311
static int
@@ -320,7 +321,7 @@ pg_euctw_dsplen(const unsigned char *s)
320321
len = 2;
321322
else
322323
len = 1;
323-
return (len);
324+
return len;
324325
}
325326

326327
/*
@@ -329,19 +330,19 @@ pg_euctw_dsplen(const unsigned char *s)
329330
static int
330331
pg_johab2wchar_with_len(const unsigned char *from, pg_wchar *to, int len)
331332
{
332-
return (pg_euc2wchar_with_len(from, to, len));
333+
return pg_euc2wchar_with_len(from, to, len);
333334
}
334335

335336
static int
336337
pg_johab_mblen(const unsigned char *s)
337338
{
338-
return (pg_euc_mblen(s));
339+
return pg_euc_mblen(s);
339340
}
340341

341342
static int
342343
pg_johab_dsplen(const unsigned char *s)
343344
{
344-
return (pg_euc_dsplen(s));
345+
return pg_euc_dsplen(s);
345346
}
346347

347348
/*
@@ -392,7 +393,7 @@ pg_utf2wchar_with_len(const unsigned char *from, pg_wchar *to, int len)
392393
cnt++;
393394
}
394395
*to = 0;
395-
return (cnt);
396+
return cnt;
396397
}
397398

398399
/*
@@ -415,7 +416,7 @@ pg_utf_mblen(const unsigned char *s)
415416
len = 5;
416417
else if ((*s & 0xfe) == 0xfc)
417418
len = 6;
418-
return (len);
419+
return len;
419420
}
420421

421422
static int
@@ -474,7 +475,7 @@ pg_mule2wchar_with_len(const unsigned char *from, pg_wchar *to, int len)
474475
cnt++;
475476
}
476477
*to = 0;
477-
return (cnt);
478+
return cnt;
478479
}
479480

480481
int
@@ -494,7 +495,7 @@ pg_mule_mblen(const unsigned char *s)
494495
{ /* assume ASCII */
495496
len = 1;
496497
}
497-
return (len);
498+
return len;
498499
}
499500

500501
static int
@@ -518,19 +519,19 @@ pg_latin12wchar_with_len(const unsigned char *from, pg_wchar *to, int len)
518519
cnt++;
519520
}
520521
*to = 0;
521-
return (cnt);
522+
return cnt;
522523
}
523524

524525
static int
525526
pg_latin1_mblen(const unsigned char *s)
526527
{
527-
return (1);
528+
return 1;
528529
}
529530

530531
static int
531532
pg_latin1_dsplen(const unsigned char *s)
532533
{
533-
return (1);
534+
return 1;
534535
}
535536

536537
/*
@@ -553,7 +554,7 @@ pg_sjis_mblen(const unsigned char *s)
553554
{ /* should be ASCII */
554555
len = 1;
555556
}
556-
return (len);
557+
return len;
557558
}
558559

559560
static int
@@ -573,7 +574,7 @@ pg_sjis_dsplen(const unsigned char *s)
573574
{ /* should be ASCII */
574575
len = 1;
575576
}
576-
return (len);
577+
return len;
577578
}
578579

579580
/*
@@ -592,7 +593,7 @@ pg_big5_mblen(const unsigned char *s)
592593
{ /* should be ASCII */
593594
len = 1;
594595
}
595-
return (len);
596+
return len;
596597
}
597598

598599
static int
@@ -608,7 +609,7 @@ pg_big5_dsplen(const unsigned char *s)
608609
{ /* should be ASCII */
609610
len = 1;
610611
}
611-
return (len);
612+
return len;
612613
}
613614

614615
/*
@@ -627,7 +628,7 @@ pg_gbk_mblen(const unsigned char *s)
627628
{ /* should be ASCII */
628629
len = 1;
629630
}
630-
return (len);
631+
return len;
631632
}
632633

633634
static int
@@ -643,7 +644,7 @@ pg_gbk_dsplen(const unsigned char *s)
643644
{ /* should be ASCII */
644645
len = 1;
645646
}
646-
return (len);
647+
return len;
647648
}
648649

649650
/*
@@ -662,7 +663,7 @@ pg_uhc_mblen(const unsigned char *s)
662663
{ /* should be ASCII */
663664
len = 1;
664665
}
665-
return (len);
666+
return len;
666667
}
667668

668669
static int
@@ -678,7 +679,7 @@ pg_uhc_dsplen(const unsigned char *s)
678679
{ /* should be ASCII */
679680
len = 1;
680681
}
681-
return (len);
682+
return len;
682683
}
683684

684685
/*
@@ -703,7 +704,7 @@ pg_gb18030_mblen(const unsigned char *s)
703704
else
704705
len = 2;
705706
}
706-
return (len);
707+
return len;
707708
}
708709

709710
static int
@@ -717,7 +718,7 @@ pg_gb18030_dsplen(const unsigned char *s)
717718
}
718719
else
719720
len = 2;
720-
return (len);
721+
return len;
721722
}
722723

723724

@@ -763,7 +764,7 @@ pg_wchar_tbl pg_wchar_table[] = {
763764
int
764765
pg_mic_mblen(const unsigned char *mbstr)
765766
{
766-
return (pg_mule_mblen(mbstr));
767+
return pg_mule_mblen(mbstr);
767768
}
768769

769770
/*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy