qemu-common: Move qemu_isalnum() etc. to qemu/ctype.h
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190523143508.25387-3-armbru@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
14a48c1d0d
commit
856dfd8a03
@ -32,6 +32,7 @@
|
||||
#include "qapi/error.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "qemu/option.h"
|
||||
#include "qemu/ctype.h"
|
||||
#include "qemu/cutils.h"
|
||||
#include "qemu/sockets.h"
|
||||
#include "qemu/uri.h"
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include "migration/blocker.h"
|
||||
#include "qapi/qmp/qdict.h"
|
||||
#include "qapi/qmp/qstring.h"
|
||||
#include "qemu/ctype.h"
|
||||
#include "qemu/cutils.h"
|
||||
#include "qemu/error-report.h"
|
||||
|
||||
|
@ -16,9 +16,11 @@
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "qemu/ctype.h"
|
||||
#include "qemu/cutils.h"
|
||||
#include "trace-root.h"
|
||||
#ifdef CONFIG_USER_ONLY
|
||||
|
@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu-common.h"
|
||||
#include "qemu/ctype.h"
|
||||
#include "hw/qdev.h"
|
||||
#include "qapi/error.h"
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include "qapi/error.h"
|
||||
#include "hw/pci/pci.h"
|
||||
#include "qapi/qmp/qerror.h"
|
||||
#include "qemu/ctype.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "hw/block/block.h"
|
||||
#include "net/hub.h"
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "hw/s390x/css.h"
|
||||
#include "virtio-ccw.h"
|
||||
#include "qemu/config-file.h"
|
||||
#include "qemu/ctype.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "qemu/option.h"
|
||||
#include "s390-pci-bus.h"
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qemu-common.h"
|
||||
#include "qemu/ctype.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "hw/scsi/scsi.h"
|
||||
#include "hw/scsi/emulation.h"
|
||||
|
@ -31,22 +31,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))
|
||||
#define qemu_toascii(c) toascii((unsigned char)(c))
|
||||
|
||||
void *qemu_oom_check(void *ptr);
|
||||
|
||||
ssize_t qemu_write_full(int fd, const void *buf, size_t count)
|
||||
|
27
include/qemu/ctype.h
Normal file
27
include/qemu/ctype.h
Normal file
@ -0,0 +1,27 @@
|
||||
/*
|
||||
* QEMU TCG support
|
||||
*
|
||||
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
||||
* See the COPYING file in the top-level directory.
|
||||
*/
|
||||
|
||||
#ifndef QEMU_CTYPE_H
|
||||
#define QEMU_CTYPE_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))
|
||||
#define qemu_tolower(c) tolower((unsigned char)(c))
|
||||
#define qemu_toupper(c) toupper((unsigned char)(c))
|
||||
#define qemu_isascii(c) isascii((unsigned char)(c))
|
||||
#define qemu_toascii(c) toascii((unsigned char)(c))
|
||||
|
||||
#endif
|
@ -42,6 +42,7 @@
|
||||
#include "sysemu/numa.h"
|
||||
#include "monitor/monitor.h"
|
||||
#include "qemu/config-file.h"
|
||||
#include "qemu/ctype.h"
|
||||
#include "qemu/readline.h"
|
||||
#include "ui/console.h"
|
||||
#include "ui/input.h"
|
||||
|
@ -41,6 +41,7 @@
|
||||
#include "qemu/sockets.h"
|
||||
#include "qemu/cutils.h"
|
||||
#include "qemu/config-file.h"
|
||||
#include "qemu/ctype.h"
|
||||
#include "hw/qdev.h"
|
||||
#include "qemu/iov.h"
|
||||
#include "qemu/main-loop.h"
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "qapi/error.h"
|
||||
#include "tap_int.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "qemu/ctype.h"
|
||||
#include "qemu/cutils.h"
|
||||
|
||||
#include <sys/ethernet.h>
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qemu-common.h"
|
||||
#include "qemu/ctype.h"
|
||||
|
||||
const char *qapi_enum_lookup(const QEnumLookup *lookup, int val)
|
||||
{
|
||||
|
@ -12,10 +12,10 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu/ctype.h"
|
||||
#include "qemu/cutils.h"
|
||||
#include "qemu/unicode.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qemu-common.h"
|
||||
#include "qapi/qmp/qbool.h"
|
||||
#include "qapi/qmp/qdict.h"
|
||||
#include "qapi/qmp/qlist.h"
|
||||
|
@ -21,9 +21,11 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "cpu.h"
|
||||
#include "monitor/monitor.h"
|
||||
#include "qemu/ctype.h"
|
||||
#include "monitor/hmp-target.h"
|
||||
#include "hmp.h"
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu/qemu-print.h"
|
||||
#include "qemu/ctype.h"
|
||||
#include "qemu/log.h"
|
||||
#include "cpu.h"
|
||||
#include "exec/exec-all.h"
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include "libqtest.h"
|
||||
#include "qemu-common.h"
|
||||
#include "qemu/ctype.h"
|
||||
#include "qemu/cutils.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qmp/json-parser.h"
|
||||
|
@ -30,8 +30,8 @@
|
||||
#define _FILE_OFFSET_BITS 64
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu-common.h"
|
||||
#include "qemu/atomic.h"
|
||||
#include "qemu/ctype.h"
|
||||
#include "qemu/iov.h"
|
||||
#include "standard-headers/linux/virtio_net.h"
|
||||
#include "contrib/libvhost-user/libvhost-user.h"
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "keymaps.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "trace.h"
|
||||
#include "qemu/ctype.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "qapi/error.h"
|
||||
#include "ui/input.h"
|
||||
|
@ -21,14 +21,15 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu-common.h"
|
||||
#include "qemu/host-utils.h"
|
||||
#include <math.h>
|
||||
|
||||
#include "qemu/sockets.h"
|
||||
#include "qemu/iov.h"
|
||||
#include "net/net.h"
|
||||
#include "qemu/ctype.h"
|
||||
#include "qemu/cutils.h"
|
||||
#include "qemu/error-report.h"
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu-common.h"
|
||||
#include "qemu/ctype.h"
|
||||
#include "qemu/id.h"
|
||||
|
||||
bool id_wellformed(const char *id)
|
||||
|
@ -23,8 +23,8 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu-common.h"
|
||||
#include "qemu/readline.h"
|
||||
#include "qemu/ctype.h"
|
||||
#include "qemu/cutils.h"
|
||||
|
||||
#define IS_NORM 0
|
||||
|
Loading…
Reference in New Issue
Block a user