aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-22 20:04:24 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-22 20:04:24 +0000
commit47398b9c3681ebcd4eb942e732628cdfb172664e (patch)
treefc69fbd7f6ab9caa68d77f7adb93b46ddbc75c18
parent11bb09f1be8e5157b21065e14efda7fd0c7221e7 (diff)
Use qemu_isfoobar and qemu_towombat versions, based on patch by Christoph Egger
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5774 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--block-vvfat.c4
-rw-r--r--nbd.c16
-rw-r--r--net.c2
-rw-r--r--qemu-sockets.c5
-rw-r--r--usb-linux.c2
5 files changed, 15 insertions, 14 deletions
diff --git a/block-vvfat.c b/block-vvfat.c
index 7d4c934d3f..b8fa72981b 100644
--- a/block-vvfat.c
+++ b/block-vvfat.c
@@ -1485,7 +1485,7 @@ static int parse_short_name(BDRVVVFATState* s,
if (direntry->name[i] <= ' ' || direntry->name[i] > 0x7f)
return -1;
else if (s->downcase_short_names)
- lfn->name[i] = tolower(direntry->name[i]);
+ lfn->name[i] = qemu_tolower(direntry->name[i]);
else
lfn->name[i] = direntry->name[i];
}
@@ -1498,7 +1498,7 @@ static int parse_short_name(BDRVVVFATState* s,
if (direntry->extension[j] <= ' ' || direntry->extension[j] > 0x7f)
return -2;
else if (s->downcase_short_names)
- lfn->name[i + j] = tolower(direntry->extension[j]);
+ lfn->name[i + j] = qemu_tolower(direntry->extension[j]);
else
lfn->name[i + j] = direntry->extension[j];
}
diff --git a/nbd.c b/nbd.c
index bb4f5d4272..5b5f7608a7 100644
--- a/nbd.c
+++ b/nbd.c
@@ -314,14 +314,14 @@ int nbd_receive_negotiate(int csock, off_t *size, size_t *blocksize)
*blocksize = 1024;
TRACE("Magic is %c%c%c%c%c%c%c%c",
- isprint(buf[0]) ? buf[0] : '.',
- isprint(buf[1]) ? buf[1] : '.',
- isprint(buf[2]) ? buf[2] : '.',
- isprint(buf[3]) ? buf[3] : '.',
- isprint(buf[4]) ? buf[4] : '.',
- isprint(buf[5]) ? buf[5] : '.',
- isprint(buf[6]) ? buf[6] : '.',
- isprint(buf[7]) ? buf[7] : '.');
+ qemu_isprint(buf[0]) ? buf[0] : '.',
+ qemu_isprint(buf[1]) ? buf[1] : '.',
+ qemu_isprint(buf[2]) ? buf[2] : '.',
+ qemu_isprint(buf[3]) ? buf[3] : '.',
+ qemu_isprint(buf[4]) ? buf[4] : '.',
+ qemu_isprint(buf[5]) ? buf[5] : '.',
+ qemu_isprint(buf[6]) ? buf[6] : '.',
+ qemu_isprint(buf[7]) ? buf[7] : '.');
TRACE("Magic is 0x%" PRIx64, magic);
TRACE("Size is %" PRIu64, *size);
diff --git a/net.c b/net.c
index f4c313084b..10d23b41f6 100644
--- a/net.c
+++ b/net.c
@@ -668,7 +668,7 @@ int tap_alloc(char *dev, size_t dev_size)
if( *dev ){
ptr = dev;
- while( *ptr && !isdigit((int)*ptr) ) ptr++;
+ while( *ptr && !qemu_isdigit((int)*ptr) ) ptr++;
ppa = atoi(ptr);
}
diff --git a/qemu-sockets.c b/qemu-sockets.c
index 509d2a594e..551ef73fe3 100644
--- a/qemu-sockets.c
+++ b/qemu-sockets.c
@@ -20,6 +20,7 @@
#include <unistd.h>
#include "qemu_socket.h"
+#include "qemu-common.h" /* for qemu_isdigit */
#ifndef AI_ADDRCONFIG
# define AI_ADDRCONFIG 0
@@ -120,7 +121,7 @@ int inet_listen(const char *str, char *ostr, int olen,
return -1;
}
ai.ai_family = PF_INET6;
- } else if (isdigit(str[0])) {
+ } else if (qemu_isdigit(str[0])) {
/* IPv4 addr */
if (2 != sscanf(str,"%64[0-9.]:%32[^,]%n",addr,port,&pos)) {
fprintf(stderr, "%s: ipv4 parse error (%s)\n",
@@ -244,7 +245,7 @@ int inet_connect(const char *str, int socktype)
return -1;
}
ai.ai_family = PF_INET6;
- } else if (isdigit(str[0])) {
+ } else if (qemu_isdigit(str[0])) {
/* IPv4 addr */
if (2 != sscanf(str,"%64[0-9.]:%32[^,]",addr,port)) {
fprintf(stderr, "%s: ipv4 parse error (%s)\n",
diff --git a/usb-linux.c b/usb-linux.c
index eeefc84563..a499c10e94 100644
--- a/usb-linux.c
+++ b/usb-linux.c
@@ -1048,7 +1048,7 @@ static int get_tag_value(char *buf, int buf_size,
if (!p)
return -1;
p += strlen(tag);
- while (isspace(*p))
+ while (qemu_isspace(*p))
p++;
q = buf;
while (*p != '\0' && !strchr(stopchars, *p)) {