$NetBSD$

--- dpgate.c.orig	2006-04-14 12:12:16.000000000 +0930
+++ dpgate.c	2006-04-14 12:12:45.000000000 +0930
@@ -155,7 +155,7 @@
     if (buf[i] == '\r') {
       putchar('\n');
     }
-    else if (isprint(buf[i]))
+    else if (isprint((u_char) buf[i]))
       putchar(buf[i]);
     else
       putchar('.');
@@ -696,8 +696,8 @@
   while (*i) {
     if (*i == '%' && strlen(i) > 2 && i[1] != '%') {
       i++;
-      h[0] = toupper(*i++);
-      h[1] = toupper(*i++);
+      h[0] = toupper((u_char) *i++);
+      h[1] = toupper((u_char) *i++);
       h[2] = '\0';
       r = 32;
       sscanf(h, "%X", &r);
