Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0658a6a

Browse files
committed
Formatting cleanup.
1 parent804f6b8 commit0658a6a

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/2409:35:36 ishii Exp $
4+
* $PostgreSQL: pgsql/src/backend/utils/mb/wchar.c,v 1.49 2005/12/2416:49:48 momjian Exp $
55
*
66
* WIN1250 client encoding updated by Pavel Behal
77
*
@@ -28,7 +28,8 @@
2828
/*
2929
* SQL/ASCII
3030
*/
31-
staticintpg_ascii2wchar_with_len
31+
staticint
32+
pg_ascii2wchar_with_len
3233
(constunsignedchar*from,pg_wchar*to,intlen)
3334
{
3435
intcnt=0;
@@ -40,19 +41,19 @@ static intpg_ascii2wchar_with_len
4041
cnt++;
4142
}
4243
*to=0;
43-
return(cnt);
44+
returncnt;
4445
}
4546

4647
staticint
4748
pg_ascii_mblen(constunsignedchar*s)
4849
{
49-
return(1);
50+
return1;
5051
}
5152

5253
staticint
5354
pg_ascii_dsplen(constunsignedchar*s)
5455
{
55-
return(1);
56+
return1;
5657
}
5758

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

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

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

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

140141
staticint
141142
pg_eucjp_mblen(constunsignedchar*s)
142143
{
143-
return(pg_euc_mblen(s));
144+
returnpg_euc_mblen(s);
144145
}
145146

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

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

171172
staticint
172173
pg_euckr_mblen(constunsignedchar*s)
173174
{
174-
return(pg_euc_mblen(s));
175+
returnpg_euc_mblen(s);
175176
}
176177

177178
staticint
178179
pg_euckr_dsplen(constunsignedchar*s)
179180
{
180-
return(pg_euc_dsplen(s));
181+
returnpg_euc_dsplen(s);
181182
}
182183

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

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

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

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

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

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

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

335336
staticint
336337
pg_johab_mblen(constunsignedchar*s)
337338
{
338-
return(pg_euc_mblen(s));
339+
returnpg_euc_mblen(s);
339340
}
340341

341342
staticint
342343
pg_johab_dsplen(constunsignedchar*s)
343344
{
344-
return(pg_euc_dsplen(s));
345+
returnpg_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+
returncnt;
396397
}
397398

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

421422
staticint
@@ -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+
returncnt;
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+
returnlen;
498499
}
499500

500501
staticint
@@ -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+
returncnt;
522523
}
523524

524525
staticint
525526
pg_latin1_mblen(constunsignedchar*s)
526527
{
527-
return(1);
528+
return1;
528529
}
529530

530531
staticint
531532
pg_latin1_dsplen(constunsignedchar*s)
532533
{
533-
return(1);
534+
return1;
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+
returnlen;
557558
}
558559

559560
staticint
@@ -573,7 +574,7 @@ pg_sjis_dsplen(const unsigned char *s)
573574
{/* should be ASCII */
574575
len=1;
575576
}
576-
return(len);
577+
returnlen;
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+
returnlen;
596597
}
597598

598599
staticint
@@ -608,7 +609,7 @@ pg_big5_dsplen(const unsigned char *s)
608609
{/* should be ASCII */
609610
len=1;
610611
}
611-
return(len);
612+
returnlen;
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+
returnlen;
631632
}
632633

633634
staticint
@@ -643,7 +644,7 @@ pg_gbk_dsplen(const unsigned char *s)
643644
{/* should be ASCII */
644645
len=1;
645646
}
646-
return(len);
647+
returnlen;
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+
returnlen;
666667
}
667668

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

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

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

723724

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

769770
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp