tool/xkb2ifcfg: adapt to current Genode version

Thanks Florian for the nudge.
This commit is contained in:
Christian Helmuth 2024-04-10 13:20:04 +02:00
parent f59883427f
commit f83487869d
3 changed files with 9 additions and 50 deletions

View File

@ -16,21 +16,23 @@ endif
TARGET = xkb2ifcfg
SRC_CC = $(wildcard *.cc)
SRC_CC += $(GENODE_DIR)/repos/base/src/lib/base/xml_generator.cc
SRC_CC += $(GENODE_DIR)/repos/base/src/lib/base/output.cc
SRC_H = $(wildcard *.h)
CFLAGS = -Werror -Wall -Wextra -Wno-attributes -std=gnu++17 -ggdb
CFLAGS = -Werror -Wall -Wextra -Wno-attributes -std=gnu++20 -ggdb
CFLAGS += -I$(GENODE_DIR)/repos/os/include
CFLAGS += -I$(GENODE_DIR)/repos/base/src/include
CFLAGS += -I$(GENODE_DIR)/repos/base/include
CFLAGS += -I$(GENODE_DIR)/repos/base/include/spec/64bit
CFLAGS += -I$(GENODE_DIR)/repos/base/include/spec/x86
CFLAGS += -I$(GENODE_DIR)/repos/base/include/spec/x86_64
CFLAGS += $(shell pkg-config --cflags --libs xkbcommon)
$(TARGET): $(SRC_CC) $(SRC_H) Makefile
g++ -o $@ $(SRC_CC) $(CFLAGS)
$(TARGET): $(SRC_CC) $(SRC_H) Makefile $(OBJECTS)
g++ -o $@ $(SRC_CC) $(OBJECTS) $(CFLAGS)
cleanall clean:
rm -f $(TARGET) *~
.PHONY: cleanall clean

View File

@ -1,43 +0,0 @@
/*
* \brief Genode utility support
* \author Christian Helmuth <christian.helmuth@genode-labs.com>
* \date 2019-07-25
*/
/*
* Copyright (C) 2019 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
/* Genode includes */
#include <base/console.h>
#include "util.h"
void Genode::Console::_out_string(char const *str)
{
if (!str)
_out_string("<NULL>");
else
while (*str) _out_char(*str++);
}
void Genode::Console::printf(const char *format, ...)
{
va_list list;
va_start(list, format);
vprintf(format, list);
va_end(list);
}
void Genode::Console::vprintf(const char *format, va_list list)
{
Formatted str(format, list);
_out_string(str.string());
}

View File

@ -489,7 +489,7 @@ struct Main::Sequence
_xml.attribute("second", Formatted("0x%04x", seq.at(1).utf32).string());
_xml.attribute("third", Formatted("0x%04x", seq.at(2).utf32).string());
_xml.attribute("fourth", Formatted("0x%04x", seq.at(3).utf32).string());
} catch (std::out_of_range) { }
} catch (std::out_of_range &) { }
_xml.attribute("code", Formatted("0x%04x", utf32).string());
});