[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-stable] [Qemu-devel] [PATCH 2/2] Header cleanups qemu_is* macros w
From: |
Aruna Jayasena |
Subject: |
[Qemu-stable] [Qemu-devel] [PATCH 2/2] Header cleanups qemu_is* macros were moved from qemu-common.h to qemu/cutils.h |
Date: |
Mon, 1 Apr 2019 21:38:49 +0530 |
Signed-off-by: Aruna Jayasena <address@hidden>
---
hw/core/qdev-properties.c | 1 +
include/qemu-common.h | 11 -----------
include/qemu/cutils.h | 12 ++++++++++++
qapi/qapi-util.c | 2 +-
util/id.c | 2 +-
5 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
index 5da1439a8b..821a4ab311 100644
--- a/hw/core/qdev-properties.c
+++ b/hw/core/qdev-properties.c
@@ -10,6 +10,7 @@
#include "qapi/visitor.h"
#include "chardev/char.h"
#include "qemu/uuid.h"
+#include "qemu/cutils.h"
void qdev_prop_set_after_realize(DeviceState *dev, const char *name,
Error **errp)
diff --git a/include/qemu-common.h b/include/qemu-common.h
index a102245519..0066e45a6b 100644
--- a/include/qemu-common.h
+++ b/include/qemu-common.h
@@ -33,17 +33,6 @@ int qemu_main(int argc, char **argv, char **envp);
void qemu_get_timedate(struct tm *tm, int offset);
int qemu_timedate_diff(struct tm *tm);
-#define qemu_isalnum(c) isalnum((unsigned char)(c))
-#define qemu_isalpha(c) isalpha((unsigned char)(c))
-#define qemu_iscntrl(c) iscntrl((unsigned char)(c))
-#define qemu_isdigit(c) isdigit((unsigned char)(c))
-#define qemu_isgraph(c) isgraph((unsigned char)(c))
-#define qemu_islower(c) islower((unsigned char)(c))
-#define qemu_isprint(c) isprint((unsigned char)(c))
-#define qemu_ispunct(c) ispunct((unsigned char)(c))
-#define qemu_isspace(c) isspace((unsigned char)(c))
-#define qemu_isupper(c) isupper((unsigned char)(c))
-#define qemu_isxdigit(c) isxdigit((unsigned char)(c))
#define qemu_tolower(c) tolower((unsigned char)(c))
#define qemu_toupper(c) toupper((unsigned char)(c))
#define qemu_isascii(c) isascii((unsigned char)(c))
diff --git a/include/qemu/cutils.h b/include/qemu/cutils.h
index d2dad3057c..797c5bc560 100644
--- a/include/qemu/cutils.h
+++ b/include/qemu/cutils.h
@@ -3,6 +3,18 @@
#include "qemu/fprintf-fn.h"
+#define qemu_isalnum(c) isalnum((unsigned char)(c))
+#define qemu_isalpha(c) isalpha((unsigned char)(c))
+#define qemu_iscntrl(c) iscntrl((unsigned char)(c))
+#define qemu_isdigit(c) isdigit((unsigned char)(c))
+#define qemu_isgraph(c) isgraph((unsigned char)(c))
+#define qemu_islower(c) islower((unsigned char)(c))
+#define qemu_isprint(c) isprint((unsigned char)(c))
+#define qemu_ispunct(c) ispunct((unsigned char)(c))
+#define qemu_isspace(c) isspace((unsigned char)(c))
+#define qemu_isupper(c) isupper((unsigned char)(c))
+#define qemu_isxdigit(c) isxdigit((unsigned char)(c))
+
/**
* pstrcpy:
* @buf: buffer to copy string into
diff --git a/qapi/qapi-util.c b/qapi/qapi-util.c
index e9b266bb70..944347cc76 100644
--- a/qapi/qapi-util.c
+++ b/qapi/qapi-util.c
@@ -12,7 +12,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
-#include "qemu-common.h"
+#include "qemu/cutils.h"
const char *qapi_enum_lookup(const QEnumLookup *lookup, int val)
{
diff --git a/util/id.c b/util/id.c
index 3f8e13bd6f..a1faff1f9e 100644
--- a/util/id.c
+++ b/util/id.c
@@ -12,7 +12,7 @@
#include "qemu/osdep.h"
#include "qemu/id.h"
-#include "qemu-common.h"
+#include "qemu/cutils.h"
bool id_wellformed(const char *id)
{
--
2.17.1
- [Qemu-stable] [Qemu-devel] [PATCH 2/2] Header cleanups qemu_is* macros were moved from qemu-common.h to qemu/cutils.h,
Aruna Jayasena <=