Convert read_netfinger() to use char instead of unsigned char

This commit is contained in:
Kevin Easton
2015-06-20 23:18:13 +10:00
parent 716a8ec33a
commit 64860729b3

View File

@@ -3651,8 +3651,8 @@ extern int dgets_errno;
void read_netfinger(int s) void read_netfinger(int s)
{ {
char tmpstr[BIG_BUFFER_SIZE+1]; char tmpstr[BIG_BUFFER_SIZE+1];
register unsigned char *p = tmpstr; char *p = tmpstr;
*tmpstr = 0; *tmpstr = 0;
switch(dgets(tmpstr, s, 0, BIG_BUFFER_SIZE, NULL)) switch(dgets(tmpstr, s, 0, BIG_BUFFER_SIZE, NULL))
{ {
@@ -3673,13 +3673,13 @@ register unsigned char *p = tmpstr;
{ {
switch(*p) switch(*p)
{ {
case 0210: case '\210':
case 0211: case '\211':
case 0212: case '\212':
case 0214: case '\214':
*p -= 0200; *p &= 0x7f;
break; break;
case 0x9b: case '\x9b':
case '\t': case '\t':
break; break;
case '\n': case '\n':
@@ -3687,7 +3687,7 @@ register unsigned char *p = tmpstr;
*p = '\0'; *p = '\0';
break; break;
default: default:
if (!isprint(*p)) if (!isprint((unsigned char)*p))
*p = (*p & 0x7f) | 0x40; *p = (*p & 0x7f) | 0x40;
break; break;
} }