c7ad5c4afa
Somewhat more than 11 rooms later... PKG_DESTDIR_SUPPORT
35 lines
870 B
Text
35 lines
870 B
Text
$NetBSD: patch-ax,v 1.2 2009/12/18 01:09:23 abs Exp $
|
|
|
|
Keywords: ctype
|
|
|
|
--- src/common/mime.c.orig 2004-08-22 20:19:11.000000000 +0000
|
|
+++ src/common/mime.c
|
|
@@ -32,12 +32,13 @@
|
|
|
|
#include "fidogate.h"
|
|
|
|
+#define uchar(c) ((unsigned char) (c))
|
|
|
|
-static int is_qpx (int);
|
|
+static int is_qpx (unsigned char);
|
|
static int x2toi (char *);
|
|
|
|
|
|
-static int is_qpx(int c)
|
|
+static int is_qpx(unsigned char c)
|
|
{
|
|
return isxdigit(c) /**is_digit(c) || (c>='A' && c<='F')**/ ;
|
|
}
|
|
@@ -48,10 +49,10 @@ static int x2toi(char *s)
|
|
int val = 0;
|
|
int n;
|
|
|
|
- n = toupper(*s) - (isalpha(*s) ? 'A'-10 : '0');
|
|
+ n = toupper(uchar(*s)) - (isalpha(uchar(*s)) ? 'A'-10 : '0');
|
|
val = val*16 + n;
|
|
s++;
|
|
- n = toupper(*s) - (isalpha(*s) ? 'A'-10 : '0');
|
|
+ n = toupper(uchar(*s)) - (isalpha(uchar(*s)) ? 'A'-10 : '0');
|
|
val = val*16 + n;
|
|
|
|
return val;
|