1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-25 20:23:07 +03:00

Add fix for 0x7fU constants to pgindent

This commit is contained in:
Bruce Momjian
1999-05-26 15:20:04 +00:00
parent eeadc5e87f
commit 9c56b408c4
3 changed files with 32 additions and 9 deletions

View File

@@ -7,7 +7,7 @@
*
* 1999/1/15 Tatsuo Ishii
*
* $Id: big5.c,v 1.4 1999/05/25 22:42:19 momjian Exp $
* $Id: big5.c,v 1.5 1999/05/26 15:19:54 momjian Exp $
*/
#include "mb/pg_wchar.h"
@@ -218,7 +218,7 @@ static unsigned short BinarySearchRange
{
if (0 == array[mid].peer)
return 0;
if (code >= (unsigned) 0xa140)
if (code >= 0xa140U)
{
/* big5 to cns */
tmp = ((code & 0xff00) - (array[mid].code & 0xff00)) >> 8;
@@ -292,7 +292,7 @@ BIG5toCNS(unsigned short big5, unsigned char *lc)
unsigned short cns = 0;
int i;
if (big5 < (unsigned) 0xc940)
if (big5 < 0xc940U)
{
/* level 1 */
@@ -301,14 +301,14 @@ BIG5toCNS(unsigned short big5, unsigned char *lc)
if (b1c4[i][0] == big5)
{
*lc = LC_CNS11643_4;
return (b1c4[i][1] | (unsigned) 0x8080);
return (b1c4[i][1] | 0x8080U);
}
}
if (0 < (cns = BinarySearchRange(big5Level1ToCnsPlane1, 23, big5)))
*lc = LC_CNS11643_1;
}
else if (big5 == (unsigned) 0xc94a)
else if (big5 == 0xc94aU)
{
/* level 2 */
*lc = LC_CNS11643_1;

View File

@@ -2,7 +2,7 @@
* conversion between client encoding and server internal encoding
* (currently mule internal code (mic) is used)
* Tatsuo Ishii
* $Id: conv.c,v 1.10 1999/05/25 22:42:20 momjian Exp $
* $Id: conv.c,v 1.11 1999/05/26 15:19:55 momjian Exp $
*/
#include <stdio.h>
#include <string.h>
@@ -384,7 +384,7 @@ big52mic(unsigned char *big5, unsigned char *p, int len)
while (len > 0 && (c1 = *big5++))
{
if (c1 <= (unsigned) 0x7f)
if (c1 <= 0x7fU)
{ /* ASCII */
len--;
*p++ = c1;