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

Commitd8a8183

Browse files
committed
Formatting cleanups.
1 parent0658a6a commitd8a8183

File tree

1 file changed

+22
-64
lines changed

1 file changed

+22
-64
lines changed

‎src/backend/utils/mb/wchar.c

Lines changed: 22 additions & 64 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.49 2005/12/2416:49:48 momjian Exp $
4+
* $PostgreSQL: pgsql/src/backend/utils/mb/wchar.c,v 1.50 2005/12/2417:19:40 momjian Exp $
55
*
66
* WIN1250 client encoding updated by Pavel Behal
77
*
@@ -492,9 +492,7 @@ pg_mule_mblen(const unsigned char *s)
492492
elseif (IS_LCPRV2(*s))
493493
len=4;
494494
else
495-
{/* assume ASCII */
496-
len=1;
497-
}
495+
len=1;/* assume ASCII */
498496
returnlen;
499497
}
500498

@@ -543,17 +541,11 @@ pg_sjis_mblen(const unsigned char *s)
543541
intlen;
544542

545543
if (*s >=0xa1&&*s <=0xdf)
546-
{/* 1 byte kana? */
547-
len=1;
548-
}
544+
len=1;/* 1 byte kana? */
549545
elseif (*s>0x7f)
550-
{/* kanji? */
551-
len=2;
552-
}
546+
len=2;/* kanji? */
553547
else
554-
{/* should be ASCII */
555-
len=1;
556-
}
548+
len=1;/* should be ASCII */
557549
returnlen;
558550
}
559551

@@ -563,17 +555,11 @@ pg_sjis_dsplen(const unsigned char *s)
563555
intlen;
564556

565557
if (*s >=0xa1&&*s <=0xdf)
566-
{/* 1 byte kana? */
567-
len=1;
568-
}
558+
len=1;/* 1 byte kana? */
569559
elseif (*s>0x7f)
570-
{/* kanji? */
571-
len=2;
572-
}
560+
len=2;/* kanji? */
573561
else
574-
{/* should be ASCII */
575-
len=1;
576-
}
562+
len=1;/* should be ASCII */
577563
returnlen;
578564
}
579565

@@ -586,13 +572,9 @@ pg_big5_mblen(const unsigned char *s)
586572
intlen;
587573

588574
if (*s>0x7f)
589-
{/* kanji? */
590-
len=2;
591-
}
575+
len=2;/* kanji? */
592576
else
593-
{/* should be ASCII */
594-
len=1;
595-
}
577+
len=1;/* should be ASCII */
596578
returnlen;
597579
}
598580

@@ -602,13 +584,9 @@ pg_big5_dsplen(const unsigned char *s)
602584
intlen;
603585

604586
if (*s>0x7f)
605-
{/* kanji? */
606-
len=2;
607-
}
587+
len=2;/* kanji? */
608588
else
609-
{/* should be ASCII */
610-
len=1;
611-
}
589+
len=1;/* should be ASCII */
612590
returnlen;
613591
}
614592

@@ -621,13 +599,9 @@ pg_gbk_mblen(const unsigned char *s)
621599
intlen;
622600

623601
if (*s>0x7f)
624-
{/* kanji? */
625-
len=2;
626-
}
602+
len=2;/* kanji? */
627603
else
628-
{/* should be ASCII */
629-
len=1;
630-
}
604+
len=1;/* should be ASCII */
631605
returnlen;
632606
}
633607

@@ -637,13 +611,9 @@ pg_gbk_dsplen(const unsigned char *s)
637611
intlen;
638612

639613
if (*s>0x7f)
640-
{/* kanji? */
641-
len=2;
642-
}
614+
len=2;/* kanji? */
643615
else
644-
{/* should be ASCII */
645-
len=1;
646-
}
616+
len=1;/* should be ASCII */
647617
returnlen;
648618
}
649619

@@ -656,13 +626,9 @@ pg_uhc_mblen(const unsigned char *s)
656626
intlen;
657627

658628
if (*s>0x7f)
659-
{/* 2byte? */
660-
len=2;
661-
}
629+
len=2;/* 2byte? */
662630
else
663-
{/* should be ASCII */
664-
len=1;
665-
}
631+
len=1;/* should be ASCII */
666632
returnlen;
667633
}
668634

@@ -672,13 +638,9 @@ pg_uhc_dsplen(const unsigned char *s)
672638
intlen;
673639

674640
if (*s>0x7f)
675-
{/* 2byte? */
676-
len=2;
677-
}
641+
len=2;/* 2byte? */
678642
else
679-
{/* should be ASCII */
680-
len=1;
681-
}
643+
len=1;/* should be ASCII */
682644
returnlen;
683645
}
684646

@@ -692,9 +654,7 @@ pg_gb18030_mblen(const unsigned char *s)
692654
intlen;
693655

694656
if (*s <=0x7f)
695-
{/* ASCII */
696-
len=1;
697-
}
657+
len=1;/* ASCII */
698658
else
699659
{
700660
if ((*(s+1) >=0x40&&*(s+1) <=0x7e)|| (*(s+1) >=0x80&&*(s+1) <=0xfe))
@@ -713,9 +673,7 @@ pg_gb18030_dsplen(const unsigned char *s)
713673
intlen;
714674

715675
if (*s <=0x7f)
716-
{/* ASCII */
717-
len=1;
718-
}
676+
len=1;/* ASCII */
719677
else
720678
len=2;
721679
returnlen;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp