qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Aruna Jayasena <aruna.15@cse.mrt.ac.lk>
To: qemu-devel@nongnu.org
Cc: qemu-stable@nongnu.org, Aruna Jayasena <aruna.15@cse.mrt.ac.lk>
Subject: [Qemu-devel] [PATCH 2/3] Header cleanups qemu_is* macros were moved from qemu-common.h to qemu/cutils.h This task was under https://wiki.qemu.org/Contribute/BiteSizedTasks
Date: Tue,  2 Apr 2019 18:21:31 +0530	[thread overview]
Message-ID: <20190402125131.10275-1-aruna.15@cse.mrt.ac.lk> (raw)

---
 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

             reply	other threads:[~2019-04-02 12:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-02 12:51 Aruna Jayasena [this message]
2019-04-02 12:52 ` [Qemu-devel] [PATCH 2/3] Header cleanups qemu_is* macros were moved from qemu-common.h to qemu/cutils.h This task was under https://wiki.qemu.org/Contribute/BiteSizedTasks Aruna Jayasena

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190402125131.10275-1-aruna.15@cse.mrt.ac.lk \
    --to=aruna.15@cse.mrt.ac.lk \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).