From b7f75e48004c7c51d5db7c6937f553c67c767856 Mon Sep 17 00:00:00 2001 From: sc0w Date: Thu, 6 Feb 2025 16:55:59 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20cafe-des?= =?UTF-8?q?ktop/libcafekbd@28c310f42d337eadca7386aeed5be91417c339a2=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commitmsg | 1 + .../index.html | 138 + ...t_1b95ca5afa730cb83eb934179e2c52e578ec9a09 | 1877 +++++ .../report-37cb39.html | 964 +++ .../report-523ef4.html | 964 +++ .../report-5ce420.html | 964 +++ .../report-5d4bc8.html | 1609 +++++ .../report-891289.html | 1603 +++++ .../report-9361af.html | 1609 +++++ .../report-b4532a.html | 964 +++ .../report-c098bd.html | 964 +++ .../report-e0f2de.html | 964 +++ .../report-fb6164.html | 1504 ++++ .../report-ff92e7.html | 964 +++ .../scanview.css | 62 + .../sorttable.js | 512 ++ .../0.html | 862 +++ .../1.html | 914 +++ .../2.html | 2090 ++++++ .../3.html | 1832 +++++ .../4.html | 6042 +++++++++++++++++ .../5.html | 1978 ++++++ .../6.html | 806 +++ .../7.html | 358 + .../commitmsg | 1 + .../index.html | 242 + ...t_1b95ca5afa730cb83eb934179e2c52e578ec9a09 | 1877 +++++ .../stats.html | 180 + .../style.css | 177 + .../commitmsg | 1 + .../index.html | 138 + ...t_b1965751dcd5a6db17ae755139e63f860425ebf2 | 1864 +++++ .../report-37cb39.html | 964 +++ .../report-523ef4.html | 964 +++ .../report-5ce420.html | 964 +++ .../report-5d4bc8.html | 1609 +++++ .../report-891289.html | 1603 +++++ .../report-9361af.html | 1609 +++++ .../report-b4532a.html | 964 +++ .../report-c098bd.html | 964 +++ .../report-e0f2de.html | 964 +++ .../report-fb6164.html | 1504 ++++ .../report-ff92e7.html | 964 +++ .../scanview.css | 62 + .../sorttable.js | 512 ++ .../0.html | 862 +++ .../1.html | 914 +++ .../2.html | 2100 ++++++ .../3.html | 1832 +++++ .../4.html | 6042 +++++++++++++++++ .../5.html | 1978 ++++++ .../6.html | 806 +++ .../7.html | 358 + .../commitmsg | 1 + .../index.html | 242 + ...t_b1965751dcd5a6db17ae755139e63f860425ebf2 | 1864 +++++ .../stats.html | 180 + .../style.css | 177 + .../commitmsg | 1 + .../index.html | 138 + ...t_b1965751dcd5a6db17ae755139e63f860425ebf2 | 1864 +++++ .../report-37cb39.html | 964 +++ .../report-523ef4.html | 964 +++ .../report-5ce420.html | 964 +++ .../report-5d4bc8.html | 1609 +++++ .../report-891289.html | 1603 +++++ .../report-9361af.html | 1609 +++++ .../report-b4532a.html | 964 +++ .../report-c098bd.html | 964 +++ .../report-e0f2de.html | 964 +++ .../report-fb6164.html | 1504 ++++ .../report-ff92e7.html | 964 +++ .../scanview.css | 62 + .../sorttable.js | 512 ++ .../0.html | 862 +++ .../1.html | 914 +++ .../2.html | 2100 ++++++ .../3.html | 1832 +++++ .../4.html | 6042 +++++++++++++++++ .../5.html | 1978 ++++++ .../6.html | 806 +++ .../7.html | 358 + .../commitmsg | 1 + .../index.html | 242 + ...t_b1965751dcd5a6db17ae755139e63f860425ebf2 | 1864 +++++ .../stats.html | 180 + .../style.css | 177 + .../commitmsg | 1 + .../index.html | 138 + ...t_8369334ba1f33885257d28de0c8869ad0780c640 | 1866 +++++ .../report-37cb39.html | 964 +++ .../report-523ef4.html | 964 +++ .../report-5ce420.html | 964 +++ .../report-5d4bc8.html | 1609 +++++ .../report-891289.html | 1603 +++++ .../report-9361af.html | 1609 +++++ .../report-b4532a.html | 964 +++ .../report-c098bd.html | 964 +++ .../report-e0f2de.html | 964 +++ .../report-fb6164.html | 1504 ++++ .../report-ff92e7.html | 964 +++ .../scanview.css | 62 + .../sorttable.js | 512 ++ .../commitmsg | 1 + .../index.html | 138 + ...t_76170f64aaf12527a5400b10171e2b01d43a5d7b | 1866 +++++ .../report-37cb39.html | 964 +++ .../report-523ef4.html | 964 +++ .../report-5ce420.html | 964 +++ .../report-5d4bc8.html | 1609 +++++ .../report-891289.html | 1603 +++++ .../report-9361af.html | 1609 +++++ .../report-b4532a.html | 964 +++ .../report-c098bd.html | 964 +++ .../report-e0f2de.html | 964 +++ .../report-fb6164.html | 1504 ++++ .../report-ff92e7.html | 964 +++ .../scanview.css | 62 + .../sorttable.js | 512 ++ .../0.html | 862 +++ .../1.html | 914 +++ .../2.html | 2100 ++++++ .../3.html | 1832 +++++ .../4.html | 6042 +++++++++++++++++ .../5.html | 1978 ++++++ .../6.html | 806 +++ .../7.html | 358 + .../commitmsg | 1 + .../index.html | 242 + ...t_8369334ba1f33885257d28de0c8869ad0780c640 | 1866 +++++ .../stats.html | 180 + .../style.css | 177 + .../0.html | 862 +++ .../1.html | 914 +++ .../2.html | 2100 ++++++ .../3.html | 1832 +++++ .../4.html | 6042 +++++++++++++++++ .../5.html | 1978 ++++++ .../6.html | 806 +++ .../7.html | 358 + .../commitmsg | 1 + .../index.html | 242 + ...t_76170f64aaf12527a5400b10171e2b01d43a5d7b | 1866 +++++ .../stats.html | 180 + .../style.css | 177 + .../commitmsg | 1 + .../index.html | 138 + ...t_ae3358295c1fa22b559fc9fea848e0bb4f3741f8 | 1866 +++++ .../report-37cb39.html | 964 +++ .../report-523ef4.html | 964 +++ .../report-5ce420.html | 964 +++ .../report-5d4bc8.html | 1609 +++++ .../report-891289.html | 1603 +++++ .../report-9361af.html | 1609 +++++ .../report-b4532a.html | 964 +++ .../report-c098bd.html | 964 +++ .../report-e0f2de.html | 964 +++ .../report-fb6164.html | 1504 ++++ .../report-ff92e7.html | 964 +++ .../scanview.css | 62 + .../sorttable.js | 512 ++ .../0.html | 862 +++ .../1.html | 914 +++ .../2.html | 2100 ++++++ .../3.html | 1832 +++++ .../4.html | 6042 +++++++++++++++++ .../5.html | 1978 ++++++ .../6.html | 806 +++ .../7.html | 358 + .../commitmsg | 1 + .../index.html | 242 + ...t_ae3358295c1fa22b559fc9fea848e0bb4f3741f8 | 1866 +++++ .../stats.html | 180 + .../style.css | 177 + .../commitmsg | 1 + .../index.html | 138 + ...t_1eab72938451cf1abc040f3d639aae6d9cbfd748 | 1866 +++++ .../report-37cb39.html | 964 +++ .../report-523ef4.html | 964 +++ .../report-5ce420.html | 964 +++ .../report-5d4bc8.html | 1609 +++++ .../report-891289.html | 1603 +++++ .../report-9361af.html | 1609 +++++ .../report-b4532a.html | 964 +++ .../report-c098bd.html | 964 +++ .../report-e0f2de.html | 964 +++ .../report-fb6164.html | 1504 ++++ .../report-ff92e7.html | 964 +++ .../scanview.css | 62 + .../sorttable.js | 512 ++ .../0.html | 862 +++ .../1.html | 914 +++ .../2.html | 2100 ++++++ .../3.html | 1832 +++++ .../4.html | 6042 +++++++++++++++++ .../5.html | 1978 ++++++ .../6.html | 806 +++ .../7.html | 358 + .../commitmsg | 1 + .../index.html | 242 + ...t_1eab72938451cf1abc040f3d639aae6d9cbfd748 | 1866 +++++ .../stats.html | 180 + .../style.css | 177 + .../commitmsg | 1 + .../index.html | 138 + ...t_28c310f42d337eadca7386aeed5be91417c339a2 | 1866 +++++ .../report-37cb39.html | 964 +++ .../report-523ef4.html | 964 +++ .../report-5ce420.html | 964 +++ .../report-5d4bc8.html | 1609 +++++ .../report-891289.html | 1603 +++++ .../report-9361af.html | 1609 +++++ .../report-b4532a.html | 964 +++ .../report-c098bd.html | 964 +++ .../report-e0f2de.html | 964 +++ .../report-fb6164.html | 1504 ++++ .../report-ff92e7.html | 964 +++ .../scanview.css | 62 + .../sorttable.js | 512 ++ .../0.html | 862 +++ .../1.html | 914 +++ .../2.html | 2100 ++++++ .../3.html | 1832 +++++ .../4.html | 6042 +++++++++++++++++ .../5.html | 1978 ++++++ .../6.html | 806 +++ .../7.html | 358 + .../commitmsg | 1 + .../index.html | 242 + ...t_28c310f42d337eadca7386aeed5be91417c339a2 | 1866 +++++ .../stats.html | 180 + .../style.css | 177 + .../commitmsg | 1 + .../index.html | 138 + ...t_28c310f42d337eadca7386aeed5be91417c339a2 | 1866 +++++ .../report-37cb39.html | 964 +++ .../report-523ef4.html | 964 +++ .../report-5ce420.html | 964 +++ .../report-5d4bc8.html | 1609 +++++ .../report-891289.html | 1603 +++++ .../report-9361af.html | 1609 +++++ .../report-b4532a.html | 964 +++ .../report-c098bd.html | 964 +++ .../report-e0f2de.html | 964 +++ .../report-fb6164.html | 1504 ++++ .../report-ff92e7.html | 964 +++ .../scanview.css | 62 + .../sorttable.js | 512 ++ .../commitmsg | 1 + .../index.html | 138 + ...t_28c310f42d337eadca7386aeed5be91417c339a2 | 1866 +++++ .../report-37cb39.html | 964 +++ .../report-523ef4.html | 964 +++ .../report-5ce420.html | 964 +++ .../report-5d4bc8.html | 1609 +++++ .../report-891289.html | 1603 +++++ .../report-9361af.html | 1609 +++++ .../report-b4532a.html | 964 +++ .../report-c098bd.html | 964 +++ .../report-e0f2de.html | 964 +++ .../report-fb6164.html | 1504 ++++ .../report-ff92e7.html | 964 +++ .../scanview.css | 62 + .../sorttable.js | 512 ++ .../0.html | 862 +++ .../1.html | 914 +++ .../2.html | 2100 ++++++ .../3.html | 1832 +++++ .../4.html | 6042 +++++++++++++++++ .../5.html | 1978 ++++++ .../6.html | 806 +++ .../7.html | 358 + .../commitmsg | 1 + .../index.html | 242 + ...t_28c310f42d337eadca7386aeed5be91417c339a2 | 1866 +++++ .../stats.html | 180 + .../style.css | 177 + .../0.html | 862 +++ .../1.html | 914 +++ .../2.html | 2100 ++++++ .../3.html | 1832 +++++ .../4.html | 6042 +++++++++++++++++ .../5.html | 1978 ++++++ .../6.html | 806 +++ .../7.html | 358 + .../commitmsg | 1 + .../index.html | 242 + ...t_28c310f42d337eadca7386aeed5be91417c339a2 | 1866 +++++ .../stats.html | 180 + .../style.css | 177 + index.html | 51 + ...t_28c310f42d337eadca7386aeed5be91417c339a2 | 1866 +++++ 292 files changed, 332021 insertions(+) create mode 100644 2025-02-06-112017-14435-1@1b95ca5afa73_warnings/commitmsg create mode 100644 2025-02-06-112017-14435-1@1b95ca5afa73_warnings/index.html create mode 100644 2025-02-06-112017-14435-1@1b95ca5afa73_warnings/output_1b95ca5afa730cb83eb934179e2c52e578ec9a09 create mode 100644 2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-37cb39.html create mode 100644 2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-523ef4.html create mode 100644 2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-5ce420.html create mode 100644 2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-5d4bc8.html create mode 100644 2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-891289.html create mode 100644 2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-9361af.html create mode 100644 2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-b4532a.html create mode 100644 2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-c098bd.html create mode 100644 2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-e0f2de.html create mode 100644 2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-fb6164.html create mode 100644 2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-ff92e7.html create mode 100644 2025-02-06-112017-14435-1@1b95ca5afa73_warnings/scanview.css create mode 100644 2025-02-06-112017-14435-1@1b95ca5afa73_warnings/sorttable.js create mode 100644 2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/0.html create mode 100644 2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/1.html create mode 100644 2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/2.html create mode 100644 2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/3.html create mode 100644 2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/4.html create mode 100644 2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/5.html create mode 100644 2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/6.html create mode 100644 2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/7.html create mode 100644 2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/commitmsg create mode 100644 2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/index.html create mode 100644 2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/output_1b95ca5afa730cb83eb934179e2c52e578ec9a09 create mode 100644 2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/stats.html create mode 100644 2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/style.css create mode 100644 2025-02-06-114727-14435-1@b1965751dcd5_devel/commitmsg create mode 100644 2025-02-06-114727-14435-1@b1965751dcd5_devel/index.html create mode 100644 2025-02-06-114727-14435-1@b1965751dcd5_devel/output_b1965751dcd5a6db17ae755139e63f860425ebf2 create mode 100644 2025-02-06-114727-14435-1@b1965751dcd5_devel/report-37cb39.html create mode 100644 2025-02-06-114727-14435-1@b1965751dcd5_devel/report-523ef4.html create mode 100644 2025-02-06-114727-14435-1@b1965751dcd5_devel/report-5ce420.html create mode 100644 2025-02-06-114727-14435-1@b1965751dcd5_devel/report-5d4bc8.html create mode 100644 2025-02-06-114727-14435-1@b1965751dcd5_devel/report-891289.html create mode 100644 2025-02-06-114727-14435-1@b1965751dcd5_devel/report-9361af.html create mode 100644 2025-02-06-114727-14435-1@b1965751dcd5_devel/report-b4532a.html create mode 100644 2025-02-06-114727-14435-1@b1965751dcd5_devel/report-c098bd.html create mode 100644 2025-02-06-114727-14435-1@b1965751dcd5_devel/report-e0f2de.html create mode 100644 2025-02-06-114727-14435-1@b1965751dcd5_devel/report-fb6164.html create mode 100644 2025-02-06-114727-14435-1@b1965751dcd5_devel/report-ff92e7.html create mode 100644 2025-02-06-114727-14435-1@b1965751dcd5_devel/scanview.css create mode 100644 2025-02-06-114727-14435-1@b1965751dcd5_devel/sorttable.js create mode 100644 2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/0.html create mode 100644 2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/1.html create mode 100644 2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/2.html create mode 100644 2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/3.html create mode 100644 2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/4.html create mode 100644 2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/5.html create mode 100644 2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/6.html create mode 100644 2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/7.html create mode 100644 2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/commitmsg create mode 100644 2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/index.html create mode 100644 2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/output_b1965751dcd5a6db17ae755139e63f860425ebf2 create mode 100644 2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/stats.html create mode 100644 2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/style.css create mode 100644 2025-02-06-115547-14435-1@b1965751dcd5_master/commitmsg create mode 100644 2025-02-06-115547-14435-1@b1965751dcd5_master/index.html create mode 100644 2025-02-06-115547-14435-1@b1965751dcd5_master/output_b1965751dcd5a6db17ae755139e63f860425ebf2 create mode 100644 2025-02-06-115547-14435-1@b1965751dcd5_master/report-37cb39.html create mode 100644 2025-02-06-115547-14435-1@b1965751dcd5_master/report-523ef4.html create mode 100644 2025-02-06-115547-14435-1@b1965751dcd5_master/report-5ce420.html create mode 100644 2025-02-06-115547-14435-1@b1965751dcd5_master/report-5d4bc8.html create mode 100644 2025-02-06-115547-14435-1@b1965751dcd5_master/report-891289.html create mode 100644 2025-02-06-115547-14435-1@b1965751dcd5_master/report-9361af.html create mode 100644 2025-02-06-115547-14435-1@b1965751dcd5_master/report-b4532a.html create mode 100644 2025-02-06-115547-14435-1@b1965751dcd5_master/report-c098bd.html create mode 100644 2025-02-06-115547-14435-1@b1965751dcd5_master/report-e0f2de.html create mode 100644 2025-02-06-115547-14435-1@b1965751dcd5_master/report-fb6164.html create mode 100644 2025-02-06-115547-14435-1@b1965751dcd5_master/report-ff92e7.html create mode 100644 2025-02-06-115547-14435-1@b1965751dcd5_master/scanview.css create mode 100644 2025-02-06-115547-14435-1@b1965751dcd5_master/sorttable.js create mode 100644 2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/0.html create mode 100644 2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/1.html create mode 100644 2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/2.html create mode 100644 2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/3.html create mode 100644 2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/4.html create mode 100644 2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/5.html create mode 100644 2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/6.html create mode 100644 2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/7.html create mode 100644 2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/commitmsg create mode 100644 2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/index.html create mode 100644 2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/output_b1965751dcd5a6db17ae755139e63f860425ebf2 create mode 100644 2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/stats.html create mode 100644 2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/style.css create mode 100644 2025-02-06-151929-14522-1@8369334ba1f3_devel/commitmsg create mode 100644 2025-02-06-151929-14522-1@8369334ba1f3_devel/index.html create mode 100644 2025-02-06-151929-14522-1@8369334ba1f3_devel/output_8369334ba1f33885257d28de0c8869ad0780c640 create mode 100644 2025-02-06-151929-14522-1@8369334ba1f3_devel/report-37cb39.html create mode 100644 2025-02-06-151929-14522-1@8369334ba1f3_devel/report-523ef4.html create mode 100644 2025-02-06-151929-14522-1@8369334ba1f3_devel/report-5ce420.html create mode 100644 2025-02-06-151929-14522-1@8369334ba1f3_devel/report-5d4bc8.html create mode 100644 2025-02-06-151929-14522-1@8369334ba1f3_devel/report-891289.html create mode 100644 2025-02-06-151929-14522-1@8369334ba1f3_devel/report-9361af.html create mode 100644 2025-02-06-151929-14522-1@8369334ba1f3_devel/report-b4532a.html create mode 100644 2025-02-06-151929-14522-1@8369334ba1f3_devel/report-c098bd.html create mode 100644 2025-02-06-151929-14522-1@8369334ba1f3_devel/report-e0f2de.html create mode 100644 2025-02-06-151929-14522-1@8369334ba1f3_devel/report-fb6164.html create mode 100644 2025-02-06-151929-14522-1@8369334ba1f3_devel/report-ff92e7.html create mode 100644 2025-02-06-151929-14522-1@8369334ba1f3_devel/scanview.css create mode 100644 2025-02-06-151929-14522-1@8369334ba1f3_devel/sorttable.js create mode 100644 2025-02-06-152034-14522-1@76170f64aaf1_devel/commitmsg create mode 100644 2025-02-06-152034-14522-1@76170f64aaf1_devel/index.html create mode 100644 2025-02-06-152034-14522-1@76170f64aaf1_devel/output_76170f64aaf12527a5400b10171e2b01d43a5d7b create mode 100644 2025-02-06-152034-14522-1@76170f64aaf1_devel/report-37cb39.html create mode 100644 2025-02-06-152034-14522-1@76170f64aaf1_devel/report-523ef4.html create mode 100644 2025-02-06-152034-14522-1@76170f64aaf1_devel/report-5ce420.html create mode 100644 2025-02-06-152034-14522-1@76170f64aaf1_devel/report-5d4bc8.html create mode 100644 2025-02-06-152034-14522-1@76170f64aaf1_devel/report-891289.html create mode 100644 2025-02-06-152034-14522-1@76170f64aaf1_devel/report-9361af.html create mode 100644 2025-02-06-152034-14522-1@76170f64aaf1_devel/report-b4532a.html create mode 100644 2025-02-06-152034-14522-1@76170f64aaf1_devel/report-c098bd.html create mode 100644 2025-02-06-152034-14522-1@76170f64aaf1_devel/report-e0f2de.html create mode 100644 2025-02-06-152034-14522-1@76170f64aaf1_devel/report-fb6164.html create mode 100644 2025-02-06-152034-14522-1@76170f64aaf1_devel/report-ff92e7.html create mode 100644 2025-02-06-152034-14522-1@76170f64aaf1_devel/scanview.css create mode 100644 2025-02-06-152034-14522-1@76170f64aaf1_devel/sorttable.js create mode 100644 2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/0.html create mode 100644 2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/1.html create mode 100644 2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/2.html create mode 100644 2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/3.html create mode 100644 2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/4.html create mode 100644 2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/5.html create mode 100644 2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/6.html create mode 100644 2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/7.html create mode 100644 2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/commitmsg create mode 100644 2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/index.html create mode 100644 2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/output_8369334ba1f33885257d28de0c8869ad0780c640 create mode 100644 2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/stats.html create mode 100644 2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/style.css create mode 100644 2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/0.html create mode 100644 2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/1.html create mode 100644 2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/2.html create mode 100644 2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/3.html create mode 100644 2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/4.html create mode 100644 2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/5.html create mode 100644 2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/6.html create mode 100644 2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/7.html create mode 100644 2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/commitmsg create mode 100644 2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/index.html create mode 100644 2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/output_76170f64aaf12527a5400b10171e2b01d43a5d7b create mode 100644 2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/stats.html create mode 100644 2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/style.css create mode 100644 2025-02-06-152308-14522-1@ae3358295c1f_devel/commitmsg create mode 100644 2025-02-06-152308-14522-1@ae3358295c1f_devel/index.html create mode 100644 2025-02-06-152308-14522-1@ae3358295c1f_devel/output_ae3358295c1fa22b559fc9fea848e0bb4f3741f8 create mode 100644 2025-02-06-152308-14522-1@ae3358295c1f_devel/report-37cb39.html create mode 100644 2025-02-06-152308-14522-1@ae3358295c1f_devel/report-523ef4.html create mode 100644 2025-02-06-152308-14522-1@ae3358295c1f_devel/report-5ce420.html create mode 100644 2025-02-06-152308-14522-1@ae3358295c1f_devel/report-5d4bc8.html create mode 100644 2025-02-06-152308-14522-1@ae3358295c1f_devel/report-891289.html create mode 100644 2025-02-06-152308-14522-1@ae3358295c1f_devel/report-9361af.html create mode 100644 2025-02-06-152308-14522-1@ae3358295c1f_devel/report-b4532a.html create mode 100644 2025-02-06-152308-14522-1@ae3358295c1f_devel/report-c098bd.html create mode 100644 2025-02-06-152308-14522-1@ae3358295c1f_devel/report-e0f2de.html create mode 100644 2025-02-06-152308-14522-1@ae3358295c1f_devel/report-fb6164.html create mode 100644 2025-02-06-152308-14522-1@ae3358295c1f_devel/report-ff92e7.html create mode 100644 2025-02-06-152308-14522-1@ae3358295c1f_devel/scanview.css create mode 100644 2025-02-06-152308-14522-1@ae3358295c1f_devel/sorttable.js create mode 100644 2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/0.html create mode 100644 2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/1.html create mode 100644 2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/2.html create mode 100644 2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/3.html create mode 100644 2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/4.html create mode 100644 2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/5.html create mode 100644 2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/6.html create mode 100644 2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/7.html create mode 100644 2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/commitmsg create mode 100644 2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/index.html create mode 100644 2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/output_ae3358295c1fa22b559fc9fea848e0bb4f3741f8 create mode 100644 2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/stats.html create mode 100644 2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/style.css create mode 100644 2025-02-06-153413-14522-1@1eab72938451_devel/commitmsg create mode 100644 2025-02-06-153413-14522-1@1eab72938451_devel/index.html create mode 100644 2025-02-06-153413-14522-1@1eab72938451_devel/output_1eab72938451cf1abc040f3d639aae6d9cbfd748 create mode 100644 2025-02-06-153413-14522-1@1eab72938451_devel/report-37cb39.html create mode 100644 2025-02-06-153413-14522-1@1eab72938451_devel/report-523ef4.html create mode 100644 2025-02-06-153413-14522-1@1eab72938451_devel/report-5ce420.html create mode 100644 2025-02-06-153413-14522-1@1eab72938451_devel/report-5d4bc8.html create mode 100644 2025-02-06-153413-14522-1@1eab72938451_devel/report-891289.html create mode 100644 2025-02-06-153413-14522-1@1eab72938451_devel/report-9361af.html create mode 100644 2025-02-06-153413-14522-1@1eab72938451_devel/report-b4532a.html create mode 100644 2025-02-06-153413-14522-1@1eab72938451_devel/report-c098bd.html create mode 100644 2025-02-06-153413-14522-1@1eab72938451_devel/report-e0f2de.html create mode 100644 2025-02-06-153413-14522-1@1eab72938451_devel/report-fb6164.html create mode 100644 2025-02-06-153413-14522-1@1eab72938451_devel/report-ff92e7.html create mode 100644 2025-02-06-153413-14522-1@1eab72938451_devel/scanview.css create mode 100644 2025-02-06-153413-14522-1@1eab72938451_devel/sorttable.js create mode 100644 2025-02-06-153544-5624-cppcheck@1eab72938451_devel/0.html create mode 100644 2025-02-06-153544-5624-cppcheck@1eab72938451_devel/1.html create mode 100644 2025-02-06-153544-5624-cppcheck@1eab72938451_devel/2.html create mode 100644 2025-02-06-153544-5624-cppcheck@1eab72938451_devel/3.html create mode 100644 2025-02-06-153544-5624-cppcheck@1eab72938451_devel/4.html create mode 100644 2025-02-06-153544-5624-cppcheck@1eab72938451_devel/5.html create mode 100644 2025-02-06-153544-5624-cppcheck@1eab72938451_devel/6.html create mode 100644 2025-02-06-153544-5624-cppcheck@1eab72938451_devel/7.html create mode 100644 2025-02-06-153544-5624-cppcheck@1eab72938451_devel/commitmsg create mode 100644 2025-02-06-153544-5624-cppcheck@1eab72938451_devel/index.html create mode 100644 2025-02-06-153544-5624-cppcheck@1eab72938451_devel/output_1eab72938451cf1abc040f3d639aae6d9cbfd748 create mode 100644 2025-02-06-153544-5624-cppcheck@1eab72938451_devel/stats.html create mode 100644 2025-02-06-153544-5624-cppcheck@1eab72938451_devel/style.css create mode 100644 2025-02-06-164253-14522-1@28c310f42d33_devel/commitmsg create mode 100644 2025-02-06-164253-14522-1@28c310f42d33_devel/index.html create mode 100644 2025-02-06-164253-14522-1@28c310f42d33_devel/output_28c310f42d337eadca7386aeed5be91417c339a2 create mode 100644 2025-02-06-164253-14522-1@28c310f42d33_devel/report-37cb39.html create mode 100644 2025-02-06-164253-14522-1@28c310f42d33_devel/report-523ef4.html create mode 100644 2025-02-06-164253-14522-1@28c310f42d33_devel/report-5ce420.html create mode 100644 2025-02-06-164253-14522-1@28c310f42d33_devel/report-5d4bc8.html create mode 100644 2025-02-06-164253-14522-1@28c310f42d33_devel/report-891289.html create mode 100644 2025-02-06-164253-14522-1@28c310f42d33_devel/report-9361af.html create mode 100644 2025-02-06-164253-14522-1@28c310f42d33_devel/report-b4532a.html create mode 100644 2025-02-06-164253-14522-1@28c310f42d33_devel/report-c098bd.html create mode 100644 2025-02-06-164253-14522-1@28c310f42d33_devel/report-e0f2de.html create mode 100644 2025-02-06-164253-14522-1@28c310f42d33_devel/report-fb6164.html create mode 100644 2025-02-06-164253-14522-1@28c310f42d33_devel/report-ff92e7.html create mode 100644 2025-02-06-164253-14522-1@28c310f42d33_devel/scanview.css create mode 100644 2025-02-06-164253-14522-1@28c310f42d33_devel/sorttable.js create mode 100644 2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/0.html create mode 100644 2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/1.html create mode 100644 2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/2.html create mode 100644 2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/3.html create mode 100644 2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/4.html create mode 100644 2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/5.html create mode 100644 2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/6.html create mode 100644 2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/7.html create mode 100644 2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/commitmsg create mode 100644 2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/index.html create mode 100644 2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/output_28c310f42d337eadca7386aeed5be91417c339a2 create mode 100644 2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/stats.html create mode 100644 2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/style.css create mode 100644 2025-02-06-165351-14522-1@28c310f42d33_devel/commitmsg create mode 100644 2025-02-06-165351-14522-1@28c310f42d33_devel/index.html create mode 100644 2025-02-06-165351-14522-1@28c310f42d33_devel/output_28c310f42d337eadca7386aeed5be91417c339a2 create mode 100644 2025-02-06-165351-14522-1@28c310f42d33_devel/report-37cb39.html create mode 100644 2025-02-06-165351-14522-1@28c310f42d33_devel/report-523ef4.html create mode 100644 2025-02-06-165351-14522-1@28c310f42d33_devel/report-5ce420.html create mode 100644 2025-02-06-165351-14522-1@28c310f42d33_devel/report-5d4bc8.html create mode 100644 2025-02-06-165351-14522-1@28c310f42d33_devel/report-891289.html create mode 100644 2025-02-06-165351-14522-1@28c310f42d33_devel/report-9361af.html create mode 100644 2025-02-06-165351-14522-1@28c310f42d33_devel/report-b4532a.html create mode 100644 2025-02-06-165351-14522-1@28c310f42d33_devel/report-c098bd.html create mode 100644 2025-02-06-165351-14522-1@28c310f42d33_devel/report-e0f2de.html create mode 100644 2025-02-06-165351-14522-1@28c310f42d33_devel/report-fb6164.html create mode 100644 2025-02-06-165351-14522-1@28c310f42d33_devel/report-ff92e7.html create mode 100644 2025-02-06-165351-14522-1@28c310f42d33_devel/scanview.css create mode 100644 2025-02-06-165351-14522-1@28c310f42d33_devel/sorttable.js create mode 100644 2025-02-06-165420-14522-1@28c310f42d33_master/commitmsg create mode 100644 2025-02-06-165420-14522-1@28c310f42d33_master/index.html create mode 100644 2025-02-06-165420-14522-1@28c310f42d33_master/output_28c310f42d337eadca7386aeed5be91417c339a2 create mode 100644 2025-02-06-165420-14522-1@28c310f42d33_master/report-37cb39.html create mode 100644 2025-02-06-165420-14522-1@28c310f42d33_master/report-523ef4.html create mode 100644 2025-02-06-165420-14522-1@28c310f42d33_master/report-5ce420.html create mode 100644 2025-02-06-165420-14522-1@28c310f42d33_master/report-5d4bc8.html create mode 100644 2025-02-06-165420-14522-1@28c310f42d33_master/report-891289.html create mode 100644 2025-02-06-165420-14522-1@28c310f42d33_master/report-9361af.html create mode 100644 2025-02-06-165420-14522-1@28c310f42d33_master/report-b4532a.html create mode 100644 2025-02-06-165420-14522-1@28c310f42d33_master/report-c098bd.html create mode 100644 2025-02-06-165420-14522-1@28c310f42d33_master/report-e0f2de.html create mode 100644 2025-02-06-165420-14522-1@28c310f42d33_master/report-fb6164.html create mode 100644 2025-02-06-165420-14522-1@28c310f42d33_master/report-ff92e7.html create mode 100644 2025-02-06-165420-14522-1@28c310f42d33_master/scanview.css create mode 100644 2025-02-06-165420-14522-1@28c310f42d33_master/sorttable.js create mode 100644 2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/0.html create mode 100644 2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/1.html create mode 100644 2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/2.html create mode 100644 2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/3.html create mode 100644 2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/4.html create mode 100644 2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/5.html create mode 100644 2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/6.html create mode 100644 2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/7.html create mode 100644 2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/commitmsg create mode 100644 2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/index.html create mode 100644 2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/output_28c310f42d337eadca7386aeed5be91417c339a2 create mode 100644 2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/stats.html create mode 100644 2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/style.css create mode 100644 2025-02-06-165554-7340-cppcheck@28c310f42d33_master/0.html create mode 100644 2025-02-06-165554-7340-cppcheck@28c310f42d33_master/1.html create mode 100644 2025-02-06-165554-7340-cppcheck@28c310f42d33_master/2.html create mode 100644 2025-02-06-165554-7340-cppcheck@28c310f42d33_master/3.html create mode 100644 2025-02-06-165554-7340-cppcheck@28c310f42d33_master/4.html create mode 100644 2025-02-06-165554-7340-cppcheck@28c310f42d33_master/5.html create mode 100644 2025-02-06-165554-7340-cppcheck@28c310f42d33_master/6.html create mode 100644 2025-02-06-165554-7340-cppcheck@28c310f42d33_master/7.html create mode 100644 2025-02-06-165554-7340-cppcheck@28c310f42d33_master/commitmsg create mode 100644 2025-02-06-165554-7340-cppcheck@28c310f42d33_master/index.html create mode 100644 2025-02-06-165554-7340-cppcheck@28c310f42d33_master/output_28c310f42d337eadca7386aeed5be91417c339a2 create mode 100644 2025-02-06-165554-7340-cppcheck@28c310f42d33_master/stats.html create mode 100644 2025-02-06-165554-7340-cppcheck@28c310f42d33_master/style.css create mode 100644 index.html create mode 100644 output_28c310f42d337eadca7386aeed5be91417c339a2 diff --git a/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/commitmsg b/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/commitmsg new file mode 100644 index 0000000..4f53c3a --- /dev/null +++ b/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/commitmsg @@ -0,0 +1 @@ +Remove unused macros diff --git a/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/index.html b/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/index.html new file mode 100644 index 0000000..31f9b35 --- /dev/null +++ b/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/index.html @@ -0,0 +1,138 @@ + + +libcafekbd (clang-tools 1:19.0-63) - scan-build results + + + + + + +

libcafekbd (clang-tools 1:19.0-63) - scan-build results

+ + + + + + + +
User:root@95a66f2db278
Working Directory:/rootdir
Command Line:make -j 5
Clang Version:Debian clang version 19.1.6 (1+b1) +
Date:Thu Feb 6 11:20:17 2025
+

Bug Summary

+ + + + + + + + + +
Bug TypeQuantityDisplay?
All Bugs11
Logic error
Dereference of null pointer1
Stream handling error
Invalid stream state1
Stream already in EOF1
Unused code
Unreachable code8
+ +

Filter Results by File

+ + +

Reports

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Bug GroupBug Type ▾FileFunction/MethodLinePath Length
Logic errorDereference of null pointerlibcafekbd/tmp-introspect60diyfjp/Cafekbd-1.0.cmain81232View Report
Stream handling errorInvalid stream statelibcafekbd/tmp-introspect60diyfjp/Cafekbd-1.0.cread_line8933View Report
Stream handling errorStream already in EOFlibcafekbd/tmp-introspect60diyfjp/Cafekbd-1.0.cread_line8933View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2481View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain1991View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain1941View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2281View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain1871View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2251View Report
Unused codeUnreachable codelibcafekbd/tmp-introspect60diyfjp/Cafekbd-1.0.cvalue_to_string2391View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2561View Report
+ + diff --git a/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/output_1b95ca5afa730cb83eb934179e2c52e578ec9a09 b/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/output_1b95ca5afa730cb83eb934179e2c52e578ec9a09 new file mode 100644 index 0000000..c30ea4f --- /dev/null +++ b/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/output_1b95ca5afa730cb83eb934179e2c52e578ec9a09 @@ -0,0 +1,1877 @@ +Checking libcafekbd/cafekbd-desktop-config.c ... +libcafekbd/cafekbd-desktop-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +1/10 files checked 4% done +Checking libcafekbd/cafekbd-indicator-config.c ... +libcafekbd/cafekbd-indicator-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +2/10 files checked 10% done +Checking libcafekbd/cafekbd-indicator.c ... +libcafekbd/cafekbd-indicator.c:66:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdIndicator, cafekbd_indicator, CTK_TYPE_NOTEBOOK) +^ +3/10 files checked 24% done +Checking libcafekbd/cafekbd-keyboard-config.c ... +libcafekbd/cafekbd-keyboard-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-config.c:67:8: style: Condition '*l1' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:67:15: style: Condition '*l2' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:227:16: style: Condition 'option!=NULL' is always true [knownConditionTrueFalse] + (option != NULL) ? strchr (option, ':') : NULL; + ^ +libcafekbd/cafekbd-keyboard-config.c:282:18: style: Condition 'variant==NULL' is always false [knownConditionTrueFalse] + (variant == + ^ +libcafekbd/cafekbd-keyboard-config.c:226:10: style: Variable 'delim' can be declared as pointer to const [constVariablePointer] + char *delim = + ^ +libcafekbd/cafekbd-keyboard-config.c:609:65: style: Parameter 'kbd_config' can be declared as pointer to const [constParameterPointer] +cafekbd_keyboard_config_options_is_set (CafekbdKeyboardConfig * kbd_config, + ^ +4/10 files checked 36% done +Checking libcafekbd/cafekbd-keyboard-drawing.c ... +libcafekbd/cafekbd-keyboard-drawing.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-drawing.c:61:60: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_coord (CafekbdKeyboardDrawingRenderContext * context, gint n) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:67:61: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_double (CafekbdKeyboardDrawingRenderContext * context, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:625:51: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +set_markup (CafekbdKeyboardDrawingRenderContext * context, gchar *txt) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1026:11: style: Variable 'runp' can be declared as pointer to const [constVariablePointer] + GSList *runp; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1036:25: style: Variable 'geometry' can be declared as pointer to const [constVariablePointer] + PangoGlyphGeometry *geometry; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1202:39: style: Parameter 'outline' can be declared as pointer to const [constParameterPointer] +calc_origin_offset_x (XkbOutlineRec * outline) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1397:15: style: Variable 'shape' can be declared as pointer to const [constVariablePointer] + XkbShapeRec *shape; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: style: Parameter 'drawing' can be declared as pointer to const. However it seems that 'button_press_event' is a callback function, if 'drawing' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2343:18: note: You might need to cast the function pointer here + G_CALLBACK (button_press_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: note: Parameter 'drawing' can be declared as pointer to const + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: style: Parameter 'event' can be declared as pointer to const. However it seems that 'focus_event' is a callback function, if 'event' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2347:18: note: You might need to cast the function pointer here + G_CALLBACK (focus_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: note: Parameter 'event' can be declared as pointer to const + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: style: Parameter 'a' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'a' is declared with const you might also need to cast function pointer(s). [constParameterCallback] +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: note: Parameter 'a' can be declared as pointer to const +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: style: Parameter 'b' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'b' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: note: Parameter 'b' can be declared as pointer to const + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1863:9: style: Variable 'pind' can be declared as pointer to const [constVariablePointer] + Atom *pind = drawing->xkb->names->indicators; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2124:60: style: Parameter 'iev' can be declared as pointer to const [constParameterPointer] +process_indicators_state_notify (XkbIndicatorNotifyEvent * iev, + ^ +Checking libcafekbd/cafekbd-keyboard-drawing.c: KBDRAW_DEBUG... +5/10 files checked 77% done +Checking libcafekbd/cafekbd-status.c ... +libcafekbd/cafekbd-status.c:82:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdStatus, cafekbd_status, CTK_TYPE_STATUS_ICON) +^ +6/10 files checked 91% done +Checking libcafekbd/cafekbd-util.c ... +7/10 files checked 93% done +Checking test/cafekbd-indicator-test.c ... +8/10 files checked 94% done +Checking test/cafekbd-keyboard-drawing-test.c ... +test/cafekbd-keyboard-drawing-test.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +Checking test/cafekbd-keyboard-drawing-test.c: HAVE_CONFIG_H... +9/10 files checked 99% done +Checking test/cafekbd-status-test.c ... +test/cafekbd-status-test.c:42:17: style: Variable 'icon' can be declared as pointer to const [constVariablePointer] + CtkStatusIcon *icon; + ^ +10/10 files checked 100% done +nofile:0:0: information: Active checkers: There was critical errors (use --checkers-report= to see details) [checkersReport] + +/usr/bin/cafe-autogen +checking for autoreconf >= 2.53... + testing autoreconf... found 2.72 +checking for pkg-config >= 0.14.0... + testing pkg-config... found 1.8.1 +checking for cafe-common >= 0.0.1... + testing cafe-doc-common... found 2.0.0 +Checking for required M4 macros... +Checking for forbidden M4 macros... +Processing ./configure.ac +Running cafe-doc-common... +Running autoreconf... +autoreconf: export WARNINGS=no-portability +autoreconf: Entering directory '.' +autoreconf: running: autopoint --force +Copying file ABOUT-NLS +Copying file config.rpath +Copying file m4/codeset.m4 +Copying file m4/extern-inline.m4 +Copying file m4/fcntl-o.m4 +Copying file m4/gettext.m4 +Copying file m4/glibc2.m4 +Copying file m4/glibc21.m4 +Copying file m4/iconv.m4 +Copying file m4/intdiv0.m4 +Copying file m4/intl.m4 +Copying file m4/intldir.m4 +Copying file m4/intlmacosx.m4 +Copying file m4/intmax.m4 +Copying file m4/inttypes-pri.m4 +Copying file m4/inttypes_h.m4 +Copying file m4/lcmessage.m4 +Copying file m4/lib-ld.m4 +Copying file m4/lib-link.m4 +Copying file m4/lib-prefix.m4 +Copying file m4/lock.m4 +Copying file m4/longlong.m4 +Copying file m4/nls.m4 +Copying file m4/po.m4 +Copying file m4/printf-posix.m4 +Copying file m4/progtest.m4 +Copying file m4/size_max.m4 +Copying file m4/stdint_h.m4 +Copying file m4/threadlib.m4 +Copying file m4/uintmax_t.m4 +Copying file m4/visibility.m4 +Copying file m4/wchar_t.m4 +Copying file m4/wint_t.m4 +Copying file m4/xsize.m4 +Copying file po/Makefile.in.in +Copying file po/Makevars.template +Copying file po/Rules-quot +Copying file po/boldquot.sed +Copying file po/en@boldquot.header +Copying file po/en@quot.header +Copying file po/insert-header.sin +Copying file po/quot.sed +Copying file po/remove-potcdate.sin +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: configure.ac: tracing +autoreconf: running: libtoolize --copy --force +libtoolize: putting auxiliary files in '.'. +libtoolize: copying file './ltmain.sh' +libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. +libtoolize: copying file 'm4/libtool.m4' +libtoolize: copying file 'm4/ltoptions.m4' +libtoolize: copying file 'm4/ltsugar.m4' +libtoolize: copying file 'm4/ltversion.m4' +libtoolize: copying file 'm4/lt~obsolete.m4' +autoreconf: configure.ac: not using Intltool +autoreconf: configure.ac: not using Gtkdoc +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: running: /usr/bin/autoconf --force +autoreconf: running: /usr/bin/autoheader --force +autoreconf: running: automake --add-missing --copy --force-missing +configure.ac:31: installing './compile' +configure.ac:34: installing './config.guess' +configure.ac:34: installing './config.sub' +configure.ac:16: installing './install-sh' +configure.ac:16: installing './missing' +Makefile.am: installing './INSTALL' +libcafekbd/Makefile.am: installing './depcomp' +autoreconf: Leaving directory '.' +Skipping configure process. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +checking for a BSD-compatible install... /usr/bin/install -c +checking whether build environment is sane... yes +checking for a race-free mkdir -p... /usr/bin/mkdir -p +checking for gawk... no +checking for mawk... mawk +checking whether make sets $(MAKE)... yes +checking whether make supports nested variables... yes +checking whether make supports nested variables... (cached) yes +checking whether make supports the include directive... yes (GNU style) +checking for gcc... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the C compiler works... yes +checking for C compiler default output file name... a.out +checking for suffix of executables... +checking whether we are cross compiling... no +checking for suffix of object files... o +checking whether the compiler supports GNU C... yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... rm: cannot remove 'conftest.plist': Is a directory +yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... gcc3 +checking whether C compiler accepts -Werror=unknown-warning-option... no +checking whether C compiler accepts -Wall... yes +checking whether C compiler accepts -Wmissing-prototypes... yes +checking whether C compiler accepts -Wbad-function-cast... yes +checking whether C compiler accepts -Wcast-align... yes +checking whether C compiler accepts -Wextra... yes +checking whether C compiler accepts -Wformat-nonliteral... yes +checking whether C compiler accepts -Wmissing-declarations... yes +checking whether C compiler accepts -Wnested-externs... yes +checking whether C compiler accepts -Wpointer-arith... yes +checking whether C compiler accepts -Wredundant-decls... yes +checking whether C compiler accepts -Wshadow... yes +checking whether C compiler accepts -Wstrict-prototypes... yes +checking whether C compiler accepts -Wunused-macros... yes +checking whether C compiler accepts -Werror=format-security... yes +checking whether C compiler accepts -fstrict-aliasing... yes +checking flags to pass to the C compiler /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing +checking for gcc... (cached) /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the compiler supports GNU C... (cached) yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... (cached) yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... (cached) none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... (cached) yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... (cached) gcc3 +checking build system type... x86_64-pc-linux-gnu +checking host system type... x86_64-pc-linux-gnu +checking how to print strings... printf +checking for a sed that does not truncate output... /usr/bin/sed +checking for grep that handles long lines and -e... /usr/bin/grep +checking for egrep... /usr/bin/grep -E +checking for fgrep... /usr/bin/grep -F +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld +checking if the linker (/usr/bin/ld) is GNU ld... yes +checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B +checking the name lister (/usr/bin/nm -B) interface... rm: cannot remove 'conftest.plist': Is a directory +BSD nm +checking whether ln -s works... yes +checking the maximum length of command line arguments... 3145728 +checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop +checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop +checking for /usr/bin/ld option to reload object files... -r +checking for file... file +checking for objdump... objdump +checking how to recognize dependent libraries... pass_all +checking for dlltool... no +checking how to associate runtime and link libraries... printf %s\n +checking for ranlib... ranlib +checking for ar... ar +checking for archiver @FILE support... rm: cannot remove 'conftest.plist': Is a directory +@ +checking for strip... strip +checking command to parse /usr/bin/nm -B output from /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer object... rm: cannot remove 'conftest.plist': Is a directory +ok +checking for sysroot... no +checking for a working dd... /usr/bin/dd +checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1 +checking for mt... no +checking if : is a manifest tool... no +checking for stdio.h... yes +checking for stdlib.h... yes +checking for string.h... yes +checking for inttypes.h... yes +checking for stdint.h... yes +checking for strings.h... yes +checking for sys/stat.h... yes +checking for sys/types.h... yes +checking for unistd.h... yes +checking for dlfcn.h... yes +checking for objdir... .libs +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -fno-rtti -fno-exceptions... no +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to produce PIC... -fPIC -DPIC +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer PIC flag -fPIC -DPIC works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer static flag -static works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... (cached) yes +checking whether the /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes +checking whether -lc should be explicitly linked in... no +checking dynamic linker characteristics... GNU/Linux ld.so +checking how to hardcode library paths into programs... immediate +checking whether stripping libraries is possible... yes +checking if libtool supports shared libraries... yes +checking whether to build shared libraries... yes +checking whether to build static libraries... yes +checking whether NLS is requested... yes +checking for msgfmt... /usr/bin/msgfmt +checking for gmsgfmt... /usr/bin/msgfmt +checking for xgettext... /usr/bin/xgettext +checking for msgmerge... /usr/bin/msgmerge +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld -m elf_x86_64 +checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes +checking for shared library run path origin... done +checking how to run the C preprocessor... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer -E +checking for egrep -e... (cached) /usr/bin/grep -E +checking for CFPreferencesCopyAppValue... no +checking for CFLocaleCopyCurrent... no +checking for GNU gettext in libc... yes +checking whether to use NLS... yes +checking where the gettext function comes from... libc +checking for glib-compile-resources... /usr/bin/glib-compile-resources +checking for xmllint... /usr/bin/xmllint +checking for setlocale... yes +checking for pkg-config... /usr/bin/pkg-config +checking pkg-config is at least version 0.9.0... yes +checking for glib-2.0 >= 2.50.0... yes +checking for gmodule-2.0... yes +checking for gio-2.0 >= 2.25.0... yes +checking for cdk-3.0 >= 3.22.0... yes +checking for ctk+-3.0 >= 3.22.0 cdk-x11-3.0 >= 3.22.0... yes +checking for libxklavier >= 5.2... yes +checking for X... libraries , headers +checking for gethostbyname... yes +checking for connect... yes +checking for remove... yes +checking for shmat... yes +checking for IceConnectionNumber in -lICE... yes +checking for pkg-config... (cached) /usr/bin/pkg-config +checking pkg-config is at least version 0.16... yes +checking for library containing sqrt... -lm +checking for gobject-introspection... yes +checking that generated files are newer than configure... done +configure: creating ./config.status +config.status: creating Makefile +config.status: creating libcafekbd.pc +config.status: creating libcafekbdui.pc +config.status: creating po/Makefile.in +config.status: creating libcafekbd/Makefile +config.status: creating libcafekbd/org.cafe.peripherals-keyboard-xkb.gschema.xml +config.status: creating test/Makefile +config.status: creating config.h +config.status: executing depfiles commands +config.status: executing libtool commands +config.status: executing po-directories commands +config.status: creating po/POTFILES +config.status: creating po/Makefile + +Configuration: + + prefix: /usr + exec_prefix: ${prefix} + libdir: ${exec_prefix}/lib + bindir: ${exec_prefix}/bin + sbindir: ${exec_prefix}/sbin + sysconfdir: ${prefix}/etc + datadir: ${datarootdir} + source code location: . + compiler: /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer + cflags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + Warning flags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + +scan-build: Analysis run complete. +scan-build: Removing directory '/tmp/scan-build-2025-02-06-112007-11799-1' because it contains no reports. +scan-build: No bugs found. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +make all-recursive +make[1]: Entering directory '/rootdir' +Making all in po +make[2]: Entering directory '/rootdir/po' +make libcafekbd.pot-update +make[3]: Entering directory '/rootdir/po' +sed -e '/^#/d' remove-potcdate.sin > t-remove-potcdate.sed +mv t-remove-potcdate.sed remove-potcdate.sed +package_gnu=""; \ +test -n "$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L .. -maxdepth 1 -type f \ + -size -10000000c -exec grep 'GNU libcafekbd' \ + /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU libcafekbd' ../* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ +}; \ +if test "$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ +else \ + package_prefix=''; \ +fi; \ +if test -n '' || test 'https://github.com/cafe-desktop/libcafekbd' = '@'PACKAGE_BUGREPORT'@'; then \ + msgid_bugs_address=''; \ +else \ + msgid_bugs_address='https://github.com/cafe-desktop/libcafekbd'; \ +fi; \ +case `/usr/bin/xgettext --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ + *) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --package-name="${package_prefix}libcafekbd" \ + --package-version='1.25.0' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ +esac +test ! -f libcafekbd.po || { \ + if test -f ./libcafekbd.pot-header; then \ + sed -e '1,/^#$/d' < libcafekbd.po > libcafekbd.1po && \ + cat ./libcafekbd.pot-header libcafekbd.1po > libcafekbd.po; \ + rm -f libcafekbd.1po; \ + fi; \ + if test -f ./libcafekbd.pot; then \ + sed -f remove-potcdate.sed < ./libcafekbd.pot > libcafekbd.1po && \ + sed -f remove-potcdate.sed < libcafekbd.po > libcafekbd.2po && \ + if cmp libcafekbd.1po libcafekbd.2po >/dev/null 2>&1; then \ + rm -f libcafekbd.1po libcafekbd.2po libcafekbd.po; \ + else \ + rm -f libcafekbd.1po libcafekbd.2po ./libcafekbd.pot && \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ + else \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ +} +make[3]: Leaving directory '/rootdir/po' +test ! -f ./libcafekbd.pot || \ + test -z "af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo" || make af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo +make[3]: Entering directory '/rootdir/po' +/usr/bin/msgmerge --update --quiet --lang=af af.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=am am.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=an an.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=as as.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ar ar.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ast ast.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=az az.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bg bg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn bn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=be be.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn_IN bn_IN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bs bs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=br br.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca ca.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca@valencia ca@valencia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cmn cmn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=crh crh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cs cs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=csb csb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cv cv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=da da.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cy cy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de de.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de_CH de_CH.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=dz dz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=el el.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_AU en_AU.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_CA en_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_GB en_GB.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eo eo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es es.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_419 es_419.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_AR es_AR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CL es_CL.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CO es_CO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CR es_CR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_DO es_DO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_EC es_EC.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_ES es_ES.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_MX es_MX.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_NI es_NI.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PA es_PA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PE es_PE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PR es_PR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_US es_US.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_SV es_SV.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_UY es_UY.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_VE es_VE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=et et.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eu eu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fa fa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fi fi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fil fil.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fo fo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr fr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr_CA fr_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=frp frp.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fur fur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fy fy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ga ga.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gd gd.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gl gl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gu gu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ha ha.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=he he.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hi hi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hu hu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hr hr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hy hy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ia ia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ie ie.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=id id.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ig ig.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=is is.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ja ja.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=it it.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=jv jv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ka ka.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kab kab.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kk kk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=km km.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kn kn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ko ko.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ks ks.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku ku.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku_IQ ku_IQ.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ky ky.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=la la.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lb lb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=li li.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lt lt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lv lv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lo lo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mai mai.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mg mg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mi mi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mk mk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ml ml.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mn mn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mr mr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ms ms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=my my.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nah nah.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nb nb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nds nds.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ne ne.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nn nn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nl nl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nqo nqo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nso nso.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=oc oc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=om om.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=or or.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pa pa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pl pl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pms pms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt pt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ps ps.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt_BR pt_BR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ro ro.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ru ru.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=rw rw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sc sc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sco sco.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=si si.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sk sk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=so so.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sl sl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sq sq.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr sr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr@latin sr@latin.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sv sv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sw sw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=te te.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ta ta.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tg tg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=th th.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tl tl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tk tk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tr tr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ts ts.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tt tt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ug ug.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uk uk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur_PK ur_PK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur ur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uz uz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=vi vi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=wa wa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yi yi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=xh xh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yo yo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_CN zh_CN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_TW zh_TW.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_HK zh_HK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zu zu.po libcafekbd.pot +rm -f af.gmo && /usr/bin/msgfmt -c --statistics --verbose -o af.gmo af.po +af.po: rm -f am.gmo && /usr/bin/msgfmt -c --statistics --verbose -o am.gmo am.po +7 translated messages, 84 untranslated messages. +am.po: 54 translated messages, 37 untranslated messages. +rm -f ar.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ar.gmo ar.po +rm -f an.gmo && /usr/bin/msgfmt -c --statistics --verbose -o an.gmo an.po +rm -f as.gmo && /usr/bin/msgfmt -c --statistics --verbose -o as.gmo as.po +rm -f az.gmo && /usr/bin/msgfmt -c --statistics --verbose -o az.gmo az.po +ar.po: 50 translated messages, 41 untranslated messages. +an.po:7: warning: header field 'Last-Translator' still has the initial default value +rm -f ast.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ast.gmo ast.po +an.po: 0 translated messages, 91 untranslated messages. +as.po: 41 translated messages, 50 untranslated messages. +az.po: 9 translated messages, 82 untranslated messages. +rm -f be.gmo && /usr/bin/msgfmt -c --statistics --verbose -o be.gmo be.po +ast.po: rm -f bg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bg.gmo bg.po +47 translated messages, 44 untranslated messages. +rm -f bn_IN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn_IN.gmo bn_IN.po +rm -f bn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn.gmo bn.po +be.po: 46 translated messages, 45 untranslated messages. +rm -f br.gmo && /usr/bin/msgfmt -c --statistics --verbose -o br.gmo br.po +bg.po: 54 translated messages, 37 untranslated messages. +bn_IN.po: 41 translated messages, 50 untranslated messages. +bn.po: 43 translated messages, 48 untranslated messages. +rm -f bs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bs.gmo bs.po +rm -f ca.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca.gmo ca.po +br.po: 20 translated messages, 71 untranslated messages. +rm -f cmn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cmn.gmo cmn.po +rm -f ca@valencia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca@valencia.gmo ca@valencia.po +ca.po: 87 translated messages, 4 untranslated messages. +bs.po: 25 translated messages, 66 untranslated messages. +ca@valencia.po: 54 translated messages, 37 untranslated messages. +rm -f crh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o crh.gmo crh.po +cmn.po: 46 translated messages, 45 untranslated messages. +rm -f cs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cs.gmo cs.po +rm -f cv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cv.gmo cv.po +rm -f csb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o csb.gmo csb.po +rm -f cy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cy.gmo cy.po +crh.po: 11 translated messages, 80 untranslated messages. +cs.po: 81 translated messages, 10 untranslated messages. +csb.po:7: warning: header field 'Last-Translator' still has the initial default value +csb.po: 0 translated messages, 91 untranslated messages. +cv.po: 0 translated messages, 91 untranslated messages. +rm -f da.gmo && /usr/bin/msgfmt -c --statistics --verbose -o da.gmo da.po +rm -f de.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de.gmo de.po +cy.po: 26 translated messages, 65 untranslated messages. +rm -f de_CH.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de_CH.gmo de_CH.po +rm -f dz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o dz.gmo dz.po +rm -f el.gmo && /usr/bin/msgfmt -c --statistics --verbose -o el.gmo el.po +de_CH.po: 0 translated messages, 91 untranslated messages. +da.po: 91 translated messagesde.po: 76 translated messages, 15 untranslated messages. +. +dz.po: 39 translated messages, 52 untranslated messages. +rm -f en_AU.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_AU.gmo en_AU.po +rm -f en_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_CA.gmo en_CA.po +el.po: 54 translated messages, 37 untranslated messages. +rm -f en_GB.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_GB.gmo en_GB.po +en_CA.po: 10 translated messages, 81 untranslated messages. +en_AU.po: 54 translated messages, 37 untranslated messages. +rm -f eo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eo.gmo eo.po +en_GB.po: 54 translated messages, 37 untranslated messages. +rm -f es.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es.gmo es.po +rm -f es_419.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_419.gmo es_419.po +rm -f es_AR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_AR.gmo es_AR.po +es.po: 89 translated messages, 2 untranslated messages. +eo.po: 52 translated messages, 39 untranslated messages. +rm -f es_CL.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CL.gmo es_CL.po +es_419.po: 0 translated messages, 91 untranslated messages. +rm -f es_CO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CO.gmo es_CO.po +es_AR.po: 21 translated messages, 70 untranslated messages. +rm -f es_CR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CR.gmo es_CR.po +es_CL.po: 3 translated messages, 88 untranslated messages. +rm -f es_DO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_DO.gmo es_DO.po +es_CO.po: 49 translated messages, 42 untranslated messages. +rm -f es_EC.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_EC.gmo es_EC.po +es_CR.po: 1 translated message, 90 untranslated messages. +rm -f es_ES.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_ES.gmo es_ES.po +rm -f es_MX.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_MX.gmo es_MX.po +es_DO.po: 1 translated message, 90 untranslated messages. +rm -f es_NI.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_NI.gmo es_NI.po +es_ES.po: 1 translated message, 90 untranslated messages. +rm -f es_PA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PA.gmo es_PA.po +es_EC.po: 1 translated message, 90 untranslated messages. +es_MX.po: 1 translated message, 90 untranslated messages. +es_NI.po: 1 translated message, 90 untranslated messages. +rm -f es_PE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PE.gmo es_PE.po +es_PA.po: rm -f es_SV.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_SV.gmo es_SV.po +1 translated message, 90 untranslated messages. +rm -f es_PR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PR.gmo es_PR.po +rm -f es_US.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_US.gmo es_US.po +es_PE.po: 1 translated message, 90 untranslated messages. +es_PR.po: 1 translated message, 90 untranslated messages. +es_SV.po: 1 translated message, 90 untranslated messages. +es_US.po: 0 translated messages, 91 untranslated messages. +rm -f es_UY.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_UY.gmo es_UY.po +rm -f es_VE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_VE.gmo es_VE.po +rm -f et.gmo && /usr/bin/msgfmt -c --statistics --verbose -o et.gmo et.po +rm -f fa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fa.gmo fa.po +rm -f eu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eu.gmo eu.po +es_UY.po: 1 translated message, 90 untranslated messages. +es_VE.po: 1 translated message, 90 untranslated messages. +et.po: 54 translated messages, 37 untranslated messages. +fa.po: 11 translated messages, 80 untranslated messages. +rm -f fi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fi.gmo fi.po +eu.po: 54 translated messages, 37 untranslated messages. +rm -f fo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fo.gmo fo.po +rm -f fil.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fil.gmo fil.po +rm -f fr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr.gmo fr.po +rm -f fr_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr_CA.gmo fr_CA.po +fi.po: 48 translated messages, 43 untranslated messages. +fo.po: 0 translated messages, 91 untranslated messages. +fil.po: 0 translated messages, 91 untranslated messages. +fr.po: 67 translated messages, 24 untranslated messages. +fr_CA.po: 3 translated messages, 88 untranslated messages. +rm -f frp.gmo && /usr/bin/msgfmt -c --statistics --verbose -o frp.gmo frp.po +rm -f fur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fur.gmo fur.po +rm -f fy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fy.gmo fy.po +rm -f gd.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gd.gmo gd.po +frp.po: 7 translated messages, 84 untranslated messages. +rm -f ga.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ga.gmo ga.po +fur.po: fy.po: 4 translated messages4 translated messages, 87 untranslated messages. +, 87 untranslated messages. +gd.po: 0 translated messages, 91 untranslated messages. +rm -f gl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gl.gmo gl.po +ga.po: 41 translated messages, 50 untranslated messages. +rm -f gu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gu.gmo gu.po +rm -f ha.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ha.gmo ha.po +rm -f he.gmo && /usr/bin/msgfmt -c --statistics --verbose -o he.gmo he.po +gl.po: 89 translated messages, 2 untranslated messages. +rm -f hi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hi.gmo hi.po +ha.po: 5 translated messages, 86 untranslated messages. +gu.po: 43 translated messages, 48 untranslated messages. +he.po: 54 translated messages, 37 untranslated messages. +rm -f hr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hr.gmo hr.po +hi.po: 45 translated messages, 46 untranslated messages. +rm -f hu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hu.gmo hu.po +rm -f hy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hy.gmo hy.po +rm -f ia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ia.gmo ia.po +hr.po: 54 translated messages, 37 untranslated messages. +rm -f id.gmo && /usr/bin/msgfmt -c --statistics --verbose -o id.gmo id.po +hu.po: 54 translated messages, 37 untranslated messages. +hy.po: 54 translated messages, 37 untranslated messages. +ia.po: 3 translated messages, 88 untranslated messages. +rm -f is.gmo && /usr/bin/msgfmt -c --statistics --verbose -o is.gmo is.po +rm -f ie.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ie.gmo ie.po +rm -f ig.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ig.gmo ig.po +id.po: 91 translated messages. +rm -f it.gmo && /usr/bin/msgfmt -c --statistics --verbose -o it.gmo it.po +is.po: 12 translated messages, 79 untranslated messages. +ie.po: 45 translated messages, 46 untranslated messages. +it.po: 91 translated messages. +rm -f ja.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ja.gmo ja.po +ig.po: 5 translated messages, 86 untranslated messages. +rm -f jv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o jv.gmo jv.po +rm -f ka.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ka.gmo ka.po +ja.po: 54 translated messages, 37 untranslated messages. +rm -f kab.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kab.gmo kab.po +rm -f kk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kk.gmo kk.po +jv.po: 2 translated messages, 89 untranslated messages. +kab.po: rm -f km.gmo && /usr/bin/msgfmt -c --statistics --verbose -o km.gmo km.po +4 translated messages, 87 untranslated messages. +ka.po: 37 translated messages, 54 untranslated messages. +kk.po: 24 translated messages, 67 untranslated messages. +rm -f kn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kn.gmo kn.po +km.po:7: warning: header field 'Last-Translator' still has the initial default value +km.po: 0 translated messages, 91 untranslated messages. +rm -f ks.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ks.gmo ks.po +rm -f ko.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ko.gmo ko.po +rm -f ku.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku.gmo ku.po +kn.po: 43 translated messages, 48 untranslated messages. +ks.po: 3 translated messages, 88 untranslated messages. +rm -f ku_IQ.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku_IQ.gmo ku_IQ.po +ko.po: 54 translated messages, 37 untranslated messages. +ku.po: 10 translated messages, 81 untranslated messages. +rm -f ky.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ky.gmo ky.po +rm -f la.gmo && /usr/bin/msgfmt -c --statistics --verbose -o la.gmo la.po +ku_IQ.po: 16 translated messages, 75 untranslated messages. +rm -f lb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lb.gmo lb.po +rm -f li.gmo && /usr/bin/msgfmt -c --statistics --verbose -o li.gmo li.po +ky.po: 26 translated messages, 65 untranslated messages. +la.po: 2 translated messages, 89 untranslated messages. +lb.po:7: warning: li.po:7: warning: header field 'Last-Translator' still has the initial default value +header field 'Last-Translator' still has the initial default value +rm -f lo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lo.gmo lo.po +li.po: 0 translated messages, 91 untranslated messages. +lb.po: 0 translated messages, 91 untranslated messages. +rm -f lt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lt.gmo lt.po +rm -f lv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lv.gmo lv.po +rm -f mai.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mai.gmo mai.po +lo.po:7: warning: header field 'Last-Translator' still has the initial default value +lo.po: rm -f mg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mg.gmo mg.po +0 translated messages, 91 untranslated messages. +lt.po: 91 translated messages. +lv.po: 49 translated messages, 42 untranslated messages. +mg.po: 10 translated messages, 81 untranslated messages. +rm -f mi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mi.gmo mi.po +mai.po: rm -f mk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mk.gmo mk.po +18 translated messages, 73 untranslated messages. +rm -f mn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mn.gmo mn.po +rm -f ml.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ml.gmo ml.po +mi.po:7: warning: header field 'Last-Translator' still has the initial default value +mi.po: 0 translated messages, 91 untranslated messages. +mk.po: 39 translated messages, 52 untranslated messages. +rm -f mr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mr.gmo mr.po +mn.po: 10 translated messages, 81 untranslated messages. +ml.po: 41 translated messages, 50 untranslated messages. +mr.po: 47 translated messages, 44 untranslated messages. +rm -f ms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ms.gmo ms.po +rm -f my.gmo && /usr/bin/msgfmt -c --statistics --verbose -o my.gmo my.po +rm -f nb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nb.gmo nb.po +rm -f nah.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nah.gmo nah.po +rm -f nds.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nds.gmo nds.po +my.po:7: warning: header field 'Last-Translator' still has the initial default value +my.po: 0 translated messages, 91 untranslated messages. +ms.po: 91 translated messages. +nb.po: 91 translated messages. +rm -f ne.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ne.gmo ne.po +nah.po: 0 translated messages, 91 untranslated messages. +nds.po: 12 translated messages, 79 untranslated messages. +rm -f nn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nn.gmo nn.po +ne.po: 13 translated messages, 78 untranslated messagesrm -f nl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nl.gmo nl.po +. +rm -f nqo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nqo.gmo nqo.po +rm -f nso.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nso.gmo nso.po +nl.po: 91 translated messages. +rm -f oc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o oc.gmo oc.po +nn.po: 40 translated messages, 51 untranslated messages. +nqo.po: 0 translated messages, 91 untranslated messages. +nso.po: 3 translated messages, 88 untranslated messages. +rm -f or.gmo && /usr/bin/msgfmt -c --statistics --verbose -o or.gmo or.po +rm -f om.gmo && /usr/bin/msgfmt -c --statistics --verbose -o om.gmo om.po +rm -f pa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pa.gmo pa.po +oc.po: 68 translated messages, 23 untranslated messages. +om.po: 0 translated messages, 91 untranslated messages. +rm -f pl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pl.gmo pl.po +pa.po: 46 translated messages, 45 untranslated messages. +or.po: 41 translated messages, 50 untranslated messages. +rm -f pms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pms.gmo pms.po +rm -f ps.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ps.gmo ps.po +pl.po: 55 translated messages, 36 untranslated messages. +rm -f pt_BR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt_BR.gmo pt_BR.po +rm -f pt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt.gmo pt.po +pms.po: 3 translated messages, 88 untranslated messages. +rm -f ro.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ro.gmo ro.po +ps.po: 6 translated messages, 85 untranslated messages. +pt.po: 84 translated messages, 7 untranslated messages. +pt_BR.po: 58 translated messages, 33 untranslated messages. +ro.po: 54 translated messages, 37 untranslated messages. +rm -f ru.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ru.gmo ru.po +rm -f rw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o rw.gmo rw.po +rm -f sc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sc.gmo sc.po +rm -f si.gmo && /usr/bin/msgfmt -c --statistics --verbose -o si.gmo si.po +rm -f sco.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sco.gmo sco.po +ru.po: 89 translated messages, 2 untranslated messages. +rw.po: 10 translated messages, 81 untranslated messages. +sc.po: 2 translated messages, 89 untranslated messages. +sco.po: 0 translated messages, 91 untranslated messages. +rm -f sk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sk.gmo sk.po +si.po: 36 translated messages, 55 untranslated messages. +rm -f sl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sl.gmo sl.po +rm -f so.gmo && /usr/bin/msgfmt -c --statistics --verbose -o so.gmo so.po +sk.po: 54 translated messages, 37 untranslated messages. +rm -f sq.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sq.gmo sq.po +rm -f sr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr.gmo sr.po +so.po: 0 translated messages, 91 untranslated messages. +sl.po: 55 translated messages, 36 untranslated messages. +rm -f sr@latin.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr@latin.gmo sr@latin.po +sq.po: 52 translated messages, 39 untranslated messages. +rm -f sv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sv.gmo sv.po +sr.po: 91 translated messages. +rm -f sw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sw.gmo sw.po +sv.po: 80 translated messages, 11 untranslated messages. +rm -f ta.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ta.gmo ta.po +sr@latin.po: 46 translated messages, 45 untranslated messages. +rm -f te.gmo && /usr/bin/msgfmt -c --statistics --verbose -o te.gmo te.po +sw.po: 0 translated messages, 91 untranslated messages. +rm -f tg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tg.gmo tg.po +rm -f th.gmo && /usr/bin/msgfmt -c --statistics --verbose -o th.gmo th.po +ta.po: 46 translated messages, 45 untranslated messages. +te.po: 41 translated messages, 50 untranslated messages. +rm -f tk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tk.gmo tk.po +tg.po: 0 translated messages, 91 untranslated messages. +rm -f tl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tl.gmo tl.po +rm -f tr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tr.gmo tr.po +th.po: 45 translated messages, 46 untranslated messages. +tk.po: 7 translated messages, 84 untranslated messages. +rm -f ts.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ts.gmo ts.po +tl.po: 0 translated messages, 91 untranslated messages. +tr.po: 58 translated messages, 33 untranslated messages. +rm -f tt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tt.gmo tt.po +rm -f ug.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ug.gmo ug.po +ts.po: 0 translated messages, 91 untranslated messages. +rm -f uk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uk.gmo uk.po +ug.po: 6 translated messages, 85 untranslated messages. +tt.po:7: warning: header field 'Last-Translator' still has the initial default value +tt.po: 0 translated messages, 91 untranslated messages. +rm -f ur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur.gmo ur.po +rm -f ur_PK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur_PK.gmo ur_PK.po +uk.po: 58 translated messages, 33 untranslated messages. +rm -f vi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o vi.gmo vi.po +ur.po: 7 translated messages, 84 untranslated messages. +ur_PK.po:7: warning: header field 'Last-Translator' still has the initial default value +ur_PK.po: 0 translated messages, 91 untranslated messages. +rm -f uz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uz.gmo uz.po +rm -f wa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o wa.gmo wa.po +vi.po: 52 translated messages, 39 untranslated messages. +rm -f xh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o xh.gmo xh.po +rm -f yi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yi.gmo yi.po +wa.po: 9 translated messages, 82 untranslated messages. +uz.po: 26 translated messages, 65 untranslated messages. +xh.po: 8 translated messages, 83 untranslated messages. +yi.po:7: warning: header field 'Last-Translator' still has the initial default value +yi.po: 0 translated messages, 91 untranslated messages. +rm -f yo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yo.gmo yo.po +rm -f zh_CN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_CN.gmo zh_CN.po +rm -f zh_HK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_HK.gmo zh_HK.po +rm -f zh_TW.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_TW.gmo zh_TW.po +zh_CN.po: 63 translated messages, 28 untranslated messages. +rm -f zu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zu.gmo zu.po +yo.po: 5 translated messages, 86 untranslated messages. +zh_HK.po: 47 translated messages, 44 untranslated messages. +zh_TW.po: 91 translated messages. +zu.po: 3 translated messages, 88 untranslated messages. +make[3]: Leaving directory '/rootdir/po' +touch stamp-po +make[2]: Leaving directory '/rootdir/po' +Making all in libcafekbd +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml + GEN cafekbd-indicator-marshal.h + GEN cafekbd-keyboard-drawing-marshal.h +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +INFO: Reading ./cafekbd-indicator-marshal.list... +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... + GEN cafekbd-indicator-marshal.c + GEN cafekbd-keyboard-drawing-marshal.c +INFO: Reading ./cafekbd-indicator-marshal.list... +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... +make all-am +make[3]: Entering directory '/rootdir/libcafekbd' + CC libcafekbd_la-cafekbd-desktop-config.lo + CC libcafekbd_la-cafekbd-keyboard-config.lo + CC libcafekbd_la-cafekbd-util.lo + CC libcafekbdui_la-cafekbd-indicator-config.lo + CC libcafekbdui_la-cafekbd-indicator.lo +cafekbd-desktop-config.c: In function 'cafekbd_desktop_config_load_from_gsettings': +cafekbd-desktop-config.c:176:38: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 176 | || config->default_group >= + | ^~ +cafekbd-indicator-config.c: In function 'cafekbd_indicator_config_get_images_file': +cafekbd-indicator-config.c:152:59: warning: comparison of integer expressions of different signedness: 'guint' {aka 'unsigned int'} and 'int' [-Wsign-compare] + 152 | (g_strv_length (kbd_config->layouts_variants) > group)) { + | ^ +cafekbd-indicator.c:86:1: warning: function declaration isn't a prototype [-Wstrict-prototypes] + 86 | cafekbd_indicator_load_images () + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator.c:143:1: warning: function declaration isn't a prototype [-Wstrict-prototypes] + 143 | cafekbd_indicator_free_images () + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator.c:282:1: warning: no previous prototype for 'cafekbd_indicator_extract_layout_name' [-Wmissing-prototypes] + 282 | cafekbd_indicator_extract_layout_name (int group, XklEngine * engine, + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator.c: In function 'cafekbd_indicator_extract_layout_name': +cafekbd-indicator.c:288:19: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 288 | if (group < g_strv_length (short_group_names)) { + | ^ +cafekbd-indicator.c: At top level: +cafekbd-indicator.c:326:1: warning: no previous prototype for 'cafekbd_indicator_create_label_title' [-Wmissing-prototypes] + 326 | cafekbd_indicator_create_label_title (int group, GHashTable ** ln2cnt_map, + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator.c: In function 'cafekbd_indicator_prepare_drawing': +cafekbd-indicator.c:413:31: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 413 | if (group + 1 == + | ^~ +cafekbd-indicator.c: In function 'cafekbd_indicator_update_tooltips': +cafekbd-indicator.c:441:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 441 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-indicator.c:445:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 445 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-indicator.c: In function 'cafekbd_indicator_kbd_cfg_callback': +cafekbd-indicator.c:61:44: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 61 | CafekbdIndicator * gki = (CafekbdIndicator*)cur->data; + | ^~~ +cafekbd-indicator.c:556:9: note: in expansion of macro 'ForAllIndicators' + 556 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-indicator.c:534:55: note: shadowed declaration is here + 534 | cafekbd_indicator_kbd_cfg_callback (CafekbdIndicator *gki G_GNUC_UNUSED) +cafekbd-indicator.c: In function 'cafekbd_indicator_start_listen': +cafekbd-indicator.c:642:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 642 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:645:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 645 | (CdkFilterFunc) + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_stop_listen': +cafekbd-indicator.c:658:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 658 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:662:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 662 | (CdkFilterFunc) cafekbd_indicator_filter_x_evt, NULL); + | ^ + CC libcafekbdui_la-cafekbd-status.lo +cafekbd-status.c: In function 'cafekbd_status_render_cairo': +cafekbd-status.c:214:23: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 214 | if (group + 1 == xkl_engine_get_num_groups (globals.engine)) { + | ^~ +cafekbd-status.c: In function 'cafekbd_status_prepare_drawing': +cafekbd-status.c:376:51: warning: cast between incompatible function types from 'void (*)(void *)' to 'void (*)(guchar *, void *)' {aka 'void (*)(unsigned char *, void *)'} [-Wcast-function-type] + 376 | (GdkPixbufDestroyNotify) + | ^ +cafekbd-status.c: In function 'cafekbd_status_update_tooltips': +cafekbd-status.c:395:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 395 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-status.c:399:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 399 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-status.c: In function 'cafekbd_status_kbd_cfg_callback': +cafekbd-status.c:77:41: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 77 | CafekbdStatus * gki = (CafekbdStatus*)cur->data; + | ^~~ +cafekbd-status.c:508:9: note: in expansion of macro 'ForAllIndicators' + 508 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-status.c:484:49: note: shadowed declaration is here + 484 | cafekbd_status_kbd_cfg_callback (CafekbdStatus *gki G_GNUC_UNUSED) +cafekbd-status.c: In function 'cafekbd_status_start_listen': +cafekbd-status.c:594:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 594 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:597:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 597 | (CdkFilterFunc) cafekbd_status_filter_x_evt, + | ^ +cafekbd-status.c: In function 'cafekbd_status_stop_listen': +cafekbd-status.c:610:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 610 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:614:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 614 | (CdkFilterFunc) cafekbd_status_filter_x_evt, NULL); + | ^ + CC libcafekbdui_la-cafekbd-indicator-marshal.lo +cafekbd-indicator-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ + CC libcafekbdui_la-cafekbd-keyboard-drawing-marshal.lo +cafekbd-keyboard-drawing-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + CC libcafekbdui_la-cafekbd-keyboard-drawing.lo +cafekbd-keyboard-drawing.c: In function 'draw_polygon': +cafekbd-keyboard-drawing.c:322:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 322 | for (i = 0; i < num_points; i++) { + | ^ +cafekbd-keyboard-drawing.c: In function 'process_indicators_state_notify': +cafekbd-keyboard-drawing.c:2131:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'long unsigned int' [-Wsign-compare] + 2131 | for (i = 0; i <= drawing->xkb->indicators->phys_indicators; i++) + | ^~ +cafekbd-keyboard-drawing.c: In function 'cafekbd_keyboard_drawing_get_type': +cafekbd-keyboard-drawing.c:2394:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawingClass *)' {aka 'void (*)(struct _CafekbdKeyboardDrawingClass *)'} to 'void (*)(void *, void *)' [-Wcast-function-type] + 2394 | (GClassInitFunc) cafekbd_keyboard_drawing_class_init, + | ^ +cafekbd-keyboard-drawing.c:2399:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawing *)' {aka 'void (*)(struct _CafekbdKeyboardDrawing *)'} to 'void (*)(GTypeInstance *, void *)' {aka 'void (*)(struct _GTypeInstance *, void *)'} [-Wcast-function-type] + 2399 | (GInstanceInitFunc) cafekbd_keyboard_drawing_init, + | ^ + GEN org.cafe.peripherals-keyboard-xkb.gschema.valid + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:114:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 114 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbd.la + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspect60diyfjp/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspect60diyfjp/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspect60diyfjp/Cafekbd-1.0.c:239:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 239 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspect60diyfjp/Cafekbd-1.0.c:246:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 246 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspect60diyfjp/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +5 warnings generated. + GICOMP Cafekbd-1.0.gir +make[3]: Leaving directory '/rootdir/libcafekbd' +make[2]: Leaving directory '/rootdir/libcafekbd' +Making all in test +make[2]: Entering directory '/rootdir/test' + CC cafekbd_indicator_test-cafekbd-indicator-test.o + CC cafekbd_keyboard_drawing_test-cafekbd-keyboard-drawing-test.o + CC cafekbd_status_test-cafekbd-status-test.o +cafekbd-keyboard-drawing-test.c:187:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 187 | g_print ("kbdraw %s\n", VERSION); + | ^~~~~~~ +cafekbd-keyboard-drawing-test.c:194:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 194 | g_printerr ("--groups: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:199:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 199 | g_printerr ("--levels: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:225:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 225 | cafekbd_keyboard_drawing_set_track_modifiers + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:228:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 228 | cafekbd_keyboard_drawing_set_track_config + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:248:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 248 | names.keycodes = keycodes; + | ^~~~~~~~ +cafekbd-keyboard-drawing-test.c:256:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 256 | names.geometry = geometry; + | ^~~~~~~~ +7 warnings generated. + CCLD cafekbd-keyboard-drawing-test + CCLD cafekbd-indicator-test + CCLD cafekbd-status-test +make[2]: Leaving directory '/rootdir/test' +make[2]: Entering directory '/rootdir' +make[2]: Leaving directory '/rootdir' +make[1]: Leaving directory '/rootdir' +scan-build: Analysis run complete. +scan-build: 11 bugs found. +scan-build: Run 'scan-view /rootdir/html-report/2025-02-06-112017-14435-1' to examine bug reports. +Making check in po +make[1]: Entering directory '/rootdir/po' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/po' +Making check in libcafekbd +make[1]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +make check-am +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:113:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 113 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspectzfm2vdbe/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectzfm2vdbe/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectzfm2vdbe/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +3 warnings generated. + GICOMP Cafekbd-1.0.gir +make[2]: Leaving directory '/rootdir/libcafekbd' +make[1]: Leaving directory '/rootdir/libcafekbd' +Making check in test +make[1]: Entering directory '/rootdir/test' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/test' +make[1]: Entering directory '/rootdir' +make[1]: Leaving directory '/rootdir' + Listing... 0% Listing... 0% Listing... 0% adduser/testing,now 3.137 all [installed,automatic] +advaita-icon-theme/unknown,now 3.25.0-1 all [installed,automatic] +apt/testing,now 2.9.26 amd64 [installed,automatic] +aptitude-common/testing,now 0.8.13-6.1 all [installed,automatic] +aptitude/testing,now 0.8.13-6.1 amd64 [installed] +at-spi2-common/testing,now 2.55.0.1-1 all [installed,automatic] +at-spi2-core/testing,now 2.55.0.1-1 amd64 [installed,automatic] +autoconf-archive/testing,now 20220903-3 all [installed] +autoconf/testing,now 2.72-3 all [installed,automatic] +automake/testing,now 1:1.16.5-1.3 all [installed,automatic] +autopoint/testing,now 0.23.1-1 all [installed] +autotools-dev/testing,now 20220109.1 all [installed,automatic] +base-files/testing,now 13.6 amd64 [installed,automatic] +base-passwd/testing,now 3.6.6 amd64 [installed,automatic] +bash/testing,now 5.2.37-1 amd64 [installed,automatic] +binfmt-support/testing,now 2.2.2-7 amd64 [installed,automatic] +binutils-common/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils-gold-x86-64-linux-gnu/testing,now 2.44-1 amd64 [installed,automatic] +binutils-gold/testing,now 2.44-1 amd64 [installed,automatic] +binutils-x86-64-linux-gnu/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +bsdutils/testing,now 1:2.40.4-2 amd64 [installed,automatic] +build-essential/testing,now 12.12 amd64 [installed,automatic] +bzip2-doc/testing,now 1.0.8-6 all [installed,automatic] +bzip2/testing,now 1.0.8-6 amd64 [installed,automatic] +ca-certificates/testing,now 20241223 all [installed,automatic] +clang-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools/testing,now 1:19.0-63 amd64 [installed] +clang/testing,now 1:19.0-63 amd64 [installed] +coreutils/testing,now 9.5-1+b1 amd64 [installed,automatic] +cpp-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-14/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cpp/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cppcheck/testing,now 2.16.0-1 amd64 [installed] +ctk-update-icon-cache/unknown,now 3.25.6-1 amd64 [installed,automatic] +dash/testing,now 0.5.12-12 amd64 [installed,automatic] +dbus-bin/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-daemon/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-session-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-system-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-user-session/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus/testing,now 1.16.0-1 amd64 [installed,automatic] +dconf-gsettings-backend/testing,now 0.40.0-5 amd64 [installed,automatic] +dconf-service/testing,now 0.40.0-5 amd64 [installed,automatic] +debconf/testing,now 1.5.89 all [installed,automatic] +debian-archive-keyring/testing,now 2023.4 all [installed,automatic] +debianutils/testing,now 5.21 amd64 [installed,automatic] +diffutils/testing,now 1:3.10-2 amd64 [installed,automatic] +dirmngr/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +dmsetup/testing,now 2:1.02.201-1 amd64 [installed,automatic] +dpkg-dev/testing,now 1.22.14 all [installed,automatic] +dpkg/testing,now 1.22.14 amd64 [installed,automatic] +e2fsprogs/testing,now 1.47.2-1 amd64 [installed,automatic] +expect/testing,now 5.45.4-3+b1 amd64 [installed] +fakeroot/testing,now 1.37-1 amd64 [installed,automatic] +file/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +findutils/testing,now 4.10.0-3 amd64 [installed,automatic] +fontconfig-config/testing,now 2.15.0-2 amd64 [installed,automatic] +fontconfig/testing,now 2.15.0-2 amd64 [installed,automatic] +fonts-dejavu-core/testing,now 2.37-8 all [installed,automatic] +fonts-dejavu-mono/testing,now 2.37-8 all [installed,automatic] +g++-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-14/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +g++/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc-14-base/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gettext-base/testing,now 0.23.1-1 amd64 [installed,automatic] +gettext/testing,now 0.23.1-1 amd64 [installed] +gir1.2-atk-1.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-atspi-2.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-ctk-3.0/unknown,now 3.25.6-1 amd64 [installed] +gir1.2-freedesktop-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-freedesktop/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-gdkpixbuf-2.0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +gir1.2-girepository-2.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-girepository-2.0/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-glib-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-glib-2.0/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-harfbuzz-0.0/testing,now 10.2.0-1 amd64 [installed,automatic] +gir1.2-pango-1.0/testing,now 1.56.1-1 amd64 [installed,automatic] +gir1.2-xkl-1.0/testing,now 5.4-5+b2 amd64 [installed,automatic] +girepository-tools/testing,now 2.82.4-2 amd64 [installed,automatic] +git-man/testing,now 1:2.47.2-0.1 all [installed,automatic] +git/testing,now 1:2.47.2-0.1 amd64 [installed] +gnupg-l10n/testing,now 2.2.46-1 all [installed,automatic] +gnupg-utils/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gnupg/testing,now 2.2.46-1 all [installed,automatic] +gobject-introspection-bin/testing,now 1.82.0-4 amd64 [installed,automatic] +gobject-introspection/testing,now 1.82.0-4 amd64 [installed] +gpg-agent/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg-wks-client/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgconf/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgsm/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgv/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +grep/testing,now 3.11-4 amd64 [installed,automatic] +gsettings-desktop-schemas/testing,now 47.1-1 all [installed,automatic] +gzip/testing,now 1.13-1 amd64 [installed,automatic] +hicolor-icon-theme/testing,now 0.18-2 all [installed,automatic] +hostname/testing,now 3.25 amd64 [installed,automatic] +icu-devtools/testing,now 72.1-6 amd64 [installed,automatic] +init-system-helpers/testing,now 1.68 all [installed,automatic] +krb5-locales/testing,now 1.21.3-4 all [installed,automatic] +less/testing,now 643-1 amd64 [installed,automatic] +lib32gcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +lib32stdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libacl1/testing,now 2.3.2-2+b1 amd64 [installed,automatic] +libalgorithm-diff-perl/testing,now 1.201-1 all [installed,automatic] +libalgorithm-diff-xs-perl/testing,now 0.04-8+b4 amd64 [installed,automatic] +libalgorithm-merge-perl/testing,now 0.08-5 all [installed,automatic] +libapparmor1/testing,now 3.1.7-1+b3 amd64 [installed,automatic] +libapt-pkg6.0t64/testing,now 2.9.26 amd64 [installed,automatic] +libasan8/testing,now 14.2.0-12 amd64 [installed,automatic] +libassuan9/testing,now 3.0.1-2 amd64 [installed,automatic] +libatk-bridge2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk-bridge2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatomic1/testing,now 14.2.0-12 amd64 [installed,automatic] +libatspi2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatspi2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libattr1/testing,now 1:2.5.2-2 amd64 [installed,automatic] +libaudit-common/testing,now 1:4.0.2-2 all [installed,automatic] +libaudit1/testing,now 1:4.0.2-2+b1 amd64 [installed,automatic] +libavahi-client3/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common-data/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common3/testing,now 0.8-16 amd64 [installed,automatic] +libbinutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libblkid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libblkid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libboost-iostreams1.83.0/testing,now 1.83.0-4 amd64 [installed,automatic] +libbrotli-dev/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbrotli1/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbsd0/testing,now 0.12.2-2 amd64 [installed,automatic] +libbz2-1.0/testing,now 1.0.8-6 amd64 [installed,automatic] +libbz2-dev/testing,now 1.0.8-6 amd64 [installed,automatic] +libc-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc-dev-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc6-dev/testing,now 2.40-6 amd64 [installed,automatic] +libc6-i386/testing,now 2.40-6 amd64 [installed,automatic] +libc6/testing,now 2.40-6 amd64 [installed,automatic] +libcairo-gobject2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo-script-interpreter2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2-dev/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcap-dev/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcap-ng0/testing,now 0.8.5-4 amd64 [installed,automatic] +libcap2/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcbor0.10/testing,now 0.10.2-2 amd64 [installed,automatic] +libcc1-0/testing,now 14.2.0-12 amd64 [installed,automatic] +libclang-common-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-cpp19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-rt-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang1-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libcolord2/testing,now 1.4.7-1+b2 amd64 [installed,automatic] +libcom-err2/testing,now 1.47.2-1 amd64 [installed,automatic] +libcrypt-dev/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcrypt1/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcryptsetup12/testing,now 2:2.7.5-1 amd64 [installed,automatic] +libctf-nobfd0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctf0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctk-3-0/unknown,now 3.25.6-1 amd64 [installed] +libctk-3-bin/unknown,now 3.25.6-1 amd64 [installed,automatic] +libctk-3-common/unknown,now 3.25.6-1 all [installed] +libctk-3-dev/unknown,now 3.25.6-1 amd64 [installed] +libcups2t64/testing,now 2.4.10-2+b1 amd64 [installed,automatic] +libcurl3t64-gnutls/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcurl4t64/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcwidget4/testing,now 0.5.18-6+b2 amd64 [installed,automatic] +libdatrie-dev/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdatrie1/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdav1d7/testing,now 1.5.1-1 amd64 [installed,automatic] +libdb5.3t64/testing,now 5.3.28+dfsg2-9 amd64 [installed,automatic] +libdbus-1-3/testing,now 1.16.0-1 amd64 [installed,automatic] +libdbus-1-dev/testing,now 1.16.0-1 amd64 [installed,automatic] +libdconf1/testing,now 0.40.0-5 amd64 [installed,automatic] +libdebconfclient0/testing,now 0.277 amd64 [installed,automatic] +libdeflate-dev/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdeflate0/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdevmapper1.02.1/testing,now 2:1.02.201-1 amd64 [installed,automatic] +libdpkg-perl/testing,now 1.22.14 all [installed,automatic] +libdrm-amdgpu1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-common/testing,now 2.4.123-1 all [installed,automatic] +libdrm-intel1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-radeon1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm2/testing,now 2.4.123-1 amd64 [installed,automatic] +libedit2/testing,now 3.1-20250104-1 amd64 [installed,automatic] +libegl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libegl-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1-mesa-dev/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libelf1t64/testing,now 0.192-4 amd64 [installed,automatic] +libepoxy-dev/testing,now 1.5.10-2 amd64 [installed,automatic] +libepoxy0/testing,now 1.5.10-2 amd64 [installed,automatic] +liberror-perl/testing,now 0.17029-2 all [installed,automatic] +libexpat1-dev/testing,now 2.6.4-1 amd64 [installed,automatic] +libexpat1/testing,now 2.6.4-1 amd64 [installed,automatic] +libext2fs2t64/testing,now 1.47.2-1 amd64 [installed,automatic] +libfakeroot/testing,now 1.37-1 amd64 [installed,automatic] +libffi-dev/testing,now 3.4.6-1 amd64 [installed,automatic] +libffi8/testing,now 3.4.6-1 amd64 [installed,automatic] +libfido2-1/testing,now 1.15.0-1+b1 amd64 [installed,automatic] +libfile-fcntllock-perl/testing,now 0.22-4+b4 amd64 [installed,automatic] +libfontconfig-dev/testing,now 2.15.0-2 amd64 [installed,automatic] +libfontconfig1/testing,now 2.15.0-2 amd64 [installed,automatic] +libfreetype-dev/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfreetype6/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfribidi-dev/testing,now 1.0.16-1 amd64 [installed,automatic] +libfribidi0/testing,now 1.0.16-1 amd64 [installed,automatic] +libgbm1/testing,now 24.2.8-1 amd64 [installed,automatic] +libgc1/testing,now 1:8.2.8-1 amd64 [installed,automatic] +libgcc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcrypt20/testing,now 1.11.0-7 amd64 [installed,automatic] +libgdbm-compat4t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdbm6t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-dev/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-bin/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-common/testing,now 2.42.12+dfsg-2 all [installed,automatic] +libgio-2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libgio-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository-1.0-1/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-1.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-2.0-0/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository1.0-dev/testing,now 1.82.0-4 amd64 [installed] +libgl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgl1-mesa-dri/testing,now 24.2.8-1 amd64 [installed,automatic] +libgl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglapi-mesa/testing,now 24.2.8-1 amd64 [installed,automatic] +libgles-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles2/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglib2.0-0t64/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-data/testing,now 2.82.4-2 all [installed,automatic] +libglib2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-dev/testing,now 2.82.4-2 amd64 [installed] +libglvnd-core-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libglx0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgmp10/testing,now 2:6.3.0+dfsg-3 amd64 [installed,automatic] +libgnutls30t64/testing,now 3.8.8-2 amd64 [installed,automatic] +libgomp1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgpg-error-l10n/testing,now 1.51-3 all [installed,automatic] +libgpg-error0/testing,now 1.51-3 amd64 [installed,automatic] +libgpm2/testing,now 1.20.7-11+b2 amd64 [installed,automatic] +libgprofng0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libgraphite2-3/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgraphite2-dev/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgssapi-krb5-2/testing,now 1.21.3-4 amd64 [installed,automatic] +libharfbuzz-cairo0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-dev/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-gobject0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-icu0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-subset0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz0b/testing,now 10.2.0-1 amd64 [installed,automatic] +libhogweed6t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libhwasan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libice-dev/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libice6/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libicu-dev/testing,now 72.1-6 amd64 [installed,automatic] +libicu72/testing,now 72.1-6 amd64 [installed,automatic] +libidn2-0/testing,now 2.3.7-2+b1 amd64 [installed,automatic] +libisl23/testing,now 0.27-1 amd64 [installed,automatic] +libitm1/testing,now 14.2.0-12 amd64 [installed,automatic] +libjansson4/testing,now 2.14-2+b3 amd64 [installed,automatic] +libjbig-dev/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjbig0/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjpeg-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjson-c5/testing,now 0.18+ds-1 amd64 [installed,automatic] +libk5crypto3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkeyutils1/testing,now 1.6.3-4 amd64 [installed,automatic] +libkmod2/testing,now 33+20240816-2 amd64 [installed,automatic] +libkrb5-3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkrb5support0/testing,now 1.21.3-4 amd64 [installed,automatic] +libksba8/testing,now 1.6.7-2+b1 amd64 [installed,automatic] +liblcms2-2/testing,now 2.16-2 amd64 [installed,automatic] +libldap-common/testing,now 2.6.9+dfsg-1 all [installed,automatic] +libldap2/testing,now 2.6.9+dfsg-1 amd64 [installed,automatic] +liblerc-dev/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +liblerc4/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +libllvm19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +liblocale-gettext-perl/testing,now 1.07-7+b1 amd64 [installed,automatic] +liblsan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libltdl-dev/testing,now 2.5.4-2 amd64 [installed,automatic] +libltdl7/testing,now 2.5.4-2 amd64 [installed,automatic] +liblz4-1/testing,now 1.10.0-3 amd64 [installed,automatic] +liblzma-dev/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzma5/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzo2-2/testing,now 2.10-3+b1 amd64 [installed,automatic] +libmagic-mgc/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmagic1t64/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmd0/testing,now 1.1.0-2+b1 amd64 [installed,automatic] +libmount-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libmount1/testing,now 2.40.4-2 amd64 [installed,automatic] +libmpc3/testing,now 1.3.1-1+b3 amd64 [installed,automatic] +libmpfr6/testing,now 4.2.1-1+b2 amd64 [installed,automatic] +libncurses-dev/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncurses6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncursesw6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libnettle8t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libnghttp2-14/testing,now 1.64.0-1 amd64 [installed,automatic] +libnghttp3-9/testing,now 1.6.0-2 amd64 [installed,automatic] +libngtcp2-16/testing,now 1.9.1-1 amd64 [installed,automatic] +libngtcp2-crypto-gnutls8/testing,now 1.9.1-1 amd64 [installed,automatic] +libnpth0t64/testing,now 1.8-2 amd64 [installed,automatic] +libnss-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libobjc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libobjc4/testing,now 14.2.0-12 amd64 [installed,automatic] +libopengl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libopengl0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libp11-kit0/testing,now 0.25.5-3 amd64 [installed,automatic] +libpam-modules-bin/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-modules/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-runtime/testing,now 1.7.0-2 all [installed,automatic] +libpam-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libpam0g/testing,now 1.7.0-2 amd64 [installed,automatic] +libpango-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpango1.0-dev/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangocairo-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoft2-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoxft-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpciaccess0/testing,now 0.17-3+b3 amd64 [installed,automatic] +libpcre2-16-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-32-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-8-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-dev/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-posix3/testing,now 10.44-5 amd64 [installed,automatic] +libperl5.40/testing,now 5.40.0-8 amd64 [installed,automatic] +libpfm4/testing,now 4.13.0+git83-g91970fe-1 amd64 [installed,automatic] +libpipeline1/testing,now 1.5.8-1 amd64 [installed,automatic] +libpixman-1-0/testing,now 0.44.0-3 amd64 [installed,automatic] +libpixman-1-dev/testing,now 0.44.0-3 amd64 [installed,automatic] +libpkgconf3/testing,now 1.8.1-4 amd64 [installed,automatic] +libpng-dev/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng-tools/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng16-16t64/testing,now 1.6.44-3 amd64 [installed,automatic] +libproc2-0/testing,now 2:4.0.4-7 amd64 [installed,automatic] +libpsl5t64/testing,now 0.21.2-1.1+b1 amd64 [installed,automatic] +libpython3-stdlib/testing,now 3.13.1-2 amd64 [installed,automatic] +libpython3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libpython3.13-stdlib/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libquadmath0/testing,now 14.2.0-12 amd64 [installed,automatic] +libreadline8t64/testing,now 8.2-6 amd64 [installed,automatic] +librsvg2-2/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librsvg2-common/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librtmp1/testing,now 2.4+20151223.gitfa8646d.1-2+b5 amd64 [installed,automatic] +libsasl2-2/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules-db/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libseccomp2/testing,now 2.5.5-2 amd64 [installed,automatic] +libselinux1-dev/testing,now 3.7-3.1 amd64 [installed,automatic] +libselinux1/testing,now 3.7-3.1 amd64 [installed,automatic] +libsemanage-common/testing,now 3.7-2.1 all [installed,automatic] +libsemanage2/testing,now 3.7-2.1 amd64 [installed,automatic] +libsensors-config/testing,now 1:3.6.0-10 all [installed,automatic] +libsensors5/testing,now 1:3.6.0-10+b1 amd64 [installed,automatic] +libsepol-dev/testing,now 3.7-1 amd64 [installed,automatic] +libsepol2/testing,now 3.7-1 amd64 [installed,automatic] +libsframe1/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libsharpyuv-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsharpyuv0/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsigc++-2.0-0v5/testing,now 2.12.1-3 amd64 [installed,automatic] +libsm-dev/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsm6/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsmartcols1/testing,now 2.40.4-2 amd64 [installed,automatic] +libsqlite3-0/testing,now 3.46.1-1 amd64 [installed,automatic] +libss2/testing,now 1.47.2-1 amd64 [installed,automatic] +libssh2-1t64/testing,now 1.11.1-1 amd64 [installed,automatic] +libssl3t64/testing,now 3.4.0-2 amd64 [installed,automatic] +libstdc++-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libstdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libsysprof-capture-4-dev/testing,now 47.2-1 amd64 [installed,automatic] +libsystemd-dev/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd-shared/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd0/testing,now 257.2-3 amd64 [installed,automatic] +libtasn1-6/testing,now 4.19.0-3+b3 amd64 [installed,automatic] +libtcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +libthai-data/testing,now 0.1.29-2 all [installed,automatic] +libthai-dev/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libthai0/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libtiff-dev/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiff6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiffxx6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtinfo6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libtinyxml2-10/testing,now 10.0.0+dfsg-2+b2 amd64 [installed,automatic] +libtool/testing,now 2.5.4-2 all [installed] +libtsan2/testing,now 14.2.0-12 amd64 [installed,automatic] +libubsan1/testing,now 14.2.0-12 amd64 [installed,automatic] +libudev1/testing,now 257.2-3 amd64 [installed,automatic] +libunistring5/testing,now 1.3-1 amd64 [installed,automatic] +libuuid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libvulkan1/testing,now 1.4.304.0-1 amd64 [installed,automatic] +libwayland-bin/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-client0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-cursor0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-dev/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-egl1/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-server0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwebp-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebp7/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdecoder3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdemux2/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpmux3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libx11-6/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-data/testing,now 2:1.8.10-2 all [installed,automatic] +libx11-dev/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-xcb1/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libxapian30/testing,now 1.4.25-2 amd64 [installed,automatic] +libxau-dev/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxau6/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxaw7/testing,now 2:1.0.16-1 amd64 [installed,automatic] +libxcb-dri2-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-dri3-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-glx0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-present0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-randr0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-sync1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-xfixes0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcomposite-dev/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcomposite1/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcursor-dev/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxcursor1/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxdamage-dev/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdamage1/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdmcp-dev/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxdmcp6/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxext-dev/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxext6/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxfixes-dev/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxfixes3/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxft-dev/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxft2/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxi-dev/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxi6/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxinerama-dev/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxinerama1/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxkbcommon-dev/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbcommon0/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbfile1/testing,now 1:1.1.0-1+b4 amd64 [installed,automatic] +libxklavier-dev/testing,now 5.4-5+b2 amd64 [installed] +libxklavier16/testing,now 5.4-5+b2 amd64 [installed,automatic] +libxml2-dev/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxml2-utils/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed] +libxml2/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxmu6/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxmuu1/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxpm4/testing,now 1:3.5.17-1+b3 amd64 [installed,automatic] +libxrandr-dev/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrandr2/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrender-dev/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxrender1/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxshmfence1/testing,now 1.3-1+b3 amd64 [installed,automatic] +libxt6t64/testing,now 1:1.2.1-1.2+b2 amd64 [installed,automatic] +libxtst-dev/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxtst6/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxxf86vm1/testing,now 1:1.1.4-1+b4 amd64 [installed,automatic] +libxxhash0/testing,now 0.8.2-2+b2 amd64 [installed,automatic] +libyaml-0-2/testing,now 0.2.5-2 amd64 [installed,automatic] +libz3-4/testing,now 4.13.3-1 amd64 [installed,automatic] +libz3-dev/testing,now 4.13.3-1 amd64 [installed,automatic] +libzstd-dev/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +libzstd1/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +linux-libc-dev/testing,now 6.12.11-1 all [installed,automatic] +linux-sysctl-defaults/testing,now 4.11 all [installed,automatic] +llvm-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-linker-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-runtime/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +login.defs/testing,now 1:4.16.0-7 all [installed,automatic] +login/testing,now 1:4.16.0-2+really2.40.4-2 amd64 [installed,automatic] +logsave/testing,now 1.47.2-1 amd64 [installed,automatic] +m4/testing,now 1.4.19-5 amd64 [installed,automatic] +make/testing,now 4.4.1-1 amd64 [installed] +manpages-dev/testing,now 6.9.1-1 all [installed,automatic] +manpages/testing,now 6.9.1-1 all [installed,automatic] +mawk/testing,now 1.3.4.20240905-1 amd64 [installed,automatic] +media-types/testing,now 10.1.0 all [installed,automatic] +mesa-libgallium/testing,now 24.2.8-1 amd64 [installed,automatic] +mesa-vulkan-drivers/testing,now 24.2.8-1 amd64 [installed,automatic] +mount/testing,now 2.40.4-2 amd64 [installed,automatic] +native-architecture/testing,now 0.2.5 all [installed,automatic] +ncurses-base/testing,now 6.5-2 all [installed,automatic] +ncurses-bin/testing,now 6.5-2+b1 amd64 [installed,automatic] +netbase/testing,now 6.4 all [installed,automatic] +openssh-client/testing,now 1:9.9p1-3 amd64 [installed,automatic] +openssl-provider-legacy/testing,now 3.4.0-2 amd64 [installed,automatic] +openssl/testing,now 3.4.0-2 amd64 [installed,automatic] +pango1.0-tools/testing,now 1.56.1-1 amd64 [installed,automatic] +passwd/testing,now 1:4.16.0-7 amd64 [installed,automatic] +patch/testing,now 2.7.6-7 amd64 [installed,automatic] +perl-base/testing,now 5.40.0-8 amd64 [installed,automatic] +perl-modules-5.40/testing,now 5.40.0-8 all [installed,automatic] +perl/testing,now 5.40.0-8 amd64 [installed,automatic] +pinentry-curses/testing,now 1.3.1-2 amd64 [installed,automatic] +pkgconf-bin/testing,now 1.8.1-4 amd64 [installed,automatic] +pkgconf/testing,now 1.8.1-4 amd64 [installed,automatic] +procps/testing,now 2:4.0.4-7 amd64 [installed,automatic] +psmisc/testing,now 23.7-1 amd64 [installed,automatic] +publicsuffix/testing,now 20250108.1153-0.1 all [installed,automatic] +python3-autocommand/testing,now 2.2.2-3 all [installed,automatic] +python3-inflect/testing,now 7.3.1-2 all [installed,automatic] +python3-jaraco.context/testing,now 6.0.0-1 all [installed,automatic] +python3-jaraco.functools/testing,now 4.1.0-1 all [installed,automatic] +python3-jaraco.text/testing,now 4.0.0-1 all [installed,automatic] +python3-mako/testing,now 1.3.8-2 all [installed,automatic] +python3-markdown/testing,now 3.7-2 all [installed,automatic] +python3-markupsafe/testing,now 2.1.5-1+b2 amd64 [installed,automatic] +python3-minimal/testing,now 3.13.1-2 amd64 [installed,automatic] +python3-more-itertools/testing,now 10.6.0-1 all [installed,automatic] +python3-packaging/testing,now 24.2-1 all [installed,automatic] +python3-pkg-resources/testing,now 75.6.0-1 all [installed,automatic] +python3-pygments/testing,now 2.18.0+dfsg-2 all [installed,automatic] +python3-setuptools/testing,now 75.6.0-1 all [installed,automatic] +python3-typeguard/testing,now 4.4.1-1 all [installed,automatic] +python3-typing-extensions/testing,now 4.12.2-2 all [installed,automatic] +python3-yaml/testing,now 6.0.2-1+b1 amd64 [installed,automatic] +python3-zipp/testing,now 3.21.0-1 all [installed,automatic] +python3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3.13/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3/testing,now 3.13.1-2 amd64 [installed,automatic] +readline-common/testing,now 8.2-6 all [installed,automatic] +rpcsvc-proto/testing,now 1.4.3-1 amd64 [installed,automatic] +sed/testing,now 4.9-2 amd64 [installed,automatic] +sensible-utils/testing,now 0.0.24 all [installed,automatic] +sgml-base/testing,now 1.31 all [installed,automatic] +shared-mime-info/testing,now 2.4-5+b2 amd64 [installed,automatic] +sqv/testing,now 1.2.1-5 amd64 [installed,automatic] +systemd-cryptsetup/testing,now 257.2-3 amd64 [installed,automatic] +systemd-sysv/testing,now 257.2-3 amd64 [installed,automatic] +systemd-timesyncd/testing,now 257.2-3 amd64 [installed,automatic] +systemd/testing,now 257.2-3 amd64 [installed,automatic] +sysvinit-utils/testing,now 3.13-1 amd64 [installed,automatic] +tar/testing,now 1.35+dfsg-3.1 amd64 [installed,automatic] +tcl-expect/testing,now 5.45.4-3+b1 amd64 [installed,automatic] +tcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +tzdata/testing,now 2024b-6 all [installed,automatic] +util-linux/testing,now 2.40.4-2 amd64 [installed,automatic] +uuid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +wayland-protocols/testing,now 1.39-1 all [installed,automatic] +wget/testing,now 1.24.5-2+b1 amd64 [installed] +x11-common/testing,now 1:7.7+24 all [installed,automatic] +x11-xkb-utils/testing,now 7.7+9 amd64 [installed,automatic] +x11proto-dev/testing,now 2024.1-1 all [installed,automatic] +xauth/testing,now 1:1.1.2-1.1 amd64 [installed,automatic] +xdg-user-dirs/testing,now 0.18-2 amd64 [installed,automatic] +xkb-data/testing,now 2.42-1 all [installed,automatic] +xml-core/testing,now 0.19 all [installed,automatic] +xorg-sgml-doctools/testing,now 1:1.11-1.1 all [installed,automatic] +xtrans-dev/testing,now 1.4.0-1 all [installed,automatic] +xz-utils/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +zlib1g-dev/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +zlib1g/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +Errors detected in the build 0 +Warnings detected in the logs 99 +cppcheck defects detected in the logs 28 +TOTAL warnings detected in the logs 127 diff --git a/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-37cb39.html b/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-37cb39.html new file mode 100644 index 0000000..aee42db --- /dev/null +++ b/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-37cb39.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 248, column 21
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-112017-14435-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
This statement is never executed
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-523ef4.html b/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-523ef4.html new file mode 100644 index 0000000..6dc4024 --- /dev/null +++ b/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-523ef4.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 199, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-112017-14435-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
This statement is never executed
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-5ce420.html b/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-5ce420.html new file mode 100644 index 0000000..1c4fd7d --- /dev/null +++ b/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-5ce420.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 194, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-112017-14435-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
This statement is never executed
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-5d4bc8.html b/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-5d4bc8.html new file mode 100644 index 0000000..54fb2a4 --- /dev/null +++ b/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-5d4bc8.html @@ -0,0 +1,1609 @@ + + + +/rootdir/libcafekbd/tmp-introspect60diyfjp/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspect60diyfjp/Cafekbd-1.0.c
Warning:line 89, column 13
File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/atk-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/cairo -I /usr/include/libpng16 -I /usr/include/freetype2 -I /usr/include/pixman-1 -I /usr/include/pango-1.0 -I /usr/include/harfbuzz -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/ctk-3.0 -I /usr/include/gio-unix-2.0 -I /usr/include/libxml2 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-112017-14435-1 -x c /rootdir/libcafekbd/tmp-introspect60diyfjp/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
14
Loop condition is true. Entering loop body
28
Loop condition is true. Entering loop body
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
15
Assuming this stream operation fails
29
File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior
90 if (ret
15.1
'ret' is equal to 0
== 0)
16
Taking true branch
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out
16.1
'len_out' is not equal to NULL
!= NULL((void*)0))
17
Taking true branch
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
6
Assuming 'args' is not equal to NULL
7
Taking false branch
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
8
Assuming 'self' is non-null
9
Taking false branch
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input
9.1
'input' is not equal to NULL
== NULL((void*)0))
10
Taking false branch
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output
10.1
'output' is not equal to NULL
== NULL((void*)0))
11
Taking false branch
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
12
Loop condition is true. Entering loop body
26
Loop condition is true. Entering loop body
702 {
703 gsize len;
704 char *line = read_line (input, &len);
13
Calling 'read_line'
18
Returning from 'read_line'
27
Calling 'read_line'
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
19
Assuming 'line' is not equal to NULL
20
Assuming the condition is false
21
Taking false branch
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
22
Assuming the condition is false
23
Taking false branch
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
24
Assuming the condition is false
25
Taking false branch
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
742
743 if (quark == 0)
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
1
Assuming 'argc' is equal to 2
2
'?' condition is false
3
Assuming the condition is false
4
Taking false branch
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
5
Calling 'dump_irepository'
811 {
812 g_printerr ("%s\n", error->message);
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-891289.html b/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-891289.html new file mode 100644 index 0000000..d13143c --- /dev/null +++ b/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-891289.html @@ -0,0 +1,1603 @@ + + + +/rootdir/libcafekbd/tmp-introspect60diyfjp/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspect60diyfjp/Cafekbd-1.0.c
Warning:line 812, column 27
Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error')
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/atk-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/cairo -I /usr/include/libpng16 -I /usr/include/freetype2 -I /usr/include/pixman-1 -I /usr/include/pango-1.0 -I /usr/include/harfbuzz -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/ctk-3.0 -I /usr/include/gio-unix-2.0 -I /usr/include/libxml2 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-112017-14435-1 -x c /rootdir/libcafekbd/tmp-introspect60diyfjp/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
90 if (ret == 0)
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out != NULL((void*)0))
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
21
Assuming the condition is false
22
Taking false branch
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
23
Returning without writing to '*error'
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
7
Assuming 'args' is not equal to NULL
8
Taking false branch
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
9
Assuming 'self' is non-null
10
Taking false branch
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input
10.1
'input' is not equal to NULL
== NULL((void*)0))
11
Taking false branch
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output
11.1
'output' is not equal to NULL
== NULL((void*)0))
12
Taking false branch
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
13
Loop condition is true. Entering loop body
702 {
703 gsize len;
704 char *line = read_line (input, &len);
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
14
Assuming 'line' is not equal to NULL
15
Assuming the condition is false
16
Taking false branch
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
17
Assuming the condition is false
18
Taking false branch
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
19
Taking true branch
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
20
Calling 'invoke_error_quark'
24
Returning from 'invoke_error_quark'
742
743 if (quark == 0)
25
Assuming 'quark' is equal to 0
26
Taking true branch
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
27
Returning without writing to '*error'
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
1
'error' initialized to a null pointer value
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
2
Assuming 'argc' is equal to 2
3
'?' condition is false
4
Assuming the condition is false
5
Taking false branch
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
6
Calling 'dump_irepository'
28
Returning from 'dump_irepository'
29
Taking true branch
811 {
812 g_printerr ("%s\n", error->message);
30
Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error')
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-9361af.html b/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-9361af.html new file mode 100644 index 0000000..57e1894 --- /dev/null +++ b/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-9361af.html @@ -0,0 +1,1609 @@ + + + +/rootdir/libcafekbd/tmp-introspect60diyfjp/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspect60diyfjp/Cafekbd-1.0.c
Warning:line 89, column 13
Read function called when stream is in EOF state. Function has no effect
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/atk-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/cairo -I /usr/include/libpng16 -I /usr/include/freetype2 -I /usr/include/pixman-1 -I /usr/include/pango-1.0 -I /usr/include/harfbuzz -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/ctk-3.0 -I /usr/include/gio-unix-2.0 -I /usr/include/libxml2 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-112017-14435-1 -x c /rootdir/libcafekbd/tmp-introspect60diyfjp/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
14
Loop condition is true. Entering loop body
28
Loop condition is true. Entering loop body
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
15
Assuming stream reaches end-of-file here
29
Read function called when stream is in EOF state. Function has no effect
90 if (ret
15.1
'ret' is equal to 0
== 0)
16
Taking true branch
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out
16.1
'len_out' is not equal to NULL
!= NULL((void*)0))
17
Taking true branch
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
6
Assuming 'args' is not equal to NULL
7
Taking false branch
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
8
Assuming 'self' is non-null
9
Taking false branch
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input
9.1
'input' is not equal to NULL
== NULL((void*)0))
10
Taking false branch
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output
10.1
'output' is not equal to NULL
== NULL((void*)0))
11
Taking false branch
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
12
Loop condition is true. Entering loop body
26
Loop condition is true. Entering loop body
702 {
703 gsize len;
704 char *line = read_line (input, &len);
13
Calling 'read_line'
18
Returning from 'read_line'
27
Calling 'read_line'
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
19
Assuming 'line' is not equal to NULL
20
Assuming the condition is false
21
Taking false branch
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
22
Assuming the condition is false
23
Taking false branch
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
24
Assuming the condition is false
25
Taking false branch
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
742
743 if (quark == 0)
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
1
Assuming 'argc' is equal to 2
2
'?' condition is false
3
Assuming the condition is false
4
Taking false branch
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
5
Calling 'dump_irepository'
811 {
812 g_printerr ("%s\n", error->message);
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-b4532a.html b/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-b4532a.html new file mode 100644 index 0000000..cd742cd --- /dev/null +++ b/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-b4532a.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 228, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-112017-14435-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
This statement is never executed
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-c098bd.html b/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-c098bd.html new file mode 100644 index 0000000..d1bc9d5 --- /dev/null +++ b/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-c098bd.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 187, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-112017-14435-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
This statement is never executed
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-e0f2de.html b/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-e0f2de.html new file mode 100644 index 0000000..9ee5c5e --- /dev/null +++ b/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-e0f2de.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 225, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-112017-14435-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
This statement is never executed
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-fb6164.html b/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-fb6164.html new file mode 100644 index 0000000..22961f0 --- /dev/null +++ b/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-fb6164.html @@ -0,0 +1,1504 @@ + + + +/rootdir/libcafekbd/tmp-introspect60diyfjp/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspect60diyfjp/Cafekbd-1.0.c
Warning:line 239, column 11
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/atk-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/cairo -I /usr/include/libpng16 -I /usr/include/freetype2 -I /usr/include/pixman-1 -I /usr/include/pango-1.0 -I /usr/include/harfbuzz -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/ctk-3.0 -I /usr/include/gio-unix-2.0 -I /usr/include/libxml2 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-112017-14435-1 -x c /rootdir/libcafekbd/tmp-introspect60diyfjp/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
90 if (ret == 0)
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out != NULL((void*)0))
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
This statement is never executed
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input == NULL((void*)0))
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output == NULL((void*)0))
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
702 {
703 gsize len;
704 char *line = read_line (input, &len);
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
742
743 if (quark == 0)
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
811 {
812 g_printerr ("%s\n", error->message);
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-ff92e7.html b/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-ff92e7.html new file mode 100644 index 0000000..1907915 --- /dev/null +++ b/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/report-ff92e7.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 256, column 21
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-112017-14435-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
This statement is never executed
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/scanview.css b/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/scanview.css new file mode 100644 index 0000000..cf8a5a6 --- /dev/null +++ b/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/scanview.css @@ -0,0 +1,62 @@ +body { color:#000000; background-color:#ffffff } +body { font-family: Helvetica, sans-serif; font-size:9pt } +h1 { font-size: 14pt; } +h2 { font-size: 12pt; } +table { font-size:9pt } +table { border-spacing: 0px; border: 1px solid black } +th, table thead { + background-color:#eee; color:#666666; + font-weight: bold; cursor: default; + text-align:center; + font-weight: bold; font-family: Verdana; + white-space:nowrap; +} +.W { font-size:0px } +th, td { padding:5px; padding-left:8px; text-align:left } +td.SUMM_DESC { padding-left:12px } +td.DESC { white-space:pre } +td.Q { text-align:right } +td { text-align:left } +tbody.scrollContent { overflow:auto } + +table.form_group { + background-color: #ccc; + border: 1px solid #333; + padding: 2px; +} + +table.form_inner_group { + background-color: #ccc; + border: 1px solid #333; + padding: 0px; +} + +table.form { + background-color: #999; + border: 1px solid #333; + padding: 2px; +} + +td.form_label { + text-align: right; + vertical-align: top; +} +/* For one line entires */ +td.form_clabel { + text-align: right; + vertical-align: center; +} +td.form_value { + text-align: left; + vertical-align: top; +} +td.form_submit { + text-align: right; + vertical-align: top; +} + +h1.SubmitFail { + color: #f00; +} +h1.SubmitOk { +} diff --git a/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/sorttable.js b/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/sorttable.js new file mode 100644 index 0000000..e608daa --- /dev/null +++ b/2025-02-06-112017-14435-1@1b95ca5afa73_warnings/sorttable.js @@ -0,0 +1,512 @@ +/* + SortTable + version 2 + 7th April 2007 + Stuart Langridge, http://www.kryogenix.org/code/browser/sorttable/ + + Instructions: + Download this file + Add to your HTML + Add class="sortable" to any table you'd like to make sortable + Click on the headers to sort + + Thanks to many, many people for contributions and suggestions. + Licenced as X11: http://www.kryogenix.org/code/browser/licence.html + This basically means: do what you want with it. +*/ + + +var stIsIE = /*@cc_on!@*/false; + +sorttable = { + init: function() { + // quit if this function has already been called + if (arguments.callee.done) return; + // flag this function so we don't do the same thing twice + arguments.callee.done = true; + // kill the timer + if (_timer) clearInterval(_timer); + + if (!document.createElement || !document.getElementsByTagName) return; + + sorttable.DATE_RE = /^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/; + + forEach(document.getElementsByTagName('table'), function(table) { + if (table.className.search(/\bsortable\b/) != -1) { + sorttable.makeSortable(table); + } + }); + + }, + + makeSortable: function(table) { + if (table.getElementsByTagName('thead').length == 0) { + // table doesn't have a tHead. Since it should have, create one and + // put the first table row in it. + the = document.createElement('thead'); + the.appendChild(table.rows[0]); + table.insertBefore(the,table.firstChild); + } + // Safari doesn't support table.tHead, sigh + if (table.tHead == null) table.tHead = table.getElementsByTagName('thead')[0]; + + if (table.tHead.rows.length != 1) return; // can't cope with two header rows + + // Sorttable v1 put rows with a class of "sortbottom" at the bottom (as + // "total" rows, for example). This is B&R, since what you're supposed + // to do is put them in a tfoot. So, if there are sortbottom rows, + // for backward compatibility, move them to tfoot (creating it if needed). + sortbottomrows = []; + for (var i=0; i5' : ' ▴'; + this.appendChild(sortrevind); + return; + } + if (this.className.search(/\bsorttable_sorted_reverse\b/) != -1) { + // if we're already sorted by this column in reverse, just + // re-reverse the table, which is quicker + sorttable.reverse(this.sorttable_tbody); + this.className = this.className.replace('sorttable_sorted_reverse', + 'sorttable_sorted'); + this.removeChild(document.getElementById('sorttable_sortrevind')); + sortfwdind = document.createElement('span'); + sortfwdind.id = "sorttable_sortfwdind"; + sortfwdind.innerHTML = stIsIE ? ' 6' : ' ▾'; + this.appendChild(sortfwdind); + return; + } + + // remove sorttable_sorted classes + theadrow = this.parentNode; + forEach(theadrow.childNodes, function(cell) { + if (cell.nodeType == 1) { // an element + cell.className = cell.className.replace('sorttable_sorted_reverse',''); + cell.className = cell.className.replace('sorttable_sorted',''); + } + }); + sortfwdind = document.getElementById('sorttable_sortfwdind'); + if (sortfwdind) { sortfwdind.parentNode.removeChild(sortfwdind); } + sortrevind = document.getElementById('sorttable_sortrevind'); + if (sortrevind) { sortrevind.parentNode.removeChild(sortrevind); } + + this.className += ' sorttable_sorted'; + sortfwdind = document.createElement('span'); + sortfwdind.id = "sorttable_sortfwdind"; + sortfwdind.innerHTML = stIsIE ? ' 6' : ' ▾'; + this.appendChild(sortfwdind); + + // build an array to sort. This is a Schwartzian transform thing, + // i.e., we "decorate" each row with the actual sort key, + // sort based on the sort keys, and then put the rows back in order + // which is a lot faster because you only do getInnerText once per row + row_array = []; + col = this.sorttable_columnindex; + rows = this.sorttable_tbody.rows; + for (var j=0; j 12) { + // definitely dd/mm + return sorttable.sort_ddmm; + } else if (second > 12) { + return sorttable.sort_mmdd; + } else { + // looks like a date, but we can't tell which, so assume + // that it's dd/mm (English imperialism!) and keep looking + sortfn = sorttable.sort_ddmm; + } + } + } + } + return sortfn; + }, + + getInnerText: function(node) { + // gets the text we want to use for sorting for a cell. + // strips leading and trailing whitespace. + // this is *not* a generic getInnerText function; it's special to sorttable. + // for example, you can override the cell text with a customkey attribute. + // it also gets .value for fields. + + hasInputs = (typeof node.getElementsByTagName == 'function') && + node.getElementsByTagName('input').length; + + if (node.getAttribute("sorttable_customkey") != null) { + return node.getAttribute("sorttable_customkey"); + } + else if (typeof node.textContent != 'undefined' && !hasInputs) { + return node.textContent.replace(/^\s+|\s+$/g, ''); + } + else if (typeof node.innerText != 'undefined' && !hasInputs) { + return node.innerText.replace(/^\s+|\s+$/g, ''); + } + else if (typeof node.text != 'undefined' && !hasInputs) { + return node.text.replace(/^\s+|\s+$/g, ''); + } + else { + switch (node.nodeType) { + case 3: + if (node.nodeName.toLowerCase() == 'input') { + return node.value.replace(/^\s+|\s+$/g, ''); + } + case 4: + return node.nodeValue.replace(/^\s+|\s+$/g, ''); + break; + case 1: + case 11: + var innerText = ''; + for (var i = 0; i < node.childNodes.length; i++) { + innerText += sorttable.getInnerText(node.childNodes[i]); + } + return innerText.replace(/^\s+|\s+$/g, ''); + break; + default: + return ''; + } + } + }, + + reverse: function(tbody) { + // reverse the rows in a tbody + newrows = []; + for (var i=0; i=0; i--) { + tbody.appendChild(newrows[i]); + } + delete newrows; + }, + + /* sort functions + each sort function takes two parameters, a and b + you are comparing a[0] and b[0] */ + sort_numeric: function(a,b) { + aa = parseFloat(a[0].replace(/[^0-9.-]/g,'')); + if (isNaN(aa)) aa = 0; + bb = parseFloat(b[0].replace(/[^0-9.-]/g,'')); + if (isNaN(bb)) bb = 0; + return aa-bb; + }, + sort_alpha: function(a,b) { + if (a[0]==b[0]) return 0; + if (a[0] 0 ) { + var q = list[i]; list[i] = list[i+1]; list[i+1] = q; + swap = true; + } + } // for + t--; + + if (!swap) break; + + for(var i = t; i > b; --i) { + if ( comp_func(list[i], list[i-1]) < 0 ) { + var q = list[i]; list[i] = list[i-1]; list[i-1] = q; + swap = true; + } + } // for + b++; + + } // while(swap) + } +} + +/* ****************************************************************** + Supporting functions: bundled here to avoid depending on a library + ****************************************************************** */ + +// Dean Edwards/Matthias Miller/John Resig + +/* for Mozilla/Opera9 */ +if (document.addEventListener) { + document.addEventListener("DOMContentLoaded", sorttable.init, false); +} + +/* for Internet Explorer */ +/*@cc_on @*/ +/*@if (@_win32) + document.write(" + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <X11/keysym.h>
+
+#include <glib/gi18n-lib.h>
+#include <gio/gio.h>
+#include <cafekbd-desktop-config.h>
+#include <cafekbd-config-private.h>
+
+/**
+ * CafekbdDesktopConfig:
+ */
+#define CAFEKBD_DESKTOP_CONFIG_SCHEMA  CAFEKBD_CONFIG_SCHEMA ".general"
+
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP[] = "default-group";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW[] = "group-per-window";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS[] = "handle-indicators";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES[] = "layout-names-as-group-names";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_LOAD_EXTRA_ITEMS[] = "load-extra-items";
+
+/*
+ * static common functions
+ */
+
+static gboolean
+    cafekbd_desktop_config_get_lv_descriptions
+    (CafekbdDesktopConfig * config,
+     XklConfigRegistry * registry,
+     const gchar ** layout_ids,
+     const gchar ** variant_ids,
+     gchar *** short_layout_descriptions,
+     gchar *** long_layout_descriptions,
+     gchar *** short_variant_descriptions,
+     gchar *** long_variant_descriptions) {
+	const gchar **pl, **pv;
+	guint total_layouts;
+	gchar **sld, **lld, **svd, **lvd;
+	XklConfigItem *item = xkl_config_item_new ();
+
+	if (!
+	    (xkl_engine_get_features (config->engine) &
+	     XKLF_MULTIPLE_LAYOUTS_SUPPORTED))
+		return FALSE;
+
+	pl = layout_ids;
+	pv = variant_ids;
+	total_layouts = g_strv_length ((char **) layout_ids);
+	sld = *short_layout_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+	lld = *long_layout_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+	svd = *short_variant_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+	lvd = *long_variant_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+
+	while (pl != NULL && *pl != NULL) {
+
+		xkl_debug (100, "ids: [%s][%s]\n", *pl,
+			   pv == NULL ? NULL : *pv);
+
+		g_snprintf (item->name, sizeof item->name, "%s", *pl);
+		if (xkl_config_registry_find_layout (registry, item)) {
+			*sld = g_strdup (item->short_description);
+			*lld = g_strdup (item->description);
+		} else {
+			*sld = g_strdup ("");
+			*lld = g_strdup ("");
+		}
+
+		if (pv != NULL && *pv != NULL) {
+			g_snprintf (item->name, sizeof item->name, "%s",
+				    *pv);
+			if (xkl_config_registry_find_variant
+			    (registry, *pl, item)) {
+				*svd = g_strdup (item->short_description);
+				*lvd = g_strdup (item->description);
+			} else {
+				*svd = g_strdup ("");
+				*lvd = g_strdup ("");
+			}
+		} else {
+			*svd = g_strdup ("");
+			*lvd = g_strdup ("");
+		}
+
+		xkl_debug (100, "description: [%s][%s][%s][%s]\n",
+			   *sld, *lld, *svd, *lvd);
+		sld++;
+		lld++;
+		svd++;
+		lvd++;
+
+		pl++;
+
+		if (pv != NULL && *pv != NULL)
+			pv++;
+	}
+
+	g_object_unref (item);
+	return TRUE;
+}
+
+/*
+ * extern CafekbdDesktopConfig config functions
+ */
+void
+cafekbd_desktop_config_init (CafekbdDesktopConfig * config,
+			  XklEngine * engine)
+{
+	memset (config, 0, sizeof (*config));
+	config->settings = g_settings_new (CAFEKBD_DESKTOP_CONFIG_SCHEMA);
+	config->engine = engine;
+}
+
+void
+cafekbd_desktop_config_term (CafekbdDesktopConfig * config)
+{
+	g_object_unref (config->settings);
+	config->settings = NULL;
+}
+
+void
+cafekbd_desktop_config_load_from_gsettings (CafekbdDesktopConfig * config)
+{
+	config->group_per_app =
+	    g_settings_get_boolean (config->settings,
+				 CAFEKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW);
+	xkl_debug (150, "group_per_app: %d\n", config->group_per_app);
+
+	config->handle_indicators =
+	    g_settings_get_boolean (config->settings,
+				 CAFEKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS);
+	xkl_debug (150, "handle_indicators: %d\n",
+		   config->handle_indicators);
+
+	config->layout_names_as_group_names =
+	    g_settings_get_boolean (config->settings,
+				   CAFEKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES);
+	xkl_debug (150, "layout_names_as_group_names: %d\n",
+		   config->layout_names_as_group_names);
+
+	config->load_extra_items =
+	    g_settings_get_boolean (config->settings,
+				   CAFEKBD_DESKTOP_CONFIG_KEY_LOAD_EXTRA_ITEMS);
+	xkl_debug (150, "load_extra_items: %d\n",
+		   config->load_extra_items);
+
+	config->default_group =
+	    g_settings_get_int (config->settings,
+				  CAFEKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP);
+
+	if (config->default_group < -1
+	    || config->default_group >=
+	    xkl_engine_get_max_num_groups (config->engine))
+		config->default_group = -1;
+	xkl_debug (150, "default_group: %d\n", config->default_group);
+}
+
+void
+cafekbd_desktop_config_save_to_gsettings (CafekbdDesktopConfig * config)
+{
+	g_settings_delay (config->settings);
+
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW,
+			     config->group_per_app);
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS,
+			     config->handle_indicators);
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES,
+			     config->layout_names_as_group_names);
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_LOAD_EXTRA_ITEMS,
+			     config->load_extra_items);
+	g_settings_set_int (config->settings,
+			    CAFEKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP,
+			    config->default_group);
+
+	g_settings_apply (config->settings);
+}
+
+gboolean
+cafekbd_desktop_config_activate (CafekbdDesktopConfig * config)
+{
+	gboolean rv = TRUE;
+
+	xkl_engine_set_group_per_toplevel_window (config->engine,
+						  config->group_per_app);
+	xkl_engine_set_indicators_handling (config->engine,
+					    config->handle_indicators);
+	xkl_engine_set_default_group (config->engine,
+				      config->default_group);
+
+	return rv;
+}
+
+void
+cafekbd_desktop_config_lock_next_group (CafekbdDesktopConfig * config)
+{
+	int group = xkl_engine_get_next_group (config->engine);
+	xkl_engine_lock_group (config->engine, group);
+}
+
+void
+cafekbd_desktop_config_lock_prev_group (CafekbdDesktopConfig * config)
+{
+	int group = xkl_engine_get_prev_group (config->engine);
+	xkl_engine_lock_group (config->engine, group);
+}
+
+void
+cafekbd_desktop_config_restore_group (CafekbdDesktopConfig * config)
+{
+	int group = xkl_engine_get_current_window_group (config->engine);
+	xkl_engine_lock_group (config->engine, group);
+}
+
+/**
+ * cafekbd_desktop_config_start_listen:
+ * @func: (scope notified): a function to call when settings are changed
+ */
+void
+cafekbd_desktop_config_start_listen (CafekbdDesktopConfig * config,
+				  GCallback func,
+				  gpointer user_data)
+{
+	config->config_listener_id =
+	    g_signal_connect (config->settings, "changed", func,
+			      user_data);
+}
+
+void
+cafekbd_desktop_config_stop_listen (CafekbdDesktopConfig * config)
+{
+	g_signal_handler_disconnect (config->settings,
+				    config->config_listener_id);
+	config->config_listener_id = 0;
+}
+
+gboolean
+cafekbd_desktop_config_load_group_descriptions (CafekbdDesktopConfig
+					     * config,
+					     XklConfigRegistry *
+					     registry,
+					     const gchar **
+					     layout_ids,
+					     const gchar **
+					     variant_ids,
+					     gchar ***
+					     short_group_names,
+					     gchar *** full_group_names)
+{
+	gchar **sld, **lld, **svd, **lvd;
+	gchar **psld, **plld, **plvd;
+	gchar **psgn, **pfgn, **psvd;
+	gint total_descriptions;
+
+	if (!cafekbd_desktop_config_get_lv_descriptions
+	    (config, registry, layout_ids, variant_ids, &sld, &lld, &svd,
+	     &lvd)) {
+		return False;
+	}
+
+	total_descriptions = g_strv_length (sld);
+
+	*short_group_names = psgn =
+	    g_new0 (gchar *, total_descriptions + 1);
+	*full_group_names = pfgn =
+	    g_new0 (gchar *, total_descriptions + 1);
+
+	plld = lld;
+	psld = sld;
+	plvd = lvd;
+	psvd = svd;
+	while (plld != NULL && *plld != NULL) {
+		gchar *sd = (*psvd[0] == '\0') ? *psld : *psvd;
+		psld++, psvd++;
+		*psgn++ = g_strdup (sd);
+		*pfgn++ = g_strdup (cafekbd_keyboard_config_format_full_layout
+				    (*plld++, *plvd++));
+	}
+	g_strfreev (sld);
+	g_strfreev (lld);
+	g_strfreev (svd);
+	g_strfreev (lvd);
+
+	return True;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/1.html b/2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/1.html new file mode 100644 index 0000000..43abc15 --- /dev/null +++ b/2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/1.html @@ -0,0 +1,914 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <X11/keysym.h>
+
+#include <pango/pango.h>
+
+#include <glib/gi18n-lib.h>
+#include <cdk/cdkx.h>
+
+#include <cafekbd-keyboard-config.h>
+#include <cafekbd-indicator-config.h>
+
+#include <cafekbd-config-private.h>
+
+/**
+ * CafekbdIndicatorConfig:
+ */
+#define CAFEKBD_INDICATOR_CONFIG_SCHEMA  CAFEKBD_CONFIG_SCHEMA ".indicator"
+
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS[] = "show-flags";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_SECONDARIES[] = "secondary";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_FONT_FAMILY[] = "font-family";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_FOREGROUND_COLOR[] = "foreground-color";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_BACKGROUND_COLOR[] = "background-color";
+
+/*
+ * static applet config functions
+ */
+static void
+cafekbd_indicator_config_load_font (CafekbdIndicatorConfig * ind_config)
+{
+	ind_config->font_family =
+	    g_settings_get_string (ind_config->settings,
+				   CAFEKBD_INDICATOR_CONFIG_KEY_FONT_FAMILY);
+
+	if (ind_config->font_family == NULL ||
+	    ind_config->font_family[0] == '\0') {
+		PangoFontDescription *fd = NULL;
+		CtkWidgetPath *widget_path = ctk_widget_path_new ();
+		CtkStyleContext *context = ctk_style_context_new ();
+
+		ctk_widget_path_append_type (widget_path, CTK_TYPE_WINDOW);
+		ctk_widget_path_iter_set_name (widget_path, -1 , "PanelWidget");
+
+		ctk_style_context_set_path (context, widget_path);
+		ctk_style_context_set_screen (context, cdk_screen_get_default ());
+		ctk_style_context_set_state (context, CTK_STATE_FLAG_NORMAL);
+		ctk_style_context_add_class (context, CTK_STYLE_CLASS_DEFAULT);
+		ctk_style_context_add_class (context, "gnome-panel-menu-bar");
+		ctk_style_context_add_class (context, "cafe-panel-menu-bar");
+
+		ctk_style_context_get (context, CTK_STATE_FLAG_NORMAL,
+		                       CTK_STYLE_PROPERTY_FONT, &fd, NULL);
+
+		if (fd != NULL) {
+			ind_config->font_family =
+			    g_strdup (pango_font_description_to_string(fd));
+		}
+
+		g_object_unref (G_OBJECT (context));
+		ctk_widget_path_unref (widget_path);
+	}
+	xkl_debug (150, "font: [%s]\n", ind_config->font_family);
+
+}
+
+static void
+cafekbd_indicator_config_load_colors (CafekbdIndicatorConfig * ind_config)
+{
+	ind_config->foreground_color =
+	    g_settings_get_string (ind_config->settings,
+	                           CAFEKBD_INDICATOR_CONFIG_KEY_FOREGROUND_COLOR);
+
+	if (ind_config->foreground_color == NULL ||
+	    ind_config->foreground_color[0] == '\0') {
+		CtkWidgetPath *widget_path = ctk_widget_path_new ();
+		CtkStyleContext *context = ctk_style_context_new ();
+		CdkRGBA fg_color;
+
+		ctk_widget_path_append_type (widget_path, CTK_TYPE_WINDOW);
+		ctk_widget_path_iter_set_name (widget_path, -1 , "PanelWidget");
+
+		ctk_style_context_set_path (context, widget_path);
+		ctk_style_context_set_screen (context, cdk_screen_get_default ());
+		ctk_style_context_set_state (context, CTK_STATE_FLAG_NORMAL);
+		ctk_style_context_add_class (context, CTK_STYLE_CLASS_DEFAULT);
+		ctk_style_context_add_class (context, "gnome-panel-menu-bar");
+		ctk_style_context_add_class (context, "cafe-panel-menu-bar");
+
+		ctk_style_context_get_color (context,
+		                             CTK_STATE_FLAG_NORMAL, &fg_color);
+		ind_config->foreground_color =
+		    g_strdup_printf ("%g %g %g",
+		                     fg_color.red,
+		                     fg_color.green,
+		                     fg_color.blue);
+
+		g_object_unref (G_OBJECT (context));
+		ctk_widget_path_unref (widget_path);
+	}
+
+	ind_config->background_color =
+	    g_settings_get_string (ind_config->settings,
+				     CAFEKBD_INDICATOR_CONFIG_KEY_BACKGROUND_COLOR);
+}
+
+void
+cafekbd_indicator_config_refresh_style (CafekbdIndicatorConfig * ind_config)
+{
+	g_free (ind_config->font_family);
+	g_free (ind_config->foreground_color);
+	g_free (ind_config->background_color);
+	cafekbd_indicator_config_load_font (ind_config);
+	cafekbd_indicator_config_load_colors (ind_config);
+}
+
+gchar *
+cafekbd_indicator_config_get_images_file (CafekbdIndicatorConfig *
+				       ind_config,
+				       CafekbdKeyboardConfig *
+				       kbd_config, int group)
+{
+	char *image_file = NULL;
+	CtkIconInfo *icon_info = NULL;
+
+	if (!ind_config->show_flags)
+		return NULL;
+
+	if ((kbd_config->layouts_variants != NULL) &&
+	    (g_strv_length (kbd_config->layouts_variants) > group)) {
+		char *full_layout_name =
+		    kbd_config->layouts_variants[group];
+
+		if (full_layout_name != NULL) {
+			char *l, *v;
+			cafekbd_keyboard_config_split_items (full_layout_name,
+							  &l, &v);
+			if (l != NULL) {
+				/* probably there is something in theme? */
+				icon_info = ctk_icon_theme_lookup_icon
+				    (ind_config->icon_theme, l, 48, 0);
+
+				/* Unbelievable but happens */
+				if (icon_info != NULL &&
+				    ctk_icon_info_get_filename (icon_info) == NULL) {
+					g_object_unref (icon_info);
+					icon_info = NULL;
+				}
+			}
+		}
+	}
+	/* fallback to the default value */
+	if (icon_info == NULL) {
+		icon_info = ctk_icon_theme_lookup_icon
+		    (ind_config->icon_theme, "stock_dialog-error", 48, 0);
+	}
+	if (icon_info != NULL) {
+		image_file =
+		    g_strdup (ctk_icon_info_get_filename (icon_info));
+		g_object_unref (icon_info);
+	}
+
+	return image_file;
+}
+
+void
+cafekbd_indicator_config_load_image_filenames (CafekbdIndicatorConfig *
+					    ind_config,
+					    CafekbdKeyboardConfig *
+					    kbd_config)
+{
+	int i;
+	ind_config->image_filenames = NULL;
+
+	if (!ind_config->show_flags)
+		return;
+
+	for (i = xkl_engine_get_max_num_groups (ind_config->engine);
+	     --i >= 0;) {
+		gchar *image_file =
+		    cafekbd_indicator_config_get_images_file (ind_config,
+							   kbd_config,
+							   i);
+		ind_config->image_filenames =
+		    g_slist_prepend (ind_config->image_filenames,
+				     image_file);
+	}
+}
+
+void
+cafekbd_indicator_config_free_image_filenames (CafekbdIndicatorConfig *
+					    ind_config)
+{
+	while (ind_config->image_filenames) {
+		if (ind_config->image_filenames->data)
+			g_free (ind_config->image_filenames->data);
+		ind_config->image_filenames =
+		    g_slist_delete_link (ind_config->image_filenames,
+					 ind_config->image_filenames);
+	}
+}
+
+void
+cafekbd_indicator_config_init (CafekbdIndicatorConfig * ind_config,
+			       XklEngine * engine)
+{
+	gchar *sp;
+
+	memset (ind_config, 0, sizeof (*ind_config));
+	ind_config->settings = g_settings_new (CAFEKBD_INDICATOR_CONFIG_SCHEMA);
+	ind_config->engine = engine;
+
+	ind_config->icon_theme = ctk_icon_theme_get_default ();
+
+	ctk_icon_theme_append_search_path (ind_config->icon_theme, sp =
+					   g_build_filename (g_get_home_dir
+							     (),
+							     ".icons/flags",
+							     NULL));
+	g_free (sp);
+
+	ctk_icon_theme_append_search_path (ind_config->icon_theme,
+					   sp =
+					   g_build_filename (DATADIR,
+							     "pixmaps/flags",
+							     NULL));
+	g_free (sp);
+
+	ctk_icon_theme_append_search_path (ind_config->icon_theme,
+					   sp =
+					   g_build_filename (DATADIR,
+							     "icons/flags",
+							     NULL));
+	g_free (sp);
+}
+
+void
+cafekbd_indicator_config_term (CafekbdIndicatorConfig * ind_config)
+{
+	g_free (ind_config->font_family);
+	ind_config->font_family = NULL;
+
+	g_free (ind_config->foreground_color);
+	ind_config->foreground_color = NULL;
+
+	g_free (ind_config->background_color);
+	ind_config->background_color = NULL;
+
+	ind_config->icon_theme = NULL;
+
+	cafekbd_indicator_config_free_image_filenames (ind_config);
+
+	g_object_unref (ind_config->settings);
+	ind_config->settings = NULL;
+}
+
+void
+cafekbd_indicator_config_load_from_gsettings (CafekbdIndicatorConfig * ind_config)
+{
+	ind_config->secondary_groups_mask =
+	    g_settings_get_int (ind_config->settings,
+				CAFEKBD_INDICATOR_CONFIG_KEY_SECONDARIES);
+
+	ind_config->show_flags =
+	    g_settings_get_boolean (ind_config->settings,
+				 CAFEKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS);
+
+	cafekbd_indicator_config_load_font (ind_config);
+	cafekbd_indicator_config_load_colors (ind_config);
+
+}
+
+void
+cafekbd_indicator_config_save_to_gsettings (CafekbdIndicatorConfig * ind_config)
+{
+	g_settings_delay (ind_config->settings);
+
+	g_settings_set_int (ind_config->settings,
+				  CAFEKBD_INDICATOR_CONFIG_KEY_SECONDARIES,
+				  ind_config->secondary_groups_mask);
+	g_settings_set_boolean (ind_config->settings,
+				   CAFEKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS,
+				   ind_config->show_flags);
+
+	g_settings_apply (ind_config->settings);
+}
+
+void
+cafekbd_indicator_config_activate (CafekbdIndicatorConfig * ind_config)
+{
+	xkl_engine_set_secondary_groups_mask (ind_config->engine,
+					      ind_config->secondary_groups_mask);
+}
+
+/**
+ * cafekbd_indicator_config_start_listen:
+ * @func: (scope notified): a function to call when settings are changed
+ */
+void
+cafekbd_indicator_config_start_listen (CafekbdIndicatorConfig *
+				    ind_config,
+				    GCallback func,
+				    gpointer user_data)
+{
+	ind_config->config_listener_id =
+	    g_signal_connect (ind_config->settings, "changed", func,
+			      user_data);
+}
+
+void
+cafekbd_indicator_config_stop_listen (CafekbdIndicatorConfig * ind_config)
+{
+	g_signal_handler_disconnect (ind_config->settings,
+				     ind_config->config_listener_id);
+	ind_config->config_listener_id = 0;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/2.html b/2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/2.html new file mode 100644 index 0000000..41da05e --- /dev/null +++ b/2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/2.html @@ -0,0 +1,2090 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
+871
+872
+873
+874
+875
+876
+877
+878
+879
+880
+881
+882
+883
+884
+885
+886
+887
+888
+889
+890
+891
+892
+893
+894
+895
+896
+897
+898
+899
+900
+901
+902
+903
+904
+905
+906
+907
+908
+909
+910
+911
+912
+913
+914
+915
+916
+917
+918
+919
+920
+921
+922
+923
+924
+925
+926
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+#include <config.h>
+
+#include <memory.h>
+
+#include <ctk/ctk.h>
+#include <cdk/cdkkeysyms.h>
+#include <cdk/cdkx.h>
+#include <glib/gi18n-lib.h>
+
+#include <cafekbd-indicator.h>
+#include <cafekbd-indicator-marshal.h>
+
+#include <cafekbd-desktop-config.h>
+#include <cafekbd-indicator-config.h>
+
+typedef struct _gki_globals {
+	XklEngine *engine;
+	XklConfigRegistry *registry;
+
+	CafekbdDesktopConfig cfg;
+	CafekbdIndicatorConfig ind_cfg;
+	CafekbdKeyboardConfig kbd_cfg;
+
+	const gchar *tooltips_format;
+	gchar **full_group_names;
+	gchar **short_group_names;
+	GSList *widget_instances;
+	GSList *images;
+} gki_globals;
+
+struct _CafekbdIndicatorPrivate {
+	gboolean set_parent_tooltips;
+	gdouble angle;
+};
+
+/* one instance for ALL widgets */
+static gki_globals globals;
+
+#define ForAllIndicators() \
+	{ \
+		GSList* cur; \
+		for (cur = globals.widget_instances; cur != NULL; cur = cur->next) { \
+			CafekbdIndicator * gki = (CafekbdIndicator*)cur->data;
+#define NextIndicator() \
+		} \
+	}
+
+G_DEFINE_TYPE (CafekbdIndicator, cafekbd_indicator, CTK_TYPE_NOTEBOOK)<--- There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
+
+static void
+cafekbd_indicator_global_init (void);
+static void
+cafekbd_indicator_global_term (void);
+static CtkWidget *
+cafekbd_indicator_prepare_drawing (CafekbdIndicator * gki, int group);
+static void
+cafekbd_indicator_set_current_page_for_group (CafekbdIndicator * gki, int group);
+static void
+cafekbd_indicator_set_current_page (CafekbdIndicator * gki);
+static void
+cafekbd_indicator_cleanup (CafekbdIndicator * gki);
+static void
+cafekbd_indicator_fill (CafekbdIndicator * gki);
+static void
+cafekbd_indicator_set_tooltips (CafekbdIndicator * gki, const char *str);
+
+void
+cafekbd_indicator_load_images ()
+{
+	int i;
+	GSList *image_filename;
+
+	globals.images = NULL;
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	if (!globals.ind_cfg.show_flags)
+		return;
+
+	image_filename = globals.ind_cfg.image_filenames;
+
+	for (i = xkl_engine_get_max_num_groups (globals.engine);
+	     --i >= 0; image_filename = image_filename->next) {
+		GdkPixbuf *image = NULL;
+		char *image_file = (char *) image_filename->data;
+
+		if (image_file != NULL) {
+			GError *gerror = NULL;
+			image =
+			    gdk_pixbuf_new_from_file (image_file, &gerror);
+			if (image == NULL) {
+				CtkWidget *dialog =
+				    ctk_message_dialog_new (NULL,
+							    CTK_DIALOG_DESTROY_WITH_PARENT,
+							    CTK_MESSAGE_ERROR,
+							    CTK_BUTTONS_OK,
+							    _
+							    ("There was an error loading an image: %s"),
+							    gerror->
+							    message);
+				g_signal_connect (G_OBJECT (dialog),
+						  "response",
+						  G_CALLBACK
+						  (ctk_widget_destroy),
+						  NULL);
+
+				ctk_window_set_resizable (CTK_WINDOW
+							  (dialog), FALSE);
+
+				ctk_widget_show (dialog);
+				g_error_free (gerror);
+			}
+			xkl_debug (150,
+				   "Image %d[%s] loaded -> %p[%dx%d]\n",
+				   i, image_file, image,
+				   gdk_pixbuf_get_width (image),
+				   gdk_pixbuf_get_height (image));
+		}
+		/* We append the image anyway - even if it is NULL! */
+		globals.images = g_slist_append (globals.images, image);
+	}
+}
+
+static void
+cafekbd_indicator_free_images ()
+{
+	GSList *img_node;
+
+	cafekbd_indicator_config_free_image_filenames (&globals.ind_cfg);
+
+	while ((img_node = globals.images) != NULL) {
+		GdkPixbuf *pi;
+
+		pi = GDK_PIXBUF (img_node->data);
+		/* It can be NULL - some images may be missing */
+		if (pi != NULL) {
+			g_object_unref (pi);
+		}
+		globals.images =
+		    g_slist_remove_link (globals.images, img_node);
+		g_slist_free_1 (img_node);
+	}
+}
+
+static void
+cafekbd_indicator_update_images (void)
+{
+	cafekbd_indicator_free_images ();
+	cafekbd_indicator_load_images ();
+}
+
+void
+cafekbd_indicator_set_tooltips (CafekbdIndicator * gki, const char *str)
+{
+	g_assert (str == NULL || g_utf8_validate (str, -1, NULL));
+
+	ctk_widget_set_tooltip_text (CTK_WIDGET (gki), str);
+
+	if (gki->priv->set_parent_tooltips) {
+		CtkWidget *parent =
+		    ctk_widget_get_parent (CTK_WIDGET (gki));
+		if (parent) {
+			ctk_widget_set_tooltip_text (parent, str);
+		}
+	}
+}
+
+void
+cafekbd_indicator_cleanup (CafekbdIndicator * gki)
+{
+	int i;
+	CtkNotebook *notebook = CTK_NOTEBOOK (gki);
+
+	/* Do not remove the first page! It is the default page */
+	for (i = ctk_notebook_get_n_pages (notebook); --i > 0;) {
+		ctk_notebook_remove_page (notebook, i);
+	}
+}
+
+void
+cafekbd_indicator_fill (CafekbdIndicator * gki)
+{
+	int grp;
+	int total_groups = xkl_engine_get_num_groups (globals.engine);
+	CtkNotebook *notebook = CTK_NOTEBOOK (gki);
+
+	for (grp = 0; grp < total_groups; grp++) {
+		CtkWidget *page;
+		page = cafekbd_indicator_prepare_drawing (gki, grp);
+
+		if (page == NULL)
+			page = ctk_label_new ("");
+
+		ctk_notebook_append_page (notebook, page, NULL);
+		ctk_widget_show_all (page);
+	}
+}
+
+static gboolean cafekbd_indicator_key_pressed (CtkWidget        *widget G_GNUC_UNUSED,
+					       CdkEventKey      *event,
+					       CafekbdIndicator *gki G_GNUC_UNUSED)
+{
+	switch (event->keyval)
+	{
+			case CDK_KEY_KP_Enter:
+			case CDK_KEY_ISO_Enter:
+			case CDK_KEY_3270_Enter:
+			case CDK_KEY_Return:
+			case CDK_KEY_space:
+			case CDK_KEY_KP_Space:
+			cafekbd_desktop_config_lock_next_group(&globals.cfg);
+			return TRUE;
+		default:
+			break;
+	}
+
+	return FALSE;
+}
+
+static gboolean
+cafekbd_indicator_button_pressed (CtkWidget        *widget,
+				  CdkEventButton   *event,
+				  CafekbdIndicator *gki G_GNUC_UNUSED)
+{
+	CtkWidget *img = ctk_bin_get_child (CTK_BIN (widget));
+	CtkAllocation allocation;
+	ctk_widget_get_allocation (img, &allocation);
+	xkl_debug (150, "Flag img size %d x %d\n",
+		   allocation.width, allocation.height);
+	if (event->button == 1 && event->type == CDK_BUTTON_PRESS) {
+		xkl_debug (150, "Mouse button pressed on applet\n");
+		cafekbd_desktop_config_lock_next_group (&globals.cfg);
+		return TRUE;
+	}
+	return FALSE;
+}
+
+static void
+draw_flag (CtkWidget * flag, cairo_t * cr, GdkPixbuf * image)
+{
+	/* Image width and height */
+	int iw = gdk_pixbuf_get_width (image);
+	int ih = gdk_pixbuf_get_height (image);
+	CtkAllocation allocation;
+	double xwiratio, ywiratio, wiratio;
+
+	ctk_widget_get_allocation (flag, &allocation);
+
+	/* widget-to-image scales, X and Y */
+	xwiratio = 1.0 * allocation.width / iw;
+	ywiratio = 1.0 * allocation.height / ih;
+	wiratio = xwiratio < ywiratio ? xwiratio : ywiratio;
+
+	/* transform cairo context */
+	cairo_translate (cr, allocation.width / 2.0, allocation.height / 2.0);
+	cairo_scale (cr, wiratio, wiratio);
+	cairo_translate (cr, - iw / 2.0, - ih / 2.0);
+
+	cdk_cairo_set_source_pixbuf (cr, image, 0, 0);
+	cairo_paint (cr);
+}
+
+gchar *
+cafekbd_indicator_extract_layout_name (int group, XklEngine * engine,
+				    CafekbdKeyboardConfig * kbd_cfg,
+				    gchar ** short_group_names,
+				    gchar ** full_group_names)
+{
+	char *layout_name = NULL;
+	if (group < g_strv_length (short_group_names)) {
+		if (xkl_engine_get_features (engine) &
+		    XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
+			char *full_layout_name =
+			    kbd_cfg->layouts_variants[group];
+			char *variant_name;
+			if (!cafekbd_keyboard_config_split_items
+			    (full_layout_name, &layout_name,
+			     &variant_name))
+				/* just in case */
+				layout_name = full_layout_name;
+
+			/* make it freeable */
+			layout_name = g_strdup (layout_name);
+
+			if (short_group_names != NULL) {
+				char *short_group_name =
+				    short_group_names[group];
+				if (short_group_name != NULL
+				    && *short_group_name != '\0') {
+					/* drop the long name */
+					g_free (layout_name);
+					layout_name =
+					    g_strdup (short_group_name);
+				}
+			}
+		} else {
+			layout_name = g_strdup (full_group_names[group]);
+		}
+	}
+
+	if (layout_name == NULL)
+		layout_name = g_strdup ("");
+
+	return layout_name;
+}
+
+gchar *
+cafekbd_indicator_create_label_title (int group, GHashTable ** ln2cnt_map,
+				   gchar * layout_name)
+{
+	gpointer pcounter = NULL;
+	char *prev_layout_name = NULL;
+	char *lbl_title = NULL;
+	int counter = 0;
+
+	if (group == 0) {
+		*ln2cnt_map =
+		    g_hash_table_new_full (g_str_hash, g_str_equal,
+					   g_free, NULL);
+	}
+
+	/* Process layouts with repeating description */
+	if (g_hash_table_lookup_extended
+	    (*ln2cnt_map, layout_name, (gpointer *) & prev_layout_name,
+	     &pcounter)) {
+		/* "next" same description */
+		gchar appendix[10] = "";
+		gint utf8length;
+		gunichar cidx;
+		counter = GPOINTER_TO_INT (pcounter);
+		/* Unicode subscript 2, 3, 4 */
+		cidx = 0x2081 + counter;
+		utf8length = g_unichar_to_utf8 (cidx, appendix);
+		appendix[utf8length] = '\0';
+		lbl_title = g_strconcat (layout_name, appendix, NULL);
+	} else {
+		/* "first" time this description */
+		lbl_title = g_strdup (layout_name);
+	}
+	g_hash_table_insert (*ln2cnt_map, layout_name,
+			     GINT_TO_POINTER (counter + 1));
+	return lbl_title;
+}
+
+static CtkWidget *
+cafekbd_indicator_prepare_drawing (CafekbdIndicator * gki, int group)
+{
+	gpointer pimage;
+	CtkWidget *ebox;
+
+	pimage = g_slist_nth_data (globals.images, group);
+	ebox = ctk_event_box_new ();
+	ctk_event_box_set_visible_window (CTK_EVENT_BOX (ebox), FALSE);
+	if (globals.ind_cfg.show_flags) {
+		GdkPixbuf *image;
+		CtkWidget *flag;
+
+		if (pimage == NULL)
+			return NULL;
+		image = GDK_PIXBUF (pimage);
+		flag = ctk_drawing_area_new ();
+		ctk_widget_add_events (CTK_WIDGET (flag),
+				       CDK_BUTTON_PRESS_MASK);
+		g_signal_connect (G_OBJECT (flag), "draw",
+		                  G_CALLBACK (draw_flag), image);
+		ctk_container_add (CTK_CONTAINER (ebox), flag);
+	} else {
+		char *lbl_title = NULL;
+		char *layout_name = NULL;
+		CtkWidget *label;
+		static GHashTable *ln2cnt_map = NULL;
+
+		layout_name =
+		    cafekbd_indicator_extract_layout_name (group,
+							globals.engine,
+							&globals.kbd_cfg,
+							globals.short_group_names,
+							globals.full_group_names);
+
+		lbl_title =
+		    cafekbd_indicator_create_label_title (group,
+						       &ln2cnt_map,
+						       layout_name);
+
+		label = ctk_label_new (lbl_title);
+		ctk_widget_set_halign (label, CTK_ALIGN_CENTER);
+		ctk_widget_set_valign (label, CTK_ALIGN_CENTER);
+		ctk_widget_set_margin_start (label, 2);
+		ctk_widget_set_margin_end (label, 2);
+		ctk_widget_set_margin_top (label, 2);
+		ctk_widget_set_margin_bottom (label, 2);
+		g_free (lbl_title);
+		ctk_label_set_angle (CTK_LABEL (label), gki->priv->angle);
+
+		if (group + 1 ==
+		    xkl_engine_get_num_groups (globals.engine)) {
+			g_hash_table_destroy (ln2cnt_map);
+			ln2cnt_map = NULL;
+		}
+
+		ctk_container_add (CTK_CONTAINER (ebox), label);
+	}
+
+	g_signal_connect (G_OBJECT (ebox),
+			  "button_press_event",
+			  G_CALLBACK (cafekbd_indicator_button_pressed), gki);
+
+	g_signal_connect (G_OBJECT (gki),
+			  "key_press_event",
+			  G_CALLBACK (cafekbd_indicator_key_pressed), gki);
+
+	/* We have everything prepared for that size */
+
+	return ebox;
+}
+
+static void
+cafekbd_indicator_update_tooltips (CafekbdIndicator * gki)
+{
+	XklState *state = xkl_engine_get_current_state (globals.engine);
+	gchar *buf;
+	if (state == NULL || state->group < 0
+	    || state->group >= g_strv_length (globals.full_group_names))
+		return;
+
+	buf = g_strdup_printf (globals.tooltips_format,
+			       globals.full_group_names[state->group]);
+
+	cafekbd_indicator_set_tooltips (gki, buf);
+	g_free (buf);
+}
+
+static void
+cafekbd_indicator_parent_set (CtkWidget *gki,
+			      CtkWidget *previous_parent G_GNUC_UNUSED)
+{
+	cafekbd_indicator_update_tooltips (CAFEKBD_INDICATOR (gki));
+}
+
+
+void
+cafekbd_indicator_reinit_ui (CafekbdIndicator * gki)
+{
+	cafekbd_indicator_cleanup (gki);
+	cafekbd_indicator_fill (gki);
+
+	cafekbd_indicator_set_current_page (gki);
+
+	g_signal_emit_by_name (gki, "reinit-ui");
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+			       gchar     *key G_GNUC_UNUSED,
+			       gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "General configuration changed in GSettings - reiniting...\n");
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+	ForAllIndicators () {
+		cafekbd_indicator_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_ind_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+				   gchar     *key G_GNUC_UNUSED,
+				   gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "Applet configuration changed in GSettings - reiniting...\n");
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+	cafekbd_indicator_update_images ();
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	ForAllIndicators () {
+		cafekbd_indicator_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+static void
+cafekbd_indicator_load_group_names (const gchar ** layout_ids,
+				 const gchar ** variant_ids)
+{
+	if (!cafekbd_desktop_config_load_group_descriptions
+	    (&globals.cfg, globals.registry, layout_ids, variant_ids,
+	     &globals.short_group_names, &globals.full_group_names)) {
+		/* We just populate no short names (remain NULL) -
+		 * full names are going to be used anyway */
+		gint i, total_groups =
+		    xkl_engine_get_num_groups (globals.engine);
+		globals.full_group_names =
+		    g_new0 (gchar *, total_groups + 1);
+
+		if (xkl_engine_get_features (globals.engine) &
+		    XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
+			gchar **lst = globals.kbd_cfg.layouts_variants;
+			for (i = 0; *lst; lst++, i++) {
+				globals.full_group_names[i] =
+				    g_strdup ((char *) *lst);
+			}
+		} else {
+			for (i = total_groups; --i >= 0;) {
+				globals.full_group_names[i] =
+				    g_strdup_printf ("Group %d", i);
+			}
+		}
+	}
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_kbd_cfg_callback (CafekbdIndicator *gki G_GNUC_UNUSED)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+	xkl_debug (100,
+		   "XKB configuration changed on X Server - reiniting...\n");
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+	cafekbd_indicator_update_images ();
+
+	g_strfreev (globals.full_group_names);
+	globals.full_group_names = NULL;
+
+	if (globals.short_group_names != NULL) {
+		g_strfreev (globals.short_group_names);
+		globals.short_group_names = NULL;
+	}
+
+	cafekbd_indicator_load_group_names ((const gchar **) xklrec->layouts,
+					 (const gchar **)
+					 xklrec->variants);
+
+	ForAllIndicators () {
+		cafekbd_indicator_reinit_ui (gki);
+	} NextIndicator ();
+	g_object_unref (G_OBJECT (xklrec));
+}
+
+/* Should be called once for all applets */
+static void
+cafekbd_indicator_state_callback (XklEngine           *engine G_GNUC_UNUSED,
+				  XklEngineStateChange changeType,
+				  gint                 group,
+				  gboolean             restore)
+{
+	xkl_debug (150, "group is now %d, restore: %d\n", group, restore);
+
+	if (changeType == GROUP_CHANGED) {
+		ForAllIndicators () {
+			xkl_debug (200, "do repaint\n");
+			cafekbd_indicator_set_current_page_for_group
+			    (gki, group);
+		}
+		NextIndicator ();
+	}
+}
+
+
+void
+cafekbd_indicator_set_current_page (CafekbdIndicator * gki)
+{
+	XklState *cur_state;
+	cur_state = xkl_engine_get_current_state (globals.engine);
+	if (cur_state->group >= 0)
+		cafekbd_indicator_set_current_page_for_group (gki,
+							   cur_state->
+							   group);
+}
+
+void
+cafekbd_indicator_set_current_page_for_group (CafekbdIndicator * gki, int group)
+{
+	xkl_debug (200, "Revalidating for group %d\n", group);
+
+	ctk_notebook_set_current_page (CTK_NOTEBOOK (gki), group + 1);
+
+	cafekbd_indicator_update_tooltips (gki);
+}
+
+/* Should be called once for all widgets */
+static CdkFilterReturn
+cafekbd_indicator_filter_x_evt (CdkXEvent *xev,
+				CdkEvent  *event G_GNUC_UNUSED)
+{
+	XEvent *xevent = (XEvent *) xev;
+
+	xkl_engine_filter_events (globals.engine, xevent);
+	switch (xevent->type) {
+	case ReparentNotify:
+		{
+			XReparentEvent *rne = (XReparentEvent *) xev;
+
+			ForAllIndicators () {
+				CdkWindow *w =
+				    ctk_widget_get_parent_window
+				    (CTK_WIDGET (gki));
+
+				/* compare the indicator's parent window with the even window */
+				if (w != NULL
+				    && CDK_WINDOW_XID (w) == rne->window) {
+					/* if so - make it transparent... */
+					xkl_engine_set_window_transparent
+					    (globals.engine, rne->window,
+					     TRUE);
+				}
+			}
+			NextIndicator ()
+		}
+		break;
+	}
+	return CDK_FILTER_CONTINUE;
+}
+
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_start_listen (void)
+{
+	cdk_window_add_filter (NULL, (CdkFilterFunc)
+			       cafekbd_indicator_filter_x_evt, NULL);
+	cdk_window_add_filter (cdk_get_default_root_window (),
+			       (CdkFilterFunc)
+			       cafekbd_indicator_filter_x_evt, NULL);
+
+	xkl_engine_start_listen (globals.engine,
+				 XKLL_TRACK_KEYBOARD_STATE);
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_stop_listen (void)
+{
+	xkl_engine_stop_listen (globals.engine, XKLL_TRACK_KEYBOARD_STATE);
+
+	cdk_window_remove_filter (NULL, (CdkFilterFunc)
+				  cafekbd_indicator_filter_x_evt, NULL);
+	cdk_window_remove_filter
+	    (cdk_get_default_root_window (),
+	     (CdkFilterFunc) cafekbd_indicator_filter_x_evt, NULL);
+}
+
+static gboolean
+cafekbd_indicator_scroll (CtkWidget      *gki G_GNUC_UNUSED,
+			  CdkEventScroll *event G_GNUC_UNUSED)
+{
+	/* mouse wheel events should be ignored, otherwise funny effects appear */
+	return TRUE;
+}
+
+static void cafekbd_indicator_init(CafekbdIndicator* gki)
+{
+	CtkWidget *def_drawing;
+	CtkNotebook *notebook;
+
+	if (!g_slist_length(globals.widget_instances))
+	{
+		cafekbd_indicator_global_init();
+	}
+
+	gki->priv = g_new0 (CafekbdIndicatorPrivate, 1);
+
+	notebook = CTK_NOTEBOOK (gki);
+
+	xkl_debug (100, "Initiating the widget startup process for %p\n", gki);
+
+	ctk_notebook_set_show_tabs (notebook, FALSE);
+	ctk_notebook_set_show_border (notebook, FALSE);
+
+	def_drawing =
+	    ctk_image_new_from_icon_name ("process-stop",
+				      CTK_ICON_SIZE_BUTTON);
+
+	ctk_notebook_append_page (notebook, def_drawing,
+				  ctk_label_new (""));
+
+	if (globals.engine == NULL) {
+		cafekbd_indicator_set_tooltips (gki,
+					     _
+					     ("XKB initialization error"));
+		return;
+	}
+
+	cafekbd_indicator_set_tooltips (gki, NULL);
+
+	cafekbd_indicator_fill (gki);
+	cafekbd_indicator_set_current_page (gki);
+
+	ctk_widget_add_events (CTK_WIDGET (gki), CDK_BUTTON_PRESS_MASK);
+
+	/* append AFTER all initialization work is finished */
+	globals.widget_instances =
+	    g_slist_append (globals.widget_instances, gki);
+}
+
+static void
+cafekbd_indicator_finalize (GObject * obj)
+{
+	CafekbdIndicator *gki = CAFEKBD_INDICATOR (obj);
+	xkl_debug (100,
+		   "Starting the cafe-kbd-indicator widget shutdown process for %p\n",
+		   gki);
+
+	/* remove BEFORE all termination work is finished */
+	globals.widget_instances =
+	    g_slist_remove (globals.widget_instances, gki);
+
+	cafekbd_indicator_cleanup (gki);
+
+	xkl_debug (100,
+		   "The instance of cafe-kbd-indicator successfully finalized\n");
+
+	g_free (gki->priv);
+
+	G_OBJECT_CLASS (cafekbd_indicator_parent_class)->finalize (obj);
+
+	if (!g_slist_length (globals.widget_instances))
+		cafekbd_indicator_global_term ();
+}
+
+static void
+cafekbd_indicator_global_term (void)
+{
+	xkl_debug (100, "*** Last  CafekbdIndicator instance *** \n");
+	cafekbd_indicator_stop_listen ();
+
+	cafekbd_desktop_config_stop_listen (&globals.cfg);
+	cafekbd_indicator_config_stop_listen (&globals.ind_cfg);
+
+	cafekbd_indicator_config_term (&globals.ind_cfg);
+	cafekbd_keyboard_config_term (&globals.kbd_cfg);
+	cafekbd_desktop_config_term (&globals.cfg);
+
+	g_object_unref (G_OBJECT (globals.registry));
+	globals.registry = NULL;
+	g_object_unref (G_OBJECT (globals.engine));
+	globals.engine = NULL;
+	xkl_debug (100, "*** Terminated globals *** \n");
+}
+
+static void
+cafekbd_indicator_class_init (CafekbdIndicatorClass * klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+	CtkWidgetClass *widget_class = CTK_WIDGET_CLASS (klass);
+
+	xkl_debug (100, "*** First CafekbdIndicator instance *** \n");
+
+	memset (&globals, 0, sizeof (globals));
+
+	/* Initing some global vars */
+	globals.tooltips_format = "%s";
+
+	/* Initing vtable */
+	object_class->finalize = cafekbd_indicator_finalize;
+
+	widget_class->scroll_event = cafekbd_indicator_scroll;
+	widget_class->parent_set = cafekbd_indicator_parent_set;
+
+	/* Signals */
+	g_signal_new ("reinit-ui", CAFEKBD_TYPE_INDICATOR,
+		      G_SIGNAL_RUN_LAST,
+		      G_STRUCT_OFFSET (CafekbdIndicatorClass, reinit_ui),
+		      NULL, NULL, cafekbd_indicator_VOID__VOID,
+		      G_TYPE_NONE, 0);
+}
+
+static void
+cafekbd_indicator_global_init (void)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+
+	globals.engine = xkl_engine_get_instance(CDK_DISPLAY_XDISPLAY(cdk_display_get_default()));
+
+	if (globals.engine == NULL)
+	{
+		xkl_debug (0, "Libxklavier initialization error");
+		return;
+	}
+
+	g_signal_connect (globals.engine, "X-state-changed",
+			  G_CALLBACK (cafekbd_indicator_state_callback),
+			  NULL);
+	g_signal_connect (globals.engine, "X-config-changed",
+			  G_CALLBACK (cafekbd_indicator_kbd_cfg_callback),
+			  NULL);
+
+	cafekbd_desktop_config_init (&globals.cfg, globals.engine);
+	cafekbd_keyboard_config_init (&globals.kbd_cfg, globals.engine);
+	cafekbd_indicator_config_init (&globals.ind_cfg, globals.engine);
+
+	cafekbd_desktop_config_start_listen (&globals.cfg,
+					  (GCallback)
+					  cafekbd_indicator_cfg_changed,
+					  NULL);
+	cafekbd_indicator_config_start_listen (&globals.ind_cfg,
+					    (GCallback)
+					    cafekbd_indicator_ind_cfg_changed,
+					    NULL);
+
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+
+	globals.registry =
+	    xkl_config_registry_get_instance (globals.engine);
+	xkl_config_registry_load (globals.registry,
+				  globals.cfg.load_extra_items);
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+	cafekbd_indicator_update_images ();
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	cafekbd_indicator_load_group_names ((const gchar **) xklrec->layouts,
+					 (const gchar **)
+					 xklrec->variants);
+	g_object_unref (G_OBJECT (xklrec));
+
+	cafekbd_indicator_start_listen ();
+
+	xkl_debug (100, "*** Inited globals *** \n");
+}
+
+CtkWidget *
+cafekbd_indicator_new (void)
+{
+	return
+	    CTK_WIDGET (g_object_new (cafekbd_indicator_get_type (), NULL));
+}
+
+void
+cafekbd_indicator_set_parent_tooltips (CafekbdIndicator * gki, gboolean spt)
+{
+	gki->priv->set_parent_tooltips = spt;
+	cafekbd_indicator_update_tooltips (gki);
+}
+
+void
+cafekbd_indicator_set_tooltips_format (const gchar format[])
+{
+	globals.tooltips_format = format;
+	ForAllIndicators ()
+	    cafekbd_indicator_update_tooltips (gki);
+	NextIndicator ()
+}
+
+/**
+ * cafekbd_indicator_get_xkl_engine:
+ *
+ * Returns: (transfer none): The engine shared by all CafekbdIndicator objects
+ */
+XklEngine *
+cafekbd_indicator_get_xkl_engine ()
+{
+	return globals.engine;
+}
+
+/**
+ * cafekbd_indicator_get_group_names:
+ *
+ * Returns: (transfer none) (array zero-terminated=1): List of group names
+ */
+gchar **
+cafekbd_indicator_get_group_names ()
+{
+	return globals.full_group_names;
+}
+
+gchar *
+cafekbd_indicator_get_image_filename (guint group)
+{
+	if (!globals.ind_cfg.show_flags)
+		return NULL;
+	return cafekbd_indicator_config_get_images_file (&globals.ind_cfg,
+						      &globals.kbd_cfg,
+						      group);
+}
+
+gdouble
+cafekbd_indicator_get_max_width_height_ratio (void)
+{
+	gdouble rv = 0.0;
+	GSList *ip = globals.images;
+	if (!globals.ind_cfg.show_flags)
+		return 0;
+	while (ip != NULL) {
+		GdkPixbuf *img = GDK_PIXBUF (ip->data);
+		gdouble r =
+		    1.0 * gdk_pixbuf_get_width (img) /
+		    gdk_pixbuf_get_height (img);
+		if (r > rv)
+			rv = r;
+		ip = ip->next;
+	}
+	return rv;
+}
+
+void
+cafekbd_indicator_set_angle (CafekbdIndicator * gki, gdouble angle)
+{
+	gki->priv->angle = angle;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/3.html b/2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/3.html new file mode 100644 index 0000000..2dbd2a6 --- /dev/null +++ b/2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/3.html @@ -0,0 +1,1832 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <X11/keysym.h>
+
+#include <glib/gi18n-lib.h>
+
+#include <cafekbd-keyboard-config.h>
+#include <cafekbd-config-private.h>
+#include <cafekbd-util.h>
+
+/*
+ * CafekbdKeyboardConfig
+ */
+#define CAFEKBD_KEYBOARD_CONFIG_SCHEMA CAFEKBD_CONFIG_SCHEMA ".kbd"
+
+#define GROUP_SWITCHERS_GROUP "grp"
+#define DEFAULT_GROUP_SWITCH "grp:shift_caps_toggle"
+
+const gchar CAFEKBD_KEYBOARD_CONFIG_KEY_MODEL[] = "model";
+const gchar CAFEKBD_KEYBOARD_CONFIG_KEY_LAYOUTS[] = "layouts";
+const gchar CAFEKBD_KEYBOARD_CONFIG_KEY_OPTIONS[] = "options";
+
+const gchar *CAFEKBD_KEYBOARD_CONFIG_ACTIVE[] = {
+	CAFEKBD_KEYBOARD_CONFIG_KEY_MODEL,
+	CAFEKBD_KEYBOARD_CONFIG_KEY_LAYOUTS,
+	CAFEKBD_KEYBOARD_CONFIG_KEY_OPTIONS
+};
+
+/*
+ * static common functions
+ */
+
+static gboolean
+cafekbd_strv_equal (gchar ** l1, gchar ** l2)
+{
+	if (l1 == l2)
+		return TRUE;
+	if (l1 == NULL)
+		return g_strv_length (l2) == 0;
+	if (l2 == NULL)
+		return g_strv_length (l1) == 0;
+
+	while ((*l1 != NULL) && (*l2 != NULL)) {
+		if (*l1 != *l2) {
+			if (*l1 && *l2) {<--- Condition '*l1' is always true<--- Condition '*l2' is always true
+				if (g_ascii_strcasecmp (*l1, *l2))
+					return FALSE;
+			} else
+				return FALSE;
+		}
+
+		l1++;
+		l2++;
+	}
+	return (*l1 == NULL) && (*l2 == NULL);
+}
+
+gboolean
+cafekbd_keyboard_config_get_lv_descriptions (XklConfigRegistry *
+					  config_registry,
+					  const gchar * layout_name,
+					  const gchar * variant_name,
+					  gchar ** layout_short_descr,
+					  gchar ** layout_descr,
+					  gchar ** variant_short_descr,
+					  gchar ** variant_descr)
+{
+	/* TODO make it not static */
+	static XklConfigItem *litem = NULL;
+	static XklConfigItem *vitem = NULL;
+
+	if (litem == NULL)
+		litem = xkl_config_item_new ();
+	if (vitem == NULL)
+		vitem = xkl_config_item_new ();
+
+	layout_name = g_strdup (layout_name);
+
+	g_snprintf (litem->name, sizeof litem->name, "%s", layout_name);
+	if (xkl_config_registry_find_layout (config_registry, litem)) {
+		*layout_short_descr = litem->short_description;
+		*layout_descr = litem->description;
+	} else
+		*layout_short_descr = *layout_descr = NULL;
+
+	if (variant_name != NULL) {
+		variant_name = g_strdup (variant_name);
+		g_snprintf (vitem->name, sizeof vitem->name, "%s",
+			    variant_name);
+		if (xkl_config_registry_find_variant
+		    (config_registry, layout_name, vitem)) {
+			*variant_short_descr = vitem->short_description;
+			*variant_descr = vitem->description;
+		} else
+			*variant_short_descr = *variant_descr = NULL;
+
+		g_free ((char *) variant_name);
+	} else
+		*variant_descr = NULL;
+
+	g_free ((char *) layout_name);
+	return *layout_descr != NULL;
+}
+
+/*
+ * extern common functions
+ */
+const gchar *
+cafekbd_keyboard_config_merge_items (const gchar * parent,
+				  const gchar * child)
+{
+	static gchar buffer[XKL_MAX_CI_NAME_LENGTH * 2 - 1];
+	*buffer = '\0';
+	if (parent != NULL) {
+		if (strlen (parent) >= XKL_MAX_CI_NAME_LENGTH)
+			return NULL;
+		strcat (buffer, parent);
+	}
+	if (child != NULL && *child != 0) {
+		if (strlen (child) >= XKL_MAX_CI_NAME_LENGTH)
+			return NULL;
+		strcat (buffer, "\t");
+		strcat (buffer, child);
+	}
+	return buffer;
+}
+
+gboolean
+cafekbd_keyboard_config_split_items (const gchar * merged, gchar ** parent,
+				  gchar ** child)
+{
+	static gchar pbuffer[XKL_MAX_CI_NAME_LENGTH];
+	static gchar cbuffer[XKL_MAX_CI_NAME_LENGTH];
+	int plen;
+	const gchar *pos;
+	*parent = *child = NULL;
+
+	if (merged == NULL)
+		return FALSE;
+
+	pos = strchr (merged, '\t');
+	if (pos == NULL) {
+		plen = strlen (merged);
+	} else {
+		plen = pos - merged;
+		if (strlen (pos + 1) >= XKL_MAX_CI_NAME_LENGTH)
+			return FALSE;
+		strcpy (*child = cbuffer, pos + 1);
+	}
+	if (plen >= XKL_MAX_CI_NAME_LENGTH)
+		return FALSE;
+	memcpy (*parent = pbuffer, merged, plen);
+	pbuffer[plen] = '\0';
+	return TRUE;
+}
+
+/*
+ * static CafekbdKeyboardConfig functions
+ */
+static void
+cafekbd_keyboard_config_copy_from_xkl_config (CafekbdKeyboardConfig * kbd_config,
+					   XklConfigRec * pdata)
+{
+	char **p;
+	int i;
+	cafekbd_keyboard_config_model_set (kbd_config, pdata->model);
+	xkl_debug (150, "Loaded Kbd model: [%s]\n", pdata->model);
+
+	/* Layouts */
+	g_strfreev (kbd_config->layouts_variants);
+	kbd_config->layouts_variants = NULL;
+	if (pdata->layouts != NULL) {
+		char **p1;
+
+		p = pdata->layouts;
+		p1 = pdata->variants;
+		kbd_config->layouts_variants =
+		    g_new0 (gchar *, g_strv_length (pdata->layouts) + 1);
+		i = 0;
+		while (*p != NULL) {
+			const gchar *full_layout =
+			    cafekbd_keyboard_config_merge_items (*p, *p1);
+			xkl_debug (150,
+				   "Loaded Kbd layout (with variant): [%s]\n",
+				   full_layout);
+			kbd_config->layouts_variants[i++] =
+			    g_strdup (full_layout);
+			p++;
+			p1++;
+		}
+	}
+
+	/* Options */
+	g_strfreev (kbd_config->options);
+	kbd_config->options = NULL;
+
+	if (pdata->options != NULL) {
+		p = pdata->options;
+		kbd_config->options =
+		    g_new0 (gchar *, g_strv_length (pdata->options) + 1);
+		i = 0;
+		while (*p != NULL) {
+			char *option = *p;
+			char *delim =<--- Variable 'delim' can be declared as pointer to const
+			    (option != NULL) ? strchr (option, ':') : NULL;<--- Condition 'option!=NULL' is always true
+			int len;
+			if ((delim != NULL) &&
+			    ((len =
+			      (delim - option)) <
+			     XKL_MAX_CI_NAME_LENGTH)) {
+				char group[XKL_MAX_CI_NAME_LENGTH];
+
+				strncpy (group, option, len);
+				group[len] = 0;
+				xkl_debug (150,
+					   "Loaded Kbd option: [%s][%s]\n",
+					   group, option);
+				cafekbd_keyboard_config_options_set
+				    (kbd_config, i++, group, option);
+			}
+			p++;
+		}
+	}
+}
+
+static void
+cafekbd_keyboard_config_copy_to_xkl_config (CafekbdKeyboardConfig * kbd_config,
+					 XklConfigRec * pdata)
+{
+	int i;
+	int num_layouts, num_options;
+	pdata->model =
+	    (kbd_config->model ==
+	     NULL) ? NULL : g_strdup (kbd_config->model);
+
+	num_layouts =
+	    (kbd_config->layouts_variants ==
+	     NULL) ? 0 : g_strv_length (kbd_config->layouts_variants);
+	num_options =
+	    (kbd_config->options ==
+	     NULL) ? 0 : g_strv_length (kbd_config->options);
+
+	xkl_debug (150, "Taking %d layouts\n", num_layouts);
+	if (num_layouts != 0) {
+		gchar **the_layout_variant = kbd_config->layouts_variants;
+		char **p1 = pdata->layouts =
+		    g_new0 (char *, num_layouts + 1);
+		char **p2 = pdata->variants =
+		    g_new0 (char *, num_layouts + 1);
+		for (i = num_layouts; --i >= 0;) {
+			char *layout, *variant;
+			if (cafekbd_keyboard_config_split_items
+			    (*the_layout_variant, &layout, &variant)
+			    && variant != NULL) {
+				*p1 =
+				    (layout ==
+				     NULL) ? g_strdup ("") :
+				    g_strdup (layout);
+				*p2 =
+				    (variant ==<--- Condition 'variant==NULL' is always false
+				     NULL) ? g_strdup ("") :
+				    g_strdup (variant);
+			} else {
+				*p1 =
+				    (*the_layout_variant ==
+				     NULL) ? g_strdup ("") :
+				    g_strdup (*the_layout_variant);
+				*p2 = g_strdup ("");
+			}
+			xkl_debug (150, "Adding [%s]/%p and [%s]/%p\n",
+				   *p1 ? *p1 : "(nil)", *p1,
+				   *p2 ? *p2 : "(nil)", *p2);
+			p1++;
+			p2++;
+			the_layout_variant++;
+		}
+	}
+
+	if (num_options != 0) {
+		gchar **the_option = kbd_config->options;
+		char **p = pdata->options =
+		    g_new0 (char *, num_options + 1);
+		for (i = num_options; --i >= 0;) {
+			char *group, *option;
+			if (cafekbd_keyboard_config_split_items
+			    (*the_option, &group, &option)
+			    && option != NULL)
+				*(p++) = g_strdup (option);
+			else {
+				*(p++) = g_strdup ("");
+				xkl_debug (150, "Could not split [%s]\n",
+					   *the_option);
+			}
+			the_option++;
+		}
+	}
+}
+
+static void
+cafekbd_keyboard_config_load_params (CafekbdKeyboardConfig * kbd_config,
+				  const gchar * param_names[])
+{
+	gchar *pc;
+
+	pc = g_settings_get_string (kbd_config->settings, param_names[0]);
+	if (pc == NULL) {
+		cafekbd_keyboard_config_model_set (kbd_config, NULL);
+	} else {
+		cafekbd_keyboard_config_model_set (kbd_config, pc);
+		g_free (pc);
+	}
+	xkl_debug (150, "Loaded Kbd model: [%s]\n",
+		   kbd_config->model ? kbd_config->model : "(null)");
+
+	g_strfreev (kbd_config->layouts_variants);
+
+	kbd_config->layouts_variants =
+	    g_settings_get_strv (kbd_config->settings, param_names[1]);
+
+	if (kbd_config->layouts_variants != NULL
+	    && kbd_config->layouts_variants[0] == NULL) {
+		g_strfreev (kbd_config->layouts_variants);
+		kbd_config->layouts_variants = NULL;
+	}
+
+	g_strfreev (kbd_config->options);
+
+	kbd_config->options =
+	    g_settings_get_strv (kbd_config->settings, param_names[2]);
+
+	if (kbd_config->options != NULL && kbd_config->options[0] == NULL) {
+		g_strfreev (kbd_config->options);
+		kbd_config->options = NULL;
+	}
+}
+
+static void
+cafekbd_keyboard_config_save_params (CafekbdKeyboardConfig * kbd_config,
+				  const gchar * param_names[])
+{
+	gchar **pl;
+
+	if (kbd_config->model)
+		g_settings_set_string (kbd_config->settings, param_names[0],
+				       kbd_config->model);
+	else
+		g_settings_set_string (kbd_config->settings, param_names[0],
+				       NULL);
+	xkl_debug (150, "Saved Kbd model: [%s]\n",
+		   kbd_config->model ? kbd_config->model : "(null)");
+
+	if (kbd_config->layouts_variants) {
+		pl = kbd_config->layouts_variants;
+		while (*pl != NULL) {
+			xkl_debug (150, "Saved Kbd layout: [%s]\n", *pl);
+			pl++;
+		}
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[1],
+				     (const gchar * const *)
+				     kbd_config->layouts_variants);
+	} else {
+		xkl_debug (150, "Saved Kbd layouts: []\n");
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[1], NULL);
+	}
+
+	if (kbd_config->options) {
+		pl = kbd_config->options;
+		while (*pl != NULL) {
+			xkl_debug (150, "Saved Kbd option: [%s]\n", *pl);
+			pl++;
+		}
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[2],
+				     (const gchar *
+				      const *) kbd_config->options);
+	} else {
+		xkl_debug (150, "Saved Kbd options: []\n");
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[2], NULL);
+	}
+}
+
+/*
+ * extern CafekbdKeyboardConfig config functions
+ */
+void
+cafekbd_keyboard_config_init (CafekbdKeyboardConfig * kbd_config,
+			      XklEngine * engine)
+{
+	memset (kbd_config, 0, sizeof (*kbd_config));
+	kbd_config->settings = g_settings_new (CAFEKBD_KEYBOARD_CONFIG_SCHEMA);
+	kbd_config->engine = engine;
+}
+
+void
+cafekbd_keyboard_config_term (CafekbdKeyboardConfig * kbd_config)
+{
+	cafekbd_keyboard_config_model_set (kbd_config, NULL);
+
+	g_strfreev (kbd_config->layouts_variants);
+	kbd_config->layouts_variants = NULL;
+	g_strfreev (kbd_config->options);
+	kbd_config->options = NULL;
+
+	g_object_unref (kbd_config->settings);
+	kbd_config->settings = NULL;
+}
+
+void
+cafekbd_keyboard_config_load_from_gsettings (CafekbdKeyboardConfig * kbd_config,
+				      CafekbdKeyboardConfig *
+				      kbd_config_default)
+{
+	cafekbd_keyboard_config_load_params (kbd_config,
+					  CAFEKBD_KEYBOARD_CONFIG_ACTIVE);
+
+	if (kbd_config_default != NULL) {
+
+		if (kbd_config->model == NULL)
+			kbd_config->model =
+			    g_strdup (kbd_config_default->model);
+
+		if (kbd_config->layouts_variants == NULL) {
+			kbd_config->layouts_variants =
+			    g_strdupv
+			    (kbd_config_default->layouts_variants);
+		}
+
+		if (kbd_config->options == NULL) {
+			kbd_config->options =
+			    g_strdupv (kbd_config_default->options);
+		}
+	}
+}
+
+void
+cafekbd_keyboard_config_load_from_x_current (CafekbdKeyboardConfig * kbd_config,
+					  XklConfigRec * data)
+{
+	gboolean own_data = data == NULL;
+	xkl_debug (150, "Copying config from X(current)\n");
+	if (own_data)
+		data = xkl_config_rec_new ();
+	if (xkl_config_rec_get_from_server (data, kbd_config->engine))
+		cafekbd_keyboard_config_copy_from_xkl_config (kbd_config,
+							   data);
+	else
+		xkl_debug (150,
+			   "Could not load keyboard config from server: [%s]\n",
+			   xkl_get_last_error ());
+	if (own_data)
+		g_object_unref (G_OBJECT (data));
+}
+
+void
+cafekbd_keyboard_config_load_from_x_initial (CafekbdKeyboardConfig * kbd_config,
+					  XklConfigRec * data)
+{
+	gboolean own_data = data == NULL;
+	xkl_debug (150, "Copying config from X(initial)\n");
+	if (own_data)
+		data = xkl_config_rec_new ();
+	if (xkl_config_rec_get_from_backup (data, kbd_config->engine))
+		cafekbd_keyboard_config_copy_from_xkl_config (kbd_config,
+							   data);
+	else
+		xkl_debug (150,
+			   "Could not load keyboard config from backup: [%s]\n",
+			   xkl_get_last_error ());
+	if (own_data)
+		g_object_unref (G_OBJECT (data));
+}
+
+static gboolean
+cafekbd_keyboard_config_options_equals (CafekbdKeyboardConfig * kbd_config1,
+				     CafekbdKeyboardConfig * kbd_config2)
+{
+	int num_options, num_options2;
+
+	num_options =
+	    (kbd_config1->options ==
+	     NULL) ? 0 : g_strv_length (kbd_config1->options);
+	num_options2 =
+	    (kbd_config2->options ==
+	     NULL) ? 0 : g_strv_length (kbd_config2->options);
+
+	if (num_options != num_options2)
+		return False;
+
+	if (num_options != 0) {
+		int i;
+		char *group1, *option1;
+
+		for (i = 0; i < num_options; i++) {
+			int j;
+			char *group2, *option2;
+			gboolean are_equal = FALSE;
+
+			if (!cafekbd_keyboard_config_split_items
+			    (kbd_config1->options[i], &group1, &option1))
+				continue;
+
+			option1 = g_strdup (option1);
+
+			for (j = 0; j < num_options && !are_equal; j++) {
+				if (cafekbd_keyboard_config_split_items
+				    (kbd_config2->options[j], &group2,
+				     &option2)) {
+					are_equal =
+					    strcmp (option1, option2) == 0;
+				}
+			}
+
+			g_free (option1);
+
+			if (!are_equal)
+				return False;
+		}
+	}
+
+	return True;
+}
+
+gboolean
+cafekbd_keyboard_config_equals (CafekbdKeyboardConfig * kbd_config1,
+			     CafekbdKeyboardConfig * kbd_config2)
+{
+	if (kbd_config1 == kbd_config2)
+		return True;
+	if ((kbd_config1->model != kbd_config2->model) &&
+	    (kbd_config1->model != NULL) &&
+	    (kbd_config2->model != NULL) &&
+	    g_ascii_strcasecmp (kbd_config1->model, kbd_config2->model))
+		return False;
+	if (!cafekbd_strv_equal (kbd_config1->layouts_variants,
+			   kbd_config2->layouts_variants))
+		return False;
+
+	if (!cafekbd_keyboard_config_options_equals
+	    (kbd_config1, kbd_config2))
+		return False;
+
+	return True;
+}
+
+void
+cafekbd_keyboard_config_save_to_gsettings (CafekbdKeyboardConfig * kbd_config)
+{
+	g_settings_delay (kbd_config->settings);
+
+	cafekbd_keyboard_config_save_params (kbd_config,
+					     CAFEKBD_KEYBOARD_CONFIG_ACTIVE);
+
+	g_settings_apply (kbd_config->settings);
+}
+
+void
+cafekbd_keyboard_config_model_set (CafekbdKeyboardConfig * kbd_config,
+				const gchar * model_name)
+{
+	if (kbd_config->model != NULL)
+		g_free (kbd_config->model);
+	kbd_config->model =
+	    (model_name == NULL
+	     || model_name[0] == '\0') ? NULL : g_strdup (model_name);
+}
+
+void
+cafekbd_keyboard_config_options_set (CafekbdKeyboardConfig * kbd_config,
+				  gint idx,
+				  const gchar * group_name,
+				  const gchar * option_name)
+{
+	const gchar *merged;
+	if (group_name == NULL || option_name == NULL)
+		return;
+	merged =
+	    cafekbd_keyboard_config_merge_items (group_name, option_name);
+	if (merged == NULL)
+		return;
+	kbd_config->options[idx] = g_strdup (merged);
+}
+
+gboolean
+cafekbd_keyboard_config_options_is_set (CafekbdKeyboardConfig * kbd_config,<--- Parameter 'kbd_config' can be declared as pointer to const
+				     const gchar * group_name,
+				     const gchar * option_name)
+{
+	gchar **p = kbd_config->options;
+	const gchar *merged =
+	    cafekbd_keyboard_config_merge_items (group_name, option_name);
+	if (merged == NULL)
+		return FALSE;
+
+	while (p && *p) {
+		if (!g_ascii_strcasecmp (merged, *p++))
+			return TRUE;
+	}
+	return FALSE;
+}
+
+gboolean
+cafekbd_keyboard_config_activate (CafekbdKeyboardConfig * kbd_config)
+{
+	gboolean rv;
+	XklConfigRec *data = xkl_config_rec_new ();
+
+	cafekbd_keyboard_config_copy_to_xkl_config (kbd_config, data);
+	rv = xkl_config_rec_activate (data, kbd_config->engine);
+	g_object_unref (G_OBJECT (data));
+
+	return rv;
+}
+
+/**
+ * cafekbd_keyboard_config_start_listen:
+ * @func: (scope notified): a function to call when settings are changed
+ */
+void
+cafekbd_keyboard_config_start_listen (CafekbdKeyboardConfig * kbd_config,
+				   GCallback func,
+				   gpointer user_data)
+{
+	kbd_config->config_listener_id =
+	    g_signal_connect (kbd_config->settings, "changed", func,
+			      user_data);
+}
+
+void
+cafekbd_keyboard_config_stop_listen (CafekbdKeyboardConfig * kbd_config)
+{
+	g_signal_handler_disconnect (kbd_config->settings,
+				     kbd_config->config_listener_id);
+	kbd_config->config_listener_id = 0;
+}
+
+gboolean
+cafekbd_keyboard_config_get_descriptions (XklConfigRegistry * config_registry,
+				       const gchar * name,
+				       gchar ** layout_short_descr,
+				       gchar ** layout_descr,
+				       gchar ** variant_short_descr,
+				       gchar ** variant_descr)
+{
+	char *layout_name = NULL, *variant_name = NULL;
+	if (!cafekbd_keyboard_config_split_items
+	    (name, &layout_name, &variant_name))
+		return FALSE;
+	return cafekbd_keyboard_config_get_lv_descriptions (config_registry,
+							 layout_name,
+							 variant_name,
+							 layout_short_descr,
+							 layout_descr,
+							 variant_short_descr,
+							 variant_descr);
+}
+
+const gchar *
+cafekbd_keyboard_config_format_full_layout (const gchar * layout_descr,
+					 const gchar * variant_descr)
+{
+	static gchar full_descr[XKL_MAX_CI_DESC_LENGTH * 2];
+	if (variant_descr == NULL || variant_descr[0] == 0)
+		g_snprintf (full_descr, sizeof (full_descr), "%s",
+			    layout_descr);
+	else
+		g_snprintf (full_descr, sizeof (full_descr), "%s %s",
+			    layout_descr, variant_descr);
+	return full_descr;
+}
+
+gchar *
+cafekbd_keyboard_config_to_string (const CafekbdKeyboardConfig * config)
+{
+	gchar *layouts = NULL, *options = NULL;
+	GString *buffer = g_string_new (NULL);
+
+	gchar **iter;
+	gint count;
+	gchar *result;
+
+	if (config->layouts_variants) {
+		/* g_slist_length is "expensive", so we determinate the length on the fly */
+		for (iter = config->layouts_variants, count = 0; *iter;
+		     iter++, ++count) {
+			if (buffer->len)
+				g_string_append (buffer, " ");
+
+			g_string_append (buffer, *iter);
+		}
+
+		/* Translators: The count is related to the number of options. The %s
+		 * format specifier should not be modified, left "as is". */
+		layouts =
+		    g_strdup_printf (ngettext
+				     ("layout \"%s\"", "layouts \"%s\"",
+				      count), buffer->str);
+		g_string_truncate (buffer, 0);
+	}
+	if (config->options) {
+		/* g_slist_length is "expensive", so we determinate the length on the fly */
+		for (iter = config->options, count = 0; *iter;
+		     iter++, ++count) {
+			if (buffer->len)
+				g_string_append (buffer, " ");
+
+			g_string_append (buffer, *iter);
+		}
+
+		/* Translators: The count is related to the number of options. The %s
+		 * format specifier should not be modified, left "as is". */
+		options =
+		    g_strdup_printf (ngettext
+				     ("option \"%s\"", "options \"%s\"",
+				      count), buffer->str);
+		g_string_truncate (buffer, 0);
+	}
+
+	g_string_free (buffer, TRUE);
+
+	result =
+	    g_strdup_printf (_("model \"%s\", %s and %s"), config->model,
+			     layouts ? layouts : _("no layout"),
+			     options ? options : _("no options"));
+
+	g_free (options);
+	g_free (layouts);
+
+	return result;
+}
+
+/**
+ * cafekbd_keyboard_config_add_default_switch_option_if_necessary:
+ *
+ * Returns: (transfer full) (array zero-terminated=1): List of options
+ */
+gchar **
+cafekbd_keyboard_config_add_default_switch_option_if_necessary (gchar **
+							        layouts_list,
+							        gchar **
+							        options_list,
+							        gboolean *was_appended)
+{
+	*was_appended = FALSE;
+	if (g_strv_length (layouts_list) >= 2) {
+		gboolean any_switcher = False;
+		if (*options_list != NULL) {
+			gchar **option = options_list;
+			while (*option != NULL) {
+				char *g, *o;
+				if (cafekbd_keyboard_config_split_items
+				    (*option, &g, &o)) {
+					if (!g_ascii_strcasecmp
+					    (g, GROUP_SWITCHERS_GROUP)) {
+						any_switcher = True;
+						break;
+					}
+				}
+				option++;
+			}
+		}
+		if (!any_switcher) {
+			const gchar *id =
+			    cafekbd_keyboard_config_merge_items
+			    (GROUP_SWITCHERS_GROUP,
+			     DEFAULT_GROUP_SWITCH);
+			options_list =
+			    cafekbd_strv_append (options_list, g_strdup (id));
+			*was_appended = TRUE;
+		}
+	}
+	return options_list;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/4.html b/2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/4.html new file mode 100644 index 0000000..1d97c26 --- /dev/null +++ b/2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/4.html @@ -0,0 +1,6042 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
   1
+   2
+   3
+   4
+   5
+   6
+   7
+   8
+   9
+  10
+  11
+  12
+  13
+  14
+  15
+  16
+  17
+  18
+  19
+  20
+  21
+  22
+  23
+  24
+  25
+  26
+  27
+  28
+  29
+  30
+  31
+  32
+  33
+  34
+  35
+  36
+  37
+  38
+  39
+  40
+  41
+  42
+  43
+  44
+  45
+  46
+  47
+  48
+  49
+  50
+  51
+  52
+  53
+  54
+  55
+  56
+  57
+  58
+  59
+  60
+  61
+  62
+  63
+  64
+  65
+  66
+  67
+  68
+  69
+  70
+  71
+  72
+  73
+  74
+  75
+  76
+  77
+  78
+  79
+  80
+  81
+  82
+  83
+  84
+  85
+  86
+  87
+  88
+  89
+  90
+  91
+  92
+  93
+  94
+  95
+  96
+  97
+  98
+  99
+ 100
+ 101
+ 102
+ 103
+ 104
+ 105
+ 106
+ 107
+ 108
+ 109
+ 110
+ 111
+ 112
+ 113
+ 114
+ 115
+ 116
+ 117
+ 118
+ 119
+ 120
+ 121
+ 122
+ 123
+ 124
+ 125
+ 126
+ 127
+ 128
+ 129
+ 130
+ 131
+ 132
+ 133
+ 134
+ 135
+ 136
+ 137
+ 138
+ 139
+ 140
+ 141
+ 142
+ 143
+ 144
+ 145
+ 146
+ 147
+ 148
+ 149
+ 150
+ 151
+ 152
+ 153
+ 154
+ 155
+ 156
+ 157
+ 158
+ 159
+ 160
+ 161
+ 162
+ 163
+ 164
+ 165
+ 166
+ 167
+ 168
+ 169
+ 170
+ 171
+ 172
+ 173
+ 174
+ 175
+ 176
+ 177
+ 178
+ 179
+ 180
+ 181
+ 182
+ 183
+ 184
+ 185
+ 186
+ 187
+ 188
+ 189
+ 190
+ 191
+ 192
+ 193
+ 194
+ 195
+ 196
+ 197
+ 198
+ 199
+ 200
+ 201
+ 202
+ 203
+ 204
+ 205
+ 206
+ 207
+ 208
+ 209
+ 210
+ 211
+ 212
+ 213
+ 214
+ 215
+ 216
+ 217
+ 218
+ 219
+ 220
+ 221
+ 222
+ 223
+ 224
+ 225
+ 226
+ 227
+ 228
+ 229
+ 230
+ 231
+ 232
+ 233
+ 234
+ 235
+ 236
+ 237
+ 238
+ 239
+ 240
+ 241
+ 242
+ 243
+ 244
+ 245
+ 246
+ 247
+ 248
+ 249
+ 250
+ 251
+ 252
+ 253
+ 254
+ 255
+ 256
+ 257
+ 258
+ 259
+ 260
+ 261
+ 262
+ 263
+ 264
+ 265
+ 266
+ 267
+ 268
+ 269
+ 270
+ 271
+ 272
+ 273
+ 274
+ 275
+ 276
+ 277
+ 278
+ 279
+ 280
+ 281
+ 282
+ 283
+ 284
+ 285
+ 286
+ 287
+ 288
+ 289
+ 290
+ 291
+ 292
+ 293
+ 294
+ 295
+ 296
+ 297
+ 298
+ 299
+ 300
+ 301
+ 302
+ 303
+ 304
+ 305
+ 306
+ 307
+ 308
+ 309
+ 310
+ 311
+ 312
+ 313
+ 314
+ 315
+ 316
+ 317
+ 318
+ 319
+ 320
+ 321
+ 322
+ 323
+ 324
+ 325
+ 326
+ 327
+ 328
+ 329
+ 330
+ 331
+ 332
+ 333
+ 334
+ 335
+ 336
+ 337
+ 338
+ 339
+ 340
+ 341
+ 342
+ 343
+ 344
+ 345
+ 346
+ 347
+ 348
+ 349
+ 350
+ 351
+ 352
+ 353
+ 354
+ 355
+ 356
+ 357
+ 358
+ 359
+ 360
+ 361
+ 362
+ 363
+ 364
+ 365
+ 366
+ 367
+ 368
+ 369
+ 370
+ 371
+ 372
+ 373
+ 374
+ 375
+ 376
+ 377
+ 378
+ 379
+ 380
+ 381
+ 382
+ 383
+ 384
+ 385
+ 386
+ 387
+ 388
+ 389
+ 390
+ 391
+ 392
+ 393
+ 394
+ 395
+ 396
+ 397
+ 398
+ 399
+ 400
+ 401
+ 402
+ 403
+ 404
+ 405
+ 406
+ 407
+ 408
+ 409
+ 410
+ 411
+ 412
+ 413
+ 414
+ 415
+ 416
+ 417
+ 418
+ 419
+ 420
+ 421
+ 422
+ 423
+ 424
+ 425
+ 426
+ 427
+ 428
+ 429
+ 430
+ 431
+ 432
+ 433
+ 434
+ 435
+ 436
+ 437
+ 438
+ 439
+ 440
+ 441
+ 442
+ 443
+ 444
+ 445
+ 446
+ 447
+ 448
+ 449
+ 450
+ 451
+ 452
+ 453
+ 454
+ 455
+ 456
+ 457
+ 458
+ 459
+ 460
+ 461
+ 462
+ 463
+ 464
+ 465
+ 466
+ 467
+ 468
+ 469
+ 470
+ 471
+ 472
+ 473
+ 474
+ 475
+ 476
+ 477
+ 478
+ 479
+ 480
+ 481
+ 482
+ 483
+ 484
+ 485
+ 486
+ 487
+ 488
+ 489
+ 490
+ 491
+ 492
+ 493
+ 494
+ 495
+ 496
+ 497
+ 498
+ 499
+ 500
+ 501
+ 502
+ 503
+ 504
+ 505
+ 506
+ 507
+ 508
+ 509
+ 510
+ 511
+ 512
+ 513
+ 514
+ 515
+ 516
+ 517
+ 518
+ 519
+ 520
+ 521
+ 522
+ 523
+ 524
+ 525
+ 526
+ 527
+ 528
+ 529
+ 530
+ 531
+ 532
+ 533
+ 534
+ 535
+ 536
+ 537
+ 538
+ 539
+ 540
+ 541
+ 542
+ 543
+ 544
+ 545
+ 546
+ 547
+ 548
+ 549
+ 550
+ 551
+ 552
+ 553
+ 554
+ 555
+ 556
+ 557
+ 558
+ 559
+ 560
+ 561
+ 562
+ 563
+ 564
+ 565
+ 566
+ 567
+ 568
+ 569
+ 570
+ 571
+ 572
+ 573
+ 574
+ 575
+ 576
+ 577
+ 578
+ 579
+ 580
+ 581
+ 582
+ 583
+ 584
+ 585
+ 586
+ 587
+ 588
+ 589
+ 590
+ 591
+ 592
+ 593
+ 594
+ 595
+ 596
+ 597
+ 598
+ 599
+ 600
+ 601
+ 602
+ 603
+ 604
+ 605
+ 606
+ 607
+ 608
+ 609
+ 610
+ 611
+ 612
+ 613
+ 614
+ 615
+ 616
+ 617
+ 618
+ 619
+ 620
+ 621
+ 622
+ 623
+ 624
+ 625
+ 626
+ 627
+ 628
+ 629
+ 630
+ 631
+ 632
+ 633
+ 634
+ 635
+ 636
+ 637
+ 638
+ 639
+ 640
+ 641
+ 642
+ 643
+ 644
+ 645
+ 646
+ 647
+ 648
+ 649
+ 650
+ 651
+ 652
+ 653
+ 654
+ 655
+ 656
+ 657
+ 658
+ 659
+ 660
+ 661
+ 662
+ 663
+ 664
+ 665
+ 666
+ 667
+ 668
+ 669
+ 670
+ 671
+ 672
+ 673
+ 674
+ 675
+ 676
+ 677
+ 678
+ 679
+ 680
+ 681
+ 682
+ 683
+ 684
+ 685
+ 686
+ 687
+ 688
+ 689
+ 690
+ 691
+ 692
+ 693
+ 694
+ 695
+ 696
+ 697
+ 698
+ 699
+ 700
+ 701
+ 702
+ 703
+ 704
+ 705
+ 706
+ 707
+ 708
+ 709
+ 710
+ 711
+ 712
+ 713
+ 714
+ 715
+ 716
+ 717
+ 718
+ 719
+ 720
+ 721
+ 722
+ 723
+ 724
+ 725
+ 726
+ 727
+ 728
+ 729
+ 730
+ 731
+ 732
+ 733
+ 734
+ 735
+ 736
+ 737
+ 738
+ 739
+ 740
+ 741
+ 742
+ 743
+ 744
+ 745
+ 746
+ 747
+ 748
+ 749
+ 750
+ 751
+ 752
+ 753
+ 754
+ 755
+ 756
+ 757
+ 758
+ 759
+ 760
+ 761
+ 762
+ 763
+ 764
+ 765
+ 766
+ 767
+ 768
+ 769
+ 770
+ 771
+ 772
+ 773
+ 774
+ 775
+ 776
+ 777
+ 778
+ 779
+ 780
+ 781
+ 782
+ 783
+ 784
+ 785
+ 786
+ 787
+ 788
+ 789
+ 790
+ 791
+ 792
+ 793
+ 794
+ 795
+ 796
+ 797
+ 798
+ 799
+ 800
+ 801
+ 802
+ 803
+ 804
+ 805
+ 806
+ 807
+ 808
+ 809
+ 810
+ 811
+ 812
+ 813
+ 814
+ 815
+ 816
+ 817
+ 818
+ 819
+ 820
+ 821
+ 822
+ 823
+ 824
+ 825
+ 826
+ 827
+ 828
+ 829
+ 830
+ 831
+ 832
+ 833
+ 834
+ 835
+ 836
+ 837
+ 838
+ 839
+ 840
+ 841
+ 842
+ 843
+ 844
+ 845
+ 846
+ 847
+ 848
+ 849
+ 850
+ 851
+ 852
+ 853
+ 854
+ 855
+ 856
+ 857
+ 858
+ 859
+ 860
+ 861
+ 862
+ 863
+ 864
+ 865
+ 866
+ 867
+ 868
+ 869
+ 870
+ 871
+ 872
+ 873
+ 874
+ 875
+ 876
+ 877
+ 878
+ 879
+ 880
+ 881
+ 882
+ 883
+ 884
+ 885
+ 886
+ 887
+ 888
+ 889
+ 890
+ 891
+ 892
+ 893
+ 894
+ 895
+ 896
+ 897
+ 898
+ 899
+ 900
+ 901
+ 902
+ 903
+ 904
+ 905
+ 906
+ 907
+ 908
+ 909
+ 910
+ 911
+ 912
+ 913
+ 914
+ 915
+ 916
+ 917
+ 918
+ 919
+ 920
+ 921
+ 922
+ 923
+ 924
+ 925
+ 926
+ 927
+ 928
+ 929
+ 930
+ 931
+ 932
+ 933
+ 934
+ 935
+ 936
+ 937
+ 938
+ 939
+ 940
+ 941
+ 942
+ 943
+ 944
+ 945
+ 946
+ 947
+ 948
+ 949
+ 950
+ 951
+ 952
+ 953
+ 954
+ 955
+ 956
+ 957
+ 958
+ 959
+ 960
+ 961
+ 962
+ 963
+ 964
+ 965
+ 966
+ 967
+ 968
+ 969
+ 970
+ 971
+ 972
+ 973
+ 974
+ 975
+ 976
+ 977
+ 978
+ 979
+ 980
+ 981
+ 982
+ 983
+ 984
+ 985
+ 986
+ 987
+ 988
+ 989
+ 990
+ 991
+ 992
+ 993
+ 994
+ 995
+ 996
+ 997
+ 998
+ 999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+1011
+1012
+1013
+1014
+1015
+1016
+1017
+1018
+1019
+1020
+1021
+1022
+1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
+1033
+1034
+1035
+1036
+1037
+1038
+1039
+1040
+1041
+1042
+1043
+1044
+1045
+1046
+1047
+1048
+1049
+1050
+1051
+1052
+1053
+1054
+1055
+1056
+1057
+1058
+1059
+1060
+1061
+1062
+1063
+1064
+1065
+1066
+1067
+1068
+1069
+1070
+1071
+1072
+1073
+1074
+1075
+1076
+1077
+1078
+1079
+1080
+1081
+1082
+1083
+1084
+1085
+1086
+1087
+1088
+1089
+1090
+1091
+1092
+1093
+1094
+1095
+1096
+1097
+1098
+1099
+1100
+1101
+1102
+1103
+1104
+1105
+1106
+1107
+1108
+1109
+1110
+1111
+1112
+1113
+1114
+1115
+1116
+1117
+1118
+1119
+1120
+1121
+1122
+1123
+1124
+1125
+1126
+1127
+1128
+1129
+1130
+1131
+1132
+1133
+1134
+1135
+1136
+1137
+1138
+1139
+1140
+1141
+1142
+1143
+1144
+1145
+1146
+1147
+1148
+1149
+1150
+1151
+1152
+1153
+1154
+1155
+1156
+1157
+1158
+1159
+1160
+1161
+1162
+1163
+1164
+1165
+1166
+1167
+1168
+1169
+1170
+1171
+1172
+1173
+1174
+1175
+1176
+1177
+1178
+1179
+1180
+1181
+1182
+1183
+1184
+1185
+1186
+1187
+1188
+1189
+1190
+1191
+1192
+1193
+1194
+1195
+1196
+1197
+1198
+1199
+1200
+1201
+1202
+1203
+1204
+1205
+1206
+1207
+1208
+1209
+1210
+1211
+1212
+1213
+1214
+1215
+1216
+1217
+1218
+1219
+1220
+1221
+1222
+1223
+1224
+1225
+1226
+1227
+1228
+1229
+1230
+1231
+1232
+1233
+1234
+1235
+1236
+1237
+1238
+1239
+1240
+1241
+1242
+1243
+1244
+1245
+1246
+1247
+1248
+1249
+1250
+1251
+1252
+1253
+1254
+1255
+1256
+1257
+1258
+1259
+1260
+1261
+1262
+1263
+1264
+1265
+1266
+1267
+1268
+1269
+1270
+1271
+1272
+1273
+1274
+1275
+1276
+1277
+1278
+1279
+1280
+1281
+1282
+1283
+1284
+1285
+1286
+1287
+1288
+1289
+1290
+1291
+1292
+1293
+1294
+1295
+1296
+1297
+1298
+1299
+1300
+1301
+1302
+1303
+1304
+1305
+1306
+1307
+1308
+1309
+1310
+1311
+1312
+1313
+1314
+1315
+1316
+1317
+1318
+1319
+1320
+1321
+1322
+1323
+1324
+1325
+1326
+1327
+1328
+1329
+1330
+1331
+1332
+1333
+1334
+1335
+1336
+1337
+1338
+1339
+1340
+1341
+1342
+1343
+1344
+1345
+1346
+1347
+1348
+1349
+1350
+1351
+1352
+1353
+1354
+1355
+1356
+1357
+1358
+1359
+1360
+1361
+1362
+1363
+1364
+1365
+1366
+1367
+1368
+1369
+1370
+1371
+1372
+1373
+1374
+1375
+1376
+1377
+1378
+1379
+1380
+1381
+1382
+1383
+1384
+1385
+1386
+1387
+1388
+1389
+1390
+1391
+1392
+1393
+1394
+1395
+1396
+1397
+1398
+1399
+1400
+1401
+1402
+1403
+1404
+1405
+1406
+1407
+1408
+1409
+1410
+1411
+1412
+1413
+1414
+1415
+1416
+1417
+1418
+1419
+1420
+1421
+1422
+1423
+1424
+1425
+1426
+1427
+1428
+1429
+1430
+1431
+1432
+1433
+1434
+1435
+1436
+1437
+1438
+1439
+1440
+1441
+1442
+1443
+1444
+1445
+1446
+1447
+1448
+1449
+1450
+1451
+1452
+1453
+1454
+1455
+1456
+1457
+1458
+1459
+1460
+1461
+1462
+1463
+1464
+1465
+1466
+1467
+1468
+1469
+1470
+1471
+1472
+1473
+1474
+1475
+1476
+1477
+1478
+1479
+1480
+1481
+1482
+1483
+1484
+1485
+1486
+1487
+1488
+1489
+1490
+1491
+1492
+1493
+1494
+1495
+1496
+1497
+1498
+1499
+1500
+1501
+1502
+1503
+1504
+1505
+1506
+1507
+1508
+1509
+1510
+1511
+1512
+1513
+1514
+1515
+1516
+1517
+1518
+1519
+1520
+1521
+1522
+1523
+1524
+1525
+1526
+1527
+1528
+1529
+1530
+1531
+1532
+1533
+1534
+1535
+1536
+1537
+1538
+1539
+1540
+1541
+1542
+1543
+1544
+1545
+1546
+1547
+1548
+1549
+1550
+1551
+1552
+1553
+1554
+1555
+1556
+1557
+1558
+1559
+1560
+1561
+1562
+1563
+1564
+1565
+1566
+1567
+1568
+1569
+1570
+1571
+1572
+1573
+1574
+1575
+1576
+1577
+1578
+1579
+1580
+1581
+1582
+1583
+1584
+1585
+1586
+1587
+1588
+1589
+1590
+1591
+1592
+1593
+1594
+1595
+1596
+1597
+1598
+1599
+1600
+1601
+1602
+1603
+1604
+1605
+1606
+1607
+1608
+1609
+1610
+1611
+1612
+1613
+1614
+1615
+1616
+1617
+1618
+1619
+1620
+1621
+1622
+1623
+1624
+1625
+1626
+1627
+1628
+1629
+1630
+1631
+1632
+1633
+1634
+1635
+1636
+1637
+1638
+1639
+1640
+1641
+1642
+1643
+1644
+1645
+1646
+1647
+1648
+1649
+1650
+1651
+1652
+1653
+1654
+1655
+1656
+1657
+1658
+1659
+1660
+1661
+1662
+1663
+1664
+1665
+1666
+1667
+1668
+1669
+1670
+1671
+1672
+1673
+1674
+1675
+1676
+1677
+1678
+1679
+1680
+1681
+1682
+1683
+1684
+1685
+1686
+1687
+1688
+1689
+1690
+1691
+1692
+1693
+1694
+1695
+1696
+1697
+1698
+1699
+1700
+1701
+1702
+1703
+1704
+1705
+1706
+1707
+1708
+1709
+1710
+1711
+1712
+1713
+1714
+1715
+1716
+1717
+1718
+1719
+1720
+1721
+1722
+1723
+1724
+1725
+1726
+1727
+1728
+1729
+1730
+1731
+1732
+1733
+1734
+1735
+1736
+1737
+1738
+1739
+1740
+1741
+1742
+1743
+1744
+1745
+1746
+1747
+1748
+1749
+1750
+1751
+1752
+1753
+1754
+1755
+1756
+1757
+1758
+1759
+1760
+1761
+1762
+1763
+1764
+1765
+1766
+1767
+1768
+1769
+1770
+1771
+1772
+1773
+1774
+1775
+1776
+1777
+1778
+1779
+1780
+1781
+1782
+1783
+1784
+1785
+1786
+1787
+1788
+1789
+1790
+1791
+1792
+1793
+1794
+1795
+1796
+1797
+1798
+1799
+1800
+1801
+1802
+1803
+1804
+1805
+1806
+1807
+1808
+1809
+1810
+1811
+1812
+1813
+1814
+1815
+1816
+1817
+1818
+1819
+1820
+1821
+1822
+1823
+1824
+1825
+1826
+1827
+1828
+1829
+1830
+1831
+1832
+1833
+1834
+1835
+1836
+1837
+1838
+1839
+1840
+1841
+1842
+1843
+1844
+1845
+1846
+1847
+1848
+1849
+1850
+1851
+1852
+1853
+1854
+1855
+1856
+1857
+1858
+1859
+1860
+1861
+1862
+1863
+1864
+1865
+1866
+1867
+1868
+1869
+1870
+1871
+1872
+1873
+1874
+1875
+1876
+1877
+1878
+1879
+1880
+1881
+1882
+1883
+1884
+1885
+1886
+1887
+1888
+1889
+1890
+1891
+1892
+1893
+1894
+1895
+1896
+1897
+1898
+1899
+1900
+1901
+1902
+1903
+1904
+1905
+1906
+1907
+1908
+1909
+1910
+1911
+1912
+1913
+1914
+1915
+1916
+1917
+1918
+1919
+1920
+1921
+1922
+1923
+1924
+1925
+1926
+1927
+1928
+1929
+1930
+1931
+1932
+1933
+1934
+1935
+1936
+1937
+1938
+1939
+1940
+1941
+1942
+1943
+1944
+1945
+1946
+1947
+1948
+1949
+1950
+1951
+1952
+1953
+1954
+1955
+1956
+1957
+1958
+1959
+1960
+1961
+1962
+1963
+1964
+1965
+1966
+1967
+1968
+1969
+1970
+1971
+1972
+1973
+1974
+1975
+1976
+1977
+1978
+1979
+1980
+1981
+1982
+1983
+1984
+1985
+1986
+1987
+1988
+1989
+1990
+1991
+1992
+1993
+1994
+1995
+1996
+1997
+1998
+1999
+2000
+2001
+2002
+2003
+2004
+2005
+2006
+2007
+2008
+2009
+2010
+2011
+2012
+2013
+2014
+2015
+2016
+2017
+2018
+2019
+2020
+2021
+2022
+2023
+2024
+2025
+2026
+2027
+2028
+2029
+2030
+2031
+2032
+2033
+2034
+2035
+2036
+2037
+2038
+2039
+2040
+2041
+2042
+2043
+2044
+2045
+2046
+2047
+2048
+2049
+2050
+2051
+2052
+2053
+2054
+2055
+2056
+2057
+2058
+2059
+2060
+2061
+2062
+2063
+2064
+2065
+2066
+2067
+2068
+2069
+2070
+2071
+2072
+2073
+2074
+2075
+2076
+2077
+2078
+2079
+2080
+2081
+2082
+2083
+2084
+2085
+2086
+2087
+2088
+2089
+2090
+2091
+2092
+2093
+2094
+2095
+2096
+2097
+2098
+2099
+2100
+2101
+2102
+2103
+2104
+2105
+2106
+2107
+2108
+2109
+2110
+2111
+2112
+2113
+2114
+2115
+2116
+2117
+2118
+2119
+2120
+2121
+2122
+2123
+2124
+2125
+2126
+2127
+2128
+2129
+2130
+2131
+2132
+2133
+2134
+2135
+2136
+2137
+2138
+2139
+2140
+2141
+2142
+2143
+2144
+2145
+2146
+2147
+2148
+2149
+2150
+2151
+2152
+2153
+2154
+2155
+2156
+2157
+2158
+2159
+2160
+2161
+2162
+2163
+2164
+2165
+2166
+2167
+2168
+2169
+2170
+2171
+2172
+2173
+2174
+2175
+2176
+2177
+2178
+2179
+2180
+2181
+2182
+2183
+2184
+2185
+2186
+2187
+2188
+2189
+2190
+2191
+2192
+2193
+2194
+2195
+2196
+2197
+2198
+2199
+2200
+2201
+2202
+2203
+2204
+2205
+2206
+2207
+2208
+2209
+2210
+2211
+2212
+2213
+2214
+2215
+2216
+2217
+2218
+2219
+2220
+2221
+2222
+2223
+2224
+2225
+2226
+2227
+2228
+2229
+2230
+2231
+2232
+2233
+2234
+2235
+2236
+2237
+2238
+2239
+2240
+2241
+2242
+2243
+2244
+2245
+2246
+2247
+2248
+2249
+2250
+2251
+2252
+2253
+2254
+2255
+2256
+2257
+2258
+2259
+2260
+2261
+2262
+2263
+2264
+2265
+2266
+2267
+2268
+2269
+2270
+2271
+2272
+2273
+2274
+2275
+2276
+2277
+2278
+2279
+2280
+2281
+2282
+2283
+2284
+2285
+2286
+2287
+2288
+2289
+2290
+2291
+2292
+2293
+2294
+2295
+2296
+2297
+2298
+2299
+2300
+2301
+2302
+2303
+2304
+2305
+2306
+2307
+2308
+2309
+2310
+2311
+2312
+2313
+2314
+2315
+2316
+2317
+2318
+2319
+2320
+2321
+2322
+2323
+2324
+2325
+2326
+2327
+2328
+2329
+2330
+2331
+2332
+2333
+2334
+2335
+2336
+2337
+2338
+2339
+2340
+2341
+2342
+2343
+2344
+2345
+2346
+2347
+2348
+2349
+2350
+2351
+2352
+2353
+2354
+2355
+2356
+2357
+2358
+2359
+2360
+2361
+2362
+2363
+2364
+2365
+2366
+2367
+2368
+2369
+2370
+2371
+2372
+2373
+2374
+2375
+2376
+2377
+2378
+2379
+2380
+2381
+2382
+2383
+2384
+2385
+2386
+2387
+2388
+2389
+2390
+2391
+2392
+2393
+2394
+2395
+2396
+2397
+2398
+2399
+2400
+2401
+2402
+2403
+2404
+2405
+2406
+2407
+2408
+2409
+2410
+2411
+2412
+2413
+2414
+2415
+2416
+2417
+2418
+2419
+2420
+2421
+2422
+2423
+2424
+2425
+2426
+2427
+2428
+2429
+2430
+2431
+2432
+2433
+2434
+2435
+2436
+2437
+2438
+2439
+2440
+2441
+2442
+2443
+2444
+2445
+2446
+2447
+2448
+2449
+2450
+2451
+2452
+2453
+2454
+2455
+2456
+2457
+2458
+2459
+2460
+2461
+2462
+2463
+2464
+2465
+2466
+2467
+2468
+2469
+2470
+2471
+2472
+2473
+2474
+2475
+2476
+2477
+2478
+2479
+2480
+2481
+2482
+2483
+2484
+2485
+2486
+2487
+2488
+2489
+2490
+2491
+2492
+2493
+2494
+2495
+2496
+2497
+2498
+2499
+2500
+2501
+2502
+2503
+2504
+2505
+2506
+2507
+2508
+2509
+2510
+2511
+2512
+2513
+2514
+2515
+2516
+2517
+2518
+2519
+2520
+2521
+2522
+2523
+2524
+2525
+2526
+2527
+2528
+2529
+2530
+2531
+2532
+2533
+2534
+2535
+2536
+2537
+2538
+2539
+2540
+2541
+2542
+2543
+2544
+2545
+2546
+2547
+2548
+2549
+2550
+2551
+2552
+2553
+2554
+2555
+2556
+2557
+2558
+2559
+2560
+2561
+2562
+2563
+2564
+2565
+2566
+2567
+2568
+2569
+2570
+2571
+2572
+2573
+2574
+2575
+2576
+2577
+2578
+2579
+2580
+2581
+2582
+2583
+2584
+2585
+2586
+2587
+2588
+2589
+2590
+2591
+2592
+2593
+2594
+2595
+2596
+2597
+2598
+2599
+2600
+2601
+2602
+2603
+2604
+2605
+2606
+2607
+2608
+2609
+2610
+2611
+2612
+2613
+2614
+2615
+2616
+2617
+2618
+2619
+2620
+2621
+2622
+2623
+2624
+2625
+2626
+2627
+2628
+2629
+2630
+2631
+2632
+2633
+2634
+2635
+2636
+2637
+2638
+2639
+2640
+2641
+2642
+2643
+2644
+2645
+2646
+2647
+2648
+2649
+2650
+2651
+2652
+2653
+2654
+2655
+2656
+2657
+2658
+2659
+2660
+2661
+2662
+2663
+2664
+2665
+2666
+2667
+2668
+2669
+2670
+2671
+2672
+2673
+2674
+2675
+2676
+2677
+2678
+2679
+2680
+2681
+2682
+2683
+2684
+2685
+2686
+2687
+2688
+2689
+2690
+2691
+2692
+2693
+2694
+2695
+2696
+2697
+2698
+2699
+2700
+2701
+2702
+2703
+2704
+2705
+2706
+2707
+2708
+2709
+2710
+2711
+2712
+2713
+2714
+2715
+2716
+2717
+2718
+2719
+2720
+2721
+2722
+2723
+2724
+2725
+2726
+2727
+2728
+2729
+2730
+2731
+2732
+2733
+2734
+2735
+2736
+2737
+2738
+2739
+2740
+2741
+2742
+2743
+2744
+2745
+2746
+2747
+2748
+2749
+2750
+2751
+2752
+2753
+2754
+2755
+2756
+2757
+2758
+2759
+2760
+2761
+2762
+2763
+2764
+2765
+2766
+2767
+2768
+2769
+2770
+2771
+2772
+2773
+2774
+2775
+2776
+2777
+2778
+2779
+2780
+2781
+2782
+2783
+2784
+2785
+2786
+2787
+2788
+2789
+2790
+2791
+2792
+2793
+2794
+2795
+2796
+2797
+2798
+2799
+2800
+2801
+2802
+2803
+2804
+2805
+2806
+2807
+2808
+2809
+2810
+2811
+2812
+2813
+2814
+2815
+2816
+2817
+2818
+2819
+2820
+2821
+2822
+2823
+2824
+2825
+2826
+2827
+2828
+2829
+2830
+2831
+2832
+2833
+2834
+2835
+2836
+2837
+2838
+2839
+2840
+2841
+2842
+2843
+2844
+2845
+2846
+2847
+2848
+2849
+2850
+2851
+2852
+2853
+2854
+2855
+2856
+2857
+2858
+2859
+2860
+2861
+2862
+2863
+2864
+2865
+2866
+2867
+2868
+2869
+2870
+2871
+2872
+2873
+2874
+2875
+2876
+2877
+2878
+2879
+2880
+2881
+2882
+2883
+2884
+2885
+2886
+2887
+2888
+2889
+2890
+2891
+2892
+2893
+2894
+2895
+2896
+2897
+2898
+2899
+2900
+2901
+2902
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+#include <ctk/ctk.h>
+#include <cdk/cdkx.h>
+#include <cdk/cdkkeysyms.h>
+#include <X11/XKBlib.h>
+#include <X11/extensions/XKBgeom.h>
+#include <stdlib.h>
+#include <memory.h>
+#include <math.h>
+#include <glib/gi18n-lib.h>
+#include <libxklavier/xklavier.h>
+
+#include <cafekbd-keyboard-drawing.h>
+#include <cafekbd-keyboard-drawing-marshal.h>
+#include <cafekbd-util.h>
+
+#define INVALID_KEYCODE ((guint)(-1))
+
+#define CTK_RESPONSE_PRINT 2
+
+#define KEY_FONT_SIZE 12
+
+enum {
+	BAD_KEYCODE = 0,
+	NUM_SIGNALS
+};
+
+static guint cafekbd_keyboard_drawing_signals[NUM_SIGNALS] = { 0 };
+
+static void cafekbd_keyboard_drawing_set_mods (CafekbdKeyboardDrawing * drawing,
+					    guint mods);
+
+extern gboolean xkl_xkb_config_native_prepare (XklEngine * engine,
+					      const XklConfigRec * data,
+					      gpointer component_names);
+
+extern void xkl_xkb_config_native_cleanup (XklEngine * engine,
+					  gpointer component_names);
+
+
+static gint
+xkb_to_pixmap_coord (CafekbdKeyboardDrawingRenderContext * context, gint n)<--- Parameter 'context' can be declared as pointer to const
+{
+	return n * context->scale_numerator / context->scale_denominator;
+}
+
+static gdouble
+xkb_to_pixmap_double (CafekbdKeyboardDrawingRenderContext * context,<--- Parameter 'context' can be declared as pointer to const
+		      gdouble d)
+{
+	return d * context->scale_numerator / context->scale_denominator;
+}
+
+
+/* angle is in tenths of a degree; coordinates can be anything as (xkb,
+ * pixels, pango) as long as they are all the same */
+static void
+rotate_coordinate (gint origin_x,
+		   gint origin_y,
+		   gint x,
+		   gint y, gint angle, gint * rotated_x, gint * rotated_y)
+{
+	*rotated_x =
+	    origin_x + (x - origin_x) * cos (M_PI * angle / 1800.0) - (y -
+								       origin_y)
+	    * sin (M_PI * angle / 1800.0);
+	*rotated_y =
+	    origin_y + (x - origin_x) * sin (M_PI * angle / 1800.0) + (y -
+								       origin_y)
+	    * cos (M_PI * angle / 1800.0);
+}
+
+static gdouble
+length (gdouble x, gdouble y)
+{
+	return sqrt (x * x + y * y);
+}
+
+static gdouble
+point_line_distance (gdouble ax, gdouble ay, gdouble nx, gdouble ny)
+{
+	return ax * nx + ay * ny;
+}
+
+static void
+normal_form (gdouble ax, gdouble ay,
+	     gdouble bx, gdouble by,
+	     gdouble * nx, gdouble * ny, gdouble * d)
+{
+	gdouble l;
+
+	*nx = by - ay;
+	*ny = ax - bx;
+
+	l = length (*nx, *ny);
+
+	*nx /= l;
+	*ny /= l;
+
+	*d = point_line_distance (ax, ay, *nx, *ny);
+}
+
+static void
+inverse (gdouble a, gdouble b, gdouble c, gdouble d,
+	 gdouble * e, gdouble * f, gdouble * g, gdouble * h)
+{
+	gdouble det;
+
+	det = a * d - b * c;
+
+	*e = d / det;
+	*f = -b / det;
+	*g = -c / det;
+	*h = a / det;
+}
+
+static void
+multiply (gdouble a, gdouble b, gdouble c, gdouble d,
+	  gdouble e, gdouble f, gdouble * x, gdouble * y)
+{
+	*x = a * e + b * f;
+	*y = c * e + d * f;
+}
+
+static void
+intersect (gdouble n1x, gdouble n1y, gdouble d1,
+	   gdouble n2x, gdouble n2y, gdouble d2, gdouble * x, gdouble * y)
+{
+	gdouble e, f, g, h;
+
+	inverse (n1x, n1y, n2x, n2y, &e, &f, &g, &h);
+	multiply (e, f, g, h, d1, d2, x, y);
+}
+
+
+/* draw an angle from the current point to b and then to c,
+ * with a rounded corner of the given radius.
+ */
+static void
+rounded_corner (cairo_t * cr,
+		gdouble bx, gdouble by,
+		gdouble cx, gdouble cy, gdouble radius)
+{
+	gdouble ax, ay;
+	gdouble n1x, n1y, d1;
+	gdouble n2x, n2y, d2;
+	gdouble pd1, pd2;
+	gdouble ix, iy;
+	gdouble dist1, dist2;
+	gdouble nx, ny, d;
+	gdouble a1x, a1y, c1x, c1y;
+	gdouble phi1, phi2;
+
+	cairo_get_current_point (cr, &ax, &ay);
+#ifdef KBDRAW_DEBUG
+	printf ("        current point: (%f, %f), radius %f:\n", ax, ay,
+		radius);
+#endif
+
+	/* make sure radius is not too large */
+	dist1 = length (bx - ax, by - ay);
+	dist2 = length (cx - bx, cy - by);
+
+	radius = MIN (radius, MIN (dist1, dist2));
+
+	/* construct normal forms of the lines */
+	normal_form (ax, ay, bx, by, &n1x, &n1y, &d1);
+	normal_form (bx, by, cx, cy, &n2x, &n2y, &d2);
+
+	/* find which side of the line a,b the point c is on */
+	if (point_line_distance (cx, cy, n1x, n1y) < d1)
+		pd1 = d1 - radius;
+	else
+		pd1 = d1 + radius;
+
+	/* find which side of the line b,c the point a is on */
+	if (point_line_distance (ax, ay, n2x, n2y) < d2)
+		pd2 = d2 - radius;
+	else
+		pd2 = d2 + radius;
+
+	/* intersect the parallels to find the center of the arc */
+	intersect (n1x, n1y, pd1, n2x, n2y, pd2, &ix, &iy);
+
+	nx = (bx - ax) / dist1;
+	ny = (by - ay) / dist1;
+	d = point_line_distance (ix, iy, nx, ny);
+
+	/* a1 is the point on the line a-b where the arc starts */
+	intersect (n1x, n1y, d1, nx, ny, d, &a1x, &a1y);
+
+	nx = (cx - bx) / dist2;
+	ny = (cy - by) / dist2;
+	d = point_line_distance (ix, iy, nx, ny);
+
+	/* c1 is the point on the line b-c where the arc ends */
+	intersect (n2x, n2y, d2, nx, ny, d, &c1x, &c1y);
+
+	/* determine the first angle */
+	if (a1x - ix == 0)
+		phi1 = (a1y - iy > 0) ? M_PI_2 : 3 * M_PI_2;
+	else if (a1x - ix > 0)
+		phi1 = atan ((a1y - iy) / (a1x - ix));
+	else
+		phi1 = M_PI + atan ((a1y - iy) / (a1x - ix));
+
+	/* determine the second angle */
+	if (c1x - ix == 0)
+		phi2 = (c1y - iy > 0) ? M_PI_2 : 3 * M_PI_2;
+	else if (c1x - ix > 0)
+		phi2 = atan ((c1y - iy) / (c1x - ix));
+	else
+		phi2 = M_PI + atan ((c1y - iy) / (c1x - ix));
+
+	/* compute the difference between phi2 and phi1 mod 2pi */
+	d = phi2 - phi1;
+	while (d < 0)
+		d += 2 * M_PI;
+	while (d > 2 * M_PI)
+		d -= 2 * M_PI;
+
+#ifdef KBDRAW_DEBUG
+	printf ("        line 1 to: (%f, %f):\n", a1x, a1y);
+#endif
+	if (!(isnan (a1x) || isnan (a1y)))
+		cairo_line_to (cr, a1x, a1y);
+
+	/* pick the short arc from phi1 to phi2 */
+	if (d < M_PI)
+		cairo_arc (cr, ix, iy, radius, phi1, phi2);
+	else
+		cairo_arc_negative (cr, ix, iy, radius, phi1, phi2);
+
+#ifdef KBDRAW_DEBUG
+	printf ("        line 2 to: (%f, %f):\n", cx, cy);
+#endif
+	cairo_line_to (cr, cx, cy);
+}
+
+static void
+rounded_polygon (cairo_t * cr,
+		 gboolean filled,
+		 gdouble radius, CdkPoint * points, gint num_points)
+{
+	gint i, j;
+
+	cairo_move_to (cr,
+		       (gdouble) (points[num_points - 1].x +
+				  points[0].x) / 2,
+		       (gdouble) (points[num_points - 1].y +
+				  points[0].y) / 2);
+
+
+#ifdef KBDRAW_DEBUG
+	printf ("    rounded polygon of radius %f:\n", radius);
+#endif
+	for (i = 0; i < num_points; i++) {
+		j = (i + 1) % num_points;
+		rounded_corner (cr, (gdouble) points[i].x,
+				(gdouble) points[i].y,
+				(gdouble) (points[i].x + points[j].x) / 2,
+				(gdouble) (points[i].y + points[j].y) / 2,
+				radius);
+#ifdef KBDRAW_DEBUG
+		printf ("      corner (%d, %d) -> (%d, %d):\n",
+			points[i].x, points[i].y, points[j].x,
+			points[j].y);
+#endif
+	};
+	cairo_close_path (cr);
+
+	if (filled)
+		cairo_fill (cr);
+	else
+		cairo_stroke (cr);
+}
+
+static void
+draw_polygon (CafekbdKeyboardDrawingRenderContext * context,
+	      CdkRGBA * fill_color,
+	      gint xkb_x,
+	      gint xkb_y, XkbPointRec * xkb_points, guint num_points,
+	      gdouble radius)
+{
+	CdkPoint *points;
+	gboolean filled;
+	gint i;
+
+	if (fill_color) {
+		filled = TRUE;
+	} else {
+		fill_color = &context->dark_color;
+		filled = FALSE;
+	}
+
+	cdk_cairo_set_source_rgba (context->cr, fill_color);
+
+	points = g_new (CdkPoint, num_points);
+
+#ifdef KBDRAW_DEBUG
+	printf ("    Polygon points:\n");
+#endif
+	for (i = 0; i < num_points; i++) {
+		points[i].x =
+		    xkb_to_pixmap_coord (context, xkb_x + xkb_points[i].x);
+		points[i].y =
+		    xkb_to_pixmap_coord (context, xkb_y + xkb_points[i].y);
+#ifdef KBDRAW_DEBUG
+		printf ("      %d, %d\n", points[i].x, points[i].y);
+#endif
+	}
+
+	rounded_polygon (context->cr, filled,
+			 xkb_to_pixmap_double (context, radius),
+			 points, num_points);
+
+	g_free (points);
+}
+
+static void
+curve_rectangle (cairo_t * cr,
+		 gdouble x0,
+		 gdouble y0, gdouble width, gdouble height, gdouble radius)
+{
+	gdouble x1, y1;
+
+	if (!width || !height)
+		return;
+
+	x1 = x0 + width;
+	y1 = y0 + height;
+
+	radius = MIN (radius, MIN (width / 2, height / 2));
+
+	cairo_move_to (cr, x0, y0 + radius);
+	cairo_arc (cr, x0 + radius, y0 + radius, radius, M_PI,
+		   3 * M_PI / 2);
+	cairo_line_to (cr, x1 - radius, y0);
+	cairo_arc (cr, x1 - radius, y0 + radius, radius, 3 * M_PI / 2,
+		   2 * M_PI);
+	cairo_line_to (cr, x1, y1 - radius);
+	cairo_arc (cr, x1 - radius, y1 - radius, radius, 0, M_PI / 2);
+	cairo_line_to (cr, x0 + radius, y1);
+	cairo_arc (cr, x0 + radius, y1 - radius, radius, M_PI / 2, M_PI);
+
+	cairo_close_path (cr);
+}
+
+static void
+draw_curve_rectangle (cairo_t * cr,
+		      gboolean filled,
+		      CdkRGBA * fill_color,
+		      gint x, gint y, gint width, gint height, gint radius)
+{
+	curve_rectangle (cr, x, y, width, height, radius);
+
+	cdk_cairo_set_source_rgba (cr, fill_color);
+
+	if (filled)
+		cairo_fill (cr);
+	else
+		cairo_stroke (cr);
+}
+
+/* x, y, width, height are in the xkb coordinate system */
+static void
+draw_rectangle (CafekbdKeyboardDrawingRenderContext * context,
+		CdkRGBA * fill_color,
+		gint angle,
+		gint xkb_x, gint xkb_y, gint xkb_width, gint xkb_height,
+		gint radius)
+{
+	if (angle == 0) {
+		gint x, y, width, height;
+		gboolean filled;
+
+		if (fill_color) {
+			filled = TRUE;
+		} else {
+			fill_color = &context->dark_color;
+			filled = FALSE;
+		}
+
+		x = xkb_to_pixmap_coord (context, xkb_x);
+		y = xkb_to_pixmap_coord (context, xkb_y);
+		width =
+		    xkb_to_pixmap_coord (context, xkb_x + xkb_width) - x;
+		height =
+		    xkb_to_pixmap_coord (context, xkb_y + xkb_height) - y;
+
+		draw_curve_rectangle (context->cr, filled, fill_color,
+				      x, y, width, height,
+				      xkb_to_pixmap_double (context,
+							    radius));
+	} else {
+		XkbPointRec points[4];
+		gint x, y;
+
+		points[0].x = xkb_x;
+		points[0].y = xkb_y;
+		rotate_coordinate (xkb_x, xkb_y, xkb_x + xkb_width, xkb_y,
+				   angle, &x, &y);
+		points[1].x = x;
+		points[1].y = y;
+		rotate_coordinate (xkb_x, xkb_y, xkb_x + xkb_width,
+				   xkb_y + xkb_height, angle, &x, &y);
+		points[2].x = x;
+		points[2].y = y;
+		rotate_coordinate (xkb_x, xkb_y, xkb_x, xkb_y + xkb_height,
+				   angle, &x, &y);
+		points[3].x = x;
+		points[3].y = y;
+
+		/* the points we've calculated are relative to 0,0 */
+		draw_polygon (context, fill_color, 0, 0, points, 4,
+			      radius);
+	}
+}
+
+static void
+draw_outline (CafekbdKeyboardDrawingRenderContext * context,
+	      XkbOutlineRec * outline,
+	      CdkRGBA * color,
+	      gint angle, gint origin_x, gint origin_y)
+{
+#ifdef KBDRAW_DEBUG
+	printf (" num_points in %p: %d\n", outline, outline->num_points);
+#endif
+
+	if (outline->num_points == 1) {
+		if (color)
+			draw_rectangle (context, color, angle, origin_x,
+					origin_y, outline->points[0].x,
+					outline->points[0].y,
+					outline->corner_radius);
+
+#ifdef KBDRAW_DEBUG
+		printf ("pointsxy:%d %d %d\n", outline->points[0].x,
+			outline->points[0].y, outline->corner_radius);
+#endif
+
+		draw_rectangle (context, NULL, angle, origin_x, origin_y,
+				outline->points[0].x,
+				outline->points[0].y,
+				outline->corner_radius);
+	} else if (outline->num_points == 2) {
+		gint rotated_x0, rotated_y0;
+
+		rotate_coordinate (origin_x, origin_y,
+				   origin_x + outline->points[0].x,
+				   origin_y + outline->points[0].y,
+				   angle, &rotated_x0, &rotated_y0);
+		if (color)
+			draw_rectangle (context, color, angle, rotated_x0,
+					rotated_y0, outline->points[1].x,
+					outline->points[1].y,
+					outline->corner_radius);
+
+		draw_rectangle (context, NULL, angle, rotated_x0,
+				rotated_y0, outline->points[1].x,
+				outline->points[1].y,
+				outline->corner_radius);
+	} else {
+		if (color)
+			draw_polygon (context, color, origin_x, origin_y,
+				      outline->points,
+				      outline->num_points,
+				      outline->corner_radius);
+
+		draw_polygon (context, NULL, origin_x, origin_y,
+			      outline->points, outline->num_points,
+			      outline->corner_radius);
+	}
+}
+
+/* see PSColorDef in xkbprint */
+static gboolean
+parse_xkb_color_spec (gchar * colorspec, CdkRGBA * color)
+{
+	glong level;
+
+	color->alpha = 1.0;
+
+	if (g_ascii_strcasecmp (colorspec, "black") == 0) {
+		color->red = 0;
+		color->green = 0;
+		color->blue = 0;
+	} else if (g_ascii_strcasecmp (colorspec, "white") == 0) {
+		color->red = 1.0;
+		color->green = 1.0;
+		color->blue = 1.0;
+	} else if (g_ascii_strncasecmp (colorspec, "grey", 4) == 0 ||
+		   g_ascii_strncasecmp (colorspec, "gray", 4) == 0) {
+		level = strtol (colorspec + 4, NULL, 10);
+
+		color->red = 1.0 - 1.0 * level / 100.0;
+		color->green = 1.0 - 1.0 * level / 100.0;
+		color->blue = 1.0 - 1.0 * level / 100.0;
+	} else if (g_ascii_strcasecmp (colorspec, "red") == 0) {
+		color->red = 1.0;
+		color->green = 0;
+		color->blue = 0;
+	} else if (g_ascii_strcasecmp (colorspec, "green") == 0) {
+		color->red = 0;
+		color->green = 1.0;
+		color->blue = 0;
+	} else if (g_ascii_strcasecmp (colorspec, "blue") == 0) {
+		color->red = 0;
+		color->green = 0;
+		color->blue = 1.0;
+	} else if (g_ascii_strncasecmp (colorspec, "red", 3) == 0) {
+		level = strtol (colorspec + 3, NULL, 10);
+
+		color->red = 1.0 * level / 100.0;
+		color->green = 0;
+		color->blue = 0;
+	} else if (g_ascii_strncasecmp (colorspec, "green", 5) == 0) {
+		level = strtol (colorspec + 5, NULL, 10);
+
+		color->red = 0;
+		color->green = 1.0 * level / 100.0;
+		color->blue = 0;
+	} else if (g_ascii_strncasecmp (colorspec, "blue", 4) == 0) {
+		level = strtol (colorspec + 4, NULL, 10);
+
+		color->red = 0;
+		color->green = 0;
+		color->blue = 1.0 * level / 100.0;
+	} else
+		return FALSE;
+
+	return TRUE;
+}
+
+
+static guint
+find_keycode (CafekbdKeyboardDrawing * drawing, gchar * key_name)
+{
+#define KEYSYM_NAME_MAX_LENGTH 4
+	guint keycode;
+	gint i, j;
+	XkbKeyNamePtr pkey;
+	XkbKeyAliasPtr palias;
+	guint is_name_matched;
+	gchar *src, *dst;
+
+	if (!drawing->xkb)
+		return INVALID_KEYCODE;
+
+#ifdef KBDRAW_DEBUG
+	printf ("    looking for keycode for (%c%c%c%c)\n",
+		key_name[0], key_name[1], key_name[2], key_name[3]);
+#endif
+
+	pkey = drawing->xkb->names->keys + drawing->xkb->min_key_code;
+	for (keycode = drawing->xkb->min_key_code;
+	     keycode <= drawing->xkb->max_key_code; keycode++) {
+		is_name_matched = 1;
+		src = key_name;
+		dst = pkey->name;
+		for (i = KEYSYM_NAME_MAX_LENGTH; --i >= 0;) {
+			if ('\0' == *src)
+				break;
+			if (*src++ != *dst++) {
+				is_name_matched = 0;
+				break;
+			}
+		}
+		if (is_name_matched) {
+#ifdef KBDRAW_DEBUG
+			printf ("      found keycode %u\n", keycode);
+#endif
+			return keycode;
+		}
+		pkey++;
+	}
+
+	palias = drawing->xkb->names->key_aliases;
+	for (j = drawing->xkb->names->num_key_aliases; --j >= 0;) {
+		is_name_matched = 1;
+		src = key_name;
+		dst = palias->alias;
+		for (i = KEYSYM_NAME_MAX_LENGTH; --i >= 0;) {
+			if ('\0' == *src)
+				break;
+			if (*src++ != *dst++) {
+				is_name_matched = 0;
+				break;
+			}
+		}
+
+		if (is_name_matched) {
+			keycode = find_keycode (drawing, palias->real);
+#ifdef KBDRAW_DEBUG
+			printf ("found alias keycode %u\n", keycode);
+#endif
+			return keycode;
+		}
+		palias++;
+	}
+
+	return INVALID_KEYCODE;
+}
+
+static void
+set_markup (CafekbdKeyboardDrawingRenderContext * context, gchar *txt)<--- Parameter 'context' can be declared as pointer to const
+{
+	PangoLayout *layout = context->layout;
+	txt = strcmp ("<", txt) ? txt : "&lt;";
+	txt = strcmp ("&", txt) ? txt : "&amp;";
+	if (g_utf8_strlen (txt, -1) > 1) {
+		gchar* buf =
+		    g_strdup_printf ("<span size=\"xx-small\">%s</span>", txt);
+		pango_layout_set_markup (layout, buf, -1);
+		g_free (buf);
+	} else {
+		pango_layout_set_markup (layout, txt, -1);
+	}
+}
+
+static void
+set_key_label_in_layout (CafekbdKeyboardDrawingRenderContext * context,
+			 guint keyval)
+{
+	gchar buf[5];
+	gunichar uc;
+
+	switch (keyval) {
+	case CDK_KEY_Scroll_Lock:
+		set_markup (context, _("Scroll\nLock"));
+		break;
+
+	case CDK_KEY_space:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_Sys_Req:
+		set_markup (context, _("Sys Rq"));
+		break;
+
+	case CDK_KEY_Page_Up:
+		set_markup (context, _("Page\nUp"));
+		break;
+
+	case CDK_KEY_Page_Down:
+		set_markup (context, _("Page\nDown"));
+		break;
+
+	case CDK_KEY_Num_Lock:
+		set_markup (context, _("Num\nLock"));
+		break;
+
+	case CDK_KEY_KP_Page_Up:
+		set_markup (context, _("Pg Up"));
+		break;
+
+	case CDK_KEY_KP_Page_Down:
+		set_markup (context, _("Pg Dn"));
+		break;
+
+	case CDK_KEY_KP_Home:
+		set_markup (context, _("Home"));
+		break;
+
+	case CDK_KEY_KP_Left:
+		set_markup (context, _("Left"));
+		break;
+
+	case CDK_KEY_KP_End:
+		set_markup (context, _("End"));
+		break;
+
+	case CDK_KEY_KP_Up:
+		set_markup (context, _("Up"));
+		break;
+
+	case CDK_KEY_KP_Begin:
+		set_markup (context, _("Begin"));
+		break;
+
+	case CDK_KEY_KP_Right:
+		set_markup (context, _("Right"));
+		break;
+
+	case CDK_KEY_KP_Enter:
+		set_markup (context, _("Enter"));
+		break;
+
+	case CDK_KEY_KP_Down:
+		set_markup (context, _("Down"));
+		break;
+
+	case CDK_KEY_KP_Insert:
+		set_markup (context, _("Ins"));
+		break;
+
+	case CDK_KEY_KP_Delete:
+		set_markup (context, _("Del"));
+		break;
+
+	/* 0xfe03 */
+	case CDK_KEY_ISO_Level3_Shift:
+		set_markup (context, _("ISO_Level3_Shift"));
+		break;
+
+	/* 0xfe20 */
+	case CDK_KEY_ISO_Left_Tab:
+		set_markup (context, _("Tab"));
+		break;
+
+	/* 0xff08 */
+	case CDK_KEY_BackSpace:
+		set_markup (context, _("BackSpace"));
+		break;
+
+	/* 0xff09 */
+	case CDK_KEY_Tab:
+		set_markup (context, _("Tab"));
+		break;
+
+	/* 0xff0d */
+	case CDK_KEY_Return:
+		set_markup (context, _("Return"));
+		break;
+
+	/* 0xff13 */
+	case CDK_KEY_Pause:
+		set_markup (context, _("Pause"));
+		break;
+
+	/* 0xff1b */
+	case CDK_KEY_Escape:
+		set_markup (context, _("Esc"));
+		break;
+
+	/* 0xff50 */
+	case CDK_KEY_Home:
+		set_markup (context, _("Home"));
+		break;
+
+	/* 0xff51 */
+	case CDK_KEY_Left:
+		set_markup (context, _("Left"));
+		break;
+
+	/* 0xff52 */
+	case CDK_KEY_Up:
+		set_markup (context, _("Up"));
+		break;
+
+	/* 0xff53 */
+	case CDK_KEY_Right:
+		set_markup (context, _("Right"));
+		break;
+
+	/* 0xff54 */
+	case CDK_KEY_Down:
+		set_markup (context, _("Down"));
+		break;
+
+	/* 0xff57 */
+	case CDK_KEY_End:
+		set_markup (context, _("End"));
+		break;
+
+	/* 0xff61 */
+	case CDK_KEY_Print:
+		set_markup (context, _("Print"));
+		break;
+
+	/* 0xff63 */
+	case CDK_KEY_Insert:
+		set_markup (context, _("Insert"));
+		break;
+
+	/* 0xff67 */
+	case CDK_KEY_Menu:
+		set_markup (context, _("Menu"));
+		break;
+
+	/* 0xffbe */
+	case CDK_KEY_F1:
+		set_markup (context, _("F1"));
+		break;
+
+	/* 0xffbf */
+	case CDK_KEY_F2:
+		set_markup (context, _("F2"));
+		break;
+
+	/* 0xffc0 */
+	case CDK_KEY_F3:
+		set_markup (context, _("F3"));
+		break;
+
+	/* 0xffc1 */
+	case CDK_KEY_F4:
+		set_markup (context, _("F4"));
+		break;
+
+	/* 0xffc2 */
+	case CDK_KEY_F5:
+		set_markup (context, _("F5"));
+		break;
+
+	/* 0xffc3 */
+	case CDK_KEY_F6:
+		set_markup (context, _("F6"));
+		break;
+
+	/* 0xffc4 */
+	case CDK_KEY_F7:
+		set_markup (context, _("F7"));
+		break;
+
+	/* 0xffc5 */
+	case CDK_KEY_F8:
+		set_markup (context, _("F8"));
+		break;
+
+	/* 0xffc6 */
+	case CDK_KEY_F9:
+		set_markup (context, _("F9"));
+		break;
+
+	/* 0xffc7 */
+	case CDK_KEY_F10:
+		set_markup (context, _("F10"));
+		break;
+
+	/* 0xffc8 */
+	case CDK_KEY_F11:
+		set_markup (context, _("F11"));
+		break;
+
+	/* 0xffc9 */
+	case CDK_KEY_F12:
+		set_markup (context, _("F12"));
+		break;
+
+	/* 0xffe1 */
+	case CDK_KEY_Shift_L:
+		set_markup (context, _("Shift"));
+		break;
+
+	/* 0xffe2 */
+	case CDK_KEY_Shift_R:
+		set_markup (context, _("Shift"));
+		break;
+
+	/* 0xffe3 */
+	case CDK_KEY_Control_L:
+		set_markup (context, _("Control"));
+		break;
+
+	/* 0xffe4 */
+	case CDK_KEY_Control_R:
+		set_markup (context, _("Control"));
+		break;
+
+	/* 0xffe5 */
+	case CDK_KEY_Caps_Lock:
+		set_markup (context, _("Caps\nLock"));
+		break;
+
+	/* 0xffe7 */
+	case CDK_KEY_Meta_L:
+		set_markup (context, _("Meta"));
+		break;
+
+	/* 0xffe9 */
+	case CDK_KEY_Alt_L:
+		set_markup (context, _("Alt"));
+		break;
+
+	/* 0xffeb */
+	case CDK_KEY_Super_L:
+		set_markup (context, _("Super"));
+		break;
+
+	/* 0xffec */
+	case CDK_KEY_Super_R:
+		set_markup (context, _("Super"));
+		break;
+
+	/* 0xffff */
+	case CDK_KEY_VoidSymbol:
+		set_markup (context, _("Delete"));
+		break;
+
+	case CDK_KEY_dead_grave:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_acute:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_circumflex:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_tilde:
+		set_markup (context, "~");
+		break;
+
+	case CDK_KEY_dead_macron:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_breve:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_abovedot:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_diaeresis:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_abovering:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_doubleacute:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_caron:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_cedilla:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_ogonek:
+		set_markup (context, "");
+		break;
+
+		/* case CDK_KEY_dead_iota:
+		 * case CDK_KEY_dead_voiced_sound:
+		 * case CDK_KEY_dead_semivoiced_sound: */
+
+	case CDK_KEY_dead_belowdot:
+		set_markup (context, " ");
+		break;
+
+	case CDK_KEY_horizconnector:
+		set_markup (context, _("horiz\nconn"));
+		break;
+
+	case CDK_KEY_Mode_switch:
+		set_markup (context, _("AltGr"));
+		break;
+
+	case CDK_KEY_Multi_key:
+		set_markup (context, _("Compose"));
+		break;
+
+	default:
+		uc = cdk_keyval_to_unicode (keyval);
+		if (uc != 0 && g_unichar_isgraph (uc)) {
+			buf[g_unichar_to_utf8 (uc, buf)] = '\0';
+			set_markup (context, buf);
+		} else {
+			gchar *name = cdk_keyval_name (keyval);
+			if (name) {
+				set_markup (context, name);
+			} else
+				set_markup (context, "");
+		}
+	}
+}
+
+
+static void
+draw_pango_layout (CafekbdKeyboardDrawingRenderContext * context,
+		   CafekbdKeyboardDrawing * drawing,
+		   gint angle, gint x, gint y)
+{
+	PangoLayout *layout = context->layout;
+	CdkRGBA *color;
+	PangoLayoutLine *line;
+	gint x_off, y_off;
+	gint i;
+
+	color =
+	    drawing->colors + (drawing->xkb->geom->label_color -
+			       drawing->xkb->geom->colors);
+
+	if (angle != context->angle) {
+		PangoMatrix matrix = PANGO_MATRIX_INIT;
+		pango_matrix_rotate (&matrix, -angle / 10.0);
+		pango_context_set_matrix (pango_layout_get_context
+					  (layout), &matrix);
+		pango_layout_context_changed (layout);
+		context->angle = angle;
+	}
+
+	i = 0;
+	y_off = 0;
+	for (line = pango_layout_get_line (layout, i);
+	     line != NULL; line = pango_layout_get_line (layout, ++i)) {
+		GSList *runp;<--- Variable 'runp' can be declared as pointer to const
+		PangoRectangle line_extents;
+
+		x_off = 0;
+
+		for (runp = line->runs; runp != NULL; runp = runp->next) {
+			PangoGlyphItem *run = runp->data;
+			gint j;
+
+			for (j = 0; j < run->glyphs->num_glyphs; j++) {
+				PangoGlyphGeometry *geometry;<--- Variable 'geometry' can be declared as pointer to const
+
+				geometry =
+				    &run->glyphs->glyphs[j].geometry;
+
+				x_off += geometry->width;
+			}
+		}
+
+		pango_layout_line_get_extents (line, NULL, &line_extents);
+		y_off +=
+		    line_extents.height +
+		    pango_layout_get_spacing (layout);
+	}
+
+	cairo_move_to (context->cr, x, y);
+	cdk_cairo_set_source_rgba (context->cr, color);
+	pango_cairo_show_layout (context->cr, layout);
+}
+
+static void
+draw_key_label_helper (CafekbdKeyboardDrawingRenderContext * context,
+		       CafekbdKeyboardDrawing * drawing,
+		       KeySym keysym,
+		       gint angle,
+		       CafekbdKeyboardDrawingGroupLevelPosition glp,
+		       gint x,
+		       gint y, gint width, gint height, gint padding)
+{
+	gint label_x, label_y, label_max_width, ycell;
+
+	if (keysym == 0)
+		return;
+#ifdef KBDRAW_DEBUG
+	printf ("keysym: %04X(%c) at glp: %d\n",
+		(unsigned) keysym, (char) keysym, (int) glp);
+#endif
+
+	switch (glp) {
+	case CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT:
+	case CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT:
+		{
+			ycell =
+			    glp == CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT;
+
+			rotate_coordinate (x, y, x + padding,
+					   y + padding + (height -
+							  2 * padding) *
+					   ycell * 4 / 7, angle, &label_x,
+					   &label_y);
+			label_max_width =
+			    PANGO_SCALE * (width - 2 * padding);
+			break;
+		}
+	case CAFEKBD_KEYBOARD_DRAWING_POS_TOPRIGHT:
+	case CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT:
+		{
+			ycell =
+			    glp == CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT;
+
+			rotate_coordinate (x, y,
+					   x + padding + (width -
+							  2 * padding) *
+					   4 / 7,
+					   y + padding + (height -
+							  2 * padding) *
+					   ycell * 4 / 7, angle, &label_x,
+					   &label_y);
+			label_max_width =
+			    PANGO_SCALE * ((width - 2 * padding) -
+					   (width - 2 * padding) * 4 / 7);
+			break;
+		}
+	default:
+		return;
+	}
+	set_key_label_in_layout (context, keysym);
+	pango_layout_set_width (context->layout, label_max_width);
+	label_y -= (pango_layout_get_line_count (context->layout) - 1) *
+	    (pango_font_description_get_size (context->font_desc) /
+	     PANGO_SCALE);
+	cairo_save (context->cr);
+	cairo_rectangle (context->cr, x + padding / 2, y + padding / 2,
+			 width - padding, height - padding);
+	cairo_clip (context->cr);
+	draw_pango_layout (context, drawing, angle, label_x, label_y);
+	cairo_restore (context->cr);
+}
+
+static void
+draw_key_label (CafekbdKeyboardDrawingRenderContext * context,
+		CafekbdKeyboardDrawing * drawing,
+		guint keycode,
+		gint angle,
+		gint xkb_origin_x,
+		gint xkb_origin_y, gint xkb_width, gint xkb_height)
+{
+	gint x, y, width, height;
+	gint padding;
+	gint g, l, glp;
+
+	if (!drawing->xkb)
+		return;
+
+	padding = 23 * context->scale_numerator / context->scale_denominator;	/* 2.3mm */
+
+	x = xkb_to_pixmap_coord (context, xkb_origin_x);
+	y = xkb_to_pixmap_coord (context, xkb_origin_y);
+	width =
+	    xkb_to_pixmap_coord (context, xkb_origin_x + xkb_width) - x;
+	height =
+	    xkb_to_pixmap_coord (context, xkb_origin_y + xkb_height) - y;
+
+	for (glp = CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT;
+	     glp < CAFEKBD_KEYBOARD_DRAWING_POS_TOTAL; glp++) {
+		if (drawing->groupLevels[glp] == NULL)
+			continue;
+		g = drawing->groupLevels[glp]->group;
+		l = drawing->groupLevels[glp]->level;
+
+		if (g < 0 || g >= XkbKeyNumGroups (drawing->xkb, keycode))
+			continue;
+		if (l < 0
+		    || l >= XkbKeyGroupWidth (drawing->xkb, keycode, g))
+			continue;
+
+		/* Skip "exotic" levels like the "Ctrl" level in PC_SYSREQ */
+		if (l > 0) {
+			guint mods = XkbKeyKeyType (drawing->xkb, keycode,
+						    g)->mods.mask;
+			if ((mods & (ShiftMask | drawing->l3mod)) == 0)
+				continue;
+		}
+
+		if (drawing->track_modifiers) {
+			guint mods_rtrn;
+			KeySym keysym;
+
+			if (XkbTranslateKeyCode (drawing->xkb, keycode,
+						 XkbBuildCoreState
+						 (drawing->mods, g),
+						 &mods_rtrn, &keysym)) {
+				draw_key_label_helper (context, drawing,
+						       keysym, angle, glp,
+						       x, y, width, height,
+						       padding);
+				/* reverse y order */
+			}
+		} else {
+			KeySym keysym;
+
+			keysym =
+			    XkbKeySymEntry (drawing->xkb, keycode, l, g);
+
+			draw_key_label_helper (context, drawing, keysym,
+					       angle, glp, x, y, width,
+					       height, padding);
+			/* reverse y order */
+		}
+	}
+}
+
+/*
+ * The x offset is calculated for complex shapes. It is the rightmost of the vertical lines in the outline
+ */
+static gint
+calc_origin_offset_x (XkbOutlineRec * outline)<--- Parameter 'outline' can be declared as pointer to const
+{
+	gint rv = 0;
+	gint i;
+	XkbPointPtr point = outline->points;
+	if (outline->num_points < 3)
+		return 0;
+	for (i = outline->num_points; --i > 0;) {
+		gint x1 = point->x;
+		gint y1 = point++->y;
+		gint x2 = point->x;
+		gint y2 = point->y;
+
+		/*vertical, bottom to top (clock-wise), on the left */
+		if ((x1 == x2) && (y1 > y2) && (x1 > rv)) {
+			rv = x1;
+		}
+	}
+	return rv;
+}
+
+/* groups are from 0-3 */
+static void
+draw_key (CafekbdKeyboardDrawingRenderContext * context,
+	  CafekbdKeyboardDrawing * drawing, CafekbdKeyboardDrawingKey * key)
+{
+	XkbShapeRec *shape;
+	CtkStyleContext *style_context;
+	CdkRGBA color;
+	XkbOutlineRec *outline;
+	int origin_offset_x;
+	/* gint i; */
+
+	if (!drawing->xkb)
+		return;
+
+#ifdef KBDRAW_DEBUG
+	printf ("shape: %p (base %p, index %d)\n",
+		drawing->xkb->geom->shapes + key->xkbkey->shape_ndx,
+		drawing->xkb->geom->shapes, key->xkbkey->shape_ndx);
+#endif
+
+	shape = drawing->xkb->geom->shapes + key->xkbkey->shape_ndx;
+
+	if (key->pressed) {
+		style_context = ctk_widget_get_style_context (CTK_WIDGET (drawing));
+		ctk_style_context_save (style_context);
+		ctk_style_context_add_class (style_context, CTK_STYLE_CLASS_VIEW);
+		ctk_style_context_get_background_color (style_context,
+		                                        CTK_STATE_FLAG_SELECTED,
+		                                        &color);
+		ctk_style_context_restore (style_context);
+	 } else
+		color = *(drawing->colors + key->xkbkey->color_ndx);
+
+#ifdef KBDRAW_DEBUG
+	printf
+	    (" outlines base in the shape: %p (total: %d), origin: (%d, %d), angle %d\n",
+	     shape->outlines, shape->num_outlines, key->origin_x,
+	     key->origin_y, key->angle);
+#endif
+
+	/* draw the primary outline */
+	outline = shape->primary ? shape->primary : shape->outlines;
+	draw_outline (context, outline, &color, key->angle, key->origin_x,
+		      key->origin_y);
+#if 0
+	/* don't draw other outlines for now, since
+	 * the text placement does not take them into account
+	 */
+	for (i = 0; i < shape->num_outlines; i++) {
+		if (shape->outlines + i == shape->approx ||
+		    shape->outlines + i == shape->primary)
+			continue;
+		draw_outline (context, shape->outlines + i, NULL,
+			      key->angle, key->origin_x, key->origin_y);
+	}
+#endif
+
+	origin_offset_x = calc_origin_offset_x (outline);
+	draw_key_label (context, drawing, key->keycode, key->angle,
+			key->origin_x + origin_offset_x, key->origin_y,
+			shape->bounds.x2, shape->bounds.y2);
+}
+
+static void
+invalidate_region (CafekbdKeyboardDrawing * drawing,
+		   gdouble angle,
+		   gint origin_x, gint origin_y, XkbShapeRec * shape)
+{
+	CdkPoint points[4];
+	gint x_min, x_max, y_min, y_max;
+	gint x, y, width, height;
+	gint xx, yy;
+
+	rotate_coordinate (0, 0, 0, 0, angle, &xx, &yy);
+	points[0].x = xx;
+	points[0].y = yy;
+	rotate_coordinate (0, 0, shape->bounds.x2, 0, angle, &xx, &yy);
+	points[1].x = xx;
+	points[1].y = yy;
+	rotate_coordinate (0, 0, shape->bounds.x2, shape->bounds.y2, angle,
+			   &xx, &yy);
+	points[2].x = xx;
+	points[2].y = yy;
+	rotate_coordinate (0, 0, 0, shape->bounds.y2, angle, &xx, &yy);
+	points[3].x = xx;
+	points[3].y = yy;
+
+	x_min =
+	    MIN (MIN (points[0].x, points[1].x),
+		 MIN (points[2].x, points[3].x));
+	x_max =
+	    MAX (MAX (points[0].x, points[1].x),
+		 MAX (points[2].x, points[3].x));
+	y_min =
+	    MIN (MIN (points[0].y, points[1].y),
+		 MIN (points[2].y, points[3].y));
+	y_max =
+	    MAX (MAX (points[0].y, points[1].y),
+		 MAX (points[2].y, points[3].y));
+
+	x = xkb_to_pixmap_coord (drawing->renderContext,
+				 origin_x + x_min) - 6;
+	y = xkb_to_pixmap_coord (drawing->renderContext,
+				 origin_y + y_min) - 6;
+	width =
+	    xkb_to_pixmap_coord (drawing->renderContext,
+				 x_max - x_min) + 12;
+	height =
+	    xkb_to_pixmap_coord (drawing->renderContext,
+				 y_max - y_min) + 12;
+
+	ctk_widget_queue_draw_area (CTK_WIDGET (drawing), x, y, width,
+				    height);
+}
+
+static void
+invalidate_indicator_doodad_region (CafekbdKeyboardDrawing * drawing,
+				    CafekbdKeyboardDrawingDoodad * doodad)
+{
+	if (!drawing->xkb)
+		return;
+
+	invalidate_region (drawing,
+			   doodad->angle,
+			   doodad->origin_x +
+			   doodad->doodad->indicator.left,
+			   doodad->origin_y +
+			   doodad->doodad->indicator.top,
+			   &drawing->xkb->geom->shapes[doodad->
+						       doodad->indicator.shape_ndx]);
+}
+
+static void
+invalidate_key_region (CafekbdKeyboardDrawing * drawing,
+		       CafekbdKeyboardDrawingKey * key)
+{
+	if (!drawing->xkb)
+		return;
+
+	invalidate_region (drawing,
+			   key->angle,
+			   key->origin_x,
+			   key->origin_y,
+			   &drawing->xkb->geom->shapes[key->
+						       xkbkey->shape_ndx]);
+}
+
+static void
+draw_text_doodad (CafekbdKeyboardDrawingRenderContext * context,
+		  CafekbdKeyboardDrawing * drawing,
+		  CafekbdKeyboardDrawingDoodad * doodad,
+		  XkbTextDoodadRec * text_doodad)
+{
+	gint x, y;
+	if (!drawing->xkb)
+		return;
+
+	x = xkb_to_pixmap_coord (context,
+				 doodad->origin_x + text_doodad->left);
+	y = xkb_to_pixmap_coord (context,
+				 doodad->origin_y + text_doodad->top);
+
+	set_markup (context, text_doodad->text);
+	draw_pango_layout (context, drawing, doodad->angle, x, y);
+}
+
+static void
+draw_indicator_doodad (CafekbdKeyboardDrawingRenderContext * context,
+		       CafekbdKeyboardDrawing * drawing,
+		       CafekbdKeyboardDrawingDoodad * doodad,
+		       XkbIndicatorDoodadRec * indicator_doodad)
+{
+	CdkRGBA *color;
+	XkbShapeRec *shape;<--- Variable 'shape' can be declared as pointer to const
+	gint i;
+
+	if (!drawing->xkb)
+		return;
+
+	shape = drawing->xkb->geom->shapes + indicator_doodad->shape_ndx;
+
+	color = drawing->colors + (doodad->on ?
+				   indicator_doodad->on_color_ndx :
+				   indicator_doodad->off_color_ndx);
+
+	for (i = 0; i < 1; i++)
+		draw_outline (context, shape->outlines + i, color,
+			      doodad->angle,
+			      doodad->origin_x + indicator_doodad->left,
+			      doodad->origin_y + indicator_doodad->top);
+}
+
+static void
+draw_shape_doodad (CafekbdKeyboardDrawingRenderContext * context,
+		   CafekbdKeyboardDrawing * drawing,
+		   CafekbdKeyboardDrawingDoodad * doodad,
+		   XkbShapeDoodadRec * shape_doodad)
+{
+	XkbShapeRec *shape;
+	CdkRGBA *color;
+	gint i;
+
+	if (!drawing->xkb)
+		return;
+
+	shape = drawing->xkb->geom->shapes + shape_doodad->shape_ndx;
+	color = drawing->colors + shape_doodad->color_ndx;
+
+	/* draw the primary outline filled */
+	draw_outline (context,
+		      shape->primary ? shape->primary : shape->outlines,
+		      color, doodad->angle,
+		      doodad->origin_x + shape_doodad->left,
+		      doodad->origin_y + shape_doodad->top);
+
+	/* stroke the other outlines */
+	for (i = 0; i < shape->num_outlines; i++) {
+		if (shape->outlines + i == shape->approx ||
+		    shape->outlines + i == shape->primary)
+			continue;
+		draw_outline (context, shape->outlines + i, NULL,
+			      doodad->angle,
+			      doodad->origin_x + shape_doodad->left,
+			      doodad->origin_y + shape_doodad->top);
+	}
+}
+
+static void
+draw_doodad (CafekbdKeyboardDrawingRenderContext * context,
+	     CafekbdKeyboardDrawing * drawing,
+	     CafekbdKeyboardDrawingDoodad * doodad)
+{
+	switch (doodad->doodad->any.type) {
+	case XkbOutlineDoodad:
+	case XkbSolidDoodad:
+		draw_shape_doodad (context, drawing, doodad,
+				   &doodad->doodad->shape);
+		break;
+
+	case XkbTextDoodad:
+		draw_text_doodad (context, drawing, doodad,
+				  &doodad->doodad->text);
+		break;
+
+	case XkbIndicatorDoodad:
+		draw_indicator_doodad (context, drawing, doodad,
+				       &doodad->doodad->indicator);
+		break;
+
+	case XkbLogoDoodad:
+		/* g_print ("draw_doodad: logo: %s\n", doodad->doodad->logo.logo_name); */
+		/* XkbLogoDoodadRec is essentially a subclass of XkbShapeDoodadRec */
+		draw_shape_doodad (context, drawing, doodad,
+				   &doodad->doodad->shape);
+		break;
+	}
+}
+
+typedef struct {
+	CafekbdKeyboardDrawing *drawing;
+	CafekbdKeyboardDrawingRenderContext *context;
+} DrawKeyboardItemData;
+
+static void
+redraw_overlapping_doodads (CafekbdKeyboardDrawingRenderContext * context,
+			    CafekbdKeyboardDrawing * drawing,
+			    const CafekbdKeyboardDrawingKey * key)
+{
+	GList *list;
+	gboolean do_draw = FALSE;
+
+	for (list = drawing->keyboard_items; list; list = list->next) {
+		CafekbdKeyboardDrawingItem *item = list->data;
+
+		if (do_draw
+		    && item->type ==
+		    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD)
+			draw_doodad (context, drawing,
+				     (CafekbdKeyboardDrawingDoodad *) item);
+
+		if (list->data == key)
+			do_draw = TRUE;
+	}
+}
+
+static void
+draw_keyboard_item (CafekbdKeyboardDrawingItem * item,
+		    DrawKeyboardItemData * data)
+{
+	CafekbdKeyboardDrawing *drawing = data->drawing;
+	CafekbdKeyboardDrawingRenderContext *context = data->context;
+
+	if (!drawing->xkb)
+		return;
+
+	switch (item->type) {
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_INVALID:
+		break;
+
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY:
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA:
+		draw_key (context, drawing,
+			  (CafekbdKeyboardDrawingKey *) item);
+		break;
+
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD:
+		draw_doodad (context, drawing,
+			     (CafekbdKeyboardDrawingDoodad *) item);
+		break;
+	}
+}
+
+static void
+draw_keyboard_to_context (CafekbdKeyboardDrawingRenderContext * context,
+			  CafekbdKeyboardDrawing * drawing)
+{
+	DrawKeyboardItemData data = { drawing, context };
+#ifdef KBDRAW_DEBUG
+	printf ("mods: %d\n", drawing->mods);
+#endif
+	g_list_foreach (drawing->keyboard_items,
+			(GFunc) draw_keyboard_item, &data);
+}
+
+static gboolean
+create_cairo (CafekbdKeyboardDrawing * drawing)
+{
+	CtkStyleContext *style_context = NULL;
+	CtkStateFlags state;
+	CdkRGBA dark_color;
+
+	if (drawing == NULL)
+		return FALSE;
+	if (drawing->surface == NULL)
+		return FALSE;
+
+	drawing->renderContext->cr =
+	    cairo_create (drawing->surface);
+
+	style_context = ctk_widget_get_style_context (CTK_WIDGET (drawing));
+	state = ctk_style_context_get_state (style_context);
+
+	ctk_style_context_get_background_color (style_context, state,
+	                                        &dark_color);
+	/* make dark background by making regular background darker */
+	dark_color.red *= 0.7;
+	dark_color.green *= 0.7;
+	dark_color.blue *= 0.7;
+
+	drawing->renderContext->dark_color = dark_color;
+
+	return TRUE;
+}
+
+static void
+destroy_cairo (CafekbdKeyboardDrawing * drawing)
+{
+	cairo_destroy (drawing->renderContext->cr);
+	drawing->renderContext->cr = NULL;
+}
+
+static void
+draw_keyboard (CafekbdKeyboardDrawing * drawing)
+{
+        CtkStyleContext *context =
+	    ctk_widget_get_style_context (CTK_WIDGET (drawing));
+	CtkStateFlags state = ctk_style_context_get_state (context);
+	CdkRGBA color;
+	CtkAllocation allocation;
+
+	if (!drawing->xkb)
+		return;
+
+	ctk_widget_get_allocation (CTK_WIDGET (drawing), &allocation);
+
+	drawing->surface =
+	    cdk_window_create_similar_surface (ctk_widget_get_window
+					       (CTK_WIDGET (drawing)),
+					       CAIRO_CONTENT_COLOR,
+					       allocation.width,
+					       allocation.height);
+
+	if (create_cairo (drawing)) {
+		/* blank background */
+		ctk_style_context_save (context);
+		ctk_style_context_add_class (context, CTK_STYLE_CLASS_VIEW);
+		ctk_style_context_get_background_color (context, state, &color);
+		ctk_style_context_restore (context);
+		cdk_cairo_set_source_rgba (drawing->renderContext->cr, &color);
+		cairo_paint (drawing->renderContext->cr);
+
+		draw_keyboard_to_context (drawing->renderContext, drawing);
+		destroy_cairo (drawing);
+	}
+}
+
+static void
+alloc_render_context (CafekbdKeyboardDrawing * drawing)
+{
+	CafekbdKeyboardDrawingRenderContext *context =
+	    drawing->renderContext =
+	    g_new0 (CafekbdKeyboardDrawingRenderContext, 1);
+
+	PangoContext *pangoContext =
+	    ctk_widget_get_pango_context (CTK_WIDGET (drawing));
+
+	CtkStyleContext *style_context =
+	    ctk_widget_get_style_context (CTK_WIDGET (drawing));
+	PangoFontDescription *fd = NULL;
+
+	ctk_style_context_get (style_context,
+	                       ctk_style_context_get_state (style_context),
+	                       CTK_STYLE_PROPERTY_FONT, &fd, NULL);
+
+	context->layout = pango_layout_new (pangoContext);
+	pango_layout_set_ellipsize (context->layout, PANGO_ELLIPSIZE_END);
+
+	context->font_desc = pango_font_description_copy (fd);
+	context->angle = 0;
+	context->scale_numerator = 1;
+	context->scale_denominator = 1;
+}
+
+static void
+free_render_context (CafekbdKeyboardDrawing * drawing)
+{
+	CafekbdKeyboardDrawingRenderContext *context = drawing->renderContext;
+	g_object_unref (G_OBJECT (context->layout));
+	pango_font_description_free (context->font_desc);
+
+	g_free (drawing->renderContext);
+	drawing->renderContext = NULL;
+}
+
+static gboolean
+draw (CtkWidget              *widget G_GNUC_UNUSED,
+      cairo_t                *cr,
+      CafekbdKeyboardDrawing *drawing)
+{
+	if (!drawing->xkb)
+		return FALSE;
+
+	if (drawing->surface == NULL)
+		return FALSE;
+
+	cairo_set_source_surface (cr, drawing->surface, 0, 0);
+	cairo_paint (cr);
+
+	return FALSE;
+}
+
+static gboolean
+idle_redraw (gpointer user_data)
+{
+	CafekbdKeyboardDrawing *drawing = user_data;
+
+	drawing->idle_redraw = 0;
+	draw_keyboard (drawing);
+	ctk_widget_queue_draw (CTK_WIDGET (drawing));
+	return FALSE;
+}
+
+static gboolean
+context_setup_scaling (CafekbdKeyboardDrawingRenderContext * context,
+		       CafekbdKeyboardDrawing * drawing,
+		       gdouble width, gdouble height,
+		       gdouble dpi_x, gdouble dpi_y)
+{
+	if (!drawing->xkb)
+		return FALSE;
+
+	if (drawing->xkb->geom->width_mm <= 0
+	    || drawing->xkb->geom->height_mm <= 0) {
+		g_critical
+		    ("keyboard geometry reports width or height as zero!");
+		return FALSE;
+	}
+
+	if (width * drawing->xkb->geom->height_mm <
+	    height * drawing->xkb->geom->width_mm) {
+		context->scale_numerator = width;
+		context->scale_denominator = drawing->xkb->geom->width_mm;
+	} else {
+		context->scale_numerator = height;
+		context->scale_denominator = drawing->xkb->geom->height_mm;
+	}
+
+	pango_font_description_set_size (context->font_desc,
+					 72 * KEY_FONT_SIZE * dpi_x *
+					 context->scale_numerator /
+					 context->scale_denominator);
+	pango_layout_set_spacing (context->layout,
+				  -160 * dpi_y * context->scale_numerator /
+				  context->scale_denominator);
+	pango_layout_set_font_description (context->layout,
+					   context->font_desc);
+
+	return TRUE;
+}
+
+static void
+size_allocate (CtkWidget              *widget G_GNUC_UNUSED,
+	       CtkAllocation          *allocation,
+	       CafekbdKeyboardDrawing *drawing)
+{
+	CafekbdKeyboardDrawingRenderContext *context = drawing->renderContext;
+
+	if (drawing->surface) {
+		cairo_surface_destroy (drawing->surface);
+		drawing->surface = NULL;
+	}
+
+	if (!context_setup_scaling (context, drawing,
+				    allocation->width, allocation->height,
+				    50, 50))
+		return;
+
+	if (!drawing->idle_redraw)
+		drawing->idle_redraw = g_idle_add (idle_redraw, drawing);
+}
+
+static gint
+key_event (CtkWidget              *widget G_GNUC_UNUSED,
+	   CdkEventKey            *event,
+	   CafekbdKeyboardDrawing *drawing)
+{
+	CafekbdKeyboardDrawingKey *key;
+	if (!drawing->xkb)
+		return FALSE;
+
+	key = drawing->keys + event->hardware_keycode;
+
+	if (event->hardware_keycode > drawing->xkb->max_key_code ||
+	    event->hardware_keycode < drawing->xkb->min_key_code ||
+	    key->xkbkey == NULL) {
+		g_signal_emit (drawing,
+			       cafekbd_keyboard_drawing_signals[BAD_KEYCODE],
+			       0, event->hardware_keycode);
+		return TRUE;
+	}
+
+	if ((event->type == CDK_KEY_PRESS && key->pressed) ||
+	    (event->type == CDK_KEY_RELEASE && !key->pressed))
+		return TRUE;
+	/* otherwise this event changes the state we believed we had before */
+
+	key->pressed = (event->type == CDK_KEY_PRESS);
+
+	if (create_cairo (drawing)) {
+		draw_key (drawing->renderContext, drawing, key);
+		redraw_overlapping_doodads (drawing->renderContext,
+					    drawing, key);
+		destroy_cairo (drawing);
+	}
+
+	invalidate_key_region (drawing, key);
+	return TRUE;
+}
+
+static gint
+button_press_event (CtkWidget              *widget,
+		    CdkEventButton         *event G_GNUC_UNUSED,
+		    CafekbdKeyboardDrawing *drawing)<--- Parameter 'drawing' can be declared as pointer to const
+{
+	if (!drawing->xkb)
+		return FALSE;
+
+	ctk_widget_grab_focus (widget);
+	return FALSE;
+}
+
+static gboolean
+unpress_keys (CafekbdKeyboardDrawing * drawing)
+{
+	gint i;
+
+	drawing->timeout = 0;
+
+	if (!drawing->xkb)
+		return FALSE;
+
+	if (create_cairo (drawing)) {
+		for (i = drawing->xkb->min_key_code;
+		     i <= drawing->xkb->max_key_code; i++)
+			if (drawing->keys[i].pressed) {
+				drawing->keys[i].pressed = FALSE;
+				draw_key (drawing->renderContext, drawing,
+					  drawing->keys + i);
+				invalidate_key_region (drawing,
+						       drawing->keys + i);
+			}
+		destroy_cairo (drawing);
+	}
+
+	return FALSE;
+}
+
+static gint
+focus_event (CtkWidget              *widget G_GNUC_UNUSED,
+	     CdkEventFocus          *event,<--- Parameter 'event' can be declared as pointer to const
+	     CafekbdKeyboardDrawing *drawing)
+{
+	if (event->in && drawing->timeout > 0) {
+		g_source_remove (drawing->timeout);
+		drawing->timeout = 0;
+	} else if (drawing->timeout == 0)
+		drawing->timeout =
+		    g_timeout_add (120, (GSourceFunc) unpress_keys,
+				   drawing);
+
+	return FALSE;
+}
+
+static gint
+compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a,<--- Parameter 'a' can be declared as pointer to const
+				  CafekbdKeyboardDrawingItem * b)<--- Parameter 'b' can be declared as pointer to const
+{
+	if (a->priority > b->priority)
+		return 1;
+	else if (a->priority < b->priority)
+		return -1;
+	else
+		return 0;
+}
+
+static void
+init_indicator_doodad (CafekbdKeyboardDrawing * drawing,
+		       XkbDoodadRec * xkbdoodad,
+		       CafekbdKeyboardDrawingDoodad * doodad)
+{
+	if (!drawing->xkb)
+		return;
+
+	if (xkbdoodad->any.type == XkbIndicatorDoodad) {
+		gint index;
+		Atom iname = 0;
+		Atom sname = xkbdoodad->indicator.name;
+		unsigned long phys_indicators =
+		    drawing->xkb->indicators->phys_indicators;
+		Atom *pind = drawing->xkb->names->indicators;<--- Variable 'pind' can be declared as pointer to const
+
+#ifdef KBDRAW_DEBUG
+		printf ("Looking for %d[%s]\n",
+			(int) sname, XGetAtomName (drawing->display,
+						   sname));
+#endif
+
+		for (index = 0; index < XkbNumIndicators; index++) {
+			iname = *pind++;
+			/* name matches and it is real */
+			if (iname == sname
+			    && (phys_indicators & (1 << index)))
+				break;
+			if (iname == 0)
+				break;
+		}
+		if (iname == 0)
+			g_warning ("Could not find indicator %d [%s]\n",
+				   (int) sname,
+				   XGetAtomName (drawing->display, sname));
+		else {
+#ifdef KBDRAW_DEBUG
+			printf ("Found in xkbdesc as %d\n", index);
+#endif
+			drawing->physical_indicators[index] = doodad;
+			/* Trying to obtain the real state, but if fail - just assume OFF */
+			if (!XkbGetNamedIndicator
+			    (drawing->display, sname, NULL, &doodad->on,
+			     NULL, NULL))
+				doodad->on = 0;
+		}
+	}
+}
+
+static void
+init_keys_and_doodads (CafekbdKeyboardDrawing * drawing)
+{
+	gint i, j, k;
+	gint x, y;
+
+	if (!drawing->xkb)
+		return;
+
+	for (i = 0; i < drawing->xkb->geom->num_doodads; i++) {
+		XkbDoodadRec *xkbdoodad = drawing->xkb->geom->doodads + i;
+		CafekbdKeyboardDrawingDoodad *doodad =
+		    g_new (CafekbdKeyboardDrawingDoodad, 1);
+
+		doodad->type = CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD;
+		doodad->origin_x = 0;
+		doodad->origin_y = 0;
+		doodad->angle = 0;
+		doodad->priority = xkbdoodad->any.priority * 256 * 256;
+		doodad->doodad = xkbdoodad;
+
+		init_indicator_doodad (drawing, xkbdoodad, doodad);
+
+		drawing->keyboard_items =
+		    g_list_append (drawing->keyboard_items, doodad);
+	}
+
+	for (i = 0; i < drawing->xkb->geom->num_sections; i++) {
+		XkbSectionRec *section = drawing->xkb->geom->sections + i;
+		guint priority;
+
+#ifdef KBDRAW_DEBUG
+		printf ("initing section %d containing %d rows\n", i,
+			section->num_rows);
+#endif
+		x = section->left;
+		y = section->top;
+		priority = section->priority * 256 * 256;
+
+		for (j = 0; j < section->num_rows; j++) {
+			XkbRowRec *row = section->rows + j;
+
+#ifdef KBDRAW_DEBUG
+			printf ("  initing row %d\n", j);
+#endif
+			x = section->left + row->left;
+			y = section->top + row->top;
+
+			for (k = 0; k < row->num_keys; k++) {
+				XkbKeyRec *xkbkey = row->keys + k;
+				CafekbdKeyboardDrawingKey *key;
+				XkbShapeRec *shape =
+				    drawing->xkb->geom->shapes +
+				    xkbkey->shape_ndx;
+				guint keycode = find_keycode (drawing,
+							      xkbkey->
+							      name.name);
+
+				if (keycode == INVALID_KEYCODE)
+					continue;
+#ifdef KBDRAW_DEBUG
+				printf
+				    ("    initing key %d, shape: %p(%p + %d), code: %u\n",
+				     k, shape, drawing->xkb->geom->shapes,
+				     xkbkey->shape_ndx, keycode);
+#endif
+				if (row->vertical)
+					y += xkbkey->gap;
+				else
+					x += xkbkey->gap;
+
+				if (keycode >= drawing->xkb->min_key_code
+				    && keycode <=
+				    drawing->xkb->max_key_code) {
+					key = drawing->keys + keycode;
+					if (key->type ==
+					    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_INVALID)
+					{
+						key->type =
+						    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY;
+					} else {
+						/* duplicate key for the same keycode,
+						   already defined as CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY */
+						key =
+						    g_new0
+						    (CafekbdKeyboardDrawingKey,
+						     1);
+						key->type =
+						    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA;
+					}
+				} else {
+					g_warning
+					    ("key %4.4s: keycode = %u; not in range %d..%d\n",
+					     xkbkey->name.name, keycode,
+					     drawing->xkb->min_key_code,
+					     drawing->xkb->max_key_code);
+
+					key =
+					    g_new0 (CafekbdKeyboardDrawingKey,
+						    1);
+					key->type =
+					    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA;
+				}
+
+				key->xkbkey = xkbkey;
+				key->angle = section->angle;
+				rotate_coordinate (section->left,
+						   section->top, x, y,
+						   section->angle,
+						   &key->origin_x,
+						   &key->origin_y);
+				key->priority = priority;
+				key->keycode = keycode;
+
+				drawing->keyboard_items =
+				    g_list_append (drawing->keyboard_items,
+						   key);
+
+				if (row->vertical)
+					y += shape->bounds.y2;
+				else
+					x += shape->bounds.x2;
+
+				priority++;
+			}
+		}
+
+		for (j = 0; j < section->num_doodads; j++) {
+			XkbDoodadRec *xkbdoodad = section->doodads + j;
+			CafekbdKeyboardDrawingDoodad *doodad =
+			    g_new (CafekbdKeyboardDrawingDoodad, 1);
+
+			doodad->type =
+			    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD;
+			doodad->origin_x = x;
+			doodad->origin_y = y;
+			doodad->angle = section->angle;
+			doodad->priority =
+			    priority + xkbdoodad->any.priority;
+			doodad->doodad = xkbdoodad;
+
+			init_indicator_doodad (drawing, xkbdoodad, doodad);
+
+			drawing->keyboard_items =
+			    g_list_append (drawing->keyboard_items,
+					   doodad);
+		}
+	}
+
+	drawing->keyboard_items = g_list_sort (drawing->keyboard_items,
+					       (GCompareFunc)
+					       compare_keyboard_item_priorities);<--- You might need to cast the function pointer here<--- You might need to cast the function pointer here
+}
+
+static void
+init_colors (CafekbdKeyboardDrawing * drawing)
+{
+	gboolean result;
+	gint i;
+
+	if (!drawing->xkb)
+		return;
+
+	drawing->colors = g_new (CdkRGBA, drawing->xkb->geom->num_colors);
+
+	for (i = 0; i < drawing->xkb->geom->num_colors; i++) {
+		result =
+		    parse_xkb_color_spec (drawing->xkb->geom->
+					  colors[i].spec,
+					  drawing->colors + i);
+
+		if (!result)
+			g_warning
+			    ("init_colors: unable to parse color %s\n",
+			     drawing->xkb->geom->colors[i].spec);
+	}
+}
+
+static void
+free_cdik (			/*colors doodads indicators keys */
+		  CafekbdKeyboardDrawing * drawing)
+{
+	GList *itemp;
+
+	if (!drawing->xkb)
+		return;
+
+	for (itemp = drawing->keyboard_items; itemp; itemp = itemp->next) {
+		CafekbdKeyboardDrawingItem *item = itemp->data;
+
+		switch (item->type) {
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_INVALID:
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY:
+			break;
+
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA:
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD:
+			g_free (item);
+			break;
+		}
+	}
+
+	g_list_free (drawing->keyboard_items);
+	drawing->keyboard_items = NULL;
+
+	g_free (drawing->keys);
+	g_free (drawing->colors);
+}
+
+static void
+alloc_cdik (CafekbdKeyboardDrawing * drawing)
+{
+	if (!drawing->xkb)
+		return;
+
+	drawing->physical_indicators_size =
+	    drawing->xkb->indicators->phys_indicators + 1;
+	drawing->physical_indicators =
+	    g_new0 (CafekbdKeyboardDrawingDoodad *,
+		    drawing->physical_indicators_size);
+	drawing->keys =
+	    g_new0 (CafekbdKeyboardDrawingKey,
+		    drawing->xkb->max_key_code + 1);
+}
+
+static void
+process_indicators_state_notify (XkbIndicatorNotifyEvent * iev,<--- Parameter 'iev' can be declared as pointer to const
+				 CafekbdKeyboardDrawing * drawing)
+{
+	/* Good question: should we track indicators when the keyboard is
+	   NOT really taken from the screen */
+	gint i;
+
+	for (i = 0; i <= drawing->xkb->indicators->phys_indicators; i++)
+		if (drawing->physical_indicators[i] != NULL
+		    && (iev->changed & 1 << i)) {
+			gint state = (iev->state & 1 << i) != FALSE;
+
+			if ((state && !drawing->physical_indicators[i]->on)
+			    || (!state
+				&& drawing->physical_indicators[i]->on)) {
+				drawing->physical_indicators[i]->on =
+				    state;
+				if (create_cairo (drawing)) {
+					draw_doodad
+					    (drawing->renderContext,
+					     drawing,
+					     drawing->physical_indicators
+					     [i]);
+					destroy_cairo (drawing);
+				}
+				invalidate_indicator_doodad_region
+				    (drawing,
+				     drawing->physical_indicators[i]);
+			}
+		}
+}
+
+static CdkFilterReturn
+xkb_state_notify_event_filter (CdkXEvent              *cdkxev,
+			       CdkEvent               *event G_GNUC_UNUSED,
+			       CafekbdKeyboardDrawing *drawing)
+{
+#define modifier_change_mask (XkbModifierStateMask | XkbModifierBaseMask | XkbModifierLatchMask | XkbModifierLockMask)
+
+	if (!drawing->xkb)
+		return CDK_FILTER_CONTINUE;
+
+	if (((XEvent *) cdkxev)->type == drawing->xkb_event_type) {
+		XkbEvent *kev = (XkbEvent *) cdkxev;
+		CtkAllocation allocation;
+		switch (kev->any.xkb_type) {
+		case XkbStateNotify:
+			if (((kev->state.changed & modifier_change_mask) &&
+			     drawing->track_modifiers)) {
+				free_cdik (drawing);
+				if (drawing->track_modifiers)
+					cafekbd_keyboard_drawing_set_mods
+					    (drawing,
+					     kev->state.compat_state);
+				drawing->keys =
+				    g_new0 (CafekbdKeyboardDrawingKey,
+					    drawing->xkb->max_key_code +
+					    1);
+
+				ctk_widget_get_allocation (CTK_WIDGET
+							   (drawing),
+							   &allocation);
+				size_allocate (CTK_WIDGET (drawing),
+					       &allocation, drawing);
+
+				init_keys_and_doodads (drawing);
+				init_colors (drawing);
+			}
+			break;
+
+		case XkbIndicatorStateNotify:
+			{
+				process_indicators_state_notify (&
+								 ((XkbEvent
+								   *)
+								  cdkxev)->indicators,
+drawing);
+			}
+			break;
+
+		case XkbIndicatorMapNotify:
+		case XkbControlsNotify:
+		case XkbNamesNotify:
+		case XkbNewKeyboardNotify:
+			{
+				XkbStateRec state;
+				memset (&state, 0, sizeof (state));
+				XkbGetState (drawing->display,
+					     XkbUseCoreKbd, &state);
+				if (drawing->track_modifiers)
+					cafekbd_keyboard_drawing_set_mods
+					    (drawing, state.compat_state);
+				if (drawing->track_config)
+					cafekbd_keyboard_drawing_set_keyboard
+					    (drawing, NULL);
+			}
+			break;
+		}
+	}
+
+	return CDK_FILTER_CONTINUE;
+}
+
+static void
+destroy (CafekbdKeyboardDrawing * drawing)
+{
+	free_render_context (drawing);
+	cdk_window_remove_filter (NULL, (CdkFilterFunc)
+				  xkb_state_notify_event_filter, drawing);
+	if (drawing->timeout > 0) {
+		g_source_remove (drawing->timeout);
+		drawing->timeout = 0;
+	}
+	if (drawing->idle_redraw > 0) {
+		g_source_remove (drawing->idle_redraw);
+		drawing->idle_redraw = 0;
+	}
+
+	if (drawing->surface != NULL) {
+		cairo_surface_destroy (drawing->surface);
+	}
+}
+
+static void
+style_changed (CafekbdKeyboardDrawing * drawing)
+{
+	pango_layout_context_changed (drawing->renderContext->layout);
+}
+
+static void
+cafekbd_keyboard_drawing_init (CafekbdKeyboardDrawing * drawing)
+{
+	gint opcode = 0, error = 0, major = 1, minor = 0;
+	gint mask;
+
+	drawing->display = CDK_DISPLAY_XDISPLAY(cdk_display_get_default());
+
+	printf ("dpy: %p\n", (void *) drawing->display);
+
+	if (!XkbQueryExtension
+	    (drawing->display, &opcode, &drawing->xkb_event_type, &error,
+	     &major, &minor))
+		g_critical
+		    ("XkbQueryExtension failed! Stuff probably won't work.");
+
+	printf ("evt/error/major/minor: %d/%d/%d/%d\n",
+		drawing->xkb_event_type, error, major, minor);
+
+	/* XXX: this stuff probably doesn't matter.. also, cdk_screen_get_default can fail */
+	if (ctk_widget_has_screen (CTK_WIDGET (drawing)))
+		drawing->screen_num =
+		    cdk_x11_screen_get_screen_number (ctk_widget_get_screen
+					   (CTK_WIDGET (drawing)));
+	else
+		drawing->screen_num =
+		    cdk_x11_screen_get_screen_number (cdk_screen_get_default ());
+
+	drawing->surface = NULL;
+	alloc_render_context (drawing);
+
+	drawing->keyboard_items = NULL;
+	drawing->colors = NULL;
+
+	drawing->track_modifiers = 0;
+	drawing->track_config = 0;
+
+	/* XXX: XkbClientMapMask | XkbIndicatorMapMask | XkbNamesMask | XkbGeometryMask */
+	drawing->xkb = XkbGetKeyboard (drawing->display,
+				       XkbGBN_GeometryMask |
+				       XkbGBN_KeyNamesMask |
+				       XkbGBN_OtherNamesMask |
+				       XkbGBN_SymbolsMask |
+				       XkbGBN_IndicatorMapMask,
+				       XkbUseCoreKbd);
+	if (drawing->xkb) {
+		XkbGetNames (drawing->display, XkbAllNamesMask, drawing->xkb);
+		XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+				       XkbIndicatorStateNotify,
+				       drawing->xkb->indicators->phys_indicators,
+				       drawing->xkb->indicators->phys_indicators);
+	}
+
+	drawing->l3mod = XkbKeysymToModifiers (drawing->display,
+					       CDK_KEY_ISO_Level3_Shift);
+
+	drawing->xkbOnDisplay = TRUE;
+
+	alloc_cdik (drawing);
+
+	mask =
+	    (XkbStateNotifyMask | XkbNamesNotifyMask |
+	     XkbControlsNotifyMask | XkbIndicatorMapNotifyMask |
+	     XkbNewKeyboardNotifyMask);
+	XkbSelectEvents (drawing->display, XkbUseCoreKbd, mask, mask);
+
+	mask = XkbGroupStateMask | XkbModifierStateMask;
+	XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+			       XkbStateNotify, mask, mask);
+
+	mask = (XkbGroupNamesMask | XkbIndicatorNamesMask);
+	XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+			       XkbNamesNotify, mask, mask);
+	init_keys_and_doodads (drawing);
+	init_colors (drawing);
+
+	/* required to get key events */
+	ctk_widget_set_can_focus (CTK_WIDGET (drawing), TRUE);
+
+	ctk_widget_set_events (CTK_WIDGET (drawing),
+			       CDK_EXPOSURE_MASK | CDK_KEY_PRESS_MASK |
+			       CDK_KEY_RELEASE_MASK | CDK_BUTTON_PRESS_MASK
+			       | CDK_FOCUS_CHANGE_MASK);
+	g_signal_connect (G_OBJECT (drawing), "draw",
+			  G_CALLBACK (draw), drawing);
+	g_signal_connect_after (G_OBJECT (drawing), "key-press-event",
+				G_CALLBACK (key_event), drawing);
+	g_signal_connect_after (G_OBJECT (drawing), "key-release-event",
+				G_CALLBACK (key_event), drawing);
+	g_signal_connect (G_OBJECT (drawing), "button-press-event",
+			  G_CALLBACK (button_press_event), drawing);<--- You might need to cast the function pointer here
+	g_signal_connect (G_OBJECT (drawing), "focus-out-event",
+			  G_CALLBACK (focus_event), drawing);
+	g_signal_connect (G_OBJECT (drawing), "focus-in-event",
+			  G_CALLBACK (focus_event), drawing);<--- You might need to cast the function pointer here
+	g_signal_connect (G_OBJECT (drawing), "size-allocate",
+			  G_CALLBACK (size_allocate), drawing);
+	g_signal_connect (G_OBJECT (drawing), "destroy",
+			  G_CALLBACK (destroy), drawing);
+	g_signal_connect (G_OBJECT (drawing), "style-set",
+			  G_CALLBACK (style_changed), drawing);
+
+	cdk_window_add_filter (NULL, (CdkFilterFunc)
+			       xkb_state_notify_event_filter, drawing);
+}
+
+CtkWidget *
+cafekbd_keyboard_drawing_new (void)
+{
+	return
+	    CTK_WIDGET (g_object_new
+			(cafekbd_keyboard_drawing_get_type (), NULL));
+}
+
+static void
+cafekbd_keyboard_drawing_class_init (CafekbdKeyboardDrawingClass * klass)
+{
+	CtkWidgetClass *widget_class = CTK_WIDGET_CLASS (klass);
+	ctk_widget_class_set_css_name (widget_class, "cafekbd-keyboard-drawing");
+
+	klass->bad_keycode = NULL;
+
+	cafekbd_keyboard_drawing_signals[BAD_KEYCODE] =
+	    g_signal_new ("bad-keycode", cafekbd_keyboard_drawing_get_type (),
+			  G_SIGNAL_RUN_FIRST,
+			  G_STRUCT_OFFSET (CafekbdKeyboardDrawingClass,
+					   bad_keycode), NULL, NULL,
+			  cafekbd_keyboard_drawing_VOID__UINT, G_TYPE_NONE, 1,
+			  G_TYPE_UINT);
+}
+
+GType
+cafekbd_keyboard_drawing_get_type (void)
+{
+	static GType cafekbd_keyboard_drawing_type = 0;
+
+	if (!cafekbd_keyboard_drawing_type) {
+		static const GTypeInfo cafekbd_keyboard_drawing_info = {
+			sizeof (CafekbdKeyboardDrawingClass),
+			NULL,	/* base_init */
+			NULL,	/* base_finalize */
+			(GClassInitFunc) cafekbd_keyboard_drawing_class_init,
+			NULL,	/* class_finalize */
+			NULL,	/* class_data */
+			sizeof (CafekbdKeyboardDrawing),
+			0,	/* n_preallocs */
+			(GInstanceInitFunc) cafekbd_keyboard_drawing_init,
+			NULL	/* *value_table */
+		};
+
+		cafekbd_keyboard_drawing_type =
+		    g_type_register_static (CTK_TYPE_DRAWING_AREA,
+					    "CafekbdKeyboardDrawing",
+					    &cafekbd_keyboard_drawing_info,
+					    0);
+	}
+
+	return cafekbd_keyboard_drawing_type;
+}
+
+void
+cafekbd_keyboard_drawing_set_mods (CafekbdKeyboardDrawing * drawing, guint mods)
+{
+#ifdef KBDRAW_DEBUG
+	printf ("set_mods: %d\n", mods);
+#endif
+	if (mods != drawing->mods) {
+		drawing->mods = mods;
+		ctk_widget_queue_draw (CTK_WIDGET (drawing));
+	}
+}
+
+/**
+ * cafekbd_keyboard_drawing_render:
+ * @kbdrawing: keyboard layout to render
+ * @cr:        Cairo context to render to
+ * @layout:    Pango layout to use to render text
+ * @x:         left coordinate (pixels) of region to render in
+ * @y:         top coordinate (pixels) of region to render in
+ * @width:     width (pixels) of region to render in
+ * @height:    height (pixels) of region to render in
+ *
+ * Renders a keyboard layout to a cairo_t context.  @cr and @layout can be got
+ * from e.g. a CtkWidget or a CtkPrintContext.  @cr and @layout may be modified
+ * by the function but will not be unreffed.
+ *
+ * Returns: %TRUE on success, %FALSE on failure
+ */
+gboolean
+cafekbd_keyboard_drawing_render (CafekbdKeyboardDrawing * kbdrawing,
+			      cairo_t * cr,
+			      PangoLayout * layout,
+			      double x, double y,
+			      double width, double height,
+			      double dpi_x, double dpi_y)
+{
+	CtkStyleContext *style_context =
+	    ctk_widget_get_style_context (CTK_WIDGET (kbdrawing));
+	CdkRGBA dark_color;
+	PangoFontDescription *fd = NULL;
+
+	ctk_style_context_get_background_color (style_context,
+	                                        ctk_style_context_get_state (style_context),
+	                                        &dark_color);
+	/* make dark background by making regular background darker */
+	dark_color.red *= 0.7;
+	dark_color.green *= 0.7;
+	dark_color.blue *= 0.7;
+
+	ctk_style_context_get (style_context,
+	                       ctk_style_context_get_state (style_context),
+	                       CTK_STYLE_PROPERTY_FONT, &fd, NULL);
+	fd = pango_font_description_copy (fd);
+
+	CafekbdKeyboardDrawingRenderContext context = {
+		cr,
+		kbdrawing->renderContext->angle,
+		layout,
+		pango_font_description_copy (fd),
+		1, 1,
+		dark_color
+	};
+
+	if (!context_setup_scaling (&context, kbdrawing, width, height,
+	                            dpi_x, dpi_y))
+		return FALSE;
+	cairo_translate (cr, x, y);
+
+	draw_keyboard_to_context (&context, kbdrawing);
+
+	pango_font_description_free (fd);
+
+	return TRUE;
+}
+
+/**
+ * cafekbd_keyboard_drawing_set_keyboard: (skip)
+ */
+gboolean
+cafekbd_keyboard_drawing_set_keyboard (CafekbdKeyboardDrawing * drawing,
+				    XkbComponentNamesRec * names)
+{
+	CtkAllocation allocation;
+
+	free_cdik (drawing);
+	if (drawing->xkb)
+		XkbFreeKeyboard (drawing->xkb, 0, TRUE);	/* free_all = TRUE */
+	drawing->xkb = NULL;
+
+	if (names) {
+		drawing->xkb =
+		    XkbGetKeyboardByName (drawing->display, XkbUseCoreKbd,
+					  names, 0,
+					  XkbGBN_GeometryMask |
+					  XkbGBN_KeyNamesMask |
+					  XkbGBN_OtherNamesMask |
+					  XkbGBN_ClientSymbolsMask |
+					  XkbGBN_IndicatorMapMask, FALSE);
+		drawing->xkbOnDisplay = FALSE;
+	} else {
+		drawing->xkb = XkbGetKeyboard (drawing->display,
+					       XkbGBN_GeometryMask |
+					       XkbGBN_KeyNamesMask |
+					       XkbGBN_OtherNamesMask |
+					       XkbGBN_SymbolsMask |
+					       XkbGBN_IndicatorMapMask,
+					       XkbUseCoreKbd);
+		XkbGetNames (drawing->display, XkbAllNamesMask,
+			     drawing->xkb);
+		drawing->xkbOnDisplay = TRUE;
+	}
+
+	if (drawing->xkb) {
+		XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+				       XkbIndicatorStateNotify,
+				       drawing->xkb->indicators->phys_indicators,
+				       drawing->xkb->indicators->phys_indicators);
+	}
+
+	alloc_cdik (drawing);
+
+	init_keys_and_doodads (drawing);
+	init_colors (drawing);
+
+	ctk_widget_get_allocation (CTK_WIDGET (drawing), &allocation);
+	size_allocate (CTK_WIDGET (drawing), &allocation, drawing);
+	ctk_widget_queue_draw (CTK_WIDGET (drawing));
+
+	return TRUE;
+}
+
+const gchar* cafekbd_keyboard_drawing_get_keycodes(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->keycodes <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->keycodes);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_geometry(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->geometry <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->geometry);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_symbols(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->symbols <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->symbols);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_types(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->types <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->types);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_compat(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->compat <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->compat);
+	}
+}
+
+void
+cafekbd_keyboard_drawing_set_track_modifiers (CafekbdKeyboardDrawing * drawing,
+					   gboolean enable)
+{
+	if (enable) {
+		XkbStateRec state;
+		drawing->track_modifiers = 1;
+		memset (&state, 0, sizeof (state));
+		XkbGetState (drawing->display, XkbUseCoreKbd, &state);
+		cafekbd_keyboard_drawing_set_mods (drawing,
+						state.compat_state);
+	} else
+		drawing->track_modifiers = 0;
+}
+
+void
+cafekbd_keyboard_drawing_set_track_config (CafekbdKeyboardDrawing * drawing,
+					gboolean enable)
+{
+	if (enable)
+		drawing->track_config = 1;
+	else
+		drawing->track_config = 0;
+}
+
+void
+cafekbd_keyboard_drawing_set_groups_levels (CafekbdKeyboardDrawing * drawing,
+					 CafekbdKeyboardDrawingGroupLevel *
+					 groupLevels[])
+{
+#ifdef KBDRAW_DEBUG
+	printf ("set_group_levels [topLeft]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT]->level);
+	printf ("set_group_levels [topRight]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPRIGHT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPRIGHT]->level);
+	printf ("set_group_levels [bottomLeft]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT]->level);
+	printf ("set_group_levels [bottomRight]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT]->level);
+#endif
+	drawing->groupLevels = groupLevels;
+
+	ctk_widget_queue_draw (CTK_WIDGET (drawing));
+}
+
+typedef struct {
+	CafekbdKeyboardDrawing *drawing;
+	const gchar *description;
+} XkbLayoutPreviewPrintData;
+
+static void
+cafekbd_keyboard_drawing_begin_print (CtkPrintOperation         *operation,
+				      CtkPrintContext           *context G_GNUC_UNUSED,
+				      XkbLayoutPreviewPrintData *data G_GNUC_UNUSED)
+{
+	/* We always print single-page documents */
+	CtkPrintSettings *settings =
+	    ctk_print_operation_get_print_settings (operation);
+	ctk_print_operation_set_n_pages (operation, 1);
+	if (!ctk_print_settings_has_key
+	    (settings, CTK_PRINT_SETTINGS_ORIENTATION))
+		ctk_print_settings_set_orientation (settings,
+						    CTK_PAGE_ORIENTATION_LANDSCAPE);
+}
+
+static void
+cafekbd_keyboard_drawing_draw_page (CtkPrintOperation         *operation,
+				    CtkPrintContext           *context,
+				    gint                       page_nr G_GNUC_UNUSED,
+				    XkbLayoutPreviewPrintData *data)
+{
+	cairo_t *cr = ctk_print_context_get_cairo_context (context);
+	PangoLayout *layout =
+	    ctk_print_context_create_pango_layout (context);
+	PangoFontDescription *desc =
+	    pango_font_description_from_string ("sans 8");
+	gdouble width = ctk_print_context_get_width (context);
+	gdouble height = ctk_print_context_get_height (context);
+	gdouble dpi_x = ctk_print_context_get_dpi_x (context);
+	gdouble dpi_y = ctk_print_context_get_dpi_y (context);
+	gchar *header;
+
+	ctk_print_operation_set_unit (operation, CTK_UNIT_PIXEL);
+
+	header = g_strdup_printf
+	    (_("Keyboard layout \"%s\"\n"
+	       "Copyright &#169; X.Org Foundation and "
+	       "XKeyboardConfig contributors\n"
+	       "For licensing see package metadata"), data->description);
+	pango_layout_set_markup (layout, header, -1);
+	pango_layout_set_font_description (layout, desc);
+	pango_font_description_free (desc);
+	pango_layout_set_width (layout, pango_units_from_double (width));
+	pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER);
+	cairo_set_source_rgb (cr, 0, 0, 0);
+	cairo_move_to (cr, 0, 0);
+	pango_cairo_show_layout (cr, layout);
+
+	cafekbd_keyboard_drawing_render (CAFEKBD_KEYBOARD_DRAWING
+				      (data->drawing), cr, layout, 0.0,
+				      0.0, width, height, dpi_x, dpi_y);
+
+	g_object_unref (layout);
+}
+
+void
+cafekbd_keyboard_drawing_print (CafekbdKeyboardDrawing * drawing,
+			     CtkWindow * parent_window,
+			     const gchar * description)
+{
+	CtkPrintOperation *print;
+	CtkPrintOperationResult res;
+	static CtkPrintSettings *settings = NULL;
+	XkbLayoutPreviewPrintData data = { drawing, description };
+
+	print = ctk_print_operation_new ();
+
+	if (settings != NULL)
+		ctk_print_operation_set_print_settings (print, settings);
+
+	g_signal_connect (print, "begin_print",
+			  G_CALLBACK (cafekbd_keyboard_drawing_begin_print),
+			  &data);
+	g_signal_connect (print, "draw_page",
+			  G_CALLBACK (cafekbd_keyboard_drawing_draw_page),
+			  &data);
+
+	res = ctk_print_operation_run (print,
+				       CTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
+				       parent_window, NULL);
+
+	if (res == CTK_PRINT_OPERATION_RESULT_APPLY) {
+		if (settings != NULL)
+			g_object_unref (settings);
+		settings = ctk_print_operation_get_print_settings (print);
+		g_object_ref (settings);
+	}
+
+	g_object_unref (print);
+}
+
+static void
+show_layout_response (CtkWidget * dialog, gint resp)
+{
+	CdkRectangle rect;
+	CtkWidget *kbdraw;
+	const gchar *groupName;
+
+	switch (resp) {
+	case CTK_RESPONSE_CLOSE:
+		ctk_window_get_position (CTK_WINDOW (dialog), &rect.x,
+					 &rect.y);
+		ctk_window_get_size (CTK_WINDOW (dialog), &rect.width,
+				     &rect.height);
+		cafekbd_preview_save_position (&rect);
+		ctk_widget_destroy (dialog);
+		break;
+	case CTK_RESPONSE_PRINT:
+		kbdraw =
+		    CTK_WIDGET (g_object_get_data
+				(G_OBJECT (dialog), "kbdraw"));
+		groupName =
+		    (const gchar *) g_object_get_data (G_OBJECT (dialog),
+						       "groupName");
+		cafekbd_keyboard_drawing_print (CAFEKBD_KEYBOARD_DRAWING
+					     (kbdraw), CTK_WINDOW (dialog),
+					     groupName ? groupName :
+					     _("Unknown"));
+	}
+}
+
+CtkWidget *
+cafekbd_keyboard_drawing_new_dialog (gint group, gchar * group_name)
+{
+	static CafekbdKeyboardDrawingGroupLevel groupsLevels[] = { {
+								 0, 1}, {
+									 0,
+									 3},
+	{
+	 0, 0}, {
+		 0, 2}
+	};
+	static CafekbdKeyboardDrawingGroupLevel *pGroupsLevels[] = {
+		groupsLevels, groupsLevels + 1, groupsLevels + 2,
+		groupsLevels + 3
+	};
+
+	CtkBuilder *builder;
+	CtkWidget *dialog, *kbdraw;
+	XkbComponentNamesRec component_names;
+	XklConfigRec *xkl_data;
+	CdkRectangle *rect;
+	GError *error = NULL;
+	char title[128] = "";
+	XklEngine* engine = xkl_engine_get_instance(CDK_DISPLAY_XDISPLAY(cdk_display_get_default()));
+
+	builder = ctk_builder_new ();
+	ctk_builder_add_from_resource (builder,
+	                               "/org/cafe/peripherals/keyboard/show-layout.ui",
+	                               &error);
+
+	if (error) {
+		g_error ("Could not load UI: %s", error->message);
+		g_clear_error (&error);
+	}
+
+
+	dialog =
+	    CTK_WIDGET (ctk_builder_get_object
+			(builder, "gswitchit_layout_view"));
+	kbdraw = cafekbd_keyboard_drawing_new ();
+	ctk_widget_set_vexpand (kbdraw, TRUE);
+
+	snprintf (title, sizeof (title), _("Keyboard Layout \"%s\""),
+		  group_name);
+	ctk_window_set_title (CTK_WINDOW (dialog), title);
+	g_object_set_data_full (G_OBJECT (dialog), "group_name",
+				g_strdup (group_name), g_free);
+
+	cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING
+						 (kbdraw), pGroupsLevels);
+
+	xkl_data = xkl_config_rec_new ();
+	if (xkl_config_rec_get_from_server (xkl_data, engine)) {
+		int num_layouts = g_strv_length (xkl_data->layouts);
+		int num_variants = g_strv_length (xkl_data->variants);
+		if (group >= 0 && group < num_layouts
+		    && group < num_variants) {
+			char *l = g_strdup (xkl_data->layouts[group]);
+			char *v = g_strdup (xkl_data->variants[group]);
+			char **p;
+			int i;
+
+			if ((p = xkl_data->layouts) != NULL)
+				for (i = num_layouts; --i >= 0;)
+					g_free (*p++);
+
+			if ((p = xkl_data->variants) != NULL)
+				for (i = num_variants; --i >= 0;)
+					g_free (*p++);
+
+			xkl_data->layouts =
+			    g_realloc (xkl_data->layouts,
+				       sizeof (char *) * 2);
+			xkl_data->variants =
+			    g_realloc (xkl_data->variants,
+				       sizeof (char *) * 2);
+			xkl_data->layouts[0] = l;
+			xkl_data->variants[0] = v;
+			xkl_data->layouts[1] = xkl_data->variants[1] =
+			    NULL;
+		}
+
+		if (xkl_xkb_config_native_prepare(engine, xkl_data, &component_names))
+		{
+			cafekbd_keyboard_drawing_set_keyboard
+			    (CAFEKBD_KEYBOARD_DRAWING (kbdraw),
+			     &component_names);
+			xkl_xkb_config_native_cleanup (engine,
+						       &component_names);
+		}
+	}
+
+	g_object_unref (G_OBJECT (xkl_data));
+
+	g_object_set_data (G_OBJECT (dialog), "builderData", builder);
+	g_signal_connect (G_OBJECT (dialog), "response", G_CALLBACK (show_layout_response), NULL);
+
+	rect = cafekbd_preview_load_position ();
+
+	if (rect != NULL)
+	{
+		ctk_window_move (CTK_WINDOW (dialog), rect->x, rect->y);
+		ctk_window_resize (CTK_WINDOW (dialog), rect->width, rect->height);
+		g_free (rect);
+	}
+	else
+	{
+		ctk_window_resize (CTK_WINDOW (dialog), 700, 400);
+	}
+
+	ctk_window_set_resizable (CTK_WINDOW (dialog), TRUE);
+
+	ctk_container_add (CTK_CONTAINER
+			   (ctk_builder_get_object
+			    (builder, "preview_vbox")), kbdraw);
+
+	g_object_set_data (G_OBJECT (dialog), "kbdraw", kbdraw);
+
+		g_signal_connect_swapped(dialog, "destroy", G_CALLBACK(g_object_unref),  g_object_get_data(G_OBJECT(dialog), "builderData"));
+
+	ctk_widget_show_all(dialog);
+
+	return dialog;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/5.html b/2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/5.html new file mode 100644 index 0000000..a0afe30 --- /dev/null +++ b/2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/5.html @@ -0,0 +1,1978 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+#include <config.h>
+
+#include <memory.h>
+
+#include <cairo.h>
+
+#include <cdk/cdkkeysyms.h>
+#include <cdk/cdkx.h>
+#include <glib/gi18n-lib.h>
+#include <glib/gprintf.h>
+
+#include <cafekbd-status.h>
+
+#include <cafekbd-desktop-config.h>
+#include <cafekbd-indicator-config.h>
+
+typedef struct _gki_globals {
+	XklEngine *engine;
+	XklConfigRegistry *registry;
+
+	CafekbdDesktopConfig cfg;
+	CafekbdIndicatorConfig ind_cfg;
+	CafekbdKeyboardConfig kbd_cfg;
+
+	const gchar *tooltips_format;
+	gchar **full_group_names;
+	gchar **short_group_names;
+
+	gint current_width;
+	gint current_height;
+	int real_width;
+
+	GSList *icons;		/* list of GdkPixbuf */
+	GSList *widget_instances;	/* list of CafekbdStatus */
+	gulong state_changed_handler;
+	gulong config_changed_handler;
+} gki_globals;
+
+static gchar *settings_signal_names[] = {
+	"notify::ctk-theme-name",
+	"notify::ctk-key-theme-name",
+	"notify::ctk-font-name",
+	"notify::font-options",
+};
+
+struct _CafekbdStatusPrivate {
+	gdouble angle;
+	gulong settings_signal_handlers[sizeof (settings_signal_names) /
+					sizeof (settings_signal_names[0])];
+};
+
+/* one instance for ALL widgets */
+static gki_globals globals;
+
+#define ForAllIndicators() \
+	{ \
+		GSList* cur; \
+		for (cur = globals.widget_instances; cur != NULL; cur = cur->next) { \
+			CafekbdStatus * gki = (CafekbdStatus*)cur->data;
+#define NextIndicator() \
+		} \
+	}
+
+G_DEFINE_TYPE (CafekbdStatus, cafekbd_status, CTK_TYPE_STATUS_ICON)<--- There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
+static void
+cafekbd_status_global_init (void);
+static void
+cafekbd_status_global_term (void);
+static GdkPixbuf *
+cafekbd_status_prepare_drawing (CafekbdStatus * gki, int group);
+static void
+cafekbd_status_set_current_page_for_group (CafekbdStatus * gki, int group);
+static void
+cafekbd_status_set_current_page (CafekbdStatus * gki);
+static void
+cafekbd_status_global_cleanup (CafekbdStatus * gki);
+static void
+cafekbd_status_global_fill (CafekbdStatus * gki);
+static void
+cafekbd_status_set_tooltips (CafekbdStatus * gki, const char *str);
+
+void
+cafekbd_status_set_tooltips (CafekbdStatus * gki, const char *str)
+{
+	g_assert (str == NULL || g_utf8_validate (str, -1, NULL));
+
+	ctk_status_icon_set_tooltip_text (CTK_STATUS_ICON (gki), str);
+}
+
+void
+cafekbd_status_global_cleanup (CafekbdStatus *gki G_GNUC_UNUSED)
+{
+	while (globals.icons) {
+		if (globals.icons->data)
+			g_object_unref (G_OBJECT (globals.icons->data));
+		globals.icons =
+		    g_slist_delete_link (globals.icons, globals.icons);
+	}
+}
+
+void
+cafekbd_status_global_fill (CafekbdStatus * gki)
+{
+	int grp;
+	int total_groups = xkl_engine_get_num_groups (globals.engine);
+
+	for (grp = 0; grp < total_groups; grp++) {
+		GdkPixbuf *page = cafekbd_status_prepare_drawing (gki, grp);
+		globals.icons = g_slist_append (globals.icons, page);
+	}
+}
+
+static void
+cafekbd_status_activate (CafekbdStatus *gki G_GNUC_UNUSED)
+{
+	xkl_debug (150, "Mouse button pressed on applet\n");
+	cafekbd_desktop_config_lock_next_group (&globals.cfg);
+}
+
+/* hackish xref */
+extern gchar *cafekbd_indicator_extract_layout_name (int group,
+						  XklEngine * engine,
+						  CafekbdKeyboardConfig *
+						  kbd_cfg,
+						  gchar **
+						  short_group_names,
+						  gchar **
+						  full_group_names);
+
+extern gchar *cafekbd_indicator_create_label_title (int group,
+						 GHashTable **
+						 ln2cnt_map,
+						 gchar * layout_name);
+
+static void
+cafekbd_status_render_cairo (cairo_t * cr, int group)
+{
+	double r, g, b;
+	PangoFontDescription *pfd;
+	PangoContext *pcc;
+	PangoLayout *pl;
+	int lwidth, lheight;
+	gchar *layout_name, *lbl_title;
+	double screen_res;
+	cairo_font_options_t *fo;
+	static GHashTable *ln2cnt_map = NULL;
+
+	xkl_debug (160, "Rendering cairo for group %d\n", group);
+	if (globals.ind_cfg.background_color != NULL &&
+	    globals.ind_cfg.background_color[0] != 0) {
+		if (sscanf
+		    (globals.ind_cfg.background_color, "%lg %lg %lg", &r,
+		     &g, &b) == 3) {
+			cairo_set_source_rgb (cr, r, g, b);
+			cairo_rectangle (cr, 0, 0, globals.current_width,
+					 globals.current_height);
+			cairo_fill (cr);
+		}
+	}
+
+	if (globals.ind_cfg.foreground_color != NULL &&
+	    globals.ind_cfg.foreground_color[0] != 0) {
+		if (sscanf
+		    (globals.ind_cfg.foreground_color, "%lg %lg %lg", &r,
+		     &g, &b) == 3) {
+			cairo_set_source_rgb (cr, r, g, b);
+		}
+	}
+
+	pcc = pango_cairo_create_context (cr);
+
+	screen_res = cdk_screen_get_resolution (cdk_screen_get_default ());
+	if (screen_res > 0)
+		pango_cairo_context_set_resolution (pcc, screen_res);
+
+	fo = cairo_font_options_copy (cdk_screen_get_font_options
+				      (cdk_screen_get_default ()));
+	/* SUBPIXEL antialiasing gives bad results on in-memory images */
+	if (cairo_font_options_get_antialias (fo) ==
+	    CAIRO_ANTIALIAS_SUBPIXEL)
+		cairo_font_options_set_antialias (fo,
+						  CAIRO_ANTIALIAS_GRAY);
+	pango_cairo_context_set_font_options (pcc, fo);
+
+	pl = pango_layout_new (pcc);
+
+	layout_name = cafekbd_indicator_extract_layout_name (group,
+							  globals.engine,
+							  &globals.kbd_cfg,
+							  globals.short_group_names,
+							  globals.full_group_names);
+	lbl_title =
+	    cafekbd_indicator_create_label_title (group, &ln2cnt_map,
+					       layout_name);
+
+	if (group + 1 == xkl_engine_get_num_groups (globals.engine)) {
+		g_hash_table_destroy (ln2cnt_map);
+		ln2cnt_map = NULL;
+	}
+
+	pango_layout_set_text (pl, lbl_title, -1);
+
+	g_free (lbl_title);
+
+	pfd = pango_font_description_from_string (globals.ind_cfg.font_family);
+
+	pango_layout_set_font_description (pl, pfd);
+	pango_layout_get_size (pl, &lwidth, &lheight);
+
+	cairo_move_to (cr,
+		       (globals.current_width - lwidth / PANGO_SCALE) / 2,
+		       (globals.current_height -
+			lheight / PANGO_SCALE) / 2);
+
+	pango_cairo_show_layout (cr, pl);
+
+	pango_font_description_free (pfd);
+	g_object_unref (pl);
+	g_object_unref (pcc);
+	cairo_font_options_destroy (fo);
+	cairo_destroy (cr);
+
+	globals.real_width = (lwidth / PANGO_SCALE) + 4;
+	if (globals.real_width > globals.current_width)
+		globals.real_width = globals.current_width;
+	if (globals.real_width < globals.current_height)
+		globals.real_width = globals.current_height;
+}
+
+static inline guint8
+convert_color_channel (guint8 src, guint8 alpha)
+{
+	return alpha ? ((((guint) src) << 8) - src) / alpha : 0;
+}
+
+static void
+convert_bgra_to_rgba (guint8 const *src, guint8 * dst, int width,
+		      int height, int new_width)
+{
+	int xoffset = width - new_width;
+
+	/* *4 */
+	int ptr_step = xoffset << 2;
+
+	int x, y;
+
+	/* / 2 * 4 */
+	src = src + ((xoffset >> 1) << 2);
+
+	for (y = height; --y >= 0; src += ptr_step) {
+		for (x = new_width; --x >= 0;) {
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+			dst[0] = convert_color_channel (src[2], src[3]);
+			dst[1] = convert_color_channel (src[1], src[3]);
+			dst[2] = convert_color_channel (src[0], src[3]);
+			dst[3] = src[3];
+#else
+			dst[0] = convert_color_channel (src[1], src[0]);
+			dst[1] = convert_color_channel (src[2], src[0]);
+			dst[2] = convert_color_channel (src[3], src[0]);
+			dst[3] = src[0];
+#endif
+			dst += 4;
+			src += 4;
+		}
+	}
+}
+
+static GdkPixbuf *
+cafekbd_status_prepare_drawing (CafekbdStatus *gki G_GNUC_UNUSED,
+				int            group)
+{
+	GError *gerror = NULL;
+	char *image_filename;
+	GdkPixbuf *image;
+
+	if (globals.current_width == 0)
+		return NULL;
+
+	if (globals.ind_cfg.show_flags) {
+
+		image_filename =
+		    (char *) g_slist_nth_data (globals.
+					       ind_cfg.image_filenames,
+					       group);
+
+		image = gdk_pixbuf_new_from_file_at_size (image_filename,
+							  globals.current_width,
+							  globals.current_height,
+							  &gerror);
+
+		if (image == NULL) {
+			CtkWidget *dialog = ctk_message_dialog_new (NULL,
+								    CTK_DIALOG_DESTROY_WITH_PARENT,
+								    CTK_MESSAGE_ERROR,
+								    CTK_BUTTONS_OK,
+								    _
+								    ("There was an error loading an image: %s"),
+								    gerror
+								    ==
+								    NULL ?
+								    "Unknown"
+								    :
+								    gerror->message);
+			g_signal_connect (G_OBJECT (dialog), "response",
+					  G_CALLBACK (ctk_widget_destroy),
+					  NULL);
+
+			ctk_window_set_resizable (CTK_WINDOW (dialog),
+						  FALSE);
+
+			ctk_widget_show (dialog);
+			g_error_free (gerror);
+
+			return NULL;
+		}
+		xkl_debug (150,
+			   "Image %d[%s] loaded -> %p[%dx%d], alpha: %d\n",
+			   group, image_filename, image,
+			   gdk_pixbuf_get_width (image),
+			   gdk_pixbuf_get_height (image),
+			   gdk_pixbuf_get_has_alpha (image));
+
+		return image;
+	} else {
+		cairo_surface_t *cs =
+		    cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
+						globals.current_width,
+						globals.current_height);
+		unsigned char *cairo_data;
+		guchar *pixbuf_data;
+		cafekbd_status_render_cairo (cairo_create (cs), group);
+		cairo_data = cairo_image_surface_get_data (cs);
+#if 0
+		char pngfilename[20];
+		g_sprintf (pngfilename, "label%d.png", group);
+		cairo_surface_write_to_png (cs, pngfilename);
+#endif
+		pixbuf_data =
+		    g_new0 (guchar,
+			    4 * globals.real_width *
+			    globals.current_height);
+		convert_bgra_to_rgba (cairo_data, pixbuf_data,
+				      globals.current_width,
+				      globals.current_height,
+				      globals.real_width);
+
+		cairo_surface_destroy (cs);
+
+		image = gdk_pixbuf_new_from_data (pixbuf_data,
+						  GDK_COLORSPACE_RGB,
+						  TRUE,
+						  8,
+						  globals.real_width,
+						  globals.current_height,
+						  globals.real_width *
+						  4,
+						  (GdkPixbufDestroyNotify)
+						  g_free, NULL);
+		xkl_debug (150,
+			   "Image %d created -> %p[%dx%d], alpha: %d\n",
+			   group, image, gdk_pixbuf_get_width (image),
+			   gdk_pixbuf_get_height (image),
+			   gdk_pixbuf_get_has_alpha (image));
+
+		return image;
+	}
+	return NULL;
+}
+
+static void
+cafekbd_status_update_tooltips (CafekbdStatus * gki)
+{
+	XklState *state = xkl_engine_get_current_state (globals.engine);
+	gchar *buf;
+	if (state == NULL || state->group < 0
+	    || state->group >= g_strv_length (globals.full_group_names))
+		return;
+
+	buf = g_strdup_printf (globals.tooltips_format,
+			       globals.full_group_names[state->group]);
+
+	cafekbd_status_set_tooltips (gki, buf);
+	g_free (buf);
+}
+
+void
+cafekbd_status_reinit_ui (CafekbdStatus * gki)
+{
+	cafekbd_status_global_cleanup (gki);
+	cafekbd_status_global_fill (gki);
+
+	cafekbd_status_set_current_page (gki);
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+			    gchar     *key G_GNUC_UNUSED,
+			    gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "General configuration changed in settings - reiniting...\n");
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+	ForAllIndicators () {
+		cafekbd_status_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_ind_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+				gchar     *key G_GNUC_UNUSED,
+				gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "Applet configuration changed in settings - reiniting...\n");
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+
+	cafekbd_indicator_config_free_image_filenames (&globals.ind_cfg);
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	ForAllIndicators () {
+		cafekbd_status_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+static void
+cafekbd_status_load_group_names (const gchar ** layout_ids,
+			      const gchar ** variant_ids)
+{
+	if (!cafekbd_desktop_config_load_group_descriptions
+	    (&globals.cfg, globals.registry, layout_ids, variant_ids,
+	     &globals.short_group_names, &globals.full_group_names)) {
+		/* We just populate no short names (remain NULL) -
+		 * full names are going to be used anyway */
+		gint i, total_groups =
+		    xkl_engine_get_num_groups (globals.engine);
+		xkl_debug (150, "group descriptions loaded: %d!\n",
+			   total_groups);
+		globals.full_group_names =
+		    g_new0 (char *, total_groups + 1);
+
+		if (xkl_engine_get_features (globals.engine) &
+		    XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
+			gchar **lst = globals.kbd_cfg.layouts_variants;
+			for (i = 0; *lst; lst++, i++) {
+				globals.full_group_names[i] =
+				    g_strdup ((char *) *lst);
+			}
+		} else {
+			for (i = total_groups; --i >= 0;) {
+				globals.full_group_names[i] =
+				    g_strdup_printf ("Group %d", i);
+			}
+		}
+	}
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_kbd_cfg_callback (CafekbdStatus *gki G_GNUC_UNUSED)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+	xkl_debug (100,
+		   "XKB configuration changed on X Server - reiniting...\n");
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+
+	cafekbd_indicator_config_free_image_filenames (&globals.ind_cfg);
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	g_strfreev (globals.full_group_names);
+	globals.full_group_names = NULL;
+
+	if (globals.short_group_names != NULL) {
+		g_strfreev (globals.short_group_names);
+		globals.short_group_names = NULL;
+	}
+
+	cafekbd_status_load_group_names ((const gchar **) xklrec->layouts,
+				      (const gchar **) xklrec->variants);
+
+	ForAllIndicators () {
+		cafekbd_status_reinit_ui (gki);
+	} NextIndicator ();
+	g_object_unref (G_OBJECT (xklrec));
+}
+
+/* Should be called once for all applets */
+static void
+cafekbd_status_state_callback (XklEngine           *engine G_GNUC_UNUSED,
+			       XklEngineStateChange changeType,
+			       gint                 group,
+			       gboolean             restore)
+{
+	xkl_debug (150, "group is now %d, restore: %d\n", group, restore);
+
+	if (changeType == GROUP_CHANGED) {
+		ForAllIndicators () {
+			xkl_debug (200, "do repaint\n");
+			cafekbd_status_set_current_page_for_group (gki,
+								group);
+		}
+		NextIndicator ();
+	}
+}
+
+
+void
+cafekbd_status_set_current_page (CafekbdStatus * gki)
+{
+	XklState *cur_state;
+	cur_state = xkl_engine_get_current_state (globals.engine);
+	if (cur_state->group >= 0)
+		cafekbd_status_set_current_page_for_group (gki,
+							cur_state->group);
+}
+
+void
+cafekbd_status_set_current_page_for_group (CafekbdStatus * gki, int group)
+{
+	xkl_debug (200, "Revalidating for group %d\n", group);
+
+	ctk_status_icon_set_from_pixbuf (CTK_STATUS_ICON (gki),
+					 GDK_PIXBUF (g_slist_nth_data
+						     (globals.icons,
+						      group)));
+
+	cafekbd_status_update_tooltips (gki);
+}
+
+/* Should be called once for all widgets */
+static CdkFilterReturn
+cafekbd_status_filter_x_evt (CdkXEvent *xev,
+			     CdkEvent  *event G_GNUC_UNUSED)
+{
+	XEvent *xevent = (XEvent *) xev;
+
+	xkl_engine_filter_events (globals.engine, xevent);
+	switch (xevent->type) {
+	case ReparentNotify:
+		{
+			XReparentEvent *rne = (XReparentEvent *) xev;
+
+			ForAllIndicators () {
+				guint32 xid =
+				    ctk_status_icon_get_x11_window_id
+				    (CTK_STATUS_ICON (gki));
+
+				/* compare the indicator's parent window with the even window */
+				if (xid == rne->window) {
+					/* if so - make it transparent... */
+					xkl_engine_set_window_transparent
+					    (globals.engine, rne->window,
+					     TRUE);
+				}
+			}
+		NextIndicator ()}
+		break;
+	}
+	return CDK_FILTER_CONTINUE;
+}
+
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_start_listen (void)
+{
+	cdk_window_add_filter (NULL, (CdkFilterFunc)
+			       cafekbd_status_filter_x_evt, NULL);
+	cdk_window_add_filter (cdk_get_default_root_window (),
+			       (CdkFilterFunc) cafekbd_status_filter_x_evt,
+			       NULL);
+
+	xkl_engine_start_listen (globals.engine,
+				 XKLL_TRACK_KEYBOARD_STATE);
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_stop_listen (void)
+{
+	xkl_engine_stop_listen (globals.engine, XKLL_TRACK_KEYBOARD_STATE);
+
+	cdk_window_remove_filter (NULL, (CdkFilterFunc)
+				  cafekbd_status_filter_x_evt, NULL);
+	cdk_window_remove_filter
+	    (cdk_get_default_root_window (),
+	     (CdkFilterFunc) cafekbd_status_filter_x_evt, NULL);
+}
+
+static void
+cafekbd_status_size_changed (CafekbdStatus * gki, gint size)
+{
+	if (globals.current_height != size) {
+		globals.current_height = size;
+		globals.current_width = size * 3 / 2;
+		cafekbd_status_reinit_ui (gki);
+	}
+}
+
+static void
+cafekbd_status_theme_changed (CtkSettings   *settings G_GNUC_UNUSED,
+			      GParamSpec    *pspec G_GNUC_UNUSED,
+			      CafekbdStatus *gki)
+{
+	cafekbd_indicator_config_refresh_style (&globals.ind_cfg);
+	cafekbd_status_reinit_ui (gki);
+}
+
+static void
+cafekbd_status_init (CafekbdStatus * gki)
+{
+	int i;
+
+	if (!g_slist_length (globals.widget_instances))
+		cafekbd_status_global_init ();
+
+	gki->priv = g_new0 (CafekbdStatusPrivate, 1);
+
+	/* This should give NA a hint about the order */
+	/* commenting out fixes a Cdk-critical warning */
+/*	ctk_status_icon_set_name (CTK_STATUS_ICON (gki), "keyboard"); */
+
+	xkl_debug (100, "Initiating the widget startup process for %p\n",
+		   gki);
+
+	if (globals.engine == NULL) {
+		cafekbd_status_set_tooltips (gki,
+					  _("XKB initialization error"));
+		return;
+	}
+
+	cafekbd_status_set_tooltips (gki, NULL);
+
+	cafekbd_status_global_fill (gki);
+	cafekbd_status_set_current_page (gki);
+
+	/* append AFTER all initialization work is finished */
+	globals.widget_instances =
+	    g_slist_append (globals.widget_instances, gki);
+
+	g_signal_connect (gki, "size-changed",
+			  G_CALLBACK (cafekbd_status_size_changed), NULL);
+	g_signal_connect (gki, "activate",
+			  G_CALLBACK (cafekbd_status_activate), NULL);
+
+	for (i = sizeof (settings_signal_names) /
+	     sizeof (settings_signal_names[0]); --i >= 0;)
+		gki->priv->settings_signal_handlers[i] =
+		    g_signal_connect_after (ctk_settings_get_default (),
+					    settings_signal_names[i],
+					    G_CALLBACK
+					    (cafekbd_status_theme_changed),
+					    gki);
+}
+
+static void
+cafekbd_status_finalize (GObject * obj)
+{
+	int i;
+	CafekbdStatus *gki = CAFEKBD_STATUS (obj);
+	xkl_debug (100,
+		   "Starting the cafe-kbd-status widget shutdown process for %p\n",
+		   gki);
+
+	for (i = sizeof (settings_signal_names) /
+	     sizeof (settings_signal_names[0]); --i >= 0;)
+		g_signal_handler_disconnect (ctk_settings_get_default (),
+					     gki->
+					     priv->settings_signal_handlers
+					     [i]);
+
+	/* remove BEFORE all termination work is finished */
+	globals.widget_instances =
+	    g_slist_remove (globals.widget_instances, gki);
+
+	cafekbd_status_global_cleanup (gki);
+
+	xkl_debug (100,
+		   "The instance of cafe-kbd-status successfully finalized\n");
+
+	g_free (gki->priv);
+
+	G_OBJECT_CLASS (cafekbd_status_parent_class)->finalize (obj);
+
+	if (!g_slist_length (globals.widget_instances))
+		cafekbd_status_global_term ();
+}
+
+static void
+cafekbd_status_global_term (void)
+{
+	xkl_debug (100, "*** Last  CafekbdStatus instance *** \n");
+	cafekbd_status_stop_listen ();
+
+	cafekbd_desktop_config_stop_listen (&globals.cfg);
+	cafekbd_indicator_config_stop_listen (&globals.ind_cfg);
+
+	cafekbd_indicator_config_term (&globals.ind_cfg);
+	cafekbd_keyboard_config_term (&globals.kbd_cfg);
+	cafekbd_desktop_config_term (&globals.cfg);
+
+	if (g_signal_handler_is_connected
+	    (globals.engine, globals.state_changed_handler)) {
+		g_signal_handler_disconnect (globals.engine,
+					     globals.state_changed_handler);
+		globals.state_changed_handler = 0;
+	}
+	if (g_signal_handler_is_connected
+	    (globals.engine, globals.config_changed_handler)) {
+		g_signal_handler_disconnect (globals.engine,
+					     globals.config_changed_handler);
+		globals.config_changed_handler = 0;
+	}
+
+	g_object_unref (G_OBJECT (globals.registry));
+	globals.registry = NULL;
+	g_object_unref (G_OBJECT (globals.engine));
+	globals.engine = NULL;
+	xkl_debug (100, "*** Terminated globals *** \n");
+}
+
+static void
+cafekbd_status_class_init (CafekbdStatusClass * klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+	xkl_debug (100, "*** First CafekbdStatus instance *** \n");
+
+	memset (&globals, 0, sizeof (globals));
+
+	/* Initing some global vars */
+	globals.tooltips_format = "%s";
+
+	/* Initing vtable */
+	object_class->finalize = cafekbd_status_finalize;
+
+	/* Signals */
+}
+
+static void
+cafekbd_status_global_init (void)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+
+	globals.engine = xkl_engine_get_instance(CDK_DISPLAY_XDISPLAY(cdk_display_get_default()));
+
+	if (globals.engine == NULL) {
+		xkl_debug (0, "Libxklavier initialization error");
+		return;
+	}
+
+	globals.state_changed_handler =
+	    g_signal_connect (globals.engine, "X-state-changed",
+			      G_CALLBACK (cafekbd_status_state_callback),
+			      NULL);
+	globals.config_changed_handler =
+	    g_signal_connect (globals.engine, "X-config-changed",
+			      G_CALLBACK (cafekbd_status_kbd_cfg_callback),
+			      NULL);
+
+	cafekbd_desktop_config_init (&globals.cfg, globals.engine);
+	cafekbd_keyboard_config_init (&globals.kbd_cfg, globals.engine);
+	cafekbd_indicator_config_init (&globals.ind_cfg, globals.engine);
+
+	cafekbd_desktop_config_start_listen (&globals.cfg,
+					  (GCallback)
+					  cafekbd_status_cfg_changed, NULL);
+	cafekbd_indicator_config_start_listen (&globals.ind_cfg,
+					    (GCallback)
+					    cafekbd_status_ind_cfg_changed,
+					    NULL);
+
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+
+	globals.registry =
+	    xkl_config_registry_get_instance (globals.engine);
+	xkl_config_registry_load (globals.registry,
+				  globals.cfg.load_extra_items);
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	cafekbd_status_load_group_names ((const gchar **) xklrec->layouts,
+				      (const gchar **) xklrec->variants);
+	g_object_unref (G_OBJECT (xklrec));
+
+	cafekbd_status_start_listen ();
+
+	xkl_debug (100, "*** Inited globals *** \n");
+}
+
+CtkStatusIcon *
+cafekbd_status_new (void)
+{
+	return
+	    CTK_STATUS_ICON (g_object_new (cafekbd_status_get_type (), NULL));
+}
+
+/**
+ * cafekbd_status_get_xkl_engine:
+ *
+ * Returns: (transfer none): The engine shared by all CafekbdStatus objects
+ */
+XklEngine *
+cafekbd_status_get_xkl_engine ()
+{
+	return globals.engine;
+}
+
+/**
+ * cafekbd_status_get_group_names:
+ *
+ * Returns: (transfer none) (array zero-terminated=1): List of group names
+ */
+gchar **
+cafekbd_status_get_group_names ()
+{
+	return globals.full_group_names;
+}
+
+gchar *
+cafekbd_status_get_image_filename (guint group)
+{
+	if (!globals.ind_cfg.show_flags)
+		return NULL;
+	return cafekbd_indicator_config_get_images_file (&globals.ind_cfg,
+						      &globals.kbd_cfg,
+						      group);
+}
+
+void
+cafekbd_status_set_angle (CafekbdStatus * gki, gdouble angle)
+{
+	gki->priv->angle = angle;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/6.html b/2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/6.html new file mode 100644 index 0000000..5ed6ace --- /dev/null +++ b/2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/6.html @@ -0,0 +1,806 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctk/ctk.h>
+#include <stdlib.h>
+#include <string.h>
+#include <glib.h>
+#include "libcafekbd/cafekbd-keyboard-drawing.h"
+
+
+static gchar *groups = NULL;
+static gchar *levels = NULL;
+static gchar *symbols = NULL;
+static gchar *keycodes = NULL;
+static gchar *geometry = NULL;
+
+static gboolean track_config = FALSE;
+static gboolean track_modifiers = FALSE;
+static gboolean program_version = FALSE;
+
+static const GOptionEntry options[] = {
+	{"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
+	 "Keyboard groups to display, from 1-4. Up to four groups only may be "
+	 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
+	 "group1[,group2[,group3[,group4]]]"},
+	{"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
+	 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
+	 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
+	 "level1[,level2[,level3[,level4]]]"},
+	{"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
+	 "Symbols component of the keyboard. If you omit this option, it is "
+	 "obtained from the X server; that is, the keyboard that is currently "
+	 "configured is drawn. Examples: --symbols=us or "
+	 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL},
+	{"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
+	 "Keycodes component of the keyboard. If you omit this option, it is "
+	 "obtained from the X server; that is, the keyboard that is currently"
+	 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
+	 NULL},
+	{"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
+	 "Geometry xkb component. If you omit this option, it is obtained from the"
+	 " X server; that is, the keyboard that is currently configured is drawn. "
+	 "Example: --geometry=kinesis", NULL},
+	{"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
+	 "Track the current modifiers", NULL},
+	{"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
+	 "Track the server XKB configuration", NULL},
+	{"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
+	 "Show current version", NULL},
+	{NULL},
+};
+
+static gboolean
+set_groups (gchar * groups_option,
+	    CafekbdKeyboardDrawingGroupLevel * groupLevels)
+{
+	CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
+	gint cntr, g;
+
+	groupLevels[0].group =
+	    groupLevels[1].group =
+	    groupLevels[2].group = groupLevels[3].group = -1;
+
+	if (groups_option == NULL)
+		return TRUE;
+
+	for (cntr = 4; --cntr >= 0;) {
+		if (*groups_option == '\0')
+			return FALSE;
+
+		g = *groups_option - '1';
+		if (g < 0 || g >= 4)
+			return FALSE;
+
+		pgl->group = g;
+		/* printf ("group %d\n", pgl->group); */
+
+		groups_option++;
+		if (*groups_option == '\0')
+			return TRUE;
+		if (*groups_option != ',')
+			return FALSE;
+
+		groups_option++;
+		pgl++;
+	}
+
+	return TRUE;
+}
+
+static gboolean
+set_levels (gchar * levels_option,
+	    CafekbdKeyboardDrawingGroupLevel * groupLevels)
+{
+	CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
+	gint cntr, l;
+	gchar *p;
+
+	groupLevels[0].level =
+	    groupLevels[1].level =
+	    groupLevels[2].level = groupLevels[3].level = -1;
+
+	if (levels_option == NULL)
+		return TRUE;
+
+	for (cntr = 4; --cntr >= 0;) {
+		if (*levels_option == '\0')
+			return FALSE;
+
+		l = (gint) strtol (levels_option, &p, 10) - 1;
+		if (l < 0 || l >= 64)
+			return FALSE;
+
+		pgl->level = l;
+		/* printf ("level %d\n", pgl->level); */
+
+		levels_option = p;
+		if (*levels_option == '\0')
+			return TRUE;
+		if (*levels_option != ',')
+			return FALSE;
+
+		levels_option++;
+		pgl++;
+	}
+
+	return TRUE;
+}
+
+static void
+bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED,
+	     guint                   keycode)
+{
+	g_warning
+	    ("got keycode %u, which is not on your keyboard according to your configuration",
+	     keycode);
+}
+
+gint
+main (gint argc, gchar ** argv)
+{
+	CtkWidget *window;
+	CtkWidget *cafekbd_keyboard_drawing;
+	CdkScreen *screen;
+	CdkMonitor *monitor;
+	CdkRectangle rect;
+	GOptionContext *context;
+	GError *error = NULL;
+
+	CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
+	    { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
+	CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
+	    { &groupLevels[0], &groupLevels[1], &groupLevels[2],
+		&groupLevels[3]
+	};
+
+	context = g_option_context_new ("kbdraw");
+	g_option_context_add_main_entries (context, options, NULL);
+	if (!g_option_context_parse (context, &argc, &argv, &error)) {
+		g_message ("option parsing failed: %s", error->message);
+		g_option_context_free (context);
+		exit (EXIT_FAILURE);
+	}
+	g_option_context_free (context);
+
+	if (program_version) {
+		g_print ("kbdraw %s\n", VERSION);
+		exit (0);
+	}
+
+	ctk_init (&argc, &argv);
+
+	if (!set_groups (groups, groupLevels)) {
+		g_printerr ("--groups: invalid argument\n");
+		exit (1);
+	}
+
+	if (!set_levels (levels, groupLevels)) {
+		g_printerr ("--levels: invalid argument\n");
+		exit (1);
+	}
+
+	window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
+	g_signal_connect (G_OBJECT (window), "destroy",
+			  G_CALLBACK (ctk_main_quit), NULL);
+
+	screen = ctk_window_get_screen (CTK_WINDOW (window));
+	monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
+	cdk_monitor_get_geometry (monitor, &rect);
+	ctk_window_set_default_size (CTK_WINDOW (window),
+				     rect.width * 4 / 5,
+				     rect.height * 1 / 2);
+
+	ctk_widget_show (window);
+
+	cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
+	ctk_widget_show (cafekbd_keyboard_drawing);
+	ctk_container_add (CTK_CONTAINER (window), cafekbd_keyboard_drawing);
+
+	cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING
+						 (cafekbd_keyboard_drawing),
+						 pgroupLevels);
+
+	if (track_modifiers)
+		cafekbd_keyboard_drawing_set_track_modifiers
+		    (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing), TRUE);
+	if (track_config)
+		cafekbd_keyboard_drawing_set_track_config
+		    (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing), TRUE);
+	g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",
+			  G_CALLBACK (bad_keycode), NULL);
+
+	if (symbols || geometry || keycodes) {
+		XkbComponentNamesRec names;
+		gint success;
+
+		memset (&names, '\0', sizeof (names));
+
+		if (symbols)
+			names.symbols = symbols;
+		else
+			names.symbols = (gchar *)
+			    cafekbd_keyboard_drawing_get_symbols
+			    (CAFEKBD_KEYBOARD_DRAWING
+			     (cafekbd_keyboard_drawing));
+
+		if (keycodes)
+			names.keycodes = keycodes;
+		else
+			names.keycodes = (gchar *)
+			    cafekbd_keyboard_drawing_get_keycodes
+			    (CAFEKBD_KEYBOARD_DRAWING
+			     (cafekbd_keyboard_drawing));
+
+		if (geometry)
+			names.geometry = geometry;
+		else
+			names.geometry = (gchar *)
+			    cafekbd_keyboard_drawing_get_geometry
+			    (CAFEKBD_KEYBOARD_DRAWING
+			     (cafekbd_keyboard_drawing));
+
+		success =
+		    cafekbd_keyboard_drawing_set_keyboard
+		    (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing),
+		     &names);
+		if (!success) {
+			g_printerr
+			    ("\nError loading new keyboard description with components:\n\n"
+			     "  keycodes:  %s\n" "  types:     %s\n"
+			     "  compat:    %s\n" "  symbols:   %s\n"
+			     "  geometry:  %s\n\n", names.keycodes,
+			     names.types, names.compat, names.symbols,
+			     names.geometry);
+			exit (1);
+		}
+	}
+
+	ctk_widget_grab_focus (cafekbd_keyboard_drawing);
+
+	ctk_main ();
+
+	return 0;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/7.html b/2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/7.html new file mode 100644 index 0000000..8122587 --- /dev/null +++ b/2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/7.html @@ -0,0 +1,358 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+
+#include "libxklavier/xklavier.h"
+#include "libcafekbd/cafekbd-status.h"
+
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include <cdk/cdk.h>
+#include <cdk/cdkx.h>
+#include <glib/gi18n.h>
+#include <ctk/ctk.h>
+
+#include "X11/XKBlib.h"
+
+int
+main (int argc, char **argv)
+{
+	CtkStatusIcon *icon;<--- Variable 'icon' can be declared as pointer to const
+
+	bindtextdomain (GETTEXT_PACKAGE, CAFELOCALEDIR);
+	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+	textdomain (GETTEXT_PACKAGE);
+
+	ctk_init (&argc, &argv);
+
+	icon = cafekbd_status_new ();
+
+        if (icon == NULL)
+	{
+		return 1;
+	}
+
+	ctk_main ();
+
+	return 0;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/commitmsg b/2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/commitmsg new file mode 100644 index 0000000..4f53c3a --- /dev/null +++ b/2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/commitmsg @@ -0,0 +1 @@ +Remove unused macros diff --git a/2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/index.html b/2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/index.html new file mode 100644 index 0000000..1040930 --- /dev/null +++ b/2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/index.html @@ -0,0 +1,242 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LineIdCWESeverityMessage
checkersReportinformationActive checkers: There was critical errors (use --checkers-report=<filename> to see details)
libcafekbd/cafekbd-desktop-config.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
libcafekbd/cafekbd-indicator-config.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
libcafekbd/cafekbd-indicator.c
66unknownMacroerrorThere is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
libcafekbd/cafekbd-keyboard-config.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
67knownConditionTrueFalse571styleCondition '*l1' is always true
67knownConditionTrueFalse571styleCondition '*l2' is always true
226constVariablePointer398styleVariable 'delim' can be declared as pointer to const
227knownConditionTrueFalse571styleCondition 'option!=NULL' is always true
282knownConditionTrueFalse570styleCondition 'variant==NULL' is always false
609constParameterPointer398styleParameter 'kbd_config' can be declared as pointer to const
libcafekbd/cafekbd-keyboard-drawing.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
61constParameterPointer398styleParameter 'context' can be declared as pointer to const
67constParameterPointer398styleParameter 'context' can be declared as pointer to const
625constParameterPointer398styleParameter 'context' can be declared as pointer to const
1026constVariablePointer398styleVariable 'runp' can be declared as pointer to const
1036constVariablePointer398styleVariable 'geometry' can be declared as pointer to const
1202constParameterPointer398styleParameter 'outline' can be declared as pointer to const
1397constVariablePointer398styleVariable 'shape' can be declared as pointer to const
1786constParameterCallback398styleParameter 'drawing' can be declared as pointer to const. However it seems that 'button_press_event' is a callback function, if 'drawing' is declared with const you might also need to cast function pointer(s).
1823constParameterCallback398styleParameter 'event' can be declared as pointer to const. However it seems that 'focus_event' is a callback function, if 'event' is declared with const you might also need to cast function pointer(s).
1838constParameterCallback398styleParameter 'a' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'a' is declared with const you might also need to cast function pointer(s).
1839constParameterCallback398styleParameter 'b' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'b' is declared with const you might also need to cast function pointer(s).
1863constVariablePointer398styleVariable 'pind' can be declared as pointer to const
2124constParameterPointer398styleParameter 'iev' can be declared as pointer to const
libcafekbd/cafekbd-status.c
82unknownMacroerrorThere is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
test/cafekbd-keyboard-drawing-test.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
test/cafekbd-status-test.c
42constVariablePointer398styleVariable 'icon' can be declared as pointer to const
+
+ +
+ + diff --git a/2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/output_1b95ca5afa730cb83eb934179e2c52e578ec9a09 b/2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/output_1b95ca5afa730cb83eb934179e2c52e578ec9a09 new file mode 100644 index 0000000..c30ea4f --- /dev/null +++ b/2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/output_1b95ca5afa730cb83eb934179e2c52e578ec9a09 @@ -0,0 +1,1877 @@ +Checking libcafekbd/cafekbd-desktop-config.c ... +libcafekbd/cafekbd-desktop-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +1/10 files checked 4% done +Checking libcafekbd/cafekbd-indicator-config.c ... +libcafekbd/cafekbd-indicator-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +2/10 files checked 10% done +Checking libcafekbd/cafekbd-indicator.c ... +libcafekbd/cafekbd-indicator.c:66:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdIndicator, cafekbd_indicator, CTK_TYPE_NOTEBOOK) +^ +3/10 files checked 24% done +Checking libcafekbd/cafekbd-keyboard-config.c ... +libcafekbd/cafekbd-keyboard-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-config.c:67:8: style: Condition '*l1' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:67:15: style: Condition '*l2' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:227:16: style: Condition 'option!=NULL' is always true [knownConditionTrueFalse] + (option != NULL) ? strchr (option, ':') : NULL; + ^ +libcafekbd/cafekbd-keyboard-config.c:282:18: style: Condition 'variant==NULL' is always false [knownConditionTrueFalse] + (variant == + ^ +libcafekbd/cafekbd-keyboard-config.c:226:10: style: Variable 'delim' can be declared as pointer to const [constVariablePointer] + char *delim = + ^ +libcafekbd/cafekbd-keyboard-config.c:609:65: style: Parameter 'kbd_config' can be declared as pointer to const [constParameterPointer] +cafekbd_keyboard_config_options_is_set (CafekbdKeyboardConfig * kbd_config, + ^ +4/10 files checked 36% done +Checking libcafekbd/cafekbd-keyboard-drawing.c ... +libcafekbd/cafekbd-keyboard-drawing.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-drawing.c:61:60: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_coord (CafekbdKeyboardDrawingRenderContext * context, gint n) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:67:61: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_double (CafekbdKeyboardDrawingRenderContext * context, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:625:51: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +set_markup (CafekbdKeyboardDrawingRenderContext * context, gchar *txt) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1026:11: style: Variable 'runp' can be declared as pointer to const [constVariablePointer] + GSList *runp; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1036:25: style: Variable 'geometry' can be declared as pointer to const [constVariablePointer] + PangoGlyphGeometry *geometry; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1202:39: style: Parameter 'outline' can be declared as pointer to const [constParameterPointer] +calc_origin_offset_x (XkbOutlineRec * outline) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1397:15: style: Variable 'shape' can be declared as pointer to const [constVariablePointer] + XkbShapeRec *shape; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: style: Parameter 'drawing' can be declared as pointer to const. However it seems that 'button_press_event' is a callback function, if 'drawing' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2343:18: note: You might need to cast the function pointer here + G_CALLBACK (button_press_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: note: Parameter 'drawing' can be declared as pointer to const + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: style: Parameter 'event' can be declared as pointer to const. However it seems that 'focus_event' is a callback function, if 'event' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2347:18: note: You might need to cast the function pointer here + G_CALLBACK (focus_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: note: Parameter 'event' can be declared as pointer to const + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: style: Parameter 'a' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'a' is declared with const you might also need to cast function pointer(s). [constParameterCallback] +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: note: Parameter 'a' can be declared as pointer to const +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: style: Parameter 'b' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'b' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: note: Parameter 'b' can be declared as pointer to const + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1863:9: style: Variable 'pind' can be declared as pointer to const [constVariablePointer] + Atom *pind = drawing->xkb->names->indicators; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2124:60: style: Parameter 'iev' can be declared as pointer to const [constParameterPointer] +process_indicators_state_notify (XkbIndicatorNotifyEvent * iev, + ^ +Checking libcafekbd/cafekbd-keyboard-drawing.c: KBDRAW_DEBUG... +5/10 files checked 77% done +Checking libcafekbd/cafekbd-status.c ... +libcafekbd/cafekbd-status.c:82:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdStatus, cafekbd_status, CTK_TYPE_STATUS_ICON) +^ +6/10 files checked 91% done +Checking libcafekbd/cafekbd-util.c ... +7/10 files checked 93% done +Checking test/cafekbd-indicator-test.c ... +8/10 files checked 94% done +Checking test/cafekbd-keyboard-drawing-test.c ... +test/cafekbd-keyboard-drawing-test.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +Checking test/cafekbd-keyboard-drawing-test.c: HAVE_CONFIG_H... +9/10 files checked 99% done +Checking test/cafekbd-status-test.c ... +test/cafekbd-status-test.c:42:17: style: Variable 'icon' can be declared as pointer to const [constVariablePointer] + CtkStatusIcon *icon; + ^ +10/10 files checked 100% done +nofile:0:0: information: Active checkers: There was critical errors (use --checkers-report= to see details) [checkersReport] + +/usr/bin/cafe-autogen +checking for autoreconf >= 2.53... + testing autoreconf... found 2.72 +checking for pkg-config >= 0.14.0... + testing pkg-config... found 1.8.1 +checking for cafe-common >= 0.0.1... + testing cafe-doc-common... found 2.0.0 +Checking for required M4 macros... +Checking for forbidden M4 macros... +Processing ./configure.ac +Running cafe-doc-common... +Running autoreconf... +autoreconf: export WARNINGS=no-portability +autoreconf: Entering directory '.' +autoreconf: running: autopoint --force +Copying file ABOUT-NLS +Copying file config.rpath +Copying file m4/codeset.m4 +Copying file m4/extern-inline.m4 +Copying file m4/fcntl-o.m4 +Copying file m4/gettext.m4 +Copying file m4/glibc2.m4 +Copying file m4/glibc21.m4 +Copying file m4/iconv.m4 +Copying file m4/intdiv0.m4 +Copying file m4/intl.m4 +Copying file m4/intldir.m4 +Copying file m4/intlmacosx.m4 +Copying file m4/intmax.m4 +Copying file m4/inttypes-pri.m4 +Copying file m4/inttypes_h.m4 +Copying file m4/lcmessage.m4 +Copying file m4/lib-ld.m4 +Copying file m4/lib-link.m4 +Copying file m4/lib-prefix.m4 +Copying file m4/lock.m4 +Copying file m4/longlong.m4 +Copying file m4/nls.m4 +Copying file m4/po.m4 +Copying file m4/printf-posix.m4 +Copying file m4/progtest.m4 +Copying file m4/size_max.m4 +Copying file m4/stdint_h.m4 +Copying file m4/threadlib.m4 +Copying file m4/uintmax_t.m4 +Copying file m4/visibility.m4 +Copying file m4/wchar_t.m4 +Copying file m4/wint_t.m4 +Copying file m4/xsize.m4 +Copying file po/Makefile.in.in +Copying file po/Makevars.template +Copying file po/Rules-quot +Copying file po/boldquot.sed +Copying file po/en@boldquot.header +Copying file po/en@quot.header +Copying file po/insert-header.sin +Copying file po/quot.sed +Copying file po/remove-potcdate.sin +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: configure.ac: tracing +autoreconf: running: libtoolize --copy --force +libtoolize: putting auxiliary files in '.'. +libtoolize: copying file './ltmain.sh' +libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. +libtoolize: copying file 'm4/libtool.m4' +libtoolize: copying file 'm4/ltoptions.m4' +libtoolize: copying file 'm4/ltsugar.m4' +libtoolize: copying file 'm4/ltversion.m4' +libtoolize: copying file 'm4/lt~obsolete.m4' +autoreconf: configure.ac: not using Intltool +autoreconf: configure.ac: not using Gtkdoc +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: running: /usr/bin/autoconf --force +autoreconf: running: /usr/bin/autoheader --force +autoreconf: running: automake --add-missing --copy --force-missing +configure.ac:31: installing './compile' +configure.ac:34: installing './config.guess' +configure.ac:34: installing './config.sub' +configure.ac:16: installing './install-sh' +configure.ac:16: installing './missing' +Makefile.am: installing './INSTALL' +libcafekbd/Makefile.am: installing './depcomp' +autoreconf: Leaving directory '.' +Skipping configure process. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +checking for a BSD-compatible install... /usr/bin/install -c +checking whether build environment is sane... yes +checking for a race-free mkdir -p... /usr/bin/mkdir -p +checking for gawk... no +checking for mawk... mawk +checking whether make sets $(MAKE)... yes +checking whether make supports nested variables... yes +checking whether make supports nested variables... (cached) yes +checking whether make supports the include directive... yes (GNU style) +checking for gcc... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the C compiler works... yes +checking for C compiler default output file name... a.out +checking for suffix of executables... +checking whether we are cross compiling... no +checking for suffix of object files... o +checking whether the compiler supports GNU C... yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... rm: cannot remove 'conftest.plist': Is a directory +yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... gcc3 +checking whether C compiler accepts -Werror=unknown-warning-option... no +checking whether C compiler accepts -Wall... yes +checking whether C compiler accepts -Wmissing-prototypes... yes +checking whether C compiler accepts -Wbad-function-cast... yes +checking whether C compiler accepts -Wcast-align... yes +checking whether C compiler accepts -Wextra... yes +checking whether C compiler accepts -Wformat-nonliteral... yes +checking whether C compiler accepts -Wmissing-declarations... yes +checking whether C compiler accepts -Wnested-externs... yes +checking whether C compiler accepts -Wpointer-arith... yes +checking whether C compiler accepts -Wredundant-decls... yes +checking whether C compiler accepts -Wshadow... yes +checking whether C compiler accepts -Wstrict-prototypes... yes +checking whether C compiler accepts -Wunused-macros... yes +checking whether C compiler accepts -Werror=format-security... yes +checking whether C compiler accepts -fstrict-aliasing... yes +checking flags to pass to the C compiler /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing +checking for gcc... (cached) /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the compiler supports GNU C... (cached) yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... (cached) yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... (cached) none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... (cached) yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... (cached) gcc3 +checking build system type... x86_64-pc-linux-gnu +checking host system type... x86_64-pc-linux-gnu +checking how to print strings... printf +checking for a sed that does not truncate output... /usr/bin/sed +checking for grep that handles long lines and -e... /usr/bin/grep +checking for egrep... /usr/bin/grep -E +checking for fgrep... /usr/bin/grep -F +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld +checking if the linker (/usr/bin/ld) is GNU ld... yes +checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B +checking the name lister (/usr/bin/nm -B) interface... rm: cannot remove 'conftest.plist': Is a directory +BSD nm +checking whether ln -s works... yes +checking the maximum length of command line arguments... 3145728 +checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop +checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop +checking for /usr/bin/ld option to reload object files... -r +checking for file... file +checking for objdump... objdump +checking how to recognize dependent libraries... pass_all +checking for dlltool... no +checking how to associate runtime and link libraries... printf %s\n +checking for ranlib... ranlib +checking for ar... ar +checking for archiver @FILE support... rm: cannot remove 'conftest.plist': Is a directory +@ +checking for strip... strip +checking command to parse /usr/bin/nm -B output from /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer object... rm: cannot remove 'conftest.plist': Is a directory +ok +checking for sysroot... no +checking for a working dd... /usr/bin/dd +checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1 +checking for mt... no +checking if : is a manifest tool... no +checking for stdio.h... yes +checking for stdlib.h... yes +checking for string.h... yes +checking for inttypes.h... yes +checking for stdint.h... yes +checking for strings.h... yes +checking for sys/stat.h... yes +checking for sys/types.h... yes +checking for unistd.h... yes +checking for dlfcn.h... yes +checking for objdir... .libs +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -fno-rtti -fno-exceptions... no +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to produce PIC... -fPIC -DPIC +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer PIC flag -fPIC -DPIC works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer static flag -static works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... (cached) yes +checking whether the /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes +checking whether -lc should be explicitly linked in... no +checking dynamic linker characteristics... GNU/Linux ld.so +checking how to hardcode library paths into programs... immediate +checking whether stripping libraries is possible... yes +checking if libtool supports shared libraries... yes +checking whether to build shared libraries... yes +checking whether to build static libraries... yes +checking whether NLS is requested... yes +checking for msgfmt... /usr/bin/msgfmt +checking for gmsgfmt... /usr/bin/msgfmt +checking for xgettext... /usr/bin/xgettext +checking for msgmerge... /usr/bin/msgmerge +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld -m elf_x86_64 +checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes +checking for shared library run path origin... done +checking how to run the C preprocessor... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer -E +checking for egrep -e... (cached) /usr/bin/grep -E +checking for CFPreferencesCopyAppValue... no +checking for CFLocaleCopyCurrent... no +checking for GNU gettext in libc... yes +checking whether to use NLS... yes +checking where the gettext function comes from... libc +checking for glib-compile-resources... /usr/bin/glib-compile-resources +checking for xmllint... /usr/bin/xmllint +checking for setlocale... yes +checking for pkg-config... /usr/bin/pkg-config +checking pkg-config is at least version 0.9.0... yes +checking for glib-2.0 >= 2.50.0... yes +checking for gmodule-2.0... yes +checking for gio-2.0 >= 2.25.0... yes +checking for cdk-3.0 >= 3.22.0... yes +checking for ctk+-3.0 >= 3.22.0 cdk-x11-3.0 >= 3.22.0... yes +checking for libxklavier >= 5.2... yes +checking for X... libraries , headers +checking for gethostbyname... yes +checking for connect... yes +checking for remove... yes +checking for shmat... yes +checking for IceConnectionNumber in -lICE... yes +checking for pkg-config... (cached) /usr/bin/pkg-config +checking pkg-config is at least version 0.16... yes +checking for library containing sqrt... -lm +checking for gobject-introspection... yes +checking that generated files are newer than configure... done +configure: creating ./config.status +config.status: creating Makefile +config.status: creating libcafekbd.pc +config.status: creating libcafekbdui.pc +config.status: creating po/Makefile.in +config.status: creating libcafekbd/Makefile +config.status: creating libcafekbd/org.cafe.peripherals-keyboard-xkb.gschema.xml +config.status: creating test/Makefile +config.status: creating config.h +config.status: executing depfiles commands +config.status: executing libtool commands +config.status: executing po-directories commands +config.status: creating po/POTFILES +config.status: creating po/Makefile + +Configuration: + + prefix: /usr + exec_prefix: ${prefix} + libdir: ${exec_prefix}/lib + bindir: ${exec_prefix}/bin + sbindir: ${exec_prefix}/sbin + sysconfdir: ${prefix}/etc + datadir: ${datarootdir} + source code location: . + compiler: /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer + cflags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + Warning flags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + +scan-build: Analysis run complete. +scan-build: Removing directory '/tmp/scan-build-2025-02-06-112007-11799-1' because it contains no reports. +scan-build: No bugs found. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +make all-recursive +make[1]: Entering directory '/rootdir' +Making all in po +make[2]: Entering directory '/rootdir/po' +make libcafekbd.pot-update +make[3]: Entering directory '/rootdir/po' +sed -e '/^#/d' remove-potcdate.sin > t-remove-potcdate.sed +mv t-remove-potcdate.sed remove-potcdate.sed +package_gnu=""; \ +test -n "$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L .. -maxdepth 1 -type f \ + -size -10000000c -exec grep 'GNU libcafekbd' \ + /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU libcafekbd' ../* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ +}; \ +if test "$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ +else \ + package_prefix=''; \ +fi; \ +if test -n '' || test 'https://github.com/cafe-desktop/libcafekbd' = '@'PACKAGE_BUGREPORT'@'; then \ + msgid_bugs_address=''; \ +else \ + msgid_bugs_address='https://github.com/cafe-desktop/libcafekbd'; \ +fi; \ +case `/usr/bin/xgettext --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ + *) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --package-name="${package_prefix}libcafekbd" \ + --package-version='1.25.0' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ +esac +test ! -f libcafekbd.po || { \ + if test -f ./libcafekbd.pot-header; then \ + sed -e '1,/^#$/d' < libcafekbd.po > libcafekbd.1po && \ + cat ./libcafekbd.pot-header libcafekbd.1po > libcafekbd.po; \ + rm -f libcafekbd.1po; \ + fi; \ + if test -f ./libcafekbd.pot; then \ + sed -f remove-potcdate.sed < ./libcafekbd.pot > libcafekbd.1po && \ + sed -f remove-potcdate.sed < libcafekbd.po > libcafekbd.2po && \ + if cmp libcafekbd.1po libcafekbd.2po >/dev/null 2>&1; then \ + rm -f libcafekbd.1po libcafekbd.2po libcafekbd.po; \ + else \ + rm -f libcafekbd.1po libcafekbd.2po ./libcafekbd.pot && \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ + else \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ +} +make[3]: Leaving directory '/rootdir/po' +test ! -f ./libcafekbd.pot || \ + test -z "af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo" || make af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo +make[3]: Entering directory '/rootdir/po' +/usr/bin/msgmerge --update --quiet --lang=af af.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=am am.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=an an.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=as as.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ar ar.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ast ast.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=az az.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bg bg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn bn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=be be.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn_IN bn_IN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bs bs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=br br.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca ca.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca@valencia ca@valencia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cmn cmn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=crh crh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cs cs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=csb csb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cv cv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=da da.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cy cy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de de.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de_CH de_CH.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=dz dz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=el el.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_AU en_AU.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_CA en_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_GB en_GB.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eo eo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es es.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_419 es_419.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_AR es_AR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CL es_CL.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CO es_CO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CR es_CR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_DO es_DO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_EC es_EC.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_ES es_ES.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_MX es_MX.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_NI es_NI.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PA es_PA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PE es_PE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PR es_PR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_US es_US.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_SV es_SV.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_UY es_UY.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_VE es_VE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=et et.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eu eu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fa fa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fi fi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fil fil.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fo fo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr fr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr_CA fr_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=frp frp.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fur fur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fy fy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ga ga.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gd gd.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gl gl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gu gu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ha ha.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=he he.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hi hi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hu hu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hr hr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hy hy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ia ia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ie ie.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=id id.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ig ig.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=is is.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ja ja.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=it it.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=jv jv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ka ka.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kab kab.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kk kk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=km km.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kn kn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ko ko.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ks ks.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku ku.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku_IQ ku_IQ.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ky ky.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=la la.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lb lb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=li li.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lt lt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lv lv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lo lo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mai mai.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mg mg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mi mi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mk mk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ml ml.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mn mn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mr mr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ms ms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=my my.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nah nah.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nb nb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nds nds.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ne ne.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nn nn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nl nl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nqo nqo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nso nso.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=oc oc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=om om.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=or or.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pa pa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pl pl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pms pms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt pt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ps ps.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt_BR pt_BR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ro ro.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ru ru.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=rw rw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sc sc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sco sco.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=si si.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sk sk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=so so.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sl sl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sq sq.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr sr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr@latin sr@latin.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sv sv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sw sw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=te te.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ta ta.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tg tg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=th th.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tl tl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tk tk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tr tr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ts ts.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tt tt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ug ug.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uk uk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur_PK ur_PK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur ur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uz uz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=vi vi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=wa wa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yi yi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=xh xh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yo yo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_CN zh_CN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_TW zh_TW.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_HK zh_HK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zu zu.po libcafekbd.pot +rm -f af.gmo && /usr/bin/msgfmt -c --statistics --verbose -o af.gmo af.po +af.po: rm -f am.gmo && /usr/bin/msgfmt -c --statistics --verbose -o am.gmo am.po +7 translated messages, 84 untranslated messages. +am.po: 54 translated messages, 37 untranslated messages. +rm -f ar.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ar.gmo ar.po +rm -f an.gmo && /usr/bin/msgfmt -c --statistics --verbose -o an.gmo an.po +rm -f as.gmo && /usr/bin/msgfmt -c --statistics --verbose -o as.gmo as.po +rm -f az.gmo && /usr/bin/msgfmt -c --statistics --verbose -o az.gmo az.po +ar.po: 50 translated messages, 41 untranslated messages. +an.po:7: warning: header field 'Last-Translator' still has the initial default value +rm -f ast.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ast.gmo ast.po +an.po: 0 translated messages, 91 untranslated messages. +as.po: 41 translated messages, 50 untranslated messages. +az.po: 9 translated messages, 82 untranslated messages. +rm -f be.gmo && /usr/bin/msgfmt -c --statistics --verbose -o be.gmo be.po +ast.po: rm -f bg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bg.gmo bg.po +47 translated messages, 44 untranslated messages. +rm -f bn_IN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn_IN.gmo bn_IN.po +rm -f bn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn.gmo bn.po +be.po: 46 translated messages, 45 untranslated messages. +rm -f br.gmo && /usr/bin/msgfmt -c --statistics --verbose -o br.gmo br.po +bg.po: 54 translated messages, 37 untranslated messages. +bn_IN.po: 41 translated messages, 50 untranslated messages. +bn.po: 43 translated messages, 48 untranslated messages. +rm -f bs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bs.gmo bs.po +rm -f ca.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca.gmo ca.po +br.po: 20 translated messages, 71 untranslated messages. +rm -f cmn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cmn.gmo cmn.po +rm -f ca@valencia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca@valencia.gmo ca@valencia.po +ca.po: 87 translated messages, 4 untranslated messages. +bs.po: 25 translated messages, 66 untranslated messages. +ca@valencia.po: 54 translated messages, 37 untranslated messages. +rm -f crh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o crh.gmo crh.po +cmn.po: 46 translated messages, 45 untranslated messages. +rm -f cs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cs.gmo cs.po +rm -f cv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cv.gmo cv.po +rm -f csb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o csb.gmo csb.po +rm -f cy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cy.gmo cy.po +crh.po: 11 translated messages, 80 untranslated messages. +cs.po: 81 translated messages, 10 untranslated messages. +csb.po:7: warning: header field 'Last-Translator' still has the initial default value +csb.po: 0 translated messages, 91 untranslated messages. +cv.po: 0 translated messages, 91 untranslated messages. +rm -f da.gmo && /usr/bin/msgfmt -c --statistics --verbose -o da.gmo da.po +rm -f de.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de.gmo de.po +cy.po: 26 translated messages, 65 untranslated messages. +rm -f de_CH.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de_CH.gmo de_CH.po +rm -f dz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o dz.gmo dz.po +rm -f el.gmo && /usr/bin/msgfmt -c --statistics --verbose -o el.gmo el.po +de_CH.po: 0 translated messages, 91 untranslated messages. +da.po: 91 translated messagesde.po: 76 translated messages, 15 untranslated messages. +. +dz.po: 39 translated messages, 52 untranslated messages. +rm -f en_AU.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_AU.gmo en_AU.po +rm -f en_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_CA.gmo en_CA.po +el.po: 54 translated messages, 37 untranslated messages. +rm -f en_GB.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_GB.gmo en_GB.po +en_CA.po: 10 translated messages, 81 untranslated messages. +en_AU.po: 54 translated messages, 37 untranslated messages. +rm -f eo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eo.gmo eo.po +en_GB.po: 54 translated messages, 37 untranslated messages. +rm -f es.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es.gmo es.po +rm -f es_419.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_419.gmo es_419.po +rm -f es_AR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_AR.gmo es_AR.po +es.po: 89 translated messages, 2 untranslated messages. +eo.po: 52 translated messages, 39 untranslated messages. +rm -f es_CL.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CL.gmo es_CL.po +es_419.po: 0 translated messages, 91 untranslated messages. +rm -f es_CO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CO.gmo es_CO.po +es_AR.po: 21 translated messages, 70 untranslated messages. +rm -f es_CR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CR.gmo es_CR.po +es_CL.po: 3 translated messages, 88 untranslated messages. +rm -f es_DO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_DO.gmo es_DO.po +es_CO.po: 49 translated messages, 42 untranslated messages. +rm -f es_EC.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_EC.gmo es_EC.po +es_CR.po: 1 translated message, 90 untranslated messages. +rm -f es_ES.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_ES.gmo es_ES.po +rm -f es_MX.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_MX.gmo es_MX.po +es_DO.po: 1 translated message, 90 untranslated messages. +rm -f es_NI.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_NI.gmo es_NI.po +es_ES.po: 1 translated message, 90 untranslated messages. +rm -f es_PA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PA.gmo es_PA.po +es_EC.po: 1 translated message, 90 untranslated messages. +es_MX.po: 1 translated message, 90 untranslated messages. +es_NI.po: 1 translated message, 90 untranslated messages. +rm -f es_PE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PE.gmo es_PE.po +es_PA.po: rm -f es_SV.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_SV.gmo es_SV.po +1 translated message, 90 untranslated messages. +rm -f es_PR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PR.gmo es_PR.po +rm -f es_US.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_US.gmo es_US.po +es_PE.po: 1 translated message, 90 untranslated messages. +es_PR.po: 1 translated message, 90 untranslated messages. +es_SV.po: 1 translated message, 90 untranslated messages. +es_US.po: 0 translated messages, 91 untranslated messages. +rm -f es_UY.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_UY.gmo es_UY.po +rm -f es_VE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_VE.gmo es_VE.po +rm -f et.gmo && /usr/bin/msgfmt -c --statistics --verbose -o et.gmo et.po +rm -f fa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fa.gmo fa.po +rm -f eu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eu.gmo eu.po +es_UY.po: 1 translated message, 90 untranslated messages. +es_VE.po: 1 translated message, 90 untranslated messages. +et.po: 54 translated messages, 37 untranslated messages. +fa.po: 11 translated messages, 80 untranslated messages. +rm -f fi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fi.gmo fi.po +eu.po: 54 translated messages, 37 untranslated messages. +rm -f fo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fo.gmo fo.po +rm -f fil.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fil.gmo fil.po +rm -f fr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr.gmo fr.po +rm -f fr_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr_CA.gmo fr_CA.po +fi.po: 48 translated messages, 43 untranslated messages. +fo.po: 0 translated messages, 91 untranslated messages. +fil.po: 0 translated messages, 91 untranslated messages. +fr.po: 67 translated messages, 24 untranslated messages. +fr_CA.po: 3 translated messages, 88 untranslated messages. +rm -f frp.gmo && /usr/bin/msgfmt -c --statistics --verbose -o frp.gmo frp.po +rm -f fur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fur.gmo fur.po +rm -f fy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fy.gmo fy.po +rm -f gd.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gd.gmo gd.po +frp.po: 7 translated messages, 84 untranslated messages. +rm -f ga.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ga.gmo ga.po +fur.po: fy.po: 4 translated messages4 translated messages, 87 untranslated messages. +, 87 untranslated messages. +gd.po: 0 translated messages, 91 untranslated messages. +rm -f gl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gl.gmo gl.po +ga.po: 41 translated messages, 50 untranslated messages. +rm -f gu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gu.gmo gu.po +rm -f ha.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ha.gmo ha.po +rm -f he.gmo && /usr/bin/msgfmt -c --statistics --verbose -o he.gmo he.po +gl.po: 89 translated messages, 2 untranslated messages. +rm -f hi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hi.gmo hi.po +ha.po: 5 translated messages, 86 untranslated messages. +gu.po: 43 translated messages, 48 untranslated messages. +he.po: 54 translated messages, 37 untranslated messages. +rm -f hr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hr.gmo hr.po +hi.po: 45 translated messages, 46 untranslated messages. +rm -f hu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hu.gmo hu.po +rm -f hy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hy.gmo hy.po +rm -f ia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ia.gmo ia.po +hr.po: 54 translated messages, 37 untranslated messages. +rm -f id.gmo && /usr/bin/msgfmt -c --statistics --verbose -o id.gmo id.po +hu.po: 54 translated messages, 37 untranslated messages. +hy.po: 54 translated messages, 37 untranslated messages. +ia.po: 3 translated messages, 88 untranslated messages. +rm -f is.gmo && /usr/bin/msgfmt -c --statistics --verbose -o is.gmo is.po +rm -f ie.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ie.gmo ie.po +rm -f ig.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ig.gmo ig.po +id.po: 91 translated messages. +rm -f it.gmo && /usr/bin/msgfmt -c --statistics --verbose -o it.gmo it.po +is.po: 12 translated messages, 79 untranslated messages. +ie.po: 45 translated messages, 46 untranslated messages. +it.po: 91 translated messages. +rm -f ja.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ja.gmo ja.po +ig.po: 5 translated messages, 86 untranslated messages. +rm -f jv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o jv.gmo jv.po +rm -f ka.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ka.gmo ka.po +ja.po: 54 translated messages, 37 untranslated messages. +rm -f kab.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kab.gmo kab.po +rm -f kk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kk.gmo kk.po +jv.po: 2 translated messages, 89 untranslated messages. +kab.po: rm -f km.gmo && /usr/bin/msgfmt -c --statistics --verbose -o km.gmo km.po +4 translated messages, 87 untranslated messages. +ka.po: 37 translated messages, 54 untranslated messages. +kk.po: 24 translated messages, 67 untranslated messages. +rm -f kn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kn.gmo kn.po +km.po:7: warning: header field 'Last-Translator' still has the initial default value +km.po: 0 translated messages, 91 untranslated messages. +rm -f ks.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ks.gmo ks.po +rm -f ko.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ko.gmo ko.po +rm -f ku.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku.gmo ku.po +kn.po: 43 translated messages, 48 untranslated messages. +ks.po: 3 translated messages, 88 untranslated messages. +rm -f ku_IQ.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku_IQ.gmo ku_IQ.po +ko.po: 54 translated messages, 37 untranslated messages. +ku.po: 10 translated messages, 81 untranslated messages. +rm -f ky.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ky.gmo ky.po +rm -f la.gmo && /usr/bin/msgfmt -c --statistics --verbose -o la.gmo la.po +ku_IQ.po: 16 translated messages, 75 untranslated messages. +rm -f lb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lb.gmo lb.po +rm -f li.gmo && /usr/bin/msgfmt -c --statistics --verbose -o li.gmo li.po +ky.po: 26 translated messages, 65 untranslated messages. +la.po: 2 translated messages, 89 untranslated messages. +lb.po:7: warning: li.po:7: warning: header field 'Last-Translator' still has the initial default value +header field 'Last-Translator' still has the initial default value +rm -f lo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lo.gmo lo.po +li.po: 0 translated messages, 91 untranslated messages. +lb.po: 0 translated messages, 91 untranslated messages. +rm -f lt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lt.gmo lt.po +rm -f lv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lv.gmo lv.po +rm -f mai.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mai.gmo mai.po +lo.po:7: warning: header field 'Last-Translator' still has the initial default value +lo.po: rm -f mg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mg.gmo mg.po +0 translated messages, 91 untranslated messages. +lt.po: 91 translated messages. +lv.po: 49 translated messages, 42 untranslated messages. +mg.po: 10 translated messages, 81 untranslated messages. +rm -f mi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mi.gmo mi.po +mai.po: rm -f mk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mk.gmo mk.po +18 translated messages, 73 untranslated messages. +rm -f mn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mn.gmo mn.po +rm -f ml.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ml.gmo ml.po +mi.po:7: warning: header field 'Last-Translator' still has the initial default value +mi.po: 0 translated messages, 91 untranslated messages. +mk.po: 39 translated messages, 52 untranslated messages. +rm -f mr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mr.gmo mr.po +mn.po: 10 translated messages, 81 untranslated messages. +ml.po: 41 translated messages, 50 untranslated messages. +mr.po: 47 translated messages, 44 untranslated messages. +rm -f ms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ms.gmo ms.po +rm -f my.gmo && /usr/bin/msgfmt -c --statistics --verbose -o my.gmo my.po +rm -f nb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nb.gmo nb.po +rm -f nah.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nah.gmo nah.po +rm -f nds.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nds.gmo nds.po +my.po:7: warning: header field 'Last-Translator' still has the initial default value +my.po: 0 translated messages, 91 untranslated messages. +ms.po: 91 translated messages. +nb.po: 91 translated messages. +rm -f ne.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ne.gmo ne.po +nah.po: 0 translated messages, 91 untranslated messages. +nds.po: 12 translated messages, 79 untranslated messages. +rm -f nn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nn.gmo nn.po +ne.po: 13 translated messages, 78 untranslated messagesrm -f nl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nl.gmo nl.po +. +rm -f nqo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nqo.gmo nqo.po +rm -f nso.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nso.gmo nso.po +nl.po: 91 translated messages. +rm -f oc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o oc.gmo oc.po +nn.po: 40 translated messages, 51 untranslated messages. +nqo.po: 0 translated messages, 91 untranslated messages. +nso.po: 3 translated messages, 88 untranslated messages. +rm -f or.gmo && /usr/bin/msgfmt -c --statistics --verbose -o or.gmo or.po +rm -f om.gmo && /usr/bin/msgfmt -c --statistics --verbose -o om.gmo om.po +rm -f pa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pa.gmo pa.po +oc.po: 68 translated messages, 23 untranslated messages. +om.po: 0 translated messages, 91 untranslated messages. +rm -f pl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pl.gmo pl.po +pa.po: 46 translated messages, 45 untranslated messages. +or.po: 41 translated messages, 50 untranslated messages. +rm -f pms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pms.gmo pms.po +rm -f ps.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ps.gmo ps.po +pl.po: 55 translated messages, 36 untranslated messages. +rm -f pt_BR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt_BR.gmo pt_BR.po +rm -f pt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt.gmo pt.po +pms.po: 3 translated messages, 88 untranslated messages. +rm -f ro.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ro.gmo ro.po +ps.po: 6 translated messages, 85 untranslated messages. +pt.po: 84 translated messages, 7 untranslated messages. +pt_BR.po: 58 translated messages, 33 untranslated messages. +ro.po: 54 translated messages, 37 untranslated messages. +rm -f ru.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ru.gmo ru.po +rm -f rw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o rw.gmo rw.po +rm -f sc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sc.gmo sc.po +rm -f si.gmo && /usr/bin/msgfmt -c --statistics --verbose -o si.gmo si.po +rm -f sco.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sco.gmo sco.po +ru.po: 89 translated messages, 2 untranslated messages. +rw.po: 10 translated messages, 81 untranslated messages. +sc.po: 2 translated messages, 89 untranslated messages. +sco.po: 0 translated messages, 91 untranslated messages. +rm -f sk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sk.gmo sk.po +si.po: 36 translated messages, 55 untranslated messages. +rm -f sl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sl.gmo sl.po +rm -f so.gmo && /usr/bin/msgfmt -c --statistics --verbose -o so.gmo so.po +sk.po: 54 translated messages, 37 untranslated messages. +rm -f sq.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sq.gmo sq.po +rm -f sr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr.gmo sr.po +so.po: 0 translated messages, 91 untranslated messages. +sl.po: 55 translated messages, 36 untranslated messages. +rm -f sr@latin.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr@latin.gmo sr@latin.po +sq.po: 52 translated messages, 39 untranslated messages. +rm -f sv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sv.gmo sv.po +sr.po: 91 translated messages. +rm -f sw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sw.gmo sw.po +sv.po: 80 translated messages, 11 untranslated messages. +rm -f ta.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ta.gmo ta.po +sr@latin.po: 46 translated messages, 45 untranslated messages. +rm -f te.gmo && /usr/bin/msgfmt -c --statistics --verbose -o te.gmo te.po +sw.po: 0 translated messages, 91 untranslated messages. +rm -f tg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tg.gmo tg.po +rm -f th.gmo && /usr/bin/msgfmt -c --statistics --verbose -o th.gmo th.po +ta.po: 46 translated messages, 45 untranslated messages. +te.po: 41 translated messages, 50 untranslated messages. +rm -f tk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tk.gmo tk.po +tg.po: 0 translated messages, 91 untranslated messages. +rm -f tl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tl.gmo tl.po +rm -f tr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tr.gmo tr.po +th.po: 45 translated messages, 46 untranslated messages. +tk.po: 7 translated messages, 84 untranslated messages. +rm -f ts.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ts.gmo ts.po +tl.po: 0 translated messages, 91 untranslated messages. +tr.po: 58 translated messages, 33 untranslated messages. +rm -f tt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tt.gmo tt.po +rm -f ug.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ug.gmo ug.po +ts.po: 0 translated messages, 91 untranslated messages. +rm -f uk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uk.gmo uk.po +ug.po: 6 translated messages, 85 untranslated messages. +tt.po:7: warning: header field 'Last-Translator' still has the initial default value +tt.po: 0 translated messages, 91 untranslated messages. +rm -f ur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur.gmo ur.po +rm -f ur_PK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur_PK.gmo ur_PK.po +uk.po: 58 translated messages, 33 untranslated messages. +rm -f vi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o vi.gmo vi.po +ur.po: 7 translated messages, 84 untranslated messages. +ur_PK.po:7: warning: header field 'Last-Translator' still has the initial default value +ur_PK.po: 0 translated messages, 91 untranslated messages. +rm -f uz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uz.gmo uz.po +rm -f wa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o wa.gmo wa.po +vi.po: 52 translated messages, 39 untranslated messages. +rm -f xh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o xh.gmo xh.po +rm -f yi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yi.gmo yi.po +wa.po: 9 translated messages, 82 untranslated messages. +uz.po: 26 translated messages, 65 untranslated messages. +xh.po: 8 translated messages, 83 untranslated messages. +yi.po:7: warning: header field 'Last-Translator' still has the initial default value +yi.po: 0 translated messages, 91 untranslated messages. +rm -f yo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yo.gmo yo.po +rm -f zh_CN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_CN.gmo zh_CN.po +rm -f zh_HK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_HK.gmo zh_HK.po +rm -f zh_TW.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_TW.gmo zh_TW.po +zh_CN.po: 63 translated messages, 28 untranslated messages. +rm -f zu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zu.gmo zu.po +yo.po: 5 translated messages, 86 untranslated messages. +zh_HK.po: 47 translated messages, 44 untranslated messages. +zh_TW.po: 91 translated messages. +zu.po: 3 translated messages, 88 untranslated messages. +make[3]: Leaving directory '/rootdir/po' +touch stamp-po +make[2]: Leaving directory '/rootdir/po' +Making all in libcafekbd +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml + GEN cafekbd-indicator-marshal.h + GEN cafekbd-keyboard-drawing-marshal.h +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +INFO: Reading ./cafekbd-indicator-marshal.list... +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... + GEN cafekbd-indicator-marshal.c + GEN cafekbd-keyboard-drawing-marshal.c +INFO: Reading ./cafekbd-indicator-marshal.list... +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... +make all-am +make[3]: Entering directory '/rootdir/libcafekbd' + CC libcafekbd_la-cafekbd-desktop-config.lo + CC libcafekbd_la-cafekbd-keyboard-config.lo + CC libcafekbd_la-cafekbd-util.lo + CC libcafekbdui_la-cafekbd-indicator-config.lo + CC libcafekbdui_la-cafekbd-indicator.lo +cafekbd-desktop-config.c: In function 'cafekbd_desktop_config_load_from_gsettings': +cafekbd-desktop-config.c:176:38: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 176 | || config->default_group >= + | ^~ +cafekbd-indicator-config.c: In function 'cafekbd_indicator_config_get_images_file': +cafekbd-indicator-config.c:152:59: warning: comparison of integer expressions of different signedness: 'guint' {aka 'unsigned int'} and 'int' [-Wsign-compare] + 152 | (g_strv_length (kbd_config->layouts_variants) > group)) { + | ^ +cafekbd-indicator.c:86:1: warning: function declaration isn't a prototype [-Wstrict-prototypes] + 86 | cafekbd_indicator_load_images () + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator.c:143:1: warning: function declaration isn't a prototype [-Wstrict-prototypes] + 143 | cafekbd_indicator_free_images () + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator.c:282:1: warning: no previous prototype for 'cafekbd_indicator_extract_layout_name' [-Wmissing-prototypes] + 282 | cafekbd_indicator_extract_layout_name (int group, XklEngine * engine, + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator.c: In function 'cafekbd_indicator_extract_layout_name': +cafekbd-indicator.c:288:19: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 288 | if (group < g_strv_length (short_group_names)) { + | ^ +cafekbd-indicator.c: At top level: +cafekbd-indicator.c:326:1: warning: no previous prototype for 'cafekbd_indicator_create_label_title' [-Wmissing-prototypes] + 326 | cafekbd_indicator_create_label_title (int group, GHashTable ** ln2cnt_map, + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator.c: In function 'cafekbd_indicator_prepare_drawing': +cafekbd-indicator.c:413:31: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 413 | if (group + 1 == + | ^~ +cafekbd-indicator.c: In function 'cafekbd_indicator_update_tooltips': +cafekbd-indicator.c:441:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 441 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-indicator.c:445:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 445 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-indicator.c: In function 'cafekbd_indicator_kbd_cfg_callback': +cafekbd-indicator.c:61:44: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 61 | CafekbdIndicator * gki = (CafekbdIndicator*)cur->data; + | ^~~ +cafekbd-indicator.c:556:9: note: in expansion of macro 'ForAllIndicators' + 556 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-indicator.c:534:55: note: shadowed declaration is here + 534 | cafekbd_indicator_kbd_cfg_callback (CafekbdIndicator *gki G_GNUC_UNUSED) +cafekbd-indicator.c: In function 'cafekbd_indicator_start_listen': +cafekbd-indicator.c:642:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 642 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:645:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 645 | (CdkFilterFunc) + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_stop_listen': +cafekbd-indicator.c:658:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 658 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:662:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 662 | (CdkFilterFunc) cafekbd_indicator_filter_x_evt, NULL); + | ^ + CC libcafekbdui_la-cafekbd-status.lo +cafekbd-status.c: In function 'cafekbd_status_render_cairo': +cafekbd-status.c:214:23: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 214 | if (group + 1 == xkl_engine_get_num_groups (globals.engine)) { + | ^~ +cafekbd-status.c: In function 'cafekbd_status_prepare_drawing': +cafekbd-status.c:376:51: warning: cast between incompatible function types from 'void (*)(void *)' to 'void (*)(guchar *, void *)' {aka 'void (*)(unsigned char *, void *)'} [-Wcast-function-type] + 376 | (GdkPixbufDestroyNotify) + | ^ +cafekbd-status.c: In function 'cafekbd_status_update_tooltips': +cafekbd-status.c:395:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 395 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-status.c:399:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 399 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-status.c: In function 'cafekbd_status_kbd_cfg_callback': +cafekbd-status.c:77:41: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 77 | CafekbdStatus * gki = (CafekbdStatus*)cur->data; + | ^~~ +cafekbd-status.c:508:9: note: in expansion of macro 'ForAllIndicators' + 508 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-status.c:484:49: note: shadowed declaration is here + 484 | cafekbd_status_kbd_cfg_callback (CafekbdStatus *gki G_GNUC_UNUSED) +cafekbd-status.c: In function 'cafekbd_status_start_listen': +cafekbd-status.c:594:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 594 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:597:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 597 | (CdkFilterFunc) cafekbd_status_filter_x_evt, + | ^ +cafekbd-status.c: In function 'cafekbd_status_stop_listen': +cafekbd-status.c:610:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 610 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:614:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 614 | (CdkFilterFunc) cafekbd_status_filter_x_evt, NULL); + | ^ + CC libcafekbdui_la-cafekbd-indicator-marshal.lo +cafekbd-indicator-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ + CC libcafekbdui_la-cafekbd-keyboard-drawing-marshal.lo +cafekbd-keyboard-drawing-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + CC libcafekbdui_la-cafekbd-keyboard-drawing.lo +cafekbd-keyboard-drawing.c: In function 'draw_polygon': +cafekbd-keyboard-drawing.c:322:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 322 | for (i = 0; i < num_points; i++) { + | ^ +cafekbd-keyboard-drawing.c: In function 'process_indicators_state_notify': +cafekbd-keyboard-drawing.c:2131:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'long unsigned int' [-Wsign-compare] + 2131 | for (i = 0; i <= drawing->xkb->indicators->phys_indicators; i++) + | ^~ +cafekbd-keyboard-drawing.c: In function 'cafekbd_keyboard_drawing_get_type': +cafekbd-keyboard-drawing.c:2394:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawingClass *)' {aka 'void (*)(struct _CafekbdKeyboardDrawingClass *)'} to 'void (*)(void *, void *)' [-Wcast-function-type] + 2394 | (GClassInitFunc) cafekbd_keyboard_drawing_class_init, + | ^ +cafekbd-keyboard-drawing.c:2399:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawing *)' {aka 'void (*)(struct _CafekbdKeyboardDrawing *)'} to 'void (*)(GTypeInstance *, void *)' {aka 'void (*)(struct _GTypeInstance *, void *)'} [-Wcast-function-type] + 2399 | (GInstanceInitFunc) cafekbd_keyboard_drawing_init, + | ^ + GEN org.cafe.peripherals-keyboard-xkb.gschema.valid + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:114:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 114 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbd.la + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspect60diyfjp/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspect60diyfjp/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspect60diyfjp/Cafekbd-1.0.c:239:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 239 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspect60diyfjp/Cafekbd-1.0.c:246:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 246 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspect60diyfjp/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +5 warnings generated. + GICOMP Cafekbd-1.0.gir +make[3]: Leaving directory '/rootdir/libcafekbd' +make[2]: Leaving directory '/rootdir/libcafekbd' +Making all in test +make[2]: Entering directory '/rootdir/test' + CC cafekbd_indicator_test-cafekbd-indicator-test.o + CC cafekbd_keyboard_drawing_test-cafekbd-keyboard-drawing-test.o + CC cafekbd_status_test-cafekbd-status-test.o +cafekbd-keyboard-drawing-test.c:187:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 187 | g_print ("kbdraw %s\n", VERSION); + | ^~~~~~~ +cafekbd-keyboard-drawing-test.c:194:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 194 | g_printerr ("--groups: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:199:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 199 | g_printerr ("--levels: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:225:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 225 | cafekbd_keyboard_drawing_set_track_modifiers + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:228:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 228 | cafekbd_keyboard_drawing_set_track_config + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:248:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 248 | names.keycodes = keycodes; + | ^~~~~~~~ +cafekbd-keyboard-drawing-test.c:256:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 256 | names.geometry = geometry; + | ^~~~~~~~ +7 warnings generated. + CCLD cafekbd-keyboard-drawing-test + CCLD cafekbd-indicator-test + CCLD cafekbd-status-test +make[2]: Leaving directory '/rootdir/test' +make[2]: Entering directory '/rootdir' +make[2]: Leaving directory '/rootdir' +make[1]: Leaving directory '/rootdir' +scan-build: Analysis run complete. +scan-build: 11 bugs found. +scan-build: Run 'scan-view /rootdir/html-report/2025-02-06-112017-14435-1' to examine bug reports. +Making check in po +make[1]: Entering directory '/rootdir/po' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/po' +Making check in libcafekbd +make[1]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +make check-am +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:113:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 113 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspectzfm2vdbe/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectzfm2vdbe/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectzfm2vdbe/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +3 warnings generated. + GICOMP Cafekbd-1.0.gir +make[2]: Leaving directory '/rootdir/libcafekbd' +make[1]: Leaving directory '/rootdir/libcafekbd' +Making check in test +make[1]: Entering directory '/rootdir/test' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/test' +make[1]: Entering directory '/rootdir' +make[1]: Leaving directory '/rootdir' + Listing... 0% Listing... 0% Listing... 0% adduser/testing,now 3.137 all [installed,automatic] +advaita-icon-theme/unknown,now 3.25.0-1 all [installed,automatic] +apt/testing,now 2.9.26 amd64 [installed,automatic] +aptitude-common/testing,now 0.8.13-6.1 all [installed,automatic] +aptitude/testing,now 0.8.13-6.1 amd64 [installed] +at-spi2-common/testing,now 2.55.0.1-1 all [installed,automatic] +at-spi2-core/testing,now 2.55.0.1-1 amd64 [installed,automatic] +autoconf-archive/testing,now 20220903-3 all [installed] +autoconf/testing,now 2.72-3 all [installed,automatic] +automake/testing,now 1:1.16.5-1.3 all [installed,automatic] +autopoint/testing,now 0.23.1-1 all [installed] +autotools-dev/testing,now 20220109.1 all [installed,automatic] +base-files/testing,now 13.6 amd64 [installed,automatic] +base-passwd/testing,now 3.6.6 amd64 [installed,automatic] +bash/testing,now 5.2.37-1 amd64 [installed,automatic] +binfmt-support/testing,now 2.2.2-7 amd64 [installed,automatic] +binutils-common/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils-gold-x86-64-linux-gnu/testing,now 2.44-1 amd64 [installed,automatic] +binutils-gold/testing,now 2.44-1 amd64 [installed,automatic] +binutils-x86-64-linux-gnu/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +bsdutils/testing,now 1:2.40.4-2 amd64 [installed,automatic] +build-essential/testing,now 12.12 amd64 [installed,automatic] +bzip2-doc/testing,now 1.0.8-6 all [installed,automatic] +bzip2/testing,now 1.0.8-6 amd64 [installed,automatic] +ca-certificates/testing,now 20241223 all [installed,automatic] +clang-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools/testing,now 1:19.0-63 amd64 [installed] +clang/testing,now 1:19.0-63 amd64 [installed] +coreutils/testing,now 9.5-1+b1 amd64 [installed,automatic] +cpp-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-14/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cpp/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cppcheck/testing,now 2.16.0-1 amd64 [installed] +ctk-update-icon-cache/unknown,now 3.25.6-1 amd64 [installed,automatic] +dash/testing,now 0.5.12-12 amd64 [installed,automatic] +dbus-bin/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-daemon/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-session-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-system-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-user-session/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus/testing,now 1.16.0-1 amd64 [installed,automatic] +dconf-gsettings-backend/testing,now 0.40.0-5 amd64 [installed,automatic] +dconf-service/testing,now 0.40.0-5 amd64 [installed,automatic] +debconf/testing,now 1.5.89 all [installed,automatic] +debian-archive-keyring/testing,now 2023.4 all [installed,automatic] +debianutils/testing,now 5.21 amd64 [installed,automatic] +diffutils/testing,now 1:3.10-2 amd64 [installed,automatic] +dirmngr/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +dmsetup/testing,now 2:1.02.201-1 amd64 [installed,automatic] +dpkg-dev/testing,now 1.22.14 all [installed,automatic] +dpkg/testing,now 1.22.14 amd64 [installed,automatic] +e2fsprogs/testing,now 1.47.2-1 amd64 [installed,automatic] +expect/testing,now 5.45.4-3+b1 amd64 [installed] +fakeroot/testing,now 1.37-1 amd64 [installed,automatic] +file/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +findutils/testing,now 4.10.0-3 amd64 [installed,automatic] +fontconfig-config/testing,now 2.15.0-2 amd64 [installed,automatic] +fontconfig/testing,now 2.15.0-2 amd64 [installed,automatic] +fonts-dejavu-core/testing,now 2.37-8 all [installed,automatic] +fonts-dejavu-mono/testing,now 2.37-8 all [installed,automatic] +g++-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-14/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +g++/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc-14-base/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gettext-base/testing,now 0.23.1-1 amd64 [installed,automatic] +gettext/testing,now 0.23.1-1 amd64 [installed] +gir1.2-atk-1.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-atspi-2.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-ctk-3.0/unknown,now 3.25.6-1 amd64 [installed] +gir1.2-freedesktop-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-freedesktop/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-gdkpixbuf-2.0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +gir1.2-girepository-2.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-girepository-2.0/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-glib-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-glib-2.0/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-harfbuzz-0.0/testing,now 10.2.0-1 amd64 [installed,automatic] +gir1.2-pango-1.0/testing,now 1.56.1-1 amd64 [installed,automatic] +gir1.2-xkl-1.0/testing,now 5.4-5+b2 amd64 [installed,automatic] +girepository-tools/testing,now 2.82.4-2 amd64 [installed,automatic] +git-man/testing,now 1:2.47.2-0.1 all [installed,automatic] +git/testing,now 1:2.47.2-0.1 amd64 [installed] +gnupg-l10n/testing,now 2.2.46-1 all [installed,automatic] +gnupg-utils/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gnupg/testing,now 2.2.46-1 all [installed,automatic] +gobject-introspection-bin/testing,now 1.82.0-4 amd64 [installed,automatic] +gobject-introspection/testing,now 1.82.0-4 amd64 [installed] +gpg-agent/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg-wks-client/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgconf/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgsm/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgv/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +grep/testing,now 3.11-4 amd64 [installed,automatic] +gsettings-desktop-schemas/testing,now 47.1-1 all [installed,automatic] +gzip/testing,now 1.13-1 amd64 [installed,automatic] +hicolor-icon-theme/testing,now 0.18-2 all [installed,automatic] +hostname/testing,now 3.25 amd64 [installed,automatic] +icu-devtools/testing,now 72.1-6 amd64 [installed,automatic] +init-system-helpers/testing,now 1.68 all [installed,automatic] +krb5-locales/testing,now 1.21.3-4 all [installed,automatic] +less/testing,now 643-1 amd64 [installed,automatic] +lib32gcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +lib32stdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libacl1/testing,now 2.3.2-2+b1 amd64 [installed,automatic] +libalgorithm-diff-perl/testing,now 1.201-1 all [installed,automatic] +libalgorithm-diff-xs-perl/testing,now 0.04-8+b4 amd64 [installed,automatic] +libalgorithm-merge-perl/testing,now 0.08-5 all [installed,automatic] +libapparmor1/testing,now 3.1.7-1+b3 amd64 [installed,automatic] +libapt-pkg6.0t64/testing,now 2.9.26 amd64 [installed,automatic] +libasan8/testing,now 14.2.0-12 amd64 [installed,automatic] +libassuan9/testing,now 3.0.1-2 amd64 [installed,automatic] +libatk-bridge2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk-bridge2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatomic1/testing,now 14.2.0-12 amd64 [installed,automatic] +libatspi2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatspi2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libattr1/testing,now 1:2.5.2-2 amd64 [installed,automatic] +libaudit-common/testing,now 1:4.0.2-2 all [installed,automatic] +libaudit1/testing,now 1:4.0.2-2+b1 amd64 [installed,automatic] +libavahi-client3/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common-data/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common3/testing,now 0.8-16 amd64 [installed,automatic] +libbinutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libblkid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libblkid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libboost-iostreams1.83.0/testing,now 1.83.0-4 amd64 [installed,automatic] +libbrotli-dev/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbrotli1/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbsd0/testing,now 0.12.2-2 amd64 [installed,automatic] +libbz2-1.0/testing,now 1.0.8-6 amd64 [installed,automatic] +libbz2-dev/testing,now 1.0.8-6 amd64 [installed,automatic] +libc-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc-dev-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc6-dev/testing,now 2.40-6 amd64 [installed,automatic] +libc6-i386/testing,now 2.40-6 amd64 [installed,automatic] +libc6/testing,now 2.40-6 amd64 [installed,automatic] +libcairo-gobject2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo-script-interpreter2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2-dev/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcap-dev/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcap-ng0/testing,now 0.8.5-4 amd64 [installed,automatic] +libcap2/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcbor0.10/testing,now 0.10.2-2 amd64 [installed,automatic] +libcc1-0/testing,now 14.2.0-12 amd64 [installed,automatic] +libclang-common-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-cpp19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-rt-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang1-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libcolord2/testing,now 1.4.7-1+b2 amd64 [installed,automatic] +libcom-err2/testing,now 1.47.2-1 amd64 [installed,automatic] +libcrypt-dev/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcrypt1/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcryptsetup12/testing,now 2:2.7.5-1 amd64 [installed,automatic] +libctf-nobfd0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctf0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctk-3-0/unknown,now 3.25.6-1 amd64 [installed] +libctk-3-bin/unknown,now 3.25.6-1 amd64 [installed,automatic] +libctk-3-common/unknown,now 3.25.6-1 all [installed] +libctk-3-dev/unknown,now 3.25.6-1 amd64 [installed] +libcups2t64/testing,now 2.4.10-2+b1 amd64 [installed,automatic] +libcurl3t64-gnutls/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcurl4t64/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcwidget4/testing,now 0.5.18-6+b2 amd64 [installed,automatic] +libdatrie-dev/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdatrie1/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdav1d7/testing,now 1.5.1-1 amd64 [installed,automatic] +libdb5.3t64/testing,now 5.3.28+dfsg2-9 amd64 [installed,automatic] +libdbus-1-3/testing,now 1.16.0-1 amd64 [installed,automatic] +libdbus-1-dev/testing,now 1.16.0-1 amd64 [installed,automatic] +libdconf1/testing,now 0.40.0-5 amd64 [installed,automatic] +libdebconfclient0/testing,now 0.277 amd64 [installed,automatic] +libdeflate-dev/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdeflate0/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdevmapper1.02.1/testing,now 2:1.02.201-1 amd64 [installed,automatic] +libdpkg-perl/testing,now 1.22.14 all [installed,automatic] +libdrm-amdgpu1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-common/testing,now 2.4.123-1 all [installed,automatic] +libdrm-intel1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-radeon1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm2/testing,now 2.4.123-1 amd64 [installed,automatic] +libedit2/testing,now 3.1-20250104-1 amd64 [installed,automatic] +libegl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libegl-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1-mesa-dev/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libelf1t64/testing,now 0.192-4 amd64 [installed,automatic] +libepoxy-dev/testing,now 1.5.10-2 amd64 [installed,automatic] +libepoxy0/testing,now 1.5.10-2 amd64 [installed,automatic] +liberror-perl/testing,now 0.17029-2 all [installed,automatic] +libexpat1-dev/testing,now 2.6.4-1 amd64 [installed,automatic] +libexpat1/testing,now 2.6.4-1 amd64 [installed,automatic] +libext2fs2t64/testing,now 1.47.2-1 amd64 [installed,automatic] +libfakeroot/testing,now 1.37-1 amd64 [installed,automatic] +libffi-dev/testing,now 3.4.6-1 amd64 [installed,automatic] +libffi8/testing,now 3.4.6-1 amd64 [installed,automatic] +libfido2-1/testing,now 1.15.0-1+b1 amd64 [installed,automatic] +libfile-fcntllock-perl/testing,now 0.22-4+b4 amd64 [installed,automatic] +libfontconfig-dev/testing,now 2.15.0-2 amd64 [installed,automatic] +libfontconfig1/testing,now 2.15.0-2 amd64 [installed,automatic] +libfreetype-dev/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfreetype6/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfribidi-dev/testing,now 1.0.16-1 amd64 [installed,automatic] +libfribidi0/testing,now 1.0.16-1 amd64 [installed,automatic] +libgbm1/testing,now 24.2.8-1 amd64 [installed,automatic] +libgc1/testing,now 1:8.2.8-1 amd64 [installed,automatic] +libgcc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcrypt20/testing,now 1.11.0-7 amd64 [installed,automatic] +libgdbm-compat4t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdbm6t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-dev/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-bin/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-common/testing,now 2.42.12+dfsg-2 all [installed,automatic] +libgio-2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libgio-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository-1.0-1/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-1.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-2.0-0/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository1.0-dev/testing,now 1.82.0-4 amd64 [installed] +libgl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgl1-mesa-dri/testing,now 24.2.8-1 amd64 [installed,automatic] +libgl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglapi-mesa/testing,now 24.2.8-1 amd64 [installed,automatic] +libgles-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles2/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglib2.0-0t64/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-data/testing,now 2.82.4-2 all [installed,automatic] +libglib2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-dev/testing,now 2.82.4-2 amd64 [installed] +libglvnd-core-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libglx0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgmp10/testing,now 2:6.3.0+dfsg-3 amd64 [installed,automatic] +libgnutls30t64/testing,now 3.8.8-2 amd64 [installed,automatic] +libgomp1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgpg-error-l10n/testing,now 1.51-3 all [installed,automatic] +libgpg-error0/testing,now 1.51-3 amd64 [installed,automatic] +libgpm2/testing,now 1.20.7-11+b2 amd64 [installed,automatic] +libgprofng0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libgraphite2-3/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgraphite2-dev/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgssapi-krb5-2/testing,now 1.21.3-4 amd64 [installed,automatic] +libharfbuzz-cairo0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-dev/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-gobject0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-icu0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-subset0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz0b/testing,now 10.2.0-1 amd64 [installed,automatic] +libhogweed6t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libhwasan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libice-dev/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libice6/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libicu-dev/testing,now 72.1-6 amd64 [installed,automatic] +libicu72/testing,now 72.1-6 amd64 [installed,automatic] +libidn2-0/testing,now 2.3.7-2+b1 amd64 [installed,automatic] +libisl23/testing,now 0.27-1 amd64 [installed,automatic] +libitm1/testing,now 14.2.0-12 amd64 [installed,automatic] +libjansson4/testing,now 2.14-2+b3 amd64 [installed,automatic] +libjbig-dev/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjbig0/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjpeg-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjson-c5/testing,now 0.18+ds-1 amd64 [installed,automatic] +libk5crypto3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkeyutils1/testing,now 1.6.3-4 amd64 [installed,automatic] +libkmod2/testing,now 33+20240816-2 amd64 [installed,automatic] +libkrb5-3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkrb5support0/testing,now 1.21.3-4 amd64 [installed,automatic] +libksba8/testing,now 1.6.7-2+b1 amd64 [installed,automatic] +liblcms2-2/testing,now 2.16-2 amd64 [installed,automatic] +libldap-common/testing,now 2.6.9+dfsg-1 all [installed,automatic] +libldap2/testing,now 2.6.9+dfsg-1 amd64 [installed,automatic] +liblerc-dev/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +liblerc4/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +libllvm19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +liblocale-gettext-perl/testing,now 1.07-7+b1 amd64 [installed,automatic] +liblsan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libltdl-dev/testing,now 2.5.4-2 amd64 [installed,automatic] +libltdl7/testing,now 2.5.4-2 amd64 [installed,automatic] +liblz4-1/testing,now 1.10.0-3 amd64 [installed,automatic] +liblzma-dev/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzma5/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzo2-2/testing,now 2.10-3+b1 amd64 [installed,automatic] +libmagic-mgc/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmagic1t64/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmd0/testing,now 1.1.0-2+b1 amd64 [installed,automatic] +libmount-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libmount1/testing,now 2.40.4-2 amd64 [installed,automatic] +libmpc3/testing,now 1.3.1-1+b3 amd64 [installed,automatic] +libmpfr6/testing,now 4.2.1-1+b2 amd64 [installed,automatic] +libncurses-dev/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncurses6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncursesw6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libnettle8t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libnghttp2-14/testing,now 1.64.0-1 amd64 [installed,automatic] +libnghttp3-9/testing,now 1.6.0-2 amd64 [installed,automatic] +libngtcp2-16/testing,now 1.9.1-1 amd64 [installed,automatic] +libngtcp2-crypto-gnutls8/testing,now 1.9.1-1 amd64 [installed,automatic] +libnpth0t64/testing,now 1.8-2 amd64 [installed,automatic] +libnss-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libobjc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libobjc4/testing,now 14.2.0-12 amd64 [installed,automatic] +libopengl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libopengl0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libp11-kit0/testing,now 0.25.5-3 amd64 [installed,automatic] +libpam-modules-bin/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-modules/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-runtime/testing,now 1.7.0-2 all [installed,automatic] +libpam-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libpam0g/testing,now 1.7.0-2 amd64 [installed,automatic] +libpango-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpango1.0-dev/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangocairo-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoft2-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoxft-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpciaccess0/testing,now 0.17-3+b3 amd64 [installed,automatic] +libpcre2-16-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-32-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-8-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-dev/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-posix3/testing,now 10.44-5 amd64 [installed,automatic] +libperl5.40/testing,now 5.40.0-8 amd64 [installed,automatic] +libpfm4/testing,now 4.13.0+git83-g91970fe-1 amd64 [installed,automatic] +libpipeline1/testing,now 1.5.8-1 amd64 [installed,automatic] +libpixman-1-0/testing,now 0.44.0-3 amd64 [installed,automatic] +libpixman-1-dev/testing,now 0.44.0-3 amd64 [installed,automatic] +libpkgconf3/testing,now 1.8.1-4 amd64 [installed,automatic] +libpng-dev/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng-tools/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng16-16t64/testing,now 1.6.44-3 amd64 [installed,automatic] +libproc2-0/testing,now 2:4.0.4-7 amd64 [installed,automatic] +libpsl5t64/testing,now 0.21.2-1.1+b1 amd64 [installed,automatic] +libpython3-stdlib/testing,now 3.13.1-2 amd64 [installed,automatic] +libpython3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libpython3.13-stdlib/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libquadmath0/testing,now 14.2.0-12 amd64 [installed,automatic] +libreadline8t64/testing,now 8.2-6 amd64 [installed,automatic] +librsvg2-2/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librsvg2-common/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librtmp1/testing,now 2.4+20151223.gitfa8646d.1-2+b5 amd64 [installed,automatic] +libsasl2-2/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules-db/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libseccomp2/testing,now 2.5.5-2 amd64 [installed,automatic] +libselinux1-dev/testing,now 3.7-3.1 amd64 [installed,automatic] +libselinux1/testing,now 3.7-3.1 amd64 [installed,automatic] +libsemanage-common/testing,now 3.7-2.1 all [installed,automatic] +libsemanage2/testing,now 3.7-2.1 amd64 [installed,automatic] +libsensors-config/testing,now 1:3.6.0-10 all [installed,automatic] +libsensors5/testing,now 1:3.6.0-10+b1 amd64 [installed,automatic] +libsepol-dev/testing,now 3.7-1 amd64 [installed,automatic] +libsepol2/testing,now 3.7-1 amd64 [installed,automatic] +libsframe1/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libsharpyuv-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsharpyuv0/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsigc++-2.0-0v5/testing,now 2.12.1-3 amd64 [installed,automatic] +libsm-dev/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsm6/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsmartcols1/testing,now 2.40.4-2 amd64 [installed,automatic] +libsqlite3-0/testing,now 3.46.1-1 amd64 [installed,automatic] +libss2/testing,now 1.47.2-1 amd64 [installed,automatic] +libssh2-1t64/testing,now 1.11.1-1 amd64 [installed,automatic] +libssl3t64/testing,now 3.4.0-2 amd64 [installed,automatic] +libstdc++-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libstdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libsysprof-capture-4-dev/testing,now 47.2-1 amd64 [installed,automatic] +libsystemd-dev/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd-shared/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd0/testing,now 257.2-3 amd64 [installed,automatic] +libtasn1-6/testing,now 4.19.0-3+b3 amd64 [installed,automatic] +libtcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +libthai-data/testing,now 0.1.29-2 all [installed,automatic] +libthai-dev/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libthai0/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libtiff-dev/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiff6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiffxx6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtinfo6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libtinyxml2-10/testing,now 10.0.0+dfsg-2+b2 amd64 [installed,automatic] +libtool/testing,now 2.5.4-2 all [installed] +libtsan2/testing,now 14.2.0-12 amd64 [installed,automatic] +libubsan1/testing,now 14.2.0-12 amd64 [installed,automatic] +libudev1/testing,now 257.2-3 amd64 [installed,automatic] +libunistring5/testing,now 1.3-1 amd64 [installed,automatic] +libuuid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libvulkan1/testing,now 1.4.304.0-1 amd64 [installed,automatic] +libwayland-bin/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-client0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-cursor0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-dev/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-egl1/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-server0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwebp-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebp7/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdecoder3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdemux2/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpmux3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libx11-6/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-data/testing,now 2:1.8.10-2 all [installed,automatic] +libx11-dev/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-xcb1/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libxapian30/testing,now 1.4.25-2 amd64 [installed,automatic] +libxau-dev/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxau6/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxaw7/testing,now 2:1.0.16-1 amd64 [installed,automatic] +libxcb-dri2-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-dri3-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-glx0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-present0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-randr0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-sync1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-xfixes0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcomposite-dev/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcomposite1/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcursor-dev/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxcursor1/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxdamage-dev/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdamage1/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdmcp-dev/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxdmcp6/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxext-dev/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxext6/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxfixes-dev/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxfixes3/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxft-dev/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxft2/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxi-dev/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxi6/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxinerama-dev/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxinerama1/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxkbcommon-dev/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbcommon0/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbfile1/testing,now 1:1.1.0-1+b4 amd64 [installed,automatic] +libxklavier-dev/testing,now 5.4-5+b2 amd64 [installed] +libxklavier16/testing,now 5.4-5+b2 amd64 [installed,automatic] +libxml2-dev/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxml2-utils/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed] +libxml2/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxmu6/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxmuu1/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxpm4/testing,now 1:3.5.17-1+b3 amd64 [installed,automatic] +libxrandr-dev/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrandr2/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrender-dev/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxrender1/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxshmfence1/testing,now 1.3-1+b3 amd64 [installed,automatic] +libxt6t64/testing,now 1:1.2.1-1.2+b2 amd64 [installed,automatic] +libxtst-dev/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxtst6/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxxf86vm1/testing,now 1:1.1.4-1+b4 amd64 [installed,automatic] +libxxhash0/testing,now 0.8.2-2+b2 amd64 [installed,automatic] +libyaml-0-2/testing,now 0.2.5-2 amd64 [installed,automatic] +libz3-4/testing,now 4.13.3-1 amd64 [installed,automatic] +libz3-dev/testing,now 4.13.3-1 amd64 [installed,automatic] +libzstd-dev/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +libzstd1/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +linux-libc-dev/testing,now 6.12.11-1 all [installed,automatic] +linux-sysctl-defaults/testing,now 4.11 all [installed,automatic] +llvm-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-linker-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-runtime/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +login.defs/testing,now 1:4.16.0-7 all [installed,automatic] +login/testing,now 1:4.16.0-2+really2.40.4-2 amd64 [installed,automatic] +logsave/testing,now 1.47.2-1 amd64 [installed,automatic] +m4/testing,now 1.4.19-5 amd64 [installed,automatic] +make/testing,now 4.4.1-1 amd64 [installed] +manpages-dev/testing,now 6.9.1-1 all [installed,automatic] +manpages/testing,now 6.9.1-1 all [installed,automatic] +mawk/testing,now 1.3.4.20240905-1 amd64 [installed,automatic] +media-types/testing,now 10.1.0 all [installed,automatic] +mesa-libgallium/testing,now 24.2.8-1 amd64 [installed,automatic] +mesa-vulkan-drivers/testing,now 24.2.8-1 amd64 [installed,automatic] +mount/testing,now 2.40.4-2 amd64 [installed,automatic] +native-architecture/testing,now 0.2.5 all [installed,automatic] +ncurses-base/testing,now 6.5-2 all [installed,automatic] +ncurses-bin/testing,now 6.5-2+b1 amd64 [installed,automatic] +netbase/testing,now 6.4 all [installed,automatic] +openssh-client/testing,now 1:9.9p1-3 amd64 [installed,automatic] +openssl-provider-legacy/testing,now 3.4.0-2 amd64 [installed,automatic] +openssl/testing,now 3.4.0-2 amd64 [installed,automatic] +pango1.0-tools/testing,now 1.56.1-1 amd64 [installed,automatic] +passwd/testing,now 1:4.16.0-7 amd64 [installed,automatic] +patch/testing,now 2.7.6-7 amd64 [installed,automatic] +perl-base/testing,now 5.40.0-8 amd64 [installed,automatic] +perl-modules-5.40/testing,now 5.40.0-8 all [installed,automatic] +perl/testing,now 5.40.0-8 amd64 [installed,automatic] +pinentry-curses/testing,now 1.3.1-2 amd64 [installed,automatic] +pkgconf-bin/testing,now 1.8.1-4 amd64 [installed,automatic] +pkgconf/testing,now 1.8.1-4 amd64 [installed,automatic] +procps/testing,now 2:4.0.4-7 amd64 [installed,automatic] +psmisc/testing,now 23.7-1 amd64 [installed,automatic] +publicsuffix/testing,now 20250108.1153-0.1 all [installed,automatic] +python3-autocommand/testing,now 2.2.2-3 all [installed,automatic] +python3-inflect/testing,now 7.3.1-2 all [installed,automatic] +python3-jaraco.context/testing,now 6.0.0-1 all [installed,automatic] +python3-jaraco.functools/testing,now 4.1.0-1 all [installed,automatic] +python3-jaraco.text/testing,now 4.0.0-1 all [installed,automatic] +python3-mako/testing,now 1.3.8-2 all [installed,automatic] +python3-markdown/testing,now 3.7-2 all [installed,automatic] +python3-markupsafe/testing,now 2.1.5-1+b2 amd64 [installed,automatic] +python3-minimal/testing,now 3.13.1-2 amd64 [installed,automatic] +python3-more-itertools/testing,now 10.6.0-1 all [installed,automatic] +python3-packaging/testing,now 24.2-1 all [installed,automatic] +python3-pkg-resources/testing,now 75.6.0-1 all [installed,automatic] +python3-pygments/testing,now 2.18.0+dfsg-2 all [installed,automatic] +python3-setuptools/testing,now 75.6.0-1 all [installed,automatic] +python3-typeguard/testing,now 4.4.1-1 all [installed,automatic] +python3-typing-extensions/testing,now 4.12.2-2 all [installed,automatic] +python3-yaml/testing,now 6.0.2-1+b1 amd64 [installed,automatic] +python3-zipp/testing,now 3.21.0-1 all [installed,automatic] +python3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3.13/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3/testing,now 3.13.1-2 amd64 [installed,automatic] +readline-common/testing,now 8.2-6 all [installed,automatic] +rpcsvc-proto/testing,now 1.4.3-1 amd64 [installed,automatic] +sed/testing,now 4.9-2 amd64 [installed,automatic] +sensible-utils/testing,now 0.0.24 all [installed,automatic] +sgml-base/testing,now 1.31 all [installed,automatic] +shared-mime-info/testing,now 2.4-5+b2 amd64 [installed,automatic] +sqv/testing,now 1.2.1-5 amd64 [installed,automatic] +systemd-cryptsetup/testing,now 257.2-3 amd64 [installed,automatic] +systemd-sysv/testing,now 257.2-3 amd64 [installed,automatic] +systemd-timesyncd/testing,now 257.2-3 amd64 [installed,automatic] +systemd/testing,now 257.2-3 amd64 [installed,automatic] +sysvinit-utils/testing,now 3.13-1 amd64 [installed,automatic] +tar/testing,now 1.35+dfsg-3.1 amd64 [installed,automatic] +tcl-expect/testing,now 5.45.4-3+b1 amd64 [installed,automatic] +tcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +tzdata/testing,now 2024b-6 all [installed,automatic] +util-linux/testing,now 2.40.4-2 amd64 [installed,automatic] +uuid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +wayland-protocols/testing,now 1.39-1 all [installed,automatic] +wget/testing,now 1.24.5-2+b1 amd64 [installed] +x11-common/testing,now 1:7.7+24 all [installed,automatic] +x11-xkb-utils/testing,now 7.7+9 amd64 [installed,automatic] +x11proto-dev/testing,now 2024.1-1 all [installed,automatic] +xauth/testing,now 1:1.1.2-1.1 amd64 [installed,automatic] +xdg-user-dirs/testing,now 0.18-2 amd64 [installed,automatic] +xkb-data/testing,now 2.42-1 all [installed,automatic] +xml-core/testing,now 0.19 all [installed,automatic] +xorg-sgml-doctools/testing,now 1:1.11-1.1 all [installed,automatic] +xtrans-dev/testing,now 1.4.0-1 all [installed,automatic] +xz-utils/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +zlib1g-dev/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +zlib1g/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +Errors detected in the build 0 +Warnings detected in the logs 99 +cppcheck defects detected in the logs 28 +TOTAL warnings detected in the logs 127 diff --git a/2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/stats.html b/2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/stats.html new file mode 100644 index 0000000..a805ba6 --- /dev/null +++ b/2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/stats.html @@ -0,0 +1,180 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+

Top 10 files for error severity, total findings: 2
+   1  libcafekbd/cafekbd-status.c
+   1  libcafekbd/cafekbd-indicator.c
+

+

Top 10 files for style severity, total findings: 20
+   13  libcafekbd/cafekbd-keyboard-drawing.c
+   6   libcafekbd/cafekbd-keyboard-config.c
+   1   test/cafekbd-status-test.c
+

+

Top 10 files for information severity, total findings: 5
+   1  test/cafekbd-keyboard-drawing-test.c
+   1  libcafekbd/cafekbd-keyboard-drawing.c
+   1  libcafekbd/cafekbd-keyboard-config.c
+   1  libcafekbd/cafekbd-indicator-config.c
+   1  libcafekbd/cafekbd-desktop-config.c
+

+ +
+ +
+ + diff --git a/2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/style.css b/2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/style.css new file mode 100644 index 0000000..3897bfa --- /dev/null +++ b/2025-02-06-112145-6413-cppcheck@1b95ca5afa73_warnings/style.css @@ -0,0 +1,177 @@ + +body { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; + font-size: 13px; + line-height: 1.5; + height: 100%; + margin: 0; +} + +#wrapper { + position: fixed; + height: 100vh; + width: 100vw; + display: grid; + grid-template-rows: fit-content(8rem) auto fit-content(8rem); + grid-template-columns: fit-content(25%) 1fr; + grid-template-areas: + "header header" + "menu content" + "footer footer"; +} + +h1 { + margin: 0 0 8px -2px; + font-size: 175%; +} + +.header { + padding: 0 0 5px 15px; + grid-area: header; + border-bottom: thin solid #aaa; +} + +.footer { + grid-area: footer; + border-top: thin solid #aaa; + font-size: 85%; + +} + +.footer > p { + margin: 4px; +} + +#menu, +#menu_index { + grid-area: menu; + text-align: left; + overflow: auto; + padding: 0 23px 15px 15px; + border-right: thin solid #aaa; + min-width: 200px; +} + +#menu > a { + display: block; + margin-left: 10px; + font-size: 12px; +} + +#content, +#content_index { + grid-area: content; + padding: 0px 5px 15px 15px; + overflow: auto; +} + +label { + white-space: nowrap; +} + +label.checkBtn.disabled { + color: #606060; + background: #e0e0e0; + font-style: italic; +} + +label.checkBtn, input[type="text"] { + border: 1px solid grey; + border-radius: 4px; + box-shadow: 1px 1px inset; + padding: 1px 5px; +} + +label.checkBtn { + white-space: nowrap; + background: #ccddff; +} + +label.unchecked { + background: #eff8ff; + box-shadow: 1px 1px 1px; +} + +label.checkBtn:hover, label.unchecked:hover{ + box-shadow: 0 0 2px; +} + +label.disabled:hover { + box-shadow: 1px 1px inset; +} + +label.checkBtn > input { + display:none; +} + +.summaryTable { + width: 100%; +} + +table.summaryTable td { padding: 0 5px 0 5px; } + +.statHeader, .severityHeader { + font-weight: bold; +} + +.warning { + background-color: #ffffa7; +} + +.error { + background-color: #ffb7b7; +} + +.error2 { + background-color: #faa; + display: inline-block; + margin-left: 4px; +} + +.inconclusive { + background-color: #b6b6b4; +} + +.inconclusive2 { + background-color: #b6b6b4; + display: inline-block; + margin-left: 4px; +} + +.verbose { + display: inline-block; + vertical-align: top; + cursor: help; +} + +.verbose .content { + display: none; + position: absolute; + padding: 10px; + margin: 4px; + max-width: 40%; + white-space: pre-wrap; + border: 1px solid #000; + background-color: #ffffcc; + cursor: auto; +} + +.highlight .hll { + padding: 1px; +} + +.highlighttable { + background-color: #fff; + position: relative; + margin: -10px; +} + +.linenos { + border-right: thin solid #aaa; + color: #d3d3d3; + padding-right: 6px; +} + +.id-filtered, .severity-filtered, .file-filtered, .tool-filtered, .text-filtered { + visibility: collapse; +} diff --git a/2025-02-06-114727-14435-1@b1965751dcd5_devel/commitmsg b/2025-02-06-114727-14435-1@b1965751dcd5_devel/commitmsg new file mode 100644 index 0000000..0d05158 --- /dev/null +++ b/2025-02-06-114727-14435-1@b1965751dcd5_devel/commitmsg @@ -0,0 +1 @@ +cafekbd-indicator: Fix [-Wstrict-prototypes] warnings diff --git a/2025-02-06-114727-14435-1@b1965751dcd5_devel/index.html b/2025-02-06-114727-14435-1@b1965751dcd5_devel/index.html new file mode 100644 index 0000000..dbf609a --- /dev/null +++ b/2025-02-06-114727-14435-1@b1965751dcd5_devel/index.html @@ -0,0 +1,138 @@ + + +libcafekbd (clang-tools 1:19.0-63) - scan-build results + + + + + + +

libcafekbd (clang-tools 1:19.0-63) - scan-build results

+ + + + + + + +
User:root@cc5b7aa2d9c7
Working Directory:/rootdir
Command Line:make -j 5
Clang Version:Debian clang version 19.1.6 (1+b1) +
Date:Thu Feb 6 11:47:27 2025
+

Bug Summary

+ + + + + + + + + +
Bug TypeQuantityDisplay?
All Bugs11
Logic error
Dereference of null pointer1
Stream handling error
Invalid stream state1
Stream already in EOF1
Unused code
Unreachable code8
+ +

Filter Results by File

+ + +

Reports

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Bug GroupBug Type ▾FileFunction/MethodLinePath Length
Logic errorDereference of null pointerlibcafekbd/tmp-introspectrjqiw1rh/Cafekbd-1.0.cmain81232View Report
Stream handling errorInvalid stream statelibcafekbd/tmp-introspectrjqiw1rh/Cafekbd-1.0.cread_line8933View Report
Stream handling errorStream already in EOFlibcafekbd/tmp-introspectrjqiw1rh/Cafekbd-1.0.cread_line8933View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2481View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain1991View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain1941View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2281View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain1871View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2251View Report
Unused codeUnreachable codelibcafekbd/tmp-introspectrjqiw1rh/Cafekbd-1.0.cvalue_to_string2391View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2561View Report
+ + diff --git a/2025-02-06-114727-14435-1@b1965751dcd5_devel/output_b1965751dcd5a6db17ae755139e63f860425ebf2 b/2025-02-06-114727-14435-1@b1965751dcd5_devel/output_b1965751dcd5a6db17ae755139e63f860425ebf2 new file mode 100644 index 0000000..c093f26 --- /dev/null +++ b/2025-02-06-114727-14435-1@b1965751dcd5_devel/output_b1965751dcd5a6db17ae755139e63f860425ebf2 @@ -0,0 +1,1864 @@ +Checking libcafekbd/cafekbd-desktop-config.c ... +libcafekbd/cafekbd-desktop-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +1/10 files checked 4% done +Checking libcafekbd/cafekbd-indicator-config.c ... +libcafekbd/cafekbd-indicator-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +2/10 files checked 10% done +Checking libcafekbd/cafekbd-indicator.c ... +libcafekbd/cafekbd-indicator.c:66:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdIndicator, cafekbd_indicator, CTK_TYPE_NOTEBOOK) +^ +3/10 files checked 24% done +Checking libcafekbd/cafekbd-keyboard-config.c ... +libcafekbd/cafekbd-keyboard-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-config.c:67:8: style: Condition '*l1' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:67:15: style: Condition '*l2' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:227:16: style: Condition 'option!=NULL' is always true [knownConditionTrueFalse] + (option != NULL) ? strchr (option, ':') : NULL; + ^ +libcafekbd/cafekbd-keyboard-config.c:282:18: style: Condition 'variant==NULL' is always false [knownConditionTrueFalse] + (variant == + ^ +libcafekbd/cafekbd-keyboard-config.c:226:10: style: Variable 'delim' can be declared as pointer to const [constVariablePointer] + char *delim = + ^ +libcafekbd/cafekbd-keyboard-config.c:609:65: style: Parameter 'kbd_config' can be declared as pointer to const [constParameterPointer] +cafekbd_keyboard_config_options_is_set (CafekbdKeyboardConfig * kbd_config, + ^ +4/10 files checked 36% done +Checking libcafekbd/cafekbd-keyboard-drawing.c ... +libcafekbd/cafekbd-keyboard-drawing.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-drawing.c:61:60: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_coord (CafekbdKeyboardDrawingRenderContext * context, gint n) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:67:61: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_double (CafekbdKeyboardDrawingRenderContext * context, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:625:51: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +set_markup (CafekbdKeyboardDrawingRenderContext * context, gchar *txt) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1026:11: style: Variable 'runp' can be declared as pointer to const [constVariablePointer] + GSList *runp; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1036:25: style: Variable 'geometry' can be declared as pointer to const [constVariablePointer] + PangoGlyphGeometry *geometry; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1202:39: style: Parameter 'outline' can be declared as pointer to const [constParameterPointer] +calc_origin_offset_x (XkbOutlineRec * outline) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1397:15: style: Variable 'shape' can be declared as pointer to const [constVariablePointer] + XkbShapeRec *shape; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: style: Parameter 'drawing' can be declared as pointer to const. However it seems that 'button_press_event' is a callback function, if 'drawing' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2343:18: note: You might need to cast the function pointer here + G_CALLBACK (button_press_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: note: Parameter 'drawing' can be declared as pointer to const + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: style: Parameter 'event' can be declared as pointer to const. However it seems that 'focus_event' is a callback function, if 'event' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2347:18: note: You might need to cast the function pointer here + G_CALLBACK (focus_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: note: Parameter 'event' can be declared as pointer to const + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: style: Parameter 'a' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'a' is declared with const you might also need to cast function pointer(s). [constParameterCallback] +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: note: Parameter 'a' can be declared as pointer to const +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: style: Parameter 'b' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'b' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: note: Parameter 'b' can be declared as pointer to const + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1863:9: style: Variable 'pind' can be declared as pointer to const [constVariablePointer] + Atom *pind = drawing->xkb->names->indicators; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2124:60: style: Parameter 'iev' can be declared as pointer to const [constParameterPointer] +process_indicators_state_notify (XkbIndicatorNotifyEvent * iev, + ^ +Checking libcafekbd/cafekbd-keyboard-drawing.c: KBDRAW_DEBUG... +5/10 files checked 77% done +Checking libcafekbd/cafekbd-status.c ... +libcafekbd/cafekbd-status.c:82:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdStatus, cafekbd_status, CTK_TYPE_STATUS_ICON) +^ +6/10 files checked 91% done +Checking libcafekbd/cafekbd-util.c ... +7/10 files checked 93% done +Checking test/cafekbd-indicator-test.c ... +8/10 files checked 94% done +Checking test/cafekbd-keyboard-drawing-test.c ... +test/cafekbd-keyboard-drawing-test.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +Checking test/cafekbd-keyboard-drawing-test.c: HAVE_CONFIG_H... +9/10 files checked 99% done +Checking test/cafekbd-status-test.c ... +test/cafekbd-status-test.c:42:17: style: Variable 'icon' can be declared as pointer to const [constVariablePointer] + CtkStatusIcon *icon; + ^ +10/10 files checked 100% done +nofile:0:0: information: Active checkers: There was critical errors (use --checkers-report= to see details) [checkersReport] + +/usr/bin/cafe-autogen +checking for autoreconf >= 2.53... + testing autoreconf... found 2.72 +checking for pkg-config >= 0.14.0... + testing pkg-config... found 1.8.1 +checking for cafe-common >= 0.0.1... + testing cafe-doc-common... found 2.0.0 +Checking for required M4 macros... +Checking for forbidden M4 macros... +Processing ./configure.ac +Running cafe-doc-common... +Running autoreconf... +autoreconf: export WARNINGS=no-portability +autoreconf: Entering directory '.' +autoreconf: running: autopoint --force +Copying file ABOUT-NLS +Copying file config.rpath +Copying file m4/codeset.m4 +Copying file m4/extern-inline.m4 +Copying file m4/fcntl-o.m4 +Copying file m4/gettext.m4 +Copying file m4/glibc2.m4 +Copying file m4/glibc21.m4 +Copying file m4/iconv.m4 +Copying file m4/intdiv0.m4 +Copying file m4/intl.m4 +Copying file m4/intldir.m4 +Copying file m4/intlmacosx.m4 +Copying file m4/intmax.m4 +Copying file m4/inttypes-pri.m4 +Copying file m4/inttypes_h.m4 +Copying file m4/lcmessage.m4 +Copying file m4/lib-ld.m4 +Copying file m4/lib-link.m4 +Copying file m4/lib-prefix.m4 +Copying file m4/lock.m4 +Copying file m4/longlong.m4 +Copying file m4/nls.m4 +Copying file m4/po.m4 +Copying file m4/printf-posix.m4 +Copying file m4/progtest.m4 +Copying file m4/size_max.m4 +Copying file m4/stdint_h.m4 +Copying file m4/threadlib.m4 +Copying file m4/uintmax_t.m4 +Copying file m4/visibility.m4 +Copying file m4/wchar_t.m4 +Copying file m4/wint_t.m4 +Copying file m4/xsize.m4 +Copying file po/Makefile.in.in +Copying file po/Makevars.template +Copying file po/Rules-quot +Copying file po/boldquot.sed +Copying file po/en@boldquot.header +Copying file po/en@quot.header +Copying file po/insert-header.sin +Copying file po/quot.sed +Copying file po/remove-potcdate.sin +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: configure.ac: tracing +autoreconf: running: libtoolize --copy --force +libtoolize: putting auxiliary files in '.'. +libtoolize: copying file './ltmain.sh' +libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. +libtoolize: copying file 'm4/libtool.m4' +libtoolize: copying file 'm4/ltoptions.m4' +libtoolize: copying file 'm4/ltsugar.m4' +libtoolize: copying file 'm4/ltversion.m4' +libtoolize: copying file 'm4/lt~obsolete.m4' +autoreconf: configure.ac: not using Intltool +autoreconf: configure.ac: not using Gtkdoc +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: running: /usr/bin/autoconf --force +autoreconf: running: /usr/bin/autoheader --force +autoreconf: running: automake --add-missing --copy --force-missing +configure.ac:31: installing './compile' +configure.ac:34: installing './config.guess' +configure.ac:34: installing './config.sub' +configure.ac:16: installing './install-sh' +configure.ac:16: installing './missing' +Makefile.am: installing './INSTALL' +libcafekbd/Makefile.am: installing './depcomp' +autoreconf: Leaving directory '.' +Skipping configure process. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +checking for a BSD-compatible install... /usr/bin/install -c +checking whether build environment is sane... yes +checking for a race-free mkdir -p... /usr/bin/mkdir -p +checking for gawk... no +checking for mawk... mawk +checking whether make sets $(MAKE)... yes +checking whether make supports nested variables... yes +checking whether make supports nested variables... (cached) yes +checking whether make supports the include directive... yes (GNU style) +checking for gcc... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the C compiler works... yes +checking for C compiler default output file name... a.out +checking for suffix of executables... +checking whether we are cross compiling... no +checking for suffix of object files... o +checking whether the compiler supports GNU C... yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... rm: cannot remove 'conftest.plist': Is a directory +yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... gcc3 +checking whether C compiler accepts -Werror=unknown-warning-option... no +checking whether C compiler accepts -Wall... yes +checking whether C compiler accepts -Wmissing-prototypes... yes +checking whether C compiler accepts -Wbad-function-cast... yes +checking whether C compiler accepts -Wcast-align... yes +checking whether C compiler accepts -Wextra... yes +checking whether C compiler accepts -Wformat-nonliteral... yes +checking whether C compiler accepts -Wmissing-declarations... yes +checking whether C compiler accepts -Wnested-externs... yes +checking whether C compiler accepts -Wpointer-arith... yes +checking whether C compiler accepts -Wredundant-decls... yes +checking whether C compiler accepts -Wshadow... yes +checking whether C compiler accepts -Wstrict-prototypes... yes +checking whether C compiler accepts -Wunused-macros... yes +checking whether C compiler accepts -Werror=format-security... yes +checking whether C compiler accepts -fstrict-aliasing... yes +checking flags to pass to the C compiler /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing +checking for gcc... (cached) /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the compiler supports GNU C... (cached) yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... (cached) yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... (cached) none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... (cached) yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... (cached) gcc3 +checking build system type... x86_64-pc-linux-gnu +checking host system type... x86_64-pc-linux-gnu +checking how to print strings... printf +checking for a sed that does not truncate output... /usr/bin/sed +checking for grep that handles long lines and -e... /usr/bin/grep +checking for egrep... /usr/bin/grep -E +checking for fgrep... /usr/bin/grep -F +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld +checking if the linker (/usr/bin/ld) is GNU ld... yes +checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B +checking the name lister (/usr/bin/nm -B) interface... rm: cannot remove 'conftest.plist': Is a directory +BSD nm +checking whether ln -s works... yes +checking the maximum length of command line arguments... 3145728 +checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop +checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop +checking for /usr/bin/ld option to reload object files... -r +checking for file... file +checking for objdump... objdump +checking how to recognize dependent libraries... pass_all +checking for dlltool... no +checking how to associate runtime and link libraries... printf %s\n +checking for ranlib... ranlib +checking for ar... ar +checking for archiver @FILE support... rm: cannot remove 'conftest.plist': Is a directory +@ +checking for strip... strip +checking command to parse /usr/bin/nm -B output from /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer object... rm: cannot remove 'conftest.plist': Is a directory +ok +checking for sysroot... no +checking for a working dd... /usr/bin/dd +checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1 +checking for mt... no +checking if : is a manifest tool... no +checking for stdio.h... yes +checking for stdlib.h... yes +checking for string.h... yes +checking for inttypes.h... yes +checking for stdint.h... yes +checking for strings.h... yes +checking for sys/stat.h... yes +checking for sys/types.h... yes +checking for unistd.h... yes +checking for dlfcn.h... yes +checking for objdir... .libs +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -fno-rtti -fno-exceptions... no +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to produce PIC... -fPIC -DPIC +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer PIC flag -fPIC -DPIC works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer static flag -static works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... (cached) yes +checking whether the /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes +checking whether -lc should be explicitly linked in... no +checking dynamic linker characteristics... GNU/Linux ld.so +checking how to hardcode library paths into programs... immediate +checking whether stripping libraries is possible... yes +checking if libtool supports shared libraries... yes +checking whether to build shared libraries... yes +checking whether to build static libraries... yes +checking whether NLS is requested... yes +checking for msgfmt... /usr/bin/msgfmt +checking for gmsgfmt... /usr/bin/msgfmt +checking for xgettext... /usr/bin/xgettext +checking for msgmerge... /usr/bin/msgmerge +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld -m elf_x86_64 +checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes +checking for shared library run path origin... done +checking how to run the C preprocessor... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer -E +checking for egrep -e... (cached) /usr/bin/grep -E +checking for CFPreferencesCopyAppValue... no +checking for CFLocaleCopyCurrent... no +checking for GNU gettext in libc... yes +checking whether to use NLS... yes +checking where the gettext function comes from... libc +checking for glib-compile-resources... /usr/bin/glib-compile-resources +checking for xmllint... /usr/bin/xmllint +checking for setlocale... yes +checking for pkg-config... /usr/bin/pkg-config +checking pkg-config is at least version 0.9.0... yes +checking for glib-2.0 >= 2.50.0... yes +checking for gmodule-2.0... yes +checking for gio-2.0 >= 2.25.0... yes +checking for cdk-3.0 >= 3.22.0... yes +checking for ctk+-3.0 >= 3.22.0 cdk-x11-3.0 >= 3.22.0... yes +checking for libxklavier >= 5.2... yes +checking for X... libraries , headers +checking for gethostbyname... yes +checking for connect... yes +checking for remove... yes +checking for shmat... yes +checking for IceConnectionNumber in -lICE... yes +checking for pkg-config... (cached) /usr/bin/pkg-config +checking pkg-config is at least version 0.16... yes +checking for library containing sqrt... -lm +checking for gobject-introspection... yes +checking that generated files are newer than configure... done +configure: creating ./config.status +config.status: creating Makefile +config.status: creating libcafekbd.pc +config.status: creating libcafekbdui.pc +config.status: creating po/Makefile.in +config.status: creating libcafekbd/Makefile +config.status: creating libcafekbd/org.cafe.peripherals-keyboard-xkb.gschema.xml +config.status: creating test/Makefile +config.status: creating config.h +config.status: executing depfiles commands +config.status: executing libtool commands +config.status: executing po-directories commands +config.status: creating po/POTFILES +config.status: creating po/Makefile + +Configuration: + + prefix: /usr + exec_prefix: ${prefix} + libdir: ${exec_prefix}/lib + bindir: ${exec_prefix}/bin + sbindir: ${exec_prefix}/sbin + sysconfdir: ${prefix}/etc + datadir: ${datarootdir} + source code location: . + compiler: /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer + cflags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + Warning flags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + +scan-build: Analysis run complete. +scan-build: Removing directory '/tmp/scan-build-2025-02-06-114717-11799-1' because it contains no reports. +scan-build: No bugs found. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +make all-recursive +make[1]: Entering directory '/rootdir' +Making all in po +make[2]: Entering directory '/rootdir/po' +make libcafekbd.pot-update +make[3]: Entering directory '/rootdir/po' +sed -e '/^#/d' remove-potcdate.sin > t-remove-potcdate.sed +mv t-remove-potcdate.sed remove-potcdate.sed +package_gnu=""; \ +test -n "$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L .. -maxdepth 1 -type f \ + -size -10000000c -exec grep 'GNU libcafekbd' \ + /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU libcafekbd' ../* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ +}; \ +if test "$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ +else \ + package_prefix=''; \ +fi; \ +if test -n '' || test 'https://github.com/cafe-desktop/libcafekbd' = '@'PACKAGE_BUGREPORT'@'; then \ + msgid_bugs_address=''; \ +else \ + msgid_bugs_address='https://github.com/cafe-desktop/libcafekbd'; \ +fi; \ +case `/usr/bin/xgettext --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ + *) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --package-name="${package_prefix}libcafekbd" \ + --package-version='1.25.0' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ +esac +test ! -f libcafekbd.po || { \ + if test -f ./libcafekbd.pot-header; then \ + sed -e '1,/^#$/d' < libcafekbd.po > libcafekbd.1po && \ + cat ./libcafekbd.pot-header libcafekbd.1po > libcafekbd.po; \ + rm -f libcafekbd.1po; \ + fi; \ + if test -f ./libcafekbd.pot; then \ + sed -f remove-potcdate.sed < ./libcafekbd.pot > libcafekbd.1po && \ + sed -f remove-potcdate.sed < libcafekbd.po > libcafekbd.2po && \ + if cmp libcafekbd.1po libcafekbd.2po >/dev/null 2>&1; then \ + rm -f libcafekbd.1po libcafekbd.2po libcafekbd.po; \ + else \ + rm -f libcafekbd.1po libcafekbd.2po ./libcafekbd.pot && \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ + else \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ +} +make[3]: Leaving directory '/rootdir/po' +test ! -f ./libcafekbd.pot || \ + test -z "af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo" || make af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo +make[3]: Entering directory '/rootdir/po' +/usr/bin/msgmerge --update --quiet --lang=am am.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ar ar.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=af af.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=an an.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=as as.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ast ast.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=az az.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn bn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=be be.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bg bg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn_IN bn_IN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bs bs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=br br.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca ca.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca@valencia ca@valencia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cmn cmn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=crh crh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cs cs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=csb csb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cv cv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cy cy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=da da.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de de.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de_CH de_CH.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=dz dz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_AU en_AU.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=el el.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_CA en_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_GB en_GB.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es es.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eo eo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_419 es_419.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_AR es_AR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CL es_CL.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CO es_CO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CR es_CR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_DO es_DO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_EC es_EC.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_ES es_ES.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_MX es_MX.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_NI es_NI.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PA es_PA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PE es_PE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PR es_PR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_SV es_SV.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_US es_US.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_UY es_UY.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_VE es_VE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=et et.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eu eu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fa fa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fi fi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fil fil.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fo fo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr fr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=frp frp.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr_CA fr_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fy fy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fur fur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ga ga.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gd gd.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gl gl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gu gu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ha ha.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=he he.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hi hi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hr hr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hu hu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hy hy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=id id.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ia ia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ie ie.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ig ig.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=is is.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ja ja.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=it it.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=jv jv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ka ka.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kab kab.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kk kk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=km km.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kn kn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ko ko.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ks ks.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku ku.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku_IQ ku_IQ.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ky ky.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=la la.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lb lb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=li li.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lo lo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lt lt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lv lv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mai mai.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mi mi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mg mg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mk mk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ml ml.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mn mn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mr mr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ms ms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=my my.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nah nah.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nb nb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nds nds.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ne ne.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nl nl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nn nn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nqo nqo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nso nso.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=oc oc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=om om.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=or or.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pa pa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pl pl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pms pms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ps ps.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt_BR pt_BR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt pt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ro ro.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ru ru.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=rw rw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sc sc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=si si.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sco sco.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sk sk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sl sl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=so so.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sq sq.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr sr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr@latin sr@latin.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sv sv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sw sw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ta ta.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=te te.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tg tg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=th th.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tl tl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tk tk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tr tr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ts ts.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tt tt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ug ug.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uk uk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur ur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur_PK ur_PK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=vi vi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uz uz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=wa wa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=xh xh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yo yo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_CN zh_CN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yi yi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_HK zh_HK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_TW zh_TW.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zu zu.po libcafekbd.pot +rm -f af.gmo && /usr/bin/msgfmt -c --statistics --verbose -o af.gmo af.po +rm -f am.gmo && /usr/bin/msgfmt -c --statistics --verbose -o am.gmo am.po +rm -f an.gmo && /usr/bin/msgfmt -c --statistics --verbose -o an.gmo an.po +rm -f ar.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ar.gmo ar.po +af.po: am.po: 54 translated messages7 translated messages, 84 untranslated messages. +, 37 untranslated messages. +ar.po: 50 translated messages, 41 untranslated messages. +an.po:7: warning: header field 'Last-Translator' still has the initial default value +an.po: 0 translated messages, 91 untranslated messages. +rm -f as.gmo && /usr/bin/msgfmt -c --statistics --verbose -o as.gmo as.po +rm -f ast.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ast.gmo ast.po +rm -f bg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bg.gmo bg.po +rm -f az.gmo && /usr/bin/msgfmt -c --statistics --verbose -o az.gmo az.po +rm -f be.gmo && /usr/bin/msgfmt -c --statistics --verbose -o be.gmo be.po +as.po: 41 translated messages, 50 untranslated messages. +az.po: 9 translated messages, 82 untranslated messages. +bg.po: 54 translated messages, 37 untranslated messages. +be.po: 46 translated messages, 45 untranslated messages. +ast.po: 47 translated messages, 44 untranslated messages. +rm -f bn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn.gmo bn.po +rm -f br.gmo && /usr/bin/msgfmt -c --statistics --verbose -o br.gmo br.po +rm -f bn_IN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn_IN.gmo bn_IN.po +rm -f bs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bs.gmo bs.po +rm -f ca.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca.gmo ca.po +bn_IN.po: 41 translated messages, 50 untranslated messages. +br.po: 20 translated messages, 71 untranslated messages. +ca.po: 87 translated messages, 4 untranslated messages. +rm -f ca@valencia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca@valencia.gmo ca@valencia.po +rm -f cmn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cmn.gmo cmn.po +bn.po: 43 translated messages, 48 untranslated messages. +bs.po: 25 translated messages, 66 untranslated messages. +rm -f crh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o crh.gmo crh.po +rm -f cs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cs.gmo cs.po +cmn.po: 46 translated messages, 45 untranslated messages. +ca@valencia.po: 54 translated messages, 37 untranslated messages. +rm -f csb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o csb.gmo csb.po +crh.po: 11 translated messages, 80 untranslated messages. +rm -f cy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cy.gmo cy.po +cs.po: 81 translated messages, 10 untranslated messages. +csb.po:7: warning: rm -f cv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cv.gmo cv.po +header field 'Last-Translator' still has the initial default value +csb.po: 0 translated messages, 91 untranslated messages. +rm -f da.gmo && /usr/bin/msgfmt -c --statistics --verbose -o da.gmo da.po +rm -f de.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de.gmo de.po +cy.po: 26 translated messages, 65 untranslated messages. +cv.po: 0 translated messages, 91 untranslated messages. +rm -f de_CH.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de_CH.gmo de_CH.po +rm -f dz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o dz.gmo dz.po +da.po: 91 translated messages. +de.po: 76 translated messages, 15 untranslated messages. +rm -f el.gmo && /usr/bin/msgfmt -c --statistics --verbose -o el.gmo el.po +dz.po: rm -f en_AU.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_AU.gmo en_AU.po +39 translated messages, 52 untranslated messages. +el.po: 54 translated messages, 37 untranslated messages. +de_CH.po: 0 translated messages, 91 untranslated messages. +rm -f en_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_CA.gmo en_CA.po +rm -f en_GB.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_GB.gmo en_GB.po +rm -f eo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eo.gmo eo.po +en_AU.po: 54 translated messages, 37 untranslated messages. +rm -f es.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es.gmo es.po +en_CA.po: 10 translated messages, 81 untranslated messages. +en_GB.po: 54 translated messages, 37 untranslated messages. +rm -f es_419.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_419.gmo es_419.po +es.po: 89 translated messages, 2 untranslated messages. +eo.po: 52 translated messages, 39 untranslated messages. +rm -f es_AR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_AR.gmo es_AR.po +rm -f es_CL.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CL.gmo es_CL.po +rm -f es_CO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CO.gmo es_CO.po +rm -f es_CR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CR.gmo es_CR.po +es_419.po: 0 translated messages, 91 untranslated messages. +es_AR.po: 21 translated messages, 70 untranslated messageses_CL.po: 3 translated messages, 88 untranslated messages. +. +es_CR.po: 1 translated message, 90 untranslated messages. +es_CO.po: 49 translated messages, 42 untranslated messages. +rm -f es_EC.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_EC.gmo es_EC.po +rm -f es_DO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_DO.gmo es_DO.po +rm -f es_ES.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_ES.gmo es_ES.po +rm -f es_MX.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_MX.gmo es_MX.po +es_EC.po: 1 translated message, 90 untranslated messages. +rm -f es_NI.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_NI.gmo es_NI.po +es_DO.po: 1 translated message, 90 untranslated messages. +es_ES.po: 1 translated message, 90 untranslated messages. +es_MX.po: 1 translated message, 90 untranslated messagesrm -f es_PA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PA.gmo es_PA.po +. +rm -f es_PE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PE.gmo es_PE.po +es_NI.po: 1 translated message, 90 untranslated messages. +rm -f es_PR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PR.gmo es_PR.po +rm -f es_SV.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_SV.gmo es_SV.po +es_PE.po: 1 translated message, 90 untranslated messages. +rm -f es_US.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_US.gmo es_US.po +es_PA.po: 1 translated message, 90 untranslated messages. +es_PR.po: 1 translated message, 90 untranslated messages. +es_US.po: 0 translated messages, 91 untranslated messageses_SV.po: 1 translated message, 90 untranslated messages. +. +rm -f es_UY.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_UY.gmo es_UY.po +rm -f et.gmo && /usr/bin/msgfmt -c --statistics --verbose -o et.gmo et.po +rm -f eu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eu.gmo eu.po +rm -f es_VE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_VE.gmo es_VE.po +rm -f fa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fa.gmo fa.po +es_UY.po: 1 translated message, 90 untranslated messages. +et.po: rm -f fi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fi.gmo fi.po +54 translated messages, 37 untranslated messages. +fa.po: 11 translated messages, 80 untranslated messages. +eu.po: 54 translated messages, 37 untranslated messages. +es_VE.po: 1 translated message, 90 untranslated messages. +rm -f fil.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fil.gmo fil.po +fi.po: 48 translated messages, 43 untranslated messages. +rm -f fo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fo.gmo fo.po +rm -f fr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr.gmo fr.po +rm -f fr_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr_CA.gmo fr_CA.po +fil.po: 0 translated messages, 91 untranslated messages. +rm -f frp.gmo && /usr/bin/msgfmt -c --statistics --verbose -o frp.gmo frp.po +fo.po: 0 translated messages, 91 untranslated messages. +fr.po: 67 translated messages, 24 untranslated messages. +frp.po: 7 translated messages, 84 untranslated messages. +rm -f fur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fur.gmo fur.po +rm -f fy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fy.gmo fy.po +fr_CA.po: 3 translated messages, 88 untranslated messages. +rm -f ga.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ga.gmo ga.po +rm -f gd.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gd.gmo gd.po +fur.po: fy.po: 4 translated messages, 87 untranslated messages. +4 translated messages, 87 untranslated messages. +rm -f gl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gl.gmo gl.po +ga.po: 41 translated messages, 50 untranslated messages. +rm -f gu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gu.gmo gu.po +gd.po: 0 translated messages, 91 untranslated messages. +rm -f ha.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ha.gmo ha.po +gl.po: 89 translated messages, 2 untranslated messages. +gu.po: 43 translated messages, 48 untranslated messages. +rm -f he.gmo && /usr/bin/msgfmt -c --statistics --verbose -o he.gmo he.po +ha.po: 5 translated messages, 86 untranslated messages. +rm -f hi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hi.gmo hi.po +he.po: 54 translated messages, 37 untranslated messages. +rm -f hr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hr.gmo hr.po +rm -f hu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hu.gmo hu.po +rm -f hy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hy.gmo hy.po +hi.po: 45 translated messages, 46 untranslated messages. +hr.po: 54 translated messageshu.po: rm -f ia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ia.gmo ia.po +54 translated messages, 37 untranslated messages. +, 37 untranslated messages. +hy.po: 54 translated messages, 37 untranslated messages. +rm -f id.gmo && /usr/bin/msgfmt -c --statistics --verbose -o id.gmo id.po +ia.po: 3 translated messages, 88 untranslated messages. +rm -f ie.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ie.gmo ie.po +rm -f is.gmo && /usr/bin/msgfmt -c --statistics --verbose -o is.gmo is.po +rm -f ig.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ig.gmo ig.po +id.po: 91 translated messages. +rm -f it.gmo && /usr/bin/msgfmt -c --statistics --verbose -o it.gmo it.po +ie.po: 45 translated messages, 46 untranslated messages. +ig.po: 5 translated messages, 86 untranslated messages. +is.po: 12 translated messages, 79 untranslated messages. +rm -f jv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o jv.gmo jv.po +rm -f ja.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ja.gmo ja.po +it.po: 91 translated messages. +rm -f ka.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ka.gmo ka.po +jv.po: 2 translated messages, 89 untranslated messages. +rm -f kab.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kab.gmo kab.po +rm -f kk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kk.gmo kk.po +ja.po: 54 translated messages, 37 untranslated messages. +rm -f km.gmo && /usr/bin/msgfmt -c --statistics --verbose -o km.gmo km.po +ka.po: 37 translated messages, 54 untranslated messages. +kab.po: 4 translated messages, 87 untranslated messages. +kk.po: 24 translated messages, 67 untranslated messages. +rm -f kn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kn.gmo kn.po +km.po:7: warning: header field 'Last-Translator' still has the initial default value +km.po: 0 translated messages, 91 untranslated messages. +rm -f ko.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ko.gmo ko.po +rm -f ks.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ks.gmo ks.po +rm -f ku_IQ.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku_IQ.gmo ku_IQ.po +rm -f ku.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku.gmo ku.po +kn.po: ko.po: 54 translated messages, 37 untranslated messages. +43 translated messages, 48 untranslated messages. +ku_IQ.po: 16 translated messages, 75 untranslated messages. +ks.po: 3 translated messages, 88 untranslated messages. +ku.po: 10 translated messages, 81 untranslated messages. +rm -f ky.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ky.gmo ky.po +rm -f li.gmo && /usr/bin/msgfmt -c --statistics --verbose -o li.gmo li.po +rm -f lb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lb.gmo lb.po +rm -f la.gmo && /usr/bin/msgfmt -c --statistics --verbose -o la.gmo la.po +rm -f lo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lo.gmo lo.po +ky.po: 26 translated messages, 65 untranslated messages. +li.po:7: warning: header field 'Last-Translator' still has the initial default value +li.po: 0 translated messages, 91 untranslated messages. +la.po: 2 translated messages, 89 untranslated messages. +lb.po:7: warning: header field 'Last-Translator' still has the initial default value +lb.po: 0 translated messages, 91 untranslated messages. +lo.po:7: warning: header field 'Last-Translator' still has the initial default value +lo.po: 0 translated messages, 91 untranslated messages. +rm -f lt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lt.gmo lt.po +rm -f mai.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mai.gmo mai.po +rm -f lv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lv.gmo lv.po +rm -f mg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mg.gmo mg.po +lt.po: 91 translated messages. +rm -f mi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mi.gmo mi.po +lv.po: mg.po: 10 translated messages, 81 untranslated messages. +49 translated messages, 42 untranslated messages. +mai.po: 18 translated messages, 73 untranslated messages. +rm -f mk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mk.gmo mk.po +rm -f ml.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ml.gmo ml.po +rm -f mn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mn.gmo mn.po +mi.po:7: warning: header field 'Last-Translator' still has the initial default value +mi.po: 0 translated messages, 91 untranslated messages. +rm -f mr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mr.gmo mr.po +mk.po: 39 translated messages, 52 untranslated messages. +ml.po: 41 translated messages, 50 untranslated messages. +mn.po: 10 translated messages, 81 untranslated messages. +rm -f ms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ms.gmo ms.po +mr.po: 47 translated messages, 44 untranslated messages. +rm -f my.gmo && /usr/bin/msgfmt -c --statistics --verbose -o my.gmo my.po +rm -f nah.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nah.gmo nah.po +rm -f nb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nb.gmo nb.po +ms.po: 91 translated messages. +my.po:7: warning: header field 'Last-Translator' still has the initial default value +my.po: 0 translated messages, 91 untranslated messages. +nah.po: 0 translated messages, 91 untranslated messagesrm -f nds.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nds.gmo nds.po +. +rm -f ne.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ne.gmo ne.po +nb.po: 91 translated messages. +rm -f nl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nl.gmo nl.po +ne.po: 13 translated messages, 78 untranslated messages. +rm -f nn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nn.gmo nn.po +nds.po: 12 translated messages, 79 untranslated messages. +rm -f nqo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nqo.gmo nqo.po +rm -f nso.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nso.gmo nso.po +nl.po: 91 translated messages. +rm -f oc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o oc.gmo oc.po +nn.po: 40 translated messages, 51 untranslated messages. +nqo.po: 0 translated messages, 91 untranslated messages. +nso.po: 3 translated messages, 88 untranslated messages. +rm -f om.gmo && /usr/bin/msgfmt -c --statistics --verbose -o om.gmo om.po +oc.po: 68 translated messages, 23 untranslated messages. +rm -f pa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pa.gmo pa.po +rm -f or.gmo && /usr/bin/msgfmt -c --statistics --verbose -o or.gmo or.po +rm -f pl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pl.gmo pl.po +om.po: 0 translated messages, 91 untranslated messages. +rm -f pms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pms.gmo pms.po +pa.po: 46 translated messages, 45 untranslated messages. +rm -f ps.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ps.gmo ps.po +pl.po: 55 translated messages, 36 untranslated messages. +pms.po: 3 translated messages, 88 untranslated messages. +or.po: 41 translated messages, 50 untranslated messages. +rm -f pt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt.gmo pt.po +ps.po: 6 translated messages, 85 untranslated messages. +rm -f pt_BR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt_BR.gmo pt_BR.po +rm -f ru.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ru.gmo ru.po +rm -f ro.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ro.gmo ro.po +pt.po: 84 translated messages, 7 untranslated messages. +rm -f rw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o rw.gmo rw.po +pt_BR.po: 58 translated messages, 33 untranslated messages. +rm -f sc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sc.gmo sc.po +ro.po: 54 translated messages, 37 untranslated messages. +ru.po: 89 translated messages, 2 untranslated messages. +rw.po: 10 translated messages, 81 untranslated messages. +rm -f sco.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sco.gmo sco.po +sc.po: 2 translated messages, 89 untranslated messages. +rm -f si.gmo && /usr/bin/msgfmt -c --statistics --verbose -o si.gmo si.po +rm -f sk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sk.gmo sk.po +rm -f sl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sl.gmo sl.po +sco.po: 0 translated messages, 91 untranslated messages. +rm -f so.gmo && /usr/bin/msgfmt -c --statistics --verbose -o so.gmo so.po +si.po: 36 translated messages, 55 untranslated messages. +sk.po: 54 translated messages, 37 untranslated messages. +sl.po: 55 translated messages, 36 untranslated messages. +rm -f sq.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sq.gmo sq.po +so.po: 0 translated messages, 91 untranslated messages. +rm -f sr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr.gmo sr.po +rm -f sr@latin.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr@latin.gmo sr@latin.po +rm -f sv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sv.gmo sv.po +rm -f sw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sw.gmo sw.po +sq.po: 52 translated messagessr.po: 91 translated messages. +, 39 untranslated messages. +sr@latin.po: 46 translated messages, 45 untranslated messages. +sw.po: 0 translated messages, 91 untranslated messages. +rm -f ta.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ta.gmo ta.po +sv.po: 80 translated messages, 11 untranslated messages. +rm -f te.gmo && /usr/bin/msgfmt -c --statistics --verbose -o te.gmo te.po +rm -f tg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tg.gmo tg.po +rm -f th.gmo && /usr/bin/msgfmt -c --statistics --verbose -o th.gmo th.po +ta.po: 46 translated messages, 45 untranslated messages. +te.po: 41 translated messages, 50 untranslated messages. +rm -f tk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tk.gmo tk.po +tg.po: 0 translated messages, 91 untranslated messages. +th.po: 45 translated messages, 46 untranslated messages. +rm -f tl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tl.gmo tl.po +tk.po: 7 translated messages, 84 untranslated messages. +rm -f tr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tr.gmo tr.po +rm -f ts.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ts.gmo ts.po +rm -f tt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tt.gmo tt.po +rm -f ug.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ug.gmo ug.po +tl.po: 0 translated messages, 91 untranslated messages. +ts.po: 0 translated messages, 91 untranslated messages. +tr.po: 58 translated messages, 33 untranslated messages. +tt.po:7: warning: header field 'Last-Translator' still has the initial default value +tt.po: 0 translated messages, 91 untranslated messages. +rm -f ur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur.gmo ur.po +ug.po: 6 translated messages, 85 untranslated messagesrm -f uk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uk.gmo uk.po +. +rm -f ur_PK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur_PK.gmo ur_PK.po +rm -f uz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uz.gmo uz.po +ur.po: 7 translated messages, 84 untranslated messages. +rm -f vi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o vi.gmo vi.po +uk.po: 58 translated messages, 33 untranslated messages. +ur_PK.po:7: warning: header field 'Last-Translator' still has the initial default value +ur_PK.po: 0 translated messages, 91 untranslated messages. +rm -f wa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o wa.gmo wa.po +uz.po: 26 translated messages, 65 untranslated messages. +rm -f xh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o xh.gmo xh.po +vi.po: 52 translated messages, 39 untranslated messages. +rm -f yi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yi.gmo yi.po +rm -f yo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yo.gmo yo.po +wa.po: 9 translated messages, 82 untranslated messages. +xh.po: 8 translated messages, 83 untranslated messages. +rm -f zh_CN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_CN.gmo zh_CN.po +yo.po: 5 translated messages, 86 untranslated messages. +rm -f zh_HK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_HK.gmo zh_HK.po +yi.po:7: warning: header field 'Last-Translator' still has the initial default value +yi.po: 0 translated messages, 91 untranslated messages. +rm -f zh_TW.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_TW.gmo zh_TW.po +zh_CN.po: 63 translated messages, 28 untranslated messages. +zh_HK.po: 47 translated messages, 44 untranslated messages. +rm -f zu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zu.gmo zu.po +zh_TW.po: 91 translated messages. +zu.po: 3 translated messages, 88 untranslated messages. +make[3]: Leaving directory '/rootdir/po' +touch stamp-po +make[2]: Leaving directory '/rootdir/po' +Making all in libcafekbd +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml + GEN cafekbd-indicator-marshal.h + GEN cafekbd-keyboard-drawing-marshal.h +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... +INFO: Reading ./cafekbd-indicator-marshal.list... + GEN cafekbd-indicator-marshal.c + GEN cafekbd-keyboard-drawing-marshal.c +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... +INFO: Reading ./cafekbd-indicator-marshal.list... +make all-am +make[3]: Entering directory '/rootdir/libcafekbd' + CC libcafekbd_la-cafekbd-desktop-config.lo + CC libcafekbd_la-cafekbd-keyboard-config.lo + CC libcafekbd_la-cafekbd-util.lo + CC libcafekbdui_la-cafekbd-indicator-config.lo + CC libcafekbdui_la-cafekbd-indicator.lo +cafekbd-desktop-config.c: In function 'cafekbd_desktop_config_load_from_gsettings': +cafekbd-desktop-config.c:176:38: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 176 | || config->default_group >= + | ^~ +cafekbd-indicator.c: In function 'cafekbd_indicator_extract_layout_name': +cafekbd-indicator.c:293:19: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 293 | if (group < g_strv_length (short_group_names)) { + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_prepare_drawing': +cafekbd-indicator.c:418:31: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 418 | if (group + 1 == + | ^~ +cafekbd-indicator.c: In function 'cafekbd_indicator_update_tooltips': +cafekbd-indicator.c:446:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 446 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-indicator.c:450:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 450 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-indicator.c: In function 'cafekbd_indicator_kbd_cfg_callback': +cafekbd-indicator.c:61:44: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 61 | CafekbdIndicator * gki = (CafekbdIndicator*)cur->data; + | ^~~ +cafekbd-indicator.c:561:9: note: in expansion of macro 'ForAllIndicators' + 561 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-indicator.c:539:55: note: shadowed declaration is here + 539 | cafekbd_indicator_kbd_cfg_callback (CafekbdIndicator *gki G_GNUC_UNUSED) +cafekbd-indicator.c: In function 'cafekbd_indicator_start_listen': +cafekbd-indicator.c:647:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 647 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:650:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 650 | (CdkFilterFunc) + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_stop_listen': +cafekbd-indicator.c:663:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 663 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:667:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 667 | (CdkFilterFunc) cafekbd_indicator_filter_x_evt, NULL); + | ^ +cafekbd-indicator-config.c: In function 'cafekbd_indicator_config_get_images_file': +cafekbd-indicator-config.c:152:59: warning: comparison of integer expressions of different signedness: 'guint' {aka 'unsigned int'} and 'int' [-Wsign-compare] + 152 | (g_strv_length (kbd_config->layouts_variants) > group)) { + | ^ + CC libcafekbdui_la-cafekbd-status.lo +cafekbd-status.c: In function 'cafekbd_status_render_cairo': +cafekbd-status.c:214:23: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 214 | if (group + 1 == xkl_engine_get_num_groups (globals.engine)) { + | ^~ +cafekbd-status.c: In function 'cafekbd_status_prepare_drawing': +cafekbd-status.c:376:51: warning: cast between incompatible function types from 'void (*)(void *)' to 'void (*)(guchar *, void *)' {aka 'void (*)(unsigned char *, void *)'} [-Wcast-function-type] + 376 | (GdkPixbufDestroyNotify) + | ^ +cafekbd-status.c: In function 'cafekbd_status_update_tooltips': +cafekbd-status.c:395:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 395 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-status.c:399:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 399 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-status.c: In function 'cafekbd_status_kbd_cfg_callback': +cafekbd-status.c:77:41: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 77 | CafekbdStatus * gki = (CafekbdStatus*)cur->data; + | ^~~ +cafekbd-status.c:508:9: note: in expansion of macro 'ForAllIndicators' + 508 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-status.c:484:49: note: shadowed declaration is here + 484 | cafekbd_status_kbd_cfg_callback (CafekbdStatus *gki G_GNUC_UNUSED) +cafekbd-status.c: In function 'cafekbd_status_start_listen': +cafekbd-status.c:594:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 594 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:597:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 597 | (CdkFilterFunc) cafekbd_status_filter_x_evt, + | ^ +cafekbd-status.c: In function 'cafekbd_status_stop_listen': +cafekbd-status.c:610:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 610 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:614:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 614 | (CdkFilterFunc) cafekbd_status_filter_x_evt, NULL); + | ^ + CC libcafekbdui_la-cafekbd-indicator-marshal.lo +cafekbd-indicator-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ + CC libcafekbdui_la-cafekbd-keyboard-drawing-marshal.lo +cafekbd-keyboard-drawing-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + CC libcafekbdui_la-cafekbd-keyboard-drawing.lo +cafekbd-keyboard-drawing.c: In function 'draw_polygon': +cafekbd-keyboard-drawing.c:322:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 322 | for (i = 0; i < num_points; i++) { + | ^ +cafekbd-keyboard-drawing.c: In function 'process_indicators_state_notify': +cafekbd-keyboard-drawing.c:2131:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'long unsigned int' [-Wsign-compare] + 2131 | for (i = 0; i <= drawing->xkb->indicators->phys_indicators; i++) + | ^~ +cafekbd-keyboard-drawing.c: In function 'cafekbd_keyboard_drawing_get_type': +cafekbd-keyboard-drawing.c:2394:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawingClass *)' {aka 'void (*)(struct _CafekbdKeyboardDrawingClass *)'} to 'void (*)(void *, void *)' [-Wcast-function-type] + 2394 | (GClassInitFunc) cafekbd_keyboard_drawing_class_init, + | ^ +cafekbd-keyboard-drawing.c:2399:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawing *)' {aka 'void (*)(struct _CafekbdKeyboardDrawing *)'} to 'void (*)(GTypeInstance *, void *)' {aka 'void (*)(struct _GTypeInstance *, void *)'} [-Wcast-function-type] + 2399 | (GInstanceInitFunc) cafekbd_keyboard_drawing_init, + | ^ + GEN org.cafe.peripherals-keyboard-xkb.gschema.valid + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:114:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 114 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbd.la + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspectrjqiw1rh/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectrjqiw1rh/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectrjqiw1rh/Cafekbd-1.0.c:239:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 239 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspectrjqiw1rh/Cafekbd-1.0.c:246:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 246 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspectrjqiw1rh/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +5 warnings generated. + GICOMP Cafekbd-1.0.gir +make[3]: Leaving directory '/rootdir/libcafekbd' +make[2]: Leaving directory '/rootdir/libcafekbd' +Making all in test +make[2]: Entering directory '/rootdir/test' + CC cafekbd_indicator_test-cafekbd-indicator-test.o + CC cafekbd_keyboard_drawing_test-cafekbd-keyboard-drawing-test.o + CC cafekbd_status_test-cafekbd-status-test.o +cafekbd-keyboard-drawing-test.c:187:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 187 | g_print ("kbdraw %s\n", VERSION); + | ^~~~~~~ +cafekbd-keyboard-drawing-test.c:194:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 194 | g_printerr ("--groups: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:199:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 199 | g_printerr ("--levels: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:225:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 225 | cafekbd_keyboard_drawing_set_track_modifiers + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:228:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 228 | cafekbd_keyboard_drawing_set_track_config + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:248:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 248 | names.keycodes = keycodes; + | ^~~~~~~~ +cafekbd-keyboard-drawing-test.c:256:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 256 | names.geometry = geometry; + | ^~~~~~~~ +7 warnings generated. + CCLD cafekbd-keyboard-drawing-test + CCLD cafekbd-indicator-test + CCLD cafekbd-status-test +make[2]: Leaving directory '/rootdir/test' +make[2]: Entering directory '/rootdir' +make[2]: Leaving directory '/rootdir' +make[1]: Leaving directory '/rootdir' +scan-build: Analysis run complete. +scan-build: 11 bugs found. +scan-build: Run 'scan-view /rootdir/html-report/2025-02-06-114727-14435-1' to examine bug reports. +Making check in po +make[1]: Entering directory '/rootdir/po' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/po' +Making check in libcafekbd +make[1]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +make check-am +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:113:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 113 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspect_z7z4la8/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspect_z7z4la8/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspect_z7z4la8/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +3 warnings generated. + GICOMP Cafekbd-1.0.gir +make[2]: Leaving directory '/rootdir/libcafekbd' +make[1]: Leaving directory '/rootdir/libcafekbd' +Making check in test +make[1]: Entering directory '/rootdir/test' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/test' +make[1]: Entering directory '/rootdir' +make[1]: Leaving directory '/rootdir' + Listing... 0% Listing... 0% Listing... 0% adduser/testing,now 3.137 all [installed,automatic] +advaita-icon-theme/unknown,now 3.25.0-1 all [installed,automatic] +apt/testing,now 2.9.26 amd64 [installed,automatic] +aptitude-common/testing,now 0.8.13-6.1 all [installed,automatic] +aptitude/testing,now 0.8.13-6.1 amd64 [installed] +at-spi2-common/testing,now 2.55.0.1-1 all [installed,automatic] +at-spi2-core/testing,now 2.55.0.1-1 amd64 [installed,automatic] +autoconf-archive/testing,now 20220903-3 all [installed] +autoconf/testing,now 2.72-3 all [installed,automatic] +automake/testing,now 1:1.16.5-1.3 all [installed,automatic] +autopoint/testing,now 0.23.1-1 all [installed] +autotools-dev/testing,now 20220109.1 all [installed,automatic] +base-files/testing,now 13.6 amd64 [installed,automatic] +base-passwd/testing,now 3.6.6 amd64 [installed,automatic] +bash/testing,now 5.2.37-1 amd64 [installed,automatic] +binfmt-support/testing,now 2.2.2-7 amd64 [installed,automatic] +binutils-common/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils-gold-x86-64-linux-gnu/testing,now 2.44-1 amd64 [installed,automatic] +binutils-gold/testing,now 2.44-1 amd64 [installed,automatic] +binutils-x86-64-linux-gnu/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +bsdutils/testing,now 1:2.40.4-2 amd64 [installed,automatic] +build-essential/testing,now 12.12 amd64 [installed,automatic] +bzip2-doc/testing,now 1.0.8-6 all [installed,automatic] +bzip2/testing,now 1.0.8-6 amd64 [installed,automatic] +ca-certificates/testing,now 20241223 all [installed,automatic] +clang-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools/testing,now 1:19.0-63 amd64 [installed] +clang/testing,now 1:19.0-63 amd64 [installed] +coreutils/testing,now 9.5-1+b1 amd64 [installed,automatic] +cpp-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-14/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cpp/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cppcheck/testing,now 2.16.0-1 amd64 [installed] +ctk-update-icon-cache/unknown,now 3.25.6-1 amd64 [installed,automatic] +dash/testing,now 0.5.12-12 amd64 [installed,automatic] +dbus-bin/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-daemon/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-session-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-system-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-user-session/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus/testing,now 1.16.0-1 amd64 [installed,automatic] +dconf-gsettings-backend/testing,now 0.40.0-5 amd64 [installed,automatic] +dconf-service/testing,now 0.40.0-5 amd64 [installed,automatic] +debconf/testing,now 1.5.89 all [installed,automatic] +debian-archive-keyring/testing,now 2023.4 all [installed,automatic] +debianutils/testing,now 5.21 amd64 [installed,automatic] +diffutils/testing,now 1:3.10-2 amd64 [installed,automatic] +dirmngr/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +dmsetup/testing,now 2:1.02.201-1 amd64 [installed,automatic] +dpkg-dev/testing,now 1.22.14 all [installed,automatic] +dpkg/testing,now 1.22.14 amd64 [installed,automatic] +e2fsprogs/testing,now 1.47.2-1 amd64 [installed,automatic] +expect/testing,now 5.45.4-3+b1 amd64 [installed] +fakeroot/testing,now 1.37-1 amd64 [installed,automatic] +file/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +findutils/testing,now 4.10.0-3 amd64 [installed,automatic] +fontconfig-config/testing,now 2.15.0-2 amd64 [installed,automatic] +fontconfig/testing,now 2.15.0-2 amd64 [installed,automatic] +fonts-dejavu-core/testing,now 2.37-8 all [installed,automatic] +fonts-dejavu-mono/testing,now 2.37-8 all [installed,automatic] +g++-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-14/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +g++/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc-14-base/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gettext-base/testing,now 0.23.1-1 amd64 [installed,automatic] +gettext/testing,now 0.23.1-1 amd64 [installed] +gir1.2-atk-1.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-atspi-2.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-ctk-3.0/unknown,now 3.25.6-1 amd64 [installed] +gir1.2-freedesktop-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-freedesktop/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-gdkpixbuf-2.0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +gir1.2-girepository-2.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-girepository-2.0/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-glib-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-glib-2.0/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-harfbuzz-0.0/testing,now 10.2.0-1 amd64 [installed,automatic] +gir1.2-pango-1.0/testing,now 1.56.1-1 amd64 [installed,automatic] +gir1.2-xkl-1.0/testing,now 5.4-5+b2 amd64 [installed,automatic] +girepository-tools/testing,now 2.82.4-2 amd64 [installed,automatic] +git-man/testing,now 1:2.47.2-0.1 all [installed,automatic] +git/testing,now 1:2.47.2-0.1 amd64 [installed] +gnupg-l10n/testing,now 2.2.46-1 all [installed,automatic] +gnupg-utils/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gnupg/testing,now 2.2.46-1 all [installed,automatic] +gobject-introspection-bin/testing,now 1.82.0-4 amd64 [installed,automatic] +gobject-introspection/testing,now 1.82.0-4 amd64 [installed] +gpg-agent/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg-wks-client/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgconf/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgsm/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgv/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +grep/testing,now 3.11-4 amd64 [installed,automatic] +gsettings-desktop-schemas/testing,now 47.1-1 all [installed,automatic] +gzip/testing,now 1.13-1 amd64 [installed,automatic] +hicolor-icon-theme/testing,now 0.18-2 all [installed,automatic] +hostname/testing,now 3.25 amd64 [installed,automatic] +icu-devtools/testing,now 72.1-6 amd64 [installed,automatic] +init-system-helpers/testing,now 1.68 all [installed,automatic] +krb5-locales/testing,now 1.21.3-4 all [installed,automatic] +less/testing,now 643-1 amd64 [installed,automatic] +lib32gcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +lib32stdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libacl1/testing,now 2.3.2-2+b1 amd64 [installed,automatic] +libalgorithm-diff-perl/testing,now 1.201-1 all [installed,automatic] +libalgorithm-diff-xs-perl/testing,now 0.04-8+b4 amd64 [installed,automatic] +libalgorithm-merge-perl/testing,now 0.08-5 all [installed,automatic] +libapparmor1/testing,now 3.1.7-1+b3 amd64 [installed,automatic] +libapt-pkg6.0t64/testing,now 2.9.26 amd64 [installed,automatic] +libasan8/testing,now 14.2.0-12 amd64 [installed,automatic] +libassuan9/testing,now 3.0.1-2 amd64 [installed,automatic] +libatk-bridge2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk-bridge2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatomic1/testing,now 14.2.0-12 amd64 [installed,automatic] +libatspi2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatspi2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libattr1/testing,now 1:2.5.2-2 amd64 [installed,automatic] +libaudit-common/testing,now 1:4.0.2-2 all [installed,automatic] +libaudit1/testing,now 1:4.0.2-2+b1 amd64 [installed,automatic] +libavahi-client3/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common-data/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common3/testing,now 0.8-16 amd64 [installed,automatic] +libbinutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libblkid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libblkid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libboost-iostreams1.83.0/testing,now 1.83.0-4 amd64 [installed,automatic] +libbrotli-dev/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbrotli1/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbsd0/testing,now 0.12.2-2 amd64 [installed,automatic] +libbz2-1.0/testing,now 1.0.8-6 amd64 [installed,automatic] +libbz2-dev/testing,now 1.0.8-6 amd64 [installed,automatic] +libc-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc-dev-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc6-dev/testing,now 2.40-6 amd64 [installed,automatic] +libc6-i386/testing,now 2.40-6 amd64 [installed,automatic] +libc6/testing,now 2.40-6 amd64 [installed,automatic] +libcairo-gobject2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo-script-interpreter2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2-dev/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcap-dev/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcap-ng0/testing,now 0.8.5-4 amd64 [installed,automatic] +libcap2/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcbor0.10/testing,now 0.10.2-2 amd64 [installed,automatic] +libcc1-0/testing,now 14.2.0-12 amd64 [installed,automatic] +libclang-common-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-cpp19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-rt-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang1-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libcolord2/testing,now 1.4.7-1+b2 amd64 [installed,automatic] +libcom-err2/testing,now 1.47.2-1 amd64 [installed,automatic] +libcrypt-dev/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcrypt1/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcryptsetup12/testing,now 2:2.7.5-1 amd64 [installed,automatic] +libctf-nobfd0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctf0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctk-3-0/unknown,now 3.25.6-1 amd64 [installed] +libctk-3-bin/unknown,now 3.25.6-1 amd64 [installed,automatic] +libctk-3-common/unknown,now 3.25.6-1 all [installed] +libctk-3-dev/unknown,now 3.25.6-1 amd64 [installed] +libcups2t64/testing,now 2.4.10-2+b1 amd64 [installed,automatic] +libcurl3t64-gnutls/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcurl4t64/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcwidget4/testing,now 0.5.18-6+b2 amd64 [installed,automatic] +libdatrie-dev/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdatrie1/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdav1d7/testing,now 1.5.1-1 amd64 [installed,automatic] +libdb5.3t64/testing,now 5.3.28+dfsg2-9 amd64 [installed,automatic] +libdbus-1-3/testing,now 1.16.0-1 amd64 [installed,automatic] +libdbus-1-dev/testing,now 1.16.0-1 amd64 [installed,automatic] +libdconf1/testing,now 0.40.0-5 amd64 [installed,automatic] +libdebconfclient0/testing,now 0.277 amd64 [installed,automatic] +libdeflate-dev/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdeflate0/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdevmapper1.02.1/testing,now 2:1.02.201-1 amd64 [installed,automatic] +libdpkg-perl/testing,now 1.22.14 all [installed,automatic] +libdrm-amdgpu1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-common/testing,now 2.4.123-1 all [installed,automatic] +libdrm-intel1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-radeon1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm2/testing,now 2.4.123-1 amd64 [installed,automatic] +libedit2/testing,now 3.1-20250104-1 amd64 [installed,automatic] +libegl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libegl-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1-mesa-dev/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libelf1t64/testing,now 0.192-4 amd64 [installed,automatic] +libepoxy-dev/testing,now 1.5.10-2 amd64 [installed,automatic] +libepoxy0/testing,now 1.5.10-2 amd64 [installed,automatic] +liberror-perl/testing,now 0.17029-2 all [installed,automatic] +libexpat1-dev/testing,now 2.6.4-1 amd64 [installed,automatic] +libexpat1/testing,now 2.6.4-1 amd64 [installed,automatic] +libext2fs2t64/testing,now 1.47.2-1 amd64 [installed,automatic] +libfakeroot/testing,now 1.37-1 amd64 [installed,automatic] +libffi-dev/testing,now 3.4.6-1 amd64 [installed,automatic] +libffi8/testing,now 3.4.6-1 amd64 [installed,automatic] +libfido2-1/testing,now 1.15.0-1+b1 amd64 [installed,automatic] +libfile-fcntllock-perl/testing,now 0.22-4+b4 amd64 [installed,automatic] +libfontconfig-dev/testing,now 2.15.0-2 amd64 [installed,automatic] +libfontconfig1/testing,now 2.15.0-2 amd64 [installed,automatic] +libfreetype-dev/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfreetype6/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfribidi-dev/testing,now 1.0.16-1 amd64 [installed,automatic] +libfribidi0/testing,now 1.0.16-1 amd64 [installed,automatic] +libgbm1/testing,now 24.2.8-1 amd64 [installed,automatic] +libgc1/testing,now 1:8.2.8-1 amd64 [installed,automatic] +libgcc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcrypt20/testing,now 1.11.0-7 amd64 [installed,automatic] +libgdbm-compat4t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdbm6t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-dev/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-bin/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-common/testing,now 2.42.12+dfsg-2 all [installed,automatic] +libgio-2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libgio-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository-1.0-1/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-1.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-2.0-0/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository1.0-dev/testing,now 1.82.0-4 amd64 [installed] +libgl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgl1-mesa-dri/testing,now 24.2.8-1 amd64 [installed,automatic] +libgl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglapi-mesa/testing,now 24.2.8-1 amd64 [installed,automatic] +libgles-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles2/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglib2.0-0t64/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-data/testing,now 2.82.4-2 all [installed,automatic] +libglib2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-dev/testing,now 2.82.4-2 amd64 [installed] +libglvnd-core-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libglx0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgmp10/testing,now 2:6.3.0+dfsg-3 amd64 [installed,automatic] +libgnutls30t64/testing,now 3.8.8-2 amd64 [installed,automatic] +libgomp1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgpg-error-l10n/testing,now 1.51-3 all [installed,automatic] +libgpg-error0/testing,now 1.51-3 amd64 [installed,automatic] +libgpm2/testing,now 1.20.7-11+b2 amd64 [installed,automatic] +libgprofng0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libgraphite2-3/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgraphite2-dev/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgssapi-krb5-2/testing,now 1.21.3-4 amd64 [installed,automatic] +libharfbuzz-cairo0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-dev/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-gobject0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-icu0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-subset0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz0b/testing,now 10.2.0-1 amd64 [installed,automatic] +libhogweed6t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libhwasan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libice-dev/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libice6/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libicu-dev/testing,now 72.1-6 amd64 [installed,automatic] +libicu72/testing,now 72.1-6 amd64 [installed,automatic] +libidn2-0/testing,now 2.3.7-2+b1 amd64 [installed,automatic] +libisl23/testing,now 0.27-1 amd64 [installed,automatic] +libitm1/testing,now 14.2.0-12 amd64 [installed,automatic] +libjansson4/testing,now 2.14-2+b3 amd64 [installed,automatic] +libjbig-dev/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjbig0/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjpeg-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjson-c5/testing,now 0.18+ds-1 amd64 [installed,automatic] +libk5crypto3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkeyutils1/testing,now 1.6.3-4 amd64 [installed,automatic] +libkmod2/testing,now 33+20240816-2 amd64 [installed,automatic] +libkrb5-3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkrb5support0/testing,now 1.21.3-4 amd64 [installed,automatic] +libksba8/testing,now 1.6.7-2+b1 amd64 [installed,automatic] +liblcms2-2/testing,now 2.16-2 amd64 [installed,automatic] +libldap-common/testing,now 2.6.9+dfsg-1 all [installed,automatic] +libldap2/testing,now 2.6.9+dfsg-1 amd64 [installed,automatic] +liblerc-dev/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +liblerc4/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +libllvm19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +liblocale-gettext-perl/testing,now 1.07-7+b1 amd64 [installed,automatic] +liblsan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libltdl-dev/testing,now 2.5.4-2 amd64 [installed,automatic] +libltdl7/testing,now 2.5.4-2 amd64 [installed,automatic] +liblz4-1/testing,now 1.10.0-3 amd64 [installed,automatic] +liblzma-dev/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzma5/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzo2-2/testing,now 2.10-3+b1 amd64 [installed,automatic] +libmagic-mgc/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmagic1t64/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmd0/testing,now 1.1.0-2+b1 amd64 [installed,automatic] +libmount-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libmount1/testing,now 2.40.4-2 amd64 [installed,automatic] +libmpc3/testing,now 1.3.1-1+b3 amd64 [installed,automatic] +libmpfr6/testing,now 4.2.1-1+b2 amd64 [installed,automatic] +libncurses-dev/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncurses6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncursesw6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libnettle8t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libnghttp2-14/testing,now 1.64.0-1 amd64 [installed,automatic] +libnghttp3-9/testing,now 1.6.0-2 amd64 [installed,automatic] +libngtcp2-16/testing,now 1.9.1-1 amd64 [installed,automatic] +libngtcp2-crypto-gnutls8/testing,now 1.9.1-1 amd64 [installed,automatic] +libnpth0t64/testing,now 1.8-2 amd64 [installed,automatic] +libnss-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libobjc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libobjc4/testing,now 14.2.0-12 amd64 [installed,automatic] +libopengl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libopengl0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libp11-kit0/testing,now 0.25.5-3 amd64 [installed,automatic] +libpam-modules-bin/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-modules/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-runtime/testing,now 1.7.0-2 all [installed,automatic] +libpam-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libpam0g/testing,now 1.7.0-2 amd64 [installed,automatic] +libpango-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpango1.0-dev/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangocairo-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoft2-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoxft-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpciaccess0/testing,now 0.17-3+b3 amd64 [installed,automatic] +libpcre2-16-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-32-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-8-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-dev/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-posix3/testing,now 10.44-5 amd64 [installed,automatic] +libperl5.40/testing,now 5.40.0-8 amd64 [installed,automatic] +libpfm4/testing,now 4.13.0+git83-g91970fe-1 amd64 [installed,automatic] +libpipeline1/testing,now 1.5.8-1 amd64 [installed,automatic] +libpixman-1-0/testing,now 0.44.0-3 amd64 [installed,automatic] +libpixman-1-dev/testing,now 0.44.0-3 amd64 [installed,automatic] +libpkgconf3/testing,now 1.8.1-4 amd64 [installed,automatic] +libpng-dev/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng-tools/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng16-16t64/testing,now 1.6.44-3 amd64 [installed,automatic] +libproc2-0/testing,now 2:4.0.4-7 amd64 [installed,automatic] +libpsl5t64/testing,now 0.21.2-1.1+b1 amd64 [installed,automatic] +libpython3-stdlib/testing,now 3.13.1-2 amd64 [installed,automatic] +libpython3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libpython3.13-stdlib/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libquadmath0/testing,now 14.2.0-12 amd64 [installed,automatic] +libreadline8t64/testing,now 8.2-6 amd64 [installed,automatic] +librsvg2-2/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librsvg2-common/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librtmp1/testing,now 2.4+20151223.gitfa8646d.1-2+b5 amd64 [installed,automatic] +libsasl2-2/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules-db/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libseccomp2/testing,now 2.5.5-2 amd64 [installed,automatic] +libselinux1-dev/testing,now 3.7-3.1 amd64 [installed,automatic] +libselinux1/testing,now 3.7-3.1 amd64 [installed,automatic] +libsemanage-common/testing,now 3.7-2.1 all [installed,automatic] +libsemanage2/testing,now 3.7-2.1 amd64 [installed,automatic] +libsensors-config/testing,now 1:3.6.0-10 all [installed,automatic] +libsensors5/testing,now 1:3.6.0-10+b1 amd64 [installed,automatic] +libsepol-dev/testing,now 3.7-1 amd64 [installed,automatic] +libsepol2/testing,now 3.7-1 amd64 [installed,automatic] +libsframe1/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libsharpyuv-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsharpyuv0/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsigc++-2.0-0v5/testing,now 2.12.1-3 amd64 [installed,automatic] +libsm-dev/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsm6/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsmartcols1/testing,now 2.40.4-2 amd64 [installed,automatic] +libsqlite3-0/testing,now 3.46.1-1 amd64 [installed,automatic] +libss2/testing,now 1.47.2-1 amd64 [installed,automatic] +libssh2-1t64/testing,now 1.11.1-1 amd64 [installed,automatic] +libssl3t64/testing,now 3.4.0-2 amd64 [installed,automatic] +libstdc++-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libstdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libsysprof-capture-4-dev/testing,now 47.2-1 amd64 [installed,automatic] +libsystemd-dev/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd-shared/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd0/testing,now 257.2-3 amd64 [installed,automatic] +libtasn1-6/testing,now 4.19.0-3+b3 amd64 [installed,automatic] +libtcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +libthai-data/testing,now 0.1.29-2 all [installed,automatic] +libthai-dev/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libthai0/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libtiff-dev/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiff6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiffxx6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtinfo6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libtinyxml2-10/testing,now 10.0.0+dfsg-2+b2 amd64 [installed,automatic] +libtool/testing,now 2.5.4-2 all [installed] +libtsan2/testing,now 14.2.0-12 amd64 [installed,automatic] +libubsan1/testing,now 14.2.0-12 amd64 [installed,automatic] +libudev1/testing,now 257.2-3 amd64 [installed,automatic] +libunistring5/testing,now 1.3-1 amd64 [installed,automatic] +libuuid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libvulkan1/testing,now 1.4.304.0-1 amd64 [installed,automatic] +libwayland-bin/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-client0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-cursor0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-dev/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-egl1/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-server0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwebp-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebp7/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdecoder3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdemux2/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpmux3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libx11-6/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-data/testing,now 2:1.8.10-2 all [installed,automatic] +libx11-dev/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-xcb1/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libxapian30/testing,now 1.4.25-2 amd64 [installed,automatic] +libxau-dev/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxau6/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxaw7/testing,now 2:1.0.16-1 amd64 [installed,automatic] +libxcb-dri2-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-dri3-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-glx0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-present0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-randr0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-sync1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-xfixes0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcomposite-dev/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcomposite1/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcursor-dev/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxcursor1/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxdamage-dev/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdamage1/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdmcp-dev/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxdmcp6/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxext-dev/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxext6/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxfixes-dev/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxfixes3/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxft-dev/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxft2/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxi-dev/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxi6/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxinerama-dev/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxinerama1/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxkbcommon-dev/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbcommon0/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbfile1/testing,now 1:1.1.0-1+b4 amd64 [installed,automatic] +libxklavier-dev/testing,now 5.4-5+b2 amd64 [installed] +libxklavier16/testing,now 5.4-5+b2 amd64 [installed,automatic] +libxml2-dev/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxml2-utils/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed] +libxml2/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxmu6/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxmuu1/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxpm4/testing,now 1:3.5.17-1+b3 amd64 [installed,automatic] +libxrandr-dev/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrandr2/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrender-dev/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxrender1/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxshmfence1/testing,now 1.3-1+b3 amd64 [installed,automatic] +libxt6t64/testing,now 1:1.2.1-1.2+b2 amd64 [installed,automatic] +libxtst-dev/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxtst6/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxxf86vm1/testing,now 1:1.1.4-1+b4 amd64 [installed,automatic] +libxxhash0/testing,now 0.8.2-2+b2 amd64 [installed,automatic] +libyaml-0-2/testing,now 0.2.5-2 amd64 [installed,automatic] +libz3-4/testing,now 4.13.3-1 amd64 [installed,automatic] +libz3-dev/testing,now 4.13.3-1 amd64 [installed,automatic] +libzstd-dev/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +libzstd1/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +linux-libc-dev/testing,now 6.12.11-1 all [installed,automatic] +linux-sysctl-defaults/testing,now 4.11 all [installed,automatic] +llvm-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-linker-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-runtime/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +login.defs/testing,now 1:4.16.0-7 all [installed,automatic] +login/testing,now 1:4.16.0-2+really2.40.4-2 amd64 [installed,automatic] +logsave/testing,now 1.47.2-1 amd64 [installed,automatic] +m4/testing,now 1.4.19-5 amd64 [installed,automatic] +make/testing,now 4.4.1-1 amd64 [installed] +manpages-dev/testing,now 6.9.1-1 all [installed,automatic] +manpages/testing,now 6.9.1-1 all [installed,automatic] +mawk/testing,now 1.3.4.20240905-1 amd64 [installed,automatic] +media-types/testing,now 10.1.0 all [installed,automatic] +mesa-libgallium/testing,now 24.2.8-1 amd64 [installed,automatic] +mesa-vulkan-drivers/testing,now 24.2.8-1 amd64 [installed,automatic] +mount/testing,now 2.40.4-2 amd64 [installed,automatic] +native-architecture/testing,now 0.2.5 all [installed,automatic] +ncurses-base/testing,now 6.5-2 all [installed,automatic] +ncurses-bin/testing,now 6.5-2+b1 amd64 [installed,automatic] +netbase/testing,now 6.4 all [installed,automatic] +openssh-client/testing,now 1:9.9p1-3 amd64 [installed,automatic] +openssl-provider-legacy/testing,now 3.4.0-2 amd64 [installed,automatic] +openssl/testing,now 3.4.0-2 amd64 [installed,automatic] +pango1.0-tools/testing,now 1.56.1-1 amd64 [installed,automatic] +passwd/testing,now 1:4.16.0-7 amd64 [installed,automatic] +patch/testing,now 2.7.6-7 amd64 [installed,automatic] +perl-base/testing,now 5.40.0-8 amd64 [installed,automatic] +perl-modules-5.40/testing,now 5.40.0-8 all [installed,automatic] +perl/testing,now 5.40.0-8 amd64 [installed,automatic] +pinentry-curses/testing,now 1.3.1-2 amd64 [installed,automatic] +pkgconf-bin/testing,now 1.8.1-4 amd64 [installed,automatic] +pkgconf/testing,now 1.8.1-4 amd64 [installed,automatic] +procps/testing,now 2:4.0.4-7 amd64 [installed,automatic] +psmisc/testing,now 23.7-1 amd64 [installed,automatic] +publicsuffix/testing,now 20250108.1153-0.1 all [installed,automatic] +python3-autocommand/testing,now 2.2.2-3 all [installed,automatic] +python3-inflect/testing,now 7.3.1-2 all [installed,automatic] +python3-jaraco.context/testing,now 6.0.0-1 all [installed,automatic] +python3-jaraco.functools/testing,now 4.1.0-1 all [installed,automatic] +python3-jaraco.text/testing,now 4.0.0-1 all [installed,automatic] +python3-mako/testing,now 1.3.8-2 all [installed,automatic] +python3-markdown/testing,now 3.7-2 all [installed,automatic] +python3-markupsafe/testing,now 2.1.5-1+b2 amd64 [installed,automatic] +python3-minimal/testing,now 3.13.1-2 amd64 [installed,automatic] +python3-more-itertools/testing,now 10.6.0-1 all [installed,automatic] +python3-packaging/testing,now 24.2-1 all [installed,automatic] +python3-pkg-resources/testing,now 75.6.0-1 all [installed,automatic] +python3-pygments/testing,now 2.18.0+dfsg-2 all [installed,automatic] +python3-setuptools/testing,now 75.6.0-1 all [installed,automatic] +python3-typeguard/testing,now 4.4.1-1 all [installed,automatic] +python3-typing-extensions/testing,now 4.12.2-2 all [installed,automatic] +python3-yaml/testing,now 6.0.2-1+b1 amd64 [installed,automatic] +python3-zipp/testing,now 3.21.0-1 all [installed,automatic] +python3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3.13/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3/testing,now 3.13.1-2 amd64 [installed,automatic] +readline-common/testing,now 8.2-6 all [installed,automatic] +rpcsvc-proto/testing,now 1.4.3-1 amd64 [installed,automatic] +sed/testing,now 4.9-2 amd64 [installed,automatic] +sensible-utils/testing,now 0.0.24 all [installed,automatic] +sgml-base/testing,now 1.31 all [installed,automatic] +shared-mime-info/testing,now 2.4-5+b2 amd64 [installed,automatic] +sqv/testing,now 1.2.1-5 amd64 [installed,automatic] +systemd-cryptsetup/testing,now 257.2-3 amd64 [installed,automatic] +systemd-sysv/testing,now 257.2-3 amd64 [installed,automatic] +systemd-timesyncd/testing,now 257.2-3 amd64 [installed,automatic] +systemd/testing,now 257.2-3 amd64 [installed,automatic] +sysvinit-utils/testing,now 3.13-1 amd64 [installed,automatic] +tar/testing,now 1.35+dfsg-3.1 amd64 [installed,automatic] +tcl-expect/testing,now 5.45.4-3+b1 amd64 [installed,automatic] +tcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +tzdata/testing,now 2024b-6 all [installed,automatic] +util-linux/testing,now 2.40.4-2 amd64 [installed,automatic] +uuid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +wayland-protocols/testing,now 1.39-1 all [installed,automatic] +wget/testing,now 1.24.5-2+b1 amd64 [installed] +x11-common/testing,now 1:7.7+24 all [installed,automatic] +x11-xkb-utils/testing,now 7.7+9 amd64 [installed,automatic] +x11proto-dev/testing,now 2024.1-1 all [installed,automatic] +xauth/testing,now 1:1.1.2-1.1 amd64 [installed,automatic] +xdg-user-dirs/testing,now 0.18-2 amd64 [installed,automatic] +xkb-data/testing,now 2.42-1 all [installed,automatic] +xml-core/testing,now 0.19 all [installed,automatic] +xorg-sgml-doctools/testing,now 1:1.11-1.1 all [installed,automatic] +xtrans-dev/testing,now 1.4.0-1 all [installed,automatic] +xz-utils/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +zlib1g-dev/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +zlib1g/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +Errors detected in the build 0 +Warnings detected in the logs 96 +cppcheck defects detected in the logs 28 +TOTAL warnings detected in the logs 124 diff --git a/2025-02-06-114727-14435-1@b1965751dcd5_devel/report-37cb39.html b/2025-02-06-114727-14435-1@b1965751dcd5_devel/report-37cb39.html new file mode 100644 index 0000000..37176e2 --- /dev/null +++ b/2025-02-06-114727-14435-1@b1965751dcd5_devel/report-37cb39.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 248, column 21
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-114727-14435-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
This statement is never executed
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-114727-14435-1@b1965751dcd5_devel/report-523ef4.html b/2025-02-06-114727-14435-1@b1965751dcd5_devel/report-523ef4.html new file mode 100644 index 0000000..3201ead --- /dev/null +++ b/2025-02-06-114727-14435-1@b1965751dcd5_devel/report-523ef4.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 199, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-114727-14435-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
This statement is never executed
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-114727-14435-1@b1965751dcd5_devel/report-5ce420.html b/2025-02-06-114727-14435-1@b1965751dcd5_devel/report-5ce420.html new file mode 100644 index 0000000..2fea112 --- /dev/null +++ b/2025-02-06-114727-14435-1@b1965751dcd5_devel/report-5ce420.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 194, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-114727-14435-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
This statement is never executed
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-114727-14435-1@b1965751dcd5_devel/report-5d4bc8.html b/2025-02-06-114727-14435-1@b1965751dcd5_devel/report-5d4bc8.html new file mode 100644 index 0000000..1560172 --- /dev/null +++ b/2025-02-06-114727-14435-1@b1965751dcd5_devel/report-5d4bc8.html @@ -0,0 +1,1609 @@ + + + +/rootdir/libcafekbd/tmp-introspectrjqiw1rh/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspectrjqiw1rh/Cafekbd-1.0.c
Warning:line 89, column 13
File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/atk-1.0 -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/libxml2 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-114727-14435-1 -x c /rootdir/libcafekbd/tmp-introspectrjqiw1rh/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
14
Loop condition is true. Entering loop body
28
Loop condition is true. Entering loop body
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
15
Assuming this stream operation fails
29
File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior
90 if (ret
15.1
'ret' is equal to 0
== 0)
16
Taking true branch
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out
16.1
'len_out' is not equal to NULL
!= NULL((void*)0))
17
Taking true branch
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
6
Assuming 'args' is not equal to NULL
7
Taking false branch
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
8
Assuming 'self' is non-null
9
Taking false branch
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input
9.1
'input' is not equal to NULL
== NULL((void*)0))
10
Taking false branch
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output
10.1
'output' is not equal to NULL
== NULL((void*)0))
11
Taking false branch
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
12
Loop condition is true. Entering loop body
26
Loop condition is true. Entering loop body
702 {
703 gsize len;
704 char *line = read_line (input, &len);
13
Calling 'read_line'
18
Returning from 'read_line'
27
Calling 'read_line'
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
19
Assuming 'line' is not equal to NULL
20
Assuming the condition is false
21
Taking false branch
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
22
Assuming the condition is false
23
Taking false branch
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
24
Assuming the condition is false
25
Taking false branch
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
742
743 if (quark == 0)
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
1
Assuming 'argc' is equal to 2
2
'?' condition is false
3
Assuming the condition is false
4
Taking false branch
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
5
Calling 'dump_irepository'
811 {
812 g_printerr ("%s\n", error->message);
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-114727-14435-1@b1965751dcd5_devel/report-891289.html b/2025-02-06-114727-14435-1@b1965751dcd5_devel/report-891289.html new file mode 100644 index 0000000..22541c4 --- /dev/null +++ b/2025-02-06-114727-14435-1@b1965751dcd5_devel/report-891289.html @@ -0,0 +1,1603 @@ + + + +/rootdir/libcafekbd/tmp-introspectrjqiw1rh/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspectrjqiw1rh/Cafekbd-1.0.c
Warning:line 812, column 27
Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error')
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/atk-1.0 -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/libxml2 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-114727-14435-1 -x c /rootdir/libcafekbd/tmp-introspectrjqiw1rh/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
90 if (ret == 0)
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out != NULL((void*)0))
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
21
Assuming the condition is false
22
Taking false branch
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
23
Returning without writing to '*error'
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
7
Assuming 'args' is not equal to NULL
8
Taking false branch
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
9
Assuming 'self' is non-null
10
Taking false branch
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input
10.1
'input' is not equal to NULL
== NULL((void*)0))
11
Taking false branch
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output
11.1
'output' is not equal to NULL
== NULL((void*)0))
12
Taking false branch
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
13
Loop condition is true. Entering loop body
702 {
703 gsize len;
704 char *line = read_line (input, &len);
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
14
Assuming 'line' is not equal to NULL
15
Assuming the condition is false
16
Taking false branch
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
17
Assuming the condition is false
18
Taking false branch
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
19
Taking true branch
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
20
Calling 'invoke_error_quark'
24
Returning from 'invoke_error_quark'
742
743 if (quark == 0)
25
Assuming 'quark' is equal to 0
26
Taking true branch
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
27
Returning without writing to '*error'
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
1
'error' initialized to a null pointer value
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
2
Assuming 'argc' is equal to 2
3
'?' condition is false
4
Assuming the condition is false
5
Taking false branch
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
6
Calling 'dump_irepository'
28
Returning from 'dump_irepository'
29
Taking true branch
811 {
812 g_printerr ("%s\n", error->message);
30
Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error')
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-114727-14435-1@b1965751dcd5_devel/report-9361af.html b/2025-02-06-114727-14435-1@b1965751dcd5_devel/report-9361af.html new file mode 100644 index 0000000..25e8d39 --- /dev/null +++ b/2025-02-06-114727-14435-1@b1965751dcd5_devel/report-9361af.html @@ -0,0 +1,1609 @@ + + + +/rootdir/libcafekbd/tmp-introspectrjqiw1rh/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspectrjqiw1rh/Cafekbd-1.0.c
Warning:line 89, column 13
Read function called when stream is in EOF state. Function has no effect
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/atk-1.0 -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/libxml2 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-114727-14435-1 -x c /rootdir/libcafekbd/tmp-introspectrjqiw1rh/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
14
Loop condition is true. Entering loop body
28
Loop condition is true. Entering loop body
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
15
Assuming stream reaches end-of-file here
29
Read function called when stream is in EOF state. Function has no effect
90 if (ret
15.1
'ret' is equal to 0
== 0)
16
Taking true branch
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out
16.1
'len_out' is not equal to NULL
!= NULL((void*)0))
17
Taking true branch
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
6
Assuming 'args' is not equal to NULL
7
Taking false branch
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
8
Assuming 'self' is non-null
9
Taking false branch
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input
9.1
'input' is not equal to NULL
== NULL((void*)0))
10
Taking false branch
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output
10.1
'output' is not equal to NULL
== NULL((void*)0))
11
Taking false branch
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
12
Loop condition is true. Entering loop body
26
Loop condition is true. Entering loop body
702 {
703 gsize len;
704 char *line = read_line (input, &len);
13
Calling 'read_line'
18
Returning from 'read_line'
27
Calling 'read_line'
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
19
Assuming 'line' is not equal to NULL
20
Assuming the condition is false
21
Taking false branch
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
22
Assuming the condition is false
23
Taking false branch
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
24
Assuming the condition is false
25
Taking false branch
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
742
743 if (quark == 0)
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
1
Assuming 'argc' is equal to 2
2
'?' condition is false
3
Assuming the condition is false
4
Taking false branch
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
5
Calling 'dump_irepository'
811 {
812 g_printerr ("%s\n", error->message);
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-114727-14435-1@b1965751dcd5_devel/report-b4532a.html b/2025-02-06-114727-14435-1@b1965751dcd5_devel/report-b4532a.html new file mode 100644 index 0000000..7d1ef7e --- /dev/null +++ b/2025-02-06-114727-14435-1@b1965751dcd5_devel/report-b4532a.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 228, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-114727-14435-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
This statement is never executed
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-114727-14435-1@b1965751dcd5_devel/report-c098bd.html b/2025-02-06-114727-14435-1@b1965751dcd5_devel/report-c098bd.html new file mode 100644 index 0000000..b39fe8b --- /dev/null +++ b/2025-02-06-114727-14435-1@b1965751dcd5_devel/report-c098bd.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 187, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-114727-14435-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
This statement is never executed
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-114727-14435-1@b1965751dcd5_devel/report-e0f2de.html b/2025-02-06-114727-14435-1@b1965751dcd5_devel/report-e0f2de.html new file mode 100644 index 0000000..9f586c7 --- /dev/null +++ b/2025-02-06-114727-14435-1@b1965751dcd5_devel/report-e0f2de.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 225, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-114727-14435-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
This statement is never executed
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-114727-14435-1@b1965751dcd5_devel/report-fb6164.html b/2025-02-06-114727-14435-1@b1965751dcd5_devel/report-fb6164.html new file mode 100644 index 0000000..0ea6d71 --- /dev/null +++ b/2025-02-06-114727-14435-1@b1965751dcd5_devel/report-fb6164.html @@ -0,0 +1,1504 @@ + + + +/rootdir/libcafekbd/tmp-introspectrjqiw1rh/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspectrjqiw1rh/Cafekbd-1.0.c
Warning:line 239, column 11
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/atk-1.0 -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/libxml2 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-114727-14435-1 -x c /rootdir/libcafekbd/tmp-introspectrjqiw1rh/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
90 if (ret == 0)
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out != NULL((void*)0))
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
This statement is never executed
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input == NULL((void*)0))
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output == NULL((void*)0))
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
702 {
703 gsize len;
704 char *line = read_line (input, &len);
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
742
743 if (quark == 0)
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
811 {
812 g_printerr ("%s\n", error->message);
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-114727-14435-1@b1965751dcd5_devel/report-ff92e7.html b/2025-02-06-114727-14435-1@b1965751dcd5_devel/report-ff92e7.html new file mode 100644 index 0000000..9ff4d90 --- /dev/null +++ b/2025-02-06-114727-14435-1@b1965751dcd5_devel/report-ff92e7.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 256, column 21
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-114727-14435-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
This statement is never executed
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-114727-14435-1@b1965751dcd5_devel/scanview.css b/2025-02-06-114727-14435-1@b1965751dcd5_devel/scanview.css new file mode 100644 index 0000000..cf8a5a6 --- /dev/null +++ b/2025-02-06-114727-14435-1@b1965751dcd5_devel/scanview.css @@ -0,0 +1,62 @@ +body { color:#000000; background-color:#ffffff } +body { font-family: Helvetica, sans-serif; font-size:9pt } +h1 { font-size: 14pt; } +h2 { font-size: 12pt; } +table { font-size:9pt } +table { border-spacing: 0px; border: 1px solid black } +th, table thead { + background-color:#eee; color:#666666; + font-weight: bold; cursor: default; + text-align:center; + font-weight: bold; font-family: Verdana; + white-space:nowrap; +} +.W { font-size:0px } +th, td { padding:5px; padding-left:8px; text-align:left } +td.SUMM_DESC { padding-left:12px } +td.DESC { white-space:pre } +td.Q { text-align:right } +td { text-align:left } +tbody.scrollContent { overflow:auto } + +table.form_group { + background-color: #ccc; + border: 1px solid #333; + padding: 2px; +} + +table.form_inner_group { + background-color: #ccc; + border: 1px solid #333; + padding: 0px; +} + +table.form { + background-color: #999; + border: 1px solid #333; + padding: 2px; +} + +td.form_label { + text-align: right; + vertical-align: top; +} +/* For one line entires */ +td.form_clabel { + text-align: right; + vertical-align: center; +} +td.form_value { + text-align: left; + vertical-align: top; +} +td.form_submit { + text-align: right; + vertical-align: top; +} + +h1.SubmitFail { + color: #f00; +} +h1.SubmitOk { +} diff --git a/2025-02-06-114727-14435-1@b1965751dcd5_devel/sorttable.js b/2025-02-06-114727-14435-1@b1965751dcd5_devel/sorttable.js new file mode 100644 index 0000000..e608daa --- /dev/null +++ b/2025-02-06-114727-14435-1@b1965751dcd5_devel/sorttable.js @@ -0,0 +1,512 @@ +/* + SortTable + version 2 + 7th April 2007 + Stuart Langridge, http://www.kryogenix.org/code/browser/sorttable/ + + Instructions: + Download this file + Add to your HTML + Add class="sortable" to any table you'd like to make sortable + Click on the headers to sort + + Thanks to many, many people for contributions and suggestions. + Licenced as X11: http://www.kryogenix.org/code/browser/licence.html + This basically means: do what you want with it. +*/ + + +var stIsIE = /*@cc_on!@*/false; + +sorttable = { + init: function() { + // quit if this function has already been called + if (arguments.callee.done) return; + // flag this function so we don't do the same thing twice + arguments.callee.done = true; + // kill the timer + if (_timer) clearInterval(_timer); + + if (!document.createElement || !document.getElementsByTagName) return; + + sorttable.DATE_RE = /^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/; + + forEach(document.getElementsByTagName('table'), function(table) { + if (table.className.search(/\bsortable\b/) != -1) { + sorttable.makeSortable(table); + } + }); + + }, + + makeSortable: function(table) { + if (table.getElementsByTagName('thead').length == 0) { + // table doesn't have a tHead. Since it should have, create one and + // put the first table row in it. + the = document.createElement('thead'); + the.appendChild(table.rows[0]); + table.insertBefore(the,table.firstChild); + } + // Safari doesn't support table.tHead, sigh + if (table.tHead == null) table.tHead = table.getElementsByTagName('thead')[0]; + + if (table.tHead.rows.length != 1) return; // can't cope with two header rows + + // Sorttable v1 put rows with a class of "sortbottom" at the bottom (as + // "total" rows, for example). This is B&R, since what you're supposed + // to do is put them in a tfoot. So, if there are sortbottom rows, + // for backward compatibility, move them to tfoot (creating it if needed). + sortbottomrows = []; + for (var i=0; i5' : ' ▴'; + this.appendChild(sortrevind); + return; + } + if (this.className.search(/\bsorttable_sorted_reverse\b/) != -1) { + // if we're already sorted by this column in reverse, just + // re-reverse the table, which is quicker + sorttable.reverse(this.sorttable_tbody); + this.className = this.className.replace('sorttable_sorted_reverse', + 'sorttable_sorted'); + this.removeChild(document.getElementById('sorttable_sortrevind')); + sortfwdind = document.createElement('span'); + sortfwdind.id = "sorttable_sortfwdind"; + sortfwdind.innerHTML = stIsIE ? ' 6' : ' ▾'; + this.appendChild(sortfwdind); + return; + } + + // remove sorttable_sorted classes + theadrow = this.parentNode; + forEach(theadrow.childNodes, function(cell) { + if (cell.nodeType == 1) { // an element + cell.className = cell.className.replace('sorttable_sorted_reverse',''); + cell.className = cell.className.replace('sorttable_sorted',''); + } + }); + sortfwdind = document.getElementById('sorttable_sortfwdind'); + if (sortfwdind) { sortfwdind.parentNode.removeChild(sortfwdind); } + sortrevind = document.getElementById('sorttable_sortrevind'); + if (sortrevind) { sortrevind.parentNode.removeChild(sortrevind); } + + this.className += ' sorttable_sorted'; + sortfwdind = document.createElement('span'); + sortfwdind.id = "sorttable_sortfwdind"; + sortfwdind.innerHTML = stIsIE ? ' 6' : ' ▾'; + this.appendChild(sortfwdind); + + // build an array to sort. This is a Schwartzian transform thing, + // i.e., we "decorate" each row with the actual sort key, + // sort based on the sort keys, and then put the rows back in order + // which is a lot faster because you only do getInnerText once per row + row_array = []; + col = this.sorttable_columnindex; + rows = this.sorttable_tbody.rows; + for (var j=0; j 12) { + // definitely dd/mm + return sorttable.sort_ddmm; + } else if (second > 12) { + return sorttable.sort_mmdd; + } else { + // looks like a date, but we can't tell which, so assume + // that it's dd/mm (English imperialism!) and keep looking + sortfn = sorttable.sort_ddmm; + } + } + } + } + return sortfn; + }, + + getInnerText: function(node) { + // gets the text we want to use for sorting for a cell. + // strips leading and trailing whitespace. + // this is *not* a generic getInnerText function; it's special to sorttable. + // for example, you can override the cell text with a customkey attribute. + // it also gets .value for fields. + + hasInputs = (typeof node.getElementsByTagName == 'function') && + node.getElementsByTagName('input').length; + + if (node.getAttribute("sorttable_customkey") != null) { + return node.getAttribute("sorttable_customkey"); + } + else if (typeof node.textContent != 'undefined' && !hasInputs) { + return node.textContent.replace(/^\s+|\s+$/g, ''); + } + else if (typeof node.innerText != 'undefined' && !hasInputs) { + return node.innerText.replace(/^\s+|\s+$/g, ''); + } + else if (typeof node.text != 'undefined' && !hasInputs) { + return node.text.replace(/^\s+|\s+$/g, ''); + } + else { + switch (node.nodeType) { + case 3: + if (node.nodeName.toLowerCase() == 'input') { + return node.value.replace(/^\s+|\s+$/g, ''); + } + case 4: + return node.nodeValue.replace(/^\s+|\s+$/g, ''); + break; + case 1: + case 11: + var innerText = ''; + for (var i = 0; i < node.childNodes.length; i++) { + innerText += sorttable.getInnerText(node.childNodes[i]); + } + return innerText.replace(/^\s+|\s+$/g, ''); + break; + default: + return ''; + } + } + }, + + reverse: function(tbody) { + // reverse the rows in a tbody + newrows = []; + for (var i=0; i=0; i--) { + tbody.appendChild(newrows[i]); + } + delete newrows; + }, + + /* sort functions + each sort function takes two parameters, a and b + you are comparing a[0] and b[0] */ + sort_numeric: function(a,b) { + aa = parseFloat(a[0].replace(/[^0-9.-]/g,'')); + if (isNaN(aa)) aa = 0; + bb = parseFloat(b[0].replace(/[^0-9.-]/g,'')); + if (isNaN(bb)) bb = 0; + return aa-bb; + }, + sort_alpha: function(a,b) { + if (a[0]==b[0]) return 0; + if (a[0] 0 ) { + var q = list[i]; list[i] = list[i+1]; list[i+1] = q; + swap = true; + } + } // for + t--; + + if (!swap) break; + + for(var i = t; i > b; --i) { + if ( comp_func(list[i], list[i-1]) < 0 ) { + var q = list[i]; list[i] = list[i-1]; list[i-1] = q; + swap = true; + } + } // for + b++; + + } // while(swap) + } +} + +/* ****************************************************************** + Supporting functions: bundled here to avoid depending on a library + ****************************************************************** */ + +// Dean Edwards/Matthias Miller/John Resig + +/* for Mozilla/Opera9 */ +if (document.addEventListener) { + document.addEventListener("DOMContentLoaded", sorttable.init, false); +} + +/* for Internet Explorer */ +/*@cc_on @*/ +/*@if (@_win32) + document.write(" + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <X11/keysym.h>
+
+#include <glib/gi18n-lib.h>
+#include <gio/gio.h>
+#include <cafekbd-desktop-config.h>
+#include <cafekbd-config-private.h>
+
+/**
+ * CafekbdDesktopConfig:
+ */
+#define CAFEKBD_DESKTOP_CONFIG_SCHEMA  CAFEKBD_CONFIG_SCHEMA ".general"
+
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP[] = "default-group";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW[] = "group-per-window";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS[] = "handle-indicators";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES[] = "layout-names-as-group-names";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_LOAD_EXTRA_ITEMS[] = "load-extra-items";
+
+/*
+ * static common functions
+ */
+
+static gboolean
+    cafekbd_desktop_config_get_lv_descriptions
+    (CafekbdDesktopConfig * config,
+     XklConfigRegistry * registry,
+     const gchar ** layout_ids,
+     const gchar ** variant_ids,
+     gchar *** short_layout_descriptions,
+     gchar *** long_layout_descriptions,
+     gchar *** short_variant_descriptions,
+     gchar *** long_variant_descriptions) {
+	const gchar **pl, **pv;
+	guint total_layouts;
+	gchar **sld, **lld, **svd, **lvd;
+	XklConfigItem *item = xkl_config_item_new ();
+
+	if (!
+	    (xkl_engine_get_features (config->engine) &
+	     XKLF_MULTIPLE_LAYOUTS_SUPPORTED))
+		return FALSE;
+
+	pl = layout_ids;
+	pv = variant_ids;
+	total_layouts = g_strv_length ((char **) layout_ids);
+	sld = *short_layout_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+	lld = *long_layout_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+	svd = *short_variant_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+	lvd = *long_variant_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+
+	while (pl != NULL && *pl != NULL) {
+
+		xkl_debug (100, "ids: [%s][%s]\n", *pl,
+			   pv == NULL ? NULL : *pv);
+
+		g_snprintf (item->name, sizeof item->name, "%s", *pl);
+		if (xkl_config_registry_find_layout (registry, item)) {
+			*sld = g_strdup (item->short_description);
+			*lld = g_strdup (item->description);
+		} else {
+			*sld = g_strdup ("");
+			*lld = g_strdup ("");
+		}
+
+		if (pv != NULL && *pv != NULL) {
+			g_snprintf (item->name, sizeof item->name, "%s",
+				    *pv);
+			if (xkl_config_registry_find_variant
+			    (registry, *pl, item)) {
+				*svd = g_strdup (item->short_description);
+				*lvd = g_strdup (item->description);
+			} else {
+				*svd = g_strdup ("");
+				*lvd = g_strdup ("");
+			}
+		} else {
+			*svd = g_strdup ("");
+			*lvd = g_strdup ("");
+		}
+
+		xkl_debug (100, "description: [%s][%s][%s][%s]\n",
+			   *sld, *lld, *svd, *lvd);
+		sld++;
+		lld++;
+		svd++;
+		lvd++;
+
+		pl++;
+
+		if (pv != NULL && *pv != NULL)
+			pv++;
+	}
+
+	g_object_unref (item);
+	return TRUE;
+}
+
+/*
+ * extern CafekbdDesktopConfig config functions
+ */
+void
+cafekbd_desktop_config_init (CafekbdDesktopConfig * config,
+			  XklEngine * engine)
+{
+	memset (config, 0, sizeof (*config));
+	config->settings = g_settings_new (CAFEKBD_DESKTOP_CONFIG_SCHEMA);
+	config->engine = engine;
+}
+
+void
+cafekbd_desktop_config_term (CafekbdDesktopConfig * config)
+{
+	g_object_unref (config->settings);
+	config->settings = NULL;
+}
+
+void
+cafekbd_desktop_config_load_from_gsettings (CafekbdDesktopConfig * config)
+{
+	config->group_per_app =
+	    g_settings_get_boolean (config->settings,
+				 CAFEKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW);
+	xkl_debug (150, "group_per_app: %d\n", config->group_per_app);
+
+	config->handle_indicators =
+	    g_settings_get_boolean (config->settings,
+				 CAFEKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS);
+	xkl_debug (150, "handle_indicators: %d\n",
+		   config->handle_indicators);
+
+	config->layout_names_as_group_names =
+	    g_settings_get_boolean (config->settings,
+				   CAFEKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES);
+	xkl_debug (150, "layout_names_as_group_names: %d\n",
+		   config->layout_names_as_group_names);
+
+	config->load_extra_items =
+	    g_settings_get_boolean (config->settings,
+				   CAFEKBD_DESKTOP_CONFIG_KEY_LOAD_EXTRA_ITEMS);
+	xkl_debug (150, "load_extra_items: %d\n",
+		   config->load_extra_items);
+
+	config->default_group =
+	    g_settings_get_int (config->settings,
+				  CAFEKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP);
+
+	if (config->default_group < -1
+	    || config->default_group >=
+	    xkl_engine_get_max_num_groups (config->engine))
+		config->default_group = -1;
+	xkl_debug (150, "default_group: %d\n", config->default_group);
+}
+
+void
+cafekbd_desktop_config_save_to_gsettings (CafekbdDesktopConfig * config)
+{
+	g_settings_delay (config->settings);
+
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW,
+			     config->group_per_app);
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS,
+			     config->handle_indicators);
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES,
+			     config->layout_names_as_group_names);
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_LOAD_EXTRA_ITEMS,
+			     config->load_extra_items);
+	g_settings_set_int (config->settings,
+			    CAFEKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP,
+			    config->default_group);
+
+	g_settings_apply (config->settings);
+}
+
+gboolean
+cafekbd_desktop_config_activate (CafekbdDesktopConfig * config)
+{
+	gboolean rv = TRUE;
+
+	xkl_engine_set_group_per_toplevel_window (config->engine,
+						  config->group_per_app);
+	xkl_engine_set_indicators_handling (config->engine,
+					    config->handle_indicators);
+	xkl_engine_set_default_group (config->engine,
+				      config->default_group);
+
+	return rv;
+}
+
+void
+cafekbd_desktop_config_lock_next_group (CafekbdDesktopConfig * config)
+{
+	int group = xkl_engine_get_next_group (config->engine);
+	xkl_engine_lock_group (config->engine, group);
+}
+
+void
+cafekbd_desktop_config_lock_prev_group (CafekbdDesktopConfig * config)
+{
+	int group = xkl_engine_get_prev_group (config->engine);
+	xkl_engine_lock_group (config->engine, group);
+}
+
+void
+cafekbd_desktop_config_restore_group (CafekbdDesktopConfig * config)
+{
+	int group = xkl_engine_get_current_window_group (config->engine);
+	xkl_engine_lock_group (config->engine, group);
+}
+
+/**
+ * cafekbd_desktop_config_start_listen:
+ * @func: (scope notified): a function to call when settings are changed
+ */
+void
+cafekbd_desktop_config_start_listen (CafekbdDesktopConfig * config,
+				  GCallback func,
+				  gpointer user_data)
+{
+	config->config_listener_id =
+	    g_signal_connect (config->settings, "changed", func,
+			      user_data);
+}
+
+void
+cafekbd_desktop_config_stop_listen (CafekbdDesktopConfig * config)
+{
+	g_signal_handler_disconnect (config->settings,
+				    config->config_listener_id);
+	config->config_listener_id = 0;
+}
+
+gboolean
+cafekbd_desktop_config_load_group_descriptions (CafekbdDesktopConfig
+					     * config,
+					     XklConfigRegistry *
+					     registry,
+					     const gchar **
+					     layout_ids,
+					     const gchar **
+					     variant_ids,
+					     gchar ***
+					     short_group_names,
+					     gchar *** full_group_names)
+{
+	gchar **sld, **lld, **svd, **lvd;
+	gchar **psld, **plld, **plvd;
+	gchar **psgn, **pfgn, **psvd;
+	gint total_descriptions;
+
+	if (!cafekbd_desktop_config_get_lv_descriptions
+	    (config, registry, layout_ids, variant_ids, &sld, &lld, &svd,
+	     &lvd)) {
+		return False;
+	}
+
+	total_descriptions = g_strv_length (sld);
+
+	*short_group_names = psgn =
+	    g_new0 (gchar *, total_descriptions + 1);
+	*full_group_names = pfgn =
+	    g_new0 (gchar *, total_descriptions + 1);
+
+	plld = lld;
+	psld = sld;
+	plvd = lvd;
+	psvd = svd;
+	while (plld != NULL && *plld != NULL) {
+		gchar *sd = (*psvd[0] == '\0') ? *psld : *psvd;
+		psld++, psvd++;
+		*psgn++ = g_strdup (sd);
+		*pfgn++ = g_strdup (cafekbd_keyboard_config_format_full_layout
+				    (*plld++, *plvd++));
+	}
+	g_strfreev (sld);
+	g_strfreev (lld);
+	g_strfreev (svd);
+	g_strfreev (lvd);
+
+	return True;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/1.html b/2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/1.html new file mode 100644 index 0000000..43abc15 --- /dev/null +++ b/2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/1.html @@ -0,0 +1,914 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <X11/keysym.h>
+
+#include <pango/pango.h>
+
+#include <glib/gi18n-lib.h>
+#include <cdk/cdkx.h>
+
+#include <cafekbd-keyboard-config.h>
+#include <cafekbd-indicator-config.h>
+
+#include <cafekbd-config-private.h>
+
+/**
+ * CafekbdIndicatorConfig:
+ */
+#define CAFEKBD_INDICATOR_CONFIG_SCHEMA  CAFEKBD_CONFIG_SCHEMA ".indicator"
+
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS[] = "show-flags";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_SECONDARIES[] = "secondary";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_FONT_FAMILY[] = "font-family";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_FOREGROUND_COLOR[] = "foreground-color";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_BACKGROUND_COLOR[] = "background-color";
+
+/*
+ * static applet config functions
+ */
+static void
+cafekbd_indicator_config_load_font (CafekbdIndicatorConfig * ind_config)
+{
+	ind_config->font_family =
+	    g_settings_get_string (ind_config->settings,
+				   CAFEKBD_INDICATOR_CONFIG_KEY_FONT_FAMILY);
+
+	if (ind_config->font_family == NULL ||
+	    ind_config->font_family[0] == '\0') {
+		PangoFontDescription *fd = NULL;
+		CtkWidgetPath *widget_path = ctk_widget_path_new ();
+		CtkStyleContext *context = ctk_style_context_new ();
+
+		ctk_widget_path_append_type (widget_path, CTK_TYPE_WINDOW);
+		ctk_widget_path_iter_set_name (widget_path, -1 , "PanelWidget");
+
+		ctk_style_context_set_path (context, widget_path);
+		ctk_style_context_set_screen (context, cdk_screen_get_default ());
+		ctk_style_context_set_state (context, CTK_STATE_FLAG_NORMAL);
+		ctk_style_context_add_class (context, CTK_STYLE_CLASS_DEFAULT);
+		ctk_style_context_add_class (context, "gnome-panel-menu-bar");
+		ctk_style_context_add_class (context, "cafe-panel-menu-bar");
+
+		ctk_style_context_get (context, CTK_STATE_FLAG_NORMAL,
+		                       CTK_STYLE_PROPERTY_FONT, &fd, NULL);
+
+		if (fd != NULL) {
+			ind_config->font_family =
+			    g_strdup (pango_font_description_to_string(fd));
+		}
+
+		g_object_unref (G_OBJECT (context));
+		ctk_widget_path_unref (widget_path);
+	}
+	xkl_debug (150, "font: [%s]\n", ind_config->font_family);
+
+}
+
+static void
+cafekbd_indicator_config_load_colors (CafekbdIndicatorConfig * ind_config)
+{
+	ind_config->foreground_color =
+	    g_settings_get_string (ind_config->settings,
+	                           CAFEKBD_INDICATOR_CONFIG_KEY_FOREGROUND_COLOR);
+
+	if (ind_config->foreground_color == NULL ||
+	    ind_config->foreground_color[0] == '\0') {
+		CtkWidgetPath *widget_path = ctk_widget_path_new ();
+		CtkStyleContext *context = ctk_style_context_new ();
+		CdkRGBA fg_color;
+
+		ctk_widget_path_append_type (widget_path, CTK_TYPE_WINDOW);
+		ctk_widget_path_iter_set_name (widget_path, -1 , "PanelWidget");
+
+		ctk_style_context_set_path (context, widget_path);
+		ctk_style_context_set_screen (context, cdk_screen_get_default ());
+		ctk_style_context_set_state (context, CTK_STATE_FLAG_NORMAL);
+		ctk_style_context_add_class (context, CTK_STYLE_CLASS_DEFAULT);
+		ctk_style_context_add_class (context, "gnome-panel-menu-bar");
+		ctk_style_context_add_class (context, "cafe-panel-menu-bar");
+
+		ctk_style_context_get_color (context,
+		                             CTK_STATE_FLAG_NORMAL, &fg_color);
+		ind_config->foreground_color =
+		    g_strdup_printf ("%g %g %g",
+		                     fg_color.red,
+		                     fg_color.green,
+		                     fg_color.blue);
+
+		g_object_unref (G_OBJECT (context));
+		ctk_widget_path_unref (widget_path);
+	}
+
+	ind_config->background_color =
+	    g_settings_get_string (ind_config->settings,
+				     CAFEKBD_INDICATOR_CONFIG_KEY_BACKGROUND_COLOR);
+}
+
+void
+cafekbd_indicator_config_refresh_style (CafekbdIndicatorConfig * ind_config)
+{
+	g_free (ind_config->font_family);
+	g_free (ind_config->foreground_color);
+	g_free (ind_config->background_color);
+	cafekbd_indicator_config_load_font (ind_config);
+	cafekbd_indicator_config_load_colors (ind_config);
+}
+
+gchar *
+cafekbd_indicator_config_get_images_file (CafekbdIndicatorConfig *
+				       ind_config,
+				       CafekbdKeyboardConfig *
+				       kbd_config, int group)
+{
+	char *image_file = NULL;
+	CtkIconInfo *icon_info = NULL;
+
+	if (!ind_config->show_flags)
+		return NULL;
+
+	if ((kbd_config->layouts_variants != NULL) &&
+	    (g_strv_length (kbd_config->layouts_variants) > group)) {
+		char *full_layout_name =
+		    kbd_config->layouts_variants[group];
+
+		if (full_layout_name != NULL) {
+			char *l, *v;
+			cafekbd_keyboard_config_split_items (full_layout_name,
+							  &l, &v);
+			if (l != NULL) {
+				/* probably there is something in theme? */
+				icon_info = ctk_icon_theme_lookup_icon
+				    (ind_config->icon_theme, l, 48, 0);
+
+				/* Unbelievable but happens */
+				if (icon_info != NULL &&
+				    ctk_icon_info_get_filename (icon_info) == NULL) {
+					g_object_unref (icon_info);
+					icon_info = NULL;
+				}
+			}
+		}
+	}
+	/* fallback to the default value */
+	if (icon_info == NULL) {
+		icon_info = ctk_icon_theme_lookup_icon
+		    (ind_config->icon_theme, "stock_dialog-error", 48, 0);
+	}
+	if (icon_info != NULL) {
+		image_file =
+		    g_strdup (ctk_icon_info_get_filename (icon_info));
+		g_object_unref (icon_info);
+	}
+
+	return image_file;
+}
+
+void
+cafekbd_indicator_config_load_image_filenames (CafekbdIndicatorConfig *
+					    ind_config,
+					    CafekbdKeyboardConfig *
+					    kbd_config)
+{
+	int i;
+	ind_config->image_filenames = NULL;
+
+	if (!ind_config->show_flags)
+		return;
+
+	for (i = xkl_engine_get_max_num_groups (ind_config->engine);
+	     --i >= 0;) {
+		gchar *image_file =
+		    cafekbd_indicator_config_get_images_file (ind_config,
+							   kbd_config,
+							   i);
+		ind_config->image_filenames =
+		    g_slist_prepend (ind_config->image_filenames,
+				     image_file);
+	}
+}
+
+void
+cafekbd_indicator_config_free_image_filenames (CafekbdIndicatorConfig *
+					    ind_config)
+{
+	while (ind_config->image_filenames) {
+		if (ind_config->image_filenames->data)
+			g_free (ind_config->image_filenames->data);
+		ind_config->image_filenames =
+		    g_slist_delete_link (ind_config->image_filenames,
+					 ind_config->image_filenames);
+	}
+}
+
+void
+cafekbd_indicator_config_init (CafekbdIndicatorConfig * ind_config,
+			       XklEngine * engine)
+{
+	gchar *sp;
+
+	memset (ind_config, 0, sizeof (*ind_config));
+	ind_config->settings = g_settings_new (CAFEKBD_INDICATOR_CONFIG_SCHEMA);
+	ind_config->engine = engine;
+
+	ind_config->icon_theme = ctk_icon_theme_get_default ();
+
+	ctk_icon_theme_append_search_path (ind_config->icon_theme, sp =
+					   g_build_filename (g_get_home_dir
+							     (),
+							     ".icons/flags",
+							     NULL));
+	g_free (sp);
+
+	ctk_icon_theme_append_search_path (ind_config->icon_theme,
+					   sp =
+					   g_build_filename (DATADIR,
+							     "pixmaps/flags",
+							     NULL));
+	g_free (sp);
+
+	ctk_icon_theme_append_search_path (ind_config->icon_theme,
+					   sp =
+					   g_build_filename (DATADIR,
+							     "icons/flags",
+							     NULL));
+	g_free (sp);
+}
+
+void
+cafekbd_indicator_config_term (CafekbdIndicatorConfig * ind_config)
+{
+	g_free (ind_config->font_family);
+	ind_config->font_family = NULL;
+
+	g_free (ind_config->foreground_color);
+	ind_config->foreground_color = NULL;
+
+	g_free (ind_config->background_color);
+	ind_config->background_color = NULL;
+
+	ind_config->icon_theme = NULL;
+
+	cafekbd_indicator_config_free_image_filenames (ind_config);
+
+	g_object_unref (ind_config->settings);
+	ind_config->settings = NULL;
+}
+
+void
+cafekbd_indicator_config_load_from_gsettings (CafekbdIndicatorConfig * ind_config)
+{
+	ind_config->secondary_groups_mask =
+	    g_settings_get_int (ind_config->settings,
+				CAFEKBD_INDICATOR_CONFIG_KEY_SECONDARIES);
+
+	ind_config->show_flags =
+	    g_settings_get_boolean (ind_config->settings,
+				 CAFEKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS);
+
+	cafekbd_indicator_config_load_font (ind_config);
+	cafekbd_indicator_config_load_colors (ind_config);
+
+}
+
+void
+cafekbd_indicator_config_save_to_gsettings (CafekbdIndicatorConfig * ind_config)
+{
+	g_settings_delay (ind_config->settings);
+
+	g_settings_set_int (ind_config->settings,
+				  CAFEKBD_INDICATOR_CONFIG_KEY_SECONDARIES,
+				  ind_config->secondary_groups_mask);
+	g_settings_set_boolean (ind_config->settings,
+				   CAFEKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS,
+				   ind_config->show_flags);
+
+	g_settings_apply (ind_config->settings);
+}
+
+void
+cafekbd_indicator_config_activate (CafekbdIndicatorConfig * ind_config)
+{
+	xkl_engine_set_secondary_groups_mask (ind_config->engine,
+					      ind_config->secondary_groups_mask);
+}
+
+/**
+ * cafekbd_indicator_config_start_listen:
+ * @func: (scope notified): a function to call when settings are changed
+ */
+void
+cafekbd_indicator_config_start_listen (CafekbdIndicatorConfig *
+				    ind_config,
+				    GCallback func,
+				    gpointer user_data)
+{
+	ind_config->config_listener_id =
+	    g_signal_connect (ind_config->settings, "changed", func,
+			      user_data);
+}
+
+void
+cafekbd_indicator_config_stop_listen (CafekbdIndicatorConfig * ind_config)
+{
+	g_signal_handler_disconnect (ind_config->settings,
+				     ind_config->config_listener_id);
+	ind_config->config_listener_id = 0;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/2.html b/2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/2.html new file mode 100644 index 0000000..4489934 --- /dev/null +++ b/2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/2.html @@ -0,0 +1,2100 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
+871
+872
+873
+874
+875
+876
+877
+878
+879
+880
+881
+882
+883
+884
+885
+886
+887
+888
+889
+890
+891
+892
+893
+894
+895
+896
+897
+898
+899
+900
+901
+902
+903
+904
+905
+906
+907
+908
+909
+910
+911
+912
+913
+914
+915
+916
+917
+918
+919
+920
+921
+922
+923
+924
+925
+926
+927
+928
+929
+930
+931
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+#include <config.h>
+
+#include <memory.h>
+
+#include <ctk/ctk.h>
+#include <cdk/cdkkeysyms.h>
+#include <cdk/cdkx.h>
+#include <glib/gi18n-lib.h>
+
+#include <cafekbd-indicator.h>
+#include <cafekbd-indicator-marshal.h>
+
+#include <cafekbd-desktop-config.h>
+#include <cafekbd-indicator-config.h>
+
+typedef struct _gki_globals {
+	XklEngine *engine;
+	XklConfigRegistry *registry;
+
+	CafekbdDesktopConfig cfg;
+	CafekbdIndicatorConfig ind_cfg;
+	CafekbdKeyboardConfig kbd_cfg;
+
+	const gchar *tooltips_format;
+	gchar **full_group_names;
+	gchar **short_group_names;
+	GSList *widget_instances;
+	GSList *images;
+} gki_globals;
+
+struct _CafekbdIndicatorPrivate {
+	gboolean set_parent_tooltips;
+	gdouble angle;
+};
+
+/* one instance for ALL widgets */
+static gki_globals globals;
+
+#define ForAllIndicators() \
+	{ \
+		GSList* cur; \
+		for (cur = globals.widget_instances; cur != NULL; cur = cur->next) { \
+			CafekbdIndicator * gki = (CafekbdIndicator*)cur->data;
+#define NextIndicator() \
+		} \
+	}
+
+G_DEFINE_TYPE (CafekbdIndicator, cafekbd_indicator, CTK_TYPE_NOTEBOOK)<--- There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
+
+static void
+cafekbd_indicator_global_init (void);
+static void
+cafekbd_indicator_global_term (void);
+static CtkWidget *
+cafekbd_indicator_prepare_drawing (CafekbdIndicator * gki, int group);
+static void
+cafekbd_indicator_set_current_page_for_group (CafekbdIndicator * gki, int group);
+static void
+cafekbd_indicator_set_current_page (CafekbdIndicator * gki);
+static void
+cafekbd_indicator_cleanup (CafekbdIndicator * gki);
+static void
+cafekbd_indicator_fill (CafekbdIndicator * gki);
+static void
+cafekbd_indicator_set_tooltips (CafekbdIndicator * gki, const char *str);
+
+gchar *
+cafekbd_indicator_extract_layout_name (int group, XklEngine *engine, CafekbdKeyboardConfig *kbd_cfg, gchar **short_group_names, gchar **full_group_names);
+gchar *
+cafekbd_indicator_create_label_title (int group, GHashTable **ln2cnt_map, gchar *layout_name);
+
+static void
+cafekbd_indicator_load_images (void)
+{
+	int i;
+	GSList *image_filename;
+
+	globals.images = NULL;
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	if (!globals.ind_cfg.show_flags)
+		return;
+
+	image_filename = globals.ind_cfg.image_filenames;
+
+	for (i = xkl_engine_get_max_num_groups (globals.engine);
+	     --i >= 0; image_filename = image_filename->next) {
+		GdkPixbuf *image = NULL;
+		char *image_file = (char *) image_filename->data;
+
+		if (image_file != NULL) {
+			GError *gerror = NULL;
+			image =
+			    gdk_pixbuf_new_from_file (image_file, &gerror);
+			if (image == NULL) {
+				CtkWidget *dialog =
+				    ctk_message_dialog_new (NULL,
+							    CTK_DIALOG_DESTROY_WITH_PARENT,
+							    CTK_MESSAGE_ERROR,
+							    CTK_BUTTONS_OK,
+							    _
+							    ("There was an error loading an image: %s"),
+							    gerror->
+							    message);
+				g_signal_connect (G_OBJECT (dialog),
+						  "response",
+						  G_CALLBACK
+						  (ctk_widget_destroy),
+						  NULL);
+
+				ctk_window_set_resizable (CTK_WINDOW
+							  (dialog), FALSE);
+
+				ctk_widget_show (dialog);
+				g_error_free (gerror);
+			}
+			xkl_debug (150,
+				   "Image %d[%s] loaded -> %p[%dx%d]\n",
+				   i, image_file, image,
+				   gdk_pixbuf_get_width (image),
+				   gdk_pixbuf_get_height (image));
+		}
+		/* We append the image anyway - even if it is NULL! */
+		globals.images = g_slist_append (globals.images, image);
+	}
+}
+
+static void
+cafekbd_indicator_free_images (void)
+{
+	GSList *img_node;
+
+	cafekbd_indicator_config_free_image_filenames (&globals.ind_cfg);
+
+	while ((img_node = globals.images) != NULL) {
+		GdkPixbuf *pi;
+
+		pi = GDK_PIXBUF (img_node->data);
+		/* It can be NULL - some images may be missing */
+		if (pi != NULL) {
+			g_object_unref (pi);
+		}
+		globals.images =
+		    g_slist_remove_link (globals.images, img_node);
+		g_slist_free_1 (img_node);
+	}
+}
+
+static void
+cafekbd_indicator_update_images (void)
+{
+	cafekbd_indicator_free_images ();
+	cafekbd_indicator_load_images ();
+}
+
+void
+cafekbd_indicator_set_tooltips (CafekbdIndicator * gki, const char *str)
+{
+	g_assert (str == NULL || g_utf8_validate (str, -1, NULL));
+
+	ctk_widget_set_tooltip_text (CTK_WIDGET (gki), str);
+
+	if (gki->priv->set_parent_tooltips) {
+		CtkWidget *parent =
+		    ctk_widget_get_parent (CTK_WIDGET (gki));
+		if (parent) {
+			ctk_widget_set_tooltip_text (parent, str);
+		}
+	}
+}
+
+void
+cafekbd_indicator_cleanup (CafekbdIndicator * gki)
+{
+	int i;
+	CtkNotebook *notebook = CTK_NOTEBOOK (gki);
+
+	/* Do not remove the first page! It is the default page */
+	for (i = ctk_notebook_get_n_pages (notebook); --i > 0;) {
+		ctk_notebook_remove_page (notebook, i);
+	}
+}
+
+void
+cafekbd_indicator_fill (CafekbdIndicator * gki)
+{
+	int grp;
+	int total_groups = xkl_engine_get_num_groups (globals.engine);
+	CtkNotebook *notebook = CTK_NOTEBOOK (gki);
+
+	for (grp = 0; grp < total_groups; grp++) {
+		CtkWidget *page;
+		page = cafekbd_indicator_prepare_drawing (gki, grp);
+
+		if (page == NULL)
+			page = ctk_label_new ("");
+
+		ctk_notebook_append_page (notebook, page, NULL);
+		ctk_widget_show_all (page);
+	}
+}
+
+static gboolean cafekbd_indicator_key_pressed (CtkWidget        *widget G_GNUC_UNUSED,
+					       CdkEventKey      *event,
+					       CafekbdIndicator *gki G_GNUC_UNUSED)
+{
+	switch (event->keyval)
+	{
+			case CDK_KEY_KP_Enter:
+			case CDK_KEY_ISO_Enter:
+			case CDK_KEY_3270_Enter:
+			case CDK_KEY_Return:
+			case CDK_KEY_space:
+			case CDK_KEY_KP_Space:
+			cafekbd_desktop_config_lock_next_group(&globals.cfg);
+			return TRUE;
+		default:
+			break;
+	}
+
+	return FALSE;
+}
+
+static gboolean
+cafekbd_indicator_button_pressed (CtkWidget        *widget,
+				  CdkEventButton   *event,
+				  CafekbdIndicator *gki G_GNUC_UNUSED)
+{
+	CtkWidget *img = ctk_bin_get_child (CTK_BIN (widget));
+	CtkAllocation allocation;
+	ctk_widget_get_allocation (img, &allocation);
+	xkl_debug (150, "Flag img size %d x %d\n",
+		   allocation.width, allocation.height);
+	if (event->button == 1 && event->type == CDK_BUTTON_PRESS) {
+		xkl_debug (150, "Mouse button pressed on applet\n");
+		cafekbd_desktop_config_lock_next_group (&globals.cfg);
+		return TRUE;
+	}
+	return FALSE;
+}
+
+static void
+draw_flag (CtkWidget * flag, cairo_t * cr, GdkPixbuf * image)
+{
+	/* Image width and height */
+	int iw = gdk_pixbuf_get_width (image);
+	int ih = gdk_pixbuf_get_height (image);
+	CtkAllocation allocation;
+	double xwiratio, ywiratio, wiratio;
+
+	ctk_widget_get_allocation (flag, &allocation);
+
+	/* widget-to-image scales, X and Y */
+	xwiratio = 1.0 * allocation.width / iw;
+	ywiratio = 1.0 * allocation.height / ih;
+	wiratio = xwiratio < ywiratio ? xwiratio : ywiratio;
+
+	/* transform cairo context */
+	cairo_translate (cr, allocation.width / 2.0, allocation.height / 2.0);
+	cairo_scale (cr, wiratio, wiratio);
+	cairo_translate (cr, - iw / 2.0, - ih / 2.0);
+
+	cdk_cairo_set_source_pixbuf (cr, image, 0, 0);
+	cairo_paint (cr);
+}
+
+gchar *
+cafekbd_indicator_extract_layout_name (int group, XklEngine * engine,
+				    CafekbdKeyboardConfig * kbd_cfg,
+				    gchar ** short_group_names,
+				    gchar ** full_group_names)
+{
+	char *layout_name = NULL;
+	if (group < g_strv_length (short_group_names)) {
+		if (xkl_engine_get_features (engine) &
+		    XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
+			char *full_layout_name =
+			    kbd_cfg->layouts_variants[group];
+			char *variant_name;
+			if (!cafekbd_keyboard_config_split_items
+			    (full_layout_name, &layout_name,
+			     &variant_name))
+				/* just in case */
+				layout_name = full_layout_name;
+
+			/* make it freeable */
+			layout_name = g_strdup (layout_name);
+
+			if (short_group_names != NULL) {
+				char *short_group_name =
+				    short_group_names[group];
+				if (short_group_name != NULL
+				    && *short_group_name != '\0') {
+					/* drop the long name */
+					g_free (layout_name);
+					layout_name =
+					    g_strdup (short_group_name);
+				}
+			}
+		} else {
+			layout_name = g_strdup (full_group_names[group]);
+		}
+	}
+
+	if (layout_name == NULL)
+		layout_name = g_strdup ("");
+
+	return layout_name;
+}
+
+gchar *
+cafekbd_indicator_create_label_title (int group, GHashTable ** ln2cnt_map,
+				   gchar * layout_name)
+{
+	gpointer pcounter = NULL;
+	char *prev_layout_name = NULL;
+	char *lbl_title = NULL;
+	int counter = 0;
+
+	if (group == 0) {
+		*ln2cnt_map =
+		    g_hash_table_new_full (g_str_hash, g_str_equal,
+					   g_free, NULL);
+	}
+
+	/* Process layouts with repeating description */
+	if (g_hash_table_lookup_extended
+	    (*ln2cnt_map, layout_name, (gpointer *) & prev_layout_name,
+	     &pcounter)) {
+		/* "next" same description */
+		gchar appendix[10] = "";
+		gint utf8length;
+		gunichar cidx;
+		counter = GPOINTER_TO_INT (pcounter);
+		/* Unicode subscript 2, 3, 4 */
+		cidx = 0x2081 + counter;
+		utf8length = g_unichar_to_utf8 (cidx, appendix);
+		appendix[utf8length] = '\0';
+		lbl_title = g_strconcat (layout_name, appendix, NULL);
+	} else {
+		/* "first" time this description */
+		lbl_title = g_strdup (layout_name);
+	}
+	g_hash_table_insert (*ln2cnt_map, layout_name,
+			     GINT_TO_POINTER (counter + 1));
+	return lbl_title;
+}
+
+static CtkWidget *
+cafekbd_indicator_prepare_drawing (CafekbdIndicator * gki, int group)
+{
+	gpointer pimage;
+	CtkWidget *ebox;
+
+	pimage = g_slist_nth_data (globals.images, group);
+	ebox = ctk_event_box_new ();
+	ctk_event_box_set_visible_window (CTK_EVENT_BOX (ebox), FALSE);
+	if (globals.ind_cfg.show_flags) {
+		GdkPixbuf *image;
+		CtkWidget *flag;
+
+		if (pimage == NULL)
+			return NULL;
+		image = GDK_PIXBUF (pimage);
+		flag = ctk_drawing_area_new ();
+		ctk_widget_add_events (CTK_WIDGET (flag),
+				       CDK_BUTTON_PRESS_MASK);
+		g_signal_connect (G_OBJECT (flag), "draw",
+		                  G_CALLBACK (draw_flag), image);
+		ctk_container_add (CTK_CONTAINER (ebox), flag);
+	} else {
+		char *lbl_title = NULL;
+		char *layout_name = NULL;
+		CtkWidget *label;
+		static GHashTable *ln2cnt_map = NULL;
+
+		layout_name =
+		    cafekbd_indicator_extract_layout_name (group,
+							globals.engine,
+							&globals.kbd_cfg,
+							globals.short_group_names,
+							globals.full_group_names);
+
+		lbl_title =
+		    cafekbd_indicator_create_label_title (group,
+						       &ln2cnt_map,
+						       layout_name);
+
+		label = ctk_label_new (lbl_title);
+		ctk_widget_set_halign (label, CTK_ALIGN_CENTER);
+		ctk_widget_set_valign (label, CTK_ALIGN_CENTER);
+		ctk_widget_set_margin_start (label, 2);
+		ctk_widget_set_margin_end (label, 2);
+		ctk_widget_set_margin_top (label, 2);
+		ctk_widget_set_margin_bottom (label, 2);
+		g_free (lbl_title);
+		ctk_label_set_angle (CTK_LABEL (label), gki->priv->angle);
+
+		if (group + 1 ==
+		    xkl_engine_get_num_groups (globals.engine)) {
+			g_hash_table_destroy (ln2cnt_map);
+			ln2cnt_map = NULL;
+		}
+
+		ctk_container_add (CTK_CONTAINER (ebox), label);
+	}
+
+	g_signal_connect (G_OBJECT (ebox),
+			  "button_press_event",
+			  G_CALLBACK (cafekbd_indicator_button_pressed), gki);
+
+	g_signal_connect (G_OBJECT (gki),
+			  "key_press_event",
+			  G_CALLBACK (cafekbd_indicator_key_pressed), gki);
+
+	/* We have everything prepared for that size */
+
+	return ebox;
+}
+
+static void
+cafekbd_indicator_update_tooltips (CafekbdIndicator * gki)
+{
+	XklState *state = xkl_engine_get_current_state (globals.engine);
+	gchar *buf;
+	if (state == NULL || state->group < 0
+	    || state->group >= g_strv_length (globals.full_group_names))
+		return;
+
+	buf = g_strdup_printf (globals.tooltips_format,
+			       globals.full_group_names[state->group]);
+
+	cafekbd_indicator_set_tooltips (gki, buf);
+	g_free (buf);
+}
+
+static void
+cafekbd_indicator_parent_set (CtkWidget *gki,
+			      CtkWidget *previous_parent G_GNUC_UNUSED)
+{
+	cafekbd_indicator_update_tooltips (CAFEKBD_INDICATOR (gki));
+}
+
+
+void
+cafekbd_indicator_reinit_ui (CafekbdIndicator * gki)
+{
+	cafekbd_indicator_cleanup (gki);
+	cafekbd_indicator_fill (gki);
+
+	cafekbd_indicator_set_current_page (gki);
+
+	g_signal_emit_by_name (gki, "reinit-ui");
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+			       gchar     *key G_GNUC_UNUSED,
+			       gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "General configuration changed in GSettings - reiniting...\n");
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+	ForAllIndicators () {
+		cafekbd_indicator_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_ind_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+				   gchar     *key G_GNUC_UNUSED,
+				   gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "Applet configuration changed in GSettings - reiniting...\n");
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+	cafekbd_indicator_update_images ();
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	ForAllIndicators () {
+		cafekbd_indicator_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+static void
+cafekbd_indicator_load_group_names (const gchar ** layout_ids,
+				 const gchar ** variant_ids)
+{
+	if (!cafekbd_desktop_config_load_group_descriptions
+	    (&globals.cfg, globals.registry, layout_ids, variant_ids,
+	     &globals.short_group_names, &globals.full_group_names)) {
+		/* We just populate no short names (remain NULL) -
+		 * full names are going to be used anyway */
+		gint i, total_groups =
+		    xkl_engine_get_num_groups (globals.engine);
+		globals.full_group_names =
+		    g_new0 (gchar *, total_groups + 1);
+
+		if (xkl_engine_get_features (globals.engine) &
+		    XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
+			gchar **lst = globals.kbd_cfg.layouts_variants;
+			for (i = 0; *lst; lst++, i++) {
+				globals.full_group_names[i] =
+				    g_strdup ((char *) *lst);
+			}
+		} else {
+			for (i = total_groups; --i >= 0;) {
+				globals.full_group_names[i] =
+				    g_strdup_printf ("Group %d", i);
+			}
+		}
+	}
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_kbd_cfg_callback (CafekbdIndicator *gki G_GNUC_UNUSED)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+	xkl_debug (100,
+		   "XKB configuration changed on X Server - reiniting...\n");
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+	cafekbd_indicator_update_images ();
+
+	g_strfreev (globals.full_group_names);
+	globals.full_group_names = NULL;
+
+	if (globals.short_group_names != NULL) {
+		g_strfreev (globals.short_group_names);
+		globals.short_group_names = NULL;
+	}
+
+	cafekbd_indicator_load_group_names ((const gchar **) xklrec->layouts,
+					 (const gchar **)
+					 xklrec->variants);
+
+	ForAllIndicators () {
+		cafekbd_indicator_reinit_ui (gki);
+	} NextIndicator ();
+	g_object_unref (G_OBJECT (xklrec));
+}
+
+/* Should be called once for all applets */
+static void
+cafekbd_indicator_state_callback (XklEngine           *engine G_GNUC_UNUSED,
+				  XklEngineStateChange changeType,
+				  gint                 group,
+				  gboolean             restore)
+{
+	xkl_debug (150, "group is now %d, restore: %d\n", group, restore);
+
+	if (changeType == GROUP_CHANGED) {
+		ForAllIndicators () {
+			xkl_debug (200, "do repaint\n");
+			cafekbd_indicator_set_current_page_for_group
+			    (gki, group);
+		}
+		NextIndicator ();
+	}
+}
+
+
+void
+cafekbd_indicator_set_current_page (CafekbdIndicator * gki)
+{
+	XklState *cur_state;
+	cur_state = xkl_engine_get_current_state (globals.engine);
+	if (cur_state->group >= 0)
+		cafekbd_indicator_set_current_page_for_group (gki,
+							   cur_state->
+							   group);
+}
+
+void
+cafekbd_indicator_set_current_page_for_group (CafekbdIndicator * gki, int group)
+{
+	xkl_debug (200, "Revalidating for group %d\n", group);
+
+	ctk_notebook_set_current_page (CTK_NOTEBOOK (gki), group + 1);
+
+	cafekbd_indicator_update_tooltips (gki);
+}
+
+/* Should be called once for all widgets */
+static CdkFilterReturn
+cafekbd_indicator_filter_x_evt (CdkXEvent *xev,
+				CdkEvent  *event G_GNUC_UNUSED)
+{
+	XEvent *xevent = (XEvent *) xev;
+
+	xkl_engine_filter_events (globals.engine, xevent);
+	switch (xevent->type) {
+	case ReparentNotify:
+		{
+			XReparentEvent *rne = (XReparentEvent *) xev;
+
+			ForAllIndicators () {
+				CdkWindow *w =
+				    ctk_widget_get_parent_window
+				    (CTK_WIDGET (gki));
+
+				/* compare the indicator's parent window with the even window */
+				if (w != NULL
+				    && CDK_WINDOW_XID (w) == rne->window) {
+					/* if so - make it transparent... */
+					xkl_engine_set_window_transparent
+					    (globals.engine, rne->window,
+					     TRUE);
+				}
+			}
+			NextIndicator ()
+		}
+		break;
+	}
+	return CDK_FILTER_CONTINUE;
+}
+
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_start_listen (void)
+{
+	cdk_window_add_filter (NULL, (CdkFilterFunc)
+			       cafekbd_indicator_filter_x_evt, NULL);
+	cdk_window_add_filter (cdk_get_default_root_window (),
+			       (CdkFilterFunc)
+			       cafekbd_indicator_filter_x_evt, NULL);
+
+	xkl_engine_start_listen (globals.engine,
+				 XKLL_TRACK_KEYBOARD_STATE);
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_stop_listen (void)
+{
+	xkl_engine_stop_listen (globals.engine, XKLL_TRACK_KEYBOARD_STATE);
+
+	cdk_window_remove_filter (NULL, (CdkFilterFunc)
+				  cafekbd_indicator_filter_x_evt, NULL);
+	cdk_window_remove_filter
+	    (cdk_get_default_root_window (),
+	     (CdkFilterFunc) cafekbd_indicator_filter_x_evt, NULL);
+}
+
+static gboolean
+cafekbd_indicator_scroll (CtkWidget      *gki G_GNUC_UNUSED,
+			  CdkEventScroll *event G_GNUC_UNUSED)
+{
+	/* mouse wheel events should be ignored, otherwise funny effects appear */
+	return TRUE;
+}
+
+static void cafekbd_indicator_init(CafekbdIndicator* gki)
+{
+	CtkWidget *def_drawing;
+	CtkNotebook *notebook;
+
+	if (!g_slist_length(globals.widget_instances))
+	{
+		cafekbd_indicator_global_init();
+	}
+
+	gki->priv = g_new0 (CafekbdIndicatorPrivate, 1);
+
+	notebook = CTK_NOTEBOOK (gki);
+
+	xkl_debug (100, "Initiating the widget startup process for %p\n", gki);
+
+	ctk_notebook_set_show_tabs (notebook, FALSE);
+	ctk_notebook_set_show_border (notebook, FALSE);
+
+	def_drawing =
+	    ctk_image_new_from_icon_name ("process-stop",
+				      CTK_ICON_SIZE_BUTTON);
+
+	ctk_notebook_append_page (notebook, def_drawing,
+				  ctk_label_new (""));
+
+	if (globals.engine == NULL) {
+		cafekbd_indicator_set_tooltips (gki,
+					     _
+					     ("XKB initialization error"));
+		return;
+	}
+
+	cafekbd_indicator_set_tooltips (gki, NULL);
+
+	cafekbd_indicator_fill (gki);
+	cafekbd_indicator_set_current_page (gki);
+
+	ctk_widget_add_events (CTK_WIDGET (gki), CDK_BUTTON_PRESS_MASK);
+
+	/* append AFTER all initialization work is finished */
+	globals.widget_instances =
+	    g_slist_append (globals.widget_instances, gki);
+}
+
+static void
+cafekbd_indicator_finalize (GObject * obj)
+{
+	CafekbdIndicator *gki = CAFEKBD_INDICATOR (obj);
+	xkl_debug (100,
+		   "Starting the cafe-kbd-indicator widget shutdown process for %p\n",
+		   gki);
+
+	/* remove BEFORE all termination work is finished */
+	globals.widget_instances =
+	    g_slist_remove (globals.widget_instances, gki);
+
+	cafekbd_indicator_cleanup (gki);
+
+	xkl_debug (100,
+		   "The instance of cafe-kbd-indicator successfully finalized\n");
+
+	g_free (gki->priv);
+
+	G_OBJECT_CLASS (cafekbd_indicator_parent_class)->finalize (obj);
+
+	if (!g_slist_length (globals.widget_instances))
+		cafekbd_indicator_global_term ();
+}
+
+static void
+cafekbd_indicator_global_term (void)
+{
+	xkl_debug (100, "*** Last  CafekbdIndicator instance *** \n");
+	cafekbd_indicator_stop_listen ();
+
+	cafekbd_desktop_config_stop_listen (&globals.cfg);
+	cafekbd_indicator_config_stop_listen (&globals.ind_cfg);
+
+	cafekbd_indicator_config_term (&globals.ind_cfg);
+	cafekbd_keyboard_config_term (&globals.kbd_cfg);
+	cafekbd_desktop_config_term (&globals.cfg);
+
+	g_object_unref (G_OBJECT (globals.registry));
+	globals.registry = NULL;
+	g_object_unref (G_OBJECT (globals.engine));
+	globals.engine = NULL;
+	xkl_debug (100, "*** Terminated globals *** \n");
+}
+
+static void
+cafekbd_indicator_class_init (CafekbdIndicatorClass * klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+	CtkWidgetClass *widget_class = CTK_WIDGET_CLASS (klass);
+
+	xkl_debug (100, "*** First CafekbdIndicator instance *** \n");
+
+	memset (&globals, 0, sizeof (globals));
+
+	/* Initing some global vars */
+	globals.tooltips_format = "%s";
+
+	/* Initing vtable */
+	object_class->finalize = cafekbd_indicator_finalize;
+
+	widget_class->scroll_event = cafekbd_indicator_scroll;
+	widget_class->parent_set = cafekbd_indicator_parent_set;
+
+	/* Signals */
+	g_signal_new ("reinit-ui", CAFEKBD_TYPE_INDICATOR,
+		      G_SIGNAL_RUN_LAST,
+		      G_STRUCT_OFFSET (CafekbdIndicatorClass, reinit_ui),
+		      NULL, NULL, cafekbd_indicator_VOID__VOID,
+		      G_TYPE_NONE, 0);
+}
+
+static void
+cafekbd_indicator_global_init (void)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+
+	globals.engine = xkl_engine_get_instance(CDK_DISPLAY_XDISPLAY(cdk_display_get_default()));
+
+	if (globals.engine == NULL)
+	{
+		xkl_debug (0, "Libxklavier initialization error");
+		return;
+	}
+
+	g_signal_connect (globals.engine, "X-state-changed",
+			  G_CALLBACK (cafekbd_indicator_state_callback),
+			  NULL);
+	g_signal_connect (globals.engine, "X-config-changed",
+			  G_CALLBACK (cafekbd_indicator_kbd_cfg_callback),
+			  NULL);
+
+	cafekbd_desktop_config_init (&globals.cfg, globals.engine);
+	cafekbd_keyboard_config_init (&globals.kbd_cfg, globals.engine);
+	cafekbd_indicator_config_init (&globals.ind_cfg, globals.engine);
+
+	cafekbd_desktop_config_start_listen (&globals.cfg,
+					  (GCallback)
+					  cafekbd_indicator_cfg_changed,
+					  NULL);
+	cafekbd_indicator_config_start_listen (&globals.ind_cfg,
+					    (GCallback)
+					    cafekbd_indicator_ind_cfg_changed,
+					    NULL);
+
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+
+	globals.registry =
+	    xkl_config_registry_get_instance (globals.engine);
+	xkl_config_registry_load (globals.registry,
+				  globals.cfg.load_extra_items);
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+	cafekbd_indicator_update_images ();
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	cafekbd_indicator_load_group_names ((const gchar **) xklrec->layouts,
+					 (const gchar **)
+					 xklrec->variants);
+	g_object_unref (G_OBJECT (xklrec));
+
+	cafekbd_indicator_start_listen ();
+
+	xkl_debug (100, "*** Inited globals *** \n");
+}
+
+CtkWidget *
+cafekbd_indicator_new (void)
+{
+	return
+	    CTK_WIDGET (g_object_new (cafekbd_indicator_get_type (), NULL));
+}
+
+void
+cafekbd_indicator_set_parent_tooltips (CafekbdIndicator * gki, gboolean spt)
+{
+	gki->priv->set_parent_tooltips = spt;
+	cafekbd_indicator_update_tooltips (gki);
+}
+
+void
+cafekbd_indicator_set_tooltips_format (const gchar format[])
+{
+	globals.tooltips_format = format;
+	ForAllIndicators ()
+	    cafekbd_indicator_update_tooltips (gki);
+	NextIndicator ()
+}
+
+/**
+ * cafekbd_indicator_get_xkl_engine:
+ *
+ * Returns: (transfer none): The engine shared by all CafekbdIndicator objects
+ */
+XklEngine *
+cafekbd_indicator_get_xkl_engine ()
+{
+	return globals.engine;
+}
+
+/**
+ * cafekbd_indicator_get_group_names:
+ *
+ * Returns: (transfer none) (array zero-terminated=1): List of group names
+ */
+gchar **
+cafekbd_indicator_get_group_names ()
+{
+	return globals.full_group_names;
+}
+
+gchar *
+cafekbd_indicator_get_image_filename (guint group)
+{
+	if (!globals.ind_cfg.show_flags)
+		return NULL;
+	return cafekbd_indicator_config_get_images_file (&globals.ind_cfg,
+						      &globals.kbd_cfg,
+						      group);
+}
+
+gdouble
+cafekbd_indicator_get_max_width_height_ratio (void)
+{
+	gdouble rv = 0.0;
+	GSList *ip = globals.images;
+	if (!globals.ind_cfg.show_flags)
+		return 0;
+	while (ip != NULL) {
+		GdkPixbuf *img = GDK_PIXBUF (ip->data);
+		gdouble r =
+		    1.0 * gdk_pixbuf_get_width (img) /
+		    gdk_pixbuf_get_height (img);
+		if (r > rv)
+			rv = r;
+		ip = ip->next;
+	}
+	return rv;
+}
+
+void
+cafekbd_indicator_set_angle (CafekbdIndicator * gki, gdouble angle)
+{
+	gki->priv->angle = angle;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/3.html b/2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/3.html new file mode 100644 index 0000000..2dbd2a6 --- /dev/null +++ b/2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/3.html @@ -0,0 +1,1832 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <X11/keysym.h>
+
+#include <glib/gi18n-lib.h>
+
+#include <cafekbd-keyboard-config.h>
+#include <cafekbd-config-private.h>
+#include <cafekbd-util.h>
+
+/*
+ * CafekbdKeyboardConfig
+ */
+#define CAFEKBD_KEYBOARD_CONFIG_SCHEMA CAFEKBD_CONFIG_SCHEMA ".kbd"
+
+#define GROUP_SWITCHERS_GROUP "grp"
+#define DEFAULT_GROUP_SWITCH "grp:shift_caps_toggle"
+
+const gchar CAFEKBD_KEYBOARD_CONFIG_KEY_MODEL[] = "model";
+const gchar CAFEKBD_KEYBOARD_CONFIG_KEY_LAYOUTS[] = "layouts";
+const gchar CAFEKBD_KEYBOARD_CONFIG_KEY_OPTIONS[] = "options";
+
+const gchar *CAFEKBD_KEYBOARD_CONFIG_ACTIVE[] = {
+	CAFEKBD_KEYBOARD_CONFIG_KEY_MODEL,
+	CAFEKBD_KEYBOARD_CONFIG_KEY_LAYOUTS,
+	CAFEKBD_KEYBOARD_CONFIG_KEY_OPTIONS
+};
+
+/*
+ * static common functions
+ */
+
+static gboolean
+cafekbd_strv_equal (gchar ** l1, gchar ** l2)
+{
+	if (l1 == l2)
+		return TRUE;
+	if (l1 == NULL)
+		return g_strv_length (l2) == 0;
+	if (l2 == NULL)
+		return g_strv_length (l1) == 0;
+
+	while ((*l1 != NULL) && (*l2 != NULL)) {
+		if (*l1 != *l2) {
+			if (*l1 && *l2) {<--- Condition '*l1' is always true<--- Condition '*l2' is always true
+				if (g_ascii_strcasecmp (*l1, *l2))
+					return FALSE;
+			} else
+				return FALSE;
+		}
+
+		l1++;
+		l2++;
+	}
+	return (*l1 == NULL) && (*l2 == NULL);
+}
+
+gboolean
+cafekbd_keyboard_config_get_lv_descriptions (XklConfigRegistry *
+					  config_registry,
+					  const gchar * layout_name,
+					  const gchar * variant_name,
+					  gchar ** layout_short_descr,
+					  gchar ** layout_descr,
+					  gchar ** variant_short_descr,
+					  gchar ** variant_descr)
+{
+	/* TODO make it not static */
+	static XklConfigItem *litem = NULL;
+	static XklConfigItem *vitem = NULL;
+
+	if (litem == NULL)
+		litem = xkl_config_item_new ();
+	if (vitem == NULL)
+		vitem = xkl_config_item_new ();
+
+	layout_name = g_strdup (layout_name);
+
+	g_snprintf (litem->name, sizeof litem->name, "%s", layout_name);
+	if (xkl_config_registry_find_layout (config_registry, litem)) {
+		*layout_short_descr = litem->short_description;
+		*layout_descr = litem->description;
+	} else
+		*layout_short_descr = *layout_descr = NULL;
+
+	if (variant_name != NULL) {
+		variant_name = g_strdup (variant_name);
+		g_snprintf (vitem->name, sizeof vitem->name, "%s",
+			    variant_name);
+		if (xkl_config_registry_find_variant
+		    (config_registry, layout_name, vitem)) {
+			*variant_short_descr = vitem->short_description;
+			*variant_descr = vitem->description;
+		} else
+			*variant_short_descr = *variant_descr = NULL;
+
+		g_free ((char *) variant_name);
+	} else
+		*variant_descr = NULL;
+
+	g_free ((char *) layout_name);
+	return *layout_descr != NULL;
+}
+
+/*
+ * extern common functions
+ */
+const gchar *
+cafekbd_keyboard_config_merge_items (const gchar * parent,
+				  const gchar * child)
+{
+	static gchar buffer[XKL_MAX_CI_NAME_LENGTH * 2 - 1];
+	*buffer = '\0';
+	if (parent != NULL) {
+		if (strlen (parent) >= XKL_MAX_CI_NAME_LENGTH)
+			return NULL;
+		strcat (buffer, parent);
+	}
+	if (child != NULL && *child != 0) {
+		if (strlen (child) >= XKL_MAX_CI_NAME_LENGTH)
+			return NULL;
+		strcat (buffer, "\t");
+		strcat (buffer, child);
+	}
+	return buffer;
+}
+
+gboolean
+cafekbd_keyboard_config_split_items (const gchar * merged, gchar ** parent,
+				  gchar ** child)
+{
+	static gchar pbuffer[XKL_MAX_CI_NAME_LENGTH];
+	static gchar cbuffer[XKL_MAX_CI_NAME_LENGTH];
+	int plen;
+	const gchar *pos;
+	*parent = *child = NULL;
+
+	if (merged == NULL)
+		return FALSE;
+
+	pos = strchr (merged, '\t');
+	if (pos == NULL) {
+		plen = strlen (merged);
+	} else {
+		plen = pos - merged;
+		if (strlen (pos + 1) >= XKL_MAX_CI_NAME_LENGTH)
+			return FALSE;
+		strcpy (*child = cbuffer, pos + 1);
+	}
+	if (plen >= XKL_MAX_CI_NAME_LENGTH)
+		return FALSE;
+	memcpy (*parent = pbuffer, merged, plen);
+	pbuffer[plen] = '\0';
+	return TRUE;
+}
+
+/*
+ * static CafekbdKeyboardConfig functions
+ */
+static void
+cafekbd_keyboard_config_copy_from_xkl_config (CafekbdKeyboardConfig * kbd_config,
+					   XklConfigRec * pdata)
+{
+	char **p;
+	int i;
+	cafekbd_keyboard_config_model_set (kbd_config, pdata->model);
+	xkl_debug (150, "Loaded Kbd model: [%s]\n", pdata->model);
+
+	/* Layouts */
+	g_strfreev (kbd_config->layouts_variants);
+	kbd_config->layouts_variants = NULL;
+	if (pdata->layouts != NULL) {
+		char **p1;
+
+		p = pdata->layouts;
+		p1 = pdata->variants;
+		kbd_config->layouts_variants =
+		    g_new0 (gchar *, g_strv_length (pdata->layouts) + 1);
+		i = 0;
+		while (*p != NULL) {
+			const gchar *full_layout =
+			    cafekbd_keyboard_config_merge_items (*p, *p1);
+			xkl_debug (150,
+				   "Loaded Kbd layout (with variant): [%s]\n",
+				   full_layout);
+			kbd_config->layouts_variants[i++] =
+			    g_strdup (full_layout);
+			p++;
+			p1++;
+		}
+	}
+
+	/* Options */
+	g_strfreev (kbd_config->options);
+	kbd_config->options = NULL;
+
+	if (pdata->options != NULL) {
+		p = pdata->options;
+		kbd_config->options =
+		    g_new0 (gchar *, g_strv_length (pdata->options) + 1);
+		i = 0;
+		while (*p != NULL) {
+			char *option = *p;
+			char *delim =<--- Variable 'delim' can be declared as pointer to const
+			    (option != NULL) ? strchr (option, ':') : NULL;<--- Condition 'option!=NULL' is always true
+			int len;
+			if ((delim != NULL) &&
+			    ((len =
+			      (delim - option)) <
+			     XKL_MAX_CI_NAME_LENGTH)) {
+				char group[XKL_MAX_CI_NAME_LENGTH];
+
+				strncpy (group, option, len);
+				group[len] = 0;
+				xkl_debug (150,
+					   "Loaded Kbd option: [%s][%s]\n",
+					   group, option);
+				cafekbd_keyboard_config_options_set
+				    (kbd_config, i++, group, option);
+			}
+			p++;
+		}
+	}
+}
+
+static void
+cafekbd_keyboard_config_copy_to_xkl_config (CafekbdKeyboardConfig * kbd_config,
+					 XklConfigRec * pdata)
+{
+	int i;
+	int num_layouts, num_options;
+	pdata->model =
+	    (kbd_config->model ==
+	     NULL) ? NULL : g_strdup (kbd_config->model);
+
+	num_layouts =
+	    (kbd_config->layouts_variants ==
+	     NULL) ? 0 : g_strv_length (kbd_config->layouts_variants);
+	num_options =
+	    (kbd_config->options ==
+	     NULL) ? 0 : g_strv_length (kbd_config->options);
+
+	xkl_debug (150, "Taking %d layouts\n", num_layouts);
+	if (num_layouts != 0) {
+		gchar **the_layout_variant = kbd_config->layouts_variants;
+		char **p1 = pdata->layouts =
+		    g_new0 (char *, num_layouts + 1);
+		char **p2 = pdata->variants =
+		    g_new0 (char *, num_layouts + 1);
+		for (i = num_layouts; --i >= 0;) {
+			char *layout, *variant;
+			if (cafekbd_keyboard_config_split_items
+			    (*the_layout_variant, &layout, &variant)
+			    && variant != NULL) {
+				*p1 =
+				    (layout ==
+				     NULL) ? g_strdup ("") :
+				    g_strdup (layout);
+				*p2 =
+				    (variant ==<--- Condition 'variant==NULL' is always false
+				     NULL) ? g_strdup ("") :
+				    g_strdup (variant);
+			} else {
+				*p1 =
+				    (*the_layout_variant ==
+				     NULL) ? g_strdup ("") :
+				    g_strdup (*the_layout_variant);
+				*p2 = g_strdup ("");
+			}
+			xkl_debug (150, "Adding [%s]/%p and [%s]/%p\n",
+				   *p1 ? *p1 : "(nil)", *p1,
+				   *p2 ? *p2 : "(nil)", *p2);
+			p1++;
+			p2++;
+			the_layout_variant++;
+		}
+	}
+
+	if (num_options != 0) {
+		gchar **the_option = kbd_config->options;
+		char **p = pdata->options =
+		    g_new0 (char *, num_options + 1);
+		for (i = num_options; --i >= 0;) {
+			char *group, *option;
+			if (cafekbd_keyboard_config_split_items
+			    (*the_option, &group, &option)
+			    && option != NULL)
+				*(p++) = g_strdup (option);
+			else {
+				*(p++) = g_strdup ("");
+				xkl_debug (150, "Could not split [%s]\n",
+					   *the_option);
+			}
+			the_option++;
+		}
+	}
+}
+
+static void
+cafekbd_keyboard_config_load_params (CafekbdKeyboardConfig * kbd_config,
+				  const gchar * param_names[])
+{
+	gchar *pc;
+
+	pc = g_settings_get_string (kbd_config->settings, param_names[0]);
+	if (pc == NULL) {
+		cafekbd_keyboard_config_model_set (kbd_config, NULL);
+	} else {
+		cafekbd_keyboard_config_model_set (kbd_config, pc);
+		g_free (pc);
+	}
+	xkl_debug (150, "Loaded Kbd model: [%s]\n",
+		   kbd_config->model ? kbd_config->model : "(null)");
+
+	g_strfreev (kbd_config->layouts_variants);
+
+	kbd_config->layouts_variants =
+	    g_settings_get_strv (kbd_config->settings, param_names[1]);
+
+	if (kbd_config->layouts_variants != NULL
+	    && kbd_config->layouts_variants[0] == NULL) {
+		g_strfreev (kbd_config->layouts_variants);
+		kbd_config->layouts_variants = NULL;
+	}
+
+	g_strfreev (kbd_config->options);
+
+	kbd_config->options =
+	    g_settings_get_strv (kbd_config->settings, param_names[2]);
+
+	if (kbd_config->options != NULL && kbd_config->options[0] == NULL) {
+		g_strfreev (kbd_config->options);
+		kbd_config->options = NULL;
+	}
+}
+
+static void
+cafekbd_keyboard_config_save_params (CafekbdKeyboardConfig * kbd_config,
+				  const gchar * param_names[])
+{
+	gchar **pl;
+
+	if (kbd_config->model)
+		g_settings_set_string (kbd_config->settings, param_names[0],
+				       kbd_config->model);
+	else
+		g_settings_set_string (kbd_config->settings, param_names[0],
+				       NULL);
+	xkl_debug (150, "Saved Kbd model: [%s]\n",
+		   kbd_config->model ? kbd_config->model : "(null)");
+
+	if (kbd_config->layouts_variants) {
+		pl = kbd_config->layouts_variants;
+		while (*pl != NULL) {
+			xkl_debug (150, "Saved Kbd layout: [%s]\n", *pl);
+			pl++;
+		}
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[1],
+				     (const gchar * const *)
+				     kbd_config->layouts_variants);
+	} else {
+		xkl_debug (150, "Saved Kbd layouts: []\n");
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[1], NULL);
+	}
+
+	if (kbd_config->options) {
+		pl = kbd_config->options;
+		while (*pl != NULL) {
+			xkl_debug (150, "Saved Kbd option: [%s]\n", *pl);
+			pl++;
+		}
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[2],
+				     (const gchar *
+				      const *) kbd_config->options);
+	} else {
+		xkl_debug (150, "Saved Kbd options: []\n");
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[2], NULL);
+	}
+}
+
+/*
+ * extern CafekbdKeyboardConfig config functions
+ */
+void
+cafekbd_keyboard_config_init (CafekbdKeyboardConfig * kbd_config,
+			      XklEngine * engine)
+{
+	memset (kbd_config, 0, sizeof (*kbd_config));
+	kbd_config->settings = g_settings_new (CAFEKBD_KEYBOARD_CONFIG_SCHEMA);
+	kbd_config->engine = engine;
+}
+
+void
+cafekbd_keyboard_config_term (CafekbdKeyboardConfig * kbd_config)
+{
+	cafekbd_keyboard_config_model_set (kbd_config, NULL);
+
+	g_strfreev (kbd_config->layouts_variants);
+	kbd_config->layouts_variants = NULL;
+	g_strfreev (kbd_config->options);
+	kbd_config->options = NULL;
+
+	g_object_unref (kbd_config->settings);
+	kbd_config->settings = NULL;
+}
+
+void
+cafekbd_keyboard_config_load_from_gsettings (CafekbdKeyboardConfig * kbd_config,
+				      CafekbdKeyboardConfig *
+				      kbd_config_default)
+{
+	cafekbd_keyboard_config_load_params (kbd_config,
+					  CAFEKBD_KEYBOARD_CONFIG_ACTIVE);
+
+	if (kbd_config_default != NULL) {
+
+		if (kbd_config->model == NULL)
+			kbd_config->model =
+			    g_strdup (kbd_config_default->model);
+
+		if (kbd_config->layouts_variants == NULL) {
+			kbd_config->layouts_variants =
+			    g_strdupv
+			    (kbd_config_default->layouts_variants);
+		}
+
+		if (kbd_config->options == NULL) {
+			kbd_config->options =
+			    g_strdupv (kbd_config_default->options);
+		}
+	}
+}
+
+void
+cafekbd_keyboard_config_load_from_x_current (CafekbdKeyboardConfig * kbd_config,
+					  XklConfigRec * data)
+{
+	gboolean own_data = data == NULL;
+	xkl_debug (150, "Copying config from X(current)\n");
+	if (own_data)
+		data = xkl_config_rec_new ();
+	if (xkl_config_rec_get_from_server (data, kbd_config->engine))
+		cafekbd_keyboard_config_copy_from_xkl_config (kbd_config,
+							   data);
+	else
+		xkl_debug (150,
+			   "Could not load keyboard config from server: [%s]\n",
+			   xkl_get_last_error ());
+	if (own_data)
+		g_object_unref (G_OBJECT (data));
+}
+
+void
+cafekbd_keyboard_config_load_from_x_initial (CafekbdKeyboardConfig * kbd_config,
+					  XklConfigRec * data)
+{
+	gboolean own_data = data == NULL;
+	xkl_debug (150, "Copying config from X(initial)\n");
+	if (own_data)
+		data = xkl_config_rec_new ();
+	if (xkl_config_rec_get_from_backup (data, kbd_config->engine))
+		cafekbd_keyboard_config_copy_from_xkl_config (kbd_config,
+							   data);
+	else
+		xkl_debug (150,
+			   "Could not load keyboard config from backup: [%s]\n",
+			   xkl_get_last_error ());
+	if (own_data)
+		g_object_unref (G_OBJECT (data));
+}
+
+static gboolean
+cafekbd_keyboard_config_options_equals (CafekbdKeyboardConfig * kbd_config1,
+				     CafekbdKeyboardConfig * kbd_config2)
+{
+	int num_options, num_options2;
+
+	num_options =
+	    (kbd_config1->options ==
+	     NULL) ? 0 : g_strv_length (kbd_config1->options);
+	num_options2 =
+	    (kbd_config2->options ==
+	     NULL) ? 0 : g_strv_length (kbd_config2->options);
+
+	if (num_options != num_options2)
+		return False;
+
+	if (num_options != 0) {
+		int i;
+		char *group1, *option1;
+
+		for (i = 0; i < num_options; i++) {
+			int j;
+			char *group2, *option2;
+			gboolean are_equal = FALSE;
+
+			if (!cafekbd_keyboard_config_split_items
+			    (kbd_config1->options[i], &group1, &option1))
+				continue;
+
+			option1 = g_strdup (option1);
+
+			for (j = 0; j < num_options && !are_equal; j++) {
+				if (cafekbd_keyboard_config_split_items
+				    (kbd_config2->options[j], &group2,
+				     &option2)) {
+					are_equal =
+					    strcmp (option1, option2) == 0;
+				}
+			}
+
+			g_free (option1);
+
+			if (!are_equal)
+				return False;
+		}
+	}
+
+	return True;
+}
+
+gboolean
+cafekbd_keyboard_config_equals (CafekbdKeyboardConfig * kbd_config1,
+			     CafekbdKeyboardConfig * kbd_config2)
+{
+	if (kbd_config1 == kbd_config2)
+		return True;
+	if ((kbd_config1->model != kbd_config2->model) &&
+	    (kbd_config1->model != NULL) &&
+	    (kbd_config2->model != NULL) &&
+	    g_ascii_strcasecmp (kbd_config1->model, kbd_config2->model))
+		return False;
+	if (!cafekbd_strv_equal (kbd_config1->layouts_variants,
+			   kbd_config2->layouts_variants))
+		return False;
+
+	if (!cafekbd_keyboard_config_options_equals
+	    (kbd_config1, kbd_config2))
+		return False;
+
+	return True;
+}
+
+void
+cafekbd_keyboard_config_save_to_gsettings (CafekbdKeyboardConfig * kbd_config)
+{
+	g_settings_delay (kbd_config->settings);
+
+	cafekbd_keyboard_config_save_params (kbd_config,
+					     CAFEKBD_KEYBOARD_CONFIG_ACTIVE);
+
+	g_settings_apply (kbd_config->settings);
+}
+
+void
+cafekbd_keyboard_config_model_set (CafekbdKeyboardConfig * kbd_config,
+				const gchar * model_name)
+{
+	if (kbd_config->model != NULL)
+		g_free (kbd_config->model);
+	kbd_config->model =
+	    (model_name == NULL
+	     || model_name[0] == '\0') ? NULL : g_strdup (model_name);
+}
+
+void
+cafekbd_keyboard_config_options_set (CafekbdKeyboardConfig * kbd_config,
+				  gint idx,
+				  const gchar * group_name,
+				  const gchar * option_name)
+{
+	const gchar *merged;
+	if (group_name == NULL || option_name == NULL)
+		return;
+	merged =
+	    cafekbd_keyboard_config_merge_items (group_name, option_name);
+	if (merged == NULL)
+		return;
+	kbd_config->options[idx] = g_strdup (merged);
+}
+
+gboolean
+cafekbd_keyboard_config_options_is_set (CafekbdKeyboardConfig * kbd_config,<--- Parameter 'kbd_config' can be declared as pointer to const
+				     const gchar * group_name,
+				     const gchar * option_name)
+{
+	gchar **p = kbd_config->options;
+	const gchar *merged =
+	    cafekbd_keyboard_config_merge_items (group_name, option_name);
+	if (merged == NULL)
+		return FALSE;
+
+	while (p && *p) {
+		if (!g_ascii_strcasecmp (merged, *p++))
+			return TRUE;
+	}
+	return FALSE;
+}
+
+gboolean
+cafekbd_keyboard_config_activate (CafekbdKeyboardConfig * kbd_config)
+{
+	gboolean rv;
+	XklConfigRec *data = xkl_config_rec_new ();
+
+	cafekbd_keyboard_config_copy_to_xkl_config (kbd_config, data);
+	rv = xkl_config_rec_activate (data, kbd_config->engine);
+	g_object_unref (G_OBJECT (data));
+
+	return rv;
+}
+
+/**
+ * cafekbd_keyboard_config_start_listen:
+ * @func: (scope notified): a function to call when settings are changed
+ */
+void
+cafekbd_keyboard_config_start_listen (CafekbdKeyboardConfig * kbd_config,
+				   GCallback func,
+				   gpointer user_data)
+{
+	kbd_config->config_listener_id =
+	    g_signal_connect (kbd_config->settings, "changed", func,
+			      user_data);
+}
+
+void
+cafekbd_keyboard_config_stop_listen (CafekbdKeyboardConfig * kbd_config)
+{
+	g_signal_handler_disconnect (kbd_config->settings,
+				     kbd_config->config_listener_id);
+	kbd_config->config_listener_id = 0;
+}
+
+gboolean
+cafekbd_keyboard_config_get_descriptions (XklConfigRegistry * config_registry,
+				       const gchar * name,
+				       gchar ** layout_short_descr,
+				       gchar ** layout_descr,
+				       gchar ** variant_short_descr,
+				       gchar ** variant_descr)
+{
+	char *layout_name = NULL, *variant_name = NULL;
+	if (!cafekbd_keyboard_config_split_items
+	    (name, &layout_name, &variant_name))
+		return FALSE;
+	return cafekbd_keyboard_config_get_lv_descriptions (config_registry,
+							 layout_name,
+							 variant_name,
+							 layout_short_descr,
+							 layout_descr,
+							 variant_short_descr,
+							 variant_descr);
+}
+
+const gchar *
+cafekbd_keyboard_config_format_full_layout (const gchar * layout_descr,
+					 const gchar * variant_descr)
+{
+	static gchar full_descr[XKL_MAX_CI_DESC_LENGTH * 2];
+	if (variant_descr == NULL || variant_descr[0] == 0)
+		g_snprintf (full_descr, sizeof (full_descr), "%s",
+			    layout_descr);
+	else
+		g_snprintf (full_descr, sizeof (full_descr), "%s %s",
+			    layout_descr, variant_descr);
+	return full_descr;
+}
+
+gchar *
+cafekbd_keyboard_config_to_string (const CafekbdKeyboardConfig * config)
+{
+	gchar *layouts = NULL, *options = NULL;
+	GString *buffer = g_string_new (NULL);
+
+	gchar **iter;
+	gint count;
+	gchar *result;
+
+	if (config->layouts_variants) {
+		/* g_slist_length is "expensive", so we determinate the length on the fly */
+		for (iter = config->layouts_variants, count = 0; *iter;
+		     iter++, ++count) {
+			if (buffer->len)
+				g_string_append (buffer, " ");
+
+			g_string_append (buffer, *iter);
+		}
+
+		/* Translators: The count is related to the number of options. The %s
+		 * format specifier should not be modified, left "as is". */
+		layouts =
+		    g_strdup_printf (ngettext
+				     ("layout \"%s\"", "layouts \"%s\"",
+				      count), buffer->str);
+		g_string_truncate (buffer, 0);
+	}
+	if (config->options) {
+		/* g_slist_length is "expensive", so we determinate the length on the fly */
+		for (iter = config->options, count = 0; *iter;
+		     iter++, ++count) {
+			if (buffer->len)
+				g_string_append (buffer, " ");
+
+			g_string_append (buffer, *iter);
+		}
+
+		/* Translators: The count is related to the number of options. The %s
+		 * format specifier should not be modified, left "as is". */
+		options =
+		    g_strdup_printf (ngettext
+				     ("option \"%s\"", "options \"%s\"",
+				      count), buffer->str);
+		g_string_truncate (buffer, 0);
+	}
+
+	g_string_free (buffer, TRUE);
+
+	result =
+	    g_strdup_printf (_("model \"%s\", %s and %s"), config->model,
+			     layouts ? layouts : _("no layout"),
+			     options ? options : _("no options"));
+
+	g_free (options);
+	g_free (layouts);
+
+	return result;
+}
+
+/**
+ * cafekbd_keyboard_config_add_default_switch_option_if_necessary:
+ *
+ * Returns: (transfer full) (array zero-terminated=1): List of options
+ */
+gchar **
+cafekbd_keyboard_config_add_default_switch_option_if_necessary (gchar **
+							        layouts_list,
+							        gchar **
+							        options_list,
+							        gboolean *was_appended)
+{
+	*was_appended = FALSE;
+	if (g_strv_length (layouts_list) >= 2) {
+		gboolean any_switcher = False;
+		if (*options_list != NULL) {
+			gchar **option = options_list;
+			while (*option != NULL) {
+				char *g, *o;
+				if (cafekbd_keyboard_config_split_items
+				    (*option, &g, &o)) {
+					if (!g_ascii_strcasecmp
+					    (g, GROUP_SWITCHERS_GROUP)) {
+						any_switcher = True;
+						break;
+					}
+				}
+				option++;
+			}
+		}
+		if (!any_switcher) {
+			const gchar *id =
+			    cafekbd_keyboard_config_merge_items
+			    (GROUP_SWITCHERS_GROUP,
+			     DEFAULT_GROUP_SWITCH);
+			options_list =
+			    cafekbd_strv_append (options_list, g_strdup (id));
+			*was_appended = TRUE;
+		}
+	}
+	return options_list;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/4.html b/2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/4.html new file mode 100644 index 0000000..1d97c26 --- /dev/null +++ b/2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/4.html @@ -0,0 +1,6042 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
   1
+   2
+   3
+   4
+   5
+   6
+   7
+   8
+   9
+  10
+  11
+  12
+  13
+  14
+  15
+  16
+  17
+  18
+  19
+  20
+  21
+  22
+  23
+  24
+  25
+  26
+  27
+  28
+  29
+  30
+  31
+  32
+  33
+  34
+  35
+  36
+  37
+  38
+  39
+  40
+  41
+  42
+  43
+  44
+  45
+  46
+  47
+  48
+  49
+  50
+  51
+  52
+  53
+  54
+  55
+  56
+  57
+  58
+  59
+  60
+  61
+  62
+  63
+  64
+  65
+  66
+  67
+  68
+  69
+  70
+  71
+  72
+  73
+  74
+  75
+  76
+  77
+  78
+  79
+  80
+  81
+  82
+  83
+  84
+  85
+  86
+  87
+  88
+  89
+  90
+  91
+  92
+  93
+  94
+  95
+  96
+  97
+  98
+  99
+ 100
+ 101
+ 102
+ 103
+ 104
+ 105
+ 106
+ 107
+ 108
+ 109
+ 110
+ 111
+ 112
+ 113
+ 114
+ 115
+ 116
+ 117
+ 118
+ 119
+ 120
+ 121
+ 122
+ 123
+ 124
+ 125
+ 126
+ 127
+ 128
+ 129
+ 130
+ 131
+ 132
+ 133
+ 134
+ 135
+ 136
+ 137
+ 138
+ 139
+ 140
+ 141
+ 142
+ 143
+ 144
+ 145
+ 146
+ 147
+ 148
+ 149
+ 150
+ 151
+ 152
+ 153
+ 154
+ 155
+ 156
+ 157
+ 158
+ 159
+ 160
+ 161
+ 162
+ 163
+ 164
+ 165
+ 166
+ 167
+ 168
+ 169
+ 170
+ 171
+ 172
+ 173
+ 174
+ 175
+ 176
+ 177
+ 178
+ 179
+ 180
+ 181
+ 182
+ 183
+ 184
+ 185
+ 186
+ 187
+ 188
+ 189
+ 190
+ 191
+ 192
+ 193
+ 194
+ 195
+ 196
+ 197
+ 198
+ 199
+ 200
+ 201
+ 202
+ 203
+ 204
+ 205
+ 206
+ 207
+ 208
+ 209
+ 210
+ 211
+ 212
+ 213
+ 214
+ 215
+ 216
+ 217
+ 218
+ 219
+ 220
+ 221
+ 222
+ 223
+ 224
+ 225
+ 226
+ 227
+ 228
+ 229
+ 230
+ 231
+ 232
+ 233
+ 234
+ 235
+ 236
+ 237
+ 238
+ 239
+ 240
+ 241
+ 242
+ 243
+ 244
+ 245
+ 246
+ 247
+ 248
+ 249
+ 250
+ 251
+ 252
+ 253
+ 254
+ 255
+ 256
+ 257
+ 258
+ 259
+ 260
+ 261
+ 262
+ 263
+ 264
+ 265
+ 266
+ 267
+ 268
+ 269
+ 270
+ 271
+ 272
+ 273
+ 274
+ 275
+ 276
+ 277
+ 278
+ 279
+ 280
+ 281
+ 282
+ 283
+ 284
+ 285
+ 286
+ 287
+ 288
+ 289
+ 290
+ 291
+ 292
+ 293
+ 294
+ 295
+ 296
+ 297
+ 298
+ 299
+ 300
+ 301
+ 302
+ 303
+ 304
+ 305
+ 306
+ 307
+ 308
+ 309
+ 310
+ 311
+ 312
+ 313
+ 314
+ 315
+ 316
+ 317
+ 318
+ 319
+ 320
+ 321
+ 322
+ 323
+ 324
+ 325
+ 326
+ 327
+ 328
+ 329
+ 330
+ 331
+ 332
+ 333
+ 334
+ 335
+ 336
+ 337
+ 338
+ 339
+ 340
+ 341
+ 342
+ 343
+ 344
+ 345
+ 346
+ 347
+ 348
+ 349
+ 350
+ 351
+ 352
+ 353
+ 354
+ 355
+ 356
+ 357
+ 358
+ 359
+ 360
+ 361
+ 362
+ 363
+ 364
+ 365
+ 366
+ 367
+ 368
+ 369
+ 370
+ 371
+ 372
+ 373
+ 374
+ 375
+ 376
+ 377
+ 378
+ 379
+ 380
+ 381
+ 382
+ 383
+ 384
+ 385
+ 386
+ 387
+ 388
+ 389
+ 390
+ 391
+ 392
+ 393
+ 394
+ 395
+ 396
+ 397
+ 398
+ 399
+ 400
+ 401
+ 402
+ 403
+ 404
+ 405
+ 406
+ 407
+ 408
+ 409
+ 410
+ 411
+ 412
+ 413
+ 414
+ 415
+ 416
+ 417
+ 418
+ 419
+ 420
+ 421
+ 422
+ 423
+ 424
+ 425
+ 426
+ 427
+ 428
+ 429
+ 430
+ 431
+ 432
+ 433
+ 434
+ 435
+ 436
+ 437
+ 438
+ 439
+ 440
+ 441
+ 442
+ 443
+ 444
+ 445
+ 446
+ 447
+ 448
+ 449
+ 450
+ 451
+ 452
+ 453
+ 454
+ 455
+ 456
+ 457
+ 458
+ 459
+ 460
+ 461
+ 462
+ 463
+ 464
+ 465
+ 466
+ 467
+ 468
+ 469
+ 470
+ 471
+ 472
+ 473
+ 474
+ 475
+ 476
+ 477
+ 478
+ 479
+ 480
+ 481
+ 482
+ 483
+ 484
+ 485
+ 486
+ 487
+ 488
+ 489
+ 490
+ 491
+ 492
+ 493
+ 494
+ 495
+ 496
+ 497
+ 498
+ 499
+ 500
+ 501
+ 502
+ 503
+ 504
+ 505
+ 506
+ 507
+ 508
+ 509
+ 510
+ 511
+ 512
+ 513
+ 514
+ 515
+ 516
+ 517
+ 518
+ 519
+ 520
+ 521
+ 522
+ 523
+ 524
+ 525
+ 526
+ 527
+ 528
+ 529
+ 530
+ 531
+ 532
+ 533
+ 534
+ 535
+ 536
+ 537
+ 538
+ 539
+ 540
+ 541
+ 542
+ 543
+ 544
+ 545
+ 546
+ 547
+ 548
+ 549
+ 550
+ 551
+ 552
+ 553
+ 554
+ 555
+ 556
+ 557
+ 558
+ 559
+ 560
+ 561
+ 562
+ 563
+ 564
+ 565
+ 566
+ 567
+ 568
+ 569
+ 570
+ 571
+ 572
+ 573
+ 574
+ 575
+ 576
+ 577
+ 578
+ 579
+ 580
+ 581
+ 582
+ 583
+ 584
+ 585
+ 586
+ 587
+ 588
+ 589
+ 590
+ 591
+ 592
+ 593
+ 594
+ 595
+ 596
+ 597
+ 598
+ 599
+ 600
+ 601
+ 602
+ 603
+ 604
+ 605
+ 606
+ 607
+ 608
+ 609
+ 610
+ 611
+ 612
+ 613
+ 614
+ 615
+ 616
+ 617
+ 618
+ 619
+ 620
+ 621
+ 622
+ 623
+ 624
+ 625
+ 626
+ 627
+ 628
+ 629
+ 630
+ 631
+ 632
+ 633
+ 634
+ 635
+ 636
+ 637
+ 638
+ 639
+ 640
+ 641
+ 642
+ 643
+ 644
+ 645
+ 646
+ 647
+ 648
+ 649
+ 650
+ 651
+ 652
+ 653
+ 654
+ 655
+ 656
+ 657
+ 658
+ 659
+ 660
+ 661
+ 662
+ 663
+ 664
+ 665
+ 666
+ 667
+ 668
+ 669
+ 670
+ 671
+ 672
+ 673
+ 674
+ 675
+ 676
+ 677
+ 678
+ 679
+ 680
+ 681
+ 682
+ 683
+ 684
+ 685
+ 686
+ 687
+ 688
+ 689
+ 690
+ 691
+ 692
+ 693
+ 694
+ 695
+ 696
+ 697
+ 698
+ 699
+ 700
+ 701
+ 702
+ 703
+ 704
+ 705
+ 706
+ 707
+ 708
+ 709
+ 710
+ 711
+ 712
+ 713
+ 714
+ 715
+ 716
+ 717
+ 718
+ 719
+ 720
+ 721
+ 722
+ 723
+ 724
+ 725
+ 726
+ 727
+ 728
+ 729
+ 730
+ 731
+ 732
+ 733
+ 734
+ 735
+ 736
+ 737
+ 738
+ 739
+ 740
+ 741
+ 742
+ 743
+ 744
+ 745
+ 746
+ 747
+ 748
+ 749
+ 750
+ 751
+ 752
+ 753
+ 754
+ 755
+ 756
+ 757
+ 758
+ 759
+ 760
+ 761
+ 762
+ 763
+ 764
+ 765
+ 766
+ 767
+ 768
+ 769
+ 770
+ 771
+ 772
+ 773
+ 774
+ 775
+ 776
+ 777
+ 778
+ 779
+ 780
+ 781
+ 782
+ 783
+ 784
+ 785
+ 786
+ 787
+ 788
+ 789
+ 790
+ 791
+ 792
+ 793
+ 794
+ 795
+ 796
+ 797
+ 798
+ 799
+ 800
+ 801
+ 802
+ 803
+ 804
+ 805
+ 806
+ 807
+ 808
+ 809
+ 810
+ 811
+ 812
+ 813
+ 814
+ 815
+ 816
+ 817
+ 818
+ 819
+ 820
+ 821
+ 822
+ 823
+ 824
+ 825
+ 826
+ 827
+ 828
+ 829
+ 830
+ 831
+ 832
+ 833
+ 834
+ 835
+ 836
+ 837
+ 838
+ 839
+ 840
+ 841
+ 842
+ 843
+ 844
+ 845
+ 846
+ 847
+ 848
+ 849
+ 850
+ 851
+ 852
+ 853
+ 854
+ 855
+ 856
+ 857
+ 858
+ 859
+ 860
+ 861
+ 862
+ 863
+ 864
+ 865
+ 866
+ 867
+ 868
+ 869
+ 870
+ 871
+ 872
+ 873
+ 874
+ 875
+ 876
+ 877
+ 878
+ 879
+ 880
+ 881
+ 882
+ 883
+ 884
+ 885
+ 886
+ 887
+ 888
+ 889
+ 890
+ 891
+ 892
+ 893
+ 894
+ 895
+ 896
+ 897
+ 898
+ 899
+ 900
+ 901
+ 902
+ 903
+ 904
+ 905
+ 906
+ 907
+ 908
+ 909
+ 910
+ 911
+ 912
+ 913
+ 914
+ 915
+ 916
+ 917
+ 918
+ 919
+ 920
+ 921
+ 922
+ 923
+ 924
+ 925
+ 926
+ 927
+ 928
+ 929
+ 930
+ 931
+ 932
+ 933
+ 934
+ 935
+ 936
+ 937
+ 938
+ 939
+ 940
+ 941
+ 942
+ 943
+ 944
+ 945
+ 946
+ 947
+ 948
+ 949
+ 950
+ 951
+ 952
+ 953
+ 954
+ 955
+ 956
+ 957
+ 958
+ 959
+ 960
+ 961
+ 962
+ 963
+ 964
+ 965
+ 966
+ 967
+ 968
+ 969
+ 970
+ 971
+ 972
+ 973
+ 974
+ 975
+ 976
+ 977
+ 978
+ 979
+ 980
+ 981
+ 982
+ 983
+ 984
+ 985
+ 986
+ 987
+ 988
+ 989
+ 990
+ 991
+ 992
+ 993
+ 994
+ 995
+ 996
+ 997
+ 998
+ 999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+1011
+1012
+1013
+1014
+1015
+1016
+1017
+1018
+1019
+1020
+1021
+1022
+1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
+1033
+1034
+1035
+1036
+1037
+1038
+1039
+1040
+1041
+1042
+1043
+1044
+1045
+1046
+1047
+1048
+1049
+1050
+1051
+1052
+1053
+1054
+1055
+1056
+1057
+1058
+1059
+1060
+1061
+1062
+1063
+1064
+1065
+1066
+1067
+1068
+1069
+1070
+1071
+1072
+1073
+1074
+1075
+1076
+1077
+1078
+1079
+1080
+1081
+1082
+1083
+1084
+1085
+1086
+1087
+1088
+1089
+1090
+1091
+1092
+1093
+1094
+1095
+1096
+1097
+1098
+1099
+1100
+1101
+1102
+1103
+1104
+1105
+1106
+1107
+1108
+1109
+1110
+1111
+1112
+1113
+1114
+1115
+1116
+1117
+1118
+1119
+1120
+1121
+1122
+1123
+1124
+1125
+1126
+1127
+1128
+1129
+1130
+1131
+1132
+1133
+1134
+1135
+1136
+1137
+1138
+1139
+1140
+1141
+1142
+1143
+1144
+1145
+1146
+1147
+1148
+1149
+1150
+1151
+1152
+1153
+1154
+1155
+1156
+1157
+1158
+1159
+1160
+1161
+1162
+1163
+1164
+1165
+1166
+1167
+1168
+1169
+1170
+1171
+1172
+1173
+1174
+1175
+1176
+1177
+1178
+1179
+1180
+1181
+1182
+1183
+1184
+1185
+1186
+1187
+1188
+1189
+1190
+1191
+1192
+1193
+1194
+1195
+1196
+1197
+1198
+1199
+1200
+1201
+1202
+1203
+1204
+1205
+1206
+1207
+1208
+1209
+1210
+1211
+1212
+1213
+1214
+1215
+1216
+1217
+1218
+1219
+1220
+1221
+1222
+1223
+1224
+1225
+1226
+1227
+1228
+1229
+1230
+1231
+1232
+1233
+1234
+1235
+1236
+1237
+1238
+1239
+1240
+1241
+1242
+1243
+1244
+1245
+1246
+1247
+1248
+1249
+1250
+1251
+1252
+1253
+1254
+1255
+1256
+1257
+1258
+1259
+1260
+1261
+1262
+1263
+1264
+1265
+1266
+1267
+1268
+1269
+1270
+1271
+1272
+1273
+1274
+1275
+1276
+1277
+1278
+1279
+1280
+1281
+1282
+1283
+1284
+1285
+1286
+1287
+1288
+1289
+1290
+1291
+1292
+1293
+1294
+1295
+1296
+1297
+1298
+1299
+1300
+1301
+1302
+1303
+1304
+1305
+1306
+1307
+1308
+1309
+1310
+1311
+1312
+1313
+1314
+1315
+1316
+1317
+1318
+1319
+1320
+1321
+1322
+1323
+1324
+1325
+1326
+1327
+1328
+1329
+1330
+1331
+1332
+1333
+1334
+1335
+1336
+1337
+1338
+1339
+1340
+1341
+1342
+1343
+1344
+1345
+1346
+1347
+1348
+1349
+1350
+1351
+1352
+1353
+1354
+1355
+1356
+1357
+1358
+1359
+1360
+1361
+1362
+1363
+1364
+1365
+1366
+1367
+1368
+1369
+1370
+1371
+1372
+1373
+1374
+1375
+1376
+1377
+1378
+1379
+1380
+1381
+1382
+1383
+1384
+1385
+1386
+1387
+1388
+1389
+1390
+1391
+1392
+1393
+1394
+1395
+1396
+1397
+1398
+1399
+1400
+1401
+1402
+1403
+1404
+1405
+1406
+1407
+1408
+1409
+1410
+1411
+1412
+1413
+1414
+1415
+1416
+1417
+1418
+1419
+1420
+1421
+1422
+1423
+1424
+1425
+1426
+1427
+1428
+1429
+1430
+1431
+1432
+1433
+1434
+1435
+1436
+1437
+1438
+1439
+1440
+1441
+1442
+1443
+1444
+1445
+1446
+1447
+1448
+1449
+1450
+1451
+1452
+1453
+1454
+1455
+1456
+1457
+1458
+1459
+1460
+1461
+1462
+1463
+1464
+1465
+1466
+1467
+1468
+1469
+1470
+1471
+1472
+1473
+1474
+1475
+1476
+1477
+1478
+1479
+1480
+1481
+1482
+1483
+1484
+1485
+1486
+1487
+1488
+1489
+1490
+1491
+1492
+1493
+1494
+1495
+1496
+1497
+1498
+1499
+1500
+1501
+1502
+1503
+1504
+1505
+1506
+1507
+1508
+1509
+1510
+1511
+1512
+1513
+1514
+1515
+1516
+1517
+1518
+1519
+1520
+1521
+1522
+1523
+1524
+1525
+1526
+1527
+1528
+1529
+1530
+1531
+1532
+1533
+1534
+1535
+1536
+1537
+1538
+1539
+1540
+1541
+1542
+1543
+1544
+1545
+1546
+1547
+1548
+1549
+1550
+1551
+1552
+1553
+1554
+1555
+1556
+1557
+1558
+1559
+1560
+1561
+1562
+1563
+1564
+1565
+1566
+1567
+1568
+1569
+1570
+1571
+1572
+1573
+1574
+1575
+1576
+1577
+1578
+1579
+1580
+1581
+1582
+1583
+1584
+1585
+1586
+1587
+1588
+1589
+1590
+1591
+1592
+1593
+1594
+1595
+1596
+1597
+1598
+1599
+1600
+1601
+1602
+1603
+1604
+1605
+1606
+1607
+1608
+1609
+1610
+1611
+1612
+1613
+1614
+1615
+1616
+1617
+1618
+1619
+1620
+1621
+1622
+1623
+1624
+1625
+1626
+1627
+1628
+1629
+1630
+1631
+1632
+1633
+1634
+1635
+1636
+1637
+1638
+1639
+1640
+1641
+1642
+1643
+1644
+1645
+1646
+1647
+1648
+1649
+1650
+1651
+1652
+1653
+1654
+1655
+1656
+1657
+1658
+1659
+1660
+1661
+1662
+1663
+1664
+1665
+1666
+1667
+1668
+1669
+1670
+1671
+1672
+1673
+1674
+1675
+1676
+1677
+1678
+1679
+1680
+1681
+1682
+1683
+1684
+1685
+1686
+1687
+1688
+1689
+1690
+1691
+1692
+1693
+1694
+1695
+1696
+1697
+1698
+1699
+1700
+1701
+1702
+1703
+1704
+1705
+1706
+1707
+1708
+1709
+1710
+1711
+1712
+1713
+1714
+1715
+1716
+1717
+1718
+1719
+1720
+1721
+1722
+1723
+1724
+1725
+1726
+1727
+1728
+1729
+1730
+1731
+1732
+1733
+1734
+1735
+1736
+1737
+1738
+1739
+1740
+1741
+1742
+1743
+1744
+1745
+1746
+1747
+1748
+1749
+1750
+1751
+1752
+1753
+1754
+1755
+1756
+1757
+1758
+1759
+1760
+1761
+1762
+1763
+1764
+1765
+1766
+1767
+1768
+1769
+1770
+1771
+1772
+1773
+1774
+1775
+1776
+1777
+1778
+1779
+1780
+1781
+1782
+1783
+1784
+1785
+1786
+1787
+1788
+1789
+1790
+1791
+1792
+1793
+1794
+1795
+1796
+1797
+1798
+1799
+1800
+1801
+1802
+1803
+1804
+1805
+1806
+1807
+1808
+1809
+1810
+1811
+1812
+1813
+1814
+1815
+1816
+1817
+1818
+1819
+1820
+1821
+1822
+1823
+1824
+1825
+1826
+1827
+1828
+1829
+1830
+1831
+1832
+1833
+1834
+1835
+1836
+1837
+1838
+1839
+1840
+1841
+1842
+1843
+1844
+1845
+1846
+1847
+1848
+1849
+1850
+1851
+1852
+1853
+1854
+1855
+1856
+1857
+1858
+1859
+1860
+1861
+1862
+1863
+1864
+1865
+1866
+1867
+1868
+1869
+1870
+1871
+1872
+1873
+1874
+1875
+1876
+1877
+1878
+1879
+1880
+1881
+1882
+1883
+1884
+1885
+1886
+1887
+1888
+1889
+1890
+1891
+1892
+1893
+1894
+1895
+1896
+1897
+1898
+1899
+1900
+1901
+1902
+1903
+1904
+1905
+1906
+1907
+1908
+1909
+1910
+1911
+1912
+1913
+1914
+1915
+1916
+1917
+1918
+1919
+1920
+1921
+1922
+1923
+1924
+1925
+1926
+1927
+1928
+1929
+1930
+1931
+1932
+1933
+1934
+1935
+1936
+1937
+1938
+1939
+1940
+1941
+1942
+1943
+1944
+1945
+1946
+1947
+1948
+1949
+1950
+1951
+1952
+1953
+1954
+1955
+1956
+1957
+1958
+1959
+1960
+1961
+1962
+1963
+1964
+1965
+1966
+1967
+1968
+1969
+1970
+1971
+1972
+1973
+1974
+1975
+1976
+1977
+1978
+1979
+1980
+1981
+1982
+1983
+1984
+1985
+1986
+1987
+1988
+1989
+1990
+1991
+1992
+1993
+1994
+1995
+1996
+1997
+1998
+1999
+2000
+2001
+2002
+2003
+2004
+2005
+2006
+2007
+2008
+2009
+2010
+2011
+2012
+2013
+2014
+2015
+2016
+2017
+2018
+2019
+2020
+2021
+2022
+2023
+2024
+2025
+2026
+2027
+2028
+2029
+2030
+2031
+2032
+2033
+2034
+2035
+2036
+2037
+2038
+2039
+2040
+2041
+2042
+2043
+2044
+2045
+2046
+2047
+2048
+2049
+2050
+2051
+2052
+2053
+2054
+2055
+2056
+2057
+2058
+2059
+2060
+2061
+2062
+2063
+2064
+2065
+2066
+2067
+2068
+2069
+2070
+2071
+2072
+2073
+2074
+2075
+2076
+2077
+2078
+2079
+2080
+2081
+2082
+2083
+2084
+2085
+2086
+2087
+2088
+2089
+2090
+2091
+2092
+2093
+2094
+2095
+2096
+2097
+2098
+2099
+2100
+2101
+2102
+2103
+2104
+2105
+2106
+2107
+2108
+2109
+2110
+2111
+2112
+2113
+2114
+2115
+2116
+2117
+2118
+2119
+2120
+2121
+2122
+2123
+2124
+2125
+2126
+2127
+2128
+2129
+2130
+2131
+2132
+2133
+2134
+2135
+2136
+2137
+2138
+2139
+2140
+2141
+2142
+2143
+2144
+2145
+2146
+2147
+2148
+2149
+2150
+2151
+2152
+2153
+2154
+2155
+2156
+2157
+2158
+2159
+2160
+2161
+2162
+2163
+2164
+2165
+2166
+2167
+2168
+2169
+2170
+2171
+2172
+2173
+2174
+2175
+2176
+2177
+2178
+2179
+2180
+2181
+2182
+2183
+2184
+2185
+2186
+2187
+2188
+2189
+2190
+2191
+2192
+2193
+2194
+2195
+2196
+2197
+2198
+2199
+2200
+2201
+2202
+2203
+2204
+2205
+2206
+2207
+2208
+2209
+2210
+2211
+2212
+2213
+2214
+2215
+2216
+2217
+2218
+2219
+2220
+2221
+2222
+2223
+2224
+2225
+2226
+2227
+2228
+2229
+2230
+2231
+2232
+2233
+2234
+2235
+2236
+2237
+2238
+2239
+2240
+2241
+2242
+2243
+2244
+2245
+2246
+2247
+2248
+2249
+2250
+2251
+2252
+2253
+2254
+2255
+2256
+2257
+2258
+2259
+2260
+2261
+2262
+2263
+2264
+2265
+2266
+2267
+2268
+2269
+2270
+2271
+2272
+2273
+2274
+2275
+2276
+2277
+2278
+2279
+2280
+2281
+2282
+2283
+2284
+2285
+2286
+2287
+2288
+2289
+2290
+2291
+2292
+2293
+2294
+2295
+2296
+2297
+2298
+2299
+2300
+2301
+2302
+2303
+2304
+2305
+2306
+2307
+2308
+2309
+2310
+2311
+2312
+2313
+2314
+2315
+2316
+2317
+2318
+2319
+2320
+2321
+2322
+2323
+2324
+2325
+2326
+2327
+2328
+2329
+2330
+2331
+2332
+2333
+2334
+2335
+2336
+2337
+2338
+2339
+2340
+2341
+2342
+2343
+2344
+2345
+2346
+2347
+2348
+2349
+2350
+2351
+2352
+2353
+2354
+2355
+2356
+2357
+2358
+2359
+2360
+2361
+2362
+2363
+2364
+2365
+2366
+2367
+2368
+2369
+2370
+2371
+2372
+2373
+2374
+2375
+2376
+2377
+2378
+2379
+2380
+2381
+2382
+2383
+2384
+2385
+2386
+2387
+2388
+2389
+2390
+2391
+2392
+2393
+2394
+2395
+2396
+2397
+2398
+2399
+2400
+2401
+2402
+2403
+2404
+2405
+2406
+2407
+2408
+2409
+2410
+2411
+2412
+2413
+2414
+2415
+2416
+2417
+2418
+2419
+2420
+2421
+2422
+2423
+2424
+2425
+2426
+2427
+2428
+2429
+2430
+2431
+2432
+2433
+2434
+2435
+2436
+2437
+2438
+2439
+2440
+2441
+2442
+2443
+2444
+2445
+2446
+2447
+2448
+2449
+2450
+2451
+2452
+2453
+2454
+2455
+2456
+2457
+2458
+2459
+2460
+2461
+2462
+2463
+2464
+2465
+2466
+2467
+2468
+2469
+2470
+2471
+2472
+2473
+2474
+2475
+2476
+2477
+2478
+2479
+2480
+2481
+2482
+2483
+2484
+2485
+2486
+2487
+2488
+2489
+2490
+2491
+2492
+2493
+2494
+2495
+2496
+2497
+2498
+2499
+2500
+2501
+2502
+2503
+2504
+2505
+2506
+2507
+2508
+2509
+2510
+2511
+2512
+2513
+2514
+2515
+2516
+2517
+2518
+2519
+2520
+2521
+2522
+2523
+2524
+2525
+2526
+2527
+2528
+2529
+2530
+2531
+2532
+2533
+2534
+2535
+2536
+2537
+2538
+2539
+2540
+2541
+2542
+2543
+2544
+2545
+2546
+2547
+2548
+2549
+2550
+2551
+2552
+2553
+2554
+2555
+2556
+2557
+2558
+2559
+2560
+2561
+2562
+2563
+2564
+2565
+2566
+2567
+2568
+2569
+2570
+2571
+2572
+2573
+2574
+2575
+2576
+2577
+2578
+2579
+2580
+2581
+2582
+2583
+2584
+2585
+2586
+2587
+2588
+2589
+2590
+2591
+2592
+2593
+2594
+2595
+2596
+2597
+2598
+2599
+2600
+2601
+2602
+2603
+2604
+2605
+2606
+2607
+2608
+2609
+2610
+2611
+2612
+2613
+2614
+2615
+2616
+2617
+2618
+2619
+2620
+2621
+2622
+2623
+2624
+2625
+2626
+2627
+2628
+2629
+2630
+2631
+2632
+2633
+2634
+2635
+2636
+2637
+2638
+2639
+2640
+2641
+2642
+2643
+2644
+2645
+2646
+2647
+2648
+2649
+2650
+2651
+2652
+2653
+2654
+2655
+2656
+2657
+2658
+2659
+2660
+2661
+2662
+2663
+2664
+2665
+2666
+2667
+2668
+2669
+2670
+2671
+2672
+2673
+2674
+2675
+2676
+2677
+2678
+2679
+2680
+2681
+2682
+2683
+2684
+2685
+2686
+2687
+2688
+2689
+2690
+2691
+2692
+2693
+2694
+2695
+2696
+2697
+2698
+2699
+2700
+2701
+2702
+2703
+2704
+2705
+2706
+2707
+2708
+2709
+2710
+2711
+2712
+2713
+2714
+2715
+2716
+2717
+2718
+2719
+2720
+2721
+2722
+2723
+2724
+2725
+2726
+2727
+2728
+2729
+2730
+2731
+2732
+2733
+2734
+2735
+2736
+2737
+2738
+2739
+2740
+2741
+2742
+2743
+2744
+2745
+2746
+2747
+2748
+2749
+2750
+2751
+2752
+2753
+2754
+2755
+2756
+2757
+2758
+2759
+2760
+2761
+2762
+2763
+2764
+2765
+2766
+2767
+2768
+2769
+2770
+2771
+2772
+2773
+2774
+2775
+2776
+2777
+2778
+2779
+2780
+2781
+2782
+2783
+2784
+2785
+2786
+2787
+2788
+2789
+2790
+2791
+2792
+2793
+2794
+2795
+2796
+2797
+2798
+2799
+2800
+2801
+2802
+2803
+2804
+2805
+2806
+2807
+2808
+2809
+2810
+2811
+2812
+2813
+2814
+2815
+2816
+2817
+2818
+2819
+2820
+2821
+2822
+2823
+2824
+2825
+2826
+2827
+2828
+2829
+2830
+2831
+2832
+2833
+2834
+2835
+2836
+2837
+2838
+2839
+2840
+2841
+2842
+2843
+2844
+2845
+2846
+2847
+2848
+2849
+2850
+2851
+2852
+2853
+2854
+2855
+2856
+2857
+2858
+2859
+2860
+2861
+2862
+2863
+2864
+2865
+2866
+2867
+2868
+2869
+2870
+2871
+2872
+2873
+2874
+2875
+2876
+2877
+2878
+2879
+2880
+2881
+2882
+2883
+2884
+2885
+2886
+2887
+2888
+2889
+2890
+2891
+2892
+2893
+2894
+2895
+2896
+2897
+2898
+2899
+2900
+2901
+2902
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+#include <ctk/ctk.h>
+#include <cdk/cdkx.h>
+#include <cdk/cdkkeysyms.h>
+#include <X11/XKBlib.h>
+#include <X11/extensions/XKBgeom.h>
+#include <stdlib.h>
+#include <memory.h>
+#include <math.h>
+#include <glib/gi18n-lib.h>
+#include <libxklavier/xklavier.h>
+
+#include <cafekbd-keyboard-drawing.h>
+#include <cafekbd-keyboard-drawing-marshal.h>
+#include <cafekbd-util.h>
+
+#define INVALID_KEYCODE ((guint)(-1))
+
+#define CTK_RESPONSE_PRINT 2
+
+#define KEY_FONT_SIZE 12
+
+enum {
+	BAD_KEYCODE = 0,
+	NUM_SIGNALS
+};
+
+static guint cafekbd_keyboard_drawing_signals[NUM_SIGNALS] = { 0 };
+
+static void cafekbd_keyboard_drawing_set_mods (CafekbdKeyboardDrawing * drawing,
+					    guint mods);
+
+extern gboolean xkl_xkb_config_native_prepare (XklEngine * engine,
+					      const XklConfigRec * data,
+					      gpointer component_names);
+
+extern void xkl_xkb_config_native_cleanup (XklEngine * engine,
+					  gpointer component_names);
+
+
+static gint
+xkb_to_pixmap_coord (CafekbdKeyboardDrawingRenderContext * context, gint n)<--- Parameter 'context' can be declared as pointer to const
+{
+	return n * context->scale_numerator / context->scale_denominator;
+}
+
+static gdouble
+xkb_to_pixmap_double (CafekbdKeyboardDrawingRenderContext * context,<--- Parameter 'context' can be declared as pointer to const
+		      gdouble d)
+{
+	return d * context->scale_numerator / context->scale_denominator;
+}
+
+
+/* angle is in tenths of a degree; coordinates can be anything as (xkb,
+ * pixels, pango) as long as they are all the same */
+static void
+rotate_coordinate (gint origin_x,
+		   gint origin_y,
+		   gint x,
+		   gint y, gint angle, gint * rotated_x, gint * rotated_y)
+{
+	*rotated_x =
+	    origin_x + (x - origin_x) * cos (M_PI * angle / 1800.0) - (y -
+								       origin_y)
+	    * sin (M_PI * angle / 1800.0);
+	*rotated_y =
+	    origin_y + (x - origin_x) * sin (M_PI * angle / 1800.0) + (y -
+								       origin_y)
+	    * cos (M_PI * angle / 1800.0);
+}
+
+static gdouble
+length (gdouble x, gdouble y)
+{
+	return sqrt (x * x + y * y);
+}
+
+static gdouble
+point_line_distance (gdouble ax, gdouble ay, gdouble nx, gdouble ny)
+{
+	return ax * nx + ay * ny;
+}
+
+static void
+normal_form (gdouble ax, gdouble ay,
+	     gdouble bx, gdouble by,
+	     gdouble * nx, gdouble * ny, gdouble * d)
+{
+	gdouble l;
+
+	*nx = by - ay;
+	*ny = ax - bx;
+
+	l = length (*nx, *ny);
+
+	*nx /= l;
+	*ny /= l;
+
+	*d = point_line_distance (ax, ay, *nx, *ny);
+}
+
+static void
+inverse (gdouble a, gdouble b, gdouble c, gdouble d,
+	 gdouble * e, gdouble * f, gdouble * g, gdouble * h)
+{
+	gdouble det;
+
+	det = a * d - b * c;
+
+	*e = d / det;
+	*f = -b / det;
+	*g = -c / det;
+	*h = a / det;
+}
+
+static void
+multiply (gdouble a, gdouble b, gdouble c, gdouble d,
+	  gdouble e, gdouble f, gdouble * x, gdouble * y)
+{
+	*x = a * e + b * f;
+	*y = c * e + d * f;
+}
+
+static void
+intersect (gdouble n1x, gdouble n1y, gdouble d1,
+	   gdouble n2x, gdouble n2y, gdouble d2, gdouble * x, gdouble * y)
+{
+	gdouble e, f, g, h;
+
+	inverse (n1x, n1y, n2x, n2y, &e, &f, &g, &h);
+	multiply (e, f, g, h, d1, d2, x, y);
+}
+
+
+/* draw an angle from the current point to b and then to c,
+ * with a rounded corner of the given radius.
+ */
+static void
+rounded_corner (cairo_t * cr,
+		gdouble bx, gdouble by,
+		gdouble cx, gdouble cy, gdouble radius)
+{
+	gdouble ax, ay;
+	gdouble n1x, n1y, d1;
+	gdouble n2x, n2y, d2;
+	gdouble pd1, pd2;
+	gdouble ix, iy;
+	gdouble dist1, dist2;
+	gdouble nx, ny, d;
+	gdouble a1x, a1y, c1x, c1y;
+	gdouble phi1, phi2;
+
+	cairo_get_current_point (cr, &ax, &ay);
+#ifdef KBDRAW_DEBUG
+	printf ("        current point: (%f, %f), radius %f:\n", ax, ay,
+		radius);
+#endif
+
+	/* make sure radius is not too large */
+	dist1 = length (bx - ax, by - ay);
+	dist2 = length (cx - bx, cy - by);
+
+	radius = MIN (radius, MIN (dist1, dist2));
+
+	/* construct normal forms of the lines */
+	normal_form (ax, ay, bx, by, &n1x, &n1y, &d1);
+	normal_form (bx, by, cx, cy, &n2x, &n2y, &d2);
+
+	/* find which side of the line a,b the point c is on */
+	if (point_line_distance (cx, cy, n1x, n1y) < d1)
+		pd1 = d1 - radius;
+	else
+		pd1 = d1 + radius;
+
+	/* find which side of the line b,c the point a is on */
+	if (point_line_distance (ax, ay, n2x, n2y) < d2)
+		pd2 = d2 - radius;
+	else
+		pd2 = d2 + radius;
+
+	/* intersect the parallels to find the center of the arc */
+	intersect (n1x, n1y, pd1, n2x, n2y, pd2, &ix, &iy);
+
+	nx = (bx - ax) / dist1;
+	ny = (by - ay) / dist1;
+	d = point_line_distance (ix, iy, nx, ny);
+
+	/* a1 is the point on the line a-b where the arc starts */
+	intersect (n1x, n1y, d1, nx, ny, d, &a1x, &a1y);
+
+	nx = (cx - bx) / dist2;
+	ny = (cy - by) / dist2;
+	d = point_line_distance (ix, iy, nx, ny);
+
+	/* c1 is the point on the line b-c where the arc ends */
+	intersect (n2x, n2y, d2, nx, ny, d, &c1x, &c1y);
+
+	/* determine the first angle */
+	if (a1x - ix == 0)
+		phi1 = (a1y - iy > 0) ? M_PI_2 : 3 * M_PI_2;
+	else if (a1x - ix > 0)
+		phi1 = atan ((a1y - iy) / (a1x - ix));
+	else
+		phi1 = M_PI + atan ((a1y - iy) / (a1x - ix));
+
+	/* determine the second angle */
+	if (c1x - ix == 0)
+		phi2 = (c1y - iy > 0) ? M_PI_2 : 3 * M_PI_2;
+	else if (c1x - ix > 0)
+		phi2 = atan ((c1y - iy) / (c1x - ix));
+	else
+		phi2 = M_PI + atan ((c1y - iy) / (c1x - ix));
+
+	/* compute the difference between phi2 and phi1 mod 2pi */
+	d = phi2 - phi1;
+	while (d < 0)
+		d += 2 * M_PI;
+	while (d > 2 * M_PI)
+		d -= 2 * M_PI;
+
+#ifdef KBDRAW_DEBUG
+	printf ("        line 1 to: (%f, %f):\n", a1x, a1y);
+#endif
+	if (!(isnan (a1x) || isnan (a1y)))
+		cairo_line_to (cr, a1x, a1y);
+
+	/* pick the short arc from phi1 to phi2 */
+	if (d < M_PI)
+		cairo_arc (cr, ix, iy, radius, phi1, phi2);
+	else
+		cairo_arc_negative (cr, ix, iy, radius, phi1, phi2);
+
+#ifdef KBDRAW_DEBUG
+	printf ("        line 2 to: (%f, %f):\n", cx, cy);
+#endif
+	cairo_line_to (cr, cx, cy);
+}
+
+static void
+rounded_polygon (cairo_t * cr,
+		 gboolean filled,
+		 gdouble radius, CdkPoint * points, gint num_points)
+{
+	gint i, j;
+
+	cairo_move_to (cr,
+		       (gdouble) (points[num_points - 1].x +
+				  points[0].x) / 2,
+		       (gdouble) (points[num_points - 1].y +
+				  points[0].y) / 2);
+
+
+#ifdef KBDRAW_DEBUG
+	printf ("    rounded polygon of radius %f:\n", radius);
+#endif
+	for (i = 0; i < num_points; i++) {
+		j = (i + 1) % num_points;
+		rounded_corner (cr, (gdouble) points[i].x,
+				(gdouble) points[i].y,
+				(gdouble) (points[i].x + points[j].x) / 2,
+				(gdouble) (points[i].y + points[j].y) / 2,
+				radius);
+#ifdef KBDRAW_DEBUG
+		printf ("      corner (%d, %d) -> (%d, %d):\n",
+			points[i].x, points[i].y, points[j].x,
+			points[j].y);
+#endif
+	};
+	cairo_close_path (cr);
+
+	if (filled)
+		cairo_fill (cr);
+	else
+		cairo_stroke (cr);
+}
+
+static void
+draw_polygon (CafekbdKeyboardDrawingRenderContext * context,
+	      CdkRGBA * fill_color,
+	      gint xkb_x,
+	      gint xkb_y, XkbPointRec * xkb_points, guint num_points,
+	      gdouble radius)
+{
+	CdkPoint *points;
+	gboolean filled;
+	gint i;
+
+	if (fill_color) {
+		filled = TRUE;
+	} else {
+		fill_color = &context->dark_color;
+		filled = FALSE;
+	}
+
+	cdk_cairo_set_source_rgba (context->cr, fill_color);
+
+	points = g_new (CdkPoint, num_points);
+
+#ifdef KBDRAW_DEBUG
+	printf ("    Polygon points:\n");
+#endif
+	for (i = 0; i < num_points; i++) {
+		points[i].x =
+		    xkb_to_pixmap_coord (context, xkb_x + xkb_points[i].x);
+		points[i].y =
+		    xkb_to_pixmap_coord (context, xkb_y + xkb_points[i].y);
+#ifdef KBDRAW_DEBUG
+		printf ("      %d, %d\n", points[i].x, points[i].y);
+#endif
+	}
+
+	rounded_polygon (context->cr, filled,
+			 xkb_to_pixmap_double (context, radius),
+			 points, num_points);
+
+	g_free (points);
+}
+
+static void
+curve_rectangle (cairo_t * cr,
+		 gdouble x0,
+		 gdouble y0, gdouble width, gdouble height, gdouble radius)
+{
+	gdouble x1, y1;
+
+	if (!width || !height)
+		return;
+
+	x1 = x0 + width;
+	y1 = y0 + height;
+
+	radius = MIN (radius, MIN (width / 2, height / 2));
+
+	cairo_move_to (cr, x0, y0 + radius);
+	cairo_arc (cr, x0 + radius, y0 + radius, radius, M_PI,
+		   3 * M_PI / 2);
+	cairo_line_to (cr, x1 - radius, y0);
+	cairo_arc (cr, x1 - radius, y0 + radius, radius, 3 * M_PI / 2,
+		   2 * M_PI);
+	cairo_line_to (cr, x1, y1 - radius);
+	cairo_arc (cr, x1 - radius, y1 - radius, radius, 0, M_PI / 2);
+	cairo_line_to (cr, x0 + radius, y1);
+	cairo_arc (cr, x0 + radius, y1 - radius, radius, M_PI / 2, M_PI);
+
+	cairo_close_path (cr);
+}
+
+static void
+draw_curve_rectangle (cairo_t * cr,
+		      gboolean filled,
+		      CdkRGBA * fill_color,
+		      gint x, gint y, gint width, gint height, gint radius)
+{
+	curve_rectangle (cr, x, y, width, height, radius);
+
+	cdk_cairo_set_source_rgba (cr, fill_color);
+
+	if (filled)
+		cairo_fill (cr);
+	else
+		cairo_stroke (cr);
+}
+
+/* x, y, width, height are in the xkb coordinate system */
+static void
+draw_rectangle (CafekbdKeyboardDrawingRenderContext * context,
+		CdkRGBA * fill_color,
+		gint angle,
+		gint xkb_x, gint xkb_y, gint xkb_width, gint xkb_height,
+		gint radius)
+{
+	if (angle == 0) {
+		gint x, y, width, height;
+		gboolean filled;
+
+		if (fill_color) {
+			filled = TRUE;
+		} else {
+			fill_color = &context->dark_color;
+			filled = FALSE;
+		}
+
+		x = xkb_to_pixmap_coord (context, xkb_x);
+		y = xkb_to_pixmap_coord (context, xkb_y);
+		width =
+		    xkb_to_pixmap_coord (context, xkb_x + xkb_width) - x;
+		height =
+		    xkb_to_pixmap_coord (context, xkb_y + xkb_height) - y;
+
+		draw_curve_rectangle (context->cr, filled, fill_color,
+				      x, y, width, height,
+				      xkb_to_pixmap_double (context,
+							    radius));
+	} else {
+		XkbPointRec points[4];
+		gint x, y;
+
+		points[0].x = xkb_x;
+		points[0].y = xkb_y;
+		rotate_coordinate (xkb_x, xkb_y, xkb_x + xkb_width, xkb_y,
+				   angle, &x, &y);
+		points[1].x = x;
+		points[1].y = y;
+		rotate_coordinate (xkb_x, xkb_y, xkb_x + xkb_width,
+				   xkb_y + xkb_height, angle, &x, &y);
+		points[2].x = x;
+		points[2].y = y;
+		rotate_coordinate (xkb_x, xkb_y, xkb_x, xkb_y + xkb_height,
+				   angle, &x, &y);
+		points[3].x = x;
+		points[3].y = y;
+
+		/* the points we've calculated are relative to 0,0 */
+		draw_polygon (context, fill_color, 0, 0, points, 4,
+			      radius);
+	}
+}
+
+static void
+draw_outline (CafekbdKeyboardDrawingRenderContext * context,
+	      XkbOutlineRec * outline,
+	      CdkRGBA * color,
+	      gint angle, gint origin_x, gint origin_y)
+{
+#ifdef KBDRAW_DEBUG
+	printf (" num_points in %p: %d\n", outline, outline->num_points);
+#endif
+
+	if (outline->num_points == 1) {
+		if (color)
+			draw_rectangle (context, color, angle, origin_x,
+					origin_y, outline->points[0].x,
+					outline->points[0].y,
+					outline->corner_radius);
+
+#ifdef KBDRAW_DEBUG
+		printf ("pointsxy:%d %d %d\n", outline->points[0].x,
+			outline->points[0].y, outline->corner_radius);
+#endif
+
+		draw_rectangle (context, NULL, angle, origin_x, origin_y,
+				outline->points[0].x,
+				outline->points[0].y,
+				outline->corner_radius);
+	} else if (outline->num_points == 2) {
+		gint rotated_x0, rotated_y0;
+
+		rotate_coordinate (origin_x, origin_y,
+				   origin_x + outline->points[0].x,
+				   origin_y + outline->points[0].y,
+				   angle, &rotated_x0, &rotated_y0);
+		if (color)
+			draw_rectangle (context, color, angle, rotated_x0,
+					rotated_y0, outline->points[1].x,
+					outline->points[1].y,
+					outline->corner_radius);
+
+		draw_rectangle (context, NULL, angle, rotated_x0,
+				rotated_y0, outline->points[1].x,
+				outline->points[1].y,
+				outline->corner_radius);
+	} else {
+		if (color)
+			draw_polygon (context, color, origin_x, origin_y,
+				      outline->points,
+				      outline->num_points,
+				      outline->corner_radius);
+
+		draw_polygon (context, NULL, origin_x, origin_y,
+			      outline->points, outline->num_points,
+			      outline->corner_radius);
+	}
+}
+
+/* see PSColorDef in xkbprint */
+static gboolean
+parse_xkb_color_spec (gchar * colorspec, CdkRGBA * color)
+{
+	glong level;
+
+	color->alpha = 1.0;
+
+	if (g_ascii_strcasecmp (colorspec, "black") == 0) {
+		color->red = 0;
+		color->green = 0;
+		color->blue = 0;
+	} else if (g_ascii_strcasecmp (colorspec, "white") == 0) {
+		color->red = 1.0;
+		color->green = 1.0;
+		color->blue = 1.0;
+	} else if (g_ascii_strncasecmp (colorspec, "grey", 4) == 0 ||
+		   g_ascii_strncasecmp (colorspec, "gray", 4) == 0) {
+		level = strtol (colorspec + 4, NULL, 10);
+
+		color->red = 1.0 - 1.0 * level / 100.0;
+		color->green = 1.0 - 1.0 * level / 100.0;
+		color->blue = 1.0 - 1.0 * level / 100.0;
+	} else if (g_ascii_strcasecmp (colorspec, "red") == 0) {
+		color->red = 1.0;
+		color->green = 0;
+		color->blue = 0;
+	} else if (g_ascii_strcasecmp (colorspec, "green") == 0) {
+		color->red = 0;
+		color->green = 1.0;
+		color->blue = 0;
+	} else if (g_ascii_strcasecmp (colorspec, "blue") == 0) {
+		color->red = 0;
+		color->green = 0;
+		color->blue = 1.0;
+	} else if (g_ascii_strncasecmp (colorspec, "red", 3) == 0) {
+		level = strtol (colorspec + 3, NULL, 10);
+
+		color->red = 1.0 * level / 100.0;
+		color->green = 0;
+		color->blue = 0;
+	} else if (g_ascii_strncasecmp (colorspec, "green", 5) == 0) {
+		level = strtol (colorspec + 5, NULL, 10);
+
+		color->red = 0;
+		color->green = 1.0 * level / 100.0;
+		color->blue = 0;
+	} else if (g_ascii_strncasecmp (colorspec, "blue", 4) == 0) {
+		level = strtol (colorspec + 4, NULL, 10);
+
+		color->red = 0;
+		color->green = 0;
+		color->blue = 1.0 * level / 100.0;
+	} else
+		return FALSE;
+
+	return TRUE;
+}
+
+
+static guint
+find_keycode (CafekbdKeyboardDrawing * drawing, gchar * key_name)
+{
+#define KEYSYM_NAME_MAX_LENGTH 4
+	guint keycode;
+	gint i, j;
+	XkbKeyNamePtr pkey;
+	XkbKeyAliasPtr palias;
+	guint is_name_matched;
+	gchar *src, *dst;
+
+	if (!drawing->xkb)
+		return INVALID_KEYCODE;
+
+#ifdef KBDRAW_DEBUG
+	printf ("    looking for keycode for (%c%c%c%c)\n",
+		key_name[0], key_name[1], key_name[2], key_name[3]);
+#endif
+
+	pkey = drawing->xkb->names->keys + drawing->xkb->min_key_code;
+	for (keycode = drawing->xkb->min_key_code;
+	     keycode <= drawing->xkb->max_key_code; keycode++) {
+		is_name_matched = 1;
+		src = key_name;
+		dst = pkey->name;
+		for (i = KEYSYM_NAME_MAX_LENGTH; --i >= 0;) {
+			if ('\0' == *src)
+				break;
+			if (*src++ != *dst++) {
+				is_name_matched = 0;
+				break;
+			}
+		}
+		if (is_name_matched) {
+#ifdef KBDRAW_DEBUG
+			printf ("      found keycode %u\n", keycode);
+#endif
+			return keycode;
+		}
+		pkey++;
+	}
+
+	palias = drawing->xkb->names->key_aliases;
+	for (j = drawing->xkb->names->num_key_aliases; --j >= 0;) {
+		is_name_matched = 1;
+		src = key_name;
+		dst = palias->alias;
+		for (i = KEYSYM_NAME_MAX_LENGTH; --i >= 0;) {
+			if ('\0' == *src)
+				break;
+			if (*src++ != *dst++) {
+				is_name_matched = 0;
+				break;
+			}
+		}
+
+		if (is_name_matched) {
+			keycode = find_keycode (drawing, palias->real);
+#ifdef KBDRAW_DEBUG
+			printf ("found alias keycode %u\n", keycode);
+#endif
+			return keycode;
+		}
+		palias++;
+	}
+
+	return INVALID_KEYCODE;
+}
+
+static void
+set_markup (CafekbdKeyboardDrawingRenderContext * context, gchar *txt)<--- Parameter 'context' can be declared as pointer to const
+{
+	PangoLayout *layout = context->layout;
+	txt = strcmp ("<", txt) ? txt : "&lt;";
+	txt = strcmp ("&", txt) ? txt : "&amp;";
+	if (g_utf8_strlen (txt, -1) > 1) {
+		gchar* buf =
+		    g_strdup_printf ("<span size=\"xx-small\">%s</span>", txt);
+		pango_layout_set_markup (layout, buf, -1);
+		g_free (buf);
+	} else {
+		pango_layout_set_markup (layout, txt, -1);
+	}
+}
+
+static void
+set_key_label_in_layout (CafekbdKeyboardDrawingRenderContext * context,
+			 guint keyval)
+{
+	gchar buf[5];
+	gunichar uc;
+
+	switch (keyval) {
+	case CDK_KEY_Scroll_Lock:
+		set_markup (context, _("Scroll\nLock"));
+		break;
+
+	case CDK_KEY_space:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_Sys_Req:
+		set_markup (context, _("Sys Rq"));
+		break;
+
+	case CDK_KEY_Page_Up:
+		set_markup (context, _("Page\nUp"));
+		break;
+
+	case CDK_KEY_Page_Down:
+		set_markup (context, _("Page\nDown"));
+		break;
+
+	case CDK_KEY_Num_Lock:
+		set_markup (context, _("Num\nLock"));
+		break;
+
+	case CDK_KEY_KP_Page_Up:
+		set_markup (context, _("Pg Up"));
+		break;
+
+	case CDK_KEY_KP_Page_Down:
+		set_markup (context, _("Pg Dn"));
+		break;
+
+	case CDK_KEY_KP_Home:
+		set_markup (context, _("Home"));
+		break;
+
+	case CDK_KEY_KP_Left:
+		set_markup (context, _("Left"));
+		break;
+
+	case CDK_KEY_KP_End:
+		set_markup (context, _("End"));
+		break;
+
+	case CDK_KEY_KP_Up:
+		set_markup (context, _("Up"));
+		break;
+
+	case CDK_KEY_KP_Begin:
+		set_markup (context, _("Begin"));
+		break;
+
+	case CDK_KEY_KP_Right:
+		set_markup (context, _("Right"));
+		break;
+
+	case CDK_KEY_KP_Enter:
+		set_markup (context, _("Enter"));
+		break;
+
+	case CDK_KEY_KP_Down:
+		set_markup (context, _("Down"));
+		break;
+
+	case CDK_KEY_KP_Insert:
+		set_markup (context, _("Ins"));
+		break;
+
+	case CDK_KEY_KP_Delete:
+		set_markup (context, _("Del"));
+		break;
+
+	/* 0xfe03 */
+	case CDK_KEY_ISO_Level3_Shift:
+		set_markup (context, _("ISO_Level3_Shift"));
+		break;
+
+	/* 0xfe20 */
+	case CDK_KEY_ISO_Left_Tab:
+		set_markup (context, _("Tab"));
+		break;
+
+	/* 0xff08 */
+	case CDK_KEY_BackSpace:
+		set_markup (context, _("BackSpace"));
+		break;
+
+	/* 0xff09 */
+	case CDK_KEY_Tab:
+		set_markup (context, _("Tab"));
+		break;
+
+	/* 0xff0d */
+	case CDK_KEY_Return:
+		set_markup (context, _("Return"));
+		break;
+
+	/* 0xff13 */
+	case CDK_KEY_Pause:
+		set_markup (context, _("Pause"));
+		break;
+
+	/* 0xff1b */
+	case CDK_KEY_Escape:
+		set_markup (context, _("Esc"));
+		break;
+
+	/* 0xff50 */
+	case CDK_KEY_Home:
+		set_markup (context, _("Home"));
+		break;
+
+	/* 0xff51 */
+	case CDK_KEY_Left:
+		set_markup (context, _("Left"));
+		break;
+
+	/* 0xff52 */
+	case CDK_KEY_Up:
+		set_markup (context, _("Up"));
+		break;
+
+	/* 0xff53 */
+	case CDK_KEY_Right:
+		set_markup (context, _("Right"));
+		break;
+
+	/* 0xff54 */
+	case CDK_KEY_Down:
+		set_markup (context, _("Down"));
+		break;
+
+	/* 0xff57 */
+	case CDK_KEY_End:
+		set_markup (context, _("End"));
+		break;
+
+	/* 0xff61 */
+	case CDK_KEY_Print:
+		set_markup (context, _("Print"));
+		break;
+
+	/* 0xff63 */
+	case CDK_KEY_Insert:
+		set_markup (context, _("Insert"));
+		break;
+
+	/* 0xff67 */
+	case CDK_KEY_Menu:
+		set_markup (context, _("Menu"));
+		break;
+
+	/* 0xffbe */
+	case CDK_KEY_F1:
+		set_markup (context, _("F1"));
+		break;
+
+	/* 0xffbf */
+	case CDK_KEY_F2:
+		set_markup (context, _("F2"));
+		break;
+
+	/* 0xffc0 */
+	case CDK_KEY_F3:
+		set_markup (context, _("F3"));
+		break;
+
+	/* 0xffc1 */
+	case CDK_KEY_F4:
+		set_markup (context, _("F4"));
+		break;
+
+	/* 0xffc2 */
+	case CDK_KEY_F5:
+		set_markup (context, _("F5"));
+		break;
+
+	/* 0xffc3 */
+	case CDK_KEY_F6:
+		set_markup (context, _("F6"));
+		break;
+
+	/* 0xffc4 */
+	case CDK_KEY_F7:
+		set_markup (context, _("F7"));
+		break;
+
+	/* 0xffc5 */
+	case CDK_KEY_F8:
+		set_markup (context, _("F8"));
+		break;
+
+	/* 0xffc6 */
+	case CDK_KEY_F9:
+		set_markup (context, _("F9"));
+		break;
+
+	/* 0xffc7 */
+	case CDK_KEY_F10:
+		set_markup (context, _("F10"));
+		break;
+
+	/* 0xffc8 */
+	case CDK_KEY_F11:
+		set_markup (context, _("F11"));
+		break;
+
+	/* 0xffc9 */
+	case CDK_KEY_F12:
+		set_markup (context, _("F12"));
+		break;
+
+	/* 0xffe1 */
+	case CDK_KEY_Shift_L:
+		set_markup (context, _("Shift"));
+		break;
+
+	/* 0xffe2 */
+	case CDK_KEY_Shift_R:
+		set_markup (context, _("Shift"));
+		break;
+
+	/* 0xffe3 */
+	case CDK_KEY_Control_L:
+		set_markup (context, _("Control"));
+		break;
+
+	/* 0xffe4 */
+	case CDK_KEY_Control_R:
+		set_markup (context, _("Control"));
+		break;
+
+	/* 0xffe5 */
+	case CDK_KEY_Caps_Lock:
+		set_markup (context, _("Caps\nLock"));
+		break;
+
+	/* 0xffe7 */
+	case CDK_KEY_Meta_L:
+		set_markup (context, _("Meta"));
+		break;
+
+	/* 0xffe9 */
+	case CDK_KEY_Alt_L:
+		set_markup (context, _("Alt"));
+		break;
+
+	/* 0xffeb */
+	case CDK_KEY_Super_L:
+		set_markup (context, _("Super"));
+		break;
+
+	/* 0xffec */
+	case CDK_KEY_Super_R:
+		set_markup (context, _("Super"));
+		break;
+
+	/* 0xffff */
+	case CDK_KEY_VoidSymbol:
+		set_markup (context, _("Delete"));
+		break;
+
+	case CDK_KEY_dead_grave:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_acute:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_circumflex:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_tilde:
+		set_markup (context, "~");
+		break;
+
+	case CDK_KEY_dead_macron:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_breve:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_abovedot:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_diaeresis:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_abovering:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_doubleacute:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_caron:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_cedilla:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_ogonek:
+		set_markup (context, "");
+		break;
+
+		/* case CDK_KEY_dead_iota:
+		 * case CDK_KEY_dead_voiced_sound:
+		 * case CDK_KEY_dead_semivoiced_sound: */
+
+	case CDK_KEY_dead_belowdot:
+		set_markup (context, " ");
+		break;
+
+	case CDK_KEY_horizconnector:
+		set_markup (context, _("horiz\nconn"));
+		break;
+
+	case CDK_KEY_Mode_switch:
+		set_markup (context, _("AltGr"));
+		break;
+
+	case CDK_KEY_Multi_key:
+		set_markup (context, _("Compose"));
+		break;
+
+	default:
+		uc = cdk_keyval_to_unicode (keyval);
+		if (uc != 0 && g_unichar_isgraph (uc)) {
+			buf[g_unichar_to_utf8 (uc, buf)] = '\0';
+			set_markup (context, buf);
+		} else {
+			gchar *name = cdk_keyval_name (keyval);
+			if (name) {
+				set_markup (context, name);
+			} else
+				set_markup (context, "");
+		}
+	}
+}
+
+
+static void
+draw_pango_layout (CafekbdKeyboardDrawingRenderContext * context,
+		   CafekbdKeyboardDrawing * drawing,
+		   gint angle, gint x, gint y)
+{
+	PangoLayout *layout = context->layout;
+	CdkRGBA *color;
+	PangoLayoutLine *line;
+	gint x_off, y_off;
+	gint i;
+
+	color =
+	    drawing->colors + (drawing->xkb->geom->label_color -
+			       drawing->xkb->geom->colors);
+
+	if (angle != context->angle) {
+		PangoMatrix matrix = PANGO_MATRIX_INIT;
+		pango_matrix_rotate (&matrix, -angle / 10.0);
+		pango_context_set_matrix (pango_layout_get_context
+					  (layout), &matrix);
+		pango_layout_context_changed (layout);
+		context->angle = angle;
+	}
+
+	i = 0;
+	y_off = 0;
+	for (line = pango_layout_get_line (layout, i);
+	     line != NULL; line = pango_layout_get_line (layout, ++i)) {
+		GSList *runp;<--- Variable 'runp' can be declared as pointer to const
+		PangoRectangle line_extents;
+
+		x_off = 0;
+
+		for (runp = line->runs; runp != NULL; runp = runp->next) {
+			PangoGlyphItem *run = runp->data;
+			gint j;
+
+			for (j = 0; j < run->glyphs->num_glyphs; j++) {
+				PangoGlyphGeometry *geometry;<--- Variable 'geometry' can be declared as pointer to const
+
+				geometry =
+				    &run->glyphs->glyphs[j].geometry;
+
+				x_off += geometry->width;
+			}
+		}
+
+		pango_layout_line_get_extents (line, NULL, &line_extents);
+		y_off +=
+		    line_extents.height +
+		    pango_layout_get_spacing (layout);
+	}
+
+	cairo_move_to (context->cr, x, y);
+	cdk_cairo_set_source_rgba (context->cr, color);
+	pango_cairo_show_layout (context->cr, layout);
+}
+
+static void
+draw_key_label_helper (CafekbdKeyboardDrawingRenderContext * context,
+		       CafekbdKeyboardDrawing * drawing,
+		       KeySym keysym,
+		       gint angle,
+		       CafekbdKeyboardDrawingGroupLevelPosition glp,
+		       gint x,
+		       gint y, gint width, gint height, gint padding)
+{
+	gint label_x, label_y, label_max_width, ycell;
+
+	if (keysym == 0)
+		return;
+#ifdef KBDRAW_DEBUG
+	printf ("keysym: %04X(%c) at glp: %d\n",
+		(unsigned) keysym, (char) keysym, (int) glp);
+#endif
+
+	switch (glp) {
+	case CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT:
+	case CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT:
+		{
+			ycell =
+			    glp == CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT;
+
+			rotate_coordinate (x, y, x + padding,
+					   y + padding + (height -
+							  2 * padding) *
+					   ycell * 4 / 7, angle, &label_x,
+					   &label_y);
+			label_max_width =
+			    PANGO_SCALE * (width - 2 * padding);
+			break;
+		}
+	case CAFEKBD_KEYBOARD_DRAWING_POS_TOPRIGHT:
+	case CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT:
+		{
+			ycell =
+			    glp == CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT;
+
+			rotate_coordinate (x, y,
+					   x + padding + (width -
+							  2 * padding) *
+					   4 / 7,
+					   y + padding + (height -
+							  2 * padding) *
+					   ycell * 4 / 7, angle, &label_x,
+					   &label_y);
+			label_max_width =
+			    PANGO_SCALE * ((width - 2 * padding) -
+					   (width - 2 * padding) * 4 / 7);
+			break;
+		}
+	default:
+		return;
+	}
+	set_key_label_in_layout (context, keysym);
+	pango_layout_set_width (context->layout, label_max_width);
+	label_y -= (pango_layout_get_line_count (context->layout) - 1) *
+	    (pango_font_description_get_size (context->font_desc) /
+	     PANGO_SCALE);
+	cairo_save (context->cr);
+	cairo_rectangle (context->cr, x + padding / 2, y + padding / 2,
+			 width - padding, height - padding);
+	cairo_clip (context->cr);
+	draw_pango_layout (context, drawing, angle, label_x, label_y);
+	cairo_restore (context->cr);
+}
+
+static void
+draw_key_label (CafekbdKeyboardDrawingRenderContext * context,
+		CafekbdKeyboardDrawing * drawing,
+		guint keycode,
+		gint angle,
+		gint xkb_origin_x,
+		gint xkb_origin_y, gint xkb_width, gint xkb_height)
+{
+	gint x, y, width, height;
+	gint padding;
+	gint g, l, glp;
+
+	if (!drawing->xkb)
+		return;
+
+	padding = 23 * context->scale_numerator / context->scale_denominator;	/* 2.3mm */
+
+	x = xkb_to_pixmap_coord (context, xkb_origin_x);
+	y = xkb_to_pixmap_coord (context, xkb_origin_y);
+	width =
+	    xkb_to_pixmap_coord (context, xkb_origin_x + xkb_width) - x;
+	height =
+	    xkb_to_pixmap_coord (context, xkb_origin_y + xkb_height) - y;
+
+	for (glp = CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT;
+	     glp < CAFEKBD_KEYBOARD_DRAWING_POS_TOTAL; glp++) {
+		if (drawing->groupLevels[glp] == NULL)
+			continue;
+		g = drawing->groupLevels[glp]->group;
+		l = drawing->groupLevels[glp]->level;
+
+		if (g < 0 || g >= XkbKeyNumGroups (drawing->xkb, keycode))
+			continue;
+		if (l < 0
+		    || l >= XkbKeyGroupWidth (drawing->xkb, keycode, g))
+			continue;
+
+		/* Skip "exotic" levels like the "Ctrl" level in PC_SYSREQ */
+		if (l > 0) {
+			guint mods = XkbKeyKeyType (drawing->xkb, keycode,
+						    g)->mods.mask;
+			if ((mods & (ShiftMask | drawing->l3mod)) == 0)
+				continue;
+		}
+
+		if (drawing->track_modifiers) {
+			guint mods_rtrn;
+			KeySym keysym;
+
+			if (XkbTranslateKeyCode (drawing->xkb, keycode,
+						 XkbBuildCoreState
+						 (drawing->mods, g),
+						 &mods_rtrn, &keysym)) {
+				draw_key_label_helper (context, drawing,
+						       keysym, angle, glp,
+						       x, y, width, height,
+						       padding);
+				/* reverse y order */
+			}
+		} else {
+			KeySym keysym;
+
+			keysym =
+			    XkbKeySymEntry (drawing->xkb, keycode, l, g);
+
+			draw_key_label_helper (context, drawing, keysym,
+					       angle, glp, x, y, width,
+					       height, padding);
+			/* reverse y order */
+		}
+	}
+}
+
+/*
+ * The x offset is calculated for complex shapes. It is the rightmost of the vertical lines in the outline
+ */
+static gint
+calc_origin_offset_x (XkbOutlineRec * outline)<--- Parameter 'outline' can be declared as pointer to const
+{
+	gint rv = 0;
+	gint i;
+	XkbPointPtr point = outline->points;
+	if (outline->num_points < 3)
+		return 0;
+	for (i = outline->num_points; --i > 0;) {
+		gint x1 = point->x;
+		gint y1 = point++->y;
+		gint x2 = point->x;
+		gint y2 = point->y;
+
+		/*vertical, bottom to top (clock-wise), on the left */
+		if ((x1 == x2) && (y1 > y2) && (x1 > rv)) {
+			rv = x1;
+		}
+	}
+	return rv;
+}
+
+/* groups are from 0-3 */
+static void
+draw_key (CafekbdKeyboardDrawingRenderContext * context,
+	  CafekbdKeyboardDrawing * drawing, CafekbdKeyboardDrawingKey * key)
+{
+	XkbShapeRec *shape;
+	CtkStyleContext *style_context;
+	CdkRGBA color;
+	XkbOutlineRec *outline;
+	int origin_offset_x;
+	/* gint i; */
+
+	if (!drawing->xkb)
+		return;
+
+#ifdef KBDRAW_DEBUG
+	printf ("shape: %p (base %p, index %d)\n",
+		drawing->xkb->geom->shapes + key->xkbkey->shape_ndx,
+		drawing->xkb->geom->shapes, key->xkbkey->shape_ndx);
+#endif
+
+	shape = drawing->xkb->geom->shapes + key->xkbkey->shape_ndx;
+
+	if (key->pressed) {
+		style_context = ctk_widget_get_style_context (CTK_WIDGET (drawing));
+		ctk_style_context_save (style_context);
+		ctk_style_context_add_class (style_context, CTK_STYLE_CLASS_VIEW);
+		ctk_style_context_get_background_color (style_context,
+		                                        CTK_STATE_FLAG_SELECTED,
+		                                        &color);
+		ctk_style_context_restore (style_context);
+	 } else
+		color = *(drawing->colors + key->xkbkey->color_ndx);
+
+#ifdef KBDRAW_DEBUG
+	printf
+	    (" outlines base in the shape: %p (total: %d), origin: (%d, %d), angle %d\n",
+	     shape->outlines, shape->num_outlines, key->origin_x,
+	     key->origin_y, key->angle);
+#endif
+
+	/* draw the primary outline */
+	outline = shape->primary ? shape->primary : shape->outlines;
+	draw_outline (context, outline, &color, key->angle, key->origin_x,
+		      key->origin_y);
+#if 0
+	/* don't draw other outlines for now, since
+	 * the text placement does not take them into account
+	 */
+	for (i = 0; i < shape->num_outlines; i++) {
+		if (shape->outlines + i == shape->approx ||
+		    shape->outlines + i == shape->primary)
+			continue;
+		draw_outline (context, shape->outlines + i, NULL,
+			      key->angle, key->origin_x, key->origin_y);
+	}
+#endif
+
+	origin_offset_x = calc_origin_offset_x (outline);
+	draw_key_label (context, drawing, key->keycode, key->angle,
+			key->origin_x + origin_offset_x, key->origin_y,
+			shape->bounds.x2, shape->bounds.y2);
+}
+
+static void
+invalidate_region (CafekbdKeyboardDrawing * drawing,
+		   gdouble angle,
+		   gint origin_x, gint origin_y, XkbShapeRec * shape)
+{
+	CdkPoint points[4];
+	gint x_min, x_max, y_min, y_max;
+	gint x, y, width, height;
+	gint xx, yy;
+
+	rotate_coordinate (0, 0, 0, 0, angle, &xx, &yy);
+	points[0].x = xx;
+	points[0].y = yy;
+	rotate_coordinate (0, 0, shape->bounds.x2, 0, angle, &xx, &yy);
+	points[1].x = xx;
+	points[1].y = yy;
+	rotate_coordinate (0, 0, shape->bounds.x2, shape->bounds.y2, angle,
+			   &xx, &yy);
+	points[2].x = xx;
+	points[2].y = yy;
+	rotate_coordinate (0, 0, 0, shape->bounds.y2, angle, &xx, &yy);
+	points[3].x = xx;
+	points[3].y = yy;
+
+	x_min =
+	    MIN (MIN (points[0].x, points[1].x),
+		 MIN (points[2].x, points[3].x));
+	x_max =
+	    MAX (MAX (points[0].x, points[1].x),
+		 MAX (points[2].x, points[3].x));
+	y_min =
+	    MIN (MIN (points[0].y, points[1].y),
+		 MIN (points[2].y, points[3].y));
+	y_max =
+	    MAX (MAX (points[0].y, points[1].y),
+		 MAX (points[2].y, points[3].y));
+
+	x = xkb_to_pixmap_coord (drawing->renderContext,
+				 origin_x + x_min) - 6;
+	y = xkb_to_pixmap_coord (drawing->renderContext,
+				 origin_y + y_min) - 6;
+	width =
+	    xkb_to_pixmap_coord (drawing->renderContext,
+				 x_max - x_min) + 12;
+	height =
+	    xkb_to_pixmap_coord (drawing->renderContext,
+				 y_max - y_min) + 12;
+
+	ctk_widget_queue_draw_area (CTK_WIDGET (drawing), x, y, width,
+				    height);
+}
+
+static void
+invalidate_indicator_doodad_region (CafekbdKeyboardDrawing * drawing,
+				    CafekbdKeyboardDrawingDoodad * doodad)
+{
+	if (!drawing->xkb)
+		return;
+
+	invalidate_region (drawing,
+			   doodad->angle,
+			   doodad->origin_x +
+			   doodad->doodad->indicator.left,
+			   doodad->origin_y +
+			   doodad->doodad->indicator.top,
+			   &drawing->xkb->geom->shapes[doodad->
+						       doodad->indicator.shape_ndx]);
+}
+
+static void
+invalidate_key_region (CafekbdKeyboardDrawing * drawing,
+		       CafekbdKeyboardDrawingKey * key)
+{
+	if (!drawing->xkb)
+		return;
+
+	invalidate_region (drawing,
+			   key->angle,
+			   key->origin_x,
+			   key->origin_y,
+			   &drawing->xkb->geom->shapes[key->
+						       xkbkey->shape_ndx]);
+}
+
+static void
+draw_text_doodad (CafekbdKeyboardDrawingRenderContext * context,
+		  CafekbdKeyboardDrawing * drawing,
+		  CafekbdKeyboardDrawingDoodad * doodad,
+		  XkbTextDoodadRec * text_doodad)
+{
+	gint x, y;
+	if (!drawing->xkb)
+		return;
+
+	x = xkb_to_pixmap_coord (context,
+				 doodad->origin_x + text_doodad->left);
+	y = xkb_to_pixmap_coord (context,
+				 doodad->origin_y + text_doodad->top);
+
+	set_markup (context, text_doodad->text);
+	draw_pango_layout (context, drawing, doodad->angle, x, y);
+}
+
+static void
+draw_indicator_doodad (CafekbdKeyboardDrawingRenderContext * context,
+		       CafekbdKeyboardDrawing * drawing,
+		       CafekbdKeyboardDrawingDoodad * doodad,
+		       XkbIndicatorDoodadRec * indicator_doodad)
+{
+	CdkRGBA *color;
+	XkbShapeRec *shape;<--- Variable 'shape' can be declared as pointer to const
+	gint i;
+
+	if (!drawing->xkb)
+		return;
+
+	shape = drawing->xkb->geom->shapes + indicator_doodad->shape_ndx;
+
+	color = drawing->colors + (doodad->on ?
+				   indicator_doodad->on_color_ndx :
+				   indicator_doodad->off_color_ndx);
+
+	for (i = 0; i < 1; i++)
+		draw_outline (context, shape->outlines + i, color,
+			      doodad->angle,
+			      doodad->origin_x + indicator_doodad->left,
+			      doodad->origin_y + indicator_doodad->top);
+}
+
+static void
+draw_shape_doodad (CafekbdKeyboardDrawingRenderContext * context,
+		   CafekbdKeyboardDrawing * drawing,
+		   CafekbdKeyboardDrawingDoodad * doodad,
+		   XkbShapeDoodadRec * shape_doodad)
+{
+	XkbShapeRec *shape;
+	CdkRGBA *color;
+	gint i;
+
+	if (!drawing->xkb)
+		return;
+
+	shape = drawing->xkb->geom->shapes + shape_doodad->shape_ndx;
+	color = drawing->colors + shape_doodad->color_ndx;
+
+	/* draw the primary outline filled */
+	draw_outline (context,
+		      shape->primary ? shape->primary : shape->outlines,
+		      color, doodad->angle,
+		      doodad->origin_x + shape_doodad->left,
+		      doodad->origin_y + shape_doodad->top);
+
+	/* stroke the other outlines */
+	for (i = 0; i < shape->num_outlines; i++) {
+		if (shape->outlines + i == shape->approx ||
+		    shape->outlines + i == shape->primary)
+			continue;
+		draw_outline (context, shape->outlines + i, NULL,
+			      doodad->angle,
+			      doodad->origin_x + shape_doodad->left,
+			      doodad->origin_y + shape_doodad->top);
+	}
+}
+
+static void
+draw_doodad (CafekbdKeyboardDrawingRenderContext * context,
+	     CafekbdKeyboardDrawing * drawing,
+	     CafekbdKeyboardDrawingDoodad * doodad)
+{
+	switch (doodad->doodad->any.type) {
+	case XkbOutlineDoodad:
+	case XkbSolidDoodad:
+		draw_shape_doodad (context, drawing, doodad,
+				   &doodad->doodad->shape);
+		break;
+
+	case XkbTextDoodad:
+		draw_text_doodad (context, drawing, doodad,
+				  &doodad->doodad->text);
+		break;
+
+	case XkbIndicatorDoodad:
+		draw_indicator_doodad (context, drawing, doodad,
+				       &doodad->doodad->indicator);
+		break;
+
+	case XkbLogoDoodad:
+		/* g_print ("draw_doodad: logo: %s\n", doodad->doodad->logo.logo_name); */
+		/* XkbLogoDoodadRec is essentially a subclass of XkbShapeDoodadRec */
+		draw_shape_doodad (context, drawing, doodad,
+				   &doodad->doodad->shape);
+		break;
+	}
+}
+
+typedef struct {
+	CafekbdKeyboardDrawing *drawing;
+	CafekbdKeyboardDrawingRenderContext *context;
+} DrawKeyboardItemData;
+
+static void
+redraw_overlapping_doodads (CafekbdKeyboardDrawingRenderContext * context,
+			    CafekbdKeyboardDrawing * drawing,
+			    const CafekbdKeyboardDrawingKey * key)
+{
+	GList *list;
+	gboolean do_draw = FALSE;
+
+	for (list = drawing->keyboard_items; list; list = list->next) {
+		CafekbdKeyboardDrawingItem *item = list->data;
+
+		if (do_draw
+		    && item->type ==
+		    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD)
+			draw_doodad (context, drawing,
+				     (CafekbdKeyboardDrawingDoodad *) item);
+
+		if (list->data == key)
+			do_draw = TRUE;
+	}
+}
+
+static void
+draw_keyboard_item (CafekbdKeyboardDrawingItem * item,
+		    DrawKeyboardItemData * data)
+{
+	CafekbdKeyboardDrawing *drawing = data->drawing;
+	CafekbdKeyboardDrawingRenderContext *context = data->context;
+
+	if (!drawing->xkb)
+		return;
+
+	switch (item->type) {
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_INVALID:
+		break;
+
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY:
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA:
+		draw_key (context, drawing,
+			  (CafekbdKeyboardDrawingKey *) item);
+		break;
+
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD:
+		draw_doodad (context, drawing,
+			     (CafekbdKeyboardDrawingDoodad *) item);
+		break;
+	}
+}
+
+static void
+draw_keyboard_to_context (CafekbdKeyboardDrawingRenderContext * context,
+			  CafekbdKeyboardDrawing * drawing)
+{
+	DrawKeyboardItemData data = { drawing, context };
+#ifdef KBDRAW_DEBUG
+	printf ("mods: %d\n", drawing->mods);
+#endif
+	g_list_foreach (drawing->keyboard_items,
+			(GFunc) draw_keyboard_item, &data);
+}
+
+static gboolean
+create_cairo (CafekbdKeyboardDrawing * drawing)
+{
+	CtkStyleContext *style_context = NULL;
+	CtkStateFlags state;
+	CdkRGBA dark_color;
+
+	if (drawing == NULL)
+		return FALSE;
+	if (drawing->surface == NULL)
+		return FALSE;
+
+	drawing->renderContext->cr =
+	    cairo_create (drawing->surface);
+
+	style_context = ctk_widget_get_style_context (CTK_WIDGET (drawing));
+	state = ctk_style_context_get_state (style_context);
+
+	ctk_style_context_get_background_color (style_context, state,
+	                                        &dark_color);
+	/* make dark background by making regular background darker */
+	dark_color.red *= 0.7;
+	dark_color.green *= 0.7;
+	dark_color.blue *= 0.7;
+
+	drawing->renderContext->dark_color = dark_color;
+
+	return TRUE;
+}
+
+static void
+destroy_cairo (CafekbdKeyboardDrawing * drawing)
+{
+	cairo_destroy (drawing->renderContext->cr);
+	drawing->renderContext->cr = NULL;
+}
+
+static void
+draw_keyboard (CafekbdKeyboardDrawing * drawing)
+{
+        CtkStyleContext *context =
+	    ctk_widget_get_style_context (CTK_WIDGET (drawing));
+	CtkStateFlags state = ctk_style_context_get_state (context);
+	CdkRGBA color;
+	CtkAllocation allocation;
+
+	if (!drawing->xkb)
+		return;
+
+	ctk_widget_get_allocation (CTK_WIDGET (drawing), &allocation);
+
+	drawing->surface =
+	    cdk_window_create_similar_surface (ctk_widget_get_window
+					       (CTK_WIDGET (drawing)),
+					       CAIRO_CONTENT_COLOR,
+					       allocation.width,
+					       allocation.height);
+
+	if (create_cairo (drawing)) {
+		/* blank background */
+		ctk_style_context_save (context);
+		ctk_style_context_add_class (context, CTK_STYLE_CLASS_VIEW);
+		ctk_style_context_get_background_color (context, state, &color);
+		ctk_style_context_restore (context);
+		cdk_cairo_set_source_rgba (drawing->renderContext->cr, &color);
+		cairo_paint (drawing->renderContext->cr);
+
+		draw_keyboard_to_context (drawing->renderContext, drawing);
+		destroy_cairo (drawing);
+	}
+}
+
+static void
+alloc_render_context (CafekbdKeyboardDrawing * drawing)
+{
+	CafekbdKeyboardDrawingRenderContext *context =
+	    drawing->renderContext =
+	    g_new0 (CafekbdKeyboardDrawingRenderContext, 1);
+
+	PangoContext *pangoContext =
+	    ctk_widget_get_pango_context (CTK_WIDGET (drawing));
+
+	CtkStyleContext *style_context =
+	    ctk_widget_get_style_context (CTK_WIDGET (drawing));
+	PangoFontDescription *fd = NULL;
+
+	ctk_style_context_get (style_context,
+	                       ctk_style_context_get_state (style_context),
+	                       CTK_STYLE_PROPERTY_FONT, &fd, NULL);
+
+	context->layout = pango_layout_new (pangoContext);
+	pango_layout_set_ellipsize (context->layout, PANGO_ELLIPSIZE_END);
+
+	context->font_desc = pango_font_description_copy (fd);
+	context->angle = 0;
+	context->scale_numerator = 1;
+	context->scale_denominator = 1;
+}
+
+static void
+free_render_context (CafekbdKeyboardDrawing * drawing)
+{
+	CafekbdKeyboardDrawingRenderContext *context = drawing->renderContext;
+	g_object_unref (G_OBJECT (context->layout));
+	pango_font_description_free (context->font_desc);
+
+	g_free (drawing->renderContext);
+	drawing->renderContext = NULL;
+}
+
+static gboolean
+draw (CtkWidget              *widget G_GNUC_UNUSED,
+      cairo_t                *cr,
+      CafekbdKeyboardDrawing *drawing)
+{
+	if (!drawing->xkb)
+		return FALSE;
+
+	if (drawing->surface == NULL)
+		return FALSE;
+
+	cairo_set_source_surface (cr, drawing->surface, 0, 0);
+	cairo_paint (cr);
+
+	return FALSE;
+}
+
+static gboolean
+idle_redraw (gpointer user_data)
+{
+	CafekbdKeyboardDrawing *drawing = user_data;
+
+	drawing->idle_redraw = 0;
+	draw_keyboard (drawing);
+	ctk_widget_queue_draw (CTK_WIDGET (drawing));
+	return FALSE;
+}
+
+static gboolean
+context_setup_scaling (CafekbdKeyboardDrawingRenderContext * context,
+		       CafekbdKeyboardDrawing * drawing,
+		       gdouble width, gdouble height,
+		       gdouble dpi_x, gdouble dpi_y)
+{
+	if (!drawing->xkb)
+		return FALSE;
+
+	if (drawing->xkb->geom->width_mm <= 0
+	    || drawing->xkb->geom->height_mm <= 0) {
+		g_critical
+		    ("keyboard geometry reports width or height as zero!");
+		return FALSE;
+	}
+
+	if (width * drawing->xkb->geom->height_mm <
+	    height * drawing->xkb->geom->width_mm) {
+		context->scale_numerator = width;
+		context->scale_denominator = drawing->xkb->geom->width_mm;
+	} else {
+		context->scale_numerator = height;
+		context->scale_denominator = drawing->xkb->geom->height_mm;
+	}
+
+	pango_font_description_set_size (context->font_desc,
+					 72 * KEY_FONT_SIZE * dpi_x *
+					 context->scale_numerator /
+					 context->scale_denominator);
+	pango_layout_set_spacing (context->layout,
+				  -160 * dpi_y * context->scale_numerator /
+				  context->scale_denominator);
+	pango_layout_set_font_description (context->layout,
+					   context->font_desc);
+
+	return TRUE;
+}
+
+static void
+size_allocate (CtkWidget              *widget G_GNUC_UNUSED,
+	       CtkAllocation          *allocation,
+	       CafekbdKeyboardDrawing *drawing)
+{
+	CafekbdKeyboardDrawingRenderContext *context = drawing->renderContext;
+
+	if (drawing->surface) {
+		cairo_surface_destroy (drawing->surface);
+		drawing->surface = NULL;
+	}
+
+	if (!context_setup_scaling (context, drawing,
+				    allocation->width, allocation->height,
+				    50, 50))
+		return;
+
+	if (!drawing->idle_redraw)
+		drawing->idle_redraw = g_idle_add (idle_redraw, drawing);
+}
+
+static gint
+key_event (CtkWidget              *widget G_GNUC_UNUSED,
+	   CdkEventKey            *event,
+	   CafekbdKeyboardDrawing *drawing)
+{
+	CafekbdKeyboardDrawingKey *key;
+	if (!drawing->xkb)
+		return FALSE;
+
+	key = drawing->keys + event->hardware_keycode;
+
+	if (event->hardware_keycode > drawing->xkb->max_key_code ||
+	    event->hardware_keycode < drawing->xkb->min_key_code ||
+	    key->xkbkey == NULL) {
+		g_signal_emit (drawing,
+			       cafekbd_keyboard_drawing_signals[BAD_KEYCODE],
+			       0, event->hardware_keycode);
+		return TRUE;
+	}
+
+	if ((event->type == CDK_KEY_PRESS && key->pressed) ||
+	    (event->type == CDK_KEY_RELEASE && !key->pressed))
+		return TRUE;
+	/* otherwise this event changes the state we believed we had before */
+
+	key->pressed = (event->type == CDK_KEY_PRESS);
+
+	if (create_cairo (drawing)) {
+		draw_key (drawing->renderContext, drawing, key);
+		redraw_overlapping_doodads (drawing->renderContext,
+					    drawing, key);
+		destroy_cairo (drawing);
+	}
+
+	invalidate_key_region (drawing, key);
+	return TRUE;
+}
+
+static gint
+button_press_event (CtkWidget              *widget,
+		    CdkEventButton         *event G_GNUC_UNUSED,
+		    CafekbdKeyboardDrawing *drawing)<--- Parameter 'drawing' can be declared as pointer to const
+{
+	if (!drawing->xkb)
+		return FALSE;
+
+	ctk_widget_grab_focus (widget);
+	return FALSE;
+}
+
+static gboolean
+unpress_keys (CafekbdKeyboardDrawing * drawing)
+{
+	gint i;
+
+	drawing->timeout = 0;
+
+	if (!drawing->xkb)
+		return FALSE;
+
+	if (create_cairo (drawing)) {
+		for (i = drawing->xkb->min_key_code;
+		     i <= drawing->xkb->max_key_code; i++)
+			if (drawing->keys[i].pressed) {
+				drawing->keys[i].pressed = FALSE;
+				draw_key (drawing->renderContext, drawing,
+					  drawing->keys + i);
+				invalidate_key_region (drawing,
+						       drawing->keys + i);
+			}
+		destroy_cairo (drawing);
+	}
+
+	return FALSE;
+}
+
+static gint
+focus_event (CtkWidget              *widget G_GNUC_UNUSED,
+	     CdkEventFocus          *event,<--- Parameter 'event' can be declared as pointer to const
+	     CafekbdKeyboardDrawing *drawing)
+{
+	if (event->in && drawing->timeout > 0) {
+		g_source_remove (drawing->timeout);
+		drawing->timeout = 0;
+	} else if (drawing->timeout == 0)
+		drawing->timeout =
+		    g_timeout_add (120, (GSourceFunc) unpress_keys,
+				   drawing);
+
+	return FALSE;
+}
+
+static gint
+compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a,<--- Parameter 'a' can be declared as pointer to const
+				  CafekbdKeyboardDrawingItem * b)<--- Parameter 'b' can be declared as pointer to const
+{
+	if (a->priority > b->priority)
+		return 1;
+	else if (a->priority < b->priority)
+		return -1;
+	else
+		return 0;
+}
+
+static void
+init_indicator_doodad (CafekbdKeyboardDrawing * drawing,
+		       XkbDoodadRec * xkbdoodad,
+		       CafekbdKeyboardDrawingDoodad * doodad)
+{
+	if (!drawing->xkb)
+		return;
+
+	if (xkbdoodad->any.type == XkbIndicatorDoodad) {
+		gint index;
+		Atom iname = 0;
+		Atom sname = xkbdoodad->indicator.name;
+		unsigned long phys_indicators =
+		    drawing->xkb->indicators->phys_indicators;
+		Atom *pind = drawing->xkb->names->indicators;<--- Variable 'pind' can be declared as pointer to const
+
+#ifdef KBDRAW_DEBUG
+		printf ("Looking for %d[%s]\n",
+			(int) sname, XGetAtomName (drawing->display,
+						   sname));
+#endif
+
+		for (index = 0; index < XkbNumIndicators; index++) {
+			iname = *pind++;
+			/* name matches and it is real */
+			if (iname == sname
+			    && (phys_indicators & (1 << index)))
+				break;
+			if (iname == 0)
+				break;
+		}
+		if (iname == 0)
+			g_warning ("Could not find indicator %d [%s]\n",
+				   (int) sname,
+				   XGetAtomName (drawing->display, sname));
+		else {
+#ifdef KBDRAW_DEBUG
+			printf ("Found in xkbdesc as %d\n", index);
+#endif
+			drawing->physical_indicators[index] = doodad;
+			/* Trying to obtain the real state, but if fail - just assume OFF */
+			if (!XkbGetNamedIndicator
+			    (drawing->display, sname, NULL, &doodad->on,
+			     NULL, NULL))
+				doodad->on = 0;
+		}
+	}
+}
+
+static void
+init_keys_and_doodads (CafekbdKeyboardDrawing * drawing)
+{
+	gint i, j, k;
+	gint x, y;
+
+	if (!drawing->xkb)
+		return;
+
+	for (i = 0; i < drawing->xkb->geom->num_doodads; i++) {
+		XkbDoodadRec *xkbdoodad = drawing->xkb->geom->doodads + i;
+		CafekbdKeyboardDrawingDoodad *doodad =
+		    g_new (CafekbdKeyboardDrawingDoodad, 1);
+
+		doodad->type = CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD;
+		doodad->origin_x = 0;
+		doodad->origin_y = 0;
+		doodad->angle = 0;
+		doodad->priority = xkbdoodad->any.priority * 256 * 256;
+		doodad->doodad = xkbdoodad;
+
+		init_indicator_doodad (drawing, xkbdoodad, doodad);
+
+		drawing->keyboard_items =
+		    g_list_append (drawing->keyboard_items, doodad);
+	}
+
+	for (i = 0; i < drawing->xkb->geom->num_sections; i++) {
+		XkbSectionRec *section = drawing->xkb->geom->sections + i;
+		guint priority;
+
+#ifdef KBDRAW_DEBUG
+		printf ("initing section %d containing %d rows\n", i,
+			section->num_rows);
+#endif
+		x = section->left;
+		y = section->top;
+		priority = section->priority * 256 * 256;
+
+		for (j = 0; j < section->num_rows; j++) {
+			XkbRowRec *row = section->rows + j;
+
+#ifdef KBDRAW_DEBUG
+			printf ("  initing row %d\n", j);
+#endif
+			x = section->left + row->left;
+			y = section->top + row->top;
+
+			for (k = 0; k < row->num_keys; k++) {
+				XkbKeyRec *xkbkey = row->keys + k;
+				CafekbdKeyboardDrawingKey *key;
+				XkbShapeRec *shape =
+				    drawing->xkb->geom->shapes +
+				    xkbkey->shape_ndx;
+				guint keycode = find_keycode (drawing,
+							      xkbkey->
+							      name.name);
+
+				if (keycode == INVALID_KEYCODE)
+					continue;
+#ifdef KBDRAW_DEBUG
+				printf
+				    ("    initing key %d, shape: %p(%p + %d), code: %u\n",
+				     k, shape, drawing->xkb->geom->shapes,
+				     xkbkey->shape_ndx, keycode);
+#endif
+				if (row->vertical)
+					y += xkbkey->gap;
+				else
+					x += xkbkey->gap;
+
+				if (keycode >= drawing->xkb->min_key_code
+				    && keycode <=
+				    drawing->xkb->max_key_code) {
+					key = drawing->keys + keycode;
+					if (key->type ==
+					    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_INVALID)
+					{
+						key->type =
+						    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY;
+					} else {
+						/* duplicate key for the same keycode,
+						   already defined as CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY */
+						key =
+						    g_new0
+						    (CafekbdKeyboardDrawingKey,
+						     1);
+						key->type =
+						    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA;
+					}
+				} else {
+					g_warning
+					    ("key %4.4s: keycode = %u; not in range %d..%d\n",
+					     xkbkey->name.name, keycode,
+					     drawing->xkb->min_key_code,
+					     drawing->xkb->max_key_code);
+
+					key =
+					    g_new0 (CafekbdKeyboardDrawingKey,
+						    1);
+					key->type =
+					    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA;
+				}
+
+				key->xkbkey = xkbkey;
+				key->angle = section->angle;
+				rotate_coordinate (section->left,
+						   section->top, x, y,
+						   section->angle,
+						   &key->origin_x,
+						   &key->origin_y);
+				key->priority = priority;
+				key->keycode = keycode;
+
+				drawing->keyboard_items =
+				    g_list_append (drawing->keyboard_items,
+						   key);
+
+				if (row->vertical)
+					y += shape->bounds.y2;
+				else
+					x += shape->bounds.x2;
+
+				priority++;
+			}
+		}
+
+		for (j = 0; j < section->num_doodads; j++) {
+			XkbDoodadRec *xkbdoodad = section->doodads + j;
+			CafekbdKeyboardDrawingDoodad *doodad =
+			    g_new (CafekbdKeyboardDrawingDoodad, 1);
+
+			doodad->type =
+			    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD;
+			doodad->origin_x = x;
+			doodad->origin_y = y;
+			doodad->angle = section->angle;
+			doodad->priority =
+			    priority + xkbdoodad->any.priority;
+			doodad->doodad = xkbdoodad;
+
+			init_indicator_doodad (drawing, xkbdoodad, doodad);
+
+			drawing->keyboard_items =
+			    g_list_append (drawing->keyboard_items,
+					   doodad);
+		}
+	}
+
+	drawing->keyboard_items = g_list_sort (drawing->keyboard_items,
+					       (GCompareFunc)
+					       compare_keyboard_item_priorities);<--- You might need to cast the function pointer here<--- You might need to cast the function pointer here
+}
+
+static void
+init_colors (CafekbdKeyboardDrawing * drawing)
+{
+	gboolean result;
+	gint i;
+
+	if (!drawing->xkb)
+		return;
+
+	drawing->colors = g_new (CdkRGBA, drawing->xkb->geom->num_colors);
+
+	for (i = 0; i < drawing->xkb->geom->num_colors; i++) {
+		result =
+		    parse_xkb_color_spec (drawing->xkb->geom->
+					  colors[i].spec,
+					  drawing->colors + i);
+
+		if (!result)
+			g_warning
+			    ("init_colors: unable to parse color %s\n",
+			     drawing->xkb->geom->colors[i].spec);
+	}
+}
+
+static void
+free_cdik (			/*colors doodads indicators keys */
+		  CafekbdKeyboardDrawing * drawing)
+{
+	GList *itemp;
+
+	if (!drawing->xkb)
+		return;
+
+	for (itemp = drawing->keyboard_items; itemp; itemp = itemp->next) {
+		CafekbdKeyboardDrawingItem *item = itemp->data;
+
+		switch (item->type) {
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_INVALID:
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY:
+			break;
+
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA:
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD:
+			g_free (item);
+			break;
+		}
+	}
+
+	g_list_free (drawing->keyboard_items);
+	drawing->keyboard_items = NULL;
+
+	g_free (drawing->keys);
+	g_free (drawing->colors);
+}
+
+static void
+alloc_cdik (CafekbdKeyboardDrawing * drawing)
+{
+	if (!drawing->xkb)
+		return;
+
+	drawing->physical_indicators_size =
+	    drawing->xkb->indicators->phys_indicators + 1;
+	drawing->physical_indicators =
+	    g_new0 (CafekbdKeyboardDrawingDoodad *,
+		    drawing->physical_indicators_size);
+	drawing->keys =
+	    g_new0 (CafekbdKeyboardDrawingKey,
+		    drawing->xkb->max_key_code + 1);
+}
+
+static void
+process_indicators_state_notify (XkbIndicatorNotifyEvent * iev,<--- Parameter 'iev' can be declared as pointer to const
+				 CafekbdKeyboardDrawing * drawing)
+{
+	/* Good question: should we track indicators when the keyboard is
+	   NOT really taken from the screen */
+	gint i;
+
+	for (i = 0; i <= drawing->xkb->indicators->phys_indicators; i++)
+		if (drawing->physical_indicators[i] != NULL
+		    && (iev->changed & 1 << i)) {
+			gint state = (iev->state & 1 << i) != FALSE;
+
+			if ((state && !drawing->physical_indicators[i]->on)
+			    || (!state
+				&& drawing->physical_indicators[i]->on)) {
+				drawing->physical_indicators[i]->on =
+				    state;
+				if (create_cairo (drawing)) {
+					draw_doodad
+					    (drawing->renderContext,
+					     drawing,
+					     drawing->physical_indicators
+					     [i]);
+					destroy_cairo (drawing);
+				}
+				invalidate_indicator_doodad_region
+				    (drawing,
+				     drawing->physical_indicators[i]);
+			}
+		}
+}
+
+static CdkFilterReturn
+xkb_state_notify_event_filter (CdkXEvent              *cdkxev,
+			       CdkEvent               *event G_GNUC_UNUSED,
+			       CafekbdKeyboardDrawing *drawing)
+{
+#define modifier_change_mask (XkbModifierStateMask | XkbModifierBaseMask | XkbModifierLatchMask | XkbModifierLockMask)
+
+	if (!drawing->xkb)
+		return CDK_FILTER_CONTINUE;
+
+	if (((XEvent *) cdkxev)->type == drawing->xkb_event_type) {
+		XkbEvent *kev = (XkbEvent *) cdkxev;
+		CtkAllocation allocation;
+		switch (kev->any.xkb_type) {
+		case XkbStateNotify:
+			if (((kev->state.changed & modifier_change_mask) &&
+			     drawing->track_modifiers)) {
+				free_cdik (drawing);
+				if (drawing->track_modifiers)
+					cafekbd_keyboard_drawing_set_mods
+					    (drawing,
+					     kev->state.compat_state);
+				drawing->keys =
+				    g_new0 (CafekbdKeyboardDrawingKey,
+					    drawing->xkb->max_key_code +
+					    1);
+
+				ctk_widget_get_allocation (CTK_WIDGET
+							   (drawing),
+							   &allocation);
+				size_allocate (CTK_WIDGET (drawing),
+					       &allocation, drawing);
+
+				init_keys_and_doodads (drawing);
+				init_colors (drawing);
+			}
+			break;
+
+		case XkbIndicatorStateNotify:
+			{
+				process_indicators_state_notify (&
+								 ((XkbEvent
+								   *)
+								  cdkxev)->indicators,
+drawing);
+			}
+			break;
+
+		case XkbIndicatorMapNotify:
+		case XkbControlsNotify:
+		case XkbNamesNotify:
+		case XkbNewKeyboardNotify:
+			{
+				XkbStateRec state;
+				memset (&state, 0, sizeof (state));
+				XkbGetState (drawing->display,
+					     XkbUseCoreKbd, &state);
+				if (drawing->track_modifiers)
+					cafekbd_keyboard_drawing_set_mods
+					    (drawing, state.compat_state);
+				if (drawing->track_config)
+					cafekbd_keyboard_drawing_set_keyboard
+					    (drawing, NULL);
+			}
+			break;
+		}
+	}
+
+	return CDK_FILTER_CONTINUE;
+}
+
+static void
+destroy (CafekbdKeyboardDrawing * drawing)
+{
+	free_render_context (drawing);
+	cdk_window_remove_filter (NULL, (CdkFilterFunc)
+				  xkb_state_notify_event_filter, drawing);
+	if (drawing->timeout > 0) {
+		g_source_remove (drawing->timeout);
+		drawing->timeout = 0;
+	}
+	if (drawing->idle_redraw > 0) {
+		g_source_remove (drawing->idle_redraw);
+		drawing->idle_redraw = 0;
+	}
+
+	if (drawing->surface != NULL) {
+		cairo_surface_destroy (drawing->surface);
+	}
+}
+
+static void
+style_changed (CafekbdKeyboardDrawing * drawing)
+{
+	pango_layout_context_changed (drawing->renderContext->layout);
+}
+
+static void
+cafekbd_keyboard_drawing_init (CafekbdKeyboardDrawing * drawing)
+{
+	gint opcode = 0, error = 0, major = 1, minor = 0;
+	gint mask;
+
+	drawing->display = CDK_DISPLAY_XDISPLAY(cdk_display_get_default());
+
+	printf ("dpy: %p\n", (void *) drawing->display);
+
+	if (!XkbQueryExtension
+	    (drawing->display, &opcode, &drawing->xkb_event_type, &error,
+	     &major, &minor))
+		g_critical
+		    ("XkbQueryExtension failed! Stuff probably won't work.");
+
+	printf ("evt/error/major/minor: %d/%d/%d/%d\n",
+		drawing->xkb_event_type, error, major, minor);
+
+	/* XXX: this stuff probably doesn't matter.. also, cdk_screen_get_default can fail */
+	if (ctk_widget_has_screen (CTK_WIDGET (drawing)))
+		drawing->screen_num =
+		    cdk_x11_screen_get_screen_number (ctk_widget_get_screen
+					   (CTK_WIDGET (drawing)));
+	else
+		drawing->screen_num =
+		    cdk_x11_screen_get_screen_number (cdk_screen_get_default ());
+
+	drawing->surface = NULL;
+	alloc_render_context (drawing);
+
+	drawing->keyboard_items = NULL;
+	drawing->colors = NULL;
+
+	drawing->track_modifiers = 0;
+	drawing->track_config = 0;
+
+	/* XXX: XkbClientMapMask | XkbIndicatorMapMask | XkbNamesMask | XkbGeometryMask */
+	drawing->xkb = XkbGetKeyboard (drawing->display,
+				       XkbGBN_GeometryMask |
+				       XkbGBN_KeyNamesMask |
+				       XkbGBN_OtherNamesMask |
+				       XkbGBN_SymbolsMask |
+				       XkbGBN_IndicatorMapMask,
+				       XkbUseCoreKbd);
+	if (drawing->xkb) {
+		XkbGetNames (drawing->display, XkbAllNamesMask, drawing->xkb);
+		XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+				       XkbIndicatorStateNotify,
+				       drawing->xkb->indicators->phys_indicators,
+				       drawing->xkb->indicators->phys_indicators);
+	}
+
+	drawing->l3mod = XkbKeysymToModifiers (drawing->display,
+					       CDK_KEY_ISO_Level3_Shift);
+
+	drawing->xkbOnDisplay = TRUE;
+
+	alloc_cdik (drawing);
+
+	mask =
+	    (XkbStateNotifyMask | XkbNamesNotifyMask |
+	     XkbControlsNotifyMask | XkbIndicatorMapNotifyMask |
+	     XkbNewKeyboardNotifyMask);
+	XkbSelectEvents (drawing->display, XkbUseCoreKbd, mask, mask);
+
+	mask = XkbGroupStateMask | XkbModifierStateMask;
+	XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+			       XkbStateNotify, mask, mask);
+
+	mask = (XkbGroupNamesMask | XkbIndicatorNamesMask);
+	XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+			       XkbNamesNotify, mask, mask);
+	init_keys_and_doodads (drawing);
+	init_colors (drawing);
+
+	/* required to get key events */
+	ctk_widget_set_can_focus (CTK_WIDGET (drawing), TRUE);
+
+	ctk_widget_set_events (CTK_WIDGET (drawing),
+			       CDK_EXPOSURE_MASK | CDK_KEY_PRESS_MASK |
+			       CDK_KEY_RELEASE_MASK | CDK_BUTTON_PRESS_MASK
+			       | CDK_FOCUS_CHANGE_MASK);
+	g_signal_connect (G_OBJECT (drawing), "draw",
+			  G_CALLBACK (draw), drawing);
+	g_signal_connect_after (G_OBJECT (drawing), "key-press-event",
+				G_CALLBACK (key_event), drawing);
+	g_signal_connect_after (G_OBJECT (drawing), "key-release-event",
+				G_CALLBACK (key_event), drawing);
+	g_signal_connect (G_OBJECT (drawing), "button-press-event",
+			  G_CALLBACK (button_press_event), drawing);<--- You might need to cast the function pointer here
+	g_signal_connect (G_OBJECT (drawing), "focus-out-event",
+			  G_CALLBACK (focus_event), drawing);
+	g_signal_connect (G_OBJECT (drawing), "focus-in-event",
+			  G_CALLBACK (focus_event), drawing);<--- You might need to cast the function pointer here
+	g_signal_connect (G_OBJECT (drawing), "size-allocate",
+			  G_CALLBACK (size_allocate), drawing);
+	g_signal_connect (G_OBJECT (drawing), "destroy",
+			  G_CALLBACK (destroy), drawing);
+	g_signal_connect (G_OBJECT (drawing), "style-set",
+			  G_CALLBACK (style_changed), drawing);
+
+	cdk_window_add_filter (NULL, (CdkFilterFunc)
+			       xkb_state_notify_event_filter, drawing);
+}
+
+CtkWidget *
+cafekbd_keyboard_drawing_new (void)
+{
+	return
+	    CTK_WIDGET (g_object_new
+			(cafekbd_keyboard_drawing_get_type (), NULL));
+}
+
+static void
+cafekbd_keyboard_drawing_class_init (CafekbdKeyboardDrawingClass * klass)
+{
+	CtkWidgetClass *widget_class = CTK_WIDGET_CLASS (klass);
+	ctk_widget_class_set_css_name (widget_class, "cafekbd-keyboard-drawing");
+
+	klass->bad_keycode = NULL;
+
+	cafekbd_keyboard_drawing_signals[BAD_KEYCODE] =
+	    g_signal_new ("bad-keycode", cafekbd_keyboard_drawing_get_type (),
+			  G_SIGNAL_RUN_FIRST,
+			  G_STRUCT_OFFSET (CafekbdKeyboardDrawingClass,
+					   bad_keycode), NULL, NULL,
+			  cafekbd_keyboard_drawing_VOID__UINT, G_TYPE_NONE, 1,
+			  G_TYPE_UINT);
+}
+
+GType
+cafekbd_keyboard_drawing_get_type (void)
+{
+	static GType cafekbd_keyboard_drawing_type = 0;
+
+	if (!cafekbd_keyboard_drawing_type) {
+		static const GTypeInfo cafekbd_keyboard_drawing_info = {
+			sizeof (CafekbdKeyboardDrawingClass),
+			NULL,	/* base_init */
+			NULL,	/* base_finalize */
+			(GClassInitFunc) cafekbd_keyboard_drawing_class_init,
+			NULL,	/* class_finalize */
+			NULL,	/* class_data */
+			sizeof (CafekbdKeyboardDrawing),
+			0,	/* n_preallocs */
+			(GInstanceInitFunc) cafekbd_keyboard_drawing_init,
+			NULL	/* *value_table */
+		};
+
+		cafekbd_keyboard_drawing_type =
+		    g_type_register_static (CTK_TYPE_DRAWING_AREA,
+					    "CafekbdKeyboardDrawing",
+					    &cafekbd_keyboard_drawing_info,
+					    0);
+	}
+
+	return cafekbd_keyboard_drawing_type;
+}
+
+void
+cafekbd_keyboard_drawing_set_mods (CafekbdKeyboardDrawing * drawing, guint mods)
+{
+#ifdef KBDRAW_DEBUG
+	printf ("set_mods: %d\n", mods);
+#endif
+	if (mods != drawing->mods) {
+		drawing->mods = mods;
+		ctk_widget_queue_draw (CTK_WIDGET (drawing));
+	}
+}
+
+/**
+ * cafekbd_keyboard_drawing_render:
+ * @kbdrawing: keyboard layout to render
+ * @cr:        Cairo context to render to
+ * @layout:    Pango layout to use to render text
+ * @x:         left coordinate (pixels) of region to render in
+ * @y:         top coordinate (pixels) of region to render in
+ * @width:     width (pixels) of region to render in
+ * @height:    height (pixels) of region to render in
+ *
+ * Renders a keyboard layout to a cairo_t context.  @cr and @layout can be got
+ * from e.g. a CtkWidget or a CtkPrintContext.  @cr and @layout may be modified
+ * by the function but will not be unreffed.
+ *
+ * Returns: %TRUE on success, %FALSE on failure
+ */
+gboolean
+cafekbd_keyboard_drawing_render (CafekbdKeyboardDrawing * kbdrawing,
+			      cairo_t * cr,
+			      PangoLayout * layout,
+			      double x, double y,
+			      double width, double height,
+			      double dpi_x, double dpi_y)
+{
+	CtkStyleContext *style_context =
+	    ctk_widget_get_style_context (CTK_WIDGET (kbdrawing));
+	CdkRGBA dark_color;
+	PangoFontDescription *fd = NULL;
+
+	ctk_style_context_get_background_color (style_context,
+	                                        ctk_style_context_get_state (style_context),
+	                                        &dark_color);
+	/* make dark background by making regular background darker */
+	dark_color.red *= 0.7;
+	dark_color.green *= 0.7;
+	dark_color.blue *= 0.7;
+
+	ctk_style_context_get (style_context,
+	                       ctk_style_context_get_state (style_context),
+	                       CTK_STYLE_PROPERTY_FONT, &fd, NULL);
+	fd = pango_font_description_copy (fd);
+
+	CafekbdKeyboardDrawingRenderContext context = {
+		cr,
+		kbdrawing->renderContext->angle,
+		layout,
+		pango_font_description_copy (fd),
+		1, 1,
+		dark_color
+	};
+
+	if (!context_setup_scaling (&context, kbdrawing, width, height,
+	                            dpi_x, dpi_y))
+		return FALSE;
+	cairo_translate (cr, x, y);
+
+	draw_keyboard_to_context (&context, kbdrawing);
+
+	pango_font_description_free (fd);
+
+	return TRUE;
+}
+
+/**
+ * cafekbd_keyboard_drawing_set_keyboard: (skip)
+ */
+gboolean
+cafekbd_keyboard_drawing_set_keyboard (CafekbdKeyboardDrawing * drawing,
+				    XkbComponentNamesRec * names)
+{
+	CtkAllocation allocation;
+
+	free_cdik (drawing);
+	if (drawing->xkb)
+		XkbFreeKeyboard (drawing->xkb, 0, TRUE);	/* free_all = TRUE */
+	drawing->xkb = NULL;
+
+	if (names) {
+		drawing->xkb =
+		    XkbGetKeyboardByName (drawing->display, XkbUseCoreKbd,
+					  names, 0,
+					  XkbGBN_GeometryMask |
+					  XkbGBN_KeyNamesMask |
+					  XkbGBN_OtherNamesMask |
+					  XkbGBN_ClientSymbolsMask |
+					  XkbGBN_IndicatorMapMask, FALSE);
+		drawing->xkbOnDisplay = FALSE;
+	} else {
+		drawing->xkb = XkbGetKeyboard (drawing->display,
+					       XkbGBN_GeometryMask |
+					       XkbGBN_KeyNamesMask |
+					       XkbGBN_OtherNamesMask |
+					       XkbGBN_SymbolsMask |
+					       XkbGBN_IndicatorMapMask,
+					       XkbUseCoreKbd);
+		XkbGetNames (drawing->display, XkbAllNamesMask,
+			     drawing->xkb);
+		drawing->xkbOnDisplay = TRUE;
+	}
+
+	if (drawing->xkb) {
+		XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+				       XkbIndicatorStateNotify,
+				       drawing->xkb->indicators->phys_indicators,
+				       drawing->xkb->indicators->phys_indicators);
+	}
+
+	alloc_cdik (drawing);
+
+	init_keys_and_doodads (drawing);
+	init_colors (drawing);
+
+	ctk_widget_get_allocation (CTK_WIDGET (drawing), &allocation);
+	size_allocate (CTK_WIDGET (drawing), &allocation, drawing);
+	ctk_widget_queue_draw (CTK_WIDGET (drawing));
+
+	return TRUE;
+}
+
+const gchar* cafekbd_keyboard_drawing_get_keycodes(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->keycodes <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->keycodes);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_geometry(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->geometry <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->geometry);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_symbols(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->symbols <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->symbols);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_types(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->types <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->types);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_compat(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->compat <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->compat);
+	}
+}
+
+void
+cafekbd_keyboard_drawing_set_track_modifiers (CafekbdKeyboardDrawing * drawing,
+					   gboolean enable)
+{
+	if (enable) {
+		XkbStateRec state;
+		drawing->track_modifiers = 1;
+		memset (&state, 0, sizeof (state));
+		XkbGetState (drawing->display, XkbUseCoreKbd, &state);
+		cafekbd_keyboard_drawing_set_mods (drawing,
+						state.compat_state);
+	} else
+		drawing->track_modifiers = 0;
+}
+
+void
+cafekbd_keyboard_drawing_set_track_config (CafekbdKeyboardDrawing * drawing,
+					gboolean enable)
+{
+	if (enable)
+		drawing->track_config = 1;
+	else
+		drawing->track_config = 0;
+}
+
+void
+cafekbd_keyboard_drawing_set_groups_levels (CafekbdKeyboardDrawing * drawing,
+					 CafekbdKeyboardDrawingGroupLevel *
+					 groupLevels[])
+{
+#ifdef KBDRAW_DEBUG
+	printf ("set_group_levels [topLeft]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT]->level);
+	printf ("set_group_levels [topRight]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPRIGHT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPRIGHT]->level);
+	printf ("set_group_levels [bottomLeft]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT]->level);
+	printf ("set_group_levels [bottomRight]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT]->level);
+#endif
+	drawing->groupLevels = groupLevels;
+
+	ctk_widget_queue_draw (CTK_WIDGET (drawing));
+}
+
+typedef struct {
+	CafekbdKeyboardDrawing *drawing;
+	const gchar *description;
+} XkbLayoutPreviewPrintData;
+
+static void
+cafekbd_keyboard_drawing_begin_print (CtkPrintOperation         *operation,
+				      CtkPrintContext           *context G_GNUC_UNUSED,
+				      XkbLayoutPreviewPrintData *data G_GNUC_UNUSED)
+{
+	/* We always print single-page documents */
+	CtkPrintSettings *settings =
+	    ctk_print_operation_get_print_settings (operation);
+	ctk_print_operation_set_n_pages (operation, 1);
+	if (!ctk_print_settings_has_key
+	    (settings, CTK_PRINT_SETTINGS_ORIENTATION))
+		ctk_print_settings_set_orientation (settings,
+						    CTK_PAGE_ORIENTATION_LANDSCAPE);
+}
+
+static void
+cafekbd_keyboard_drawing_draw_page (CtkPrintOperation         *operation,
+				    CtkPrintContext           *context,
+				    gint                       page_nr G_GNUC_UNUSED,
+				    XkbLayoutPreviewPrintData *data)
+{
+	cairo_t *cr = ctk_print_context_get_cairo_context (context);
+	PangoLayout *layout =
+	    ctk_print_context_create_pango_layout (context);
+	PangoFontDescription *desc =
+	    pango_font_description_from_string ("sans 8");
+	gdouble width = ctk_print_context_get_width (context);
+	gdouble height = ctk_print_context_get_height (context);
+	gdouble dpi_x = ctk_print_context_get_dpi_x (context);
+	gdouble dpi_y = ctk_print_context_get_dpi_y (context);
+	gchar *header;
+
+	ctk_print_operation_set_unit (operation, CTK_UNIT_PIXEL);
+
+	header = g_strdup_printf
+	    (_("Keyboard layout \"%s\"\n"
+	       "Copyright &#169; X.Org Foundation and "
+	       "XKeyboardConfig contributors\n"
+	       "For licensing see package metadata"), data->description);
+	pango_layout_set_markup (layout, header, -1);
+	pango_layout_set_font_description (layout, desc);
+	pango_font_description_free (desc);
+	pango_layout_set_width (layout, pango_units_from_double (width));
+	pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER);
+	cairo_set_source_rgb (cr, 0, 0, 0);
+	cairo_move_to (cr, 0, 0);
+	pango_cairo_show_layout (cr, layout);
+
+	cafekbd_keyboard_drawing_render (CAFEKBD_KEYBOARD_DRAWING
+				      (data->drawing), cr, layout, 0.0,
+				      0.0, width, height, dpi_x, dpi_y);
+
+	g_object_unref (layout);
+}
+
+void
+cafekbd_keyboard_drawing_print (CafekbdKeyboardDrawing * drawing,
+			     CtkWindow * parent_window,
+			     const gchar * description)
+{
+	CtkPrintOperation *print;
+	CtkPrintOperationResult res;
+	static CtkPrintSettings *settings = NULL;
+	XkbLayoutPreviewPrintData data = { drawing, description };
+
+	print = ctk_print_operation_new ();
+
+	if (settings != NULL)
+		ctk_print_operation_set_print_settings (print, settings);
+
+	g_signal_connect (print, "begin_print",
+			  G_CALLBACK (cafekbd_keyboard_drawing_begin_print),
+			  &data);
+	g_signal_connect (print, "draw_page",
+			  G_CALLBACK (cafekbd_keyboard_drawing_draw_page),
+			  &data);
+
+	res = ctk_print_operation_run (print,
+				       CTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
+				       parent_window, NULL);
+
+	if (res == CTK_PRINT_OPERATION_RESULT_APPLY) {
+		if (settings != NULL)
+			g_object_unref (settings);
+		settings = ctk_print_operation_get_print_settings (print);
+		g_object_ref (settings);
+	}
+
+	g_object_unref (print);
+}
+
+static void
+show_layout_response (CtkWidget * dialog, gint resp)
+{
+	CdkRectangle rect;
+	CtkWidget *kbdraw;
+	const gchar *groupName;
+
+	switch (resp) {
+	case CTK_RESPONSE_CLOSE:
+		ctk_window_get_position (CTK_WINDOW (dialog), &rect.x,
+					 &rect.y);
+		ctk_window_get_size (CTK_WINDOW (dialog), &rect.width,
+				     &rect.height);
+		cafekbd_preview_save_position (&rect);
+		ctk_widget_destroy (dialog);
+		break;
+	case CTK_RESPONSE_PRINT:
+		kbdraw =
+		    CTK_WIDGET (g_object_get_data
+				(G_OBJECT (dialog), "kbdraw"));
+		groupName =
+		    (const gchar *) g_object_get_data (G_OBJECT (dialog),
+						       "groupName");
+		cafekbd_keyboard_drawing_print (CAFEKBD_KEYBOARD_DRAWING
+					     (kbdraw), CTK_WINDOW (dialog),
+					     groupName ? groupName :
+					     _("Unknown"));
+	}
+}
+
+CtkWidget *
+cafekbd_keyboard_drawing_new_dialog (gint group, gchar * group_name)
+{
+	static CafekbdKeyboardDrawingGroupLevel groupsLevels[] = { {
+								 0, 1}, {
+									 0,
+									 3},
+	{
+	 0, 0}, {
+		 0, 2}
+	};
+	static CafekbdKeyboardDrawingGroupLevel *pGroupsLevels[] = {
+		groupsLevels, groupsLevels + 1, groupsLevels + 2,
+		groupsLevels + 3
+	};
+
+	CtkBuilder *builder;
+	CtkWidget *dialog, *kbdraw;
+	XkbComponentNamesRec component_names;
+	XklConfigRec *xkl_data;
+	CdkRectangle *rect;
+	GError *error = NULL;
+	char title[128] = "";
+	XklEngine* engine = xkl_engine_get_instance(CDK_DISPLAY_XDISPLAY(cdk_display_get_default()));
+
+	builder = ctk_builder_new ();
+	ctk_builder_add_from_resource (builder,
+	                               "/org/cafe/peripherals/keyboard/show-layout.ui",
+	                               &error);
+
+	if (error) {
+		g_error ("Could not load UI: %s", error->message);
+		g_clear_error (&error);
+	}
+
+
+	dialog =
+	    CTK_WIDGET (ctk_builder_get_object
+			(builder, "gswitchit_layout_view"));
+	kbdraw = cafekbd_keyboard_drawing_new ();
+	ctk_widget_set_vexpand (kbdraw, TRUE);
+
+	snprintf (title, sizeof (title), _("Keyboard Layout \"%s\""),
+		  group_name);
+	ctk_window_set_title (CTK_WINDOW (dialog), title);
+	g_object_set_data_full (G_OBJECT (dialog), "group_name",
+				g_strdup (group_name), g_free);
+
+	cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING
+						 (kbdraw), pGroupsLevels);
+
+	xkl_data = xkl_config_rec_new ();
+	if (xkl_config_rec_get_from_server (xkl_data, engine)) {
+		int num_layouts = g_strv_length (xkl_data->layouts);
+		int num_variants = g_strv_length (xkl_data->variants);
+		if (group >= 0 && group < num_layouts
+		    && group < num_variants) {
+			char *l = g_strdup (xkl_data->layouts[group]);
+			char *v = g_strdup (xkl_data->variants[group]);
+			char **p;
+			int i;
+
+			if ((p = xkl_data->layouts) != NULL)
+				for (i = num_layouts; --i >= 0;)
+					g_free (*p++);
+
+			if ((p = xkl_data->variants) != NULL)
+				for (i = num_variants; --i >= 0;)
+					g_free (*p++);
+
+			xkl_data->layouts =
+			    g_realloc (xkl_data->layouts,
+				       sizeof (char *) * 2);
+			xkl_data->variants =
+			    g_realloc (xkl_data->variants,
+				       sizeof (char *) * 2);
+			xkl_data->layouts[0] = l;
+			xkl_data->variants[0] = v;
+			xkl_data->layouts[1] = xkl_data->variants[1] =
+			    NULL;
+		}
+
+		if (xkl_xkb_config_native_prepare(engine, xkl_data, &component_names))
+		{
+			cafekbd_keyboard_drawing_set_keyboard
+			    (CAFEKBD_KEYBOARD_DRAWING (kbdraw),
+			     &component_names);
+			xkl_xkb_config_native_cleanup (engine,
+						       &component_names);
+		}
+	}
+
+	g_object_unref (G_OBJECT (xkl_data));
+
+	g_object_set_data (G_OBJECT (dialog), "builderData", builder);
+	g_signal_connect (G_OBJECT (dialog), "response", G_CALLBACK (show_layout_response), NULL);
+
+	rect = cafekbd_preview_load_position ();
+
+	if (rect != NULL)
+	{
+		ctk_window_move (CTK_WINDOW (dialog), rect->x, rect->y);
+		ctk_window_resize (CTK_WINDOW (dialog), rect->width, rect->height);
+		g_free (rect);
+	}
+	else
+	{
+		ctk_window_resize (CTK_WINDOW (dialog), 700, 400);
+	}
+
+	ctk_window_set_resizable (CTK_WINDOW (dialog), TRUE);
+
+	ctk_container_add (CTK_CONTAINER
+			   (ctk_builder_get_object
+			    (builder, "preview_vbox")), kbdraw);
+
+	g_object_set_data (G_OBJECT (dialog), "kbdraw", kbdraw);
+
+		g_signal_connect_swapped(dialog, "destroy", G_CALLBACK(g_object_unref),  g_object_get_data(G_OBJECT(dialog), "builderData"));
+
+	ctk_widget_show_all(dialog);
+
+	return dialog;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/5.html b/2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/5.html new file mode 100644 index 0000000..a0afe30 --- /dev/null +++ b/2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/5.html @@ -0,0 +1,1978 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+#include <config.h>
+
+#include <memory.h>
+
+#include <cairo.h>
+
+#include <cdk/cdkkeysyms.h>
+#include <cdk/cdkx.h>
+#include <glib/gi18n-lib.h>
+#include <glib/gprintf.h>
+
+#include <cafekbd-status.h>
+
+#include <cafekbd-desktop-config.h>
+#include <cafekbd-indicator-config.h>
+
+typedef struct _gki_globals {
+	XklEngine *engine;
+	XklConfigRegistry *registry;
+
+	CafekbdDesktopConfig cfg;
+	CafekbdIndicatorConfig ind_cfg;
+	CafekbdKeyboardConfig kbd_cfg;
+
+	const gchar *tooltips_format;
+	gchar **full_group_names;
+	gchar **short_group_names;
+
+	gint current_width;
+	gint current_height;
+	int real_width;
+
+	GSList *icons;		/* list of GdkPixbuf */
+	GSList *widget_instances;	/* list of CafekbdStatus */
+	gulong state_changed_handler;
+	gulong config_changed_handler;
+} gki_globals;
+
+static gchar *settings_signal_names[] = {
+	"notify::ctk-theme-name",
+	"notify::ctk-key-theme-name",
+	"notify::ctk-font-name",
+	"notify::font-options",
+};
+
+struct _CafekbdStatusPrivate {
+	gdouble angle;
+	gulong settings_signal_handlers[sizeof (settings_signal_names) /
+					sizeof (settings_signal_names[0])];
+};
+
+/* one instance for ALL widgets */
+static gki_globals globals;
+
+#define ForAllIndicators() \
+	{ \
+		GSList* cur; \
+		for (cur = globals.widget_instances; cur != NULL; cur = cur->next) { \
+			CafekbdStatus * gki = (CafekbdStatus*)cur->data;
+#define NextIndicator() \
+		} \
+	}
+
+G_DEFINE_TYPE (CafekbdStatus, cafekbd_status, CTK_TYPE_STATUS_ICON)<--- There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
+static void
+cafekbd_status_global_init (void);
+static void
+cafekbd_status_global_term (void);
+static GdkPixbuf *
+cafekbd_status_prepare_drawing (CafekbdStatus * gki, int group);
+static void
+cafekbd_status_set_current_page_for_group (CafekbdStatus * gki, int group);
+static void
+cafekbd_status_set_current_page (CafekbdStatus * gki);
+static void
+cafekbd_status_global_cleanup (CafekbdStatus * gki);
+static void
+cafekbd_status_global_fill (CafekbdStatus * gki);
+static void
+cafekbd_status_set_tooltips (CafekbdStatus * gki, const char *str);
+
+void
+cafekbd_status_set_tooltips (CafekbdStatus * gki, const char *str)
+{
+	g_assert (str == NULL || g_utf8_validate (str, -1, NULL));
+
+	ctk_status_icon_set_tooltip_text (CTK_STATUS_ICON (gki), str);
+}
+
+void
+cafekbd_status_global_cleanup (CafekbdStatus *gki G_GNUC_UNUSED)
+{
+	while (globals.icons) {
+		if (globals.icons->data)
+			g_object_unref (G_OBJECT (globals.icons->data));
+		globals.icons =
+		    g_slist_delete_link (globals.icons, globals.icons);
+	}
+}
+
+void
+cafekbd_status_global_fill (CafekbdStatus * gki)
+{
+	int grp;
+	int total_groups = xkl_engine_get_num_groups (globals.engine);
+
+	for (grp = 0; grp < total_groups; grp++) {
+		GdkPixbuf *page = cafekbd_status_prepare_drawing (gki, grp);
+		globals.icons = g_slist_append (globals.icons, page);
+	}
+}
+
+static void
+cafekbd_status_activate (CafekbdStatus *gki G_GNUC_UNUSED)
+{
+	xkl_debug (150, "Mouse button pressed on applet\n");
+	cafekbd_desktop_config_lock_next_group (&globals.cfg);
+}
+
+/* hackish xref */
+extern gchar *cafekbd_indicator_extract_layout_name (int group,
+						  XklEngine * engine,
+						  CafekbdKeyboardConfig *
+						  kbd_cfg,
+						  gchar **
+						  short_group_names,
+						  gchar **
+						  full_group_names);
+
+extern gchar *cafekbd_indicator_create_label_title (int group,
+						 GHashTable **
+						 ln2cnt_map,
+						 gchar * layout_name);
+
+static void
+cafekbd_status_render_cairo (cairo_t * cr, int group)
+{
+	double r, g, b;
+	PangoFontDescription *pfd;
+	PangoContext *pcc;
+	PangoLayout *pl;
+	int lwidth, lheight;
+	gchar *layout_name, *lbl_title;
+	double screen_res;
+	cairo_font_options_t *fo;
+	static GHashTable *ln2cnt_map = NULL;
+
+	xkl_debug (160, "Rendering cairo for group %d\n", group);
+	if (globals.ind_cfg.background_color != NULL &&
+	    globals.ind_cfg.background_color[0] != 0) {
+		if (sscanf
+		    (globals.ind_cfg.background_color, "%lg %lg %lg", &r,
+		     &g, &b) == 3) {
+			cairo_set_source_rgb (cr, r, g, b);
+			cairo_rectangle (cr, 0, 0, globals.current_width,
+					 globals.current_height);
+			cairo_fill (cr);
+		}
+	}
+
+	if (globals.ind_cfg.foreground_color != NULL &&
+	    globals.ind_cfg.foreground_color[0] != 0) {
+		if (sscanf
+		    (globals.ind_cfg.foreground_color, "%lg %lg %lg", &r,
+		     &g, &b) == 3) {
+			cairo_set_source_rgb (cr, r, g, b);
+		}
+	}
+
+	pcc = pango_cairo_create_context (cr);
+
+	screen_res = cdk_screen_get_resolution (cdk_screen_get_default ());
+	if (screen_res > 0)
+		pango_cairo_context_set_resolution (pcc, screen_res);
+
+	fo = cairo_font_options_copy (cdk_screen_get_font_options
+				      (cdk_screen_get_default ()));
+	/* SUBPIXEL antialiasing gives bad results on in-memory images */
+	if (cairo_font_options_get_antialias (fo) ==
+	    CAIRO_ANTIALIAS_SUBPIXEL)
+		cairo_font_options_set_antialias (fo,
+						  CAIRO_ANTIALIAS_GRAY);
+	pango_cairo_context_set_font_options (pcc, fo);
+
+	pl = pango_layout_new (pcc);
+
+	layout_name = cafekbd_indicator_extract_layout_name (group,
+							  globals.engine,
+							  &globals.kbd_cfg,
+							  globals.short_group_names,
+							  globals.full_group_names);
+	lbl_title =
+	    cafekbd_indicator_create_label_title (group, &ln2cnt_map,
+					       layout_name);
+
+	if (group + 1 == xkl_engine_get_num_groups (globals.engine)) {
+		g_hash_table_destroy (ln2cnt_map);
+		ln2cnt_map = NULL;
+	}
+
+	pango_layout_set_text (pl, lbl_title, -1);
+
+	g_free (lbl_title);
+
+	pfd = pango_font_description_from_string (globals.ind_cfg.font_family);
+
+	pango_layout_set_font_description (pl, pfd);
+	pango_layout_get_size (pl, &lwidth, &lheight);
+
+	cairo_move_to (cr,
+		       (globals.current_width - lwidth / PANGO_SCALE) / 2,
+		       (globals.current_height -
+			lheight / PANGO_SCALE) / 2);
+
+	pango_cairo_show_layout (cr, pl);
+
+	pango_font_description_free (pfd);
+	g_object_unref (pl);
+	g_object_unref (pcc);
+	cairo_font_options_destroy (fo);
+	cairo_destroy (cr);
+
+	globals.real_width = (lwidth / PANGO_SCALE) + 4;
+	if (globals.real_width > globals.current_width)
+		globals.real_width = globals.current_width;
+	if (globals.real_width < globals.current_height)
+		globals.real_width = globals.current_height;
+}
+
+static inline guint8
+convert_color_channel (guint8 src, guint8 alpha)
+{
+	return alpha ? ((((guint) src) << 8) - src) / alpha : 0;
+}
+
+static void
+convert_bgra_to_rgba (guint8 const *src, guint8 * dst, int width,
+		      int height, int new_width)
+{
+	int xoffset = width - new_width;
+
+	/* *4 */
+	int ptr_step = xoffset << 2;
+
+	int x, y;
+
+	/* / 2 * 4 */
+	src = src + ((xoffset >> 1) << 2);
+
+	for (y = height; --y >= 0; src += ptr_step) {
+		for (x = new_width; --x >= 0;) {
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+			dst[0] = convert_color_channel (src[2], src[3]);
+			dst[1] = convert_color_channel (src[1], src[3]);
+			dst[2] = convert_color_channel (src[0], src[3]);
+			dst[3] = src[3];
+#else
+			dst[0] = convert_color_channel (src[1], src[0]);
+			dst[1] = convert_color_channel (src[2], src[0]);
+			dst[2] = convert_color_channel (src[3], src[0]);
+			dst[3] = src[0];
+#endif
+			dst += 4;
+			src += 4;
+		}
+	}
+}
+
+static GdkPixbuf *
+cafekbd_status_prepare_drawing (CafekbdStatus *gki G_GNUC_UNUSED,
+				int            group)
+{
+	GError *gerror = NULL;
+	char *image_filename;
+	GdkPixbuf *image;
+
+	if (globals.current_width == 0)
+		return NULL;
+
+	if (globals.ind_cfg.show_flags) {
+
+		image_filename =
+		    (char *) g_slist_nth_data (globals.
+					       ind_cfg.image_filenames,
+					       group);
+
+		image = gdk_pixbuf_new_from_file_at_size (image_filename,
+							  globals.current_width,
+							  globals.current_height,
+							  &gerror);
+
+		if (image == NULL) {
+			CtkWidget *dialog = ctk_message_dialog_new (NULL,
+								    CTK_DIALOG_DESTROY_WITH_PARENT,
+								    CTK_MESSAGE_ERROR,
+								    CTK_BUTTONS_OK,
+								    _
+								    ("There was an error loading an image: %s"),
+								    gerror
+								    ==
+								    NULL ?
+								    "Unknown"
+								    :
+								    gerror->message);
+			g_signal_connect (G_OBJECT (dialog), "response",
+					  G_CALLBACK (ctk_widget_destroy),
+					  NULL);
+
+			ctk_window_set_resizable (CTK_WINDOW (dialog),
+						  FALSE);
+
+			ctk_widget_show (dialog);
+			g_error_free (gerror);
+
+			return NULL;
+		}
+		xkl_debug (150,
+			   "Image %d[%s] loaded -> %p[%dx%d], alpha: %d\n",
+			   group, image_filename, image,
+			   gdk_pixbuf_get_width (image),
+			   gdk_pixbuf_get_height (image),
+			   gdk_pixbuf_get_has_alpha (image));
+
+		return image;
+	} else {
+		cairo_surface_t *cs =
+		    cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
+						globals.current_width,
+						globals.current_height);
+		unsigned char *cairo_data;
+		guchar *pixbuf_data;
+		cafekbd_status_render_cairo (cairo_create (cs), group);
+		cairo_data = cairo_image_surface_get_data (cs);
+#if 0
+		char pngfilename[20];
+		g_sprintf (pngfilename, "label%d.png", group);
+		cairo_surface_write_to_png (cs, pngfilename);
+#endif
+		pixbuf_data =
+		    g_new0 (guchar,
+			    4 * globals.real_width *
+			    globals.current_height);
+		convert_bgra_to_rgba (cairo_data, pixbuf_data,
+				      globals.current_width,
+				      globals.current_height,
+				      globals.real_width);
+
+		cairo_surface_destroy (cs);
+
+		image = gdk_pixbuf_new_from_data (pixbuf_data,
+						  GDK_COLORSPACE_RGB,
+						  TRUE,
+						  8,
+						  globals.real_width,
+						  globals.current_height,
+						  globals.real_width *
+						  4,
+						  (GdkPixbufDestroyNotify)
+						  g_free, NULL);
+		xkl_debug (150,
+			   "Image %d created -> %p[%dx%d], alpha: %d\n",
+			   group, image, gdk_pixbuf_get_width (image),
+			   gdk_pixbuf_get_height (image),
+			   gdk_pixbuf_get_has_alpha (image));
+
+		return image;
+	}
+	return NULL;
+}
+
+static void
+cafekbd_status_update_tooltips (CafekbdStatus * gki)
+{
+	XklState *state = xkl_engine_get_current_state (globals.engine);
+	gchar *buf;
+	if (state == NULL || state->group < 0
+	    || state->group >= g_strv_length (globals.full_group_names))
+		return;
+
+	buf = g_strdup_printf (globals.tooltips_format,
+			       globals.full_group_names[state->group]);
+
+	cafekbd_status_set_tooltips (gki, buf);
+	g_free (buf);
+}
+
+void
+cafekbd_status_reinit_ui (CafekbdStatus * gki)
+{
+	cafekbd_status_global_cleanup (gki);
+	cafekbd_status_global_fill (gki);
+
+	cafekbd_status_set_current_page (gki);
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+			    gchar     *key G_GNUC_UNUSED,
+			    gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "General configuration changed in settings - reiniting...\n");
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+	ForAllIndicators () {
+		cafekbd_status_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_ind_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+				gchar     *key G_GNUC_UNUSED,
+				gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "Applet configuration changed in settings - reiniting...\n");
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+
+	cafekbd_indicator_config_free_image_filenames (&globals.ind_cfg);
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	ForAllIndicators () {
+		cafekbd_status_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+static void
+cafekbd_status_load_group_names (const gchar ** layout_ids,
+			      const gchar ** variant_ids)
+{
+	if (!cafekbd_desktop_config_load_group_descriptions
+	    (&globals.cfg, globals.registry, layout_ids, variant_ids,
+	     &globals.short_group_names, &globals.full_group_names)) {
+		/* We just populate no short names (remain NULL) -
+		 * full names are going to be used anyway */
+		gint i, total_groups =
+		    xkl_engine_get_num_groups (globals.engine);
+		xkl_debug (150, "group descriptions loaded: %d!\n",
+			   total_groups);
+		globals.full_group_names =
+		    g_new0 (char *, total_groups + 1);
+
+		if (xkl_engine_get_features (globals.engine) &
+		    XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
+			gchar **lst = globals.kbd_cfg.layouts_variants;
+			for (i = 0; *lst; lst++, i++) {
+				globals.full_group_names[i] =
+				    g_strdup ((char *) *lst);
+			}
+		} else {
+			for (i = total_groups; --i >= 0;) {
+				globals.full_group_names[i] =
+				    g_strdup_printf ("Group %d", i);
+			}
+		}
+	}
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_kbd_cfg_callback (CafekbdStatus *gki G_GNUC_UNUSED)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+	xkl_debug (100,
+		   "XKB configuration changed on X Server - reiniting...\n");
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+
+	cafekbd_indicator_config_free_image_filenames (&globals.ind_cfg);
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	g_strfreev (globals.full_group_names);
+	globals.full_group_names = NULL;
+
+	if (globals.short_group_names != NULL) {
+		g_strfreev (globals.short_group_names);
+		globals.short_group_names = NULL;
+	}
+
+	cafekbd_status_load_group_names ((const gchar **) xklrec->layouts,
+				      (const gchar **) xklrec->variants);
+
+	ForAllIndicators () {
+		cafekbd_status_reinit_ui (gki);
+	} NextIndicator ();
+	g_object_unref (G_OBJECT (xklrec));
+}
+
+/* Should be called once for all applets */
+static void
+cafekbd_status_state_callback (XklEngine           *engine G_GNUC_UNUSED,
+			       XklEngineStateChange changeType,
+			       gint                 group,
+			       gboolean             restore)
+{
+	xkl_debug (150, "group is now %d, restore: %d\n", group, restore);
+
+	if (changeType == GROUP_CHANGED) {
+		ForAllIndicators () {
+			xkl_debug (200, "do repaint\n");
+			cafekbd_status_set_current_page_for_group (gki,
+								group);
+		}
+		NextIndicator ();
+	}
+}
+
+
+void
+cafekbd_status_set_current_page (CafekbdStatus * gki)
+{
+	XklState *cur_state;
+	cur_state = xkl_engine_get_current_state (globals.engine);
+	if (cur_state->group >= 0)
+		cafekbd_status_set_current_page_for_group (gki,
+							cur_state->group);
+}
+
+void
+cafekbd_status_set_current_page_for_group (CafekbdStatus * gki, int group)
+{
+	xkl_debug (200, "Revalidating for group %d\n", group);
+
+	ctk_status_icon_set_from_pixbuf (CTK_STATUS_ICON (gki),
+					 GDK_PIXBUF (g_slist_nth_data
+						     (globals.icons,
+						      group)));
+
+	cafekbd_status_update_tooltips (gki);
+}
+
+/* Should be called once for all widgets */
+static CdkFilterReturn
+cafekbd_status_filter_x_evt (CdkXEvent *xev,
+			     CdkEvent  *event G_GNUC_UNUSED)
+{
+	XEvent *xevent = (XEvent *) xev;
+
+	xkl_engine_filter_events (globals.engine, xevent);
+	switch (xevent->type) {
+	case ReparentNotify:
+		{
+			XReparentEvent *rne = (XReparentEvent *) xev;
+
+			ForAllIndicators () {
+				guint32 xid =
+				    ctk_status_icon_get_x11_window_id
+				    (CTK_STATUS_ICON (gki));
+
+				/* compare the indicator's parent window with the even window */
+				if (xid == rne->window) {
+					/* if so - make it transparent... */
+					xkl_engine_set_window_transparent
+					    (globals.engine, rne->window,
+					     TRUE);
+				}
+			}
+		NextIndicator ()}
+		break;
+	}
+	return CDK_FILTER_CONTINUE;
+}
+
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_start_listen (void)
+{
+	cdk_window_add_filter (NULL, (CdkFilterFunc)
+			       cafekbd_status_filter_x_evt, NULL);
+	cdk_window_add_filter (cdk_get_default_root_window (),
+			       (CdkFilterFunc) cafekbd_status_filter_x_evt,
+			       NULL);
+
+	xkl_engine_start_listen (globals.engine,
+				 XKLL_TRACK_KEYBOARD_STATE);
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_stop_listen (void)
+{
+	xkl_engine_stop_listen (globals.engine, XKLL_TRACK_KEYBOARD_STATE);
+
+	cdk_window_remove_filter (NULL, (CdkFilterFunc)
+				  cafekbd_status_filter_x_evt, NULL);
+	cdk_window_remove_filter
+	    (cdk_get_default_root_window (),
+	     (CdkFilterFunc) cafekbd_status_filter_x_evt, NULL);
+}
+
+static void
+cafekbd_status_size_changed (CafekbdStatus * gki, gint size)
+{
+	if (globals.current_height != size) {
+		globals.current_height = size;
+		globals.current_width = size * 3 / 2;
+		cafekbd_status_reinit_ui (gki);
+	}
+}
+
+static void
+cafekbd_status_theme_changed (CtkSettings   *settings G_GNUC_UNUSED,
+			      GParamSpec    *pspec G_GNUC_UNUSED,
+			      CafekbdStatus *gki)
+{
+	cafekbd_indicator_config_refresh_style (&globals.ind_cfg);
+	cafekbd_status_reinit_ui (gki);
+}
+
+static void
+cafekbd_status_init (CafekbdStatus * gki)
+{
+	int i;
+
+	if (!g_slist_length (globals.widget_instances))
+		cafekbd_status_global_init ();
+
+	gki->priv = g_new0 (CafekbdStatusPrivate, 1);
+
+	/* This should give NA a hint about the order */
+	/* commenting out fixes a Cdk-critical warning */
+/*	ctk_status_icon_set_name (CTK_STATUS_ICON (gki), "keyboard"); */
+
+	xkl_debug (100, "Initiating the widget startup process for %p\n",
+		   gki);
+
+	if (globals.engine == NULL) {
+		cafekbd_status_set_tooltips (gki,
+					  _("XKB initialization error"));
+		return;
+	}
+
+	cafekbd_status_set_tooltips (gki, NULL);
+
+	cafekbd_status_global_fill (gki);
+	cafekbd_status_set_current_page (gki);
+
+	/* append AFTER all initialization work is finished */
+	globals.widget_instances =
+	    g_slist_append (globals.widget_instances, gki);
+
+	g_signal_connect (gki, "size-changed",
+			  G_CALLBACK (cafekbd_status_size_changed), NULL);
+	g_signal_connect (gki, "activate",
+			  G_CALLBACK (cafekbd_status_activate), NULL);
+
+	for (i = sizeof (settings_signal_names) /
+	     sizeof (settings_signal_names[0]); --i >= 0;)
+		gki->priv->settings_signal_handlers[i] =
+		    g_signal_connect_after (ctk_settings_get_default (),
+					    settings_signal_names[i],
+					    G_CALLBACK
+					    (cafekbd_status_theme_changed),
+					    gki);
+}
+
+static void
+cafekbd_status_finalize (GObject * obj)
+{
+	int i;
+	CafekbdStatus *gki = CAFEKBD_STATUS (obj);
+	xkl_debug (100,
+		   "Starting the cafe-kbd-status widget shutdown process for %p\n",
+		   gki);
+
+	for (i = sizeof (settings_signal_names) /
+	     sizeof (settings_signal_names[0]); --i >= 0;)
+		g_signal_handler_disconnect (ctk_settings_get_default (),
+					     gki->
+					     priv->settings_signal_handlers
+					     [i]);
+
+	/* remove BEFORE all termination work is finished */
+	globals.widget_instances =
+	    g_slist_remove (globals.widget_instances, gki);
+
+	cafekbd_status_global_cleanup (gki);
+
+	xkl_debug (100,
+		   "The instance of cafe-kbd-status successfully finalized\n");
+
+	g_free (gki->priv);
+
+	G_OBJECT_CLASS (cafekbd_status_parent_class)->finalize (obj);
+
+	if (!g_slist_length (globals.widget_instances))
+		cafekbd_status_global_term ();
+}
+
+static void
+cafekbd_status_global_term (void)
+{
+	xkl_debug (100, "*** Last  CafekbdStatus instance *** \n");
+	cafekbd_status_stop_listen ();
+
+	cafekbd_desktop_config_stop_listen (&globals.cfg);
+	cafekbd_indicator_config_stop_listen (&globals.ind_cfg);
+
+	cafekbd_indicator_config_term (&globals.ind_cfg);
+	cafekbd_keyboard_config_term (&globals.kbd_cfg);
+	cafekbd_desktop_config_term (&globals.cfg);
+
+	if (g_signal_handler_is_connected
+	    (globals.engine, globals.state_changed_handler)) {
+		g_signal_handler_disconnect (globals.engine,
+					     globals.state_changed_handler);
+		globals.state_changed_handler = 0;
+	}
+	if (g_signal_handler_is_connected
+	    (globals.engine, globals.config_changed_handler)) {
+		g_signal_handler_disconnect (globals.engine,
+					     globals.config_changed_handler);
+		globals.config_changed_handler = 0;
+	}
+
+	g_object_unref (G_OBJECT (globals.registry));
+	globals.registry = NULL;
+	g_object_unref (G_OBJECT (globals.engine));
+	globals.engine = NULL;
+	xkl_debug (100, "*** Terminated globals *** \n");
+}
+
+static void
+cafekbd_status_class_init (CafekbdStatusClass * klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+	xkl_debug (100, "*** First CafekbdStatus instance *** \n");
+
+	memset (&globals, 0, sizeof (globals));
+
+	/* Initing some global vars */
+	globals.tooltips_format = "%s";
+
+	/* Initing vtable */
+	object_class->finalize = cafekbd_status_finalize;
+
+	/* Signals */
+}
+
+static void
+cafekbd_status_global_init (void)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+
+	globals.engine = xkl_engine_get_instance(CDK_DISPLAY_XDISPLAY(cdk_display_get_default()));
+
+	if (globals.engine == NULL) {
+		xkl_debug (0, "Libxklavier initialization error");
+		return;
+	}
+
+	globals.state_changed_handler =
+	    g_signal_connect (globals.engine, "X-state-changed",
+			      G_CALLBACK (cafekbd_status_state_callback),
+			      NULL);
+	globals.config_changed_handler =
+	    g_signal_connect (globals.engine, "X-config-changed",
+			      G_CALLBACK (cafekbd_status_kbd_cfg_callback),
+			      NULL);
+
+	cafekbd_desktop_config_init (&globals.cfg, globals.engine);
+	cafekbd_keyboard_config_init (&globals.kbd_cfg, globals.engine);
+	cafekbd_indicator_config_init (&globals.ind_cfg, globals.engine);
+
+	cafekbd_desktop_config_start_listen (&globals.cfg,
+					  (GCallback)
+					  cafekbd_status_cfg_changed, NULL);
+	cafekbd_indicator_config_start_listen (&globals.ind_cfg,
+					    (GCallback)
+					    cafekbd_status_ind_cfg_changed,
+					    NULL);
+
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+
+	globals.registry =
+	    xkl_config_registry_get_instance (globals.engine);
+	xkl_config_registry_load (globals.registry,
+				  globals.cfg.load_extra_items);
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	cafekbd_status_load_group_names ((const gchar **) xklrec->layouts,
+				      (const gchar **) xklrec->variants);
+	g_object_unref (G_OBJECT (xklrec));
+
+	cafekbd_status_start_listen ();
+
+	xkl_debug (100, "*** Inited globals *** \n");
+}
+
+CtkStatusIcon *
+cafekbd_status_new (void)
+{
+	return
+	    CTK_STATUS_ICON (g_object_new (cafekbd_status_get_type (), NULL));
+}
+
+/**
+ * cafekbd_status_get_xkl_engine:
+ *
+ * Returns: (transfer none): The engine shared by all CafekbdStatus objects
+ */
+XklEngine *
+cafekbd_status_get_xkl_engine ()
+{
+	return globals.engine;
+}
+
+/**
+ * cafekbd_status_get_group_names:
+ *
+ * Returns: (transfer none) (array zero-terminated=1): List of group names
+ */
+gchar **
+cafekbd_status_get_group_names ()
+{
+	return globals.full_group_names;
+}
+
+gchar *
+cafekbd_status_get_image_filename (guint group)
+{
+	if (!globals.ind_cfg.show_flags)
+		return NULL;
+	return cafekbd_indicator_config_get_images_file (&globals.ind_cfg,
+						      &globals.kbd_cfg,
+						      group);
+}
+
+void
+cafekbd_status_set_angle (CafekbdStatus * gki, gdouble angle)
+{
+	gki->priv->angle = angle;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/6.html b/2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/6.html new file mode 100644 index 0000000..5ed6ace --- /dev/null +++ b/2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/6.html @@ -0,0 +1,806 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctk/ctk.h>
+#include <stdlib.h>
+#include <string.h>
+#include <glib.h>
+#include "libcafekbd/cafekbd-keyboard-drawing.h"
+
+
+static gchar *groups = NULL;
+static gchar *levels = NULL;
+static gchar *symbols = NULL;
+static gchar *keycodes = NULL;
+static gchar *geometry = NULL;
+
+static gboolean track_config = FALSE;
+static gboolean track_modifiers = FALSE;
+static gboolean program_version = FALSE;
+
+static const GOptionEntry options[] = {
+	{"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
+	 "Keyboard groups to display, from 1-4. Up to four groups only may be "
+	 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
+	 "group1[,group2[,group3[,group4]]]"},
+	{"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
+	 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
+	 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
+	 "level1[,level2[,level3[,level4]]]"},
+	{"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
+	 "Symbols component of the keyboard. If you omit this option, it is "
+	 "obtained from the X server; that is, the keyboard that is currently "
+	 "configured is drawn. Examples: --symbols=us or "
+	 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL},
+	{"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
+	 "Keycodes component of the keyboard. If you omit this option, it is "
+	 "obtained from the X server; that is, the keyboard that is currently"
+	 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
+	 NULL},
+	{"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
+	 "Geometry xkb component. If you omit this option, it is obtained from the"
+	 " X server; that is, the keyboard that is currently configured is drawn. "
+	 "Example: --geometry=kinesis", NULL},
+	{"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
+	 "Track the current modifiers", NULL},
+	{"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
+	 "Track the server XKB configuration", NULL},
+	{"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
+	 "Show current version", NULL},
+	{NULL},
+};
+
+static gboolean
+set_groups (gchar * groups_option,
+	    CafekbdKeyboardDrawingGroupLevel * groupLevels)
+{
+	CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
+	gint cntr, g;
+
+	groupLevels[0].group =
+	    groupLevels[1].group =
+	    groupLevels[2].group = groupLevels[3].group = -1;
+
+	if (groups_option == NULL)
+		return TRUE;
+
+	for (cntr = 4; --cntr >= 0;) {
+		if (*groups_option == '\0')
+			return FALSE;
+
+		g = *groups_option - '1';
+		if (g < 0 || g >= 4)
+			return FALSE;
+
+		pgl->group = g;
+		/* printf ("group %d\n", pgl->group); */
+
+		groups_option++;
+		if (*groups_option == '\0')
+			return TRUE;
+		if (*groups_option != ',')
+			return FALSE;
+
+		groups_option++;
+		pgl++;
+	}
+
+	return TRUE;
+}
+
+static gboolean
+set_levels (gchar * levels_option,
+	    CafekbdKeyboardDrawingGroupLevel * groupLevels)
+{
+	CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
+	gint cntr, l;
+	gchar *p;
+
+	groupLevels[0].level =
+	    groupLevels[1].level =
+	    groupLevels[2].level = groupLevels[3].level = -1;
+
+	if (levels_option == NULL)
+		return TRUE;
+
+	for (cntr = 4; --cntr >= 0;) {
+		if (*levels_option == '\0')
+			return FALSE;
+
+		l = (gint) strtol (levels_option, &p, 10) - 1;
+		if (l < 0 || l >= 64)
+			return FALSE;
+
+		pgl->level = l;
+		/* printf ("level %d\n", pgl->level); */
+
+		levels_option = p;
+		if (*levels_option == '\0')
+			return TRUE;
+		if (*levels_option != ',')
+			return FALSE;
+
+		levels_option++;
+		pgl++;
+	}
+
+	return TRUE;
+}
+
+static void
+bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED,
+	     guint                   keycode)
+{
+	g_warning
+	    ("got keycode %u, which is not on your keyboard according to your configuration",
+	     keycode);
+}
+
+gint
+main (gint argc, gchar ** argv)
+{
+	CtkWidget *window;
+	CtkWidget *cafekbd_keyboard_drawing;
+	CdkScreen *screen;
+	CdkMonitor *monitor;
+	CdkRectangle rect;
+	GOptionContext *context;
+	GError *error = NULL;
+
+	CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
+	    { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
+	CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
+	    { &groupLevels[0], &groupLevels[1], &groupLevels[2],
+		&groupLevels[3]
+	};
+
+	context = g_option_context_new ("kbdraw");
+	g_option_context_add_main_entries (context, options, NULL);
+	if (!g_option_context_parse (context, &argc, &argv, &error)) {
+		g_message ("option parsing failed: %s", error->message);
+		g_option_context_free (context);
+		exit (EXIT_FAILURE);
+	}
+	g_option_context_free (context);
+
+	if (program_version) {
+		g_print ("kbdraw %s\n", VERSION);
+		exit (0);
+	}
+
+	ctk_init (&argc, &argv);
+
+	if (!set_groups (groups, groupLevels)) {
+		g_printerr ("--groups: invalid argument\n");
+		exit (1);
+	}
+
+	if (!set_levels (levels, groupLevels)) {
+		g_printerr ("--levels: invalid argument\n");
+		exit (1);
+	}
+
+	window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
+	g_signal_connect (G_OBJECT (window), "destroy",
+			  G_CALLBACK (ctk_main_quit), NULL);
+
+	screen = ctk_window_get_screen (CTK_WINDOW (window));
+	monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
+	cdk_monitor_get_geometry (monitor, &rect);
+	ctk_window_set_default_size (CTK_WINDOW (window),
+				     rect.width * 4 / 5,
+				     rect.height * 1 / 2);
+
+	ctk_widget_show (window);
+
+	cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
+	ctk_widget_show (cafekbd_keyboard_drawing);
+	ctk_container_add (CTK_CONTAINER (window), cafekbd_keyboard_drawing);
+
+	cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING
+						 (cafekbd_keyboard_drawing),
+						 pgroupLevels);
+
+	if (track_modifiers)
+		cafekbd_keyboard_drawing_set_track_modifiers
+		    (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing), TRUE);
+	if (track_config)
+		cafekbd_keyboard_drawing_set_track_config
+		    (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing), TRUE);
+	g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",
+			  G_CALLBACK (bad_keycode), NULL);
+
+	if (symbols || geometry || keycodes) {
+		XkbComponentNamesRec names;
+		gint success;
+
+		memset (&names, '\0', sizeof (names));
+
+		if (symbols)
+			names.symbols = symbols;
+		else
+			names.symbols = (gchar *)
+			    cafekbd_keyboard_drawing_get_symbols
+			    (CAFEKBD_KEYBOARD_DRAWING
+			     (cafekbd_keyboard_drawing));
+
+		if (keycodes)
+			names.keycodes = keycodes;
+		else
+			names.keycodes = (gchar *)
+			    cafekbd_keyboard_drawing_get_keycodes
+			    (CAFEKBD_KEYBOARD_DRAWING
+			     (cafekbd_keyboard_drawing));
+
+		if (geometry)
+			names.geometry = geometry;
+		else
+			names.geometry = (gchar *)
+			    cafekbd_keyboard_drawing_get_geometry
+			    (CAFEKBD_KEYBOARD_DRAWING
+			     (cafekbd_keyboard_drawing));
+
+		success =
+		    cafekbd_keyboard_drawing_set_keyboard
+		    (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing),
+		     &names);
+		if (!success) {
+			g_printerr
+			    ("\nError loading new keyboard description with components:\n\n"
+			     "  keycodes:  %s\n" "  types:     %s\n"
+			     "  compat:    %s\n" "  symbols:   %s\n"
+			     "  geometry:  %s\n\n", names.keycodes,
+			     names.types, names.compat, names.symbols,
+			     names.geometry);
+			exit (1);
+		}
+	}
+
+	ctk_widget_grab_focus (cafekbd_keyboard_drawing);
+
+	ctk_main ();
+
+	return 0;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/7.html b/2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/7.html new file mode 100644 index 0000000..8122587 --- /dev/null +++ b/2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/7.html @@ -0,0 +1,358 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+
+#include "libxklavier/xklavier.h"
+#include "libcafekbd/cafekbd-status.h"
+
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include <cdk/cdk.h>
+#include <cdk/cdkx.h>
+#include <glib/gi18n.h>
+#include <ctk/ctk.h>
+
+#include "X11/XKBlib.h"
+
+int
+main (int argc, char **argv)
+{
+	CtkStatusIcon *icon;<--- Variable 'icon' can be declared as pointer to const
+
+	bindtextdomain (GETTEXT_PACKAGE, CAFELOCALEDIR);
+	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+	textdomain (GETTEXT_PACKAGE);
+
+	ctk_init (&argc, &argv);
+
+	icon = cafekbd_status_new ();
+
+        if (icon == NULL)
+	{
+		return 1;
+	}
+
+	ctk_main ();
+
+	return 0;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/commitmsg b/2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/commitmsg new file mode 100644 index 0000000..0d05158 --- /dev/null +++ b/2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/commitmsg @@ -0,0 +1 @@ +cafekbd-indicator: Fix [-Wstrict-prototypes] warnings diff --git a/2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/index.html b/2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/index.html new file mode 100644 index 0000000..1040930 --- /dev/null +++ b/2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/index.html @@ -0,0 +1,242 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LineIdCWESeverityMessage
checkersReportinformationActive checkers: There was critical errors (use --checkers-report=<filename> to see details)
libcafekbd/cafekbd-desktop-config.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
libcafekbd/cafekbd-indicator-config.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
libcafekbd/cafekbd-indicator.c
66unknownMacroerrorThere is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
libcafekbd/cafekbd-keyboard-config.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
67knownConditionTrueFalse571styleCondition '*l1' is always true
67knownConditionTrueFalse571styleCondition '*l2' is always true
226constVariablePointer398styleVariable 'delim' can be declared as pointer to const
227knownConditionTrueFalse571styleCondition 'option!=NULL' is always true
282knownConditionTrueFalse570styleCondition 'variant==NULL' is always false
609constParameterPointer398styleParameter 'kbd_config' can be declared as pointer to const
libcafekbd/cafekbd-keyboard-drawing.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
61constParameterPointer398styleParameter 'context' can be declared as pointer to const
67constParameterPointer398styleParameter 'context' can be declared as pointer to const
625constParameterPointer398styleParameter 'context' can be declared as pointer to const
1026constVariablePointer398styleVariable 'runp' can be declared as pointer to const
1036constVariablePointer398styleVariable 'geometry' can be declared as pointer to const
1202constParameterPointer398styleParameter 'outline' can be declared as pointer to const
1397constVariablePointer398styleVariable 'shape' can be declared as pointer to const
1786constParameterCallback398styleParameter 'drawing' can be declared as pointer to const. However it seems that 'button_press_event' is a callback function, if 'drawing' is declared with const you might also need to cast function pointer(s).
1823constParameterCallback398styleParameter 'event' can be declared as pointer to const. However it seems that 'focus_event' is a callback function, if 'event' is declared with const you might also need to cast function pointer(s).
1838constParameterCallback398styleParameter 'a' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'a' is declared with const you might also need to cast function pointer(s).
1839constParameterCallback398styleParameter 'b' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'b' is declared with const you might also need to cast function pointer(s).
1863constVariablePointer398styleVariable 'pind' can be declared as pointer to const
2124constParameterPointer398styleParameter 'iev' can be declared as pointer to const
libcafekbd/cafekbd-status.c
82unknownMacroerrorThere is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
test/cafekbd-keyboard-drawing-test.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
test/cafekbd-status-test.c
42constVariablePointer398styleVariable 'icon' can be declared as pointer to const
+
+ +
+ + diff --git a/2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/output_b1965751dcd5a6db17ae755139e63f860425ebf2 b/2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/output_b1965751dcd5a6db17ae755139e63f860425ebf2 new file mode 100644 index 0000000..c093f26 --- /dev/null +++ b/2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/output_b1965751dcd5a6db17ae755139e63f860425ebf2 @@ -0,0 +1,1864 @@ +Checking libcafekbd/cafekbd-desktop-config.c ... +libcafekbd/cafekbd-desktop-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +1/10 files checked 4% done +Checking libcafekbd/cafekbd-indicator-config.c ... +libcafekbd/cafekbd-indicator-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +2/10 files checked 10% done +Checking libcafekbd/cafekbd-indicator.c ... +libcafekbd/cafekbd-indicator.c:66:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdIndicator, cafekbd_indicator, CTK_TYPE_NOTEBOOK) +^ +3/10 files checked 24% done +Checking libcafekbd/cafekbd-keyboard-config.c ... +libcafekbd/cafekbd-keyboard-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-config.c:67:8: style: Condition '*l1' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:67:15: style: Condition '*l2' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:227:16: style: Condition 'option!=NULL' is always true [knownConditionTrueFalse] + (option != NULL) ? strchr (option, ':') : NULL; + ^ +libcafekbd/cafekbd-keyboard-config.c:282:18: style: Condition 'variant==NULL' is always false [knownConditionTrueFalse] + (variant == + ^ +libcafekbd/cafekbd-keyboard-config.c:226:10: style: Variable 'delim' can be declared as pointer to const [constVariablePointer] + char *delim = + ^ +libcafekbd/cafekbd-keyboard-config.c:609:65: style: Parameter 'kbd_config' can be declared as pointer to const [constParameterPointer] +cafekbd_keyboard_config_options_is_set (CafekbdKeyboardConfig * kbd_config, + ^ +4/10 files checked 36% done +Checking libcafekbd/cafekbd-keyboard-drawing.c ... +libcafekbd/cafekbd-keyboard-drawing.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-drawing.c:61:60: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_coord (CafekbdKeyboardDrawingRenderContext * context, gint n) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:67:61: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_double (CafekbdKeyboardDrawingRenderContext * context, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:625:51: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +set_markup (CafekbdKeyboardDrawingRenderContext * context, gchar *txt) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1026:11: style: Variable 'runp' can be declared as pointer to const [constVariablePointer] + GSList *runp; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1036:25: style: Variable 'geometry' can be declared as pointer to const [constVariablePointer] + PangoGlyphGeometry *geometry; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1202:39: style: Parameter 'outline' can be declared as pointer to const [constParameterPointer] +calc_origin_offset_x (XkbOutlineRec * outline) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1397:15: style: Variable 'shape' can be declared as pointer to const [constVariablePointer] + XkbShapeRec *shape; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: style: Parameter 'drawing' can be declared as pointer to const. However it seems that 'button_press_event' is a callback function, if 'drawing' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2343:18: note: You might need to cast the function pointer here + G_CALLBACK (button_press_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: note: Parameter 'drawing' can be declared as pointer to const + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: style: Parameter 'event' can be declared as pointer to const. However it seems that 'focus_event' is a callback function, if 'event' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2347:18: note: You might need to cast the function pointer here + G_CALLBACK (focus_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: note: Parameter 'event' can be declared as pointer to const + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: style: Parameter 'a' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'a' is declared with const you might also need to cast function pointer(s). [constParameterCallback] +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: note: Parameter 'a' can be declared as pointer to const +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: style: Parameter 'b' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'b' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: note: Parameter 'b' can be declared as pointer to const + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1863:9: style: Variable 'pind' can be declared as pointer to const [constVariablePointer] + Atom *pind = drawing->xkb->names->indicators; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2124:60: style: Parameter 'iev' can be declared as pointer to const [constParameterPointer] +process_indicators_state_notify (XkbIndicatorNotifyEvent * iev, + ^ +Checking libcafekbd/cafekbd-keyboard-drawing.c: KBDRAW_DEBUG... +5/10 files checked 77% done +Checking libcafekbd/cafekbd-status.c ... +libcafekbd/cafekbd-status.c:82:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdStatus, cafekbd_status, CTK_TYPE_STATUS_ICON) +^ +6/10 files checked 91% done +Checking libcafekbd/cafekbd-util.c ... +7/10 files checked 93% done +Checking test/cafekbd-indicator-test.c ... +8/10 files checked 94% done +Checking test/cafekbd-keyboard-drawing-test.c ... +test/cafekbd-keyboard-drawing-test.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +Checking test/cafekbd-keyboard-drawing-test.c: HAVE_CONFIG_H... +9/10 files checked 99% done +Checking test/cafekbd-status-test.c ... +test/cafekbd-status-test.c:42:17: style: Variable 'icon' can be declared as pointer to const [constVariablePointer] + CtkStatusIcon *icon; + ^ +10/10 files checked 100% done +nofile:0:0: information: Active checkers: There was critical errors (use --checkers-report= to see details) [checkersReport] + +/usr/bin/cafe-autogen +checking for autoreconf >= 2.53... + testing autoreconf... found 2.72 +checking for pkg-config >= 0.14.0... + testing pkg-config... found 1.8.1 +checking for cafe-common >= 0.0.1... + testing cafe-doc-common... found 2.0.0 +Checking for required M4 macros... +Checking for forbidden M4 macros... +Processing ./configure.ac +Running cafe-doc-common... +Running autoreconf... +autoreconf: export WARNINGS=no-portability +autoreconf: Entering directory '.' +autoreconf: running: autopoint --force +Copying file ABOUT-NLS +Copying file config.rpath +Copying file m4/codeset.m4 +Copying file m4/extern-inline.m4 +Copying file m4/fcntl-o.m4 +Copying file m4/gettext.m4 +Copying file m4/glibc2.m4 +Copying file m4/glibc21.m4 +Copying file m4/iconv.m4 +Copying file m4/intdiv0.m4 +Copying file m4/intl.m4 +Copying file m4/intldir.m4 +Copying file m4/intlmacosx.m4 +Copying file m4/intmax.m4 +Copying file m4/inttypes-pri.m4 +Copying file m4/inttypes_h.m4 +Copying file m4/lcmessage.m4 +Copying file m4/lib-ld.m4 +Copying file m4/lib-link.m4 +Copying file m4/lib-prefix.m4 +Copying file m4/lock.m4 +Copying file m4/longlong.m4 +Copying file m4/nls.m4 +Copying file m4/po.m4 +Copying file m4/printf-posix.m4 +Copying file m4/progtest.m4 +Copying file m4/size_max.m4 +Copying file m4/stdint_h.m4 +Copying file m4/threadlib.m4 +Copying file m4/uintmax_t.m4 +Copying file m4/visibility.m4 +Copying file m4/wchar_t.m4 +Copying file m4/wint_t.m4 +Copying file m4/xsize.m4 +Copying file po/Makefile.in.in +Copying file po/Makevars.template +Copying file po/Rules-quot +Copying file po/boldquot.sed +Copying file po/en@boldquot.header +Copying file po/en@quot.header +Copying file po/insert-header.sin +Copying file po/quot.sed +Copying file po/remove-potcdate.sin +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: configure.ac: tracing +autoreconf: running: libtoolize --copy --force +libtoolize: putting auxiliary files in '.'. +libtoolize: copying file './ltmain.sh' +libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. +libtoolize: copying file 'm4/libtool.m4' +libtoolize: copying file 'm4/ltoptions.m4' +libtoolize: copying file 'm4/ltsugar.m4' +libtoolize: copying file 'm4/ltversion.m4' +libtoolize: copying file 'm4/lt~obsolete.m4' +autoreconf: configure.ac: not using Intltool +autoreconf: configure.ac: not using Gtkdoc +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: running: /usr/bin/autoconf --force +autoreconf: running: /usr/bin/autoheader --force +autoreconf: running: automake --add-missing --copy --force-missing +configure.ac:31: installing './compile' +configure.ac:34: installing './config.guess' +configure.ac:34: installing './config.sub' +configure.ac:16: installing './install-sh' +configure.ac:16: installing './missing' +Makefile.am: installing './INSTALL' +libcafekbd/Makefile.am: installing './depcomp' +autoreconf: Leaving directory '.' +Skipping configure process. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +checking for a BSD-compatible install... /usr/bin/install -c +checking whether build environment is sane... yes +checking for a race-free mkdir -p... /usr/bin/mkdir -p +checking for gawk... no +checking for mawk... mawk +checking whether make sets $(MAKE)... yes +checking whether make supports nested variables... yes +checking whether make supports nested variables... (cached) yes +checking whether make supports the include directive... yes (GNU style) +checking for gcc... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the C compiler works... yes +checking for C compiler default output file name... a.out +checking for suffix of executables... +checking whether we are cross compiling... no +checking for suffix of object files... o +checking whether the compiler supports GNU C... yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... rm: cannot remove 'conftest.plist': Is a directory +yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... gcc3 +checking whether C compiler accepts -Werror=unknown-warning-option... no +checking whether C compiler accepts -Wall... yes +checking whether C compiler accepts -Wmissing-prototypes... yes +checking whether C compiler accepts -Wbad-function-cast... yes +checking whether C compiler accepts -Wcast-align... yes +checking whether C compiler accepts -Wextra... yes +checking whether C compiler accepts -Wformat-nonliteral... yes +checking whether C compiler accepts -Wmissing-declarations... yes +checking whether C compiler accepts -Wnested-externs... yes +checking whether C compiler accepts -Wpointer-arith... yes +checking whether C compiler accepts -Wredundant-decls... yes +checking whether C compiler accepts -Wshadow... yes +checking whether C compiler accepts -Wstrict-prototypes... yes +checking whether C compiler accepts -Wunused-macros... yes +checking whether C compiler accepts -Werror=format-security... yes +checking whether C compiler accepts -fstrict-aliasing... yes +checking flags to pass to the C compiler /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing +checking for gcc... (cached) /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the compiler supports GNU C... (cached) yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... (cached) yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... (cached) none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... (cached) yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... (cached) gcc3 +checking build system type... x86_64-pc-linux-gnu +checking host system type... x86_64-pc-linux-gnu +checking how to print strings... printf +checking for a sed that does not truncate output... /usr/bin/sed +checking for grep that handles long lines and -e... /usr/bin/grep +checking for egrep... /usr/bin/grep -E +checking for fgrep... /usr/bin/grep -F +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld +checking if the linker (/usr/bin/ld) is GNU ld... yes +checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B +checking the name lister (/usr/bin/nm -B) interface... rm: cannot remove 'conftest.plist': Is a directory +BSD nm +checking whether ln -s works... yes +checking the maximum length of command line arguments... 3145728 +checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop +checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop +checking for /usr/bin/ld option to reload object files... -r +checking for file... file +checking for objdump... objdump +checking how to recognize dependent libraries... pass_all +checking for dlltool... no +checking how to associate runtime and link libraries... printf %s\n +checking for ranlib... ranlib +checking for ar... ar +checking for archiver @FILE support... rm: cannot remove 'conftest.plist': Is a directory +@ +checking for strip... strip +checking command to parse /usr/bin/nm -B output from /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer object... rm: cannot remove 'conftest.plist': Is a directory +ok +checking for sysroot... no +checking for a working dd... /usr/bin/dd +checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1 +checking for mt... no +checking if : is a manifest tool... no +checking for stdio.h... yes +checking for stdlib.h... yes +checking for string.h... yes +checking for inttypes.h... yes +checking for stdint.h... yes +checking for strings.h... yes +checking for sys/stat.h... yes +checking for sys/types.h... yes +checking for unistd.h... yes +checking for dlfcn.h... yes +checking for objdir... .libs +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -fno-rtti -fno-exceptions... no +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to produce PIC... -fPIC -DPIC +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer PIC flag -fPIC -DPIC works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer static flag -static works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... (cached) yes +checking whether the /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes +checking whether -lc should be explicitly linked in... no +checking dynamic linker characteristics... GNU/Linux ld.so +checking how to hardcode library paths into programs... immediate +checking whether stripping libraries is possible... yes +checking if libtool supports shared libraries... yes +checking whether to build shared libraries... yes +checking whether to build static libraries... yes +checking whether NLS is requested... yes +checking for msgfmt... /usr/bin/msgfmt +checking for gmsgfmt... /usr/bin/msgfmt +checking for xgettext... /usr/bin/xgettext +checking for msgmerge... /usr/bin/msgmerge +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld -m elf_x86_64 +checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes +checking for shared library run path origin... done +checking how to run the C preprocessor... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer -E +checking for egrep -e... (cached) /usr/bin/grep -E +checking for CFPreferencesCopyAppValue... no +checking for CFLocaleCopyCurrent... no +checking for GNU gettext in libc... yes +checking whether to use NLS... yes +checking where the gettext function comes from... libc +checking for glib-compile-resources... /usr/bin/glib-compile-resources +checking for xmllint... /usr/bin/xmllint +checking for setlocale... yes +checking for pkg-config... /usr/bin/pkg-config +checking pkg-config is at least version 0.9.0... yes +checking for glib-2.0 >= 2.50.0... yes +checking for gmodule-2.0... yes +checking for gio-2.0 >= 2.25.0... yes +checking for cdk-3.0 >= 3.22.0... yes +checking for ctk+-3.0 >= 3.22.0 cdk-x11-3.0 >= 3.22.0... yes +checking for libxklavier >= 5.2... yes +checking for X... libraries , headers +checking for gethostbyname... yes +checking for connect... yes +checking for remove... yes +checking for shmat... yes +checking for IceConnectionNumber in -lICE... yes +checking for pkg-config... (cached) /usr/bin/pkg-config +checking pkg-config is at least version 0.16... yes +checking for library containing sqrt... -lm +checking for gobject-introspection... yes +checking that generated files are newer than configure... done +configure: creating ./config.status +config.status: creating Makefile +config.status: creating libcafekbd.pc +config.status: creating libcafekbdui.pc +config.status: creating po/Makefile.in +config.status: creating libcafekbd/Makefile +config.status: creating libcafekbd/org.cafe.peripherals-keyboard-xkb.gschema.xml +config.status: creating test/Makefile +config.status: creating config.h +config.status: executing depfiles commands +config.status: executing libtool commands +config.status: executing po-directories commands +config.status: creating po/POTFILES +config.status: creating po/Makefile + +Configuration: + + prefix: /usr + exec_prefix: ${prefix} + libdir: ${exec_prefix}/lib + bindir: ${exec_prefix}/bin + sbindir: ${exec_prefix}/sbin + sysconfdir: ${prefix}/etc + datadir: ${datarootdir} + source code location: . + compiler: /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer + cflags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + Warning flags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + +scan-build: Analysis run complete. +scan-build: Removing directory '/tmp/scan-build-2025-02-06-114717-11799-1' because it contains no reports. +scan-build: No bugs found. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +make all-recursive +make[1]: Entering directory '/rootdir' +Making all in po +make[2]: Entering directory '/rootdir/po' +make libcafekbd.pot-update +make[3]: Entering directory '/rootdir/po' +sed -e '/^#/d' remove-potcdate.sin > t-remove-potcdate.sed +mv t-remove-potcdate.sed remove-potcdate.sed +package_gnu=""; \ +test -n "$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L .. -maxdepth 1 -type f \ + -size -10000000c -exec grep 'GNU libcafekbd' \ + /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU libcafekbd' ../* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ +}; \ +if test "$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ +else \ + package_prefix=''; \ +fi; \ +if test -n '' || test 'https://github.com/cafe-desktop/libcafekbd' = '@'PACKAGE_BUGREPORT'@'; then \ + msgid_bugs_address=''; \ +else \ + msgid_bugs_address='https://github.com/cafe-desktop/libcafekbd'; \ +fi; \ +case `/usr/bin/xgettext --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ + *) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --package-name="${package_prefix}libcafekbd" \ + --package-version='1.25.0' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ +esac +test ! -f libcafekbd.po || { \ + if test -f ./libcafekbd.pot-header; then \ + sed -e '1,/^#$/d' < libcafekbd.po > libcafekbd.1po && \ + cat ./libcafekbd.pot-header libcafekbd.1po > libcafekbd.po; \ + rm -f libcafekbd.1po; \ + fi; \ + if test -f ./libcafekbd.pot; then \ + sed -f remove-potcdate.sed < ./libcafekbd.pot > libcafekbd.1po && \ + sed -f remove-potcdate.sed < libcafekbd.po > libcafekbd.2po && \ + if cmp libcafekbd.1po libcafekbd.2po >/dev/null 2>&1; then \ + rm -f libcafekbd.1po libcafekbd.2po libcafekbd.po; \ + else \ + rm -f libcafekbd.1po libcafekbd.2po ./libcafekbd.pot && \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ + else \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ +} +make[3]: Leaving directory '/rootdir/po' +test ! -f ./libcafekbd.pot || \ + test -z "af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo" || make af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo +make[3]: Entering directory '/rootdir/po' +/usr/bin/msgmerge --update --quiet --lang=am am.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ar ar.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=af af.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=an an.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=as as.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ast ast.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=az az.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn bn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=be be.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bg bg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn_IN bn_IN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bs bs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=br br.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca ca.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca@valencia ca@valencia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cmn cmn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=crh crh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cs cs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=csb csb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cv cv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cy cy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=da da.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de de.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de_CH de_CH.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=dz dz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_AU en_AU.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=el el.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_CA en_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_GB en_GB.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es es.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eo eo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_419 es_419.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_AR es_AR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CL es_CL.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CO es_CO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CR es_CR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_DO es_DO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_EC es_EC.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_ES es_ES.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_MX es_MX.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_NI es_NI.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PA es_PA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PE es_PE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PR es_PR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_SV es_SV.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_US es_US.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_UY es_UY.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_VE es_VE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=et et.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eu eu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fa fa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fi fi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fil fil.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fo fo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr fr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=frp frp.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr_CA fr_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fy fy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fur fur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ga ga.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gd gd.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gl gl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gu gu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ha ha.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=he he.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hi hi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hr hr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hu hu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hy hy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=id id.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ia ia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ie ie.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ig ig.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=is is.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ja ja.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=it it.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=jv jv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ka ka.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kab kab.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kk kk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=km km.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kn kn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ko ko.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ks ks.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku ku.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku_IQ ku_IQ.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ky ky.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=la la.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lb lb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=li li.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lo lo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lt lt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lv lv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mai mai.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mi mi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mg mg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mk mk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ml ml.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mn mn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mr mr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ms ms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=my my.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nah nah.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nb nb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nds nds.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ne ne.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nl nl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nn nn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nqo nqo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nso nso.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=oc oc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=om om.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=or or.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pa pa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pl pl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pms pms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ps ps.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt_BR pt_BR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt pt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ro ro.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ru ru.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=rw rw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sc sc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=si si.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sco sco.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sk sk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sl sl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=so so.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sq sq.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr sr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr@latin sr@latin.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sv sv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sw sw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ta ta.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=te te.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tg tg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=th th.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tl tl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tk tk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tr tr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ts ts.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tt tt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ug ug.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uk uk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur ur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur_PK ur_PK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=vi vi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uz uz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=wa wa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=xh xh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yo yo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_CN zh_CN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yi yi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_HK zh_HK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_TW zh_TW.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zu zu.po libcafekbd.pot +rm -f af.gmo && /usr/bin/msgfmt -c --statistics --verbose -o af.gmo af.po +rm -f am.gmo && /usr/bin/msgfmt -c --statistics --verbose -o am.gmo am.po +rm -f an.gmo && /usr/bin/msgfmt -c --statistics --verbose -o an.gmo an.po +rm -f ar.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ar.gmo ar.po +af.po: am.po: 54 translated messages7 translated messages, 84 untranslated messages. +, 37 untranslated messages. +ar.po: 50 translated messages, 41 untranslated messages. +an.po:7: warning: header field 'Last-Translator' still has the initial default value +an.po: 0 translated messages, 91 untranslated messages. +rm -f as.gmo && /usr/bin/msgfmt -c --statistics --verbose -o as.gmo as.po +rm -f ast.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ast.gmo ast.po +rm -f bg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bg.gmo bg.po +rm -f az.gmo && /usr/bin/msgfmt -c --statistics --verbose -o az.gmo az.po +rm -f be.gmo && /usr/bin/msgfmt -c --statistics --verbose -o be.gmo be.po +as.po: 41 translated messages, 50 untranslated messages. +az.po: 9 translated messages, 82 untranslated messages. +bg.po: 54 translated messages, 37 untranslated messages. +be.po: 46 translated messages, 45 untranslated messages. +ast.po: 47 translated messages, 44 untranslated messages. +rm -f bn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn.gmo bn.po +rm -f br.gmo && /usr/bin/msgfmt -c --statistics --verbose -o br.gmo br.po +rm -f bn_IN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn_IN.gmo bn_IN.po +rm -f bs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bs.gmo bs.po +rm -f ca.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca.gmo ca.po +bn_IN.po: 41 translated messages, 50 untranslated messages. +br.po: 20 translated messages, 71 untranslated messages. +ca.po: 87 translated messages, 4 untranslated messages. +rm -f ca@valencia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca@valencia.gmo ca@valencia.po +rm -f cmn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cmn.gmo cmn.po +bn.po: 43 translated messages, 48 untranslated messages. +bs.po: 25 translated messages, 66 untranslated messages. +rm -f crh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o crh.gmo crh.po +rm -f cs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cs.gmo cs.po +cmn.po: 46 translated messages, 45 untranslated messages. +ca@valencia.po: 54 translated messages, 37 untranslated messages. +rm -f csb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o csb.gmo csb.po +crh.po: 11 translated messages, 80 untranslated messages. +rm -f cy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cy.gmo cy.po +cs.po: 81 translated messages, 10 untranslated messages. +csb.po:7: warning: rm -f cv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cv.gmo cv.po +header field 'Last-Translator' still has the initial default value +csb.po: 0 translated messages, 91 untranslated messages. +rm -f da.gmo && /usr/bin/msgfmt -c --statistics --verbose -o da.gmo da.po +rm -f de.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de.gmo de.po +cy.po: 26 translated messages, 65 untranslated messages. +cv.po: 0 translated messages, 91 untranslated messages. +rm -f de_CH.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de_CH.gmo de_CH.po +rm -f dz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o dz.gmo dz.po +da.po: 91 translated messages. +de.po: 76 translated messages, 15 untranslated messages. +rm -f el.gmo && /usr/bin/msgfmt -c --statistics --verbose -o el.gmo el.po +dz.po: rm -f en_AU.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_AU.gmo en_AU.po +39 translated messages, 52 untranslated messages. +el.po: 54 translated messages, 37 untranslated messages. +de_CH.po: 0 translated messages, 91 untranslated messages. +rm -f en_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_CA.gmo en_CA.po +rm -f en_GB.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_GB.gmo en_GB.po +rm -f eo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eo.gmo eo.po +en_AU.po: 54 translated messages, 37 untranslated messages. +rm -f es.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es.gmo es.po +en_CA.po: 10 translated messages, 81 untranslated messages. +en_GB.po: 54 translated messages, 37 untranslated messages. +rm -f es_419.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_419.gmo es_419.po +es.po: 89 translated messages, 2 untranslated messages. +eo.po: 52 translated messages, 39 untranslated messages. +rm -f es_AR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_AR.gmo es_AR.po +rm -f es_CL.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CL.gmo es_CL.po +rm -f es_CO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CO.gmo es_CO.po +rm -f es_CR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CR.gmo es_CR.po +es_419.po: 0 translated messages, 91 untranslated messages. +es_AR.po: 21 translated messages, 70 untranslated messageses_CL.po: 3 translated messages, 88 untranslated messages. +. +es_CR.po: 1 translated message, 90 untranslated messages. +es_CO.po: 49 translated messages, 42 untranslated messages. +rm -f es_EC.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_EC.gmo es_EC.po +rm -f es_DO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_DO.gmo es_DO.po +rm -f es_ES.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_ES.gmo es_ES.po +rm -f es_MX.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_MX.gmo es_MX.po +es_EC.po: 1 translated message, 90 untranslated messages. +rm -f es_NI.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_NI.gmo es_NI.po +es_DO.po: 1 translated message, 90 untranslated messages. +es_ES.po: 1 translated message, 90 untranslated messages. +es_MX.po: 1 translated message, 90 untranslated messagesrm -f es_PA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PA.gmo es_PA.po +. +rm -f es_PE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PE.gmo es_PE.po +es_NI.po: 1 translated message, 90 untranslated messages. +rm -f es_PR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PR.gmo es_PR.po +rm -f es_SV.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_SV.gmo es_SV.po +es_PE.po: 1 translated message, 90 untranslated messages. +rm -f es_US.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_US.gmo es_US.po +es_PA.po: 1 translated message, 90 untranslated messages. +es_PR.po: 1 translated message, 90 untranslated messages. +es_US.po: 0 translated messages, 91 untranslated messageses_SV.po: 1 translated message, 90 untranslated messages. +. +rm -f es_UY.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_UY.gmo es_UY.po +rm -f et.gmo && /usr/bin/msgfmt -c --statistics --verbose -o et.gmo et.po +rm -f eu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eu.gmo eu.po +rm -f es_VE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_VE.gmo es_VE.po +rm -f fa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fa.gmo fa.po +es_UY.po: 1 translated message, 90 untranslated messages. +et.po: rm -f fi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fi.gmo fi.po +54 translated messages, 37 untranslated messages. +fa.po: 11 translated messages, 80 untranslated messages. +eu.po: 54 translated messages, 37 untranslated messages. +es_VE.po: 1 translated message, 90 untranslated messages. +rm -f fil.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fil.gmo fil.po +fi.po: 48 translated messages, 43 untranslated messages. +rm -f fo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fo.gmo fo.po +rm -f fr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr.gmo fr.po +rm -f fr_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr_CA.gmo fr_CA.po +fil.po: 0 translated messages, 91 untranslated messages. +rm -f frp.gmo && /usr/bin/msgfmt -c --statistics --verbose -o frp.gmo frp.po +fo.po: 0 translated messages, 91 untranslated messages. +fr.po: 67 translated messages, 24 untranslated messages. +frp.po: 7 translated messages, 84 untranslated messages. +rm -f fur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fur.gmo fur.po +rm -f fy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fy.gmo fy.po +fr_CA.po: 3 translated messages, 88 untranslated messages. +rm -f ga.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ga.gmo ga.po +rm -f gd.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gd.gmo gd.po +fur.po: fy.po: 4 translated messages, 87 untranslated messages. +4 translated messages, 87 untranslated messages. +rm -f gl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gl.gmo gl.po +ga.po: 41 translated messages, 50 untranslated messages. +rm -f gu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gu.gmo gu.po +gd.po: 0 translated messages, 91 untranslated messages. +rm -f ha.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ha.gmo ha.po +gl.po: 89 translated messages, 2 untranslated messages. +gu.po: 43 translated messages, 48 untranslated messages. +rm -f he.gmo && /usr/bin/msgfmt -c --statistics --verbose -o he.gmo he.po +ha.po: 5 translated messages, 86 untranslated messages. +rm -f hi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hi.gmo hi.po +he.po: 54 translated messages, 37 untranslated messages. +rm -f hr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hr.gmo hr.po +rm -f hu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hu.gmo hu.po +rm -f hy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hy.gmo hy.po +hi.po: 45 translated messages, 46 untranslated messages. +hr.po: 54 translated messageshu.po: rm -f ia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ia.gmo ia.po +54 translated messages, 37 untranslated messages. +, 37 untranslated messages. +hy.po: 54 translated messages, 37 untranslated messages. +rm -f id.gmo && /usr/bin/msgfmt -c --statistics --verbose -o id.gmo id.po +ia.po: 3 translated messages, 88 untranslated messages. +rm -f ie.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ie.gmo ie.po +rm -f is.gmo && /usr/bin/msgfmt -c --statistics --verbose -o is.gmo is.po +rm -f ig.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ig.gmo ig.po +id.po: 91 translated messages. +rm -f it.gmo && /usr/bin/msgfmt -c --statistics --verbose -o it.gmo it.po +ie.po: 45 translated messages, 46 untranslated messages. +ig.po: 5 translated messages, 86 untranslated messages. +is.po: 12 translated messages, 79 untranslated messages. +rm -f jv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o jv.gmo jv.po +rm -f ja.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ja.gmo ja.po +it.po: 91 translated messages. +rm -f ka.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ka.gmo ka.po +jv.po: 2 translated messages, 89 untranslated messages. +rm -f kab.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kab.gmo kab.po +rm -f kk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kk.gmo kk.po +ja.po: 54 translated messages, 37 untranslated messages. +rm -f km.gmo && /usr/bin/msgfmt -c --statistics --verbose -o km.gmo km.po +ka.po: 37 translated messages, 54 untranslated messages. +kab.po: 4 translated messages, 87 untranslated messages. +kk.po: 24 translated messages, 67 untranslated messages. +rm -f kn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kn.gmo kn.po +km.po:7: warning: header field 'Last-Translator' still has the initial default value +km.po: 0 translated messages, 91 untranslated messages. +rm -f ko.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ko.gmo ko.po +rm -f ks.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ks.gmo ks.po +rm -f ku_IQ.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku_IQ.gmo ku_IQ.po +rm -f ku.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku.gmo ku.po +kn.po: ko.po: 54 translated messages, 37 untranslated messages. +43 translated messages, 48 untranslated messages. +ku_IQ.po: 16 translated messages, 75 untranslated messages. +ks.po: 3 translated messages, 88 untranslated messages. +ku.po: 10 translated messages, 81 untranslated messages. +rm -f ky.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ky.gmo ky.po +rm -f li.gmo && /usr/bin/msgfmt -c --statistics --verbose -o li.gmo li.po +rm -f lb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lb.gmo lb.po +rm -f la.gmo && /usr/bin/msgfmt -c --statistics --verbose -o la.gmo la.po +rm -f lo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lo.gmo lo.po +ky.po: 26 translated messages, 65 untranslated messages. +li.po:7: warning: header field 'Last-Translator' still has the initial default value +li.po: 0 translated messages, 91 untranslated messages. +la.po: 2 translated messages, 89 untranslated messages. +lb.po:7: warning: header field 'Last-Translator' still has the initial default value +lb.po: 0 translated messages, 91 untranslated messages. +lo.po:7: warning: header field 'Last-Translator' still has the initial default value +lo.po: 0 translated messages, 91 untranslated messages. +rm -f lt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lt.gmo lt.po +rm -f mai.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mai.gmo mai.po +rm -f lv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lv.gmo lv.po +rm -f mg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mg.gmo mg.po +lt.po: 91 translated messages. +rm -f mi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mi.gmo mi.po +lv.po: mg.po: 10 translated messages, 81 untranslated messages. +49 translated messages, 42 untranslated messages. +mai.po: 18 translated messages, 73 untranslated messages. +rm -f mk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mk.gmo mk.po +rm -f ml.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ml.gmo ml.po +rm -f mn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mn.gmo mn.po +mi.po:7: warning: header field 'Last-Translator' still has the initial default value +mi.po: 0 translated messages, 91 untranslated messages. +rm -f mr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mr.gmo mr.po +mk.po: 39 translated messages, 52 untranslated messages. +ml.po: 41 translated messages, 50 untranslated messages. +mn.po: 10 translated messages, 81 untranslated messages. +rm -f ms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ms.gmo ms.po +mr.po: 47 translated messages, 44 untranslated messages. +rm -f my.gmo && /usr/bin/msgfmt -c --statistics --verbose -o my.gmo my.po +rm -f nah.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nah.gmo nah.po +rm -f nb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nb.gmo nb.po +ms.po: 91 translated messages. +my.po:7: warning: header field 'Last-Translator' still has the initial default value +my.po: 0 translated messages, 91 untranslated messages. +nah.po: 0 translated messages, 91 untranslated messagesrm -f nds.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nds.gmo nds.po +. +rm -f ne.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ne.gmo ne.po +nb.po: 91 translated messages. +rm -f nl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nl.gmo nl.po +ne.po: 13 translated messages, 78 untranslated messages. +rm -f nn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nn.gmo nn.po +nds.po: 12 translated messages, 79 untranslated messages. +rm -f nqo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nqo.gmo nqo.po +rm -f nso.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nso.gmo nso.po +nl.po: 91 translated messages. +rm -f oc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o oc.gmo oc.po +nn.po: 40 translated messages, 51 untranslated messages. +nqo.po: 0 translated messages, 91 untranslated messages. +nso.po: 3 translated messages, 88 untranslated messages. +rm -f om.gmo && /usr/bin/msgfmt -c --statistics --verbose -o om.gmo om.po +oc.po: 68 translated messages, 23 untranslated messages. +rm -f pa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pa.gmo pa.po +rm -f or.gmo && /usr/bin/msgfmt -c --statistics --verbose -o or.gmo or.po +rm -f pl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pl.gmo pl.po +om.po: 0 translated messages, 91 untranslated messages. +rm -f pms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pms.gmo pms.po +pa.po: 46 translated messages, 45 untranslated messages. +rm -f ps.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ps.gmo ps.po +pl.po: 55 translated messages, 36 untranslated messages. +pms.po: 3 translated messages, 88 untranslated messages. +or.po: 41 translated messages, 50 untranslated messages. +rm -f pt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt.gmo pt.po +ps.po: 6 translated messages, 85 untranslated messages. +rm -f pt_BR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt_BR.gmo pt_BR.po +rm -f ru.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ru.gmo ru.po +rm -f ro.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ro.gmo ro.po +pt.po: 84 translated messages, 7 untranslated messages. +rm -f rw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o rw.gmo rw.po +pt_BR.po: 58 translated messages, 33 untranslated messages. +rm -f sc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sc.gmo sc.po +ro.po: 54 translated messages, 37 untranslated messages. +ru.po: 89 translated messages, 2 untranslated messages. +rw.po: 10 translated messages, 81 untranslated messages. +rm -f sco.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sco.gmo sco.po +sc.po: 2 translated messages, 89 untranslated messages. +rm -f si.gmo && /usr/bin/msgfmt -c --statistics --verbose -o si.gmo si.po +rm -f sk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sk.gmo sk.po +rm -f sl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sl.gmo sl.po +sco.po: 0 translated messages, 91 untranslated messages. +rm -f so.gmo && /usr/bin/msgfmt -c --statistics --verbose -o so.gmo so.po +si.po: 36 translated messages, 55 untranslated messages. +sk.po: 54 translated messages, 37 untranslated messages. +sl.po: 55 translated messages, 36 untranslated messages. +rm -f sq.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sq.gmo sq.po +so.po: 0 translated messages, 91 untranslated messages. +rm -f sr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr.gmo sr.po +rm -f sr@latin.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr@latin.gmo sr@latin.po +rm -f sv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sv.gmo sv.po +rm -f sw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sw.gmo sw.po +sq.po: 52 translated messagessr.po: 91 translated messages. +, 39 untranslated messages. +sr@latin.po: 46 translated messages, 45 untranslated messages. +sw.po: 0 translated messages, 91 untranslated messages. +rm -f ta.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ta.gmo ta.po +sv.po: 80 translated messages, 11 untranslated messages. +rm -f te.gmo && /usr/bin/msgfmt -c --statistics --verbose -o te.gmo te.po +rm -f tg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tg.gmo tg.po +rm -f th.gmo && /usr/bin/msgfmt -c --statistics --verbose -o th.gmo th.po +ta.po: 46 translated messages, 45 untranslated messages. +te.po: 41 translated messages, 50 untranslated messages. +rm -f tk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tk.gmo tk.po +tg.po: 0 translated messages, 91 untranslated messages. +th.po: 45 translated messages, 46 untranslated messages. +rm -f tl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tl.gmo tl.po +tk.po: 7 translated messages, 84 untranslated messages. +rm -f tr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tr.gmo tr.po +rm -f ts.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ts.gmo ts.po +rm -f tt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tt.gmo tt.po +rm -f ug.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ug.gmo ug.po +tl.po: 0 translated messages, 91 untranslated messages. +ts.po: 0 translated messages, 91 untranslated messages. +tr.po: 58 translated messages, 33 untranslated messages. +tt.po:7: warning: header field 'Last-Translator' still has the initial default value +tt.po: 0 translated messages, 91 untranslated messages. +rm -f ur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur.gmo ur.po +ug.po: 6 translated messages, 85 untranslated messagesrm -f uk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uk.gmo uk.po +. +rm -f ur_PK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur_PK.gmo ur_PK.po +rm -f uz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uz.gmo uz.po +ur.po: 7 translated messages, 84 untranslated messages. +rm -f vi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o vi.gmo vi.po +uk.po: 58 translated messages, 33 untranslated messages. +ur_PK.po:7: warning: header field 'Last-Translator' still has the initial default value +ur_PK.po: 0 translated messages, 91 untranslated messages. +rm -f wa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o wa.gmo wa.po +uz.po: 26 translated messages, 65 untranslated messages. +rm -f xh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o xh.gmo xh.po +vi.po: 52 translated messages, 39 untranslated messages. +rm -f yi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yi.gmo yi.po +rm -f yo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yo.gmo yo.po +wa.po: 9 translated messages, 82 untranslated messages. +xh.po: 8 translated messages, 83 untranslated messages. +rm -f zh_CN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_CN.gmo zh_CN.po +yo.po: 5 translated messages, 86 untranslated messages. +rm -f zh_HK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_HK.gmo zh_HK.po +yi.po:7: warning: header field 'Last-Translator' still has the initial default value +yi.po: 0 translated messages, 91 untranslated messages. +rm -f zh_TW.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_TW.gmo zh_TW.po +zh_CN.po: 63 translated messages, 28 untranslated messages. +zh_HK.po: 47 translated messages, 44 untranslated messages. +rm -f zu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zu.gmo zu.po +zh_TW.po: 91 translated messages. +zu.po: 3 translated messages, 88 untranslated messages. +make[3]: Leaving directory '/rootdir/po' +touch stamp-po +make[2]: Leaving directory '/rootdir/po' +Making all in libcafekbd +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml + GEN cafekbd-indicator-marshal.h + GEN cafekbd-keyboard-drawing-marshal.h +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... +INFO: Reading ./cafekbd-indicator-marshal.list... + GEN cafekbd-indicator-marshal.c + GEN cafekbd-keyboard-drawing-marshal.c +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... +INFO: Reading ./cafekbd-indicator-marshal.list... +make all-am +make[3]: Entering directory '/rootdir/libcafekbd' + CC libcafekbd_la-cafekbd-desktop-config.lo + CC libcafekbd_la-cafekbd-keyboard-config.lo + CC libcafekbd_la-cafekbd-util.lo + CC libcafekbdui_la-cafekbd-indicator-config.lo + CC libcafekbdui_la-cafekbd-indicator.lo +cafekbd-desktop-config.c: In function 'cafekbd_desktop_config_load_from_gsettings': +cafekbd-desktop-config.c:176:38: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 176 | || config->default_group >= + | ^~ +cafekbd-indicator.c: In function 'cafekbd_indicator_extract_layout_name': +cafekbd-indicator.c:293:19: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 293 | if (group < g_strv_length (short_group_names)) { + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_prepare_drawing': +cafekbd-indicator.c:418:31: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 418 | if (group + 1 == + | ^~ +cafekbd-indicator.c: In function 'cafekbd_indicator_update_tooltips': +cafekbd-indicator.c:446:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 446 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-indicator.c:450:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 450 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-indicator.c: In function 'cafekbd_indicator_kbd_cfg_callback': +cafekbd-indicator.c:61:44: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 61 | CafekbdIndicator * gki = (CafekbdIndicator*)cur->data; + | ^~~ +cafekbd-indicator.c:561:9: note: in expansion of macro 'ForAllIndicators' + 561 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-indicator.c:539:55: note: shadowed declaration is here + 539 | cafekbd_indicator_kbd_cfg_callback (CafekbdIndicator *gki G_GNUC_UNUSED) +cafekbd-indicator.c: In function 'cafekbd_indicator_start_listen': +cafekbd-indicator.c:647:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 647 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:650:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 650 | (CdkFilterFunc) + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_stop_listen': +cafekbd-indicator.c:663:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 663 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:667:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 667 | (CdkFilterFunc) cafekbd_indicator_filter_x_evt, NULL); + | ^ +cafekbd-indicator-config.c: In function 'cafekbd_indicator_config_get_images_file': +cafekbd-indicator-config.c:152:59: warning: comparison of integer expressions of different signedness: 'guint' {aka 'unsigned int'} and 'int' [-Wsign-compare] + 152 | (g_strv_length (kbd_config->layouts_variants) > group)) { + | ^ + CC libcafekbdui_la-cafekbd-status.lo +cafekbd-status.c: In function 'cafekbd_status_render_cairo': +cafekbd-status.c:214:23: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 214 | if (group + 1 == xkl_engine_get_num_groups (globals.engine)) { + | ^~ +cafekbd-status.c: In function 'cafekbd_status_prepare_drawing': +cafekbd-status.c:376:51: warning: cast between incompatible function types from 'void (*)(void *)' to 'void (*)(guchar *, void *)' {aka 'void (*)(unsigned char *, void *)'} [-Wcast-function-type] + 376 | (GdkPixbufDestroyNotify) + | ^ +cafekbd-status.c: In function 'cafekbd_status_update_tooltips': +cafekbd-status.c:395:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 395 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-status.c:399:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 399 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-status.c: In function 'cafekbd_status_kbd_cfg_callback': +cafekbd-status.c:77:41: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 77 | CafekbdStatus * gki = (CafekbdStatus*)cur->data; + | ^~~ +cafekbd-status.c:508:9: note: in expansion of macro 'ForAllIndicators' + 508 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-status.c:484:49: note: shadowed declaration is here + 484 | cafekbd_status_kbd_cfg_callback (CafekbdStatus *gki G_GNUC_UNUSED) +cafekbd-status.c: In function 'cafekbd_status_start_listen': +cafekbd-status.c:594:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 594 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:597:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 597 | (CdkFilterFunc) cafekbd_status_filter_x_evt, + | ^ +cafekbd-status.c: In function 'cafekbd_status_stop_listen': +cafekbd-status.c:610:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 610 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:614:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 614 | (CdkFilterFunc) cafekbd_status_filter_x_evt, NULL); + | ^ + CC libcafekbdui_la-cafekbd-indicator-marshal.lo +cafekbd-indicator-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ + CC libcafekbdui_la-cafekbd-keyboard-drawing-marshal.lo +cafekbd-keyboard-drawing-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + CC libcafekbdui_la-cafekbd-keyboard-drawing.lo +cafekbd-keyboard-drawing.c: In function 'draw_polygon': +cafekbd-keyboard-drawing.c:322:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 322 | for (i = 0; i < num_points; i++) { + | ^ +cafekbd-keyboard-drawing.c: In function 'process_indicators_state_notify': +cafekbd-keyboard-drawing.c:2131:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'long unsigned int' [-Wsign-compare] + 2131 | for (i = 0; i <= drawing->xkb->indicators->phys_indicators; i++) + | ^~ +cafekbd-keyboard-drawing.c: In function 'cafekbd_keyboard_drawing_get_type': +cafekbd-keyboard-drawing.c:2394:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawingClass *)' {aka 'void (*)(struct _CafekbdKeyboardDrawingClass *)'} to 'void (*)(void *, void *)' [-Wcast-function-type] + 2394 | (GClassInitFunc) cafekbd_keyboard_drawing_class_init, + | ^ +cafekbd-keyboard-drawing.c:2399:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawing *)' {aka 'void (*)(struct _CafekbdKeyboardDrawing *)'} to 'void (*)(GTypeInstance *, void *)' {aka 'void (*)(struct _GTypeInstance *, void *)'} [-Wcast-function-type] + 2399 | (GInstanceInitFunc) cafekbd_keyboard_drawing_init, + | ^ + GEN org.cafe.peripherals-keyboard-xkb.gschema.valid + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:114:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 114 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbd.la + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspectrjqiw1rh/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectrjqiw1rh/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectrjqiw1rh/Cafekbd-1.0.c:239:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 239 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspectrjqiw1rh/Cafekbd-1.0.c:246:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 246 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspectrjqiw1rh/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +5 warnings generated. + GICOMP Cafekbd-1.0.gir +make[3]: Leaving directory '/rootdir/libcafekbd' +make[2]: Leaving directory '/rootdir/libcafekbd' +Making all in test +make[2]: Entering directory '/rootdir/test' + CC cafekbd_indicator_test-cafekbd-indicator-test.o + CC cafekbd_keyboard_drawing_test-cafekbd-keyboard-drawing-test.o + CC cafekbd_status_test-cafekbd-status-test.o +cafekbd-keyboard-drawing-test.c:187:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 187 | g_print ("kbdraw %s\n", VERSION); + | ^~~~~~~ +cafekbd-keyboard-drawing-test.c:194:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 194 | g_printerr ("--groups: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:199:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 199 | g_printerr ("--levels: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:225:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 225 | cafekbd_keyboard_drawing_set_track_modifiers + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:228:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 228 | cafekbd_keyboard_drawing_set_track_config + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:248:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 248 | names.keycodes = keycodes; + | ^~~~~~~~ +cafekbd-keyboard-drawing-test.c:256:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 256 | names.geometry = geometry; + | ^~~~~~~~ +7 warnings generated. + CCLD cafekbd-keyboard-drawing-test + CCLD cafekbd-indicator-test + CCLD cafekbd-status-test +make[2]: Leaving directory '/rootdir/test' +make[2]: Entering directory '/rootdir' +make[2]: Leaving directory '/rootdir' +make[1]: Leaving directory '/rootdir' +scan-build: Analysis run complete. +scan-build: 11 bugs found. +scan-build: Run 'scan-view /rootdir/html-report/2025-02-06-114727-14435-1' to examine bug reports. +Making check in po +make[1]: Entering directory '/rootdir/po' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/po' +Making check in libcafekbd +make[1]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +make check-am +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:113:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 113 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspect_z7z4la8/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspect_z7z4la8/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspect_z7z4la8/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +3 warnings generated. + GICOMP Cafekbd-1.0.gir +make[2]: Leaving directory '/rootdir/libcafekbd' +make[1]: Leaving directory '/rootdir/libcafekbd' +Making check in test +make[1]: Entering directory '/rootdir/test' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/test' +make[1]: Entering directory '/rootdir' +make[1]: Leaving directory '/rootdir' + Listing... 0% Listing... 0% Listing... 0% adduser/testing,now 3.137 all [installed,automatic] +advaita-icon-theme/unknown,now 3.25.0-1 all [installed,automatic] +apt/testing,now 2.9.26 amd64 [installed,automatic] +aptitude-common/testing,now 0.8.13-6.1 all [installed,automatic] +aptitude/testing,now 0.8.13-6.1 amd64 [installed] +at-spi2-common/testing,now 2.55.0.1-1 all [installed,automatic] +at-spi2-core/testing,now 2.55.0.1-1 amd64 [installed,automatic] +autoconf-archive/testing,now 20220903-3 all [installed] +autoconf/testing,now 2.72-3 all [installed,automatic] +automake/testing,now 1:1.16.5-1.3 all [installed,automatic] +autopoint/testing,now 0.23.1-1 all [installed] +autotools-dev/testing,now 20220109.1 all [installed,automatic] +base-files/testing,now 13.6 amd64 [installed,automatic] +base-passwd/testing,now 3.6.6 amd64 [installed,automatic] +bash/testing,now 5.2.37-1 amd64 [installed,automatic] +binfmt-support/testing,now 2.2.2-7 amd64 [installed,automatic] +binutils-common/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils-gold-x86-64-linux-gnu/testing,now 2.44-1 amd64 [installed,automatic] +binutils-gold/testing,now 2.44-1 amd64 [installed,automatic] +binutils-x86-64-linux-gnu/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +bsdutils/testing,now 1:2.40.4-2 amd64 [installed,automatic] +build-essential/testing,now 12.12 amd64 [installed,automatic] +bzip2-doc/testing,now 1.0.8-6 all [installed,automatic] +bzip2/testing,now 1.0.8-6 amd64 [installed,automatic] +ca-certificates/testing,now 20241223 all [installed,automatic] +clang-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools/testing,now 1:19.0-63 amd64 [installed] +clang/testing,now 1:19.0-63 amd64 [installed] +coreutils/testing,now 9.5-1+b1 amd64 [installed,automatic] +cpp-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-14/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cpp/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cppcheck/testing,now 2.16.0-1 amd64 [installed] +ctk-update-icon-cache/unknown,now 3.25.6-1 amd64 [installed,automatic] +dash/testing,now 0.5.12-12 amd64 [installed,automatic] +dbus-bin/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-daemon/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-session-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-system-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-user-session/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus/testing,now 1.16.0-1 amd64 [installed,automatic] +dconf-gsettings-backend/testing,now 0.40.0-5 amd64 [installed,automatic] +dconf-service/testing,now 0.40.0-5 amd64 [installed,automatic] +debconf/testing,now 1.5.89 all [installed,automatic] +debian-archive-keyring/testing,now 2023.4 all [installed,automatic] +debianutils/testing,now 5.21 amd64 [installed,automatic] +diffutils/testing,now 1:3.10-2 amd64 [installed,automatic] +dirmngr/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +dmsetup/testing,now 2:1.02.201-1 amd64 [installed,automatic] +dpkg-dev/testing,now 1.22.14 all [installed,automatic] +dpkg/testing,now 1.22.14 amd64 [installed,automatic] +e2fsprogs/testing,now 1.47.2-1 amd64 [installed,automatic] +expect/testing,now 5.45.4-3+b1 amd64 [installed] +fakeroot/testing,now 1.37-1 amd64 [installed,automatic] +file/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +findutils/testing,now 4.10.0-3 amd64 [installed,automatic] +fontconfig-config/testing,now 2.15.0-2 amd64 [installed,automatic] +fontconfig/testing,now 2.15.0-2 amd64 [installed,automatic] +fonts-dejavu-core/testing,now 2.37-8 all [installed,automatic] +fonts-dejavu-mono/testing,now 2.37-8 all [installed,automatic] +g++-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-14/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +g++/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc-14-base/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gettext-base/testing,now 0.23.1-1 amd64 [installed,automatic] +gettext/testing,now 0.23.1-1 amd64 [installed] +gir1.2-atk-1.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-atspi-2.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-ctk-3.0/unknown,now 3.25.6-1 amd64 [installed] +gir1.2-freedesktop-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-freedesktop/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-gdkpixbuf-2.0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +gir1.2-girepository-2.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-girepository-2.0/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-glib-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-glib-2.0/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-harfbuzz-0.0/testing,now 10.2.0-1 amd64 [installed,automatic] +gir1.2-pango-1.0/testing,now 1.56.1-1 amd64 [installed,automatic] +gir1.2-xkl-1.0/testing,now 5.4-5+b2 amd64 [installed,automatic] +girepository-tools/testing,now 2.82.4-2 amd64 [installed,automatic] +git-man/testing,now 1:2.47.2-0.1 all [installed,automatic] +git/testing,now 1:2.47.2-0.1 amd64 [installed] +gnupg-l10n/testing,now 2.2.46-1 all [installed,automatic] +gnupg-utils/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gnupg/testing,now 2.2.46-1 all [installed,automatic] +gobject-introspection-bin/testing,now 1.82.0-4 amd64 [installed,automatic] +gobject-introspection/testing,now 1.82.0-4 amd64 [installed] +gpg-agent/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg-wks-client/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgconf/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgsm/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgv/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +grep/testing,now 3.11-4 amd64 [installed,automatic] +gsettings-desktop-schemas/testing,now 47.1-1 all [installed,automatic] +gzip/testing,now 1.13-1 amd64 [installed,automatic] +hicolor-icon-theme/testing,now 0.18-2 all [installed,automatic] +hostname/testing,now 3.25 amd64 [installed,automatic] +icu-devtools/testing,now 72.1-6 amd64 [installed,automatic] +init-system-helpers/testing,now 1.68 all [installed,automatic] +krb5-locales/testing,now 1.21.3-4 all [installed,automatic] +less/testing,now 643-1 amd64 [installed,automatic] +lib32gcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +lib32stdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libacl1/testing,now 2.3.2-2+b1 amd64 [installed,automatic] +libalgorithm-diff-perl/testing,now 1.201-1 all [installed,automatic] +libalgorithm-diff-xs-perl/testing,now 0.04-8+b4 amd64 [installed,automatic] +libalgorithm-merge-perl/testing,now 0.08-5 all [installed,automatic] +libapparmor1/testing,now 3.1.7-1+b3 amd64 [installed,automatic] +libapt-pkg6.0t64/testing,now 2.9.26 amd64 [installed,automatic] +libasan8/testing,now 14.2.0-12 amd64 [installed,automatic] +libassuan9/testing,now 3.0.1-2 amd64 [installed,automatic] +libatk-bridge2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk-bridge2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatomic1/testing,now 14.2.0-12 amd64 [installed,automatic] +libatspi2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatspi2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libattr1/testing,now 1:2.5.2-2 amd64 [installed,automatic] +libaudit-common/testing,now 1:4.0.2-2 all [installed,automatic] +libaudit1/testing,now 1:4.0.2-2+b1 amd64 [installed,automatic] +libavahi-client3/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common-data/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common3/testing,now 0.8-16 amd64 [installed,automatic] +libbinutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libblkid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libblkid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libboost-iostreams1.83.0/testing,now 1.83.0-4 amd64 [installed,automatic] +libbrotli-dev/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbrotli1/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbsd0/testing,now 0.12.2-2 amd64 [installed,automatic] +libbz2-1.0/testing,now 1.0.8-6 amd64 [installed,automatic] +libbz2-dev/testing,now 1.0.8-6 amd64 [installed,automatic] +libc-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc-dev-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc6-dev/testing,now 2.40-6 amd64 [installed,automatic] +libc6-i386/testing,now 2.40-6 amd64 [installed,automatic] +libc6/testing,now 2.40-6 amd64 [installed,automatic] +libcairo-gobject2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo-script-interpreter2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2-dev/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcap-dev/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcap-ng0/testing,now 0.8.5-4 amd64 [installed,automatic] +libcap2/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcbor0.10/testing,now 0.10.2-2 amd64 [installed,automatic] +libcc1-0/testing,now 14.2.0-12 amd64 [installed,automatic] +libclang-common-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-cpp19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-rt-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang1-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libcolord2/testing,now 1.4.7-1+b2 amd64 [installed,automatic] +libcom-err2/testing,now 1.47.2-1 amd64 [installed,automatic] +libcrypt-dev/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcrypt1/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcryptsetup12/testing,now 2:2.7.5-1 amd64 [installed,automatic] +libctf-nobfd0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctf0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctk-3-0/unknown,now 3.25.6-1 amd64 [installed] +libctk-3-bin/unknown,now 3.25.6-1 amd64 [installed,automatic] +libctk-3-common/unknown,now 3.25.6-1 all [installed] +libctk-3-dev/unknown,now 3.25.6-1 amd64 [installed] +libcups2t64/testing,now 2.4.10-2+b1 amd64 [installed,automatic] +libcurl3t64-gnutls/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcurl4t64/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcwidget4/testing,now 0.5.18-6+b2 amd64 [installed,automatic] +libdatrie-dev/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdatrie1/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdav1d7/testing,now 1.5.1-1 amd64 [installed,automatic] +libdb5.3t64/testing,now 5.3.28+dfsg2-9 amd64 [installed,automatic] +libdbus-1-3/testing,now 1.16.0-1 amd64 [installed,automatic] +libdbus-1-dev/testing,now 1.16.0-1 amd64 [installed,automatic] +libdconf1/testing,now 0.40.0-5 amd64 [installed,automatic] +libdebconfclient0/testing,now 0.277 amd64 [installed,automatic] +libdeflate-dev/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdeflate0/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdevmapper1.02.1/testing,now 2:1.02.201-1 amd64 [installed,automatic] +libdpkg-perl/testing,now 1.22.14 all [installed,automatic] +libdrm-amdgpu1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-common/testing,now 2.4.123-1 all [installed,automatic] +libdrm-intel1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-radeon1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm2/testing,now 2.4.123-1 amd64 [installed,automatic] +libedit2/testing,now 3.1-20250104-1 amd64 [installed,automatic] +libegl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libegl-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1-mesa-dev/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libelf1t64/testing,now 0.192-4 amd64 [installed,automatic] +libepoxy-dev/testing,now 1.5.10-2 amd64 [installed,automatic] +libepoxy0/testing,now 1.5.10-2 amd64 [installed,automatic] +liberror-perl/testing,now 0.17029-2 all [installed,automatic] +libexpat1-dev/testing,now 2.6.4-1 amd64 [installed,automatic] +libexpat1/testing,now 2.6.4-1 amd64 [installed,automatic] +libext2fs2t64/testing,now 1.47.2-1 amd64 [installed,automatic] +libfakeroot/testing,now 1.37-1 amd64 [installed,automatic] +libffi-dev/testing,now 3.4.6-1 amd64 [installed,automatic] +libffi8/testing,now 3.4.6-1 amd64 [installed,automatic] +libfido2-1/testing,now 1.15.0-1+b1 amd64 [installed,automatic] +libfile-fcntllock-perl/testing,now 0.22-4+b4 amd64 [installed,automatic] +libfontconfig-dev/testing,now 2.15.0-2 amd64 [installed,automatic] +libfontconfig1/testing,now 2.15.0-2 amd64 [installed,automatic] +libfreetype-dev/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfreetype6/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfribidi-dev/testing,now 1.0.16-1 amd64 [installed,automatic] +libfribidi0/testing,now 1.0.16-1 amd64 [installed,automatic] +libgbm1/testing,now 24.2.8-1 amd64 [installed,automatic] +libgc1/testing,now 1:8.2.8-1 amd64 [installed,automatic] +libgcc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcrypt20/testing,now 1.11.0-7 amd64 [installed,automatic] +libgdbm-compat4t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdbm6t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-dev/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-bin/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-common/testing,now 2.42.12+dfsg-2 all [installed,automatic] +libgio-2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libgio-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository-1.0-1/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-1.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-2.0-0/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository1.0-dev/testing,now 1.82.0-4 amd64 [installed] +libgl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgl1-mesa-dri/testing,now 24.2.8-1 amd64 [installed,automatic] +libgl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglapi-mesa/testing,now 24.2.8-1 amd64 [installed,automatic] +libgles-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles2/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglib2.0-0t64/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-data/testing,now 2.82.4-2 all [installed,automatic] +libglib2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-dev/testing,now 2.82.4-2 amd64 [installed] +libglvnd-core-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libglx0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgmp10/testing,now 2:6.3.0+dfsg-3 amd64 [installed,automatic] +libgnutls30t64/testing,now 3.8.8-2 amd64 [installed,automatic] +libgomp1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgpg-error-l10n/testing,now 1.51-3 all [installed,automatic] +libgpg-error0/testing,now 1.51-3 amd64 [installed,automatic] +libgpm2/testing,now 1.20.7-11+b2 amd64 [installed,automatic] +libgprofng0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libgraphite2-3/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgraphite2-dev/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgssapi-krb5-2/testing,now 1.21.3-4 amd64 [installed,automatic] +libharfbuzz-cairo0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-dev/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-gobject0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-icu0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-subset0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz0b/testing,now 10.2.0-1 amd64 [installed,automatic] +libhogweed6t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libhwasan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libice-dev/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libice6/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libicu-dev/testing,now 72.1-6 amd64 [installed,automatic] +libicu72/testing,now 72.1-6 amd64 [installed,automatic] +libidn2-0/testing,now 2.3.7-2+b1 amd64 [installed,automatic] +libisl23/testing,now 0.27-1 amd64 [installed,automatic] +libitm1/testing,now 14.2.0-12 amd64 [installed,automatic] +libjansson4/testing,now 2.14-2+b3 amd64 [installed,automatic] +libjbig-dev/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjbig0/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjpeg-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjson-c5/testing,now 0.18+ds-1 amd64 [installed,automatic] +libk5crypto3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkeyutils1/testing,now 1.6.3-4 amd64 [installed,automatic] +libkmod2/testing,now 33+20240816-2 amd64 [installed,automatic] +libkrb5-3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkrb5support0/testing,now 1.21.3-4 amd64 [installed,automatic] +libksba8/testing,now 1.6.7-2+b1 amd64 [installed,automatic] +liblcms2-2/testing,now 2.16-2 amd64 [installed,automatic] +libldap-common/testing,now 2.6.9+dfsg-1 all [installed,automatic] +libldap2/testing,now 2.6.9+dfsg-1 amd64 [installed,automatic] +liblerc-dev/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +liblerc4/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +libllvm19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +liblocale-gettext-perl/testing,now 1.07-7+b1 amd64 [installed,automatic] +liblsan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libltdl-dev/testing,now 2.5.4-2 amd64 [installed,automatic] +libltdl7/testing,now 2.5.4-2 amd64 [installed,automatic] +liblz4-1/testing,now 1.10.0-3 amd64 [installed,automatic] +liblzma-dev/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzma5/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzo2-2/testing,now 2.10-3+b1 amd64 [installed,automatic] +libmagic-mgc/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmagic1t64/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmd0/testing,now 1.1.0-2+b1 amd64 [installed,automatic] +libmount-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libmount1/testing,now 2.40.4-2 amd64 [installed,automatic] +libmpc3/testing,now 1.3.1-1+b3 amd64 [installed,automatic] +libmpfr6/testing,now 4.2.1-1+b2 amd64 [installed,automatic] +libncurses-dev/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncurses6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncursesw6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libnettle8t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libnghttp2-14/testing,now 1.64.0-1 amd64 [installed,automatic] +libnghttp3-9/testing,now 1.6.0-2 amd64 [installed,automatic] +libngtcp2-16/testing,now 1.9.1-1 amd64 [installed,automatic] +libngtcp2-crypto-gnutls8/testing,now 1.9.1-1 amd64 [installed,automatic] +libnpth0t64/testing,now 1.8-2 amd64 [installed,automatic] +libnss-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libobjc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libobjc4/testing,now 14.2.0-12 amd64 [installed,automatic] +libopengl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libopengl0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libp11-kit0/testing,now 0.25.5-3 amd64 [installed,automatic] +libpam-modules-bin/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-modules/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-runtime/testing,now 1.7.0-2 all [installed,automatic] +libpam-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libpam0g/testing,now 1.7.0-2 amd64 [installed,automatic] +libpango-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpango1.0-dev/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangocairo-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoft2-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoxft-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpciaccess0/testing,now 0.17-3+b3 amd64 [installed,automatic] +libpcre2-16-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-32-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-8-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-dev/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-posix3/testing,now 10.44-5 amd64 [installed,automatic] +libperl5.40/testing,now 5.40.0-8 amd64 [installed,automatic] +libpfm4/testing,now 4.13.0+git83-g91970fe-1 amd64 [installed,automatic] +libpipeline1/testing,now 1.5.8-1 amd64 [installed,automatic] +libpixman-1-0/testing,now 0.44.0-3 amd64 [installed,automatic] +libpixman-1-dev/testing,now 0.44.0-3 amd64 [installed,automatic] +libpkgconf3/testing,now 1.8.1-4 amd64 [installed,automatic] +libpng-dev/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng-tools/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng16-16t64/testing,now 1.6.44-3 amd64 [installed,automatic] +libproc2-0/testing,now 2:4.0.4-7 amd64 [installed,automatic] +libpsl5t64/testing,now 0.21.2-1.1+b1 amd64 [installed,automatic] +libpython3-stdlib/testing,now 3.13.1-2 amd64 [installed,automatic] +libpython3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libpython3.13-stdlib/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libquadmath0/testing,now 14.2.0-12 amd64 [installed,automatic] +libreadline8t64/testing,now 8.2-6 amd64 [installed,automatic] +librsvg2-2/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librsvg2-common/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librtmp1/testing,now 2.4+20151223.gitfa8646d.1-2+b5 amd64 [installed,automatic] +libsasl2-2/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules-db/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libseccomp2/testing,now 2.5.5-2 amd64 [installed,automatic] +libselinux1-dev/testing,now 3.7-3.1 amd64 [installed,automatic] +libselinux1/testing,now 3.7-3.1 amd64 [installed,automatic] +libsemanage-common/testing,now 3.7-2.1 all [installed,automatic] +libsemanage2/testing,now 3.7-2.1 amd64 [installed,automatic] +libsensors-config/testing,now 1:3.6.0-10 all [installed,automatic] +libsensors5/testing,now 1:3.6.0-10+b1 amd64 [installed,automatic] +libsepol-dev/testing,now 3.7-1 amd64 [installed,automatic] +libsepol2/testing,now 3.7-1 amd64 [installed,automatic] +libsframe1/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libsharpyuv-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsharpyuv0/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsigc++-2.0-0v5/testing,now 2.12.1-3 amd64 [installed,automatic] +libsm-dev/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsm6/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsmartcols1/testing,now 2.40.4-2 amd64 [installed,automatic] +libsqlite3-0/testing,now 3.46.1-1 amd64 [installed,automatic] +libss2/testing,now 1.47.2-1 amd64 [installed,automatic] +libssh2-1t64/testing,now 1.11.1-1 amd64 [installed,automatic] +libssl3t64/testing,now 3.4.0-2 amd64 [installed,automatic] +libstdc++-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libstdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libsysprof-capture-4-dev/testing,now 47.2-1 amd64 [installed,automatic] +libsystemd-dev/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd-shared/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd0/testing,now 257.2-3 amd64 [installed,automatic] +libtasn1-6/testing,now 4.19.0-3+b3 amd64 [installed,automatic] +libtcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +libthai-data/testing,now 0.1.29-2 all [installed,automatic] +libthai-dev/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libthai0/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libtiff-dev/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiff6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiffxx6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtinfo6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libtinyxml2-10/testing,now 10.0.0+dfsg-2+b2 amd64 [installed,automatic] +libtool/testing,now 2.5.4-2 all [installed] +libtsan2/testing,now 14.2.0-12 amd64 [installed,automatic] +libubsan1/testing,now 14.2.0-12 amd64 [installed,automatic] +libudev1/testing,now 257.2-3 amd64 [installed,automatic] +libunistring5/testing,now 1.3-1 amd64 [installed,automatic] +libuuid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libvulkan1/testing,now 1.4.304.0-1 amd64 [installed,automatic] +libwayland-bin/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-client0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-cursor0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-dev/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-egl1/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-server0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwebp-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebp7/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdecoder3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdemux2/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpmux3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libx11-6/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-data/testing,now 2:1.8.10-2 all [installed,automatic] +libx11-dev/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-xcb1/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libxapian30/testing,now 1.4.25-2 amd64 [installed,automatic] +libxau-dev/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxau6/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxaw7/testing,now 2:1.0.16-1 amd64 [installed,automatic] +libxcb-dri2-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-dri3-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-glx0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-present0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-randr0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-sync1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-xfixes0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcomposite-dev/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcomposite1/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcursor-dev/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxcursor1/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxdamage-dev/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdamage1/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdmcp-dev/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxdmcp6/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxext-dev/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxext6/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxfixes-dev/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxfixes3/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxft-dev/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxft2/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxi-dev/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxi6/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxinerama-dev/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxinerama1/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxkbcommon-dev/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbcommon0/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbfile1/testing,now 1:1.1.0-1+b4 amd64 [installed,automatic] +libxklavier-dev/testing,now 5.4-5+b2 amd64 [installed] +libxklavier16/testing,now 5.4-5+b2 amd64 [installed,automatic] +libxml2-dev/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxml2-utils/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed] +libxml2/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxmu6/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxmuu1/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxpm4/testing,now 1:3.5.17-1+b3 amd64 [installed,automatic] +libxrandr-dev/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrandr2/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrender-dev/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxrender1/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxshmfence1/testing,now 1.3-1+b3 amd64 [installed,automatic] +libxt6t64/testing,now 1:1.2.1-1.2+b2 amd64 [installed,automatic] +libxtst-dev/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxtst6/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxxf86vm1/testing,now 1:1.1.4-1+b4 amd64 [installed,automatic] +libxxhash0/testing,now 0.8.2-2+b2 amd64 [installed,automatic] +libyaml-0-2/testing,now 0.2.5-2 amd64 [installed,automatic] +libz3-4/testing,now 4.13.3-1 amd64 [installed,automatic] +libz3-dev/testing,now 4.13.3-1 amd64 [installed,automatic] +libzstd-dev/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +libzstd1/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +linux-libc-dev/testing,now 6.12.11-1 all [installed,automatic] +linux-sysctl-defaults/testing,now 4.11 all [installed,automatic] +llvm-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-linker-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-runtime/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +login.defs/testing,now 1:4.16.0-7 all [installed,automatic] +login/testing,now 1:4.16.0-2+really2.40.4-2 amd64 [installed,automatic] +logsave/testing,now 1.47.2-1 amd64 [installed,automatic] +m4/testing,now 1.4.19-5 amd64 [installed,automatic] +make/testing,now 4.4.1-1 amd64 [installed] +manpages-dev/testing,now 6.9.1-1 all [installed,automatic] +manpages/testing,now 6.9.1-1 all [installed,automatic] +mawk/testing,now 1.3.4.20240905-1 amd64 [installed,automatic] +media-types/testing,now 10.1.0 all [installed,automatic] +mesa-libgallium/testing,now 24.2.8-1 amd64 [installed,automatic] +mesa-vulkan-drivers/testing,now 24.2.8-1 amd64 [installed,automatic] +mount/testing,now 2.40.4-2 amd64 [installed,automatic] +native-architecture/testing,now 0.2.5 all [installed,automatic] +ncurses-base/testing,now 6.5-2 all [installed,automatic] +ncurses-bin/testing,now 6.5-2+b1 amd64 [installed,automatic] +netbase/testing,now 6.4 all [installed,automatic] +openssh-client/testing,now 1:9.9p1-3 amd64 [installed,automatic] +openssl-provider-legacy/testing,now 3.4.0-2 amd64 [installed,automatic] +openssl/testing,now 3.4.0-2 amd64 [installed,automatic] +pango1.0-tools/testing,now 1.56.1-1 amd64 [installed,automatic] +passwd/testing,now 1:4.16.0-7 amd64 [installed,automatic] +patch/testing,now 2.7.6-7 amd64 [installed,automatic] +perl-base/testing,now 5.40.0-8 amd64 [installed,automatic] +perl-modules-5.40/testing,now 5.40.0-8 all [installed,automatic] +perl/testing,now 5.40.0-8 amd64 [installed,automatic] +pinentry-curses/testing,now 1.3.1-2 amd64 [installed,automatic] +pkgconf-bin/testing,now 1.8.1-4 amd64 [installed,automatic] +pkgconf/testing,now 1.8.1-4 amd64 [installed,automatic] +procps/testing,now 2:4.0.4-7 amd64 [installed,automatic] +psmisc/testing,now 23.7-1 amd64 [installed,automatic] +publicsuffix/testing,now 20250108.1153-0.1 all [installed,automatic] +python3-autocommand/testing,now 2.2.2-3 all [installed,automatic] +python3-inflect/testing,now 7.3.1-2 all [installed,automatic] +python3-jaraco.context/testing,now 6.0.0-1 all [installed,automatic] +python3-jaraco.functools/testing,now 4.1.0-1 all [installed,automatic] +python3-jaraco.text/testing,now 4.0.0-1 all [installed,automatic] +python3-mako/testing,now 1.3.8-2 all [installed,automatic] +python3-markdown/testing,now 3.7-2 all [installed,automatic] +python3-markupsafe/testing,now 2.1.5-1+b2 amd64 [installed,automatic] +python3-minimal/testing,now 3.13.1-2 amd64 [installed,automatic] +python3-more-itertools/testing,now 10.6.0-1 all [installed,automatic] +python3-packaging/testing,now 24.2-1 all [installed,automatic] +python3-pkg-resources/testing,now 75.6.0-1 all [installed,automatic] +python3-pygments/testing,now 2.18.0+dfsg-2 all [installed,automatic] +python3-setuptools/testing,now 75.6.0-1 all [installed,automatic] +python3-typeguard/testing,now 4.4.1-1 all [installed,automatic] +python3-typing-extensions/testing,now 4.12.2-2 all [installed,automatic] +python3-yaml/testing,now 6.0.2-1+b1 amd64 [installed,automatic] +python3-zipp/testing,now 3.21.0-1 all [installed,automatic] +python3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3.13/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3/testing,now 3.13.1-2 amd64 [installed,automatic] +readline-common/testing,now 8.2-6 all [installed,automatic] +rpcsvc-proto/testing,now 1.4.3-1 amd64 [installed,automatic] +sed/testing,now 4.9-2 amd64 [installed,automatic] +sensible-utils/testing,now 0.0.24 all [installed,automatic] +sgml-base/testing,now 1.31 all [installed,automatic] +shared-mime-info/testing,now 2.4-5+b2 amd64 [installed,automatic] +sqv/testing,now 1.2.1-5 amd64 [installed,automatic] +systemd-cryptsetup/testing,now 257.2-3 amd64 [installed,automatic] +systemd-sysv/testing,now 257.2-3 amd64 [installed,automatic] +systemd-timesyncd/testing,now 257.2-3 amd64 [installed,automatic] +systemd/testing,now 257.2-3 amd64 [installed,automatic] +sysvinit-utils/testing,now 3.13-1 amd64 [installed,automatic] +tar/testing,now 1.35+dfsg-3.1 amd64 [installed,automatic] +tcl-expect/testing,now 5.45.4-3+b1 amd64 [installed,automatic] +tcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +tzdata/testing,now 2024b-6 all [installed,automatic] +util-linux/testing,now 2.40.4-2 amd64 [installed,automatic] +uuid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +wayland-protocols/testing,now 1.39-1 all [installed,automatic] +wget/testing,now 1.24.5-2+b1 amd64 [installed] +x11-common/testing,now 1:7.7+24 all [installed,automatic] +x11-xkb-utils/testing,now 7.7+9 amd64 [installed,automatic] +x11proto-dev/testing,now 2024.1-1 all [installed,automatic] +xauth/testing,now 1:1.1.2-1.1 amd64 [installed,automatic] +xdg-user-dirs/testing,now 0.18-2 amd64 [installed,automatic] +xkb-data/testing,now 2.42-1 all [installed,automatic] +xml-core/testing,now 0.19 all [installed,automatic] +xorg-sgml-doctools/testing,now 1:1.11-1.1 all [installed,automatic] +xtrans-dev/testing,now 1.4.0-1 all [installed,automatic] +xz-utils/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +zlib1g-dev/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +zlib1g/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +Errors detected in the build 0 +Warnings detected in the logs 96 +cppcheck defects detected in the logs 28 +TOTAL warnings detected in the logs 124 diff --git a/2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/stats.html b/2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/stats.html new file mode 100644 index 0000000..a805ba6 --- /dev/null +++ b/2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/stats.html @@ -0,0 +1,180 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+

Top 10 files for error severity, total findings: 2
+   1  libcafekbd/cafekbd-status.c
+   1  libcafekbd/cafekbd-indicator.c
+

+

Top 10 files for style severity, total findings: 20
+   13  libcafekbd/cafekbd-keyboard-drawing.c
+   6   libcafekbd/cafekbd-keyboard-config.c
+   1   test/cafekbd-status-test.c
+

+

Top 10 files for information severity, total findings: 5
+   1  test/cafekbd-keyboard-drawing-test.c
+   1  libcafekbd/cafekbd-keyboard-drawing.c
+   1  libcafekbd/cafekbd-keyboard-config.c
+   1  libcafekbd/cafekbd-indicator-config.c
+   1  libcafekbd/cafekbd-desktop-config.c
+

+ +
+ +
+ + diff --git a/2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/style.css b/2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/style.css new file mode 100644 index 0000000..3897bfa --- /dev/null +++ b/2025-02-06-114856-7966-cppcheck@b1965751dcd5_devel/style.css @@ -0,0 +1,177 @@ + +body { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; + font-size: 13px; + line-height: 1.5; + height: 100%; + margin: 0; +} + +#wrapper { + position: fixed; + height: 100vh; + width: 100vw; + display: grid; + grid-template-rows: fit-content(8rem) auto fit-content(8rem); + grid-template-columns: fit-content(25%) 1fr; + grid-template-areas: + "header header" + "menu content" + "footer footer"; +} + +h1 { + margin: 0 0 8px -2px; + font-size: 175%; +} + +.header { + padding: 0 0 5px 15px; + grid-area: header; + border-bottom: thin solid #aaa; +} + +.footer { + grid-area: footer; + border-top: thin solid #aaa; + font-size: 85%; + +} + +.footer > p { + margin: 4px; +} + +#menu, +#menu_index { + grid-area: menu; + text-align: left; + overflow: auto; + padding: 0 23px 15px 15px; + border-right: thin solid #aaa; + min-width: 200px; +} + +#menu > a { + display: block; + margin-left: 10px; + font-size: 12px; +} + +#content, +#content_index { + grid-area: content; + padding: 0px 5px 15px 15px; + overflow: auto; +} + +label { + white-space: nowrap; +} + +label.checkBtn.disabled { + color: #606060; + background: #e0e0e0; + font-style: italic; +} + +label.checkBtn, input[type="text"] { + border: 1px solid grey; + border-radius: 4px; + box-shadow: 1px 1px inset; + padding: 1px 5px; +} + +label.checkBtn { + white-space: nowrap; + background: #ccddff; +} + +label.unchecked { + background: #eff8ff; + box-shadow: 1px 1px 1px; +} + +label.checkBtn:hover, label.unchecked:hover{ + box-shadow: 0 0 2px; +} + +label.disabled:hover { + box-shadow: 1px 1px inset; +} + +label.checkBtn > input { + display:none; +} + +.summaryTable { + width: 100%; +} + +table.summaryTable td { padding: 0 5px 0 5px; } + +.statHeader, .severityHeader { + font-weight: bold; +} + +.warning { + background-color: #ffffa7; +} + +.error { + background-color: #ffb7b7; +} + +.error2 { + background-color: #faa; + display: inline-block; + margin-left: 4px; +} + +.inconclusive { + background-color: #b6b6b4; +} + +.inconclusive2 { + background-color: #b6b6b4; + display: inline-block; + margin-left: 4px; +} + +.verbose { + display: inline-block; + vertical-align: top; + cursor: help; +} + +.verbose .content { + display: none; + position: absolute; + padding: 10px; + margin: 4px; + max-width: 40%; + white-space: pre-wrap; + border: 1px solid #000; + background-color: #ffffcc; + cursor: auto; +} + +.highlight .hll { + padding: 1px; +} + +.highlighttable { + background-color: #fff; + position: relative; + margin: -10px; +} + +.linenos { + border-right: thin solid #aaa; + color: #d3d3d3; + padding-right: 6px; +} + +.id-filtered, .severity-filtered, .file-filtered, .tool-filtered, .text-filtered { + visibility: collapse; +} diff --git a/2025-02-06-115547-14435-1@b1965751dcd5_master/commitmsg b/2025-02-06-115547-14435-1@b1965751dcd5_master/commitmsg new file mode 100644 index 0000000..0d05158 --- /dev/null +++ b/2025-02-06-115547-14435-1@b1965751dcd5_master/commitmsg @@ -0,0 +1 @@ +cafekbd-indicator: Fix [-Wstrict-prototypes] warnings diff --git a/2025-02-06-115547-14435-1@b1965751dcd5_master/index.html b/2025-02-06-115547-14435-1@b1965751dcd5_master/index.html new file mode 100644 index 0000000..3ff3957 --- /dev/null +++ b/2025-02-06-115547-14435-1@b1965751dcd5_master/index.html @@ -0,0 +1,138 @@ + + +libcafekbd (clang-tools 1:19.0-63) - scan-build results + + + + + + +

libcafekbd (clang-tools 1:19.0-63) - scan-build results

+ + + + + + + +
User:root@0ffbdf519e14
Working Directory:/rootdir
Command Line:make -j 5
Clang Version:Debian clang version 19.1.6 (1+b1) +
Date:Thu Feb 6 11:55:47 2025
+

Bug Summary

+ + + + + + + + + +
Bug TypeQuantityDisplay?
All Bugs11
Logic error
Dereference of null pointer1
Stream handling error
Invalid stream state1
Stream already in EOF1
Unused code
Unreachable code8
+ +

Filter Results by File

+ + +

Reports

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Bug GroupBug Type ▾FileFunction/MethodLinePath Length
Logic errorDereference of null pointerlibcafekbd/tmp-introspect_nwrjnbg/Cafekbd-1.0.cmain81232View Report
Stream handling errorInvalid stream statelibcafekbd/tmp-introspect_nwrjnbg/Cafekbd-1.0.cread_line8933View Report
Stream handling errorStream already in EOFlibcafekbd/tmp-introspect_nwrjnbg/Cafekbd-1.0.cread_line8933View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2481View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain1991View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain1941View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2281View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain1871View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2251View Report
Unused codeUnreachable codelibcafekbd/tmp-introspect_nwrjnbg/Cafekbd-1.0.cvalue_to_string2391View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2561View Report
+ + diff --git a/2025-02-06-115547-14435-1@b1965751dcd5_master/output_b1965751dcd5a6db17ae755139e63f860425ebf2 b/2025-02-06-115547-14435-1@b1965751dcd5_master/output_b1965751dcd5a6db17ae755139e63f860425ebf2 new file mode 100644 index 0000000..5557817 --- /dev/null +++ b/2025-02-06-115547-14435-1@b1965751dcd5_master/output_b1965751dcd5a6db17ae755139e63f860425ebf2 @@ -0,0 +1,1864 @@ +Checking libcafekbd/cafekbd-desktop-config.c ... +libcafekbd/cafekbd-desktop-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +1/10 files checked 4% done +Checking libcafekbd/cafekbd-indicator-config.c ... +libcafekbd/cafekbd-indicator-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +2/10 files checked 10% done +Checking libcafekbd/cafekbd-indicator.c ... +libcafekbd/cafekbd-indicator.c:66:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdIndicator, cafekbd_indicator, CTK_TYPE_NOTEBOOK) +^ +3/10 files checked 24% done +Checking libcafekbd/cafekbd-keyboard-config.c ... +libcafekbd/cafekbd-keyboard-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-config.c:67:8: style: Condition '*l1' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:67:15: style: Condition '*l2' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:227:16: style: Condition 'option!=NULL' is always true [knownConditionTrueFalse] + (option != NULL) ? strchr (option, ':') : NULL; + ^ +libcafekbd/cafekbd-keyboard-config.c:282:18: style: Condition 'variant==NULL' is always false [knownConditionTrueFalse] + (variant == + ^ +libcafekbd/cafekbd-keyboard-config.c:226:10: style: Variable 'delim' can be declared as pointer to const [constVariablePointer] + char *delim = + ^ +libcafekbd/cafekbd-keyboard-config.c:609:65: style: Parameter 'kbd_config' can be declared as pointer to const [constParameterPointer] +cafekbd_keyboard_config_options_is_set (CafekbdKeyboardConfig * kbd_config, + ^ +4/10 files checked 36% done +Checking libcafekbd/cafekbd-keyboard-drawing.c ... +libcafekbd/cafekbd-keyboard-drawing.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-drawing.c:61:60: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_coord (CafekbdKeyboardDrawingRenderContext * context, gint n) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:67:61: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_double (CafekbdKeyboardDrawingRenderContext * context, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:625:51: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +set_markup (CafekbdKeyboardDrawingRenderContext * context, gchar *txt) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1026:11: style: Variable 'runp' can be declared as pointer to const [constVariablePointer] + GSList *runp; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1036:25: style: Variable 'geometry' can be declared as pointer to const [constVariablePointer] + PangoGlyphGeometry *geometry; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1202:39: style: Parameter 'outline' can be declared as pointer to const [constParameterPointer] +calc_origin_offset_x (XkbOutlineRec * outline) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1397:15: style: Variable 'shape' can be declared as pointer to const [constVariablePointer] + XkbShapeRec *shape; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: style: Parameter 'drawing' can be declared as pointer to const. However it seems that 'button_press_event' is a callback function, if 'drawing' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2343:18: note: You might need to cast the function pointer here + G_CALLBACK (button_press_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: note: Parameter 'drawing' can be declared as pointer to const + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: style: Parameter 'event' can be declared as pointer to const. However it seems that 'focus_event' is a callback function, if 'event' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2347:18: note: You might need to cast the function pointer here + G_CALLBACK (focus_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: note: Parameter 'event' can be declared as pointer to const + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: style: Parameter 'a' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'a' is declared with const you might also need to cast function pointer(s). [constParameterCallback] +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: note: Parameter 'a' can be declared as pointer to const +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: style: Parameter 'b' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'b' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: note: Parameter 'b' can be declared as pointer to const + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1863:9: style: Variable 'pind' can be declared as pointer to const [constVariablePointer] + Atom *pind = drawing->xkb->names->indicators; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2124:60: style: Parameter 'iev' can be declared as pointer to const [constParameterPointer] +process_indicators_state_notify (XkbIndicatorNotifyEvent * iev, + ^ +Checking libcafekbd/cafekbd-keyboard-drawing.c: KBDRAW_DEBUG... +5/10 files checked 77% done +Checking libcafekbd/cafekbd-status.c ... +libcafekbd/cafekbd-status.c:82:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdStatus, cafekbd_status, CTK_TYPE_STATUS_ICON) +^ +6/10 files checked 91% done +Checking libcafekbd/cafekbd-util.c ... +7/10 files checked 93% done +Checking test/cafekbd-indicator-test.c ... +8/10 files checked 94% done +Checking test/cafekbd-keyboard-drawing-test.c ... +test/cafekbd-keyboard-drawing-test.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +Checking test/cafekbd-keyboard-drawing-test.c: HAVE_CONFIG_H... +9/10 files checked 99% done +Checking test/cafekbd-status-test.c ... +test/cafekbd-status-test.c:42:17: style: Variable 'icon' can be declared as pointer to const [constVariablePointer] + CtkStatusIcon *icon; + ^ +10/10 files checked 100% done +nofile:0:0: information: Active checkers: There was critical errors (use --checkers-report= to see details) [checkersReport] + +/usr/bin/cafe-autogen +checking for autoreconf >= 2.53... + testing autoreconf... found 2.72 +checking for pkg-config >= 0.14.0... + testing pkg-config... found 1.8.1 +checking for cafe-common >= 0.0.1... + testing cafe-doc-common... found 2.0.0 +Checking for required M4 macros... +Checking for forbidden M4 macros... +Processing ./configure.ac +Running cafe-doc-common... +Running autoreconf... +autoreconf: export WARNINGS=no-portability +autoreconf: Entering directory '.' +autoreconf: running: autopoint --force +Copying file ABOUT-NLS +Copying file config.rpath +Copying file m4/codeset.m4 +Copying file m4/extern-inline.m4 +Copying file m4/fcntl-o.m4 +Copying file m4/gettext.m4 +Copying file m4/glibc2.m4 +Copying file m4/glibc21.m4 +Copying file m4/iconv.m4 +Copying file m4/intdiv0.m4 +Copying file m4/intl.m4 +Copying file m4/intldir.m4 +Copying file m4/intlmacosx.m4 +Copying file m4/intmax.m4 +Copying file m4/inttypes-pri.m4 +Copying file m4/inttypes_h.m4 +Copying file m4/lcmessage.m4 +Copying file m4/lib-ld.m4 +Copying file m4/lib-link.m4 +Copying file m4/lib-prefix.m4 +Copying file m4/lock.m4 +Copying file m4/longlong.m4 +Copying file m4/nls.m4 +Copying file m4/po.m4 +Copying file m4/printf-posix.m4 +Copying file m4/progtest.m4 +Copying file m4/size_max.m4 +Copying file m4/stdint_h.m4 +Copying file m4/threadlib.m4 +Copying file m4/uintmax_t.m4 +Copying file m4/visibility.m4 +Copying file m4/wchar_t.m4 +Copying file m4/wint_t.m4 +Copying file m4/xsize.m4 +Copying file po/Makefile.in.in +Copying file po/Makevars.template +Copying file po/Rules-quot +Copying file po/boldquot.sed +Copying file po/en@boldquot.header +Copying file po/en@quot.header +Copying file po/insert-header.sin +Copying file po/quot.sed +Copying file po/remove-potcdate.sin +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: configure.ac: tracing +autoreconf: running: libtoolize --copy --force +libtoolize: putting auxiliary files in '.'. +libtoolize: copying file './ltmain.sh' +libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. +libtoolize: copying file 'm4/libtool.m4' +libtoolize: copying file 'm4/ltoptions.m4' +libtoolize: copying file 'm4/ltsugar.m4' +libtoolize: copying file 'm4/ltversion.m4' +libtoolize: copying file 'm4/lt~obsolete.m4' +autoreconf: configure.ac: not using Intltool +autoreconf: configure.ac: not using Gtkdoc +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: running: /usr/bin/autoconf --force +autoreconf: running: /usr/bin/autoheader --force +autoreconf: running: automake --add-missing --copy --force-missing +configure.ac:31: installing './compile' +configure.ac:34: installing './config.guess' +configure.ac:34: installing './config.sub' +configure.ac:16: installing './install-sh' +configure.ac:16: installing './missing' +Makefile.am: installing './INSTALL' +libcafekbd/Makefile.am: installing './depcomp' +autoreconf: Leaving directory '.' +Skipping configure process. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +checking for a BSD-compatible install... /usr/bin/install -c +checking whether build environment is sane... yes +checking for a race-free mkdir -p... /usr/bin/mkdir -p +checking for gawk... no +checking for mawk... mawk +checking whether make sets $(MAKE)... yes +checking whether make supports nested variables... yes +checking whether make supports nested variables... (cached) yes +checking whether make supports the include directive... yes (GNU style) +checking for gcc... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the C compiler works... yes +checking for C compiler default output file name... a.out +checking for suffix of executables... +checking whether we are cross compiling... no +checking for suffix of object files... o +checking whether the compiler supports GNU C... yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... rm: cannot remove 'conftest.plist': Is a directory +yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... gcc3 +checking whether C compiler accepts -Werror=unknown-warning-option... no +checking whether C compiler accepts -Wall... yes +checking whether C compiler accepts -Wmissing-prototypes... yes +checking whether C compiler accepts -Wbad-function-cast... yes +checking whether C compiler accepts -Wcast-align... yes +checking whether C compiler accepts -Wextra... yes +checking whether C compiler accepts -Wformat-nonliteral... yes +checking whether C compiler accepts -Wmissing-declarations... yes +checking whether C compiler accepts -Wnested-externs... yes +checking whether C compiler accepts -Wpointer-arith... yes +checking whether C compiler accepts -Wredundant-decls... yes +checking whether C compiler accepts -Wshadow... yes +checking whether C compiler accepts -Wstrict-prototypes... yes +checking whether C compiler accepts -Wunused-macros... yes +checking whether C compiler accepts -Werror=format-security... yes +checking whether C compiler accepts -fstrict-aliasing... yes +checking flags to pass to the C compiler /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing +checking for gcc... (cached) /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the compiler supports GNU C... (cached) yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... (cached) yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... (cached) none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... (cached) yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... (cached) gcc3 +checking build system type... x86_64-pc-linux-gnu +checking host system type... x86_64-pc-linux-gnu +checking how to print strings... printf +checking for a sed that does not truncate output... /usr/bin/sed +checking for grep that handles long lines and -e... /usr/bin/grep +checking for egrep... /usr/bin/grep -E +checking for fgrep... /usr/bin/grep -F +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld +checking if the linker (/usr/bin/ld) is GNU ld... yes +checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B +checking the name lister (/usr/bin/nm -B) interface... rm: cannot remove 'conftest.plist': Is a directory +BSD nm +checking whether ln -s works... yes +checking the maximum length of command line arguments... 3145728 +checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop +checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop +checking for /usr/bin/ld option to reload object files... -r +checking for file... file +checking for objdump... objdump +checking how to recognize dependent libraries... pass_all +checking for dlltool... no +checking how to associate runtime and link libraries... printf %s\n +checking for ranlib... ranlib +checking for ar... ar +checking for archiver @FILE support... rm: cannot remove 'conftest.plist': Is a directory +@ +checking for strip... strip +checking command to parse /usr/bin/nm -B output from /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer object... rm: cannot remove 'conftest.plist': Is a directory +ok +checking for sysroot... no +checking for a working dd... /usr/bin/dd +checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1 +checking for mt... no +checking if : is a manifest tool... no +checking for stdio.h... yes +checking for stdlib.h... yes +checking for string.h... yes +checking for inttypes.h... yes +checking for stdint.h... yes +checking for strings.h... yes +checking for sys/stat.h... yes +checking for sys/types.h... yes +checking for unistd.h... yes +checking for dlfcn.h... yes +checking for objdir... .libs +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -fno-rtti -fno-exceptions... no +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to produce PIC... -fPIC -DPIC +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer PIC flag -fPIC -DPIC works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer static flag -static works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... (cached) yes +checking whether the /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes +checking whether -lc should be explicitly linked in... no +checking dynamic linker characteristics... GNU/Linux ld.so +checking how to hardcode library paths into programs... immediate +checking whether stripping libraries is possible... yes +checking if libtool supports shared libraries... yes +checking whether to build shared libraries... yes +checking whether to build static libraries... yes +checking whether NLS is requested... yes +checking for msgfmt... /usr/bin/msgfmt +checking for gmsgfmt... /usr/bin/msgfmt +checking for xgettext... /usr/bin/xgettext +checking for msgmerge... /usr/bin/msgmerge +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld -m elf_x86_64 +checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes +checking for shared library run path origin... done +checking how to run the C preprocessor... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer -E +checking for egrep -e... (cached) /usr/bin/grep -E +checking for CFPreferencesCopyAppValue... no +checking for CFLocaleCopyCurrent... no +checking for GNU gettext in libc... yes +checking whether to use NLS... yes +checking where the gettext function comes from... libc +checking for glib-compile-resources... /usr/bin/glib-compile-resources +checking for xmllint... /usr/bin/xmllint +checking for setlocale... yes +checking for pkg-config... /usr/bin/pkg-config +checking pkg-config is at least version 0.9.0... yes +checking for glib-2.0 >= 2.50.0... yes +checking for gmodule-2.0... yes +checking for gio-2.0 >= 2.25.0... yes +checking for cdk-3.0 >= 3.22.0... yes +checking for ctk+-3.0 >= 3.22.0 cdk-x11-3.0 >= 3.22.0... yes +checking for libxklavier >= 5.2... yes +checking for X... libraries , headers +checking for gethostbyname... yes +checking for connect... yes +checking for remove... yes +checking for shmat... yes +checking for IceConnectionNumber in -lICE... yes +checking for pkg-config... (cached) /usr/bin/pkg-config +checking pkg-config is at least version 0.16... yes +checking for library containing sqrt... -lm +checking for gobject-introspection... yes +checking that generated files are newer than configure... done +configure: creating ./config.status +config.status: creating Makefile +config.status: creating libcafekbd.pc +config.status: creating libcafekbdui.pc +config.status: creating po/Makefile.in +config.status: creating libcafekbd/Makefile +config.status: creating libcafekbd/org.cafe.peripherals-keyboard-xkb.gschema.xml +config.status: creating test/Makefile +config.status: creating config.h +config.status: executing depfiles commands +config.status: executing libtool commands +config.status: executing po-directories commands +config.status: creating po/POTFILES +config.status: creating po/Makefile + +Configuration: + + prefix: /usr + exec_prefix: ${prefix} + libdir: ${exec_prefix}/lib + bindir: ${exec_prefix}/bin + sbindir: ${exec_prefix}/sbin + sysconfdir: ${prefix}/etc + datadir: ${datarootdir} + source code location: . + compiler: /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer + cflags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + Warning flags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + +scan-build: Analysis run complete. +scan-build: Removing directory '/tmp/scan-build-2025-02-06-115537-11799-1' because it contains no reports. +scan-build: No bugs found. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +make all-recursive +make[1]: Entering directory '/rootdir' +Making all in po +make[2]: Entering directory '/rootdir/po' +make libcafekbd.pot-update +make[3]: Entering directory '/rootdir/po' +sed -e '/^#/d' remove-potcdate.sin > t-remove-potcdate.sed +mv t-remove-potcdate.sed remove-potcdate.sed +package_gnu=""; \ +test -n "$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L .. -maxdepth 1 -type f \ + -size -10000000c -exec grep 'GNU libcafekbd' \ + /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU libcafekbd' ../* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ +}; \ +if test "$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ +else \ + package_prefix=''; \ +fi; \ +if test -n '' || test 'https://github.com/cafe-desktop/libcafekbd' = '@'PACKAGE_BUGREPORT'@'; then \ + msgid_bugs_address=''; \ +else \ + msgid_bugs_address='https://github.com/cafe-desktop/libcafekbd'; \ +fi; \ +case `/usr/bin/xgettext --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ + *) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --package-name="${package_prefix}libcafekbd" \ + --package-version='1.25.0' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ +esac +test ! -f libcafekbd.po || { \ + if test -f ./libcafekbd.pot-header; then \ + sed -e '1,/^#$/d' < libcafekbd.po > libcafekbd.1po && \ + cat ./libcafekbd.pot-header libcafekbd.1po > libcafekbd.po; \ + rm -f libcafekbd.1po; \ + fi; \ + if test -f ./libcafekbd.pot; then \ + sed -f remove-potcdate.sed < ./libcafekbd.pot > libcafekbd.1po && \ + sed -f remove-potcdate.sed < libcafekbd.po > libcafekbd.2po && \ + if cmp libcafekbd.1po libcafekbd.2po >/dev/null 2>&1; then \ + rm -f libcafekbd.1po libcafekbd.2po libcafekbd.po; \ + else \ + rm -f libcafekbd.1po libcafekbd.2po ./libcafekbd.pot && \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ + else \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ +} +make[3]: Leaving directory '/rootdir/po' +test ! -f ./libcafekbd.pot || \ + test -z "af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo" || make af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo +make[3]: Entering directory '/rootdir/po' +/usr/bin/msgmerge --update --quiet --lang=af af.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=am am.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=an an.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ar ar.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=as as.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ast ast.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=az az.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=be be.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn bn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bg bg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn_IN bn_IN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=br br.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bs bs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca ca.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cmn cmn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca@valencia ca@valencia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=crh crh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cs cs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cv cv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=csb csb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cy cy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=da da.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de de.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=dz dz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de_CH de_CH.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=el el.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_AU en_AU.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_CA en_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_GB en_GB.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eo eo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es es.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_419 es_419.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_AR es_AR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CL es_CL.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CO es_CO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CR es_CR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_EC es_EC.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_ES es_ES.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_DO es_DO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_MX es_MX.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_NI es_NI.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PA es_PA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PE es_PE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PR es_PR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_SV es_SV.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_US es_US.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_VE es_VE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_UY es_UY.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=et et.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eu eu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fa fa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fil fil.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fi fi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fo fo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr fr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr_CA fr_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=frp frp.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fur fur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fy fy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ga ga.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gd gd.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gl gl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gu gu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ha ha.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=he he.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hi hi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hu hu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hr hr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hy hy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=id id.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ie ie.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ia ia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ig ig.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=is is.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ja ja.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=it it.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=jv jv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ka ka.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kab kab.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kk kk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=km km.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kn kn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ko ko.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ks ks.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku_IQ ku_IQ.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku ku.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=la la.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ky ky.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=li li.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lb lb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lo lo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lt lt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lv lv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mai mai.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mg mg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mi mi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mk mk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ml ml.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mn mn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mr mr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ms ms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=my my.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nah nah.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nb nb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nds nds.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ne ne.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nl nl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nn nn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nso nso.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nqo nqo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=oc oc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=or or.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=om om.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pa pa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pl pl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ps ps.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt pt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pms pms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt_BR pt_BR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ru ru.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ro ro.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=rw rw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sc sc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=si si.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sco sco.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sk sk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sl sl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=so so.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr sr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sq sq.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr@latin sr@latin.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sv sv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sw sw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ta ta.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tg tg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=te te.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=th th.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tk tk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tl tl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ts ts.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tt tt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tr tr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ug ug.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uk uk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur ur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uz uz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur_PK ur_PK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=wa wa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=vi vi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=xh xh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yi yi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yo yo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_TW zh_TW.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_HK zh_HK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_CN zh_CN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zu zu.po libcafekbd.pot +rm -f af.gmo && /usr/bin/msgfmt -c --statistics --verbose -o af.gmo af.po +rm -f am.gmo && /usr/bin/msgfmt -c --statistics --verbose -o am.gmo am.po +af.po: 7 translated messages, 84 untranslated messages. +am.po: 54 translated messages, 37 untranslated messages. +rm -f an.gmo && /usr/bin/msgfmt -c --statistics --verbose -o an.gmo an.po +rm -f ar.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ar.gmo ar.po +rm -f ast.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ast.gmo ast.po +rm -f as.gmo && /usr/bin/msgfmt -c --statistics --verbose -o as.gmo as.po +rm -f az.gmo && /usr/bin/msgfmt -c --statistics --verbose -o az.gmo az.po +an.po:7: warning: header field 'Last-Translator' still has the initial default value +an.po: 0 translated messages, 91 untranslated messages. +ar.po: 50 translated messages, 41 untranslated messages. +ast.po: 47 translated messages, 44 untranslated messages. +az.po: 9 translated messages, 82 untranslated messages. +as.po: 41 translated messages, 50 untranslated messages. +rm -f be.gmo && /usr/bin/msgfmt -c --statistics --verbose -o be.gmo be.po +rm -f bg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bg.gmo bg.po +rm -f bn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn.gmo bn.po +rm -f bn_IN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn_IN.gmo bn_IN.po +bg.po: 54 translated messages, 37 untranslated messages. +be.po: 46 translated messages, 45 untranslated messages. +bn_IN.po: 41 translated messages, 50 untranslated messages. +bn.po: 43 translated messages, 48 untranslated messages. +rm -f bs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bs.gmo bs.po +rm -f ca.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca.gmo ca.po +rm -f br.gmo && /usr/bin/msgfmt -c --statistics --verbose -o br.gmo br.po +ca.po: bs.po: 25 translated messages, 66 untranslated messages. +87 translated messages, 4 untranslated messages. +br.po: 20 translated messages, 71 untranslated messages. +rm -f cmn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cmn.gmo cmn.po +rm -f ca@valencia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca@valencia.gmo ca@valencia.po +rm -f cs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cs.gmo cs.po +rm -f crh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o crh.gmo crh.po +rm -f csb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o csb.gmo csb.po +ca@valencia.po: 54 translated messages, 37 untranslated messages. +cmn.po: 46 translated messages, 45 untranslated messages. +csb.po:7: warning: header field 'Last-Translator' still has the initial default value +csb.po: 0 translated messages, 91 untranslated messages. +cs.po: 81 translated messages, 10 untranslated messages. +crh.po: 11 translated messages, 80 untranslated messages. +rm -f cv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cv.gmo cv.po +rm -f cy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cy.gmo cy.po +rm -f da.gmo && /usr/bin/msgfmt -c --statistics --verbose -o da.gmo da.po +rm -f de.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de.gmo de.po +rm -f de_CH.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de_CH.gmo de_CH.po +cv.po: 0 translated messages, 91 untranslated messages. +cy.po: 26 translated messages, 65 untranslated messages. +de_CH.po: 0 translated messages, 91 untranslated messages. +da.po: 91 translated messages. +de.po: 76 translated messages, 15 untranslated messages. +rm -f dz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o dz.gmo dz.po +rm -f el.gmo && /usr/bin/msgfmt -c --statistics --verbose -o el.gmo el.po +rm -f en_AU.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_AU.gmo en_AU.po +rm -f en_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_CA.gmo en_CA.po +rm -f en_GB.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_GB.gmo en_GB.po +el.po: 54 translated messages, 37 untranslated messages. +dz.po: 39 translated messages, 52 untranslated messages. +en_AU.po: 54 translated messages, 37 untranslated messages. +rm -f eo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eo.gmo eo.po +en_CA.po: 10 translated messages, 81 untranslated messages. +rm -f es.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es.gmo es.po +en_GB.po: 54 translated messages, 37 untranslated messages. +rm -f es_419.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_419.gmo es_419.po +es.po: 89 translated messages, 2 untranslated messages. +eo.po: 52 translated messages, 39 untranslated messages. +rm -f es_AR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_AR.gmo es_AR.po +es_419.po: 0 translated messages, 91 untranslated messages. +rm -f es_CL.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CL.gmo es_CL.po +rm -f es_CO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CO.gmo es_CO.po +es_AR.po: 21 translated messages, 70 untranslated messages. +rm -f es_DO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_DO.gmo es_DO.po +rm -f es_CR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CR.gmo es_CR.po +es_CL.po: 3 translated messages, 88 untranslated messages. +es_DO.po: 1 translated message, 90 untranslated messages. +es_CO.po: 49 translated messages, 42 untranslated messages. +rm -f es_EC.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_EC.gmo es_EC.po +rm -f es_ES.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_ES.gmo es_ES.po +es_CR.po: 1 translated message, 90 untranslated messages. +rm -f es_MX.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_MX.gmo es_MX.po +rm -f es_NI.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_NI.gmo es_NI.po +es_ES.po: 1 translated message, 90 untranslated messages. +es_EC.po: 1 translated message, 90 untranslated messages. +es_MX.po: 1 translated message, 90 untranslated messages. +rm -f es_PA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PA.gmo es_PA.po +rm -f es_PE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PE.gmo es_PE.po +es_NI.po: 1 translated message, 90 untranslated messages. +rm -f es_PR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PR.gmo es_PR.po +rm -f es_SV.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_SV.gmo es_SV.po +es_PE.po: 1 translated message, 90 untranslated messages. +es_PA.po: 1 translated message, 90 untranslated messages. +es_PR.po: 1 translated message, 90 untranslated messages. +rm -f es_US.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_US.gmo es_US.po +es_SV.po: 1 translated message, 90 untranslated messages. +rm -f es_UY.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_UY.gmo es_UY.po +es_US.po: 0 translated messages, 91 untranslated messages. +rm -f et.gmo && /usr/bin/msgfmt -c --statistics --verbose -o et.gmo et.po +rm -f es_VE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_VE.gmo es_VE.po +rm -f eu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eu.gmo eu.po +es_UY.po: 1 translated message, 90 untranslated messages. +et.po: 54 translated messages, 37 untranslated messages. +rm -f fa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fa.gmo fa.po +es_VE.po: 1 translated message, 90 untranslated messages. +eu.po: 54 translated messages, 37 untranslated messages. +rm -f fi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fi.gmo fi.po +fa.po: 11 translated messages, 80 untranslated messages. +rm -f fil.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fil.gmo fil.po +rm -f fr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr.gmo fr.po +rm -f fo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fo.gmo fo.po +fi.po: 48 translated messages, 43 untranslated messages. +rm -f fr_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr_CA.gmo fr_CA.po +fil.po: fo.po: 0 translated messages, 91 untranslated messages. +0 translated messages, 91 untranslated messages. +fr.po: 67 translated messages, 24 untranslated messages. +rm -f frp.gmo && /usr/bin/msgfmt -c --statistics --verbose -o frp.gmo frp.po +fr_CA.po: 3 translated messages, 88 untranslated messages. +rm -f fy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fy.gmo fy.po +rm -f fur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fur.gmo fur.po +rm -f ga.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ga.gmo ga.po +rm -f gd.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gd.gmo gd.po +frp.po: 7 translated messages, 84 untranslated messages. +fy.po: 4 translated messages, 87 untranslated messages. +fur.po: 4 translated messages, 87 untranslated messages. +gd.po: 0 translated messages, 91 untranslated messages. +ga.po: 41 translated messages, 50 untranslated messages. +rm -f gl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gl.gmo gl.po +rm -f gu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gu.gmo gu.po +rm -f ha.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ha.gmo ha.po +rm -f he.gmo && /usr/bin/msgfmt -c --statistics --verbose -o he.gmo he.po +rm -f hi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hi.gmo hi.po +gl.po: 89 translated messages, 2 untranslated messages. +ha.po: 5 translated messages, 86 untranslated messages. +gu.po: rm -f hr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hr.gmo hr.po +43 translated messages, 48 untranslated messages. +hi.po: 45 translated messages, 46 untranslated messages. +he.po: 54 translated messages, 37 untranslated messages. +rm -f hu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hu.gmo hu.po +rm -f hy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hy.gmo hy.po +hr.po: 54 translated messages, 37 untranslated messages. +rm -f id.gmo && /usr/bin/msgfmt -c --statistics --verbose -o id.gmo id.po +rm -f ia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ia.gmo ia.po +hy.po: 54 translated messages, 37 untranslated messages. +hu.po: 54 translated messages, 37 untranslated messages. +id.po: 91 translated messages. +rm -f ie.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ie.gmo ie.po +ia.po: 3 translated messages, 88 untranslated messages. +rm -f ig.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ig.gmo ig.po +rm -f is.gmo && /usr/bin/msgfmt -c --statistics --verbose -o is.gmo is.po +rm -f it.gmo && /usr/bin/msgfmt -c --statistics --verbose -o it.gmo it.po +ie.po: 45 translated messages, 46 untranslated messages. +ig.po: 5 translated messages, 86 untranslated messages. +rm -f ja.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ja.gmo ja.po +is.po: 12 translated messages, 79 untranslated messages. +it.po: 91 translated messages. +rm -f jv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o jv.gmo jv.po +rm -f kab.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kab.gmo kab.po +rm -f ka.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ka.gmo ka.po +ja.po: 54 translated messages, 37 untranslated messagesrm -f kk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kk.gmo kk.po +. +jv.po: 2 translated messages, 89 untranslated messages. +kab.po: 4 translated messages, 87 untranslated messages. +rm -f km.gmo && /usr/bin/msgfmt -c --statistics --verbose -o km.gmo km.po +kk.po: ka.po: 37 translated messages, 54 untranslated messages. +24 translated messages, 67 untranslated messages. +km.po:7: warning: header field 'Last-Translator' still has the initial default value +rm -f kn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kn.gmo kn.po +km.po: 0 translated messages, 91 untranslated messages. +rm -f ko.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ko.gmo ko.po +rm -f ks.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ks.gmo ks.po +rm -f ku.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku.gmo ku.po +kn.po: 43 translated messagesrm -f ku_IQ.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku_IQ.gmo ku_IQ.po +, 48 untranslated messages. +ko.po: 54 translated messages, 37 untranslated messages. +ks.po: 3 translated messages, 88 untranslated messages. +ku.po: 10 translated messages, 81 untranslated messages. +rm -f ky.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ky.gmo ky.po +ku_IQ.po: 16 translated messages, 75 untranslated messages. +rm -f lb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lb.gmo lb.po +rm -f la.gmo && /usr/bin/msgfmt -c --statistics --verbose -o la.gmo la.po +rm -f li.gmo && /usr/bin/msgfmt -c --statistics --verbose -o li.gmo li.po +ky.po: 26 translated messages, 65 untranslated messages. +rm -f lo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lo.gmo lo.po +lb.po:7: warning: header field 'Last-Translator' still has the initial default value +li.po:7: warning: header field 'Last-Translator' still has the initial default value +li.po: 0 translated messages, 91 untranslated messages. +lb.po: 0 translated messages, 91 untranslated messages. +rm -f lt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lt.gmo lt.po +la.po: 2 translated messages, 89 untranslated messages. +lo.po:7: warning: header field 'Last-Translator' still has the initial default value +lo.po: 0 translated messages, 91 untranslated messages. +rm -f lv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lv.gmo lv.po +rm -f mai.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mai.gmo mai.po +rm -f mg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mg.gmo mg.po +lt.po: 91 translated messages. +rm -f mi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mi.gmo mi.po +mai.po: 18 translated messages, 73 untranslated messages. +mg.po: 10 translated messages, 81 untranslated messages. +lv.po: 49 translated messages, 42 untranslated messages. +rm -f mk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mk.gmo mk.po +mi.po:7: warning: header field 'Last-Translator' still has the initial default value +rm -f ml.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ml.gmo ml.po +mi.po: 0 translated messages, 91 untranslated messages. +mk.po: 39 translated messages, 52 untranslated messages. +rm -f mr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mr.gmo mr.po +rm -f mn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mn.gmo mn.po +ml.po: 41 translated messages, 50 untranslated messages. +rm -f ms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ms.gmo ms.po +mn.po: 10 translated messages, 81 untranslated messages. +rm -f my.gmo && /usr/bin/msgfmt -c --statistics --verbose -o my.gmo my.po +mr.po: 47 translated messages, 44 untranslated messages. +rm -f nah.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nah.gmo nah.po +ms.po: 91 translated messages. +rm -f nb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nb.gmo nb.po +rm -f nds.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nds.gmo nds.po +my.po:7: warning: header field 'Last-Translator' still has the initial default value +my.po: 0 translated messages, 91 untranslated messages. +nah.po: 0 translated messages, 91 untranslated messages. +rm -f ne.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ne.gmo ne.po +nb.po: 91 translated messages. +rm -f nl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nl.gmo nl.po +nds.po: 12 translated messages, 79 untranslated messages. +rm -f nn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nn.gmo nn.po +ne.po: 13 translated messages, 78 untranslated messages. +rm -f nqo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nqo.gmo nqo.po +nl.po: 91 translated messages. +nn.po: 40 translated messages, 51 untranslated messages. +rm -f nso.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nso.gmo nso.po +rm -f oc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o oc.gmo oc.po +rm -f om.gmo && /usr/bin/msgfmt -c --statistics --verbose -o om.gmo om.po +nqo.po: 0 translated messages, 91 untranslated messagesnso.po: 3 translated messages, 88 untranslated messages. +. +rm -f or.gmo && /usr/bin/msgfmt -c --statistics --verbose -o or.gmo or.po +oc.po: 68 translated messages, 23 untranslated messages. +om.po: 0 translated messages, 91 untranslated messages. +rm -f pa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pa.gmo pa.po +rm -f pms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pms.gmo pms.po +or.po: 41 translated messages, 50 untranslated messages. +rm -f pl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pl.gmo pl.po +rm -f ps.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ps.gmo ps.po +rm -f pt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt.gmo pt.po +pa.po: 46 translated messages, 45 untranslated messages. +pl.po: 55 translated messages, 36 untranslated messages. +pms.po: 3 translated messages, 88 untranslated messages. +ps.po: 6 translated messages, 85 untranslated messages. +pt.po: 84 translated messages, 7 untranslated messages. +rm -f pt_BR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt_BR.gmo pt_BR.po +rm -f ro.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ro.gmo ro.po +rm -f ru.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ru.gmo ru.po +rm -f sc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sc.gmo sc.po +rm -f rw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o rw.gmo rw.po +ro.po: 54 translated messages, 37 untranslated messages. +pt_BR.po: 58 translated messages, 33 untranslated messages. +sc.po: 2 translated messages, 89 untranslated messages. +ru.po: 89 translated messages, 2 untranslated messages. +rw.po: 10 translated messages, 81 untranslated messages. +rm -f sco.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sco.gmo sco.po +rm -f si.gmo && /usr/bin/msgfmt -c --statistics --verbose -o si.gmo si.po +rm -f sk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sk.gmo sk.po +rm -f sl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sl.gmo sl.po +rm -f so.gmo && /usr/bin/msgfmt -c --statistics --verbose -o so.gmo so.po +sco.po: 0 translated messages, 91 untranslated messages. +so.po: 0 translated messages, 91 untranslated messages. +sl.po: 55 translated messages, 36 untranslated messages. +si.po: 36 translated messages, 55 untranslated messages. +rm -f sq.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sq.gmo sq.po +sk.po: 54 translated messages, 37 untranslated messages. +rm -f sr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr.gmo sr.po +rm -f sr@latin.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr@latin.gmo sr@latin.po +rm -f sv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sv.gmo sv.po +sq.po: 52 translated messages, 39 untranslated messages. +rm -f sw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sw.gmo sw.po +sv.po: 80 translated messages, 11 untranslated messages. +rm -f ta.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ta.gmo ta.po +sr.po: 91 translated messages. +sr@latin.po: 46 translated messages, 45 untranslated messages. +sw.po: 0 translated messages, 91 untranslated messages. +rm -f te.gmo && /usr/bin/msgfmt -c --statistics --verbose -o te.gmo te.po +rm -f th.gmo && /usr/bin/msgfmt -c --statistics --verbose -o th.gmo th.po +rm -f tg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tg.gmo tg.po +ta.po: 46 translated messages, 45 untranslated messages. +rm -f tk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tk.gmo tk.po +th.po: 45 translated messages, 46 untranslated messages. +te.po: 41 translated messages, 50 untranslated messages. +tg.po: 0 translated messages, 91 untranslated messages. +rm -f tl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tl.gmo tl.po +tk.po: 7 translated messages, 84 untranslated messages. +rm -f ts.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ts.gmo ts.po +rm -f tr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tr.gmo tr.po +rm -f tt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tt.gmo tt.po +tl.po: 0 translated messages, 91 untranslated messages. +ts.po: 0 translated messages, 91 untranslated messages. +tr.po: 58 translated messages, 33 untranslated messagestt.po:7: warning: header field 'Last-Translator' still has the initial default value +. +tt.po: 0 translated messages, 91 untranslated messages. +rm -f ug.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ug.gmo ug.po +rm -f uk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uk.gmo uk.po +rm -f ur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur.gmo ur.po +rm -f uz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uz.gmo uz.po +rm -f ur_PK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur_PK.gmo ur_PK.po +ug.po: 6 translated messages, 85 untranslated messages. +ur.po: 7 translated messages, 84 untranslated messages. +uk.po: 58 translated messages, 33 untranslated messages. +rm -f vi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o vi.gmo vi.po +uz.po: 26 translated messages, 65 untranslated messages. +ur_PK.po:7: warning: header field 'Last-Translator' still has the initial default value +ur_PK.po: 0 translated messages, 91 untranslated messages. +rm -f xh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o xh.gmo xh.po +rm -f wa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o wa.gmo wa.po +vi.po: rm -f yi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yi.gmo yi.po +52 translated messages, 39 untranslated messages. +xh.po: 8 translated messagesrm -f yo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yo.gmo yo.po +, 83 untranslated messages. +yi.po:7: warning: header field 'Last-Translator' still has the initial default value +yi.po: 0 translated messages, 91 untranslated messages. +wa.po: 9 translated messages, 82 untranslated messages. +rm -f zh_CN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_CN.gmo zh_CN.po +yo.po: 5 translated messages, 86 untranslated messages. +rm -f zh_HK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_HK.gmo zh_HK.po +rm -f zh_TW.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_TW.gmo zh_TW.po +zh_CN.po: 63 translated messages, 28 untranslated messages. +rm -f zu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zu.gmo zu.po +zh_HK.po: 47 translated messages, 44 untranslated messages. +zh_TW.po: 91 translated messages. +zu.po: 3 translated messages, 88 untranslated messages. +make[3]: Leaving directory '/rootdir/po' +touch stamp-po +make[2]: Leaving directory '/rootdir/po' +Making all in libcafekbd +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml + GEN cafekbd-indicator-marshal.h + GEN cafekbd-keyboard-drawing-marshal.h +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... +INFO: Reading ./cafekbd-indicator-marshal.list... + GEN cafekbd-indicator-marshal.c + GEN cafekbd-keyboard-drawing-marshal.c +INFO: Reading ./cafekbd-indicator-marshal.list... +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... +make all-am +make[3]: Entering directory '/rootdir/libcafekbd' + CC libcafekbd_la-cafekbd-desktop-config.lo + CC libcafekbd_la-cafekbd-keyboard-config.lo + CC libcafekbd_la-cafekbd-util.lo + CC libcafekbdui_la-cafekbd-indicator-config.lo + CC libcafekbdui_la-cafekbd-indicator.lo +cafekbd-desktop-config.c: In function 'cafekbd_desktop_config_load_from_gsettings': +cafekbd-desktop-config.c:176:38: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 176 | || config->default_group >= + | ^~ +cafekbd-indicator-config.c: In function 'cafekbd_indicator_config_get_images_file': +cafekbd-indicator-config.c:152:59: warning: comparison of integer expressions of different signedness: 'guint' {aka 'unsigned int'} and 'int' [-Wsign-compare] + 152 | (g_strv_length (kbd_config->layouts_variants) > group)) { + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_extract_layout_name': +cafekbd-indicator.c:293:19: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 293 | if (group < g_strv_length (short_group_names)) { + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_prepare_drawing': +cafekbd-indicator.c:418:31: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 418 | if (group + 1 == + | ^~ +cafekbd-indicator.c: In function 'cafekbd_indicator_update_tooltips': +cafekbd-indicator.c:446:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 446 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-indicator.c:450:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 450 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-indicator.c: In function 'cafekbd_indicator_kbd_cfg_callback': +cafekbd-indicator.c:61:44: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 61 | CafekbdIndicator * gki = (CafekbdIndicator*)cur->data; + | ^~~ +cafekbd-indicator.c:561:9: note: in expansion of macro 'ForAllIndicators' + 561 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-indicator.c:539:55: note: shadowed declaration is here + 539 | cafekbd_indicator_kbd_cfg_callback (CafekbdIndicator *gki G_GNUC_UNUSED) +cafekbd-indicator.c: In function 'cafekbd_indicator_start_listen': +cafekbd-indicator.c:647:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 647 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:650:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 650 | (CdkFilterFunc) + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_stop_listen': +cafekbd-indicator.c:663:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 663 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:667:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 667 | (CdkFilterFunc) cafekbd_indicator_filter_x_evt, NULL); + | ^ + CC libcafekbdui_la-cafekbd-status.lo +cafekbd-status.c: In function 'cafekbd_status_render_cairo': +cafekbd-status.c:214:23: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 214 | if (group + 1 == xkl_engine_get_num_groups (globals.engine)) { + | ^~ +cafekbd-status.c: In function 'cafekbd_status_prepare_drawing': +cafekbd-status.c:376:51: warning: cast between incompatible function types from 'void (*)(void *)' to 'void (*)(guchar *, void *)' {aka 'void (*)(unsigned char *, void *)'} [-Wcast-function-type] + 376 | (GdkPixbufDestroyNotify) + | ^ +cafekbd-status.c: In function 'cafekbd_status_update_tooltips': +cafekbd-status.c:395:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 395 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-status.c:399:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 399 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-status.c: In function 'cafekbd_status_kbd_cfg_callback': +cafekbd-status.c:77:41: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 77 | CafekbdStatus * gki = (CafekbdStatus*)cur->data; + | ^~~ +cafekbd-status.c:508:9: note: in expansion of macro 'ForAllIndicators' + 508 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-status.c:484:49: note: shadowed declaration is here + 484 | cafekbd_status_kbd_cfg_callback (CafekbdStatus *gki G_GNUC_UNUSED) +cafekbd-status.c: In function 'cafekbd_status_start_listen': +cafekbd-status.c:594:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 594 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:597:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 597 | (CdkFilterFunc) cafekbd_status_filter_x_evt, + | ^ +cafekbd-status.c: In function 'cafekbd_status_stop_listen': +cafekbd-status.c:610:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 610 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:614:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 614 | (CdkFilterFunc) cafekbd_status_filter_x_evt, NULL); + | ^ + CC libcafekbdui_la-cafekbd-indicator-marshal.lo +cafekbd-indicator-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ + CC libcafekbdui_la-cafekbd-keyboard-drawing-marshal.lo +cafekbd-keyboard-drawing-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + CC libcafekbdui_la-cafekbd-keyboard-drawing.lo +cafekbd-keyboard-drawing.c: In function 'draw_polygon': +cafekbd-keyboard-drawing.c:322:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 322 | for (i = 0; i < num_points; i++) { + | ^ +cafekbd-keyboard-drawing.c: In function 'process_indicators_state_notify': +cafekbd-keyboard-drawing.c:2131:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'long unsigned int' [-Wsign-compare] + 2131 | for (i = 0; i <= drawing->xkb->indicators->phys_indicators; i++) + | ^~ +cafekbd-keyboard-drawing.c: In function 'cafekbd_keyboard_drawing_get_type': +cafekbd-keyboard-drawing.c:2394:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawingClass *)' {aka 'void (*)(struct _CafekbdKeyboardDrawingClass *)'} to 'void (*)(void *, void *)' [-Wcast-function-type] + 2394 | (GClassInitFunc) cafekbd_keyboard_drawing_class_init, + | ^ +cafekbd-keyboard-drawing.c:2399:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawing *)' {aka 'void (*)(struct _CafekbdKeyboardDrawing *)'} to 'void (*)(GTypeInstance *, void *)' {aka 'void (*)(struct _GTypeInstance *, void *)'} [-Wcast-function-type] + 2399 | (GInstanceInitFunc) cafekbd_keyboard_drawing_init, + | ^ + GEN org.cafe.peripherals-keyboard-xkb.gschema.valid + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:114:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 114 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbd.la + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspect_nwrjnbg/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspect_nwrjnbg/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspect_nwrjnbg/Cafekbd-1.0.c:239:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 239 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspect_nwrjnbg/Cafekbd-1.0.c:246:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 246 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspect_nwrjnbg/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +5 warnings generated. + GICOMP Cafekbd-1.0.gir +make[3]: Leaving directory '/rootdir/libcafekbd' +make[2]: Leaving directory '/rootdir/libcafekbd' +Making all in test +make[2]: Entering directory '/rootdir/test' + CC cafekbd_indicator_test-cafekbd-indicator-test.o + CC cafekbd_keyboard_drawing_test-cafekbd-keyboard-drawing-test.o + CC cafekbd_status_test-cafekbd-status-test.o +cafekbd-keyboard-drawing-test.c:187:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 187 | g_print ("kbdraw %s\n", VERSION); + | ^~~~~~~ +cafekbd-keyboard-drawing-test.c:194:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 194 | g_printerr ("--groups: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:199:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 199 | g_printerr ("--levels: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:225:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 225 | cafekbd_keyboard_drawing_set_track_modifiers + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:228:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 228 | cafekbd_keyboard_drawing_set_track_config + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:248:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 248 | names.keycodes = keycodes; + | ^~~~~~~~ +cafekbd-keyboard-drawing-test.c:256:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 256 | names.geometry = geometry; + | ^~~~~~~~ +7 warnings generated. + CCLD cafekbd-keyboard-drawing-test + CCLD cafekbd-indicator-test + CCLD cafekbd-status-test +make[2]: Leaving directory '/rootdir/test' +make[2]: Entering directory '/rootdir' +make[2]: Leaving directory '/rootdir' +make[1]: Leaving directory '/rootdir' +scan-build: Analysis run complete. +scan-build: 11 bugs found. +scan-build: Run 'scan-view /rootdir/html-report/2025-02-06-115547-14435-1' to examine bug reports. +Making check in po +make[1]: Entering directory '/rootdir/po' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/po' +Making check in libcafekbd +make[1]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +make check-am +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:113:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 113 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspectv03xj95e/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectv03xj95e/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectv03xj95e/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +3 warnings generated. + GICOMP Cafekbd-1.0.gir +make[2]: Leaving directory '/rootdir/libcafekbd' +make[1]: Leaving directory '/rootdir/libcafekbd' +Making check in test +make[1]: Entering directory '/rootdir/test' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/test' +make[1]: Entering directory '/rootdir' +make[1]: Leaving directory '/rootdir' + Listing... 0% Listing... 0% Listing... 0% adduser/testing,now 3.137 all [installed,automatic] +advaita-icon-theme/unknown,now 3.25.0-1 all [installed,automatic] +apt/testing,now 2.9.26 amd64 [installed,automatic] +aptitude-common/testing,now 0.8.13-6.1 all [installed,automatic] +aptitude/testing,now 0.8.13-6.1 amd64 [installed] +at-spi2-common/testing,now 2.55.0.1-1 all [installed,automatic] +at-spi2-core/testing,now 2.55.0.1-1 amd64 [installed,automatic] +autoconf-archive/testing,now 20220903-3 all [installed] +autoconf/testing,now 2.72-3 all [installed,automatic] +automake/testing,now 1:1.16.5-1.3 all [installed,automatic] +autopoint/testing,now 0.23.1-1 all [installed] +autotools-dev/testing,now 20220109.1 all [installed,automatic] +base-files/testing,now 13.6 amd64 [installed,automatic] +base-passwd/testing,now 3.6.6 amd64 [installed,automatic] +bash/testing,now 5.2.37-1 amd64 [installed,automatic] +binfmt-support/testing,now 2.2.2-7 amd64 [installed,automatic] +binutils-common/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils-gold-x86-64-linux-gnu/testing,now 2.44-1 amd64 [installed,automatic] +binutils-gold/testing,now 2.44-1 amd64 [installed,automatic] +binutils-x86-64-linux-gnu/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +bsdutils/testing,now 1:2.40.4-2 amd64 [installed,automatic] +build-essential/testing,now 12.12 amd64 [installed,automatic] +bzip2-doc/testing,now 1.0.8-6 all [installed,automatic] +bzip2/testing,now 1.0.8-6 amd64 [installed,automatic] +ca-certificates/testing,now 20241223 all [installed,automatic] +clang-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools/testing,now 1:19.0-63 amd64 [installed] +clang/testing,now 1:19.0-63 amd64 [installed] +coreutils/testing,now 9.5-1+b1 amd64 [installed,automatic] +cpp-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-14/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cpp/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cppcheck/testing,now 2.16.0-1 amd64 [installed] +ctk-update-icon-cache/unknown,now 3.25.6-1 amd64 [installed,automatic] +dash/testing,now 0.5.12-12 amd64 [installed,automatic] +dbus-bin/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-daemon/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-session-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-system-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-user-session/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus/testing,now 1.16.0-1 amd64 [installed,automatic] +dconf-gsettings-backend/testing,now 0.40.0-5 amd64 [installed,automatic] +dconf-service/testing,now 0.40.0-5 amd64 [installed,automatic] +debconf/testing,now 1.5.89 all [installed,automatic] +debian-archive-keyring/testing,now 2023.4 all [installed,automatic] +debianutils/testing,now 5.21 amd64 [installed,automatic] +diffutils/testing,now 1:3.10-2 amd64 [installed,automatic] +dirmngr/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +dmsetup/testing,now 2:1.02.201-1 amd64 [installed,automatic] +dpkg-dev/testing,now 1.22.14 all [installed,automatic] +dpkg/testing,now 1.22.14 amd64 [installed,automatic] +e2fsprogs/testing,now 1.47.2-1 amd64 [installed,automatic] +expect/testing,now 5.45.4-3+b1 amd64 [installed] +fakeroot/testing,now 1.37-1 amd64 [installed,automatic] +file/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +findutils/testing,now 4.10.0-3 amd64 [installed,automatic] +fontconfig-config/testing,now 2.15.0-2 amd64 [installed,automatic] +fontconfig/testing,now 2.15.0-2 amd64 [installed,automatic] +fonts-dejavu-core/testing,now 2.37-8 all [installed,automatic] +fonts-dejavu-mono/testing,now 2.37-8 all [installed,automatic] +g++-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-14/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +g++/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc-14-base/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gettext-base/testing,now 0.23.1-1 amd64 [installed,automatic] +gettext/testing,now 0.23.1-1 amd64 [installed] +gir1.2-atk-1.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-atspi-2.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-ctk-3.0/unknown,now 3.25.6-1 amd64 [installed] +gir1.2-freedesktop-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-freedesktop/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-gdkpixbuf-2.0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +gir1.2-girepository-2.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-girepository-2.0/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-glib-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-glib-2.0/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-harfbuzz-0.0/testing,now 10.2.0-1 amd64 [installed,automatic] +gir1.2-pango-1.0/testing,now 1.56.1-1 amd64 [installed,automatic] +gir1.2-xkl-1.0/testing,now 5.4-5+b2 amd64 [installed,automatic] +girepository-tools/testing,now 2.82.4-2 amd64 [installed,automatic] +git-man/testing,now 1:2.47.2-0.1 all [installed,automatic] +git/testing,now 1:2.47.2-0.1 amd64 [installed] +gnupg-l10n/testing,now 2.2.46-1 all [installed,automatic] +gnupg-utils/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gnupg/testing,now 2.2.46-1 all [installed,automatic] +gobject-introspection-bin/testing,now 1.82.0-4 amd64 [installed,automatic] +gobject-introspection/testing,now 1.82.0-4 amd64 [installed] +gpg-agent/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg-wks-client/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgconf/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgsm/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgv/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +grep/testing,now 3.11-4 amd64 [installed,automatic] +gsettings-desktop-schemas/testing,now 47.1-1 all [installed,automatic] +gzip/testing,now 1.13-1 amd64 [installed,automatic] +hicolor-icon-theme/testing,now 0.18-2 all [installed,automatic] +hostname/testing,now 3.25 amd64 [installed,automatic] +icu-devtools/testing,now 72.1-6 amd64 [installed,automatic] +init-system-helpers/testing,now 1.68 all [installed,automatic] +krb5-locales/testing,now 1.21.3-4 all [installed,automatic] +less/testing,now 643-1 amd64 [installed,automatic] +lib32gcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +lib32stdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libacl1/testing,now 2.3.2-2+b1 amd64 [installed,automatic] +libalgorithm-diff-perl/testing,now 1.201-1 all [installed,automatic] +libalgorithm-diff-xs-perl/testing,now 0.04-8+b4 amd64 [installed,automatic] +libalgorithm-merge-perl/testing,now 0.08-5 all [installed,automatic] +libapparmor1/testing,now 3.1.7-1+b3 amd64 [installed,automatic] +libapt-pkg6.0t64/testing,now 2.9.26 amd64 [installed,automatic] +libasan8/testing,now 14.2.0-12 amd64 [installed,automatic] +libassuan9/testing,now 3.0.1-2 amd64 [installed,automatic] +libatk-bridge2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk-bridge2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatomic1/testing,now 14.2.0-12 amd64 [installed,automatic] +libatspi2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatspi2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libattr1/testing,now 1:2.5.2-2 amd64 [installed,automatic] +libaudit-common/testing,now 1:4.0.2-2 all [installed,automatic] +libaudit1/testing,now 1:4.0.2-2+b1 amd64 [installed,automatic] +libavahi-client3/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common-data/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common3/testing,now 0.8-16 amd64 [installed,automatic] +libbinutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libblkid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libblkid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libboost-iostreams1.83.0/testing,now 1.83.0-4 amd64 [installed,automatic] +libbrotli-dev/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbrotli1/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbsd0/testing,now 0.12.2-2 amd64 [installed,automatic] +libbz2-1.0/testing,now 1.0.8-6 amd64 [installed,automatic] +libbz2-dev/testing,now 1.0.8-6 amd64 [installed,automatic] +libc-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc-dev-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc6-dev/testing,now 2.40-6 amd64 [installed,automatic] +libc6-i386/testing,now 2.40-6 amd64 [installed,automatic] +libc6/testing,now 2.40-6 amd64 [installed,automatic] +libcairo-gobject2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo-script-interpreter2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2-dev/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcap-dev/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcap-ng0/testing,now 0.8.5-4 amd64 [installed,automatic] +libcap2/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcbor0.10/testing,now 0.10.2-2 amd64 [installed,automatic] +libcc1-0/testing,now 14.2.0-12 amd64 [installed,automatic] +libclang-common-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-cpp19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-rt-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang1-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libcolord2/testing,now 1.4.7-1+b2 amd64 [installed,automatic] +libcom-err2/testing,now 1.47.2-1 amd64 [installed,automatic] +libcrypt-dev/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcrypt1/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcryptsetup12/testing,now 2:2.7.5-1 amd64 [installed,automatic] +libctf-nobfd0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctf0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctk-3-0/unknown,now 3.25.6-1 amd64 [installed] +libctk-3-bin/unknown,now 3.25.6-1 amd64 [installed,automatic] +libctk-3-common/unknown,now 3.25.6-1 all [installed] +libctk-3-dev/unknown,now 3.25.6-1 amd64 [installed] +libcups2t64/testing,now 2.4.10-2+b1 amd64 [installed,automatic] +libcurl3t64-gnutls/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcurl4t64/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcwidget4/testing,now 0.5.18-6+b2 amd64 [installed,automatic] +libdatrie-dev/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdatrie1/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdav1d7/testing,now 1.5.1-1 amd64 [installed,automatic] +libdb5.3t64/testing,now 5.3.28+dfsg2-9 amd64 [installed,automatic] +libdbus-1-3/testing,now 1.16.0-1 amd64 [installed,automatic] +libdbus-1-dev/testing,now 1.16.0-1 amd64 [installed,automatic] +libdconf1/testing,now 0.40.0-5 amd64 [installed,automatic] +libdebconfclient0/testing,now 0.277 amd64 [installed,automatic] +libdeflate-dev/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdeflate0/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdevmapper1.02.1/testing,now 2:1.02.201-1 amd64 [installed,automatic] +libdpkg-perl/testing,now 1.22.14 all [installed,automatic] +libdrm-amdgpu1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-common/testing,now 2.4.123-1 all [installed,automatic] +libdrm-intel1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-radeon1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm2/testing,now 2.4.123-1 amd64 [installed,automatic] +libedit2/testing,now 3.1-20250104-1 amd64 [installed,automatic] +libegl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libegl-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1-mesa-dev/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libelf1t64/testing,now 0.192-4 amd64 [installed,automatic] +libepoxy-dev/testing,now 1.5.10-2 amd64 [installed,automatic] +libepoxy0/testing,now 1.5.10-2 amd64 [installed,automatic] +liberror-perl/testing,now 0.17029-2 all [installed,automatic] +libexpat1-dev/testing,now 2.6.4-1 amd64 [installed,automatic] +libexpat1/testing,now 2.6.4-1 amd64 [installed,automatic] +libext2fs2t64/testing,now 1.47.2-1 amd64 [installed,automatic] +libfakeroot/testing,now 1.37-1 amd64 [installed,automatic] +libffi-dev/testing,now 3.4.6-1 amd64 [installed,automatic] +libffi8/testing,now 3.4.6-1 amd64 [installed,automatic] +libfido2-1/testing,now 1.15.0-1+b1 amd64 [installed,automatic] +libfile-fcntllock-perl/testing,now 0.22-4+b4 amd64 [installed,automatic] +libfontconfig-dev/testing,now 2.15.0-2 amd64 [installed,automatic] +libfontconfig1/testing,now 2.15.0-2 amd64 [installed,automatic] +libfreetype-dev/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfreetype6/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfribidi-dev/testing,now 1.0.16-1 amd64 [installed,automatic] +libfribidi0/testing,now 1.0.16-1 amd64 [installed,automatic] +libgbm1/testing,now 24.2.8-1 amd64 [installed,automatic] +libgc1/testing,now 1:8.2.8-1 amd64 [installed,automatic] +libgcc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcrypt20/testing,now 1.11.0-7 amd64 [installed,automatic] +libgdbm-compat4t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdbm6t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-dev/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-bin/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-common/testing,now 2.42.12+dfsg-2 all [installed,automatic] +libgio-2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libgio-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository-1.0-1/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-1.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-2.0-0/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository1.0-dev/testing,now 1.82.0-4 amd64 [installed] +libgl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgl1-mesa-dri/testing,now 24.2.8-1 amd64 [installed,automatic] +libgl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglapi-mesa/testing,now 24.2.8-1 amd64 [installed,automatic] +libgles-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles2/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglib2.0-0t64/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-data/testing,now 2.82.4-2 all [installed,automatic] +libglib2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-dev/testing,now 2.82.4-2 amd64 [installed] +libglvnd-core-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libglx0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgmp10/testing,now 2:6.3.0+dfsg-3 amd64 [installed,automatic] +libgnutls30t64/testing,now 3.8.8-2 amd64 [installed,automatic] +libgomp1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgpg-error-l10n/testing,now 1.51-3 all [installed,automatic] +libgpg-error0/testing,now 1.51-3 amd64 [installed,automatic] +libgpm2/testing,now 1.20.7-11+b2 amd64 [installed,automatic] +libgprofng0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libgraphite2-3/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgraphite2-dev/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgssapi-krb5-2/testing,now 1.21.3-4 amd64 [installed,automatic] +libharfbuzz-cairo0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-dev/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-gobject0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-icu0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-subset0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz0b/testing,now 10.2.0-1 amd64 [installed,automatic] +libhogweed6t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libhwasan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libice-dev/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libice6/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libicu-dev/testing,now 72.1-6 amd64 [installed,automatic] +libicu72/testing,now 72.1-6 amd64 [installed,automatic] +libidn2-0/testing,now 2.3.7-2+b1 amd64 [installed,automatic] +libisl23/testing,now 0.27-1 amd64 [installed,automatic] +libitm1/testing,now 14.2.0-12 amd64 [installed,automatic] +libjansson4/testing,now 2.14-2+b3 amd64 [installed,automatic] +libjbig-dev/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjbig0/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjpeg-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjson-c5/testing,now 0.18+ds-1 amd64 [installed,automatic] +libk5crypto3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkeyutils1/testing,now 1.6.3-4 amd64 [installed,automatic] +libkmod2/testing,now 33+20240816-2 amd64 [installed,automatic] +libkrb5-3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkrb5support0/testing,now 1.21.3-4 amd64 [installed,automatic] +libksba8/testing,now 1.6.7-2+b1 amd64 [installed,automatic] +liblcms2-2/testing,now 2.16-2 amd64 [installed,automatic] +libldap-common/testing,now 2.6.9+dfsg-1 all [installed,automatic] +libldap2/testing,now 2.6.9+dfsg-1 amd64 [installed,automatic] +liblerc-dev/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +liblerc4/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +libllvm19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +liblocale-gettext-perl/testing,now 1.07-7+b1 amd64 [installed,automatic] +liblsan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libltdl-dev/testing,now 2.5.4-2 amd64 [installed,automatic] +libltdl7/testing,now 2.5.4-2 amd64 [installed,automatic] +liblz4-1/testing,now 1.10.0-3 amd64 [installed,automatic] +liblzma-dev/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzma5/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzo2-2/testing,now 2.10-3+b1 amd64 [installed,automatic] +libmagic-mgc/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmagic1t64/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmd0/testing,now 1.1.0-2+b1 amd64 [installed,automatic] +libmount-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libmount1/testing,now 2.40.4-2 amd64 [installed,automatic] +libmpc3/testing,now 1.3.1-1+b3 amd64 [installed,automatic] +libmpfr6/testing,now 4.2.1-1+b2 amd64 [installed,automatic] +libncurses-dev/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncurses6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncursesw6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libnettle8t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libnghttp2-14/testing,now 1.64.0-1 amd64 [installed,automatic] +libnghttp3-9/testing,now 1.6.0-2 amd64 [installed,automatic] +libngtcp2-16/testing,now 1.9.1-1 amd64 [installed,automatic] +libngtcp2-crypto-gnutls8/testing,now 1.9.1-1 amd64 [installed,automatic] +libnpth0t64/testing,now 1.8-2 amd64 [installed,automatic] +libnss-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libobjc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libobjc4/testing,now 14.2.0-12 amd64 [installed,automatic] +libopengl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libopengl0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libp11-kit0/testing,now 0.25.5-3 amd64 [installed,automatic] +libpam-modules-bin/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-modules/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-runtime/testing,now 1.7.0-2 all [installed,automatic] +libpam-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libpam0g/testing,now 1.7.0-2 amd64 [installed,automatic] +libpango-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpango1.0-dev/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangocairo-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoft2-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoxft-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpciaccess0/testing,now 0.17-3+b3 amd64 [installed,automatic] +libpcre2-16-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-32-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-8-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-dev/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-posix3/testing,now 10.44-5 amd64 [installed,automatic] +libperl5.40/testing,now 5.40.0-8 amd64 [installed,automatic] +libpfm4/testing,now 4.13.0+git83-g91970fe-1 amd64 [installed,automatic] +libpipeline1/testing,now 1.5.8-1 amd64 [installed,automatic] +libpixman-1-0/testing,now 0.44.0-3 amd64 [installed,automatic] +libpixman-1-dev/testing,now 0.44.0-3 amd64 [installed,automatic] +libpkgconf3/testing,now 1.8.1-4 amd64 [installed,automatic] +libpng-dev/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng-tools/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng16-16t64/testing,now 1.6.44-3 amd64 [installed,automatic] +libproc2-0/testing,now 2:4.0.4-7 amd64 [installed,automatic] +libpsl5t64/testing,now 0.21.2-1.1+b1 amd64 [installed,automatic] +libpython3-stdlib/testing,now 3.13.1-2 amd64 [installed,automatic] +libpython3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libpython3.13-stdlib/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libquadmath0/testing,now 14.2.0-12 amd64 [installed,automatic] +libreadline8t64/testing,now 8.2-6 amd64 [installed,automatic] +librsvg2-2/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librsvg2-common/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librtmp1/testing,now 2.4+20151223.gitfa8646d.1-2+b5 amd64 [installed,automatic] +libsasl2-2/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules-db/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libseccomp2/testing,now 2.5.5-2 amd64 [installed,automatic] +libselinux1-dev/testing,now 3.7-3.1 amd64 [installed,automatic] +libselinux1/testing,now 3.7-3.1 amd64 [installed,automatic] +libsemanage-common/testing,now 3.7-2.1 all [installed,automatic] +libsemanage2/testing,now 3.7-2.1 amd64 [installed,automatic] +libsensors-config/testing,now 1:3.6.0-10 all [installed,automatic] +libsensors5/testing,now 1:3.6.0-10+b1 amd64 [installed,automatic] +libsepol-dev/testing,now 3.7-1 amd64 [installed,automatic] +libsepol2/testing,now 3.7-1 amd64 [installed,automatic] +libsframe1/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libsharpyuv-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsharpyuv0/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsigc++-2.0-0v5/testing,now 2.12.1-3 amd64 [installed,automatic] +libsm-dev/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsm6/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsmartcols1/testing,now 2.40.4-2 amd64 [installed,automatic] +libsqlite3-0/testing,now 3.46.1-1 amd64 [installed,automatic] +libss2/testing,now 1.47.2-1 amd64 [installed,automatic] +libssh2-1t64/testing,now 1.11.1-1 amd64 [installed,automatic] +libssl3t64/testing,now 3.4.0-2 amd64 [installed,automatic] +libstdc++-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libstdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libsysprof-capture-4-dev/testing,now 47.2-1 amd64 [installed,automatic] +libsystemd-dev/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd-shared/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd0/testing,now 257.2-3 amd64 [installed,automatic] +libtasn1-6/testing,now 4.19.0-3+b3 amd64 [installed,automatic] +libtcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +libthai-data/testing,now 0.1.29-2 all [installed,automatic] +libthai-dev/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libthai0/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libtiff-dev/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiff6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiffxx6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtinfo6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libtinyxml2-10/testing,now 10.0.0+dfsg-2+b2 amd64 [installed,automatic] +libtool/testing,now 2.5.4-2 all [installed] +libtsan2/testing,now 14.2.0-12 amd64 [installed,automatic] +libubsan1/testing,now 14.2.0-12 amd64 [installed,automatic] +libudev1/testing,now 257.2-3 amd64 [installed,automatic] +libunistring5/testing,now 1.3-1 amd64 [installed,automatic] +libuuid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libvulkan1/testing,now 1.4.304.0-1 amd64 [installed,automatic] +libwayland-bin/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-client0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-cursor0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-dev/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-egl1/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-server0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwebp-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebp7/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdecoder3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdemux2/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpmux3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libx11-6/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-data/testing,now 2:1.8.10-2 all [installed,automatic] +libx11-dev/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-xcb1/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libxapian30/testing,now 1.4.25-2 amd64 [installed,automatic] +libxau-dev/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxau6/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxaw7/testing,now 2:1.0.16-1 amd64 [installed,automatic] +libxcb-dri2-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-dri3-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-glx0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-present0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-randr0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-sync1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-xfixes0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcomposite-dev/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcomposite1/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcursor-dev/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxcursor1/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxdamage-dev/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdamage1/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdmcp-dev/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxdmcp6/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxext-dev/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxext6/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxfixes-dev/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxfixes3/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxft-dev/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxft2/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxi-dev/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxi6/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxinerama-dev/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxinerama1/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxkbcommon-dev/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbcommon0/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbfile1/testing,now 1:1.1.0-1+b4 amd64 [installed,automatic] +libxklavier-dev/testing,now 5.4-5+b2 amd64 [installed] +libxklavier16/testing,now 5.4-5+b2 amd64 [installed,automatic] +libxml2-dev/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxml2-utils/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed] +libxml2/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxmu6/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxmuu1/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxpm4/testing,now 1:3.5.17-1+b3 amd64 [installed,automatic] +libxrandr-dev/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrandr2/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrender-dev/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxrender1/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxshmfence1/testing,now 1.3-1+b3 amd64 [installed,automatic] +libxt6t64/testing,now 1:1.2.1-1.2+b2 amd64 [installed,automatic] +libxtst-dev/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxtst6/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxxf86vm1/testing,now 1:1.1.4-1+b4 amd64 [installed,automatic] +libxxhash0/testing,now 0.8.2-2+b2 amd64 [installed,automatic] +libyaml-0-2/testing,now 0.2.5-2 amd64 [installed,automatic] +libz3-4/testing,now 4.13.3-1 amd64 [installed,automatic] +libz3-dev/testing,now 4.13.3-1 amd64 [installed,automatic] +libzstd-dev/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +libzstd1/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +linux-libc-dev/testing,now 6.12.11-1 all [installed,automatic] +linux-sysctl-defaults/testing,now 4.11 all [installed,automatic] +llvm-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-linker-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-runtime/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +login.defs/testing,now 1:4.16.0-7 all [installed,automatic] +login/testing,now 1:4.16.0-2+really2.40.4-2 amd64 [installed,automatic] +logsave/testing,now 1.47.2-1 amd64 [installed,automatic] +m4/testing,now 1.4.19-5 amd64 [installed,automatic] +make/testing,now 4.4.1-1 amd64 [installed] +manpages-dev/testing,now 6.9.1-1 all [installed,automatic] +manpages/testing,now 6.9.1-1 all [installed,automatic] +mawk/testing,now 1.3.4.20240905-1 amd64 [installed,automatic] +media-types/testing,now 10.1.0 all [installed,automatic] +mesa-libgallium/testing,now 24.2.8-1 amd64 [installed,automatic] +mesa-vulkan-drivers/testing,now 24.2.8-1 amd64 [installed,automatic] +mount/testing,now 2.40.4-2 amd64 [installed,automatic] +native-architecture/testing,now 0.2.5 all [installed,automatic] +ncurses-base/testing,now 6.5-2 all [installed,automatic] +ncurses-bin/testing,now 6.5-2+b1 amd64 [installed,automatic] +netbase/testing,now 6.4 all [installed,automatic] +openssh-client/testing,now 1:9.9p1-3 amd64 [installed,automatic] +openssl-provider-legacy/testing,now 3.4.0-2 amd64 [installed,automatic] +openssl/testing,now 3.4.0-2 amd64 [installed,automatic] +pango1.0-tools/testing,now 1.56.1-1 amd64 [installed,automatic] +passwd/testing,now 1:4.16.0-7 amd64 [installed,automatic] +patch/testing,now 2.7.6-7 amd64 [installed,automatic] +perl-base/testing,now 5.40.0-8 amd64 [installed,automatic] +perl-modules-5.40/testing,now 5.40.0-8 all [installed,automatic] +perl/testing,now 5.40.0-8 amd64 [installed,automatic] +pinentry-curses/testing,now 1.3.1-2 amd64 [installed,automatic] +pkgconf-bin/testing,now 1.8.1-4 amd64 [installed,automatic] +pkgconf/testing,now 1.8.1-4 amd64 [installed,automatic] +procps/testing,now 2:4.0.4-7 amd64 [installed,automatic] +psmisc/testing,now 23.7-1 amd64 [installed,automatic] +publicsuffix/testing,now 20250108.1153-0.1 all [installed,automatic] +python3-autocommand/testing,now 2.2.2-3 all [installed,automatic] +python3-inflect/testing,now 7.3.1-2 all [installed,automatic] +python3-jaraco.context/testing,now 6.0.0-1 all [installed,automatic] +python3-jaraco.functools/testing,now 4.1.0-1 all [installed,automatic] +python3-jaraco.text/testing,now 4.0.0-1 all [installed,automatic] +python3-mako/testing,now 1.3.8-2 all [installed,automatic] +python3-markdown/testing,now 3.7-2 all [installed,automatic] +python3-markupsafe/testing,now 2.1.5-1+b2 amd64 [installed,automatic] +python3-minimal/testing,now 3.13.1-2 amd64 [installed,automatic] +python3-more-itertools/testing,now 10.6.0-1 all [installed,automatic] +python3-packaging/testing,now 24.2-1 all [installed,automatic] +python3-pkg-resources/testing,now 75.6.0-1 all [installed,automatic] +python3-pygments/testing,now 2.18.0+dfsg-2 all [installed,automatic] +python3-setuptools/testing,now 75.6.0-1 all [installed,automatic] +python3-typeguard/testing,now 4.4.1-1 all [installed,automatic] +python3-typing-extensions/testing,now 4.12.2-2 all [installed,automatic] +python3-yaml/testing,now 6.0.2-1+b1 amd64 [installed,automatic] +python3-zipp/testing,now 3.21.0-1 all [installed,automatic] +python3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3.13/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3/testing,now 3.13.1-2 amd64 [installed,automatic] +readline-common/testing,now 8.2-6 all [installed,automatic] +rpcsvc-proto/testing,now 1.4.3-1 amd64 [installed,automatic] +sed/testing,now 4.9-2 amd64 [installed,automatic] +sensible-utils/testing,now 0.0.24 all [installed,automatic] +sgml-base/testing,now 1.31 all [installed,automatic] +shared-mime-info/testing,now 2.4-5+b2 amd64 [installed,automatic] +sqv/testing,now 1.2.1-5 amd64 [installed,automatic] +systemd-cryptsetup/testing,now 257.2-3 amd64 [installed,automatic] +systemd-sysv/testing,now 257.2-3 amd64 [installed,automatic] +systemd-timesyncd/testing,now 257.2-3 amd64 [installed,automatic] +systemd/testing,now 257.2-3 amd64 [installed,automatic] +sysvinit-utils/testing,now 3.13-1 amd64 [installed,automatic] +tar/testing,now 1.35+dfsg-3.1 amd64 [installed,automatic] +tcl-expect/testing,now 5.45.4-3+b1 amd64 [installed,automatic] +tcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +tzdata/testing,now 2024b-6 all [installed,automatic] +util-linux/testing,now 2.40.4-2 amd64 [installed,automatic] +uuid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +wayland-protocols/testing,now 1.39-1 all [installed,automatic] +wget/testing,now 1.24.5-2+b1 amd64 [installed] +x11-common/testing,now 1:7.7+24 all [installed,automatic] +x11-xkb-utils/testing,now 7.7+9 amd64 [installed,automatic] +x11proto-dev/testing,now 2024.1-1 all [installed,automatic] +xauth/testing,now 1:1.1.2-1.1 amd64 [installed,automatic] +xdg-user-dirs/testing,now 0.18-2 amd64 [installed,automatic] +xkb-data/testing,now 2.42-1 all [installed,automatic] +xml-core/testing,now 0.19 all [installed,automatic] +xorg-sgml-doctools/testing,now 1:1.11-1.1 all [installed,automatic] +xtrans-dev/testing,now 1.4.0-1 all [installed,automatic] +xz-utils/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +zlib1g-dev/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +zlib1g/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +Errors detected in the build 0 +Warnings detected in the logs 96 +cppcheck defects detected in the logs 28 +TOTAL warnings detected in the logs 124 diff --git a/2025-02-06-115547-14435-1@b1965751dcd5_master/report-37cb39.html b/2025-02-06-115547-14435-1@b1965751dcd5_master/report-37cb39.html new file mode 100644 index 0000000..9cef5c4 --- /dev/null +++ b/2025-02-06-115547-14435-1@b1965751dcd5_master/report-37cb39.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 248, column 21
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-115547-14435-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
This statement is never executed
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-115547-14435-1@b1965751dcd5_master/report-523ef4.html b/2025-02-06-115547-14435-1@b1965751dcd5_master/report-523ef4.html new file mode 100644 index 0000000..72d6e32 --- /dev/null +++ b/2025-02-06-115547-14435-1@b1965751dcd5_master/report-523ef4.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 199, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-115547-14435-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
This statement is never executed
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-115547-14435-1@b1965751dcd5_master/report-5ce420.html b/2025-02-06-115547-14435-1@b1965751dcd5_master/report-5ce420.html new file mode 100644 index 0000000..5ecfa61 --- /dev/null +++ b/2025-02-06-115547-14435-1@b1965751dcd5_master/report-5ce420.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 194, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-115547-14435-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
This statement is never executed
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-115547-14435-1@b1965751dcd5_master/report-5d4bc8.html b/2025-02-06-115547-14435-1@b1965751dcd5_master/report-5d4bc8.html new file mode 100644 index 0000000..23d84ea --- /dev/null +++ b/2025-02-06-115547-14435-1@b1965751dcd5_master/report-5d4bc8.html @@ -0,0 +1,1609 @@ + + + +/rootdir/libcafekbd/tmp-introspect_nwrjnbg/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspect_nwrjnbg/Cafekbd-1.0.c
Warning:line 89, column 13
File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/libxml2 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-115547-14435-1 -x c /rootdir/libcafekbd/tmp-introspect_nwrjnbg/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
14
Loop condition is true. Entering loop body
28
Loop condition is true. Entering loop body
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
15
Assuming this stream operation fails
29
File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior
90 if (ret
15.1
'ret' is equal to 0
== 0)
16
Taking true branch
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out
16.1
'len_out' is not equal to NULL
!= NULL((void*)0))
17
Taking true branch
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
6
Assuming 'args' is not equal to NULL
7
Taking false branch
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
8
Assuming 'self' is non-null
9
Taking false branch
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input
9.1
'input' is not equal to NULL
== NULL((void*)0))
10
Taking false branch
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output
10.1
'output' is not equal to NULL
== NULL((void*)0))
11
Taking false branch
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
12
Loop condition is true. Entering loop body
26
Loop condition is true. Entering loop body
702 {
703 gsize len;
704 char *line = read_line (input, &len);
13
Calling 'read_line'
18
Returning from 'read_line'
27
Calling 'read_line'
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
19
Assuming 'line' is not equal to NULL
20
Assuming the condition is false
21
Taking false branch
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
22
Assuming the condition is false
23
Taking false branch
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
24
Assuming the condition is false
25
Taking false branch
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
742
743 if (quark == 0)
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
1
Assuming 'argc' is equal to 2
2
'?' condition is false
3
Assuming the condition is false
4
Taking false branch
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
5
Calling 'dump_irepository'
811 {
812 g_printerr ("%s\n", error->message);
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-115547-14435-1@b1965751dcd5_master/report-891289.html b/2025-02-06-115547-14435-1@b1965751dcd5_master/report-891289.html new file mode 100644 index 0000000..7faeca2 --- /dev/null +++ b/2025-02-06-115547-14435-1@b1965751dcd5_master/report-891289.html @@ -0,0 +1,1603 @@ + + + +/rootdir/libcafekbd/tmp-introspect_nwrjnbg/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspect_nwrjnbg/Cafekbd-1.0.c
Warning:line 812, column 27
Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error')
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/libxml2 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-115547-14435-1 -x c /rootdir/libcafekbd/tmp-introspect_nwrjnbg/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
90 if (ret == 0)
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out != NULL((void*)0))
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
21
Assuming the condition is false
22
Taking false branch
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
23
Returning without writing to '*error'
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
7
Assuming 'args' is not equal to NULL
8
Taking false branch
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
9
Assuming 'self' is non-null
10
Taking false branch
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input
10.1
'input' is not equal to NULL
== NULL((void*)0))
11
Taking false branch
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output
11.1
'output' is not equal to NULL
== NULL((void*)0))
12
Taking false branch
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
13
Loop condition is true. Entering loop body
702 {
703 gsize len;
704 char *line = read_line (input, &len);
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
14
Assuming 'line' is not equal to NULL
15
Assuming the condition is false
16
Taking false branch
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
17
Assuming the condition is false
18
Taking false branch
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
19
Taking true branch
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
20
Calling 'invoke_error_quark'
24
Returning from 'invoke_error_quark'
742
743 if (quark == 0)
25
Assuming 'quark' is equal to 0
26
Taking true branch
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
27
Returning without writing to '*error'
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
1
'error' initialized to a null pointer value
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
2
Assuming 'argc' is equal to 2
3
'?' condition is false
4
Assuming the condition is false
5
Taking false branch
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
6
Calling 'dump_irepository'
28
Returning from 'dump_irepository'
29
Taking true branch
811 {
812 g_printerr ("%s\n", error->message);
30
Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error')
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-115547-14435-1@b1965751dcd5_master/report-9361af.html b/2025-02-06-115547-14435-1@b1965751dcd5_master/report-9361af.html new file mode 100644 index 0000000..3f667c8 --- /dev/null +++ b/2025-02-06-115547-14435-1@b1965751dcd5_master/report-9361af.html @@ -0,0 +1,1609 @@ + + + +/rootdir/libcafekbd/tmp-introspect_nwrjnbg/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspect_nwrjnbg/Cafekbd-1.0.c
Warning:line 89, column 13
Read function called when stream is in EOF state. Function has no effect
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/libxml2 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-115547-14435-1 -x c /rootdir/libcafekbd/tmp-introspect_nwrjnbg/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
14
Loop condition is true. Entering loop body
28
Loop condition is true. Entering loop body
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
15
Assuming stream reaches end-of-file here
29
Read function called when stream is in EOF state. Function has no effect
90 if (ret
15.1
'ret' is equal to 0
== 0)
16
Taking true branch
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out
16.1
'len_out' is not equal to NULL
!= NULL((void*)0))
17
Taking true branch
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
6
Assuming 'args' is not equal to NULL
7
Taking false branch
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
8
Assuming 'self' is non-null
9
Taking false branch
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input
9.1
'input' is not equal to NULL
== NULL((void*)0))
10
Taking false branch
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output
10.1
'output' is not equal to NULL
== NULL((void*)0))
11
Taking false branch
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
12
Loop condition is true. Entering loop body
26
Loop condition is true. Entering loop body
702 {
703 gsize len;
704 char *line = read_line (input, &len);
13
Calling 'read_line'
18
Returning from 'read_line'
27
Calling 'read_line'
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
19
Assuming 'line' is not equal to NULL
20
Assuming the condition is false
21
Taking false branch
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
22
Assuming the condition is false
23
Taking false branch
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
24
Assuming the condition is false
25
Taking false branch
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
742
743 if (quark == 0)
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
1
Assuming 'argc' is equal to 2
2
'?' condition is false
3
Assuming the condition is false
4
Taking false branch
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
5
Calling 'dump_irepository'
811 {
812 g_printerr ("%s\n", error->message);
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-115547-14435-1@b1965751dcd5_master/report-b4532a.html b/2025-02-06-115547-14435-1@b1965751dcd5_master/report-b4532a.html new file mode 100644 index 0000000..f803c8f --- /dev/null +++ b/2025-02-06-115547-14435-1@b1965751dcd5_master/report-b4532a.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 228, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-115547-14435-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
This statement is never executed
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-115547-14435-1@b1965751dcd5_master/report-c098bd.html b/2025-02-06-115547-14435-1@b1965751dcd5_master/report-c098bd.html new file mode 100644 index 0000000..1909779 --- /dev/null +++ b/2025-02-06-115547-14435-1@b1965751dcd5_master/report-c098bd.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 187, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-115547-14435-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
This statement is never executed
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-115547-14435-1@b1965751dcd5_master/report-e0f2de.html b/2025-02-06-115547-14435-1@b1965751dcd5_master/report-e0f2de.html new file mode 100644 index 0000000..b9a34e8 --- /dev/null +++ b/2025-02-06-115547-14435-1@b1965751dcd5_master/report-e0f2de.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 225, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-115547-14435-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
This statement is never executed
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-115547-14435-1@b1965751dcd5_master/report-fb6164.html b/2025-02-06-115547-14435-1@b1965751dcd5_master/report-fb6164.html new file mode 100644 index 0000000..3eb6e7c --- /dev/null +++ b/2025-02-06-115547-14435-1@b1965751dcd5_master/report-fb6164.html @@ -0,0 +1,1504 @@ + + + +/rootdir/libcafekbd/tmp-introspect_nwrjnbg/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspect_nwrjnbg/Cafekbd-1.0.c
Warning:line 239, column 11
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/libxml2 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-115547-14435-1 -x c /rootdir/libcafekbd/tmp-introspect_nwrjnbg/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
90 if (ret == 0)
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out != NULL((void*)0))
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
This statement is never executed
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input == NULL((void*)0))
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output == NULL((void*)0))
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
702 {
703 gsize len;
704 char *line = read_line (input, &len);
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
742
743 if (quark == 0)
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
811 {
812 g_printerr ("%s\n", error->message);
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-115547-14435-1@b1965751dcd5_master/report-ff92e7.html b/2025-02-06-115547-14435-1@b1965751dcd5_master/report-ff92e7.html new file mode 100644 index 0000000..eacf460 --- /dev/null +++ b/2025-02-06-115547-14435-1@b1965751dcd5_master/report-ff92e7.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 256, column 21
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-115547-14435-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
This statement is never executed
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-115547-14435-1@b1965751dcd5_master/scanview.css b/2025-02-06-115547-14435-1@b1965751dcd5_master/scanview.css new file mode 100644 index 0000000..cf8a5a6 --- /dev/null +++ b/2025-02-06-115547-14435-1@b1965751dcd5_master/scanview.css @@ -0,0 +1,62 @@ +body { color:#000000; background-color:#ffffff } +body { font-family: Helvetica, sans-serif; font-size:9pt } +h1 { font-size: 14pt; } +h2 { font-size: 12pt; } +table { font-size:9pt } +table { border-spacing: 0px; border: 1px solid black } +th, table thead { + background-color:#eee; color:#666666; + font-weight: bold; cursor: default; + text-align:center; + font-weight: bold; font-family: Verdana; + white-space:nowrap; +} +.W { font-size:0px } +th, td { padding:5px; padding-left:8px; text-align:left } +td.SUMM_DESC { padding-left:12px } +td.DESC { white-space:pre } +td.Q { text-align:right } +td { text-align:left } +tbody.scrollContent { overflow:auto } + +table.form_group { + background-color: #ccc; + border: 1px solid #333; + padding: 2px; +} + +table.form_inner_group { + background-color: #ccc; + border: 1px solid #333; + padding: 0px; +} + +table.form { + background-color: #999; + border: 1px solid #333; + padding: 2px; +} + +td.form_label { + text-align: right; + vertical-align: top; +} +/* For one line entires */ +td.form_clabel { + text-align: right; + vertical-align: center; +} +td.form_value { + text-align: left; + vertical-align: top; +} +td.form_submit { + text-align: right; + vertical-align: top; +} + +h1.SubmitFail { + color: #f00; +} +h1.SubmitOk { +} diff --git a/2025-02-06-115547-14435-1@b1965751dcd5_master/sorttable.js b/2025-02-06-115547-14435-1@b1965751dcd5_master/sorttable.js new file mode 100644 index 0000000..e608daa --- /dev/null +++ b/2025-02-06-115547-14435-1@b1965751dcd5_master/sorttable.js @@ -0,0 +1,512 @@ +/* + SortTable + version 2 + 7th April 2007 + Stuart Langridge, http://www.kryogenix.org/code/browser/sorttable/ + + Instructions: + Download this file + Add to your HTML + Add class="sortable" to any table you'd like to make sortable + Click on the headers to sort + + Thanks to many, many people for contributions and suggestions. + Licenced as X11: http://www.kryogenix.org/code/browser/licence.html + This basically means: do what you want with it. +*/ + + +var stIsIE = /*@cc_on!@*/false; + +sorttable = { + init: function() { + // quit if this function has already been called + if (arguments.callee.done) return; + // flag this function so we don't do the same thing twice + arguments.callee.done = true; + // kill the timer + if (_timer) clearInterval(_timer); + + if (!document.createElement || !document.getElementsByTagName) return; + + sorttable.DATE_RE = /^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/; + + forEach(document.getElementsByTagName('table'), function(table) { + if (table.className.search(/\bsortable\b/) != -1) { + sorttable.makeSortable(table); + } + }); + + }, + + makeSortable: function(table) { + if (table.getElementsByTagName('thead').length == 0) { + // table doesn't have a tHead. Since it should have, create one and + // put the first table row in it. + the = document.createElement('thead'); + the.appendChild(table.rows[0]); + table.insertBefore(the,table.firstChild); + } + // Safari doesn't support table.tHead, sigh + if (table.tHead == null) table.tHead = table.getElementsByTagName('thead')[0]; + + if (table.tHead.rows.length != 1) return; // can't cope with two header rows + + // Sorttable v1 put rows with a class of "sortbottom" at the bottom (as + // "total" rows, for example). This is B&R, since what you're supposed + // to do is put them in a tfoot. So, if there are sortbottom rows, + // for backward compatibility, move them to tfoot (creating it if needed). + sortbottomrows = []; + for (var i=0; i5' : ' ▴'; + this.appendChild(sortrevind); + return; + } + if (this.className.search(/\bsorttable_sorted_reverse\b/) != -1) { + // if we're already sorted by this column in reverse, just + // re-reverse the table, which is quicker + sorttable.reverse(this.sorttable_tbody); + this.className = this.className.replace('sorttable_sorted_reverse', + 'sorttable_sorted'); + this.removeChild(document.getElementById('sorttable_sortrevind')); + sortfwdind = document.createElement('span'); + sortfwdind.id = "sorttable_sortfwdind"; + sortfwdind.innerHTML = stIsIE ? ' 6' : ' ▾'; + this.appendChild(sortfwdind); + return; + } + + // remove sorttable_sorted classes + theadrow = this.parentNode; + forEach(theadrow.childNodes, function(cell) { + if (cell.nodeType == 1) { // an element + cell.className = cell.className.replace('sorttable_sorted_reverse',''); + cell.className = cell.className.replace('sorttable_sorted',''); + } + }); + sortfwdind = document.getElementById('sorttable_sortfwdind'); + if (sortfwdind) { sortfwdind.parentNode.removeChild(sortfwdind); } + sortrevind = document.getElementById('sorttable_sortrevind'); + if (sortrevind) { sortrevind.parentNode.removeChild(sortrevind); } + + this.className += ' sorttable_sorted'; + sortfwdind = document.createElement('span'); + sortfwdind.id = "sorttable_sortfwdind"; + sortfwdind.innerHTML = stIsIE ? ' 6' : ' ▾'; + this.appendChild(sortfwdind); + + // build an array to sort. This is a Schwartzian transform thing, + // i.e., we "decorate" each row with the actual sort key, + // sort based on the sort keys, and then put the rows back in order + // which is a lot faster because you only do getInnerText once per row + row_array = []; + col = this.sorttable_columnindex; + rows = this.sorttable_tbody.rows; + for (var j=0; j 12) { + // definitely dd/mm + return sorttable.sort_ddmm; + } else if (second > 12) { + return sorttable.sort_mmdd; + } else { + // looks like a date, but we can't tell which, so assume + // that it's dd/mm (English imperialism!) and keep looking + sortfn = sorttable.sort_ddmm; + } + } + } + } + return sortfn; + }, + + getInnerText: function(node) { + // gets the text we want to use for sorting for a cell. + // strips leading and trailing whitespace. + // this is *not* a generic getInnerText function; it's special to sorttable. + // for example, you can override the cell text with a customkey attribute. + // it also gets .value for fields. + + hasInputs = (typeof node.getElementsByTagName == 'function') && + node.getElementsByTagName('input').length; + + if (node.getAttribute("sorttable_customkey") != null) { + return node.getAttribute("sorttable_customkey"); + } + else if (typeof node.textContent != 'undefined' && !hasInputs) { + return node.textContent.replace(/^\s+|\s+$/g, ''); + } + else if (typeof node.innerText != 'undefined' && !hasInputs) { + return node.innerText.replace(/^\s+|\s+$/g, ''); + } + else if (typeof node.text != 'undefined' && !hasInputs) { + return node.text.replace(/^\s+|\s+$/g, ''); + } + else { + switch (node.nodeType) { + case 3: + if (node.nodeName.toLowerCase() == 'input') { + return node.value.replace(/^\s+|\s+$/g, ''); + } + case 4: + return node.nodeValue.replace(/^\s+|\s+$/g, ''); + break; + case 1: + case 11: + var innerText = ''; + for (var i = 0; i < node.childNodes.length; i++) { + innerText += sorttable.getInnerText(node.childNodes[i]); + } + return innerText.replace(/^\s+|\s+$/g, ''); + break; + default: + return ''; + } + } + }, + + reverse: function(tbody) { + // reverse the rows in a tbody + newrows = []; + for (var i=0; i=0; i--) { + tbody.appendChild(newrows[i]); + } + delete newrows; + }, + + /* sort functions + each sort function takes two parameters, a and b + you are comparing a[0] and b[0] */ + sort_numeric: function(a,b) { + aa = parseFloat(a[0].replace(/[^0-9.-]/g,'')); + if (isNaN(aa)) aa = 0; + bb = parseFloat(b[0].replace(/[^0-9.-]/g,'')); + if (isNaN(bb)) bb = 0; + return aa-bb; + }, + sort_alpha: function(a,b) { + if (a[0]==b[0]) return 0; + if (a[0] 0 ) { + var q = list[i]; list[i] = list[i+1]; list[i+1] = q; + swap = true; + } + } // for + t--; + + if (!swap) break; + + for(var i = t; i > b; --i) { + if ( comp_func(list[i], list[i-1]) < 0 ) { + var q = list[i]; list[i] = list[i-1]; list[i-1] = q; + swap = true; + } + } // for + b++; + + } // while(swap) + } +} + +/* ****************************************************************** + Supporting functions: bundled here to avoid depending on a library + ****************************************************************** */ + +// Dean Edwards/Matthias Miller/John Resig + +/* for Mozilla/Opera9 */ +if (document.addEventListener) { + document.addEventListener("DOMContentLoaded", sorttable.init, false); +} + +/* for Internet Explorer */ +/*@cc_on @*/ +/*@if (@_win32) + document.write(" + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <X11/keysym.h>
+
+#include <glib/gi18n-lib.h>
+#include <gio/gio.h>
+#include <cafekbd-desktop-config.h>
+#include <cafekbd-config-private.h>
+
+/**
+ * CafekbdDesktopConfig:
+ */
+#define CAFEKBD_DESKTOP_CONFIG_SCHEMA  CAFEKBD_CONFIG_SCHEMA ".general"
+
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP[] = "default-group";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW[] = "group-per-window";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS[] = "handle-indicators";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES[] = "layout-names-as-group-names";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_LOAD_EXTRA_ITEMS[] = "load-extra-items";
+
+/*
+ * static common functions
+ */
+
+static gboolean
+    cafekbd_desktop_config_get_lv_descriptions
+    (CafekbdDesktopConfig * config,
+     XklConfigRegistry * registry,
+     const gchar ** layout_ids,
+     const gchar ** variant_ids,
+     gchar *** short_layout_descriptions,
+     gchar *** long_layout_descriptions,
+     gchar *** short_variant_descriptions,
+     gchar *** long_variant_descriptions) {
+	const gchar **pl, **pv;
+	guint total_layouts;
+	gchar **sld, **lld, **svd, **lvd;
+	XklConfigItem *item = xkl_config_item_new ();
+
+	if (!
+	    (xkl_engine_get_features (config->engine) &
+	     XKLF_MULTIPLE_LAYOUTS_SUPPORTED))
+		return FALSE;
+
+	pl = layout_ids;
+	pv = variant_ids;
+	total_layouts = g_strv_length ((char **) layout_ids);
+	sld = *short_layout_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+	lld = *long_layout_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+	svd = *short_variant_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+	lvd = *long_variant_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+
+	while (pl != NULL && *pl != NULL) {
+
+		xkl_debug (100, "ids: [%s][%s]\n", *pl,
+			   pv == NULL ? NULL : *pv);
+
+		g_snprintf (item->name, sizeof item->name, "%s", *pl);
+		if (xkl_config_registry_find_layout (registry, item)) {
+			*sld = g_strdup (item->short_description);
+			*lld = g_strdup (item->description);
+		} else {
+			*sld = g_strdup ("");
+			*lld = g_strdup ("");
+		}
+
+		if (pv != NULL && *pv != NULL) {
+			g_snprintf (item->name, sizeof item->name, "%s",
+				    *pv);
+			if (xkl_config_registry_find_variant
+			    (registry, *pl, item)) {
+				*svd = g_strdup (item->short_description);
+				*lvd = g_strdup (item->description);
+			} else {
+				*svd = g_strdup ("");
+				*lvd = g_strdup ("");
+			}
+		} else {
+			*svd = g_strdup ("");
+			*lvd = g_strdup ("");
+		}
+
+		xkl_debug (100, "description: [%s][%s][%s][%s]\n",
+			   *sld, *lld, *svd, *lvd);
+		sld++;
+		lld++;
+		svd++;
+		lvd++;
+
+		pl++;
+
+		if (pv != NULL && *pv != NULL)
+			pv++;
+	}
+
+	g_object_unref (item);
+	return TRUE;
+}
+
+/*
+ * extern CafekbdDesktopConfig config functions
+ */
+void
+cafekbd_desktop_config_init (CafekbdDesktopConfig * config,
+			  XklEngine * engine)
+{
+	memset (config, 0, sizeof (*config));
+	config->settings = g_settings_new (CAFEKBD_DESKTOP_CONFIG_SCHEMA);
+	config->engine = engine;
+}
+
+void
+cafekbd_desktop_config_term (CafekbdDesktopConfig * config)
+{
+	g_object_unref (config->settings);
+	config->settings = NULL;
+}
+
+void
+cafekbd_desktop_config_load_from_gsettings (CafekbdDesktopConfig * config)
+{
+	config->group_per_app =
+	    g_settings_get_boolean (config->settings,
+				 CAFEKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW);
+	xkl_debug (150, "group_per_app: %d\n", config->group_per_app);
+
+	config->handle_indicators =
+	    g_settings_get_boolean (config->settings,
+				 CAFEKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS);
+	xkl_debug (150, "handle_indicators: %d\n",
+		   config->handle_indicators);
+
+	config->layout_names_as_group_names =
+	    g_settings_get_boolean (config->settings,
+				   CAFEKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES);
+	xkl_debug (150, "layout_names_as_group_names: %d\n",
+		   config->layout_names_as_group_names);
+
+	config->load_extra_items =
+	    g_settings_get_boolean (config->settings,
+				   CAFEKBD_DESKTOP_CONFIG_KEY_LOAD_EXTRA_ITEMS);
+	xkl_debug (150, "load_extra_items: %d\n",
+		   config->load_extra_items);
+
+	config->default_group =
+	    g_settings_get_int (config->settings,
+				  CAFEKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP);
+
+	if (config->default_group < -1
+	    || config->default_group >=
+	    xkl_engine_get_max_num_groups (config->engine))
+		config->default_group = -1;
+	xkl_debug (150, "default_group: %d\n", config->default_group);
+}
+
+void
+cafekbd_desktop_config_save_to_gsettings (CafekbdDesktopConfig * config)
+{
+	g_settings_delay (config->settings);
+
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW,
+			     config->group_per_app);
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS,
+			     config->handle_indicators);
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES,
+			     config->layout_names_as_group_names);
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_LOAD_EXTRA_ITEMS,
+			     config->load_extra_items);
+	g_settings_set_int (config->settings,
+			    CAFEKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP,
+			    config->default_group);
+
+	g_settings_apply (config->settings);
+}
+
+gboolean
+cafekbd_desktop_config_activate (CafekbdDesktopConfig * config)
+{
+	gboolean rv = TRUE;
+
+	xkl_engine_set_group_per_toplevel_window (config->engine,
+						  config->group_per_app);
+	xkl_engine_set_indicators_handling (config->engine,
+					    config->handle_indicators);
+	xkl_engine_set_default_group (config->engine,
+				      config->default_group);
+
+	return rv;
+}
+
+void
+cafekbd_desktop_config_lock_next_group (CafekbdDesktopConfig * config)
+{
+	int group = xkl_engine_get_next_group (config->engine);
+	xkl_engine_lock_group (config->engine, group);
+}
+
+void
+cafekbd_desktop_config_lock_prev_group (CafekbdDesktopConfig * config)
+{
+	int group = xkl_engine_get_prev_group (config->engine);
+	xkl_engine_lock_group (config->engine, group);
+}
+
+void
+cafekbd_desktop_config_restore_group (CafekbdDesktopConfig * config)
+{
+	int group = xkl_engine_get_current_window_group (config->engine);
+	xkl_engine_lock_group (config->engine, group);
+}
+
+/**
+ * cafekbd_desktop_config_start_listen:
+ * @func: (scope notified): a function to call when settings are changed
+ */
+void
+cafekbd_desktop_config_start_listen (CafekbdDesktopConfig * config,
+				  GCallback func,
+				  gpointer user_data)
+{
+	config->config_listener_id =
+	    g_signal_connect (config->settings, "changed", func,
+			      user_data);
+}
+
+void
+cafekbd_desktop_config_stop_listen (CafekbdDesktopConfig * config)
+{
+	g_signal_handler_disconnect (config->settings,
+				    config->config_listener_id);
+	config->config_listener_id = 0;
+}
+
+gboolean
+cafekbd_desktop_config_load_group_descriptions (CafekbdDesktopConfig
+					     * config,
+					     XklConfigRegistry *
+					     registry,
+					     const gchar **
+					     layout_ids,
+					     const gchar **
+					     variant_ids,
+					     gchar ***
+					     short_group_names,
+					     gchar *** full_group_names)
+{
+	gchar **sld, **lld, **svd, **lvd;
+	gchar **psld, **plld, **plvd;
+	gchar **psgn, **pfgn, **psvd;
+	gint total_descriptions;
+
+	if (!cafekbd_desktop_config_get_lv_descriptions
+	    (config, registry, layout_ids, variant_ids, &sld, &lld, &svd,
+	     &lvd)) {
+		return False;
+	}
+
+	total_descriptions = g_strv_length (sld);
+
+	*short_group_names = psgn =
+	    g_new0 (gchar *, total_descriptions + 1);
+	*full_group_names = pfgn =
+	    g_new0 (gchar *, total_descriptions + 1);
+
+	plld = lld;
+	psld = sld;
+	plvd = lvd;
+	psvd = svd;
+	while (plld != NULL && *plld != NULL) {
+		gchar *sd = (*psvd[0] == '\0') ? *psld : *psvd;
+		psld++, psvd++;
+		*psgn++ = g_strdup (sd);
+		*pfgn++ = g_strdup (cafekbd_keyboard_config_format_full_layout
+				    (*plld++, *plvd++));
+	}
+	g_strfreev (sld);
+	g_strfreev (lld);
+	g_strfreev (svd);
+	g_strfreev (lvd);
+
+	return True;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/1.html b/2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/1.html new file mode 100644 index 0000000..43abc15 --- /dev/null +++ b/2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/1.html @@ -0,0 +1,914 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <X11/keysym.h>
+
+#include <pango/pango.h>
+
+#include <glib/gi18n-lib.h>
+#include <cdk/cdkx.h>
+
+#include <cafekbd-keyboard-config.h>
+#include <cafekbd-indicator-config.h>
+
+#include <cafekbd-config-private.h>
+
+/**
+ * CafekbdIndicatorConfig:
+ */
+#define CAFEKBD_INDICATOR_CONFIG_SCHEMA  CAFEKBD_CONFIG_SCHEMA ".indicator"
+
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS[] = "show-flags";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_SECONDARIES[] = "secondary";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_FONT_FAMILY[] = "font-family";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_FOREGROUND_COLOR[] = "foreground-color";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_BACKGROUND_COLOR[] = "background-color";
+
+/*
+ * static applet config functions
+ */
+static void
+cafekbd_indicator_config_load_font (CafekbdIndicatorConfig * ind_config)
+{
+	ind_config->font_family =
+	    g_settings_get_string (ind_config->settings,
+				   CAFEKBD_INDICATOR_CONFIG_KEY_FONT_FAMILY);
+
+	if (ind_config->font_family == NULL ||
+	    ind_config->font_family[0] == '\0') {
+		PangoFontDescription *fd = NULL;
+		CtkWidgetPath *widget_path = ctk_widget_path_new ();
+		CtkStyleContext *context = ctk_style_context_new ();
+
+		ctk_widget_path_append_type (widget_path, CTK_TYPE_WINDOW);
+		ctk_widget_path_iter_set_name (widget_path, -1 , "PanelWidget");
+
+		ctk_style_context_set_path (context, widget_path);
+		ctk_style_context_set_screen (context, cdk_screen_get_default ());
+		ctk_style_context_set_state (context, CTK_STATE_FLAG_NORMAL);
+		ctk_style_context_add_class (context, CTK_STYLE_CLASS_DEFAULT);
+		ctk_style_context_add_class (context, "gnome-panel-menu-bar");
+		ctk_style_context_add_class (context, "cafe-panel-menu-bar");
+
+		ctk_style_context_get (context, CTK_STATE_FLAG_NORMAL,
+		                       CTK_STYLE_PROPERTY_FONT, &fd, NULL);
+
+		if (fd != NULL) {
+			ind_config->font_family =
+			    g_strdup (pango_font_description_to_string(fd));
+		}
+
+		g_object_unref (G_OBJECT (context));
+		ctk_widget_path_unref (widget_path);
+	}
+	xkl_debug (150, "font: [%s]\n", ind_config->font_family);
+
+}
+
+static void
+cafekbd_indicator_config_load_colors (CafekbdIndicatorConfig * ind_config)
+{
+	ind_config->foreground_color =
+	    g_settings_get_string (ind_config->settings,
+	                           CAFEKBD_INDICATOR_CONFIG_KEY_FOREGROUND_COLOR);
+
+	if (ind_config->foreground_color == NULL ||
+	    ind_config->foreground_color[0] == '\0') {
+		CtkWidgetPath *widget_path = ctk_widget_path_new ();
+		CtkStyleContext *context = ctk_style_context_new ();
+		CdkRGBA fg_color;
+
+		ctk_widget_path_append_type (widget_path, CTK_TYPE_WINDOW);
+		ctk_widget_path_iter_set_name (widget_path, -1 , "PanelWidget");
+
+		ctk_style_context_set_path (context, widget_path);
+		ctk_style_context_set_screen (context, cdk_screen_get_default ());
+		ctk_style_context_set_state (context, CTK_STATE_FLAG_NORMAL);
+		ctk_style_context_add_class (context, CTK_STYLE_CLASS_DEFAULT);
+		ctk_style_context_add_class (context, "gnome-panel-menu-bar");
+		ctk_style_context_add_class (context, "cafe-panel-menu-bar");
+
+		ctk_style_context_get_color (context,
+		                             CTK_STATE_FLAG_NORMAL, &fg_color);
+		ind_config->foreground_color =
+		    g_strdup_printf ("%g %g %g",
+		                     fg_color.red,
+		                     fg_color.green,
+		                     fg_color.blue);
+
+		g_object_unref (G_OBJECT (context));
+		ctk_widget_path_unref (widget_path);
+	}
+
+	ind_config->background_color =
+	    g_settings_get_string (ind_config->settings,
+				     CAFEKBD_INDICATOR_CONFIG_KEY_BACKGROUND_COLOR);
+}
+
+void
+cafekbd_indicator_config_refresh_style (CafekbdIndicatorConfig * ind_config)
+{
+	g_free (ind_config->font_family);
+	g_free (ind_config->foreground_color);
+	g_free (ind_config->background_color);
+	cafekbd_indicator_config_load_font (ind_config);
+	cafekbd_indicator_config_load_colors (ind_config);
+}
+
+gchar *
+cafekbd_indicator_config_get_images_file (CafekbdIndicatorConfig *
+				       ind_config,
+				       CafekbdKeyboardConfig *
+				       kbd_config, int group)
+{
+	char *image_file = NULL;
+	CtkIconInfo *icon_info = NULL;
+
+	if (!ind_config->show_flags)
+		return NULL;
+
+	if ((kbd_config->layouts_variants != NULL) &&
+	    (g_strv_length (kbd_config->layouts_variants) > group)) {
+		char *full_layout_name =
+		    kbd_config->layouts_variants[group];
+
+		if (full_layout_name != NULL) {
+			char *l, *v;
+			cafekbd_keyboard_config_split_items (full_layout_name,
+							  &l, &v);
+			if (l != NULL) {
+				/* probably there is something in theme? */
+				icon_info = ctk_icon_theme_lookup_icon
+				    (ind_config->icon_theme, l, 48, 0);
+
+				/* Unbelievable but happens */
+				if (icon_info != NULL &&
+				    ctk_icon_info_get_filename (icon_info) == NULL) {
+					g_object_unref (icon_info);
+					icon_info = NULL;
+				}
+			}
+		}
+	}
+	/* fallback to the default value */
+	if (icon_info == NULL) {
+		icon_info = ctk_icon_theme_lookup_icon
+		    (ind_config->icon_theme, "stock_dialog-error", 48, 0);
+	}
+	if (icon_info != NULL) {
+		image_file =
+		    g_strdup (ctk_icon_info_get_filename (icon_info));
+		g_object_unref (icon_info);
+	}
+
+	return image_file;
+}
+
+void
+cafekbd_indicator_config_load_image_filenames (CafekbdIndicatorConfig *
+					    ind_config,
+					    CafekbdKeyboardConfig *
+					    kbd_config)
+{
+	int i;
+	ind_config->image_filenames = NULL;
+
+	if (!ind_config->show_flags)
+		return;
+
+	for (i = xkl_engine_get_max_num_groups (ind_config->engine);
+	     --i >= 0;) {
+		gchar *image_file =
+		    cafekbd_indicator_config_get_images_file (ind_config,
+							   kbd_config,
+							   i);
+		ind_config->image_filenames =
+		    g_slist_prepend (ind_config->image_filenames,
+				     image_file);
+	}
+}
+
+void
+cafekbd_indicator_config_free_image_filenames (CafekbdIndicatorConfig *
+					    ind_config)
+{
+	while (ind_config->image_filenames) {
+		if (ind_config->image_filenames->data)
+			g_free (ind_config->image_filenames->data);
+		ind_config->image_filenames =
+		    g_slist_delete_link (ind_config->image_filenames,
+					 ind_config->image_filenames);
+	}
+}
+
+void
+cafekbd_indicator_config_init (CafekbdIndicatorConfig * ind_config,
+			       XklEngine * engine)
+{
+	gchar *sp;
+
+	memset (ind_config, 0, sizeof (*ind_config));
+	ind_config->settings = g_settings_new (CAFEKBD_INDICATOR_CONFIG_SCHEMA);
+	ind_config->engine = engine;
+
+	ind_config->icon_theme = ctk_icon_theme_get_default ();
+
+	ctk_icon_theme_append_search_path (ind_config->icon_theme, sp =
+					   g_build_filename (g_get_home_dir
+							     (),
+							     ".icons/flags",
+							     NULL));
+	g_free (sp);
+
+	ctk_icon_theme_append_search_path (ind_config->icon_theme,
+					   sp =
+					   g_build_filename (DATADIR,
+							     "pixmaps/flags",
+							     NULL));
+	g_free (sp);
+
+	ctk_icon_theme_append_search_path (ind_config->icon_theme,
+					   sp =
+					   g_build_filename (DATADIR,
+							     "icons/flags",
+							     NULL));
+	g_free (sp);
+}
+
+void
+cafekbd_indicator_config_term (CafekbdIndicatorConfig * ind_config)
+{
+	g_free (ind_config->font_family);
+	ind_config->font_family = NULL;
+
+	g_free (ind_config->foreground_color);
+	ind_config->foreground_color = NULL;
+
+	g_free (ind_config->background_color);
+	ind_config->background_color = NULL;
+
+	ind_config->icon_theme = NULL;
+
+	cafekbd_indicator_config_free_image_filenames (ind_config);
+
+	g_object_unref (ind_config->settings);
+	ind_config->settings = NULL;
+}
+
+void
+cafekbd_indicator_config_load_from_gsettings (CafekbdIndicatorConfig * ind_config)
+{
+	ind_config->secondary_groups_mask =
+	    g_settings_get_int (ind_config->settings,
+				CAFEKBD_INDICATOR_CONFIG_KEY_SECONDARIES);
+
+	ind_config->show_flags =
+	    g_settings_get_boolean (ind_config->settings,
+				 CAFEKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS);
+
+	cafekbd_indicator_config_load_font (ind_config);
+	cafekbd_indicator_config_load_colors (ind_config);
+
+}
+
+void
+cafekbd_indicator_config_save_to_gsettings (CafekbdIndicatorConfig * ind_config)
+{
+	g_settings_delay (ind_config->settings);
+
+	g_settings_set_int (ind_config->settings,
+				  CAFEKBD_INDICATOR_CONFIG_KEY_SECONDARIES,
+				  ind_config->secondary_groups_mask);
+	g_settings_set_boolean (ind_config->settings,
+				   CAFEKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS,
+				   ind_config->show_flags);
+
+	g_settings_apply (ind_config->settings);
+}
+
+void
+cafekbd_indicator_config_activate (CafekbdIndicatorConfig * ind_config)
+{
+	xkl_engine_set_secondary_groups_mask (ind_config->engine,
+					      ind_config->secondary_groups_mask);
+}
+
+/**
+ * cafekbd_indicator_config_start_listen:
+ * @func: (scope notified): a function to call when settings are changed
+ */
+void
+cafekbd_indicator_config_start_listen (CafekbdIndicatorConfig *
+				    ind_config,
+				    GCallback func,
+				    gpointer user_data)
+{
+	ind_config->config_listener_id =
+	    g_signal_connect (ind_config->settings, "changed", func,
+			      user_data);
+}
+
+void
+cafekbd_indicator_config_stop_listen (CafekbdIndicatorConfig * ind_config)
+{
+	g_signal_handler_disconnect (ind_config->settings,
+				     ind_config->config_listener_id);
+	ind_config->config_listener_id = 0;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/2.html b/2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/2.html new file mode 100644 index 0000000..4489934 --- /dev/null +++ b/2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/2.html @@ -0,0 +1,2100 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
+871
+872
+873
+874
+875
+876
+877
+878
+879
+880
+881
+882
+883
+884
+885
+886
+887
+888
+889
+890
+891
+892
+893
+894
+895
+896
+897
+898
+899
+900
+901
+902
+903
+904
+905
+906
+907
+908
+909
+910
+911
+912
+913
+914
+915
+916
+917
+918
+919
+920
+921
+922
+923
+924
+925
+926
+927
+928
+929
+930
+931
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+#include <config.h>
+
+#include <memory.h>
+
+#include <ctk/ctk.h>
+#include <cdk/cdkkeysyms.h>
+#include <cdk/cdkx.h>
+#include <glib/gi18n-lib.h>
+
+#include <cafekbd-indicator.h>
+#include <cafekbd-indicator-marshal.h>
+
+#include <cafekbd-desktop-config.h>
+#include <cafekbd-indicator-config.h>
+
+typedef struct _gki_globals {
+	XklEngine *engine;
+	XklConfigRegistry *registry;
+
+	CafekbdDesktopConfig cfg;
+	CafekbdIndicatorConfig ind_cfg;
+	CafekbdKeyboardConfig kbd_cfg;
+
+	const gchar *tooltips_format;
+	gchar **full_group_names;
+	gchar **short_group_names;
+	GSList *widget_instances;
+	GSList *images;
+} gki_globals;
+
+struct _CafekbdIndicatorPrivate {
+	gboolean set_parent_tooltips;
+	gdouble angle;
+};
+
+/* one instance for ALL widgets */
+static gki_globals globals;
+
+#define ForAllIndicators() \
+	{ \
+		GSList* cur; \
+		for (cur = globals.widget_instances; cur != NULL; cur = cur->next) { \
+			CafekbdIndicator * gki = (CafekbdIndicator*)cur->data;
+#define NextIndicator() \
+		} \
+	}
+
+G_DEFINE_TYPE (CafekbdIndicator, cafekbd_indicator, CTK_TYPE_NOTEBOOK)<--- There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
+
+static void
+cafekbd_indicator_global_init (void);
+static void
+cafekbd_indicator_global_term (void);
+static CtkWidget *
+cafekbd_indicator_prepare_drawing (CafekbdIndicator * gki, int group);
+static void
+cafekbd_indicator_set_current_page_for_group (CafekbdIndicator * gki, int group);
+static void
+cafekbd_indicator_set_current_page (CafekbdIndicator * gki);
+static void
+cafekbd_indicator_cleanup (CafekbdIndicator * gki);
+static void
+cafekbd_indicator_fill (CafekbdIndicator * gki);
+static void
+cafekbd_indicator_set_tooltips (CafekbdIndicator * gki, const char *str);
+
+gchar *
+cafekbd_indicator_extract_layout_name (int group, XklEngine *engine, CafekbdKeyboardConfig *kbd_cfg, gchar **short_group_names, gchar **full_group_names);
+gchar *
+cafekbd_indicator_create_label_title (int group, GHashTable **ln2cnt_map, gchar *layout_name);
+
+static void
+cafekbd_indicator_load_images (void)
+{
+	int i;
+	GSList *image_filename;
+
+	globals.images = NULL;
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	if (!globals.ind_cfg.show_flags)
+		return;
+
+	image_filename = globals.ind_cfg.image_filenames;
+
+	for (i = xkl_engine_get_max_num_groups (globals.engine);
+	     --i >= 0; image_filename = image_filename->next) {
+		GdkPixbuf *image = NULL;
+		char *image_file = (char *) image_filename->data;
+
+		if (image_file != NULL) {
+			GError *gerror = NULL;
+			image =
+			    gdk_pixbuf_new_from_file (image_file, &gerror);
+			if (image == NULL) {
+				CtkWidget *dialog =
+				    ctk_message_dialog_new (NULL,
+							    CTK_DIALOG_DESTROY_WITH_PARENT,
+							    CTK_MESSAGE_ERROR,
+							    CTK_BUTTONS_OK,
+							    _
+							    ("There was an error loading an image: %s"),
+							    gerror->
+							    message);
+				g_signal_connect (G_OBJECT (dialog),
+						  "response",
+						  G_CALLBACK
+						  (ctk_widget_destroy),
+						  NULL);
+
+				ctk_window_set_resizable (CTK_WINDOW
+							  (dialog), FALSE);
+
+				ctk_widget_show (dialog);
+				g_error_free (gerror);
+			}
+			xkl_debug (150,
+				   "Image %d[%s] loaded -> %p[%dx%d]\n",
+				   i, image_file, image,
+				   gdk_pixbuf_get_width (image),
+				   gdk_pixbuf_get_height (image));
+		}
+		/* We append the image anyway - even if it is NULL! */
+		globals.images = g_slist_append (globals.images, image);
+	}
+}
+
+static void
+cafekbd_indicator_free_images (void)
+{
+	GSList *img_node;
+
+	cafekbd_indicator_config_free_image_filenames (&globals.ind_cfg);
+
+	while ((img_node = globals.images) != NULL) {
+		GdkPixbuf *pi;
+
+		pi = GDK_PIXBUF (img_node->data);
+		/* It can be NULL - some images may be missing */
+		if (pi != NULL) {
+			g_object_unref (pi);
+		}
+		globals.images =
+		    g_slist_remove_link (globals.images, img_node);
+		g_slist_free_1 (img_node);
+	}
+}
+
+static void
+cafekbd_indicator_update_images (void)
+{
+	cafekbd_indicator_free_images ();
+	cafekbd_indicator_load_images ();
+}
+
+void
+cafekbd_indicator_set_tooltips (CafekbdIndicator * gki, const char *str)
+{
+	g_assert (str == NULL || g_utf8_validate (str, -1, NULL));
+
+	ctk_widget_set_tooltip_text (CTK_WIDGET (gki), str);
+
+	if (gki->priv->set_parent_tooltips) {
+		CtkWidget *parent =
+		    ctk_widget_get_parent (CTK_WIDGET (gki));
+		if (parent) {
+			ctk_widget_set_tooltip_text (parent, str);
+		}
+	}
+}
+
+void
+cafekbd_indicator_cleanup (CafekbdIndicator * gki)
+{
+	int i;
+	CtkNotebook *notebook = CTK_NOTEBOOK (gki);
+
+	/* Do not remove the first page! It is the default page */
+	for (i = ctk_notebook_get_n_pages (notebook); --i > 0;) {
+		ctk_notebook_remove_page (notebook, i);
+	}
+}
+
+void
+cafekbd_indicator_fill (CafekbdIndicator * gki)
+{
+	int grp;
+	int total_groups = xkl_engine_get_num_groups (globals.engine);
+	CtkNotebook *notebook = CTK_NOTEBOOK (gki);
+
+	for (grp = 0; grp < total_groups; grp++) {
+		CtkWidget *page;
+		page = cafekbd_indicator_prepare_drawing (gki, grp);
+
+		if (page == NULL)
+			page = ctk_label_new ("");
+
+		ctk_notebook_append_page (notebook, page, NULL);
+		ctk_widget_show_all (page);
+	}
+}
+
+static gboolean cafekbd_indicator_key_pressed (CtkWidget        *widget G_GNUC_UNUSED,
+					       CdkEventKey      *event,
+					       CafekbdIndicator *gki G_GNUC_UNUSED)
+{
+	switch (event->keyval)
+	{
+			case CDK_KEY_KP_Enter:
+			case CDK_KEY_ISO_Enter:
+			case CDK_KEY_3270_Enter:
+			case CDK_KEY_Return:
+			case CDK_KEY_space:
+			case CDK_KEY_KP_Space:
+			cafekbd_desktop_config_lock_next_group(&globals.cfg);
+			return TRUE;
+		default:
+			break;
+	}
+
+	return FALSE;
+}
+
+static gboolean
+cafekbd_indicator_button_pressed (CtkWidget        *widget,
+				  CdkEventButton   *event,
+				  CafekbdIndicator *gki G_GNUC_UNUSED)
+{
+	CtkWidget *img = ctk_bin_get_child (CTK_BIN (widget));
+	CtkAllocation allocation;
+	ctk_widget_get_allocation (img, &allocation);
+	xkl_debug (150, "Flag img size %d x %d\n",
+		   allocation.width, allocation.height);
+	if (event->button == 1 && event->type == CDK_BUTTON_PRESS) {
+		xkl_debug (150, "Mouse button pressed on applet\n");
+		cafekbd_desktop_config_lock_next_group (&globals.cfg);
+		return TRUE;
+	}
+	return FALSE;
+}
+
+static void
+draw_flag (CtkWidget * flag, cairo_t * cr, GdkPixbuf * image)
+{
+	/* Image width and height */
+	int iw = gdk_pixbuf_get_width (image);
+	int ih = gdk_pixbuf_get_height (image);
+	CtkAllocation allocation;
+	double xwiratio, ywiratio, wiratio;
+
+	ctk_widget_get_allocation (flag, &allocation);
+
+	/* widget-to-image scales, X and Y */
+	xwiratio = 1.0 * allocation.width / iw;
+	ywiratio = 1.0 * allocation.height / ih;
+	wiratio = xwiratio < ywiratio ? xwiratio : ywiratio;
+
+	/* transform cairo context */
+	cairo_translate (cr, allocation.width / 2.0, allocation.height / 2.0);
+	cairo_scale (cr, wiratio, wiratio);
+	cairo_translate (cr, - iw / 2.0, - ih / 2.0);
+
+	cdk_cairo_set_source_pixbuf (cr, image, 0, 0);
+	cairo_paint (cr);
+}
+
+gchar *
+cafekbd_indicator_extract_layout_name (int group, XklEngine * engine,
+				    CafekbdKeyboardConfig * kbd_cfg,
+				    gchar ** short_group_names,
+				    gchar ** full_group_names)
+{
+	char *layout_name = NULL;
+	if (group < g_strv_length (short_group_names)) {
+		if (xkl_engine_get_features (engine) &
+		    XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
+			char *full_layout_name =
+			    kbd_cfg->layouts_variants[group];
+			char *variant_name;
+			if (!cafekbd_keyboard_config_split_items
+			    (full_layout_name, &layout_name,
+			     &variant_name))
+				/* just in case */
+				layout_name = full_layout_name;
+
+			/* make it freeable */
+			layout_name = g_strdup (layout_name);
+
+			if (short_group_names != NULL) {
+				char *short_group_name =
+				    short_group_names[group];
+				if (short_group_name != NULL
+				    && *short_group_name != '\0') {
+					/* drop the long name */
+					g_free (layout_name);
+					layout_name =
+					    g_strdup (short_group_name);
+				}
+			}
+		} else {
+			layout_name = g_strdup (full_group_names[group]);
+		}
+	}
+
+	if (layout_name == NULL)
+		layout_name = g_strdup ("");
+
+	return layout_name;
+}
+
+gchar *
+cafekbd_indicator_create_label_title (int group, GHashTable ** ln2cnt_map,
+				   gchar * layout_name)
+{
+	gpointer pcounter = NULL;
+	char *prev_layout_name = NULL;
+	char *lbl_title = NULL;
+	int counter = 0;
+
+	if (group == 0) {
+		*ln2cnt_map =
+		    g_hash_table_new_full (g_str_hash, g_str_equal,
+					   g_free, NULL);
+	}
+
+	/* Process layouts with repeating description */
+	if (g_hash_table_lookup_extended
+	    (*ln2cnt_map, layout_name, (gpointer *) & prev_layout_name,
+	     &pcounter)) {
+		/* "next" same description */
+		gchar appendix[10] = "";
+		gint utf8length;
+		gunichar cidx;
+		counter = GPOINTER_TO_INT (pcounter);
+		/* Unicode subscript 2, 3, 4 */
+		cidx = 0x2081 + counter;
+		utf8length = g_unichar_to_utf8 (cidx, appendix);
+		appendix[utf8length] = '\0';
+		lbl_title = g_strconcat (layout_name, appendix, NULL);
+	} else {
+		/* "first" time this description */
+		lbl_title = g_strdup (layout_name);
+	}
+	g_hash_table_insert (*ln2cnt_map, layout_name,
+			     GINT_TO_POINTER (counter + 1));
+	return lbl_title;
+}
+
+static CtkWidget *
+cafekbd_indicator_prepare_drawing (CafekbdIndicator * gki, int group)
+{
+	gpointer pimage;
+	CtkWidget *ebox;
+
+	pimage = g_slist_nth_data (globals.images, group);
+	ebox = ctk_event_box_new ();
+	ctk_event_box_set_visible_window (CTK_EVENT_BOX (ebox), FALSE);
+	if (globals.ind_cfg.show_flags) {
+		GdkPixbuf *image;
+		CtkWidget *flag;
+
+		if (pimage == NULL)
+			return NULL;
+		image = GDK_PIXBUF (pimage);
+		flag = ctk_drawing_area_new ();
+		ctk_widget_add_events (CTK_WIDGET (flag),
+				       CDK_BUTTON_PRESS_MASK);
+		g_signal_connect (G_OBJECT (flag), "draw",
+		                  G_CALLBACK (draw_flag), image);
+		ctk_container_add (CTK_CONTAINER (ebox), flag);
+	} else {
+		char *lbl_title = NULL;
+		char *layout_name = NULL;
+		CtkWidget *label;
+		static GHashTable *ln2cnt_map = NULL;
+
+		layout_name =
+		    cafekbd_indicator_extract_layout_name (group,
+							globals.engine,
+							&globals.kbd_cfg,
+							globals.short_group_names,
+							globals.full_group_names);
+
+		lbl_title =
+		    cafekbd_indicator_create_label_title (group,
+						       &ln2cnt_map,
+						       layout_name);
+
+		label = ctk_label_new (lbl_title);
+		ctk_widget_set_halign (label, CTK_ALIGN_CENTER);
+		ctk_widget_set_valign (label, CTK_ALIGN_CENTER);
+		ctk_widget_set_margin_start (label, 2);
+		ctk_widget_set_margin_end (label, 2);
+		ctk_widget_set_margin_top (label, 2);
+		ctk_widget_set_margin_bottom (label, 2);
+		g_free (lbl_title);
+		ctk_label_set_angle (CTK_LABEL (label), gki->priv->angle);
+
+		if (group + 1 ==
+		    xkl_engine_get_num_groups (globals.engine)) {
+			g_hash_table_destroy (ln2cnt_map);
+			ln2cnt_map = NULL;
+		}
+
+		ctk_container_add (CTK_CONTAINER (ebox), label);
+	}
+
+	g_signal_connect (G_OBJECT (ebox),
+			  "button_press_event",
+			  G_CALLBACK (cafekbd_indicator_button_pressed), gki);
+
+	g_signal_connect (G_OBJECT (gki),
+			  "key_press_event",
+			  G_CALLBACK (cafekbd_indicator_key_pressed), gki);
+
+	/* We have everything prepared for that size */
+
+	return ebox;
+}
+
+static void
+cafekbd_indicator_update_tooltips (CafekbdIndicator * gki)
+{
+	XklState *state = xkl_engine_get_current_state (globals.engine);
+	gchar *buf;
+	if (state == NULL || state->group < 0
+	    || state->group >= g_strv_length (globals.full_group_names))
+		return;
+
+	buf = g_strdup_printf (globals.tooltips_format,
+			       globals.full_group_names[state->group]);
+
+	cafekbd_indicator_set_tooltips (gki, buf);
+	g_free (buf);
+}
+
+static void
+cafekbd_indicator_parent_set (CtkWidget *gki,
+			      CtkWidget *previous_parent G_GNUC_UNUSED)
+{
+	cafekbd_indicator_update_tooltips (CAFEKBD_INDICATOR (gki));
+}
+
+
+void
+cafekbd_indicator_reinit_ui (CafekbdIndicator * gki)
+{
+	cafekbd_indicator_cleanup (gki);
+	cafekbd_indicator_fill (gki);
+
+	cafekbd_indicator_set_current_page (gki);
+
+	g_signal_emit_by_name (gki, "reinit-ui");
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+			       gchar     *key G_GNUC_UNUSED,
+			       gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "General configuration changed in GSettings - reiniting...\n");
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+	ForAllIndicators () {
+		cafekbd_indicator_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_ind_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+				   gchar     *key G_GNUC_UNUSED,
+				   gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "Applet configuration changed in GSettings - reiniting...\n");
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+	cafekbd_indicator_update_images ();
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	ForAllIndicators () {
+		cafekbd_indicator_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+static void
+cafekbd_indicator_load_group_names (const gchar ** layout_ids,
+				 const gchar ** variant_ids)
+{
+	if (!cafekbd_desktop_config_load_group_descriptions
+	    (&globals.cfg, globals.registry, layout_ids, variant_ids,
+	     &globals.short_group_names, &globals.full_group_names)) {
+		/* We just populate no short names (remain NULL) -
+		 * full names are going to be used anyway */
+		gint i, total_groups =
+		    xkl_engine_get_num_groups (globals.engine);
+		globals.full_group_names =
+		    g_new0 (gchar *, total_groups + 1);
+
+		if (xkl_engine_get_features (globals.engine) &
+		    XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
+			gchar **lst = globals.kbd_cfg.layouts_variants;
+			for (i = 0; *lst; lst++, i++) {
+				globals.full_group_names[i] =
+				    g_strdup ((char *) *lst);
+			}
+		} else {
+			for (i = total_groups; --i >= 0;) {
+				globals.full_group_names[i] =
+				    g_strdup_printf ("Group %d", i);
+			}
+		}
+	}
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_kbd_cfg_callback (CafekbdIndicator *gki G_GNUC_UNUSED)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+	xkl_debug (100,
+		   "XKB configuration changed on X Server - reiniting...\n");
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+	cafekbd_indicator_update_images ();
+
+	g_strfreev (globals.full_group_names);
+	globals.full_group_names = NULL;
+
+	if (globals.short_group_names != NULL) {
+		g_strfreev (globals.short_group_names);
+		globals.short_group_names = NULL;
+	}
+
+	cafekbd_indicator_load_group_names ((const gchar **) xklrec->layouts,
+					 (const gchar **)
+					 xklrec->variants);
+
+	ForAllIndicators () {
+		cafekbd_indicator_reinit_ui (gki);
+	} NextIndicator ();
+	g_object_unref (G_OBJECT (xklrec));
+}
+
+/* Should be called once for all applets */
+static void
+cafekbd_indicator_state_callback (XklEngine           *engine G_GNUC_UNUSED,
+				  XklEngineStateChange changeType,
+				  gint                 group,
+				  gboolean             restore)
+{
+	xkl_debug (150, "group is now %d, restore: %d\n", group, restore);
+
+	if (changeType == GROUP_CHANGED) {
+		ForAllIndicators () {
+			xkl_debug (200, "do repaint\n");
+			cafekbd_indicator_set_current_page_for_group
+			    (gki, group);
+		}
+		NextIndicator ();
+	}
+}
+
+
+void
+cafekbd_indicator_set_current_page (CafekbdIndicator * gki)
+{
+	XklState *cur_state;
+	cur_state = xkl_engine_get_current_state (globals.engine);
+	if (cur_state->group >= 0)
+		cafekbd_indicator_set_current_page_for_group (gki,
+							   cur_state->
+							   group);
+}
+
+void
+cafekbd_indicator_set_current_page_for_group (CafekbdIndicator * gki, int group)
+{
+	xkl_debug (200, "Revalidating for group %d\n", group);
+
+	ctk_notebook_set_current_page (CTK_NOTEBOOK (gki), group + 1);
+
+	cafekbd_indicator_update_tooltips (gki);
+}
+
+/* Should be called once for all widgets */
+static CdkFilterReturn
+cafekbd_indicator_filter_x_evt (CdkXEvent *xev,
+				CdkEvent  *event G_GNUC_UNUSED)
+{
+	XEvent *xevent = (XEvent *) xev;
+
+	xkl_engine_filter_events (globals.engine, xevent);
+	switch (xevent->type) {
+	case ReparentNotify:
+		{
+			XReparentEvent *rne = (XReparentEvent *) xev;
+
+			ForAllIndicators () {
+				CdkWindow *w =
+				    ctk_widget_get_parent_window
+				    (CTK_WIDGET (gki));
+
+				/* compare the indicator's parent window with the even window */
+				if (w != NULL
+				    && CDK_WINDOW_XID (w) == rne->window) {
+					/* if so - make it transparent... */
+					xkl_engine_set_window_transparent
+					    (globals.engine, rne->window,
+					     TRUE);
+				}
+			}
+			NextIndicator ()
+		}
+		break;
+	}
+	return CDK_FILTER_CONTINUE;
+}
+
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_start_listen (void)
+{
+	cdk_window_add_filter (NULL, (CdkFilterFunc)
+			       cafekbd_indicator_filter_x_evt, NULL);
+	cdk_window_add_filter (cdk_get_default_root_window (),
+			       (CdkFilterFunc)
+			       cafekbd_indicator_filter_x_evt, NULL);
+
+	xkl_engine_start_listen (globals.engine,
+				 XKLL_TRACK_KEYBOARD_STATE);
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_stop_listen (void)
+{
+	xkl_engine_stop_listen (globals.engine, XKLL_TRACK_KEYBOARD_STATE);
+
+	cdk_window_remove_filter (NULL, (CdkFilterFunc)
+				  cafekbd_indicator_filter_x_evt, NULL);
+	cdk_window_remove_filter
+	    (cdk_get_default_root_window (),
+	     (CdkFilterFunc) cafekbd_indicator_filter_x_evt, NULL);
+}
+
+static gboolean
+cafekbd_indicator_scroll (CtkWidget      *gki G_GNUC_UNUSED,
+			  CdkEventScroll *event G_GNUC_UNUSED)
+{
+	/* mouse wheel events should be ignored, otherwise funny effects appear */
+	return TRUE;
+}
+
+static void cafekbd_indicator_init(CafekbdIndicator* gki)
+{
+	CtkWidget *def_drawing;
+	CtkNotebook *notebook;
+
+	if (!g_slist_length(globals.widget_instances))
+	{
+		cafekbd_indicator_global_init();
+	}
+
+	gki->priv = g_new0 (CafekbdIndicatorPrivate, 1);
+
+	notebook = CTK_NOTEBOOK (gki);
+
+	xkl_debug (100, "Initiating the widget startup process for %p\n", gki);
+
+	ctk_notebook_set_show_tabs (notebook, FALSE);
+	ctk_notebook_set_show_border (notebook, FALSE);
+
+	def_drawing =
+	    ctk_image_new_from_icon_name ("process-stop",
+				      CTK_ICON_SIZE_BUTTON);
+
+	ctk_notebook_append_page (notebook, def_drawing,
+				  ctk_label_new (""));
+
+	if (globals.engine == NULL) {
+		cafekbd_indicator_set_tooltips (gki,
+					     _
+					     ("XKB initialization error"));
+		return;
+	}
+
+	cafekbd_indicator_set_tooltips (gki, NULL);
+
+	cafekbd_indicator_fill (gki);
+	cafekbd_indicator_set_current_page (gki);
+
+	ctk_widget_add_events (CTK_WIDGET (gki), CDK_BUTTON_PRESS_MASK);
+
+	/* append AFTER all initialization work is finished */
+	globals.widget_instances =
+	    g_slist_append (globals.widget_instances, gki);
+}
+
+static void
+cafekbd_indicator_finalize (GObject * obj)
+{
+	CafekbdIndicator *gki = CAFEKBD_INDICATOR (obj);
+	xkl_debug (100,
+		   "Starting the cafe-kbd-indicator widget shutdown process for %p\n",
+		   gki);
+
+	/* remove BEFORE all termination work is finished */
+	globals.widget_instances =
+	    g_slist_remove (globals.widget_instances, gki);
+
+	cafekbd_indicator_cleanup (gki);
+
+	xkl_debug (100,
+		   "The instance of cafe-kbd-indicator successfully finalized\n");
+
+	g_free (gki->priv);
+
+	G_OBJECT_CLASS (cafekbd_indicator_parent_class)->finalize (obj);
+
+	if (!g_slist_length (globals.widget_instances))
+		cafekbd_indicator_global_term ();
+}
+
+static void
+cafekbd_indicator_global_term (void)
+{
+	xkl_debug (100, "*** Last  CafekbdIndicator instance *** \n");
+	cafekbd_indicator_stop_listen ();
+
+	cafekbd_desktop_config_stop_listen (&globals.cfg);
+	cafekbd_indicator_config_stop_listen (&globals.ind_cfg);
+
+	cafekbd_indicator_config_term (&globals.ind_cfg);
+	cafekbd_keyboard_config_term (&globals.kbd_cfg);
+	cafekbd_desktop_config_term (&globals.cfg);
+
+	g_object_unref (G_OBJECT (globals.registry));
+	globals.registry = NULL;
+	g_object_unref (G_OBJECT (globals.engine));
+	globals.engine = NULL;
+	xkl_debug (100, "*** Terminated globals *** \n");
+}
+
+static void
+cafekbd_indicator_class_init (CafekbdIndicatorClass * klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+	CtkWidgetClass *widget_class = CTK_WIDGET_CLASS (klass);
+
+	xkl_debug (100, "*** First CafekbdIndicator instance *** \n");
+
+	memset (&globals, 0, sizeof (globals));
+
+	/* Initing some global vars */
+	globals.tooltips_format = "%s";
+
+	/* Initing vtable */
+	object_class->finalize = cafekbd_indicator_finalize;
+
+	widget_class->scroll_event = cafekbd_indicator_scroll;
+	widget_class->parent_set = cafekbd_indicator_parent_set;
+
+	/* Signals */
+	g_signal_new ("reinit-ui", CAFEKBD_TYPE_INDICATOR,
+		      G_SIGNAL_RUN_LAST,
+		      G_STRUCT_OFFSET (CafekbdIndicatorClass, reinit_ui),
+		      NULL, NULL, cafekbd_indicator_VOID__VOID,
+		      G_TYPE_NONE, 0);
+}
+
+static void
+cafekbd_indicator_global_init (void)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+
+	globals.engine = xkl_engine_get_instance(CDK_DISPLAY_XDISPLAY(cdk_display_get_default()));
+
+	if (globals.engine == NULL)
+	{
+		xkl_debug (0, "Libxklavier initialization error");
+		return;
+	}
+
+	g_signal_connect (globals.engine, "X-state-changed",
+			  G_CALLBACK (cafekbd_indicator_state_callback),
+			  NULL);
+	g_signal_connect (globals.engine, "X-config-changed",
+			  G_CALLBACK (cafekbd_indicator_kbd_cfg_callback),
+			  NULL);
+
+	cafekbd_desktop_config_init (&globals.cfg, globals.engine);
+	cafekbd_keyboard_config_init (&globals.kbd_cfg, globals.engine);
+	cafekbd_indicator_config_init (&globals.ind_cfg, globals.engine);
+
+	cafekbd_desktop_config_start_listen (&globals.cfg,
+					  (GCallback)
+					  cafekbd_indicator_cfg_changed,
+					  NULL);
+	cafekbd_indicator_config_start_listen (&globals.ind_cfg,
+					    (GCallback)
+					    cafekbd_indicator_ind_cfg_changed,
+					    NULL);
+
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+
+	globals.registry =
+	    xkl_config_registry_get_instance (globals.engine);
+	xkl_config_registry_load (globals.registry,
+				  globals.cfg.load_extra_items);
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+	cafekbd_indicator_update_images ();
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	cafekbd_indicator_load_group_names ((const gchar **) xklrec->layouts,
+					 (const gchar **)
+					 xklrec->variants);
+	g_object_unref (G_OBJECT (xklrec));
+
+	cafekbd_indicator_start_listen ();
+
+	xkl_debug (100, "*** Inited globals *** \n");
+}
+
+CtkWidget *
+cafekbd_indicator_new (void)
+{
+	return
+	    CTK_WIDGET (g_object_new (cafekbd_indicator_get_type (), NULL));
+}
+
+void
+cafekbd_indicator_set_parent_tooltips (CafekbdIndicator * gki, gboolean spt)
+{
+	gki->priv->set_parent_tooltips = spt;
+	cafekbd_indicator_update_tooltips (gki);
+}
+
+void
+cafekbd_indicator_set_tooltips_format (const gchar format[])
+{
+	globals.tooltips_format = format;
+	ForAllIndicators ()
+	    cafekbd_indicator_update_tooltips (gki);
+	NextIndicator ()
+}
+
+/**
+ * cafekbd_indicator_get_xkl_engine:
+ *
+ * Returns: (transfer none): The engine shared by all CafekbdIndicator objects
+ */
+XklEngine *
+cafekbd_indicator_get_xkl_engine ()
+{
+	return globals.engine;
+}
+
+/**
+ * cafekbd_indicator_get_group_names:
+ *
+ * Returns: (transfer none) (array zero-terminated=1): List of group names
+ */
+gchar **
+cafekbd_indicator_get_group_names ()
+{
+	return globals.full_group_names;
+}
+
+gchar *
+cafekbd_indicator_get_image_filename (guint group)
+{
+	if (!globals.ind_cfg.show_flags)
+		return NULL;
+	return cafekbd_indicator_config_get_images_file (&globals.ind_cfg,
+						      &globals.kbd_cfg,
+						      group);
+}
+
+gdouble
+cafekbd_indicator_get_max_width_height_ratio (void)
+{
+	gdouble rv = 0.0;
+	GSList *ip = globals.images;
+	if (!globals.ind_cfg.show_flags)
+		return 0;
+	while (ip != NULL) {
+		GdkPixbuf *img = GDK_PIXBUF (ip->data);
+		gdouble r =
+		    1.0 * gdk_pixbuf_get_width (img) /
+		    gdk_pixbuf_get_height (img);
+		if (r > rv)
+			rv = r;
+		ip = ip->next;
+	}
+	return rv;
+}
+
+void
+cafekbd_indicator_set_angle (CafekbdIndicator * gki, gdouble angle)
+{
+	gki->priv->angle = angle;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/3.html b/2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/3.html new file mode 100644 index 0000000..2dbd2a6 --- /dev/null +++ b/2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/3.html @@ -0,0 +1,1832 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <X11/keysym.h>
+
+#include <glib/gi18n-lib.h>
+
+#include <cafekbd-keyboard-config.h>
+#include <cafekbd-config-private.h>
+#include <cafekbd-util.h>
+
+/*
+ * CafekbdKeyboardConfig
+ */
+#define CAFEKBD_KEYBOARD_CONFIG_SCHEMA CAFEKBD_CONFIG_SCHEMA ".kbd"
+
+#define GROUP_SWITCHERS_GROUP "grp"
+#define DEFAULT_GROUP_SWITCH "grp:shift_caps_toggle"
+
+const gchar CAFEKBD_KEYBOARD_CONFIG_KEY_MODEL[] = "model";
+const gchar CAFEKBD_KEYBOARD_CONFIG_KEY_LAYOUTS[] = "layouts";
+const gchar CAFEKBD_KEYBOARD_CONFIG_KEY_OPTIONS[] = "options";
+
+const gchar *CAFEKBD_KEYBOARD_CONFIG_ACTIVE[] = {
+	CAFEKBD_KEYBOARD_CONFIG_KEY_MODEL,
+	CAFEKBD_KEYBOARD_CONFIG_KEY_LAYOUTS,
+	CAFEKBD_KEYBOARD_CONFIG_KEY_OPTIONS
+};
+
+/*
+ * static common functions
+ */
+
+static gboolean
+cafekbd_strv_equal (gchar ** l1, gchar ** l2)
+{
+	if (l1 == l2)
+		return TRUE;
+	if (l1 == NULL)
+		return g_strv_length (l2) == 0;
+	if (l2 == NULL)
+		return g_strv_length (l1) == 0;
+
+	while ((*l1 != NULL) && (*l2 != NULL)) {
+		if (*l1 != *l2) {
+			if (*l1 && *l2) {<--- Condition '*l1' is always true<--- Condition '*l2' is always true
+				if (g_ascii_strcasecmp (*l1, *l2))
+					return FALSE;
+			} else
+				return FALSE;
+		}
+
+		l1++;
+		l2++;
+	}
+	return (*l1 == NULL) && (*l2 == NULL);
+}
+
+gboolean
+cafekbd_keyboard_config_get_lv_descriptions (XklConfigRegistry *
+					  config_registry,
+					  const gchar * layout_name,
+					  const gchar * variant_name,
+					  gchar ** layout_short_descr,
+					  gchar ** layout_descr,
+					  gchar ** variant_short_descr,
+					  gchar ** variant_descr)
+{
+	/* TODO make it not static */
+	static XklConfigItem *litem = NULL;
+	static XklConfigItem *vitem = NULL;
+
+	if (litem == NULL)
+		litem = xkl_config_item_new ();
+	if (vitem == NULL)
+		vitem = xkl_config_item_new ();
+
+	layout_name = g_strdup (layout_name);
+
+	g_snprintf (litem->name, sizeof litem->name, "%s", layout_name);
+	if (xkl_config_registry_find_layout (config_registry, litem)) {
+		*layout_short_descr = litem->short_description;
+		*layout_descr = litem->description;
+	} else
+		*layout_short_descr = *layout_descr = NULL;
+
+	if (variant_name != NULL) {
+		variant_name = g_strdup (variant_name);
+		g_snprintf (vitem->name, sizeof vitem->name, "%s",
+			    variant_name);
+		if (xkl_config_registry_find_variant
+		    (config_registry, layout_name, vitem)) {
+			*variant_short_descr = vitem->short_description;
+			*variant_descr = vitem->description;
+		} else
+			*variant_short_descr = *variant_descr = NULL;
+
+		g_free ((char *) variant_name);
+	} else
+		*variant_descr = NULL;
+
+	g_free ((char *) layout_name);
+	return *layout_descr != NULL;
+}
+
+/*
+ * extern common functions
+ */
+const gchar *
+cafekbd_keyboard_config_merge_items (const gchar * parent,
+				  const gchar * child)
+{
+	static gchar buffer[XKL_MAX_CI_NAME_LENGTH * 2 - 1];
+	*buffer = '\0';
+	if (parent != NULL) {
+		if (strlen (parent) >= XKL_MAX_CI_NAME_LENGTH)
+			return NULL;
+		strcat (buffer, parent);
+	}
+	if (child != NULL && *child != 0) {
+		if (strlen (child) >= XKL_MAX_CI_NAME_LENGTH)
+			return NULL;
+		strcat (buffer, "\t");
+		strcat (buffer, child);
+	}
+	return buffer;
+}
+
+gboolean
+cafekbd_keyboard_config_split_items (const gchar * merged, gchar ** parent,
+				  gchar ** child)
+{
+	static gchar pbuffer[XKL_MAX_CI_NAME_LENGTH];
+	static gchar cbuffer[XKL_MAX_CI_NAME_LENGTH];
+	int plen;
+	const gchar *pos;
+	*parent = *child = NULL;
+
+	if (merged == NULL)
+		return FALSE;
+
+	pos = strchr (merged, '\t');
+	if (pos == NULL) {
+		plen = strlen (merged);
+	} else {
+		plen = pos - merged;
+		if (strlen (pos + 1) >= XKL_MAX_CI_NAME_LENGTH)
+			return FALSE;
+		strcpy (*child = cbuffer, pos + 1);
+	}
+	if (plen >= XKL_MAX_CI_NAME_LENGTH)
+		return FALSE;
+	memcpy (*parent = pbuffer, merged, plen);
+	pbuffer[plen] = '\0';
+	return TRUE;
+}
+
+/*
+ * static CafekbdKeyboardConfig functions
+ */
+static void
+cafekbd_keyboard_config_copy_from_xkl_config (CafekbdKeyboardConfig * kbd_config,
+					   XklConfigRec * pdata)
+{
+	char **p;
+	int i;
+	cafekbd_keyboard_config_model_set (kbd_config, pdata->model);
+	xkl_debug (150, "Loaded Kbd model: [%s]\n", pdata->model);
+
+	/* Layouts */
+	g_strfreev (kbd_config->layouts_variants);
+	kbd_config->layouts_variants = NULL;
+	if (pdata->layouts != NULL) {
+		char **p1;
+
+		p = pdata->layouts;
+		p1 = pdata->variants;
+		kbd_config->layouts_variants =
+		    g_new0 (gchar *, g_strv_length (pdata->layouts) + 1);
+		i = 0;
+		while (*p != NULL) {
+			const gchar *full_layout =
+			    cafekbd_keyboard_config_merge_items (*p, *p1);
+			xkl_debug (150,
+				   "Loaded Kbd layout (with variant): [%s]\n",
+				   full_layout);
+			kbd_config->layouts_variants[i++] =
+			    g_strdup (full_layout);
+			p++;
+			p1++;
+		}
+	}
+
+	/* Options */
+	g_strfreev (kbd_config->options);
+	kbd_config->options = NULL;
+
+	if (pdata->options != NULL) {
+		p = pdata->options;
+		kbd_config->options =
+		    g_new0 (gchar *, g_strv_length (pdata->options) + 1);
+		i = 0;
+		while (*p != NULL) {
+			char *option = *p;
+			char *delim =<--- Variable 'delim' can be declared as pointer to const
+			    (option != NULL) ? strchr (option, ':') : NULL;<--- Condition 'option!=NULL' is always true
+			int len;
+			if ((delim != NULL) &&
+			    ((len =
+			      (delim - option)) <
+			     XKL_MAX_CI_NAME_LENGTH)) {
+				char group[XKL_MAX_CI_NAME_LENGTH];
+
+				strncpy (group, option, len);
+				group[len] = 0;
+				xkl_debug (150,
+					   "Loaded Kbd option: [%s][%s]\n",
+					   group, option);
+				cafekbd_keyboard_config_options_set
+				    (kbd_config, i++, group, option);
+			}
+			p++;
+		}
+	}
+}
+
+static void
+cafekbd_keyboard_config_copy_to_xkl_config (CafekbdKeyboardConfig * kbd_config,
+					 XklConfigRec * pdata)
+{
+	int i;
+	int num_layouts, num_options;
+	pdata->model =
+	    (kbd_config->model ==
+	     NULL) ? NULL : g_strdup (kbd_config->model);
+
+	num_layouts =
+	    (kbd_config->layouts_variants ==
+	     NULL) ? 0 : g_strv_length (kbd_config->layouts_variants);
+	num_options =
+	    (kbd_config->options ==
+	     NULL) ? 0 : g_strv_length (kbd_config->options);
+
+	xkl_debug (150, "Taking %d layouts\n", num_layouts);
+	if (num_layouts != 0) {
+		gchar **the_layout_variant = kbd_config->layouts_variants;
+		char **p1 = pdata->layouts =
+		    g_new0 (char *, num_layouts + 1);
+		char **p2 = pdata->variants =
+		    g_new0 (char *, num_layouts + 1);
+		for (i = num_layouts; --i >= 0;) {
+			char *layout, *variant;
+			if (cafekbd_keyboard_config_split_items
+			    (*the_layout_variant, &layout, &variant)
+			    && variant != NULL) {
+				*p1 =
+				    (layout ==
+				     NULL) ? g_strdup ("") :
+				    g_strdup (layout);
+				*p2 =
+				    (variant ==<--- Condition 'variant==NULL' is always false
+				     NULL) ? g_strdup ("") :
+				    g_strdup (variant);
+			} else {
+				*p1 =
+				    (*the_layout_variant ==
+				     NULL) ? g_strdup ("") :
+				    g_strdup (*the_layout_variant);
+				*p2 = g_strdup ("");
+			}
+			xkl_debug (150, "Adding [%s]/%p and [%s]/%p\n",
+				   *p1 ? *p1 : "(nil)", *p1,
+				   *p2 ? *p2 : "(nil)", *p2);
+			p1++;
+			p2++;
+			the_layout_variant++;
+		}
+	}
+
+	if (num_options != 0) {
+		gchar **the_option = kbd_config->options;
+		char **p = pdata->options =
+		    g_new0 (char *, num_options + 1);
+		for (i = num_options; --i >= 0;) {
+			char *group, *option;
+			if (cafekbd_keyboard_config_split_items
+			    (*the_option, &group, &option)
+			    && option != NULL)
+				*(p++) = g_strdup (option);
+			else {
+				*(p++) = g_strdup ("");
+				xkl_debug (150, "Could not split [%s]\n",
+					   *the_option);
+			}
+			the_option++;
+		}
+	}
+}
+
+static void
+cafekbd_keyboard_config_load_params (CafekbdKeyboardConfig * kbd_config,
+				  const gchar * param_names[])
+{
+	gchar *pc;
+
+	pc = g_settings_get_string (kbd_config->settings, param_names[0]);
+	if (pc == NULL) {
+		cafekbd_keyboard_config_model_set (kbd_config, NULL);
+	} else {
+		cafekbd_keyboard_config_model_set (kbd_config, pc);
+		g_free (pc);
+	}
+	xkl_debug (150, "Loaded Kbd model: [%s]\n",
+		   kbd_config->model ? kbd_config->model : "(null)");
+
+	g_strfreev (kbd_config->layouts_variants);
+
+	kbd_config->layouts_variants =
+	    g_settings_get_strv (kbd_config->settings, param_names[1]);
+
+	if (kbd_config->layouts_variants != NULL
+	    && kbd_config->layouts_variants[0] == NULL) {
+		g_strfreev (kbd_config->layouts_variants);
+		kbd_config->layouts_variants = NULL;
+	}
+
+	g_strfreev (kbd_config->options);
+
+	kbd_config->options =
+	    g_settings_get_strv (kbd_config->settings, param_names[2]);
+
+	if (kbd_config->options != NULL && kbd_config->options[0] == NULL) {
+		g_strfreev (kbd_config->options);
+		kbd_config->options = NULL;
+	}
+}
+
+static void
+cafekbd_keyboard_config_save_params (CafekbdKeyboardConfig * kbd_config,
+				  const gchar * param_names[])
+{
+	gchar **pl;
+
+	if (kbd_config->model)
+		g_settings_set_string (kbd_config->settings, param_names[0],
+				       kbd_config->model);
+	else
+		g_settings_set_string (kbd_config->settings, param_names[0],
+				       NULL);
+	xkl_debug (150, "Saved Kbd model: [%s]\n",
+		   kbd_config->model ? kbd_config->model : "(null)");
+
+	if (kbd_config->layouts_variants) {
+		pl = kbd_config->layouts_variants;
+		while (*pl != NULL) {
+			xkl_debug (150, "Saved Kbd layout: [%s]\n", *pl);
+			pl++;
+		}
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[1],
+				     (const gchar * const *)
+				     kbd_config->layouts_variants);
+	} else {
+		xkl_debug (150, "Saved Kbd layouts: []\n");
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[1], NULL);
+	}
+
+	if (kbd_config->options) {
+		pl = kbd_config->options;
+		while (*pl != NULL) {
+			xkl_debug (150, "Saved Kbd option: [%s]\n", *pl);
+			pl++;
+		}
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[2],
+				     (const gchar *
+				      const *) kbd_config->options);
+	} else {
+		xkl_debug (150, "Saved Kbd options: []\n");
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[2], NULL);
+	}
+}
+
+/*
+ * extern CafekbdKeyboardConfig config functions
+ */
+void
+cafekbd_keyboard_config_init (CafekbdKeyboardConfig * kbd_config,
+			      XklEngine * engine)
+{
+	memset (kbd_config, 0, sizeof (*kbd_config));
+	kbd_config->settings = g_settings_new (CAFEKBD_KEYBOARD_CONFIG_SCHEMA);
+	kbd_config->engine = engine;
+}
+
+void
+cafekbd_keyboard_config_term (CafekbdKeyboardConfig * kbd_config)
+{
+	cafekbd_keyboard_config_model_set (kbd_config, NULL);
+
+	g_strfreev (kbd_config->layouts_variants);
+	kbd_config->layouts_variants = NULL;
+	g_strfreev (kbd_config->options);
+	kbd_config->options = NULL;
+
+	g_object_unref (kbd_config->settings);
+	kbd_config->settings = NULL;
+}
+
+void
+cafekbd_keyboard_config_load_from_gsettings (CafekbdKeyboardConfig * kbd_config,
+				      CafekbdKeyboardConfig *
+				      kbd_config_default)
+{
+	cafekbd_keyboard_config_load_params (kbd_config,
+					  CAFEKBD_KEYBOARD_CONFIG_ACTIVE);
+
+	if (kbd_config_default != NULL) {
+
+		if (kbd_config->model == NULL)
+			kbd_config->model =
+			    g_strdup (kbd_config_default->model);
+
+		if (kbd_config->layouts_variants == NULL) {
+			kbd_config->layouts_variants =
+			    g_strdupv
+			    (kbd_config_default->layouts_variants);
+		}
+
+		if (kbd_config->options == NULL) {
+			kbd_config->options =
+			    g_strdupv (kbd_config_default->options);
+		}
+	}
+}
+
+void
+cafekbd_keyboard_config_load_from_x_current (CafekbdKeyboardConfig * kbd_config,
+					  XklConfigRec * data)
+{
+	gboolean own_data = data == NULL;
+	xkl_debug (150, "Copying config from X(current)\n");
+	if (own_data)
+		data = xkl_config_rec_new ();
+	if (xkl_config_rec_get_from_server (data, kbd_config->engine))
+		cafekbd_keyboard_config_copy_from_xkl_config (kbd_config,
+							   data);
+	else
+		xkl_debug (150,
+			   "Could not load keyboard config from server: [%s]\n",
+			   xkl_get_last_error ());
+	if (own_data)
+		g_object_unref (G_OBJECT (data));
+}
+
+void
+cafekbd_keyboard_config_load_from_x_initial (CafekbdKeyboardConfig * kbd_config,
+					  XklConfigRec * data)
+{
+	gboolean own_data = data == NULL;
+	xkl_debug (150, "Copying config from X(initial)\n");
+	if (own_data)
+		data = xkl_config_rec_new ();
+	if (xkl_config_rec_get_from_backup (data, kbd_config->engine))
+		cafekbd_keyboard_config_copy_from_xkl_config (kbd_config,
+							   data);
+	else
+		xkl_debug (150,
+			   "Could not load keyboard config from backup: [%s]\n",
+			   xkl_get_last_error ());
+	if (own_data)
+		g_object_unref (G_OBJECT (data));
+}
+
+static gboolean
+cafekbd_keyboard_config_options_equals (CafekbdKeyboardConfig * kbd_config1,
+				     CafekbdKeyboardConfig * kbd_config2)
+{
+	int num_options, num_options2;
+
+	num_options =
+	    (kbd_config1->options ==
+	     NULL) ? 0 : g_strv_length (kbd_config1->options);
+	num_options2 =
+	    (kbd_config2->options ==
+	     NULL) ? 0 : g_strv_length (kbd_config2->options);
+
+	if (num_options != num_options2)
+		return False;
+
+	if (num_options != 0) {
+		int i;
+		char *group1, *option1;
+
+		for (i = 0; i < num_options; i++) {
+			int j;
+			char *group2, *option2;
+			gboolean are_equal = FALSE;
+
+			if (!cafekbd_keyboard_config_split_items
+			    (kbd_config1->options[i], &group1, &option1))
+				continue;
+
+			option1 = g_strdup (option1);
+
+			for (j = 0; j < num_options && !are_equal; j++) {
+				if (cafekbd_keyboard_config_split_items
+				    (kbd_config2->options[j], &group2,
+				     &option2)) {
+					are_equal =
+					    strcmp (option1, option2) == 0;
+				}
+			}
+
+			g_free (option1);
+
+			if (!are_equal)
+				return False;
+		}
+	}
+
+	return True;
+}
+
+gboolean
+cafekbd_keyboard_config_equals (CafekbdKeyboardConfig * kbd_config1,
+			     CafekbdKeyboardConfig * kbd_config2)
+{
+	if (kbd_config1 == kbd_config2)
+		return True;
+	if ((kbd_config1->model != kbd_config2->model) &&
+	    (kbd_config1->model != NULL) &&
+	    (kbd_config2->model != NULL) &&
+	    g_ascii_strcasecmp (kbd_config1->model, kbd_config2->model))
+		return False;
+	if (!cafekbd_strv_equal (kbd_config1->layouts_variants,
+			   kbd_config2->layouts_variants))
+		return False;
+
+	if (!cafekbd_keyboard_config_options_equals
+	    (kbd_config1, kbd_config2))
+		return False;
+
+	return True;
+}
+
+void
+cafekbd_keyboard_config_save_to_gsettings (CafekbdKeyboardConfig * kbd_config)
+{
+	g_settings_delay (kbd_config->settings);
+
+	cafekbd_keyboard_config_save_params (kbd_config,
+					     CAFEKBD_KEYBOARD_CONFIG_ACTIVE);
+
+	g_settings_apply (kbd_config->settings);
+}
+
+void
+cafekbd_keyboard_config_model_set (CafekbdKeyboardConfig * kbd_config,
+				const gchar * model_name)
+{
+	if (kbd_config->model != NULL)
+		g_free (kbd_config->model);
+	kbd_config->model =
+	    (model_name == NULL
+	     || model_name[0] == '\0') ? NULL : g_strdup (model_name);
+}
+
+void
+cafekbd_keyboard_config_options_set (CafekbdKeyboardConfig * kbd_config,
+				  gint idx,
+				  const gchar * group_name,
+				  const gchar * option_name)
+{
+	const gchar *merged;
+	if (group_name == NULL || option_name == NULL)
+		return;
+	merged =
+	    cafekbd_keyboard_config_merge_items (group_name, option_name);
+	if (merged == NULL)
+		return;
+	kbd_config->options[idx] = g_strdup (merged);
+}
+
+gboolean
+cafekbd_keyboard_config_options_is_set (CafekbdKeyboardConfig * kbd_config,<--- Parameter 'kbd_config' can be declared as pointer to const
+				     const gchar * group_name,
+				     const gchar * option_name)
+{
+	gchar **p = kbd_config->options;
+	const gchar *merged =
+	    cafekbd_keyboard_config_merge_items (group_name, option_name);
+	if (merged == NULL)
+		return FALSE;
+
+	while (p && *p) {
+		if (!g_ascii_strcasecmp (merged, *p++))
+			return TRUE;
+	}
+	return FALSE;
+}
+
+gboolean
+cafekbd_keyboard_config_activate (CafekbdKeyboardConfig * kbd_config)
+{
+	gboolean rv;
+	XklConfigRec *data = xkl_config_rec_new ();
+
+	cafekbd_keyboard_config_copy_to_xkl_config (kbd_config, data);
+	rv = xkl_config_rec_activate (data, kbd_config->engine);
+	g_object_unref (G_OBJECT (data));
+
+	return rv;
+}
+
+/**
+ * cafekbd_keyboard_config_start_listen:
+ * @func: (scope notified): a function to call when settings are changed
+ */
+void
+cafekbd_keyboard_config_start_listen (CafekbdKeyboardConfig * kbd_config,
+				   GCallback func,
+				   gpointer user_data)
+{
+	kbd_config->config_listener_id =
+	    g_signal_connect (kbd_config->settings, "changed", func,
+			      user_data);
+}
+
+void
+cafekbd_keyboard_config_stop_listen (CafekbdKeyboardConfig * kbd_config)
+{
+	g_signal_handler_disconnect (kbd_config->settings,
+				     kbd_config->config_listener_id);
+	kbd_config->config_listener_id = 0;
+}
+
+gboolean
+cafekbd_keyboard_config_get_descriptions (XklConfigRegistry * config_registry,
+				       const gchar * name,
+				       gchar ** layout_short_descr,
+				       gchar ** layout_descr,
+				       gchar ** variant_short_descr,
+				       gchar ** variant_descr)
+{
+	char *layout_name = NULL, *variant_name = NULL;
+	if (!cafekbd_keyboard_config_split_items
+	    (name, &layout_name, &variant_name))
+		return FALSE;
+	return cafekbd_keyboard_config_get_lv_descriptions (config_registry,
+							 layout_name,
+							 variant_name,
+							 layout_short_descr,
+							 layout_descr,
+							 variant_short_descr,
+							 variant_descr);
+}
+
+const gchar *
+cafekbd_keyboard_config_format_full_layout (const gchar * layout_descr,
+					 const gchar * variant_descr)
+{
+	static gchar full_descr[XKL_MAX_CI_DESC_LENGTH * 2];
+	if (variant_descr == NULL || variant_descr[0] == 0)
+		g_snprintf (full_descr, sizeof (full_descr), "%s",
+			    layout_descr);
+	else
+		g_snprintf (full_descr, sizeof (full_descr), "%s %s",
+			    layout_descr, variant_descr);
+	return full_descr;
+}
+
+gchar *
+cafekbd_keyboard_config_to_string (const CafekbdKeyboardConfig * config)
+{
+	gchar *layouts = NULL, *options = NULL;
+	GString *buffer = g_string_new (NULL);
+
+	gchar **iter;
+	gint count;
+	gchar *result;
+
+	if (config->layouts_variants) {
+		/* g_slist_length is "expensive", so we determinate the length on the fly */
+		for (iter = config->layouts_variants, count = 0; *iter;
+		     iter++, ++count) {
+			if (buffer->len)
+				g_string_append (buffer, " ");
+
+			g_string_append (buffer, *iter);
+		}
+
+		/* Translators: The count is related to the number of options. The %s
+		 * format specifier should not be modified, left "as is". */
+		layouts =
+		    g_strdup_printf (ngettext
+				     ("layout \"%s\"", "layouts \"%s\"",
+				      count), buffer->str);
+		g_string_truncate (buffer, 0);
+	}
+	if (config->options) {
+		/* g_slist_length is "expensive", so we determinate the length on the fly */
+		for (iter = config->options, count = 0; *iter;
+		     iter++, ++count) {
+			if (buffer->len)
+				g_string_append (buffer, " ");
+
+			g_string_append (buffer, *iter);
+		}
+
+		/* Translators: The count is related to the number of options. The %s
+		 * format specifier should not be modified, left "as is". */
+		options =
+		    g_strdup_printf (ngettext
+				     ("option \"%s\"", "options \"%s\"",
+				      count), buffer->str);
+		g_string_truncate (buffer, 0);
+	}
+
+	g_string_free (buffer, TRUE);
+
+	result =
+	    g_strdup_printf (_("model \"%s\", %s and %s"), config->model,
+			     layouts ? layouts : _("no layout"),
+			     options ? options : _("no options"));
+
+	g_free (options);
+	g_free (layouts);
+
+	return result;
+}
+
+/**
+ * cafekbd_keyboard_config_add_default_switch_option_if_necessary:
+ *
+ * Returns: (transfer full) (array zero-terminated=1): List of options
+ */
+gchar **
+cafekbd_keyboard_config_add_default_switch_option_if_necessary (gchar **
+							        layouts_list,
+							        gchar **
+							        options_list,
+							        gboolean *was_appended)
+{
+	*was_appended = FALSE;
+	if (g_strv_length (layouts_list) >= 2) {
+		gboolean any_switcher = False;
+		if (*options_list != NULL) {
+			gchar **option = options_list;
+			while (*option != NULL) {
+				char *g, *o;
+				if (cafekbd_keyboard_config_split_items
+				    (*option, &g, &o)) {
+					if (!g_ascii_strcasecmp
+					    (g, GROUP_SWITCHERS_GROUP)) {
+						any_switcher = True;
+						break;
+					}
+				}
+				option++;
+			}
+		}
+		if (!any_switcher) {
+			const gchar *id =
+			    cafekbd_keyboard_config_merge_items
+			    (GROUP_SWITCHERS_GROUP,
+			     DEFAULT_GROUP_SWITCH);
+			options_list =
+			    cafekbd_strv_append (options_list, g_strdup (id));
+			*was_appended = TRUE;
+		}
+	}
+	return options_list;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/4.html b/2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/4.html new file mode 100644 index 0000000..1d97c26 --- /dev/null +++ b/2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/4.html @@ -0,0 +1,6042 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
   1
+   2
+   3
+   4
+   5
+   6
+   7
+   8
+   9
+  10
+  11
+  12
+  13
+  14
+  15
+  16
+  17
+  18
+  19
+  20
+  21
+  22
+  23
+  24
+  25
+  26
+  27
+  28
+  29
+  30
+  31
+  32
+  33
+  34
+  35
+  36
+  37
+  38
+  39
+  40
+  41
+  42
+  43
+  44
+  45
+  46
+  47
+  48
+  49
+  50
+  51
+  52
+  53
+  54
+  55
+  56
+  57
+  58
+  59
+  60
+  61
+  62
+  63
+  64
+  65
+  66
+  67
+  68
+  69
+  70
+  71
+  72
+  73
+  74
+  75
+  76
+  77
+  78
+  79
+  80
+  81
+  82
+  83
+  84
+  85
+  86
+  87
+  88
+  89
+  90
+  91
+  92
+  93
+  94
+  95
+  96
+  97
+  98
+  99
+ 100
+ 101
+ 102
+ 103
+ 104
+ 105
+ 106
+ 107
+ 108
+ 109
+ 110
+ 111
+ 112
+ 113
+ 114
+ 115
+ 116
+ 117
+ 118
+ 119
+ 120
+ 121
+ 122
+ 123
+ 124
+ 125
+ 126
+ 127
+ 128
+ 129
+ 130
+ 131
+ 132
+ 133
+ 134
+ 135
+ 136
+ 137
+ 138
+ 139
+ 140
+ 141
+ 142
+ 143
+ 144
+ 145
+ 146
+ 147
+ 148
+ 149
+ 150
+ 151
+ 152
+ 153
+ 154
+ 155
+ 156
+ 157
+ 158
+ 159
+ 160
+ 161
+ 162
+ 163
+ 164
+ 165
+ 166
+ 167
+ 168
+ 169
+ 170
+ 171
+ 172
+ 173
+ 174
+ 175
+ 176
+ 177
+ 178
+ 179
+ 180
+ 181
+ 182
+ 183
+ 184
+ 185
+ 186
+ 187
+ 188
+ 189
+ 190
+ 191
+ 192
+ 193
+ 194
+ 195
+ 196
+ 197
+ 198
+ 199
+ 200
+ 201
+ 202
+ 203
+ 204
+ 205
+ 206
+ 207
+ 208
+ 209
+ 210
+ 211
+ 212
+ 213
+ 214
+ 215
+ 216
+ 217
+ 218
+ 219
+ 220
+ 221
+ 222
+ 223
+ 224
+ 225
+ 226
+ 227
+ 228
+ 229
+ 230
+ 231
+ 232
+ 233
+ 234
+ 235
+ 236
+ 237
+ 238
+ 239
+ 240
+ 241
+ 242
+ 243
+ 244
+ 245
+ 246
+ 247
+ 248
+ 249
+ 250
+ 251
+ 252
+ 253
+ 254
+ 255
+ 256
+ 257
+ 258
+ 259
+ 260
+ 261
+ 262
+ 263
+ 264
+ 265
+ 266
+ 267
+ 268
+ 269
+ 270
+ 271
+ 272
+ 273
+ 274
+ 275
+ 276
+ 277
+ 278
+ 279
+ 280
+ 281
+ 282
+ 283
+ 284
+ 285
+ 286
+ 287
+ 288
+ 289
+ 290
+ 291
+ 292
+ 293
+ 294
+ 295
+ 296
+ 297
+ 298
+ 299
+ 300
+ 301
+ 302
+ 303
+ 304
+ 305
+ 306
+ 307
+ 308
+ 309
+ 310
+ 311
+ 312
+ 313
+ 314
+ 315
+ 316
+ 317
+ 318
+ 319
+ 320
+ 321
+ 322
+ 323
+ 324
+ 325
+ 326
+ 327
+ 328
+ 329
+ 330
+ 331
+ 332
+ 333
+ 334
+ 335
+ 336
+ 337
+ 338
+ 339
+ 340
+ 341
+ 342
+ 343
+ 344
+ 345
+ 346
+ 347
+ 348
+ 349
+ 350
+ 351
+ 352
+ 353
+ 354
+ 355
+ 356
+ 357
+ 358
+ 359
+ 360
+ 361
+ 362
+ 363
+ 364
+ 365
+ 366
+ 367
+ 368
+ 369
+ 370
+ 371
+ 372
+ 373
+ 374
+ 375
+ 376
+ 377
+ 378
+ 379
+ 380
+ 381
+ 382
+ 383
+ 384
+ 385
+ 386
+ 387
+ 388
+ 389
+ 390
+ 391
+ 392
+ 393
+ 394
+ 395
+ 396
+ 397
+ 398
+ 399
+ 400
+ 401
+ 402
+ 403
+ 404
+ 405
+ 406
+ 407
+ 408
+ 409
+ 410
+ 411
+ 412
+ 413
+ 414
+ 415
+ 416
+ 417
+ 418
+ 419
+ 420
+ 421
+ 422
+ 423
+ 424
+ 425
+ 426
+ 427
+ 428
+ 429
+ 430
+ 431
+ 432
+ 433
+ 434
+ 435
+ 436
+ 437
+ 438
+ 439
+ 440
+ 441
+ 442
+ 443
+ 444
+ 445
+ 446
+ 447
+ 448
+ 449
+ 450
+ 451
+ 452
+ 453
+ 454
+ 455
+ 456
+ 457
+ 458
+ 459
+ 460
+ 461
+ 462
+ 463
+ 464
+ 465
+ 466
+ 467
+ 468
+ 469
+ 470
+ 471
+ 472
+ 473
+ 474
+ 475
+ 476
+ 477
+ 478
+ 479
+ 480
+ 481
+ 482
+ 483
+ 484
+ 485
+ 486
+ 487
+ 488
+ 489
+ 490
+ 491
+ 492
+ 493
+ 494
+ 495
+ 496
+ 497
+ 498
+ 499
+ 500
+ 501
+ 502
+ 503
+ 504
+ 505
+ 506
+ 507
+ 508
+ 509
+ 510
+ 511
+ 512
+ 513
+ 514
+ 515
+ 516
+ 517
+ 518
+ 519
+ 520
+ 521
+ 522
+ 523
+ 524
+ 525
+ 526
+ 527
+ 528
+ 529
+ 530
+ 531
+ 532
+ 533
+ 534
+ 535
+ 536
+ 537
+ 538
+ 539
+ 540
+ 541
+ 542
+ 543
+ 544
+ 545
+ 546
+ 547
+ 548
+ 549
+ 550
+ 551
+ 552
+ 553
+ 554
+ 555
+ 556
+ 557
+ 558
+ 559
+ 560
+ 561
+ 562
+ 563
+ 564
+ 565
+ 566
+ 567
+ 568
+ 569
+ 570
+ 571
+ 572
+ 573
+ 574
+ 575
+ 576
+ 577
+ 578
+ 579
+ 580
+ 581
+ 582
+ 583
+ 584
+ 585
+ 586
+ 587
+ 588
+ 589
+ 590
+ 591
+ 592
+ 593
+ 594
+ 595
+ 596
+ 597
+ 598
+ 599
+ 600
+ 601
+ 602
+ 603
+ 604
+ 605
+ 606
+ 607
+ 608
+ 609
+ 610
+ 611
+ 612
+ 613
+ 614
+ 615
+ 616
+ 617
+ 618
+ 619
+ 620
+ 621
+ 622
+ 623
+ 624
+ 625
+ 626
+ 627
+ 628
+ 629
+ 630
+ 631
+ 632
+ 633
+ 634
+ 635
+ 636
+ 637
+ 638
+ 639
+ 640
+ 641
+ 642
+ 643
+ 644
+ 645
+ 646
+ 647
+ 648
+ 649
+ 650
+ 651
+ 652
+ 653
+ 654
+ 655
+ 656
+ 657
+ 658
+ 659
+ 660
+ 661
+ 662
+ 663
+ 664
+ 665
+ 666
+ 667
+ 668
+ 669
+ 670
+ 671
+ 672
+ 673
+ 674
+ 675
+ 676
+ 677
+ 678
+ 679
+ 680
+ 681
+ 682
+ 683
+ 684
+ 685
+ 686
+ 687
+ 688
+ 689
+ 690
+ 691
+ 692
+ 693
+ 694
+ 695
+ 696
+ 697
+ 698
+ 699
+ 700
+ 701
+ 702
+ 703
+ 704
+ 705
+ 706
+ 707
+ 708
+ 709
+ 710
+ 711
+ 712
+ 713
+ 714
+ 715
+ 716
+ 717
+ 718
+ 719
+ 720
+ 721
+ 722
+ 723
+ 724
+ 725
+ 726
+ 727
+ 728
+ 729
+ 730
+ 731
+ 732
+ 733
+ 734
+ 735
+ 736
+ 737
+ 738
+ 739
+ 740
+ 741
+ 742
+ 743
+ 744
+ 745
+ 746
+ 747
+ 748
+ 749
+ 750
+ 751
+ 752
+ 753
+ 754
+ 755
+ 756
+ 757
+ 758
+ 759
+ 760
+ 761
+ 762
+ 763
+ 764
+ 765
+ 766
+ 767
+ 768
+ 769
+ 770
+ 771
+ 772
+ 773
+ 774
+ 775
+ 776
+ 777
+ 778
+ 779
+ 780
+ 781
+ 782
+ 783
+ 784
+ 785
+ 786
+ 787
+ 788
+ 789
+ 790
+ 791
+ 792
+ 793
+ 794
+ 795
+ 796
+ 797
+ 798
+ 799
+ 800
+ 801
+ 802
+ 803
+ 804
+ 805
+ 806
+ 807
+ 808
+ 809
+ 810
+ 811
+ 812
+ 813
+ 814
+ 815
+ 816
+ 817
+ 818
+ 819
+ 820
+ 821
+ 822
+ 823
+ 824
+ 825
+ 826
+ 827
+ 828
+ 829
+ 830
+ 831
+ 832
+ 833
+ 834
+ 835
+ 836
+ 837
+ 838
+ 839
+ 840
+ 841
+ 842
+ 843
+ 844
+ 845
+ 846
+ 847
+ 848
+ 849
+ 850
+ 851
+ 852
+ 853
+ 854
+ 855
+ 856
+ 857
+ 858
+ 859
+ 860
+ 861
+ 862
+ 863
+ 864
+ 865
+ 866
+ 867
+ 868
+ 869
+ 870
+ 871
+ 872
+ 873
+ 874
+ 875
+ 876
+ 877
+ 878
+ 879
+ 880
+ 881
+ 882
+ 883
+ 884
+ 885
+ 886
+ 887
+ 888
+ 889
+ 890
+ 891
+ 892
+ 893
+ 894
+ 895
+ 896
+ 897
+ 898
+ 899
+ 900
+ 901
+ 902
+ 903
+ 904
+ 905
+ 906
+ 907
+ 908
+ 909
+ 910
+ 911
+ 912
+ 913
+ 914
+ 915
+ 916
+ 917
+ 918
+ 919
+ 920
+ 921
+ 922
+ 923
+ 924
+ 925
+ 926
+ 927
+ 928
+ 929
+ 930
+ 931
+ 932
+ 933
+ 934
+ 935
+ 936
+ 937
+ 938
+ 939
+ 940
+ 941
+ 942
+ 943
+ 944
+ 945
+ 946
+ 947
+ 948
+ 949
+ 950
+ 951
+ 952
+ 953
+ 954
+ 955
+ 956
+ 957
+ 958
+ 959
+ 960
+ 961
+ 962
+ 963
+ 964
+ 965
+ 966
+ 967
+ 968
+ 969
+ 970
+ 971
+ 972
+ 973
+ 974
+ 975
+ 976
+ 977
+ 978
+ 979
+ 980
+ 981
+ 982
+ 983
+ 984
+ 985
+ 986
+ 987
+ 988
+ 989
+ 990
+ 991
+ 992
+ 993
+ 994
+ 995
+ 996
+ 997
+ 998
+ 999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+1011
+1012
+1013
+1014
+1015
+1016
+1017
+1018
+1019
+1020
+1021
+1022
+1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
+1033
+1034
+1035
+1036
+1037
+1038
+1039
+1040
+1041
+1042
+1043
+1044
+1045
+1046
+1047
+1048
+1049
+1050
+1051
+1052
+1053
+1054
+1055
+1056
+1057
+1058
+1059
+1060
+1061
+1062
+1063
+1064
+1065
+1066
+1067
+1068
+1069
+1070
+1071
+1072
+1073
+1074
+1075
+1076
+1077
+1078
+1079
+1080
+1081
+1082
+1083
+1084
+1085
+1086
+1087
+1088
+1089
+1090
+1091
+1092
+1093
+1094
+1095
+1096
+1097
+1098
+1099
+1100
+1101
+1102
+1103
+1104
+1105
+1106
+1107
+1108
+1109
+1110
+1111
+1112
+1113
+1114
+1115
+1116
+1117
+1118
+1119
+1120
+1121
+1122
+1123
+1124
+1125
+1126
+1127
+1128
+1129
+1130
+1131
+1132
+1133
+1134
+1135
+1136
+1137
+1138
+1139
+1140
+1141
+1142
+1143
+1144
+1145
+1146
+1147
+1148
+1149
+1150
+1151
+1152
+1153
+1154
+1155
+1156
+1157
+1158
+1159
+1160
+1161
+1162
+1163
+1164
+1165
+1166
+1167
+1168
+1169
+1170
+1171
+1172
+1173
+1174
+1175
+1176
+1177
+1178
+1179
+1180
+1181
+1182
+1183
+1184
+1185
+1186
+1187
+1188
+1189
+1190
+1191
+1192
+1193
+1194
+1195
+1196
+1197
+1198
+1199
+1200
+1201
+1202
+1203
+1204
+1205
+1206
+1207
+1208
+1209
+1210
+1211
+1212
+1213
+1214
+1215
+1216
+1217
+1218
+1219
+1220
+1221
+1222
+1223
+1224
+1225
+1226
+1227
+1228
+1229
+1230
+1231
+1232
+1233
+1234
+1235
+1236
+1237
+1238
+1239
+1240
+1241
+1242
+1243
+1244
+1245
+1246
+1247
+1248
+1249
+1250
+1251
+1252
+1253
+1254
+1255
+1256
+1257
+1258
+1259
+1260
+1261
+1262
+1263
+1264
+1265
+1266
+1267
+1268
+1269
+1270
+1271
+1272
+1273
+1274
+1275
+1276
+1277
+1278
+1279
+1280
+1281
+1282
+1283
+1284
+1285
+1286
+1287
+1288
+1289
+1290
+1291
+1292
+1293
+1294
+1295
+1296
+1297
+1298
+1299
+1300
+1301
+1302
+1303
+1304
+1305
+1306
+1307
+1308
+1309
+1310
+1311
+1312
+1313
+1314
+1315
+1316
+1317
+1318
+1319
+1320
+1321
+1322
+1323
+1324
+1325
+1326
+1327
+1328
+1329
+1330
+1331
+1332
+1333
+1334
+1335
+1336
+1337
+1338
+1339
+1340
+1341
+1342
+1343
+1344
+1345
+1346
+1347
+1348
+1349
+1350
+1351
+1352
+1353
+1354
+1355
+1356
+1357
+1358
+1359
+1360
+1361
+1362
+1363
+1364
+1365
+1366
+1367
+1368
+1369
+1370
+1371
+1372
+1373
+1374
+1375
+1376
+1377
+1378
+1379
+1380
+1381
+1382
+1383
+1384
+1385
+1386
+1387
+1388
+1389
+1390
+1391
+1392
+1393
+1394
+1395
+1396
+1397
+1398
+1399
+1400
+1401
+1402
+1403
+1404
+1405
+1406
+1407
+1408
+1409
+1410
+1411
+1412
+1413
+1414
+1415
+1416
+1417
+1418
+1419
+1420
+1421
+1422
+1423
+1424
+1425
+1426
+1427
+1428
+1429
+1430
+1431
+1432
+1433
+1434
+1435
+1436
+1437
+1438
+1439
+1440
+1441
+1442
+1443
+1444
+1445
+1446
+1447
+1448
+1449
+1450
+1451
+1452
+1453
+1454
+1455
+1456
+1457
+1458
+1459
+1460
+1461
+1462
+1463
+1464
+1465
+1466
+1467
+1468
+1469
+1470
+1471
+1472
+1473
+1474
+1475
+1476
+1477
+1478
+1479
+1480
+1481
+1482
+1483
+1484
+1485
+1486
+1487
+1488
+1489
+1490
+1491
+1492
+1493
+1494
+1495
+1496
+1497
+1498
+1499
+1500
+1501
+1502
+1503
+1504
+1505
+1506
+1507
+1508
+1509
+1510
+1511
+1512
+1513
+1514
+1515
+1516
+1517
+1518
+1519
+1520
+1521
+1522
+1523
+1524
+1525
+1526
+1527
+1528
+1529
+1530
+1531
+1532
+1533
+1534
+1535
+1536
+1537
+1538
+1539
+1540
+1541
+1542
+1543
+1544
+1545
+1546
+1547
+1548
+1549
+1550
+1551
+1552
+1553
+1554
+1555
+1556
+1557
+1558
+1559
+1560
+1561
+1562
+1563
+1564
+1565
+1566
+1567
+1568
+1569
+1570
+1571
+1572
+1573
+1574
+1575
+1576
+1577
+1578
+1579
+1580
+1581
+1582
+1583
+1584
+1585
+1586
+1587
+1588
+1589
+1590
+1591
+1592
+1593
+1594
+1595
+1596
+1597
+1598
+1599
+1600
+1601
+1602
+1603
+1604
+1605
+1606
+1607
+1608
+1609
+1610
+1611
+1612
+1613
+1614
+1615
+1616
+1617
+1618
+1619
+1620
+1621
+1622
+1623
+1624
+1625
+1626
+1627
+1628
+1629
+1630
+1631
+1632
+1633
+1634
+1635
+1636
+1637
+1638
+1639
+1640
+1641
+1642
+1643
+1644
+1645
+1646
+1647
+1648
+1649
+1650
+1651
+1652
+1653
+1654
+1655
+1656
+1657
+1658
+1659
+1660
+1661
+1662
+1663
+1664
+1665
+1666
+1667
+1668
+1669
+1670
+1671
+1672
+1673
+1674
+1675
+1676
+1677
+1678
+1679
+1680
+1681
+1682
+1683
+1684
+1685
+1686
+1687
+1688
+1689
+1690
+1691
+1692
+1693
+1694
+1695
+1696
+1697
+1698
+1699
+1700
+1701
+1702
+1703
+1704
+1705
+1706
+1707
+1708
+1709
+1710
+1711
+1712
+1713
+1714
+1715
+1716
+1717
+1718
+1719
+1720
+1721
+1722
+1723
+1724
+1725
+1726
+1727
+1728
+1729
+1730
+1731
+1732
+1733
+1734
+1735
+1736
+1737
+1738
+1739
+1740
+1741
+1742
+1743
+1744
+1745
+1746
+1747
+1748
+1749
+1750
+1751
+1752
+1753
+1754
+1755
+1756
+1757
+1758
+1759
+1760
+1761
+1762
+1763
+1764
+1765
+1766
+1767
+1768
+1769
+1770
+1771
+1772
+1773
+1774
+1775
+1776
+1777
+1778
+1779
+1780
+1781
+1782
+1783
+1784
+1785
+1786
+1787
+1788
+1789
+1790
+1791
+1792
+1793
+1794
+1795
+1796
+1797
+1798
+1799
+1800
+1801
+1802
+1803
+1804
+1805
+1806
+1807
+1808
+1809
+1810
+1811
+1812
+1813
+1814
+1815
+1816
+1817
+1818
+1819
+1820
+1821
+1822
+1823
+1824
+1825
+1826
+1827
+1828
+1829
+1830
+1831
+1832
+1833
+1834
+1835
+1836
+1837
+1838
+1839
+1840
+1841
+1842
+1843
+1844
+1845
+1846
+1847
+1848
+1849
+1850
+1851
+1852
+1853
+1854
+1855
+1856
+1857
+1858
+1859
+1860
+1861
+1862
+1863
+1864
+1865
+1866
+1867
+1868
+1869
+1870
+1871
+1872
+1873
+1874
+1875
+1876
+1877
+1878
+1879
+1880
+1881
+1882
+1883
+1884
+1885
+1886
+1887
+1888
+1889
+1890
+1891
+1892
+1893
+1894
+1895
+1896
+1897
+1898
+1899
+1900
+1901
+1902
+1903
+1904
+1905
+1906
+1907
+1908
+1909
+1910
+1911
+1912
+1913
+1914
+1915
+1916
+1917
+1918
+1919
+1920
+1921
+1922
+1923
+1924
+1925
+1926
+1927
+1928
+1929
+1930
+1931
+1932
+1933
+1934
+1935
+1936
+1937
+1938
+1939
+1940
+1941
+1942
+1943
+1944
+1945
+1946
+1947
+1948
+1949
+1950
+1951
+1952
+1953
+1954
+1955
+1956
+1957
+1958
+1959
+1960
+1961
+1962
+1963
+1964
+1965
+1966
+1967
+1968
+1969
+1970
+1971
+1972
+1973
+1974
+1975
+1976
+1977
+1978
+1979
+1980
+1981
+1982
+1983
+1984
+1985
+1986
+1987
+1988
+1989
+1990
+1991
+1992
+1993
+1994
+1995
+1996
+1997
+1998
+1999
+2000
+2001
+2002
+2003
+2004
+2005
+2006
+2007
+2008
+2009
+2010
+2011
+2012
+2013
+2014
+2015
+2016
+2017
+2018
+2019
+2020
+2021
+2022
+2023
+2024
+2025
+2026
+2027
+2028
+2029
+2030
+2031
+2032
+2033
+2034
+2035
+2036
+2037
+2038
+2039
+2040
+2041
+2042
+2043
+2044
+2045
+2046
+2047
+2048
+2049
+2050
+2051
+2052
+2053
+2054
+2055
+2056
+2057
+2058
+2059
+2060
+2061
+2062
+2063
+2064
+2065
+2066
+2067
+2068
+2069
+2070
+2071
+2072
+2073
+2074
+2075
+2076
+2077
+2078
+2079
+2080
+2081
+2082
+2083
+2084
+2085
+2086
+2087
+2088
+2089
+2090
+2091
+2092
+2093
+2094
+2095
+2096
+2097
+2098
+2099
+2100
+2101
+2102
+2103
+2104
+2105
+2106
+2107
+2108
+2109
+2110
+2111
+2112
+2113
+2114
+2115
+2116
+2117
+2118
+2119
+2120
+2121
+2122
+2123
+2124
+2125
+2126
+2127
+2128
+2129
+2130
+2131
+2132
+2133
+2134
+2135
+2136
+2137
+2138
+2139
+2140
+2141
+2142
+2143
+2144
+2145
+2146
+2147
+2148
+2149
+2150
+2151
+2152
+2153
+2154
+2155
+2156
+2157
+2158
+2159
+2160
+2161
+2162
+2163
+2164
+2165
+2166
+2167
+2168
+2169
+2170
+2171
+2172
+2173
+2174
+2175
+2176
+2177
+2178
+2179
+2180
+2181
+2182
+2183
+2184
+2185
+2186
+2187
+2188
+2189
+2190
+2191
+2192
+2193
+2194
+2195
+2196
+2197
+2198
+2199
+2200
+2201
+2202
+2203
+2204
+2205
+2206
+2207
+2208
+2209
+2210
+2211
+2212
+2213
+2214
+2215
+2216
+2217
+2218
+2219
+2220
+2221
+2222
+2223
+2224
+2225
+2226
+2227
+2228
+2229
+2230
+2231
+2232
+2233
+2234
+2235
+2236
+2237
+2238
+2239
+2240
+2241
+2242
+2243
+2244
+2245
+2246
+2247
+2248
+2249
+2250
+2251
+2252
+2253
+2254
+2255
+2256
+2257
+2258
+2259
+2260
+2261
+2262
+2263
+2264
+2265
+2266
+2267
+2268
+2269
+2270
+2271
+2272
+2273
+2274
+2275
+2276
+2277
+2278
+2279
+2280
+2281
+2282
+2283
+2284
+2285
+2286
+2287
+2288
+2289
+2290
+2291
+2292
+2293
+2294
+2295
+2296
+2297
+2298
+2299
+2300
+2301
+2302
+2303
+2304
+2305
+2306
+2307
+2308
+2309
+2310
+2311
+2312
+2313
+2314
+2315
+2316
+2317
+2318
+2319
+2320
+2321
+2322
+2323
+2324
+2325
+2326
+2327
+2328
+2329
+2330
+2331
+2332
+2333
+2334
+2335
+2336
+2337
+2338
+2339
+2340
+2341
+2342
+2343
+2344
+2345
+2346
+2347
+2348
+2349
+2350
+2351
+2352
+2353
+2354
+2355
+2356
+2357
+2358
+2359
+2360
+2361
+2362
+2363
+2364
+2365
+2366
+2367
+2368
+2369
+2370
+2371
+2372
+2373
+2374
+2375
+2376
+2377
+2378
+2379
+2380
+2381
+2382
+2383
+2384
+2385
+2386
+2387
+2388
+2389
+2390
+2391
+2392
+2393
+2394
+2395
+2396
+2397
+2398
+2399
+2400
+2401
+2402
+2403
+2404
+2405
+2406
+2407
+2408
+2409
+2410
+2411
+2412
+2413
+2414
+2415
+2416
+2417
+2418
+2419
+2420
+2421
+2422
+2423
+2424
+2425
+2426
+2427
+2428
+2429
+2430
+2431
+2432
+2433
+2434
+2435
+2436
+2437
+2438
+2439
+2440
+2441
+2442
+2443
+2444
+2445
+2446
+2447
+2448
+2449
+2450
+2451
+2452
+2453
+2454
+2455
+2456
+2457
+2458
+2459
+2460
+2461
+2462
+2463
+2464
+2465
+2466
+2467
+2468
+2469
+2470
+2471
+2472
+2473
+2474
+2475
+2476
+2477
+2478
+2479
+2480
+2481
+2482
+2483
+2484
+2485
+2486
+2487
+2488
+2489
+2490
+2491
+2492
+2493
+2494
+2495
+2496
+2497
+2498
+2499
+2500
+2501
+2502
+2503
+2504
+2505
+2506
+2507
+2508
+2509
+2510
+2511
+2512
+2513
+2514
+2515
+2516
+2517
+2518
+2519
+2520
+2521
+2522
+2523
+2524
+2525
+2526
+2527
+2528
+2529
+2530
+2531
+2532
+2533
+2534
+2535
+2536
+2537
+2538
+2539
+2540
+2541
+2542
+2543
+2544
+2545
+2546
+2547
+2548
+2549
+2550
+2551
+2552
+2553
+2554
+2555
+2556
+2557
+2558
+2559
+2560
+2561
+2562
+2563
+2564
+2565
+2566
+2567
+2568
+2569
+2570
+2571
+2572
+2573
+2574
+2575
+2576
+2577
+2578
+2579
+2580
+2581
+2582
+2583
+2584
+2585
+2586
+2587
+2588
+2589
+2590
+2591
+2592
+2593
+2594
+2595
+2596
+2597
+2598
+2599
+2600
+2601
+2602
+2603
+2604
+2605
+2606
+2607
+2608
+2609
+2610
+2611
+2612
+2613
+2614
+2615
+2616
+2617
+2618
+2619
+2620
+2621
+2622
+2623
+2624
+2625
+2626
+2627
+2628
+2629
+2630
+2631
+2632
+2633
+2634
+2635
+2636
+2637
+2638
+2639
+2640
+2641
+2642
+2643
+2644
+2645
+2646
+2647
+2648
+2649
+2650
+2651
+2652
+2653
+2654
+2655
+2656
+2657
+2658
+2659
+2660
+2661
+2662
+2663
+2664
+2665
+2666
+2667
+2668
+2669
+2670
+2671
+2672
+2673
+2674
+2675
+2676
+2677
+2678
+2679
+2680
+2681
+2682
+2683
+2684
+2685
+2686
+2687
+2688
+2689
+2690
+2691
+2692
+2693
+2694
+2695
+2696
+2697
+2698
+2699
+2700
+2701
+2702
+2703
+2704
+2705
+2706
+2707
+2708
+2709
+2710
+2711
+2712
+2713
+2714
+2715
+2716
+2717
+2718
+2719
+2720
+2721
+2722
+2723
+2724
+2725
+2726
+2727
+2728
+2729
+2730
+2731
+2732
+2733
+2734
+2735
+2736
+2737
+2738
+2739
+2740
+2741
+2742
+2743
+2744
+2745
+2746
+2747
+2748
+2749
+2750
+2751
+2752
+2753
+2754
+2755
+2756
+2757
+2758
+2759
+2760
+2761
+2762
+2763
+2764
+2765
+2766
+2767
+2768
+2769
+2770
+2771
+2772
+2773
+2774
+2775
+2776
+2777
+2778
+2779
+2780
+2781
+2782
+2783
+2784
+2785
+2786
+2787
+2788
+2789
+2790
+2791
+2792
+2793
+2794
+2795
+2796
+2797
+2798
+2799
+2800
+2801
+2802
+2803
+2804
+2805
+2806
+2807
+2808
+2809
+2810
+2811
+2812
+2813
+2814
+2815
+2816
+2817
+2818
+2819
+2820
+2821
+2822
+2823
+2824
+2825
+2826
+2827
+2828
+2829
+2830
+2831
+2832
+2833
+2834
+2835
+2836
+2837
+2838
+2839
+2840
+2841
+2842
+2843
+2844
+2845
+2846
+2847
+2848
+2849
+2850
+2851
+2852
+2853
+2854
+2855
+2856
+2857
+2858
+2859
+2860
+2861
+2862
+2863
+2864
+2865
+2866
+2867
+2868
+2869
+2870
+2871
+2872
+2873
+2874
+2875
+2876
+2877
+2878
+2879
+2880
+2881
+2882
+2883
+2884
+2885
+2886
+2887
+2888
+2889
+2890
+2891
+2892
+2893
+2894
+2895
+2896
+2897
+2898
+2899
+2900
+2901
+2902
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+#include <ctk/ctk.h>
+#include <cdk/cdkx.h>
+#include <cdk/cdkkeysyms.h>
+#include <X11/XKBlib.h>
+#include <X11/extensions/XKBgeom.h>
+#include <stdlib.h>
+#include <memory.h>
+#include <math.h>
+#include <glib/gi18n-lib.h>
+#include <libxklavier/xklavier.h>
+
+#include <cafekbd-keyboard-drawing.h>
+#include <cafekbd-keyboard-drawing-marshal.h>
+#include <cafekbd-util.h>
+
+#define INVALID_KEYCODE ((guint)(-1))
+
+#define CTK_RESPONSE_PRINT 2
+
+#define KEY_FONT_SIZE 12
+
+enum {
+	BAD_KEYCODE = 0,
+	NUM_SIGNALS
+};
+
+static guint cafekbd_keyboard_drawing_signals[NUM_SIGNALS] = { 0 };
+
+static void cafekbd_keyboard_drawing_set_mods (CafekbdKeyboardDrawing * drawing,
+					    guint mods);
+
+extern gboolean xkl_xkb_config_native_prepare (XklEngine * engine,
+					      const XklConfigRec * data,
+					      gpointer component_names);
+
+extern void xkl_xkb_config_native_cleanup (XklEngine * engine,
+					  gpointer component_names);
+
+
+static gint
+xkb_to_pixmap_coord (CafekbdKeyboardDrawingRenderContext * context, gint n)<--- Parameter 'context' can be declared as pointer to const
+{
+	return n * context->scale_numerator / context->scale_denominator;
+}
+
+static gdouble
+xkb_to_pixmap_double (CafekbdKeyboardDrawingRenderContext * context,<--- Parameter 'context' can be declared as pointer to const
+		      gdouble d)
+{
+	return d * context->scale_numerator / context->scale_denominator;
+}
+
+
+/* angle is in tenths of a degree; coordinates can be anything as (xkb,
+ * pixels, pango) as long as they are all the same */
+static void
+rotate_coordinate (gint origin_x,
+		   gint origin_y,
+		   gint x,
+		   gint y, gint angle, gint * rotated_x, gint * rotated_y)
+{
+	*rotated_x =
+	    origin_x + (x - origin_x) * cos (M_PI * angle / 1800.0) - (y -
+								       origin_y)
+	    * sin (M_PI * angle / 1800.0);
+	*rotated_y =
+	    origin_y + (x - origin_x) * sin (M_PI * angle / 1800.0) + (y -
+								       origin_y)
+	    * cos (M_PI * angle / 1800.0);
+}
+
+static gdouble
+length (gdouble x, gdouble y)
+{
+	return sqrt (x * x + y * y);
+}
+
+static gdouble
+point_line_distance (gdouble ax, gdouble ay, gdouble nx, gdouble ny)
+{
+	return ax * nx + ay * ny;
+}
+
+static void
+normal_form (gdouble ax, gdouble ay,
+	     gdouble bx, gdouble by,
+	     gdouble * nx, gdouble * ny, gdouble * d)
+{
+	gdouble l;
+
+	*nx = by - ay;
+	*ny = ax - bx;
+
+	l = length (*nx, *ny);
+
+	*nx /= l;
+	*ny /= l;
+
+	*d = point_line_distance (ax, ay, *nx, *ny);
+}
+
+static void
+inverse (gdouble a, gdouble b, gdouble c, gdouble d,
+	 gdouble * e, gdouble * f, gdouble * g, gdouble * h)
+{
+	gdouble det;
+
+	det = a * d - b * c;
+
+	*e = d / det;
+	*f = -b / det;
+	*g = -c / det;
+	*h = a / det;
+}
+
+static void
+multiply (gdouble a, gdouble b, gdouble c, gdouble d,
+	  gdouble e, gdouble f, gdouble * x, gdouble * y)
+{
+	*x = a * e + b * f;
+	*y = c * e + d * f;
+}
+
+static void
+intersect (gdouble n1x, gdouble n1y, gdouble d1,
+	   gdouble n2x, gdouble n2y, gdouble d2, gdouble * x, gdouble * y)
+{
+	gdouble e, f, g, h;
+
+	inverse (n1x, n1y, n2x, n2y, &e, &f, &g, &h);
+	multiply (e, f, g, h, d1, d2, x, y);
+}
+
+
+/* draw an angle from the current point to b and then to c,
+ * with a rounded corner of the given radius.
+ */
+static void
+rounded_corner (cairo_t * cr,
+		gdouble bx, gdouble by,
+		gdouble cx, gdouble cy, gdouble radius)
+{
+	gdouble ax, ay;
+	gdouble n1x, n1y, d1;
+	gdouble n2x, n2y, d2;
+	gdouble pd1, pd2;
+	gdouble ix, iy;
+	gdouble dist1, dist2;
+	gdouble nx, ny, d;
+	gdouble a1x, a1y, c1x, c1y;
+	gdouble phi1, phi2;
+
+	cairo_get_current_point (cr, &ax, &ay);
+#ifdef KBDRAW_DEBUG
+	printf ("        current point: (%f, %f), radius %f:\n", ax, ay,
+		radius);
+#endif
+
+	/* make sure radius is not too large */
+	dist1 = length (bx - ax, by - ay);
+	dist2 = length (cx - bx, cy - by);
+
+	radius = MIN (radius, MIN (dist1, dist2));
+
+	/* construct normal forms of the lines */
+	normal_form (ax, ay, bx, by, &n1x, &n1y, &d1);
+	normal_form (bx, by, cx, cy, &n2x, &n2y, &d2);
+
+	/* find which side of the line a,b the point c is on */
+	if (point_line_distance (cx, cy, n1x, n1y) < d1)
+		pd1 = d1 - radius;
+	else
+		pd1 = d1 + radius;
+
+	/* find which side of the line b,c the point a is on */
+	if (point_line_distance (ax, ay, n2x, n2y) < d2)
+		pd2 = d2 - radius;
+	else
+		pd2 = d2 + radius;
+
+	/* intersect the parallels to find the center of the arc */
+	intersect (n1x, n1y, pd1, n2x, n2y, pd2, &ix, &iy);
+
+	nx = (bx - ax) / dist1;
+	ny = (by - ay) / dist1;
+	d = point_line_distance (ix, iy, nx, ny);
+
+	/* a1 is the point on the line a-b where the arc starts */
+	intersect (n1x, n1y, d1, nx, ny, d, &a1x, &a1y);
+
+	nx = (cx - bx) / dist2;
+	ny = (cy - by) / dist2;
+	d = point_line_distance (ix, iy, nx, ny);
+
+	/* c1 is the point on the line b-c where the arc ends */
+	intersect (n2x, n2y, d2, nx, ny, d, &c1x, &c1y);
+
+	/* determine the first angle */
+	if (a1x - ix == 0)
+		phi1 = (a1y - iy > 0) ? M_PI_2 : 3 * M_PI_2;
+	else if (a1x - ix > 0)
+		phi1 = atan ((a1y - iy) / (a1x - ix));
+	else
+		phi1 = M_PI + atan ((a1y - iy) / (a1x - ix));
+
+	/* determine the second angle */
+	if (c1x - ix == 0)
+		phi2 = (c1y - iy > 0) ? M_PI_2 : 3 * M_PI_2;
+	else if (c1x - ix > 0)
+		phi2 = atan ((c1y - iy) / (c1x - ix));
+	else
+		phi2 = M_PI + atan ((c1y - iy) / (c1x - ix));
+
+	/* compute the difference between phi2 and phi1 mod 2pi */
+	d = phi2 - phi1;
+	while (d < 0)
+		d += 2 * M_PI;
+	while (d > 2 * M_PI)
+		d -= 2 * M_PI;
+
+#ifdef KBDRAW_DEBUG
+	printf ("        line 1 to: (%f, %f):\n", a1x, a1y);
+#endif
+	if (!(isnan (a1x) || isnan (a1y)))
+		cairo_line_to (cr, a1x, a1y);
+
+	/* pick the short arc from phi1 to phi2 */
+	if (d < M_PI)
+		cairo_arc (cr, ix, iy, radius, phi1, phi2);
+	else
+		cairo_arc_negative (cr, ix, iy, radius, phi1, phi2);
+
+#ifdef KBDRAW_DEBUG
+	printf ("        line 2 to: (%f, %f):\n", cx, cy);
+#endif
+	cairo_line_to (cr, cx, cy);
+}
+
+static void
+rounded_polygon (cairo_t * cr,
+		 gboolean filled,
+		 gdouble radius, CdkPoint * points, gint num_points)
+{
+	gint i, j;
+
+	cairo_move_to (cr,
+		       (gdouble) (points[num_points - 1].x +
+				  points[0].x) / 2,
+		       (gdouble) (points[num_points - 1].y +
+				  points[0].y) / 2);
+
+
+#ifdef KBDRAW_DEBUG
+	printf ("    rounded polygon of radius %f:\n", radius);
+#endif
+	for (i = 0; i < num_points; i++) {
+		j = (i + 1) % num_points;
+		rounded_corner (cr, (gdouble) points[i].x,
+				(gdouble) points[i].y,
+				(gdouble) (points[i].x + points[j].x) / 2,
+				(gdouble) (points[i].y + points[j].y) / 2,
+				radius);
+#ifdef KBDRAW_DEBUG
+		printf ("      corner (%d, %d) -> (%d, %d):\n",
+			points[i].x, points[i].y, points[j].x,
+			points[j].y);
+#endif
+	};
+	cairo_close_path (cr);
+
+	if (filled)
+		cairo_fill (cr);
+	else
+		cairo_stroke (cr);
+}
+
+static void
+draw_polygon (CafekbdKeyboardDrawingRenderContext * context,
+	      CdkRGBA * fill_color,
+	      gint xkb_x,
+	      gint xkb_y, XkbPointRec * xkb_points, guint num_points,
+	      gdouble radius)
+{
+	CdkPoint *points;
+	gboolean filled;
+	gint i;
+
+	if (fill_color) {
+		filled = TRUE;
+	} else {
+		fill_color = &context->dark_color;
+		filled = FALSE;
+	}
+
+	cdk_cairo_set_source_rgba (context->cr, fill_color);
+
+	points = g_new (CdkPoint, num_points);
+
+#ifdef KBDRAW_DEBUG
+	printf ("    Polygon points:\n");
+#endif
+	for (i = 0; i < num_points; i++) {
+		points[i].x =
+		    xkb_to_pixmap_coord (context, xkb_x + xkb_points[i].x);
+		points[i].y =
+		    xkb_to_pixmap_coord (context, xkb_y + xkb_points[i].y);
+#ifdef KBDRAW_DEBUG
+		printf ("      %d, %d\n", points[i].x, points[i].y);
+#endif
+	}
+
+	rounded_polygon (context->cr, filled,
+			 xkb_to_pixmap_double (context, radius),
+			 points, num_points);
+
+	g_free (points);
+}
+
+static void
+curve_rectangle (cairo_t * cr,
+		 gdouble x0,
+		 gdouble y0, gdouble width, gdouble height, gdouble radius)
+{
+	gdouble x1, y1;
+
+	if (!width || !height)
+		return;
+
+	x1 = x0 + width;
+	y1 = y0 + height;
+
+	radius = MIN (radius, MIN (width / 2, height / 2));
+
+	cairo_move_to (cr, x0, y0 + radius);
+	cairo_arc (cr, x0 + radius, y0 + radius, radius, M_PI,
+		   3 * M_PI / 2);
+	cairo_line_to (cr, x1 - radius, y0);
+	cairo_arc (cr, x1 - radius, y0 + radius, radius, 3 * M_PI / 2,
+		   2 * M_PI);
+	cairo_line_to (cr, x1, y1 - radius);
+	cairo_arc (cr, x1 - radius, y1 - radius, radius, 0, M_PI / 2);
+	cairo_line_to (cr, x0 + radius, y1);
+	cairo_arc (cr, x0 + radius, y1 - radius, radius, M_PI / 2, M_PI);
+
+	cairo_close_path (cr);
+}
+
+static void
+draw_curve_rectangle (cairo_t * cr,
+		      gboolean filled,
+		      CdkRGBA * fill_color,
+		      gint x, gint y, gint width, gint height, gint radius)
+{
+	curve_rectangle (cr, x, y, width, height, radius);
+
+	cdk_cairo_set_source_rgba (cr, fill_color);
+
+	if (filled)
+		cairo_fill (cr);
+	else
+		cairo_stroke (cr);
+}
+
+/* x, y, width, height are in the xkb coordinate system */
+static void
+draw_rectangle (CafekbdKeyboardDrawingRenderContext * context,
+		CdkRGBA * fill_color,
+		gint angle,
+		gint xkb_x, gint xkb_y, gint xkb_width, gint xkb_height,
+		gint radius)
+{
+	if (angle == 0) {
+		gint x, y, width, height;
+		gboolean filled;
+
+		if (fill_color) {
+			filled = TRUE;
+		} else {
+			fill_color = &context->dark_color;
+			filled = FALSE;
+		}
+
+		x = xkb_to_pixmap_coord (context, xkb_x);
+		y = xkb_to_pixmap_coord (context, xkb_y);
+		width =
+		    xkb_to_pixmap_coord (context, xkb_x + xkb_width) - x;
+		height =
+		    xkb_to_pixmap_coord (context, xkb_y + xkb_height) - y;
+
+		draw_curve_rectangle (context->cr, filled, fill_color,
+				      x, y, width, height,
+				      xkb_to_pixmap_double (context,
+							    radius));
+	} else {
+		XkbPointRec points[4];
+		gint x, y;
+
+		points[0].x = xkb_x;
+		points[0].y = xkb_y;
+		rotate_coordinate (xkb_x, xkb_y, xkb_x + xkb_width, xkb_y,
+				   angle, &x, &y);
+		points[1].x = x;
+		points[1].y = y;
+		rotate_coordinate (xkb_x, xkb_y, xkb_x + xkb_width,
+				   xkb_y + xkb_height, angle, &x, &y);
+		points[2].x = x;
+		points[2].y = y;
+		rotate_coordinate (xkb_x, xkb_y, xkb_x, xkb_y + xkb_height,
+				   angle, &x, &y);
+		points[3].x = x;
+		points[3].y = y;
+
+		/* the points we've calculated are relative to 0,0 */
+		draw_polygon (context, fill_color, 0, 0, points, 4,
+			      radius);
+	}
+}
+
+static void
+draw_outline (CafekbdKeyboardDrawingRenderContext * context,
+	      XkbOutlineRec * outline,
+	      CdkRGBA * color,
+	      gint angle, gint origin_x, gint origin_y)
+{
+#ifdef KBDRAW_DEBUG
+	printf (" num_points in %p: %d\n", outline, outline->num_points);
+#endif
+
+	if (outline->num_points == 1) {
+		if (color)
+			draw_rectangle (context, color, angle, origin_x,
+					origin_y, outline->points[0].x,
+					outline->points[0].y,
+					outline->corner_radius);
+
+#ifdef KBDRAW_DEBUG
+		printf ("pointsxy:%d %d %d\n", outline->points[0].x,
+			outline->points[0].y, outline->corner_radius);
+#endif
+
+		draw_rectangle (context, NULL, angle, origin_x, origin_y,
+				outline->points[0].x,
+				outline->points[0].y,
+				outline->corner_radius);
+	} else if (outline->num_points == 2) {
+		gint rotated_x0, rotated_y0;
+
+		rotate_coordinate (origin_x, origin_y,
+				   origin_x + outline->points[0].x,
+				   origin_y + outline->points[0].y,
+				   angle, &rotated_x0, &rotated_y0);
+		if (color)
+			draw_rectangle (context, color, angle, rotated_x0,
+					rotated_y0, outline->points[1].x,
+					outline->points[1].y,
+					outline->corner_radius);
+
+		draw_rectangle (context, NULL, angle, rotated_x0,
+				rotated_y0, outline->points[1].x,
+				outline->points[1].y,
+				outline->corner_radius);
+	} else {
+		if (color)
+			draw_polygon (context, color, origin_x, origin_y,
+				      outline->points,
+				      outline->num_points,
+				      outline->corner_radius);
+
+		draw_polygon (context, NULL, origin_x, origin_y,
+			      outline->points, outline->num_points,
+			      outline->corner_radius);
+	}
+}
+
+/* see PSColorDef in xkbprint */
+static gboolean
+parse_xkb_color_spec (gchar * colorspec, CdkRGBA * color)
+{
+	glong level;
+
+	color->alpha = 1.0;
+
+	if (g_ascii_strcasecmp (colorspec, "black") == 0) {
+		color->red = 0;
+		color->green = 0;
+		color->blue = 0;
+	} else if (g_ascii_strcasecmp (colorspec, "white") == 0) {
+		color->red = 1.0;
+		color->green = 1.0;
+		color->blue = 1.0;
+	} else if (g_ascii_strncasecmp (colorspec, "grey", 4) == 0 ||
+		   g_ascii_strncasecmp (colorspec, "gray", 4) == 0) {
+		level = strtol (colorspec + 4, NULL, 10);
+
+		color->red = 1.0 - 1.0 * level / 100.0;
+		color->green = 1.0 - 1.0 * level / 100.0;
+		color->blue = 1.0 - 1.0 * level / 100.0;
+	} else if (g_ascii_strcasecmp (colorspec, "red") == 0) {
+		color->red = 1.0;
+		color->green = 0;
+		color->blue = 0;
+	} else if (g_ascii_strcasecmp (colorspec, "green") == 0) {
+		color->red = 0;
+		color->green = 1.0;
+		color->blue = 0;
+	} else if (g_ascii_strcasecmp (colorspec, "blue") == 0) {
+		color->red = 0;
+		color->green = 0;
+		color->blue = 1.0;
+	} else if (g_ascii_strncasecmp (colorspec, "red", 3) == 0) {
+		level = strtol (colorspec + 3, NULL, 10);
+
+		color->red = 1.0 * level / 100.0;
+		color->green = 0;
+		color->blue = 0;
+	} else if (g_ascii_strncasecmp (colorspec, "green", 5) == 0) {
+		level = strtol (colorspec + 5, NULL, 10);
+
+		color->red = 0;
+		color->green = 1.0 * level / 100.0;
+		color->blue = 0;
+	} else if (g_ascii_strncasecmp (colorspec, "blue", 4) == 0) {
+		level = strtol (colorspec + 4, NULL, 10);
+
+		color->red = 0;
+		color->green = 0;
+		color->blue = 1.0 * level / 100.0;
+	} else
+		return FALSE;
+
+	return TRUE;
+}
+
+
+static guint
+find_keycode (CafekbdKeyboardDrawing * drawing, gchar * key_name)
+{
+#define KEYSYM_NAME_MAX_LENGTH 4
+	guint keycode;
+	gint i, j;
+	XkbKeyNamePtr pkey;
+	XkbKeyAliasPtr palias;
+	guint is_name_matched;
+	gchar *src, *dst;
+
+	if (!drawing->xkb)
+		return INVALID_KEYCODE;
+
+#ifdef KBDRAW_DEBUG
+	printf ("    looking for keycode for (%c%c%c%c)\n",
+		key_name[0], key_name[1], key_name[2], key_name[3]);
+#endif
+
+	pkey = drawing->xkb->names->keys + drawing->xkb->min_key_code;
+	for (keycode = drawing->xkb->min_key_code;
+	     keycode <= drawing->xkb->max_key_code; keycode++) {
+		is_name_matched = 1;
+		src = key_name;
+		dst = pkey->name;
+		for (i = KEYSYM_NAME_MAX_LENGTH; --i >= 0;) {
+			if ('\0' == *src)
+				break;
+			if (*src++ != *dst++) {
+				is_name_matched = 0;
+				break;
+			}
+		}
+		if (is_name_matched) {
+#ifdef KBDRAW_DEBUG
+			printf ("      found keycode %u\n", keycode);
+#endif
+			return keycode;
+		}
+		pkey++;
+	}
+
+	palias = drawing->xkb->names->key_aliases;
+	for (j = drawing->xkb->names->num_key_aliases; --j >= 0;) {
+		is_name_matched = 1;
+		src = key_name;
+		dst = palias->alias;
+		for (i = KEYSYM_NAME_MAX_LENGTH; --i >= 0;) {
+			if ('\0' == *src)
+				break;
+			if (*src++ != *dst++) {
+				is_name_matched = 0;
+				break;
+			}
+		}
+
+		if (is_name_matched) {
+			keycode = find_keycode (drawing, palias->real);
+#ifdef KBDRAW_DEBUG
+			printf ("found alias keycode %u\n", keycode);
+#endif
+			return keycode;
+		}
+		palias++;
+	}
+
+	return INVALID_KEYCODE;
+}
+
+static void
+set_markup (CafekbdKeyboardDrawingRenderContext * context, gchar *txt)<--- Parameter 'context' can be declared as pointer to const
+{
+	PangoLayout *layout = context->layout;
+	txt = strcmp ("<", txt) ? txt : "&lt;";
+	txt = strcmp ("&", txt) ? txt : "&amp;";
+	if (g_utf8_strlen (txt, -1) > 1) {
+		gchar* buf =
+		    g_strdup_printf ("<span size=\"xx-small\">%s</span>", txt);
+		pango_layout_set_markup (layout, buf, -1);
+		g_free (buf);
+	} else {
+		pango_layout_set_markup (layout, txt, -1);
+	}
+}
+
+static void
+set_key_label_in_layout (CafekbdKeyboardDrawingRenderContext * context,
+			 guint keyval)
+{
+	gchar buf[5];
+	gunichar uc;
+
+	switch (keyval) {
+	case CDK_KEY_Scroll_Lock:
+		set_markup (context, _("Scroll\nLock"));
+		break;
+
+	case CDK_KEY_space:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_Sys_Req:
+		set_markup (context, _("Sys Rq"));
+		break;
+
+	case CDK_KEY_Page_Up:
+		set_markup (context, _("Page\nUp"));
+		break;
+
+	case CDK_KEY_Page_Down:
+		set_markup (context, _("Page\nDown"));
+		break;
+
+	case CDK_KEY_Num_Lock:
+		set_markup (context, _("Num\nLock"));
+		break;
+
+	case CDK_KEY_KP_Page_Up:
+		set_markup (context, _("Pg Up"));
+		break;
+
+	case CDK_KEY_KP_Page_Down:
+		set_markup (context, _("Pg Dn"));
+		break;
+
+	case CDK_KEY_KP_Home:
+		set_markup (context, _("Home"));
+		break;
+
+	case CDK_KEY_KP_Left:
+		set_markup (context, _("Left"));
+		break;
+
+	case CDK_KEY_KP_End:
+		set_markup (context, _("End"));
+		break;
+
+	case CDK_KEY_KP_Up:
+		set_markup (context, _("Up"));
+		break;
+
+	case CDK_KEY_KP_Begin:
+		set_markup (context, _("Begin"));
+		break;
+
+	case CDK_KEY_KP_Right:
+		set_markup (context, _("Right"));
+		break;
+
+	case CDK_KEY_KP_Enter:
+		set_markup (context, _("Enter"));
+		break;
+
+	case CDK_KEY_KP_Down:
+		set_markup (context, _("Down"));
+		break;
+
+	case CDK_KEY_KP_Insert:
+		set_markup (context, _("Ins"));
+		break;
+
+	case CDK_KEY_KP_Delete:
+		set_markup (context, _("Del"));
+		break;
+
+	/* 0xfe03 */
+	case CDK_KEY_ISO_Level3_Shift:
+		set_markup (context, _("ISO_Level3_Shift"));
+		break;
+
+	/* 0xfe20 */
+	case CDK_KEY_ISO_Left_Tab:
+		set_markup (context, _("Tab"));
+		break;
+
+	/* 0xff08 */
+	case CDK_KEY_BackSpace:
+		set_markup (context, _("BackSpace"));
+		break;
+
+	/* 0xff09 */
+	case CDK_KEY_Tab:
+		set_markup (context, _("Tab"));
+		break;
+
+	/* 0xff0d */
+	case CDK_KEY_Return:
+		set_markup (context, _("Return"));
+		break;
+
+	/* 0xff13 */
+	case CDK_KEY_Pause:
+		set_markup (context, _("Pause"));
+		break;
+
+	/* 0xff1b */
+	case CDK_KEY_Escape:
+		set_markup (context, _("Esc"));
+		break;
+
+	/* 0xff50 */
+	case CDK_KEY_Home:
+		set_markup (context, _("Home"));
+		break;
+
+	/* 0xff51 */
+	case CDK_KEY_Left:
+		set_markup (context, _("Left"));
+		break;
+
+	/* 0xff52 */
+	case CDK_KEY_Up:
+		set_markup (context, _("Up"));
+		break;
+
+	/* 0xff53 */
+	case CDK_KEY_Right:
+		set_markup (context, _("Right"));
+		break;
+
+	/* 0xff54 */
+	case CDK_KEY_Down:
+		set_markup (context, _("Down"));
+		break;
+
+	/* 0xff57 */
+	case CDK_KEY_End:
+		set_markup (context, _("End"));
+		break;
+
+	/* 0xff61 */
+	case CDK_KEY_Print:
+		set_markup (context, _("Print"));
+		break;
+
+	/* 0xff63 */
+	case CDK_KEY_Insert:
+		set_markup (context, _("Insert"));
+		break;
+
+	/* 0xff67 */
+	case CDK_KEY_Menu:
+		set_markup (context, _("Menu"));
+		break;
+
+	/* 0xffbe */
+	case CDK_KEY_F1:
+		set_markup (context, _("F1"));
+		break;
+
+	/* 0xffbf */
+	case CDK_KEY_F2:
+		set_markup (context, _("F2"));
+		break;
+
+	/* 0xffc0 */
+	case CDK_KEY_F3:
+		set_markup (context, _("F3"));
+		break;
+
+	/* 0xffc1 */
+	case CDK_KEY_F4:
+		set_markup (context, _("F4"));
+		break;
+
+	/* 0xffc2 */
+	case CDK_KEY_F5:
+		set_markup (context, _("F5"));
+		break;
+
+	/* 0xffc3 */
+	case CDK_KEY_F6:
+		set_markup (context, _("F6"));
+		break;
+
+	/* 0xffc4 */
+	case CDK_KEY_F7:
+		set_markup (context, _("F7"));
+		break;
+
+	/* 0xffc5 */
+	case CDK_KEY_F8:
+		set_markup (context, _("F8"));
+		break;
+
+	/* 0xffc6 */
+	case CDK_KEY_F9:
+		set_markup (context, _("F9"));
+		break;
+
+	/* 0xffc7 */
+	case CDK_KEY_F10:
+		set_markup (context, _("F10"));
+		break;
+
+	/* 0xffc8 */
+	case CDK_KEY_F11:
+		set_markup (context, _("F11"));
+		break;
+
+	/* 0xffc9 */
+	case CDK_KEY_F12:
+		set_markup (context, _("F12"));
+		break;
+
+	/* 0xffe1 */
+	case CDK_KEY_Shift_L:
+		set_markup (context, _("Shift"));
+		break;
+
+	/* 0xffe2 */
+	case CDK_KEY_Shift_R:
+		set_markup (context, _("Shift"));
+		break;
+
+	/* 0xffe3 */
+	case CDK_KEY_Control_L:
+		set_markup (context, _("Control"));
+		break;
+
+	/* 0xffe4 */
+	case CDK_KEY_Control_R:
+		set_markup (context, _("Control"));
+		break;
+
+	/* 0xffe5 */
+	case CDK_KEY_Caps_Lock:
+		set_markup (context, _("Caps\nLock"));
+		break;
+
+	/* 0xffe7 */
+	case CDK_KEY_Meta_L:
+		set_markup (context, _("Meta"));
+		break;
+
+	/* 0xffe9 */
+	case CDK_KEY_Alt_L:
+		set_markup (context, _("Alt"));
+		break;
+
+	/* 0xffeb */
+	case CDK_KEY_Super_L:
+		set_markup (context, _("Super"));
+		break;
+
+	/* 0xffec */
+	case CDK_KEY_Super_R:
+		set_markup (context, _("Super"));
+		break;
+
+	/* 0xffff */
+	case CDK_KEY_VoidSymbol:
+		set_markup (context, _("Delete"));
+		break;
+
+	case CDK_KEY_dead_grave:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_acute:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_circumflex:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_tilde:
+		set_markup (context, "~");
+		break;
+
+	case CDK_KEY_dead_macron:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_breve:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_abovedot:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_diaeresis:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_abovering:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_doubleacute:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_caron:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_cedilla:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_ogonek:
+		set_markup (context, "");
+		break;
+
+		/* case CDK_KEY_dead_iota:
+		 * case CDK_KEY_dead_voiced_sound:
+		 * case CDK_KEY_dead_semivoiced_sound: */
+
+	case CDK_KEY_dead_belowdot:
+		set_markup (context, " ");
+		break;
+
+	case CDK_KEY_horizconnector:
+		set_markup (context, _("horiz\nconn"));
+		break;
+
+	case CDK_KEY_Mode_switch:
+		set_markup (context, _("AltGr"));
+		break;
+
+	case CDK_KEY_Multi_key:
+		set_markup (context, _("Compose"));
+		break;
+
+	default:
+		uc = cdk_keyval_to_unicode (keyval);
+		if (uc != 0 && g_unichar_isgraph (uc)) {
+			buf[g_unichar_to_utf8 (uc, buf)] = '\0';
+			set_markup (context, buf);
+		} else {
+			gchar *name = cdk_keyval_name (keyval);
+			if (name) {
+				set_markup (context, name);
+			} else
+				set_markup (context, "");
+		}
+	}
+}
+
+
+static void
+draw_pango_layout (CafekbdKeyboardDrawingRenderContext * context,
+		   CafekbdKeyboardDrawing * drawing,
+		   gint angle, gint x, gint y)
+{
+	PangoLayout *layout = context->layout;
+	CdkRGBA *color;
+	PangoLayoutLine *line;
+	gint x_off, y_off;
+	gint i;
+
+	color =
+	    drawing->colors + (drawing->xkb->geom->label_color -
+			       drawing->xkb->geom->colors);
+
+	if (angle != context->angle) {
+		PangoMatrix matrix = PANGO_MATRIX_INIT;
+		pango_matrix_rotate (&matrix, -angle / 10.0);
+		pango_context_set_matrix (pango_layout_get_context
+					  (layout), &matrix);
+		pango_layout_context_changed (layout);
+		context->angle = angle;
+	}
+
+	i = 0;
+	y_off = 0;
+	for (line = pango_layout_get_line (layout, i);
+	     line != NULL; line = pango_layout_get_line (layout, ++i)) {
+		GSList *runp;<--- Variable 'runp' can be declared as pointer to const
+		PangoRectangle line_extents;
+
+		x_off = 0;
+
+		for (runp = line->runs; runp != NULL; runp = runp->next) {
+			PangoGlyphItem *run = runp->data;
+			gint j;
+
+			for (j = 0; j < run->glyphs->num_glyphs; j++) {
+				PangoGlyphGeometry *geometry;<--- Variable 'geometry' can be declared as pointer to const
+
+				geometry =
+				    &run->glyphs->glyphs[j].geometry;
+
+				x_off += geometry->width;
+			}
+		}
+
+		pango_layout_line_get_extents (line, NULL, &line_extents);
+		y_off +=
+		    line_extents.height +
+		    pango_layout_get_spacing (layout);
+	}
+
+	cairo_move_to (context->cr, x, y);
+	cdk_cairo_set_source_rgba (context->cr, color);
+	pango_cairo_show_layout (context->cr, layout);
+}
+
+static void
+draw_key_label_helper (CafekbdKeyboardDrawingRenderContext * context,
+		       CafekbdKeyboardDrawing * drawing,
+		       KeySym keysym,
+		       gint angle,
+		       CafekbdKeyboardDrawingGroupLevelPosition glp,
+		       gint x,
+		       gint y, gint width, gint height, gint padding)
+{
+	gint label_x, label_y, label_max_width, ycell;
+
+	if (keysym == 0)
+		return;
+#ifdef KBDRAW_DEBUG
+	printf ("keysym: %04X(%c) at glp: %d\n",
+		(unsigned) keysym, (char) keysym, (int) glp);
+#endif
+
+	switch (glp) {
+	case CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT:
+	case CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT:
+		{
+			ycell =
+			    glp == CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT;
+
+			rotate_coordinate (x, y, x + padding,
+					   y + padding + (height -
+							  2 * padding) *
+					   ycell * 4 / 7, angle, &label_x,
+					   &label_y);
+			label_max_width =
+			    PANGO_SCALE * (width - 2 * padding);
+			break;
+		}
+	case CAFEKBD_KEYBOARD_DRAWING_POS_TOPRIGHT:
+	case CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT:
+		{
+			ycell =
+			    glp == CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT;
+
+			rotate_coordinate (x, y,
+					   x + padding + (width -
+							  2 * padding) *
+					   4 / 7,
+					   y + padding + (height -
+							  2 * padding) *
+					   ycell * 4 / 7, angle, &label_x,
+					   &label_y);
+			label_max_width =
+			    PANGO_SCALE * ((width - 2 * padding) -
+					   (width - 2 * padding) * 4 / 7);
+			break;
+		}
+	default:
+		return;
+	}
+	set_key_label_in_layout (context, keysym);
+	pango_layout_set_width (context->layout, label_max_width);
+	label_y -= (pango_layout_get_line_count (context->layout) - 1) *
+	    (pango_font_description_get_size (context->font_desc) /
+	     PANGO_SCALE);
+	cairo_save (context->cr);
+	cairo_rectangle (context->cr, x + padding / 2, y + padding / 2,
+			 width - padding, height - padding);
+	cairo_clip (context->cr);
+	draw_pango_layout (context, drawing, angle, label_x, label_y);
+	cairo_restore (context->cr);
+}
+
+static void
+draw_key_label (CafekbdKeyboardDrawingRenderContext * context,
+		CafekbdKeyboardDrawing * drawing,
+		guint keycode,
+		gint angle,
+		gint xkb_origin_x,
+		gint xkb_origin_y, gint xkb_width, gint xkb_height)
+{
+	gint x, y, width, height;
+	gint padding;
+	gint g, l, glp;
+
+	if (!drawing->xkb)
+		return;
+
+	padding = 23 * context->scale_numerator / context->scale_denominator;	/* 2.3mm */
+
+	x = xkb_to_pixmap_coord (context, xkb_origin_x);
+	y = xkb_to_pixmap_coord (context, xkb_origin_y);
+	width =
+	    xkb_to_pixmap_coord (context, xkb_origin_x + xkb_width) - x;
+	height =
+	    xkb_to_pixmap_coord (context, xkb_origin_y + xkb_height) - y;
+
+	for (glp = CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT;
+	     glp < CAFEKBD_KEYBOARD_DRAWING_POS_TOTAL; glp++) {
+		if (drawing->groupLevels[glp] == NULL)
+			continue;
+		g = drawing->groupLevels[glp]->group;
+		l = drawing->groupLevels[glp]->level;
+
+		if (g < 0 || g >= XkbKeyNumGroups (drawing->xkb, keycode))
+			continue;
+		if (l < 0
+		    || l >= XkbKeyGroupWidth (drawing->xkb, keycode, g))
+			continue;
+
+		/* Skip "exotic" levels like the "Ctrl" level in PC_SYSREQ */
+		if (l > 0) {
+			guint mods = XkbKeyKeyType (drawing->xkb, keycode,
+						    g)->mods.mask;
+			if ((mods & (ShiftMask | drawing->l3mod)) == 0)
+				continue;
+		}
+
+		if (drawing->track_modifiers) {
+			guint mods_rtrn;
+			KeySym keysym;
+
+			if (XkbTranslateKeyCode (drawing->xkb, keycode,
+						 XkbBuildCoreState
+						 (drawing->mods, g),
+						 &mods_rtrn, &keysym)) {
+				draw_key_label_helper (context, drawing,
+						       keysym, angle, glp,
+						       x, y, width, height,
+						       padding);
+				/* reverse y order */
+			}
+		} else {
+			KeySym keysym;
+
+			keysym =
+			    XkbKeySymEntry (drawing->xkb, keycode, l, g);
+
+			draw_key_label_helper (context, drawing, keysym,
+					       angle, glp, x, y, width,
+					       height, padding);
+			/* reverse y order */
+		}
+	}
+}
+
+/*
+ * The x offset is calculated for complex shapes. It is the rightmost of the vertical lines in the outline
+ */
+static gint
+calc_origin_offset_x (XkbOutlineRec * outline)<--- Parameter 'outline' can be declared as pointer to const
+{
+	gint rv = 0;
+	gint i;
+	XkbPointPtr point = outline->points;
+	if (outline->num_points < 3)
+		return 0;
+	for (i = outline->num_points; --i > 0;) {
+		gint x1 = point->x;
+		gint y1 = point++->y;
+		gint x2 = point->x;
+		gint y2 = point->y;
+
+		/*vertical, bottom to top (clock-wise), on the left */
+		if ((x1 == x2) && (y1 > y2) && (x1 > rv)) {
+			rv = x1;
+		}
+	}
+	return rv;
+}
+
+/* groups are from 0-3 */
+static void
+draw_key (CafekbdKeyboardDrawingRenderContext * context,
+	  CafekbdKeyboardDrawing * drawing, CafekbdKeyboardDrawingKey * key)
+{
+	XkbShapeRec *shape;
+	CtkStyleContext *style_context;
+	CdkRGBA color;
+	XkbOutlineRec *outline;
+	int origin_offset_x;
+	/* gint i; */
+
+	if (!drawing->xkb)
+		return;
+
+#ifdef KBDRAW_DEBUG
+	printf ("shape: %p (base %p, index %d)\n",
+		drawing->xkb->geom->shapes + key->xkbkey->shape_ndx,
+		drawing->xkb->geom->shapes, key->xkbkey->shape_ndx);
+#endif
+
+	shape = drawing->xkb->geom->shapes + key->xkbkey->shape_ndx;
+
+	if (key->pressed) {
+		style_context = ctk_widget_get_style_context (CTK_WIDGET (drawing));
+		ctk_style_context_save (style_context);
+		ctk_style_context_add_class (style_context, CTK_STYLE_CLASS_VIEW);
+		ctk_style_context_get_background_color (style_context,
+		                                        CTK_STATE_FLAG_SELECTED,
+		                                        &color);
+		ctk_style_context_restore (style_context);
+	 } else
+		color = *(drawing->colors + key->xkbkey->color_ndx);
+
+#ifdef KBDRAW_DEBUG
+	printf
+	    (" outlines base in the shape: %p (total: %d), origin: (%d, %d), angle %d\n",
+	     shape->outlines, shape->num_outlines, key->origin_x,
+	     key->origin_y, key->angle);
+#endif
+
+	/* draw the primary outline */
+	outline = shape->primary ? shape->primary : shape->outlines;
+	draw_outline (context, outline, &color, key->angle, key->origin_x,
+		      key->origin_y);
+#if 0
+	/* don't draw other outlines for now, since
+	 * the text placement does not take them into account
+	 */
+	for (i = 0; i < shape->num_outlines; i++) {
+		if (shape->outlines + i == shape->approx ||
+		    shape->outlines + i == shape->primary)
+			continue;
+		draw_outline (context, shape->outlines + i, NULL,
+			      key->angle, key->origin_x, key->origin_y);
+	}
+#endif
+
+	origin_offset_x = calc_origin_offset_x (outline);
+	draw_key_label (context, drawing, key->keycode, key->angle,
+			key->origin_x + origin_offset_x, key->origin_y,
+			shape->bounds.x2, shape->bounds.y2);
+}
+
+static void
+invalidate_region (CafekbdKeyboardDrawing * drawing,
+		   gdouble angle,
+		   gint origin_x, gint origin_y, XkbShapeRec * shape)
+{
+	CdkPoint points[4];
+	gint x_min, x_max, y_min, y_max;
+	gint x, y, width, height;
+	gint xx, yy;
+
+	rotate_coordinate (0, 0, 0, 0, angle, &xx, &yy);
+	points[0].x = xx;
+	points[0].y = yy;
+	rotate_coordinate (0, 0, shape->bounds.x2, 0, angle, &xx, &yy);
+	points[1].x = xx;
+	points[1].y = yy;
+	rotate_coordinate (0, 0, shape->bounds.x2, shape->bounds.y2, angle,
+			   &xx, &yy);
+	points[2].x = xx;
+	points[2].y = yy;
+	rotate_coordinate (0, 0, 0, shape->bounds.y2, angle, &xx, &yy);
+	points[3].x = xx;
+	points[3].y = yy;
+
+	x_min =
+	    MIN (MIN (points[0].x, points[1].x),
+		 MIN (points[2].x, points[3].x));
+	x_max =
+	    MAX (MAX (points[0].x, points[1].x),
+		 MAX (points[2].x, points[3].x));
+	y_min =
+	    MIN (MIN (points[0].y, points[1].y),
+		 MIN (points[2].y, points[3].y));
+	y_max =
+	    MAX (MAX (points[0].y, points[1].y),
+		 MAX (points[2].y, points[3].y));
+
+	x = xkb_to_pixmap_coord (drawing->renderContext,
+				 origin_x + x_min) - 6;
+	y = xkb_to_pixmap_coord (drawing->renderContext,
+				 origin_y + y_min) - 6;
+	width =
+	    xkb_to_pixmap_coord (drawing->renderContext,
+				 x_max - x_min) + 12;
+	height =
+	    xkb_to_pixmap_coord (drawing->renderContext,
+				 y_max - y_min) + 12;
+
+	ctk_widget_queue_draw_area (CTK_WIDGET (drawing), x, y, width,
+				    height);
+}
+
+static void
+invalidate_indicator_doodad_region (CafekbdKeyboardDrawing * drawing,
+				    CafekbdKeyboardDrawingDoodad * doodad)
+{
+	if (!drawing->xkb)
+		return;
+
+	invalidate_region (drawing,
+			   doodad->angle,
+			   doodad->origin_x +
+			   doodad->doodad->indicator.left,
+			   doodad->origin_y +
+			   doodad->doodad->indicator.top,
+			   &drawing->xkb->geom->shapes[doodad->
+						       doodad->indicator.shape_ndx]);
+}
+
+static void
+invalidate_key_region (CafekbdKeyboardDrawing * drawing,
+		       CafekbdKeyboardDrawingKey * key)
+{
+	if (!drawing->xkb)
+		return;
+
+	invalidate_region (drawing,
+			   key->angle,
+			   key->origin_x,
+			   key->origin_y,
+			   &drawing->xkb->geom->shapes[key->
+						       xkbkey->shape_ndx]);
+}
+
+static void
+draw_text_doodad (CafekbdKeyboardDrawingRenderContext * context,
+		  CafekbdKeyboardDrawing * drawing,
+		  CafekbdKeyboardDrawingDoodad * doodad,
+		  XkbTextDoodadRec * text_doodad)
+{
+	gint x, y;
+	if (!drawing->xkb)
+		return;
+
+	x = xkb_to_pixmap_coord (context,
+				 doodad->origin_x + text_doodad->left);
+	y = xkb_to_pixmap_coord (context,
+				 doodad->origin_y + text_doodad->top);
+
+	set_markup (context, text_doodad->text);
+	draw_pango_layout (context, drawing, doodad->angle, x, y);
+}
+
+static void
+draw_indicator_doodad (CafekbdKeyboardDrawingRenderContext * context,
+		       CafekbdKeyboardDrawing * drawing,
+		       CafekbdKeyboardDrawingDoodad * doodad,
+		       XkbIndicatorDoodadRec * indicator_doodad)
+{
+	CdkRGBA *color;
+	XkbShapeRec *shape;<--- Variable 'shape' can be declared as pointer to const
+	gint i;
+
+	if (!drawing->xkb)
+		return;
+
+	shape = drawing->xkb->geom->shapes + indicator_doodad->shape_ndx;
+
+	color = drawing->colors + (doodad->on ?
+				   indicator_doodad->on_color_ndx :
+				   indicator_doodad->off_color_ndx);
+
+	for (i = 0; i < 1; i++)
+		draw_outline (context, shape->outlines + i, color,
+			      doodad->angle,
+			      doodad->origin_x + indicator_doodad->left,
+			      doodad->origin_y + indicator_doodad->top);
+}
+
+static void
+draw_shape_doodad (CafekbdKeyboardDrawingRenderContext * context,
+		   CafekbdKeyboardDrawing * drawing,
+		   CafekbdKeyboardDrawingDoodad * doodad,
+		   XkbShapeDoodadRec * shape_doodad)
+{
+	XkbShapeRec *shape;
+	CdkRGBA *color;
+	gint i;
+
+	if (!drawing->xkb)
+		return;
+
+	shape = drawing->xkb->geom->shapes + shape_doodad->shape_ndx;
+	color = drawing->colors + shape_doodad->color_ndx;
+
+	/* draw the primary outline filled */
+	draw_outline (context,
+		      shape->primary ? shape->primary : shape->outlines,
+		      color, doodad->angle,
+		      doodad->origin_x + shape_doodad->left,
+		      doodad->origin_y + shape_doodad->top);
+
+	/* stroke the other outlines */
+	for (i = 0; i < shape->num_outlines; i++) {
+		if (shape->outlines + i == shape->approx ||
+		    shape->outlines + i == shape->primary)
+			continue;
+		draw_outline (context, shape->outlines + i, NULL,
+			      doodad->angle,
+			      doodad->origin_x + shape_doodad->left,
+			      doodad->origin_y + shape_doodad->top);
+	}
+}
+
+static void
+draw_doodad (CafekbdKeyboardDrawingRenderContext * context,
+	     CafekbdKeyboardDrawing * drawing,
+	     CafekbdKeyboardDrawingDoodad * doodad)
+{
+	switch (doodad->doodad->any.type) {
+	case XkbOutlineDoodad:
+	case XkbSolidDoodad:
+		draw_shape_doodad (context, drawing, doodad,
+				   &doodad->doodad->shape);
+		break;
+
+	case XkbTextDoodad:
+		draw_text_doodad (context, drawing, doodad,
+				  &doodad->doodad->text);
+		break;
+
+	case XkbIndicatorDoodad:
+		draw_indicator_doodad (context, drawing, doodad,
+				       &doodad->doodad->indicator);
+		break;
+
+	case XkbLogoDoodad:
+		/* g_print ("draw_doodad: logo: %s\n", doodad->doodad->logo.logo_name); */
+		/* XkbLogoDoodadRec is essentially a subclass of XkbShapeDoodadRec */
+		draw_shape_doodad (context, drawing, doodad,
+				   &doodad->doodad->shape);
+		break;
+	}
+}
+
+typedef struct {
+	CafekbdKeyboardDrawing *drawing;
+	CafekbdKeyboardDrawingRenderContext *context;
+} DrawKeyboardItemData;
+
+static void
+redraw_overlapping_doodads (CafekbdKeyboardDrawingRenderContext * context,
+			    CafekbdKeyboardDrawing * drawing,
+			    const CafekbdKeyboardDrawingKey * key)
+{
+	GList *list;
+	gboolean do_draw = FALSE;
+
+	for (list = drawing->keyboard_items; list; list = list->next) {
+		CafekbdKeyboardDrawingItem *item = list->data;
+
+		if (do_draw
+		    && item->type ==
+		    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD)
+			draw_doodad (context, drawing,
+				     (CafekbdKeyboardDrawingDoodad *) item);
+
+		if (list->data == key)
+			do_draw = TRUE;
+	}
+}
+
+static void
+draw_keyboard_item (CafekbdKeyboardDrawingItem * item,
+		    DrawKeyboardItemData * data)
+{
+	CafekbdKeyboardDrawing *drawing = data->drawing;
+	CafekbdKeyboardDrawingRenderContext *context = data->context;
+
+	if (!drawing->xkb)
+		return;
+
+	switch (item->type) {
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_INVALID:
+		break;
+
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY:
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA:
+		draw_key (context, drawing,
+			  (CafekbdKeyboardDrawingKey *) item);
+		break;
+
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD:
+		draw_doodad (context, drawing,
+			     (CafekbdKeyboardDrawingDoodad *) item);
+		break;
+	}
+}
+
+static void
+draw_keyboard_to_context (CafekbdKeyboardDrawingRenderContext * context,
+			  CafekbdKeyboardDrawing * drawing)
+{
+	DrawKeyboardItemData data = { drawing, context };
+#ifdef KBDRAW_DEBUG
+	printf ("mods: %d\n", drawing->mods);
+#endif
+	g_list_foreach (drawing->keyboard_items,
+			(GFunc) draw_keyboard_item, &data);
+}
+
+static gboolean
+create_cairo (CafekbdKeyboardDrawing * drawing)
+{
+	CtkStyleContext *style_context = NULL;
+	CtkStateFlags state;
+	CdkRGBA dark_color;
+
+	if (drawing == NULL)
+		return FALSE;
+	if (drawing->surface == NULL)
+		return FALSE;
+
+	drawing->renderContext->cr =
+	    cairo_create (drawing->surface);
+
+	style_context = ctk_widget_get_style_context (CTK_WIDGET (drawing));
+	state = ctk_style_context_get_state (style_context);
+
+	ctk_style_context_get_background_color (style_context, state,
+	                                        &dark_color);
+	/* make dark background by making regular background darker */
+	dark_color.red *= 0.7;
+	dark_color.green *= 0.7;
+	dark_color.blue *= 0.7;
+
+	drawing->renderContext->dark_color = dark_color;
+
+	return TRUE;
+}
+
+static void
+destroy_cairo (CafekbdKeyboardDrawing * drawing)
+{
+	cairo_destroy (drawing->renderContext->cr);
+	drawing->renderContext->cr = NULL;
+}
+
+static void
+draw_keyboard (CafekbdKeyboardDrawing * drawing)
+{
+        CtkStyleContext *context =
+	    ctk_widget_get_style_context (CTK_WIDGET (drawing));
+	CtkStateFlags state = ctk_style_context_get_state (context);
+	CdkRGBA color;
+	CtkAllocation allocation;
+
+	if (!drawing->xkb)
+		return;
+
+	ctk_widget_get_allocation (CTK_WIDGET (drawing), &allocation);
+
+	drawing->surface =
+	    cdk_window_create_similar_surface (ctk_widget_get_window
+					       (CTK_WIDGET (drawing)),
+					       CAIRO_CONTENT_COLOR,
+					       allocation.width,
+					       allocation.height);
+
+	if (create_cairo (drawing)) {
+		/* blank background */
+		ctk_style_context_save (context);
+		ctk_style_context_add_class (context, CTK_STYLE_CLASS_VIEW);
+		ctk_style_context_get_background_color (context, state, &color);
+		ctk_style_context_restore (context);
+		cdk_cairo_set_source_rgba (drawing->renderContext->cr, &color);
+		cairo_paint (drawing->renderContext->cr);
+
+		draw_keyboard_to_context (drawing->renderContext, drawing);
+		destroy_cairo (drawing);
+	}
+}
+
+static void
+alloc_render_context (CafekbdKeyboardDrawing * drawing)
+{
+	CafekbdKeyboardDrawingRenderContext *context =
+	    drawing->renderContext =
+	    g_new0 (CafekbdKeyboardDrawingRenderContext, 1);
+
+	PangoContext *pangoContext =
+	    ctk_widget_get_pango_context (CTK_WIDGET (drawing));
+
+	CtkStyleContext *style_context =
+	    ctk_widget_get_style_context (CTK_WIDGET (drawing));
+	PangoFontDescription *fd = NULL;
+
+	ctk_style_context_get (style_context,
+	                       ctk_style_context_get_state (style_context),
+	                       CTK_STYLE_PROPERTY_FONT, &fd, NULL);
+
+	context->layout = pango_layout_new (pangoContext);
+	pango_layout_set_ellipsize (context->layout, PANGO_ELLIPSIZE_END);
+
+	context->font_desc = pango_font_description_copy (fd);
+	context->angle = 0;
+	context->scale_numerator = 1;
+	context->scale_denominator = 1;
+}
+
+static void
+free_render_context (CafekbdKeyboardDrawing * drawing)
+{
+	CafekbdKeyboardDrawingRenderContext *context = drawing->renderContext;
+	g_object_unref (G_OBJECT (context->layout));
+	pango_font_description_free (context->font_desc);
+
+	g_free (drawing->renderContext);
+	drawing->renderContext = NULL;
+}
+
+static gboolean
+draw (CtkWidget              *widget G_GNUC_UNUSED,
+      cairo_t                *cr,
+      CafekbdKeyboardDrawing *drawing)
+{
+	if (!drawing->xkb)
+		return FALSE;
+
+	if (drawing->surface == NULL)
+		return FALSE;
+
+	cairo_set_source_surface (cr, drawing->surface, 0, 0);
+	cairo_paint (cr);
+
+	return FALSE;
+}
+
+static gboolean
+idle_redraw (gpointer user_data)
+{
+	CafekbdKeyboardDrawing *drawing = user_data;
+
+	drawing->idle_redraw = 0;
+	draw_keyboard (drawing);
+	ctk_widget_queue_draw (CTK_WIDGET (drawing));
+	return FALSE;
+}
+
+static gboolean
+context_setup_scaling (CafekbdKeyboardDrawingRenderContext * context,
+		       CafekbdKeyboardDrawing * drawing,
+		       gdouble width, gdouble height,
+		       gdouble dpi_x, gdouble dpi_y)
+{
+	if (!drawing->xkb)
+		return FALSE;
+
+	if (drawing->xkb->geom->width_mm <= 0
+	    || drawing->xkb->geom->height_mm <= 0) {
+		g_critical
+		    ("keyboard geometry reports width or height as zero!");
+		return FALSE;
+	}
+
+	if (width * drawing->xkb->geom->height_mm <
+	    height * drawing->xkb->geom->width_mm) {
+		context->scale_numerator = width;
+		context->scale_denominator = drawing->xkb->geom->width_mm;
+	} else {
+		context->scale_numerator = height;
+		context->scale_denominator = drawing->xkb->geom->height_mm;
+	}
+
+	pango_font_description_set_size (context->font_desc,
+					 72 * KEY_FONT_SIZE * dpi_x *
+					 context->scale_numerator /
+					 context->scale_denominator);
+	pango_layout_set_spacing (context->layout,
+				  -160 * dpi_y * context->scale_numerator /
+				  context->scale_denominator);
+	pango_layout_set_font_description (context->layout,
+					   context->font_desc);
+
+	return TRUE;
+}
+
+static void
+size_allocate (CtkWidget              *widget G_GNUC_UNUSED,
+	       CtkAllocation          *allocation,
+	       CafekbdKeyboardDrawing *drawing)
+{
+	CafekbdKeyboardDrawingRenderContext *context = drawing->renderContext;
+
+	if (drawing->surface) {
+		cairo_surface_destroy (drawing->surface);
+		drawing->surface = NULL;
+	}
+
+	if (!context_setup_scaling (context, drawing,
+				    allocation->width, allocation->height,
+				    50, 50))
+		return;
+
+	if (!drawing->idle_redraw)
+		drawing->idle_redraw = g_idle_add (idle_redraw, drawing);
+}
+
+static gint
+key_event (CtkWidget              *widget G_GNUC_UNUSED,
+	   CdkEventKey            *event,
+	   CafekbdKeyboardDrawing *drawing)
+{
+	CafekbdKeyboardDrawingKey *key;
+	if (!drawing->xkb)
+		return FALSE;
+
+	key = drawing->keys + event->hardware_keycode;
+
+	if (event->hardware_keycode > drawing->xkb->max_key_code ||
+	    event->hardware_keycode < drawing->xkb->min_key_code ||
+	    key->xkbkey == NULL) {
+		g_signal_emit (drawing,
+			       cafekbd_keyboard_drawing_signals[BAD_KEYCODE],
+			       0, event->hardware_keycode);
+		return TRUE;
+	}
+
+	if ((event->type == CDK_KEY_PRESS && key->pressed) ||
+	    (event->type == CDK_KEY_RELEASE && !key->pressed))
+		return TRUE;
+	/* otherwise this event changes the state we believed we had before */
+
+	key->pressed = (event->type == CDK_KEY_PRESS);
+
+	if (create_cairo (drawing)) {
+		draw_key (drawing->renderContext, drawing, key);
+		redraw_overlapping_doodads (drawing->renderContext,
+					    drawing, key);
+		destroy_cairo (drawing);
+	}
+
+	invalidate_key_region (drawing, key);
+	return TRUE;
+}
+
+static gint
+button_press_event (CtkWidget              *widget,
+		    CdkEventButton         *event G_GNUC_UNUSED,
+		    CafekbdKeyboardDrawing *drawing)<--- Parameter 'drawing' can be declared as pointer to const
+{
+	if (!drawing->xkb)
+		return FALSE;
+
+	ctk_widget_grab_focus (widget);
+	return FALSE;
+}
+
+static gboolean
+unpress_keys (CafekbdKeyboardDrawing * drawing)
+{
+	gint i;
+
+	drawing->timeout = 0;
+
+	if (!drawing->xkb)
+		return FALSE;
+
+	if (create_cairo (drawing)) {
+		for (i = drawing->xkb->min_key_code;
+		     i <= drawing->xkb->max_key_code; i++)
+			if (drawing->keys[i].pressed) {
+				drawing->keys[i].pressed = FALSE;
+				draw_key (drawing->renderContext, drawing,
+					  drawing->keys + i);
+				invalidate_key_region (drawing,
+						       drawing->keys + i);
+			}
+		destroy_cairo (drawing);
+	}
+
+	return FALSE;
+}
+
+static gint
+focus_event (CtkWidget              *widget G_GNUC_UNUSED,
+	     CdkEventFocus          *event,<--- Parameter 'event' can be declared as pointer to const
+	     CafekbdKeyboardDrawing *drawing)
+{
+	if (event->in && drawing->timeout > 0) {
+		g_source_remove (drawing->timeout);
+		drawing->timeout = 0;
+	} else if (drawing->timeout == 0)
+		drawing->timeout =
+		    g_timeout_add (120, (GSourceFunc) unpress_keys,
+				   drawing);
+
+	return FALSE;
+}
+
+static gint
+compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a,<--- Parameter 'a' can be declared as pointer to const
+				  CafekbdKeyboardDrawingItem * b)<--- Parameter 'b' can be declared as pointer to const
+{
+	if (a->priority > b->priority)
+		return 1;
+	else if (a->priority < b->priority)
+		return -1;
+	else
+		return 0;
+}
+
+static void
+init_indicator_doodad (CafekbdKeyboardDrawing * drawing,
+		       XkbDoodadRec * xkbdoodad,
+		       CafekbdKeyboardDrawingDoodad * doodad)
+{
+	if (!drawing->xkb)
+		return;
+
+	if (xkbdoodad->any.type == XkbIndicatorDoodad) {
+		gint index;
+		Atom iname = 0;
+		Atom sname = xkbdoodad->indicator.name;
+		unsigned long phys_indicators =
+		    drawing->xkb->indicators->phys_indicators;
+		Atom *pind = drawing->xkb->names->indicators;<--- Variable 'pind' can be declared as pointer to const
+
+#ifdef KBDRAW_DEBUG
+		printf ("Looking for %d[%s]\n",
+			(int) sname, XGetAtomName (drawing->display,
+						   sname));
+#endif
+
+		for (index = 0; index < XkbNumIndicators; index++) {
+			iname = *pind++;
+			/* name matches and it is real */
+			if (iname == sname
+			    && (phys_indicators & (1 << index)))
+				break;
+			if (iname == 0)
+				break;
+		}
+		if (iname == 0)
+			g_warning ("Could not find indicator %d [%s]\n",
+				   (int) sname,
+				   XGetAtomName (drawing->display, sname));
+		else {
+#ifdef KBDRAW_DEBUG
+			printf ("Found in xkbdesc as %d\n", index);
+#endif
+			drawing->physical_indicators[index] = doodad;
+			/* Trying to obtain the real state, but if fail - just assume OFF */
+			if (!XkbGetNamedIndicator
+			    (drawing->display, sname, NULL, &doodad->on,
+			     NULL, NULL))
+				doodad->on = 0;
+		}
+	}
+}
+
+static void
+init_keys_and_doodads (CafekbdKeyboardDrawing * drawing)
+{
+	gint i, j, k;
+	gint x, y;
+
+	if (!drawing->xkb)
+		return;
+
+	for (i = 0; i < drawing->xkb->geom->num_doodads; i++) {
+		XkbDoodadRec *xkbdoodad = drawing->xkb->geom->doodads + i;
+		CafekbdKeyboardDrawingDoodad *doodad =
+		    g_new (CafekbdKeyboardDrawingDoodad, 1);
+
+		doodad->type = CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD;
+		doodad->origin_x = 0;
+		doodad->origin_y = 0;
+		doodad->angle = 0;
+		doodad->priority = xkbdoodad->any.priority * 256 * 256;
+		doodad->doodad = xkbdoodad;
+
+		init_indicator_doodad (drawing, xkbdoodad, doodad);
+
+		drawing->keyboard_items =
+		    g_list_append (drawing->keyboard_items, doodad);
+	}
+
+	for (i = 0; i < drawing->xkb->geom->num_sections; i++) {
+		XkbSectionRec *section = drawing->xkb->geom->sections + i;
+		guint priority;
+
+#ifdef KBDRAW_DEBUG
+		printf ("initing section %d containing %d rows\n", i,
+			section->num_rows);
+#endif
+		x = section->left;
+		y = section->top;
+		priority = section->priority * 256 * 256;
+
+		for (j = 0; j < section->num_rows; j++) {
+			XkbRowRec *row = section->rows + j;
+
+#ifdef KBDRAW_DEBUG
+			printf ("  initing row %d\n", j);
+#endif
+			x = section->left + row->left;
+			y = section->top + row->top;
+
+			for (k = 0; k < row->num_keys; k++) {
+				XkbKeyRec *xkbkey = row->keys + k;
+				CafekbdKeyboardDrawingKey *key;
+				XkbShapeRec *shape =
+				    drawing->xkb->geom->shapes +
+				    xkbkey->shape_ndx;
+				guint keycode = find_keycode (drawing,
+							      xkbkey->
+							      name.name);
+
+				if (keycode == INVALID_KEYCODE)
+					continue;
+#ifdef KBDRAW_DEBUG
+				printf
+				    ("    initing key %d, shape: %p(%p + %d), code: %u\n",
+				     k, shape, drawing->xkb->geom->shapes,
+				     xkbkey->shape_ndx, keycode);
+#endif
+				if (row->vertical)
+					y += xkbkey->gap;
+				else
+					x += xkbkey->gap;
+
+				if (keycode >= drawing->xkb->min_key_code
+				    && keycode <=
+				    drawing->xkb->max_key_code) {
+					key = drawing->keys + keycode;
+					if (key->type ==
+					    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_INVALID)
+					{
+						key->type =
+						    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY;
+					} else {
+						/* duplicate key for the same keycode,
+						   already defined as CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY */
+						key =
+						    g_new0
+						    (CafekbdKeyboardDrawingKey,
+						     1);
+						key->type =
+						    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA;
+					}
+				} else {
+					g_warning
+					    ("key %4.4s: keycode = %u; not in range %d..%d\n",
+					     xkbkey->name.name, keycode,
+					     drawing->xkb->min_key_code,
+					     drawing->xkb->max_key_code);
+
+					key =
+					    g_new0 (CafekbdKeyboardDrawingKey,
+						    1);
+					key->type =
+					    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA;
+				}
+
+				key->xkbkey = xkbkey;
+				key->angle = section->angle;
+				rotate_coordinate (section->left,
+						   section->top, x, y,
+						   section->angle,
+						   &key->origin_x,
+						   &key->origin_y);
+				key->priority = priority;
+				key->keycode = keycode;
+
+				drawing->keyboard_items =
+				    g_list_append (drawing->keyboard_items,
+						   key);
+
+				if (row->vertical)
+					y += shape->bounds.y2;
+				else
+					x += shape->bounds.x2;
+
+				priority++;
+			}
+		}
+
+		for (j = 0; j < section->num_doodads; j++) {
+			XkbDoodadRec *xkbdoodad = section->doodads + j;
+			CafekbdKeyboardDrawingDoodad *doodad =
+			    g_new (CafekbdKeyboardDrawingDoodad, 1);
+
+			doodad->type =
+			    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD;
+			doodad->origin_x = x;
+			doodad->origin_y = y;
+			doodad->angle = section->angle;
+			doodad->priority =
+			    priority + xkbdoodad->any.priority;
+			doodad->doodad = xkbdoodad;
+
+			init_indicator_doodad (drawing, xkbdoodad, doodad);
+
+			drawing->keyboard_items =
+			    g_list_append (drawing->keyboard_items,
+					   doodad);
+		}
+	}
+
+	drawing->keyboard_items = g_list_sort (drawing->keyboard_items,
+					       (GCompareFunc)
+					       compare_keyboard_item_priorities);<--- You might need to cast the function pointer here<--- You might need to cast the function pointer here
+}
+
+static void
+init_colors (CafekbdKeyboardDrawing * drawing)
+{
+	gboolean result;
+	gint i;
+
+	if (!drawing->xkb)
+		return;
+
+	drawing->colors = g_new (CdkRGBA, drawing->xkb->geom->num_colors);
+
+	for (i = 0; i < drawing->xkb->geom->num_colors; i++) {
+		result =
+		    parse_xkb_color_spec (drawing->xkb->geom->
+					  colors[i].spec,
+					  drawing->colors + i);
+
+		if (!result)
+			g_warning
+			    ("init_colors: unable to parse color %s\n",
+			     drawing->xkb->geom->colors[i].spec);
+	}
+}
+
+static void
+free_cdik (			/*colors doodads indicators keys */
+		  CafekbdKeyboardDrawing * drawing)
+{
+	GList *itemp;
+
+	if (!drawing->xkb)
+		return;
+
+	for (itemp = drawing->keyboard_items; itemp; itemp = itemp->next) {
+		CafekbdKeyboardDrawingItem *item = itemp->data;
+
+		switch (item->type) {
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_INVALID:
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY:
+			break;
+
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA:
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD:
+			g_free (item);
+			break;
+		}
+	}
+
+	g_list_free (drawing->keyboard_items);
+	drawing->keyboard_items = NULL;
+
+	g_free (drawing->keys);
+	g_free (drawing->colors);
+}
+
+static void
+alloc_cdik (CafekbdKeyboardDrawing * drawing)
+{
+	if (!drawing->xkb)
+		return;
+
+	drawing->physical_indicators_size =
+	    drawing->xkb->indicators->phys_indicators + 1;
+	drawing->physical_indicators =
+	    g_new0 (CafekbdKeyboardDrawingDoodad *,
+		    drawing->physical_indicators_size);
+	drawing->keys =
+	    g_new0 (CafekbdKeyboardDrawingKey,
+		    drawing->xkb->max_key_code + 1);
+}
+
+static void
+process_indicators_state_notify (XkbIndicatorNotifyEvent * iev,<--- Parameter 'iev' can be declared as pointer to const
+				 CafekbdKeyboardDrawing * drawing)
+{
+	/* Good question: should we track indicators when the keyboard is
+	   NOT really taken from the screen */
+	gint i;
+
+	for (i = 0; i <= drawing->xkb->indicators->phys_indicators; i++)
+		if (drawing->physical_indicators[i] != NULL
+		    && (iev->changed & 1 << i)) {
+			gint state = (iev->state & 1 << i) != FALSE;
+
+			if ((state && !drawing->physical_indicators[i]->on)
+			    || (!state
+				&& drawing->physical_indicators[i]->on)) {
+				drawing->physical_indicators[i]->on =
+				    state;
+				if (create_cairo (drawing)) {
+					draw_doodad
+					    (drawing->renderContext,
+					     drawing,
+					     drawing->physical_indicators
+					     [i]);
+					destroy_cairo (drawing);
+				}
+				invalidate_indicator_doodad_region
+				    (drawing,
+				     drawing->physical_indicators[i]);
+			}
+		}
+}
+
+static CdkFilterReturn
+xkb_state_notify_event_filter (CdkXEvent              *cdkxev,
+			       CdkEvent               *event G_GNUC_UNUSED,
+			       CafekbdKeyboardDrawing *drawing)
+{
+#define modifier_change_mask (XkbModifierStateMask | XkbModifierBaseMask | XkbModifierLatchMask | XkbModifierLockMask)
+
+	if (!drawing->xkb)
+		return CDK_FILTER_CONTINUE;
+
+	if (((XEvent *) cdkxev)->type == drawing->xkb_event_type) {
+		XkbEvent *kev = (XkbEvent *) cdkxev;
+		CtkAllocation allocation;
+		switch (kev->any.xkb_type) {
+		case XkbStateNotify:
+			if (((kev->state.changed & modifier_change_mask) &&
+			     drawing->track_modifiers)) {
+				free_cdik (drawing);
+				if (drawing->track_modifiers)
+					cafekbd_keyboard_drawing_set_mods
+					    (drawing,
+					     kev->state.compat_state);
+				drawing->keys =
+				    g_new0 (CafekbdKeyboardDrawingKey,
+					    drawing->xkb->max_key_code +
+					    1);
+
+				ctk_widget_get_allocation (CTK_WIDGET
+							   (drawing),
+							   &allocation);
+				size_allocate (CTK_WIDGET (drawing),
+					       &allocation, drawing);
+
+				init_keys_and_doodads (drawing);
+				init_colors (drawing);
+			}
+			break;
+
+		case XkbIndicatorStateNotify:
+			{
+				process_indicators_state_notify (&
+								 ((XkbEvent
+								   *)
+								  cdkxev)->indicators,
+drawing);
+			}
+			break;
+
+		case XkbIndicatorMapNotify:
+		case XkbControlsNotify:
+		case XkbNamesNotify:
+		case XkbNewKeyboardNotify:
+			{
+				XkbStateRec state;
+				memset (&state, 0, sizeof (state));
+				XkbGetState (drawing->display,
+					     XkbUseCoreKbd, &state);
+				if (drawing->track_modifiers)
+					cafekbd_keyboard_drawing_set_mods
+					    (drawing, state.compat_state);
+				if (drawing->track_config)
+					cafekbd_keyboard_drawing_set_keyboard
+					    (drawing, NULL);
+			}
+			break;
+		}
+	}
+
+	return CDK_FILTER_CONTINUE;
+}
+
+static void
+destroy (CafekbdKeyboardDrawing * drawing)
+{
+	free_render_context (drawing);
+	cdk_window_remove_filter (NULL, (CdkFilterFunc)
+				  xkb_state_notify_event_filter, drawing);
+	if (drawing->timeout > 0) {
+		g_source_remove (drawing->timeout);
+		drawing->timeout = 0;
+	}
+	if (drawing->idle_redraw > 0) {
+		g_source_remove (drawing->idle_redraw);
+		drawing->idle_redraw = 0;
+	}
+
+	if (drawing->surface != NULL) {
+		cairo_surface_destroy (drawing->surface);
+	}
+}
+
+static void
+style_changed (CafekbdKeyboardDrawing * drawing)
+{
+	pango_layout_context_changed (drawing->renderContext->layout);
+}
+
+static void
+cafekbd_keyboard_drawing_init (CafekbdKeyboardDrawing * drawing)
+{
+	gint opcode = 0, error = 0, major = 1, minor = 0;
+	gint mask;
+
+	drawing->display = CDK_DISPLAY_XDISPLAY(cdk_display_get_default());
+
+	printf ("dpy: %p\n", (void *) drawing->display);
+
+	if (!XkbQueryExtension
+	    (drawing->display, &opcode, &drawing->xkb_event_type, &error,
+	     &major, &minor))
+		g_critical
+		    ("XkbQueryExtension failed! Stuff probably won't work.");
+
+	printf ("evt/error/major/minor: %d/%d/%d/%d\n",
+		drawing->xkb_event_type, error, major, minor);
+
+	/* XXX: this stuff probably doesn't matter.. also, cdk_screen_get_default can fail */
+	if (ctk_widget_has_screen (CTK_WIDGET (drawing)))
+		drawing->screen_num =
+		    cdk_x11_screen_get_screen_number (ctk_widget_get_screen
+					   (CTK_WIDGET (drawing)));
+	else
+		drawing->screen_num =
+		    cdk_x11_screen_get_screen_number (cdk_screen_get_default ());
+
+	drawing->surface = NULL;
+	alloc_render_context (drawing);
+
+	drawing->keyboard_items = NULL;
+	drawing->colors = NULL;
+
+	drawing->track_modifiers = 0;
+	drawing->track_config = 0;
+
+	/* XXX: XkbClientMapMask | XkbIndicatorMapMask | XkbNamesMask | XkbGeometryMask */
+	drawing->xkb = XkbGetKeyboard (drawing->display,
+				       XkbGBN_GeometryMask |
+				       XkbGBN_KeyNamesMask |
+				       XkbGBN_OtherNamesMask |
+				       XkbGBN_SymbolsMask |
+				       XkbGBN_IndicatorMapMask,
+				       XkbUseCoreKbd);
+	if (drawing->xkb) {
+		XkbGetNames (drawing->display, XkbAllNamesMask, drawing->xkb);
+		XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+				       XkbIndicatorStateNotify,
+				       drawing->xkb->indicators->phys_indicators,
+				       drawing->xkb->indicators->phys_indicators);
+	}
+
+	drawing->l3mod = XkbKeysymToModifiers (drawing->display,
+					       CDK_KEY_ISO_Level3_Shift);
+
+	drawing->xkbOnDisplay = TRUE;
+
+	alloc_cdik (drawing);
+
+	mask =
+	    (XkbStateNotifyMask | XkbNamesNotifyMask |
+	     XkbControlsNotifyMask | XkbIndicatorMapNotifyMask |
+	     XkbNewKeyboardNotifyMask);
+	XkbSelectEvents (drawing->display, XkbUseCoreKbd, mask, mask);
+
+	mask = XkbGroupStateMask | XkbModifierStateMask;
+	XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+			       XkbStateNotify, mask, mask);
+
+	mask = (XkbGroupNamesMask | XkbIndicatorNamesMask);
+	XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+			       XkbNamesNotify, mask, mask);
+	init_keys_and_doodads (drawing);
+	init_colors (drawing);
+
+	/* required to get key events */
+	ctk_widget_set_can_focus (CTK_WIDGET (drawing), TRUE);
+
+	ctk_widget_set_events (CTK_WIDGET (drawing),
+			       CDK_EXPOSURE_MASK | CDK_KEY_PRESS_MASK |
+			       CDK_KEY_RELEASE_MASK | CDK_BUTTON_PRESS_MASK
+			       | CDK_FOCUS_CHANGE_MASK);
+	g_signal_connect (G_OBJECT (drawing), "draw",
+			  G_CALLBACK (draw), drawing);
+	g_signal_connect_after (G_OBJECT (drawing), "key-press-event",
+				G_CALLBACK (key_event), drawing);
+	g_signal_connect_after (G_OBJECT (drawing), "key-release-event",
+				G_CALLBACK (key_event), drawing);
+	g_signal_connect (G_OBJECT (drawing), "button-press-event",
+			  G_CALLBACK (button_press_event), drawing);<--- You might need to cast the function pointer here
+	g_signal_connect (G_OBJECT (drawing), "focus-out-event",
+			  G_CALLBACK (focus_event), drawing);
+	g_signal_connect (G_OBJECT (drawing), "focus-in-event",
+			  G_CALLBACK (focus_event), drawing);<--- You might need to cast the function pointer here
+	g_signal_connect (G_OBJECT (drawing), "size-allocate",
+			  G_CALLBACK (size_allocate), drawing);
+	g_signal_connect (G_OBJECT (drawing), "destroy",
+			  G_CALLBACK (destroy), drawing);
+	g_signal_connect (G_OBJECT (drawing), "style-set",
+			  G_CALLBACK (style_changed), drawing);
+
+	cdk_window_add_filter (NULL, (CdkFilterFunc)
+			       xkb_state_notify_event_filter, drawing);
+}
+
+CtkWidget *
+cafekbd_keyboard_drawing_new (void)
+{
+	return
+	    CTK_WIDGET (g_object_new
+			(cafekbd_keyboard_drawing_get_type (), NULL));
+}
+
+static void
+cafekbd_keyboard_drawing_class_init (CafekbdKeyboardDrawingClass * klass)
+{
+	CtkWidgetClass *widget_class = CTK_WIDGET_CLASS (klass);
+	ctk_widget_class_set_css_name (widget_class, "cafekbd-keyboard-drawing");
+
+	klass->bad_keycode = NULL;
+
+	cafekbd_keyboard_drawing_signals[BAD_KEYCODE] =
+	    g_signal_new ("bad-keycode", cafekbd_keyboard_drawing_get_type (),
+			  G_SIGNAL_RUN_FIRST,
+			  G_STRUCT_OFFSET (CafekbdKeyboardDrawingClass,
+					   bad_keycode), NULL, NULL,
+			  cafekbd_keyboard_drawing_VOID__UINT, G_TYPE_NONE, 1,
+			  G_TYPE_UINT);
+}
+
+GType
+cafekbd_keyboard_drawing_get_type (void)
+{
+	static GType cafekbd_keyboard_drawing_type = 0;
+
+	if (!cafekbd_keyboard_drawing_type) {
+		static const GTypeInfo cafekbd_keyboard_drawing_info = {
+			sizeof (CafekbdKeyboardDrawingClass),
+			NULL,	/* base_init */
+			NULL,	/* base_finalize */
+			(GClassInitFunc) cafekbd_keyboard_drawing_class_init,
+			NULL,	/* class_finalize */
+			NULL,	/* class_data */
+			sizeof (CafekbdKeyboardDrawing),
+			0,	/* n_preallocs */
+			(GInstanceInitFunc) cafekbd_keyboard_drawing_init,
+			NULL	/* *value_table */
+		};
+
+		cafekbd_keyboard_drawing_type =
+		    g_type_register_static (CTK_TYPE_DRAWING_AREA,
+					    "CafekbdKeyboardDrawing",
+					    &cafekbd_keyboard_drawing_info,
+					    0);
+	}
+
+	return cafekbd_keyboard_drawing_type;
+}
+
+void
+cafekbd_keyboard_drawing_set_mods (CafekbdKeyboardDrawing * drawing, guint mods)
+{
+#ifdef KBDRAW_DEBUG
+	printf ("set_mods: %d\n", mods);
+#endif
+	if (mods != drawing->mods) {
+		drawing->mods = mods;
+		ctk_widget_queue_draw (CTK_WIDGET (drawing));
+	}
+}
+
+/**
+ * cafekbd_keyboard_drawing_render:
+ * @kbdrawing: keyboard layout to render
+ * @cr:        Cairo context to render to
+ * @layout:    Pango layout to use to render text
+ * @x:         left coordinate (pixels) of region to render in
+ * @y:         top coordinate (pixels) of region to render in
+ * @width:     width (pixels) of region to render in
+ * @height:    height (pixels) of region to render in
+ *
+ * Renders a keyboard layout to a cairo_t context.  @cr and @layout can be got
+ * from e.g. a CtkWidget or a CtkPrintContext.  @cr and @layout may be modified
+ * by the function but will not be unreffed.
+ *
+ * Returns: %TRUE on success, %FALSE on failure
+ */
+gboolean
+cafekbd_keyboard_drawing_render (CafekbdKeyboardDrawing * kbdrawing,
+			      cairo_t * cr,
+			      PangoLayout * layout,
+			      double x, double y,
+			      double width, double height,
+			      double dpi_x, double dpi_y)
+{
+	CtkStyleContext *style_context =
+	    ctk_widget_get_style_context (CTK_WIDGET (kbdrawing));
+	CdkRGBA dark_color;
+	PangoFontDescription *fd = NULL;
+
+	ctk_style_context_get_background_color (style_context,
+	                                        ctk_style_context_get_state (style_context),
+	                                        &dark_color);
+	/* make dark background by making regular background darker */
+	dark_color.red *= 0.7;
+	dark_color.green *= 0.7;
+	dark_color.blue *= 0.7;
+
+	ctk_style_context_get (style_context,
+	                       ctk_style_context_get_state (style_context),
+	                       CTK_STYLE_PROPERTY_FONT, &fd, NULL);
+	fd = pango_font_description_copy (fd);
+
+	CafekbdKeyboardDrawingRenderContext context = {
+		cr,
+		kbdrawing->renderContext->angle,
+		layout,
+		pango_font_description_copy (fd),
+		1, 1,
+		dark_color
+	};
+
+	if (!context_setup_scaling (&context, kbdrawing, width, height,
+	                            dpi_x, dpi_y))
+		return FALSE;
+	cairo_translate (cr, x, y);
+
+	draw_keyboard_to_context (&context, kbdrawing);
+
+	pango_font_description_free (fd);
+
+	return TRUE;
+}
+
+/**
+ * cafekbd_keyboard_drawing_set_keyboard: (skip)
+ */
+gboolean
+cafekbd_keyboard_drawing_set_keyboard (CafekbdKeyboardDrawing * drawing,
+				    XkbComponentNamesRec * names)
+{
+	CtkAllocation allocation;
+
+	free_cdik (drawing);
+	if (drawing->xkb)
+		XkbFreeKeyboard (drawing->xkb, 0, TRUE);	/* free_all = TRUE */
+	drawing->xkb = NULL;
+
+	if (names) {
+		drawing->xkb =
+		    XkbGetKeyboardByName (drawing->display, XkbUseCoreKbd,
+					  names, 0,
+					  XkbGBN_GeometryMask |
+					  XkbGBN_KeyNamesMask |
+					  XkbGBN_OtherNamesMask |
+					  XkbGBN_ClientSymbolsMask |
+					  XkbGBN_IndicatorMapMask, FALSE);
+		drawing->xkbOnDisplay = FALSE;
+	} else {
+		drawing->xkb = XkbGetKeyboard (drawing->display,
+					       XkbGBN_GeometryMask |
+					       XkbGBN_KeyNamesMask |
+					       XkbGBN_OtherNamesMask |
+					       XkbGBN_SymbolsMask |
+					       XkbGBN_IndicatorMapMask,
+					       XkbUseCoreKbd);
+		XkbGetNames (drawing->display, XkbAllNamesMask,
+			     drawing->xkb);
+		drawing->xkbOnDisplay = TRUE;
+	}
+
+	if (drawing->xkb) {
+		XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+				       XkbIndicatorStateNotify,
+				       drawing->xkb->indicators->phys_indicators,
+				       drawing->xkb->indicators->phys_indicators);
+	}
+
+	alloc_cdik (drawing);
+
+	init_keys_and_doodads (drawing);
+	init_colors (drawing);
+
+	ctk_widget_get_allocation (CTK_WIDGET (drawing), &allocation);
+	size_allocate (CTK_WIDGET (drawing), &allocation, drawing);
+	ctk_widget_queue_draw (CTK_WIDGET (drawing));
+
+	return TRUE;
+}
+
+const gchar* cafekbd_keyboard_drawing_get_keycodes(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->keycodes <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->keycodes);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_geometry(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->geometry <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->geometry);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_symbols(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->symbols <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->symbols);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_types(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->types <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->types);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_compat(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->compat <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->compat);
+	}
+}
+
+void
+cafekbd_keyboard_drawing_set_track_modifiers (CafekbdKeyboardDrawing * drawing,
+					   gboolean enable)
+{
+	if (enable) {
+		XkbStateRec state;
+		drawing->track_modifiers = 1;
+		memset (&state, 0, sizeof (state));
+		XkbGetState (drawing->display, XkbUseCoreKbd, &state);
+		cafekbd_keyboard_drawing_set_mods (drawing,
+						state.compat_state);
+	} else
+		drawing->track_modifiers = 0;
+}
+
+void
+cafekbd_keyboard_drawing_set_track_config (CafekbdKeyboardDrawing * drawing,
+					gboolean enable)
+{
+	if (enable)
+		drawing->track_config = 1;
+	else
+		drawing->track_config = 0;
+}
+
+void
+cafekbd_keyboard_drawing_set_groups_levels (CafekbdKeyboardDrawing * drawing,
+					 CafekbdKeyboardDrawingGroupLevel *
+					 groupLevels[])
+{
+#ifdef KBDRAW_DEBUG
+	printf ("set_group_levels [topLeft]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT]->level);
+	printf ("set_group_levels [topRight]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPRIGHT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPRIGHT]->level);
+	printf ("set_group_levels [bottomLeft]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT]->level);
+	printf ("set_group_levels [bottomRight]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT]->level);
+#endif
+	drawing->groupLevels = groupLevels;
+
+	ctk_widget_queue_draw (CTK_WIDGET (drawing));
+}
+
+typedef struct {
+	CafekbdKeyboardDrawing *drawing;
+	const gchar *description;
+} XkbLayoutPreviewPrintData;
+
+static void
+cafekbd_keyboard_drawing_begin_print (CtkPrintOperation         *operation,
+				      CtkPrintContext           *context G_GNUC_UNUSED,
+				      XkbLayoutPreviewPrintData *data G_GNUC_UNUSED)
+{
+	/* We always print single-page documents */
+	CtkPrintSettings *settings =
+	    ctk_print_operation_get_print_settings (operation);
+	ctk_print_operation_set_n_pages (operation, 1);
+	if (!ctk_print_settings_has_key
+	    (settings, CTK_PRINT_SETTINGS_ORIENTATION))
+		ctk_print_settings_set_orientation (settings,
+						    CTK_PAGE_ORIENTATION_LANDSCAPE);
+}
+
+static void
+cafekbd_keyboard_drawing_draw_page (CtkPrintOperation         *operation,
+				    CtkPrintContext           *context,
+				    gint                       page_nr G_GNUC_UNUSED,
+				    XkbLayoutPreviewPrintData *data)
+{
+	cairo_t *cr = ctk_print_context_get_cairo_context (context);
+	PangoLayout *layout =
+	    ctk_print_context_create_pango_layout (context);
+	PangoFontDescription *desc =
+	    pango_font_description_from_string ("sans 8");
+	gdouble width = ctk_print_context_get_width (context);
+	gdouble height = ctk_print_context_get_height (context);
+	gdouble dpi_x = ctk_print_context_get_dpi_x (context);
+	gdouble dpi_y = ctk_print_context_get_dpi_y (context);
+	gchar *header;
+
+	ctk_print_operation_set_unit (operation, CTK_UNIT_PIXEL);
+
+	header = g_strdup_printf
+	    (_("Keyboard layout \"%s\"\n"
+	       "Copyright &#169; X.Org Foundation and "
+	       "XKeyboardConfig contributors\n"
+	       "For licensing see package metadata"), data->description);
+	pango_layout_set_markup (layout, header, -1);
+	pango_layout_set_font_description (layout, desc);
+	pango_font_description_free (desc);
+	pango_layout_set_width (layout, pango_units_from_double (width));
+	pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER);
+	cairo_set_source_rgb (cr, 0, 0, 0);
+	cairo_move_to (cr, 0, 0);
+	pango_cairo_show_layout (cr, layout);
+
+	cafekbd_keyboard_drawing_render (CAFEKBD_KEYBOARD_DRAWING
+				      (data->drawing), cr, layout, 0.0,
+				      0.0, width, height, dpi_x, dpi_y);
+
+	g_object_unref (layout);
+}
+
+void
+cafekbd_keyboard_drawing_print (CafekbdKeyboardDrawing * drawing,
+			     CtkWindow * parent_window,
+			     const gchar * description)
+{
+	CtkPrintOperation *print;
+	CtkPrintOperationResult res;
+	static CtkPrintSettings *settings = NULL;
+	XkbLayoutPreviewPrintData data = { drawing, description };
+
+	print = ctk_print_operation_new ();
+
+	if (settings != NULL)
+		ctk_print_operation_set_print_settings (print, settings);
+
+	g_signal_connect (print, "begin_print",
+			  G_CALLBACK (cafekbd_keyboard_drawing_begin_print),
+			  &data);
+	g_signal_connect (print, "draw_page",
+			  G_CALLBACK (cafekbd_keyboard_drawing_draw_page),
+			  &data);
+
+	res = ctk_print_operation_run (print,
+				       CTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
+				       parent_window, NULL);
+
+	if (res == CTK_PRINT_OPERATION_RESULT_APPLY) {
+		if (settings != NULL)
+			g_object_unref (settings);
+		settings = ctk_print_operation_get_print_settings (print);
+		g_object_ref (settings);
+	}
+
+	g_object_unref (print);
+}
+
+static void
+show_layout_response (CtkWidget * dialog, gint resp)
+{
+	CdkRectangle rect;
+	CtkWidget *kbdraw;
+	const gchar *groupName;
+
+	switch (resp) {
+	case CTK_RESPONSE_CLOSE:
+		ctk_window_get_position (CTK_WINDOW (dialog), &rect.x,
+					 &rect.y);
+		ctk_window_get_size (CTK_WINDOW (dialog), &rect.width,
+				     &rect.height);
+		cafekbd_preview_save_position (&rect);
+		ctk_widget_destroy (dialog);
+		break;
+	case CTK_RESPONSE_PRINT:
+		kbdraw =
+		    CTK_WIDGET (g_object_get_data
+				(G_OBJECT (dialog), "kbdraw"));
+		groupName =
+		    (const gchar *) g_object_get_data (G_OBJECT (dialog),
+						       "groupName");
+		cafekbd_keyboard_drawing_print (CAFEKBD_KEYBOARD_DRAWING
+					     (kbdraw), CTK_WINDOW (dialog),
+					     groupName ? groupName :
+					     _("Unknown"));
+	}
+}
+
+CtkWidget *
+cafekbd_keyboard_drawing_new_dialog (gint group, gchar * group_name)
+{
+	static CafekbdKeyboardDrawingGroupLevel groupsLevels[] = { {
+								 0, 1}, {
+									 0,
+									 3},
+	{
+	 0, 0}, {
+		 0, 2}
+	};
+	static CafekbdKeyboardDrawingGroupLevel *pGroupsLevels[] = {
+		groupsLevels, groupsLevels + 1, groupsLevels + 2,
+		groupsLevels + 3
+	};
+
+	CtkBuilder *builder;
+	CtkWidget *dialog, *kbdraw;
+	XkbComponentNamesRec component_names;
+	XklConfigRec *xkl_data;
+	CdkRectangle *rect;
+	GError *error = NULL;
+	char title[128] = "";
+	XklEngine* engine = xkl_engine_get_instance(CDK_DISPLAY_XDISPLAY(cdk_display_get_default()));
+
+	builder = ctk_builder_new ();
+	ctk_builder_add_from_resource (builder,
+	                               "/org/cafe/peripherals/keyboard/show-layout.ui",
+	                               &error);
+
+	if (error) {
+		g_error ("Could not load UI: %s", error->message);
+		g_clear_error (&error);
+	}
+
+
+	dialog =
+	    CTK_WIDGET (ctk_builder_get_object
+			(builder, "gswitchit_layout_view"));
+	kbdraw = cafekbd_keyboard_drawing_new ();
+	ctk_widget_set_vexpand (kbdraw, TRUE);
+
+	snprintf (title, sizeof (title), _("Keyboard Layout \"%s\""),
+		  group_name);
+	ctk_window_set_title (CTK_WINDOW (dialog), title);
+	g_object_set_data_full (G_OBJECT (dialog), "group_name",
+				g_strdup (group_name), g_free);
+
+	cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING
+						 (kbdraw), pGroupsLevels);
+
+	xkl_data = xkl_config_rec_new ();
+	if (xkl_config_rec_get_from_server (xkl_data, engine)) {
+		int num_layouts = g_strv_length (xkl_data->layouts);
+		int num_variants = g_strv_length (xkl_data->variants);
+		if (group >= 0 && group < num_layouts
+		    && group < num_variants) {
+			char *l = g_strdup (xkl_data->layouts[group]);
+			char *v = g_strdup (xkl_data->variants[group]);
+			char **p;
+			int i;
+
+			if ((p = xkl_data->layouts) != NULL)
+				for (i = num_layouts; --i >= 0;)
+					g_free (*p++);
+
+			if ((p = xkl_data->variants) != NULL)
+				for (i = num_variants; --i >= 0;)
+					g_free (*p++);
+
+			xkl_data->layouts =
+			    g_realloc (xkl_data->layouts,
+				       sizeof (char *) * 2);
+			xkl_data->variants =
+			    g_realloc (xkl_data->variants,
+				       sizeof (char *) * 2);
+			xkl_data->layouts[0] = l;
+			xkl_data->variants[0] = v;
+			xkl_data->layouts[1] = xkl_data->variants[1] =
+			    NULL;
+		}
+
+		if (xkl_xkb_config_native_prepare(engine, xkl_data, &component_names))
+		{
+			cafekbd_keyboard_drawing_set_keyboard
+			    (CAFEKBD_KEYBOARD_DRAWING (kbdraw),
+			     &component_names);
+			xkl_xkb_config_native_cleanup (engine,
+						       &component_names);
+		}
+	}
+
+	g_object_unref (G_OBJECT (xkl_data));
+
+	g_object_set_data (G_OBJECT (dialog), "builderData", builder);
+	g_signal_connect (G_OBJECT (dialog), "response", G_CALLBACK (show_layout_response), NULL);
+
+	rect = cafekbd_preview_load_position ();
+
+	if (rect != NULL)
+	{
+		ctk_window_move (CTK_WINDOW (dialog), rect->x, rect->y);
+		ctk_window_resize (CTK_WINDOW (dialog), rect->width, rect->height);
+		g_free (rect);
+	}
+	else
+	{
+		ctk_window_resize (CTK_WINDOW (dialog), 700, 400);
+	}
+
+	ctk_window_set_resizable (CTK_WINDOW (dialog), TRUE);
+
+	ctk_container_add (CTK_CONTAINER
+			   (ctk_builder_get_object
+			    (builder, "preview_vbox")), kbdraw);
+
+	g_object_set_data (G_OBJECT (dialog), "kbdraw", kbdraw);
+
+		g_signal_connect_swapped(dialog, "destroy", G_CALLBACK(g_object_unref),  g_object_get_data(G_OBJECT(dialog), "builderData"));
+
+	ctk_widget_show_all(dialog);
+
+	return dialog;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/5.html b/2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/5.html new file mode 100644 index 0000000..a0afe30 --- /dev/null +++ b/2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/5.html @@ -0,0 +1,1978 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+#include <config.h>
+
+#include <memory.h>
+
+#include <cairo.h>
+
+#include <cdk/cdkkeysyms.h>
+#include <cdk/cdkx.h>
+#include <glib/gi18n-lib.h>
+#include <glib/gprintf.h>
+
+#include <cafekbd-status.h>
+
+#include <cafekbd-desktop-config.h>
+#include <cafekbd-indicator-config.h>
+
+typedef struct _gki_globals {
+	XklEngine *engine;
+	XklConfigRegistry *registry;
+
+	CafekbdDesktopConfig cfg;
+	CafekbdIndicatorConfig ind_cfg;
+	CafekbdKeyboardConfig kbd_cfg;
+
+	const gchar *tooltips_format;
+	gchar **full_group_names;
+	gchar **short_group_names;
+
+	gint current_width;
+	gint current_height;
+	int real_width;
+
+	GSList *icons;		/* list of GdkPixbuf */
+	GSList *widget_instances;	/* list of CafekbdStatus */
+	gulong state_changed_handler;
+	gulong config_changed_handler;
+} gki_globals;
+
+static gchar *settings_signal_names[] = {
+	"notify::ctk-theme-name",
+	"notify::ctk-key-theme-name",
+	"notify::ctk-font-name",
+	"notify::font-options",
+};
+
+struct _CafekbdStatusPrivate {
+	gdouble angle;
+	gulong settings_signal_handlers[sizeof (settings_signal_names) /
+					sizeof (settings_signal_names[0])];
+};
+
+/* one instance for ALL widgets */
+static gki_globals globals;
+
+#define ForAllIndicators() \
+	{ \
+		GSList* cur; \
+		for (cur = globals.widget_instances; cur != NULL; cur = cur->next) { \
+			CafekbdStatus * gki = (CafekbdStatus*)cur->data;
+#define NextIndicator() \
+		} \
+	}
+
+G_DEFINE_TYPE (CafekbdStatus, cafekbd_status, CTK_TYPE_STATUS_ICON)<--- There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
+static void
+cafekbd_status_global_init (void);
+static void
+cafekbd_status_global_term (void);
+static GdkPixbuf *
+cafekbd_status_prepare_drawing (CafekbdStatus * gki, int group);
+static void
+cafekbd_status_set_current_page_for_group (CafekbdStatus * gki, int group);
+static void
+cafekbd_status_set_current_page (CafekbdStatus * gki);
+static void
+cafekbd_status_global_cleanup (CafekbdStatus * gki);
+static void
+cafekbd_status_global_fill (CafekbdStatus * gki);
+static void
+cafekbd_status_set_tooltips (CafekbdStatus * gki, const char *str);
+
+void
+cafekbd_status_set_tooltips (CafekbdStatus * gki, const char *str)
+{
+	g_assert (str == NULL || g_utf8_validate (str, -1, NULL));
+
+	ctk_status_icon_set_tooltip_text (CTK_STATUS_ICON (gki), str);
+}
+
+void
+cafekbd_status_global_cleanup (CafekbdStatus *gki G_GNUC_UNUSED)
+{
+	while (globals.icons) {
+		if (globals.icons->data)
+			g_object_unref (G_OBJECT (globals.icons->data));
+		globals.icons =
+		    g_slist_delete_link (globals.icons, globals.icons);
+	}
+}
+
+void
+cafekbd_status_global_fill (CafekbdStatus * gki)
+{
+	int grp;
+	int total_groups = xkl_engine_get_num_groups (globals.engine);
+
+	for (grp = 0; grp < total_groups; grp++) {
+		GdkPixbuf *page = cafekbd_status_prepare_drawing (gki, grp);
+		globals.icons = g_slist_append (globals.icons, page);
+	}
+}
+
+static void
+cafekbd_status_activate (CafekbdStatus *gki G_GNUC_UNUSED)
+{
+	xkl_debug (150, "Mouse button pressed on applet\n");
+	cafekbd_desktop_config_lock_next_group (&globals.cfg);
+}
+
+/* hackish xref */
+extern gchar *cafekbd_indicator_extract_layout_name (int group,
+						  XklEngine * engine,
+						  CafekbdKeyboardConfig *
+						  kbd_cfg,
+						  gchar **
+						  short_group_names,
+						  gchar **
+						  full_group_names);
+
+extern gchar *cafekbd_indicator_create_label_title (int group,
+						 GHashTable **
+						 ln2cnt_map,
+						 gchar * layout_name);
+
+static void
+cafekbd_status_render_cairo (cairo_t * cr, int group)
+{
+	double r, g, b;
+	PangoFontDescription *pfd;
+	PangoContext *pcc;
+	PangoLayout *pl;
+	int lwidth, lheight;
+	gchar *layout_name, *lbl_title;
+	double screen_res;
+	cairo_font_options_t *fo;
+	static GHashTable *ln2cnt_map = NULL;
+
+	xkl_debug (160, "Rendering cairo for group %d\n", group);
+	if (globals.ind_cfg.background_color != NULL &&
+	    globals.ind_cfg.background_color[0] != 0) {
+		if (sscanf
+		    (globals.ind_cfg.background_color, "%lg %lg %lg", &r,
+		     &g, &b) == 3) {
+			cairo_set_source_rgb (cr, r, g, b);
+			cairo_rectangle (cr, 0, 0, globals.current_width,
+					 globals.current_height);
+			cairo_fill (cr);
+		}
+	}
+
+	if (globals.ind_cfg.foreground_color != NULL &&
+	    globals.ind_cfg.foreground_color[0] != 0) {
+		if (sscanf
+		    (globals.ind_cfg.foreground_color, "%lg %lg %lg", &r,
+		     &g, &b) == 3) {
+			cairo_set_source_rgb (cr, r, g, b);
+		}
+	}
+
+	pcc = pango_cairo_create_context (cr);
+
+	screen_res = cdk_screen_get_resolution (cdk_screen_get_default ());
+	if (screen_res > 0)
+		pango_cairo_context_set_resolution (pcc, screen_res);
+
+	fo = cairo_font_options_copy (cdk_screen_get_font_options
+				      (cdk_screen_get_default ()));
+	/* SUBPIXEL antialiasing gives bad results on in-memory images */
+	if (cairo_font_options_get_antialias (fo) ==
+	    CAIRO_ANTIALIAS_SUBPIXEL)
+		cairo_font_options_set_antialias (fo,
+						  CAIRO_ANTIALIAS_GRAY);
+	pango_cairo_context_set_font_options (pcc, fo);
+
+	pl = pango_layout_new (pcc);
+
+	layout_name = cafekbd_indicator_extract_layout_name (group,
+							  globals.engine,
+							  &globals.kbd_cfg,
+							  globals.short_group_names,
+							  globals.full_group_names);
+	lbl_title =
+	    cafekbd_indicator_create_label_title (group, &ln2cnt_map,
+					       layout_name);
+
+	if (group + 1 == xkl_engine_get_num_groups (globals.engine)) {
+		g_hash_table_destroy (ln2cnt_map);
+		ln2cnt_map = NULL;
+	}
+
+	pango_layout_set_text (pl, lbl_title, -1);
+
+	g_free (lbl_title);
+
+	pfd = pango_font_description_from_string (globals.ind_cfg.font_family);
+
+	pango_layout_set_font_description (pl, pfd);
+	pango_layout_get_size (pl, &lwidth, &lheight);
+
+	cairo_move_to (cr,
+		       (globals.current_width - lwidth / PANGO_SCALE) / 2,
+		       (globals.current_height -
+			lheight / PANGO_SCALE) / 2);
+
+	pango_cairo_show_layout (cr, pl);
+
+	pango_font_description_free (pfd);
+	g_object_unref (pl);
+	g_object_unref (pcc);
+	cairo_font_options_destroy (fo);
+	cairo_destroy (cr);
+
+	globals.real_width = (lwidth / PANGO_SCALE) + 4;
+	if (globals.real_width > globals.current_width)
+		globals.real_width = globals.current_width;
+	if (globals.real_width < globals.current_height)
+		globals.real_width = globals.current_height;
+}
+
+static inline guint8
+convert_color_channel (guint8 src, guint8 alpha)
+{
+	return alpha ? ((((guint) src) << 8) - src) / alpha : 0;
+}
+
+static void
+convert_bgra_to_rgba (guint8 const *src, guint8 * dst, int width,
+		      int height, int new_width)
+{
+	int xoffset = width - new_width;
+
+	/* *4 */
+	int ptr_step = xoffset << 2;
+
+	int x, y;
+
+	/* / 2 * 4 */
+	src = src + ((xoffset >> 1) << 2);
+
+	for (y = height; --y >= 0; src += ptr_step) {
+		for (x = new_width; --x >= 0;) {
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+			dst[0] = convert_color_channel (src[2], src[3]);
+			dst[1] = convert_color_channel (src[1], src[3]);
+			dst[2] = convert_color_channel (src[0], src[3]);
+			dst[3] = src[3];
+#else
+			dst[0] = convert_color_channel (src[1], src[0]);
+			dst[1] = convert_color_channel (src[2], src[0]);
+			dst[2] = convert_color_channel (src[3], src[0]);
+			dst[3] = src[0];
+#endif
+			dst += 4;
+			src += 4;
+		}
+	}
+}
+
+static GdkPixbuf *
+cafekbd_status_prepare_drawing (CafekbdStatus *gki G_GNUC_UNUSED,
+				int            group)
+{
+	GError *gerror = NULL;
+	char *image_filename;
+	GdkPixbuf *image;
+
+	if (globals.current_width == 0)
+		return NULL;
+
+	if (globals.ind_cfg.show_flags) {
+
+		image_filename =
+		    (char *) g_slist_nth_data (globals.
+					       ind_cfg.image_filenames,
+					       group);
+
+		image = gdk_pixbuf_new_from_file_at_size (image_filename,
+							  globals.current_width,
+							  globals.current_height,
+							  &gerror);
+
+		if (image == NULL) {
+			CtkWidget *dialog = ctk_message_dialog_new (NULL,
+								    CTK_DIALOG_DESTROY_WITH_PARENT,
+								    CTK_MESSAGE_ERROR,
+								    CTK_BUTTONS_OK,
+								    _
+								    ("There was an error loading an image: %s"),
+								    gerror
+								    ==
+								    NULL ?
+								    "Unknown"
+								    :
+								    gerror->message);
+			g_signal_connect (G_OBJECT (dialog), "response",
+					  G_CALLBACK (ctk_widget_destroy),
+					  NULL);
+
+			ctk_window_set_resizable (CTK_WINDOW (dialog),
+						  FALSE);
+
+			ctk_widget_show (dialog);
+			g_error_free (gerror);
+
+			return NULL;
+		}
+		xkl_debug (150,
+			   "Image %d[%s] loaded -> %p[%dx%d], alpha: %d\n",
+			   group, image_filename, image,
+			   gdk_pixbuf_get_width (image),
+			   gdk_pixbuf_get_height (image),
+			   gdk_pixbuf_get_has_alpha (image));
+
+		return image;
+	} else {
+		cairo_surface_t *cs =
+		    cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
+						globals.current_width,
+						globals.current_height);
+		unsigned char *cairo_data;
+		guchar *pixbuf_data;
+		cafekbd_status_render_cairo (cairo_create (cs), group);
+		cairo_data = cairo_image_surface_get_data (cs);
+#if 0
+		char pngfilename[20];
+		g_sprintf (pngfilename, "label%d.png", group);
+		cairo_surface_write_to_png (cs, pngfilename);
+#endif
+		pixbuf_data =
+		    g_new0 (guchar,
+			    4 * globals.real_width *
+			    globals.current_height);
+		convert_bgra_to_rgba (cairo_data, pixbuf_data,
+				      globals.current_width,
+				      globals.current_height,
+				      globals.real_width);
+
+		cairo_surface_destroy (cs);
+
+		image = gdk_pixbuf_new_from_data (pixbuf_data,
+						  GDK_COLORSPACE_RGB,
+						  TRUE,
+						  8,
+						  globals.real_width,
+						  globals.current_height,
+						  globals.real_width *
+						  4,
+						  (GdkPixbufDestroyNotify)
+						  g_free, NULL);
+		xkl_debug (150,
+			   "Image %d created -> %p[%dx%d], alpha: %d\n",
+			   group, image, gdk_pixbuf_get_width (image),
+			   gdk_pixbuf_get_height (image),
+			   gdk_pixbuf_get_has_alpha (image));
+
+		return image;
+	}
+	return NULL;
+}
+
+static void
+cafekbd_status_update_tooltips (CafekbdStatus * gki)
+{
+	XklState *state = xkl_engine_get_current_state (globals.engine);
+	gchar *buf;
+	if (state == NULL || state->group < 0
+	    || state->group >= g_strv_length (globals.full_group_names))
+		return;
+
+	buf = g_strdup_printf (globals.tooltips_format,
+			       globals.full_group_names[state->group]);
+
+	cafekbd_status_set_tooltips (gki, buf);
+	g_free (buf);
+}
+
+void
+cafekbd_status_reinit_ui (CafekbdStatus * gki)
+{
+	cafekbd_status_global_cleanup (gki);
+	cafekbd_status_global_fill (gki);
+
+	cafekbd_status_set_current_page (gki);
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+			    gchar     *key G_GNUC_UNUSED,
+			    gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "General configuration changed in settings - reiniting...\n");
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+	ForAllIndicators () {
+		cafekbd_status_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_ind_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+				gchar     *key G_GNUC_UNUSED,
+				gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "Applet configuration changed in settings - reiniting...\n");
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+
+	cafekbd_indicator_config_free_image_filenames (&globals.ind_cfg);
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	ForAllIndicators () {
+		cafekbd_status_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+static void
+cafekbd_status_load_group_names (const gchar ** layout_ids,
+			      const gchar ** variant_ids)
+{
+	if (!cafekbd_desktop_config_load_group_descriptions
+	    (&globals.cfg, globals.registry, layout_ids, variant_ids,
+	     &globals.short_group_names, &globals.full_group_names)) {
+		/* We just populate no short names (remain NULL) -
+		 * full names are going to be used anyway */
+		gint i, total_groups =
+		    xkl_engine_get_num_groups (globals.engine);
+		xkl_debug (150, "group descriptions loaded: %d!\n",
+			   total_groups);
+		globals.full_group_names =
+		    g_new0 (char *, total_groups + 1);
+
+		if (xkl_engine_get_features (globals.engine) &
+		    XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
+			gchar **lst = globals.kbd_cfg.layouts_variants;
+			for (i = 0; *lst; lst++, i++) {
+				globals.full_group_names[i] =
+				    g_strdup ((char *) *lst);
+			}
+		} else {
+			for (i = total_groups; --i >= 0;) {
+				globals.full_group_names[i] =
+				    g_strdup_printf ("Group %d", i);
+			}
+		}
+	}
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_kbd_cfg_callback (CafekbdStatus *gki G_GNUC_UNUSED)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+	xkl_debug (100,
+		   "XKB configuration changed on X Server - reiniting...\n");
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+
+	cafekbd_indicator_config_free_image_filenames (&globals.ind_cfg);
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	g_strfreev (globals.full_group_names);
+	globals.full_group_names = NULL;
+
+	if (globals.short_group_names != NULL) {
+		g_strfreev (globals.short_group_names);
+		globals.short_group_names = NULL;
+	}
+
+	cafekbd_status_load_group_names ((const gchar **) xklrec->layouts,
+				      (const gchar **) xklrec->variants);
+
+	ForAllIndicators () {
+		cafekbd_status_reinit_ui (gki);
+	} NextIndicator ();
+	g_object_unref (G_OBJECT (xklrec));
+}
+
+/* Should be called once for all applets */
+static void
+cafekbd_status_state_callback (XklEngine           *engine G_GNUC_UNUSED,
+			       XklEngineStateChange changeType,
+			       gint                 group,
+			       gboolean             restore)
+{
+	xkl_debug (150, "group is now %d, restore: %d\n", group, restore);
+
+	if (changeType == GROUP_CHANGED) {
+		ForAllIndicators () {
+			xkl_debug (200, "do repaint\n");
+			cafekbd_status_set_current_page_for_group (gki,
+								group);
+		}
+		NextIndicator ();
+	}
+}
+
+
+void
+cafekbd_status_set_current_page (CafekbdStatus * gki)
+{
+	XklState *cur_state;
+	cur_state = xkl_engine_get_current_state (globals.engine);
+	if (cur_state->group >= 0)
+		cafekbd_status_set_current_page_for_group (gki,
+							cur_state->group);
+}
+
+void
+cafekbd_status_set_current_page_for_group (CafekbdStatus * gki, int group)
+{
+	xkl_debug (200, "Revalidating for group %d\n", group);
+
+	ctk_status_icon_set_from_pixbuf (CTK_STATUS_ICON (gki),
+					 GDK_PIXBUF (g_slist_nth_data
+						     (globals.icons,
+						      group)));
+
+	cafekbd_status_update_tooltips (gki);
+}
+
+/* Should be called once for all widgets */
+static CdkFilterReturn
+cafekbd_status_filter_x_evt (CdkXEvent *xev,
+			     CdkEvent  *event G_GNUC_UNUSED)
+{
+	XEvent *xevent = (XEvent *) xev;
+
+	xkl_engine_filter_events (globals.engine, xevent);
+	switch (xevent->type) {
+	case ReparentNotify:
+		{
+			XReparentEvent *rne = (XReparentEvent *) xev;
+
+			ForAllIndicators () {
+				guint32 xid =
+				    ctk_status_icon_get_x11_window_id
+				    (CTK_STATUS_ICON (gki));
+
+				/* compare the indicator's parent window with the even window */
+				if (xid == rne->window) {
+					/* if so - make it transparent... */
+					xkl_engine_set_window_transparent
+					    (globals.engine, rne->window,
+					     TRUE);
+				}
+			}
+		NextIndicator ()}
+		break;
+	}
+	return CDK_FILTER_CONTINUE;
+}
+
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_start_listen (void)
+{
+	cdk_window_add_filter (NULL, (CdkFilterFunc)
+			       cafekbd_status_filter_x_evt, NULL);
+	cdk_window_add_filter (cdk_get_default_root_window (),
+			       (CdkFilterFunc) cafekbd_status_filter_x_evt,
+			       NULL);
+
+	xkl_engine_start_listen (globals.engine,
+				 XKLL_TRACK_KEYBOARD_STATE);
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_stop_listen (void)
+{
+	xkl_engine_stop_listen (globals.engine, XKLL_TRACK_KEYBOARD_STATE);
+
+	cdk_window_remove_filter (NULL, (CdkFilterFunc)
+				  cafekbd_status_filter_x_evt, NULL);
+	cdk_window_remove_filter
+	    (cdk_get_default_root_window (),
+	     (CdkFilterFunc) cafekbd_status_filter_x_evt, NULL);
+}
+
+static void
+cafekbd_status_size_changed (CafekbdStatus * gki, gint size)
+{
+	if (globals.current_height != size) {
+		globals.current_height = size;
+		globals.current_width = size * 3 / 2;
+		cafekbd_status_reinit_ui (gki);
+	}
+}
+
+static void
+cafekbd_status_theme_changed (CtkSettings   *settings G_GNUC_UNUSED,
+			      GParamSpec    *pspec G_GNUC_UNUSED,
+			      CafekbdStatus *gki)
+{
+	cafekbd_indicator_config_refresh_style (&globals.ind_cfg);
+	cafekbd_status_reinit_ui (gki);
+}
+
+static void
+cafekbd_status_init (CafekbdStatus * gki)
+{
+	int i;
+
+	if (!g_slist_length (globals.widget_instances))
+		cafekbd_status_global_init ();
+
+	gki->priv = g_new0 (CafekbdStatusPrivate, 1);
+
+	/* This should give NA a hint about the order */
+	/* commenting out fixes a Cdk-critical warning */
+/*	ctk_status_icon_set_name (CTK_STATUS_ICON (gki), "keyboard"); */
+
+	xkl_debug (100, "Initiating the widget startup process for %p\n",
+		   gki);
+
+	if (globals.engine == NULL) {
+		cafekbd_status_set_tooltips (gki,
+					  _("XKB initialization error"));
+		return;
+	}
+
+	cafekbd_status_set_tooltips (gki, NULL);
+
+	cafekbd_status_global_fill (gki);
+	cafekbd_status_set_current_page (gki);
+
+	/* append AFTER all initialization work is finished */
+	globals.widget_instances =
+	    g_slist_append (globals.widget_instances, gki);
+
+	g_signal_connect (gki, "size-changed",
+			  G_CALLBACK (cafekbd_status_size_changed), NULL);
+	g_signal_connect (gki, "activate",
+			  G_CALLBACK (cafekbd_status_activate), NULL);
+
+	for (i = sizeof (settings_signal_names) /
+	     sizeof (settings_signal_names[0]); --i >= 0;)
+		gki->priv->settings_signal_handlers[i] =
+		    g_signal_connect_after (ctk_settings_get_default (),
+					    settings_signal_names[i],
+					    G_CALLBACK
+					    (cafekbd_status_theme_changed),
+					    gki);
+}
+
+static void
+cafekbd_status_finalize (GObject * obj)
+{
+	int i;
+	CafekbdStatus *gki = CAFEKBD_STATUS (obj);
+	xkl_debug (100,
+		   "Starting the cafe-kbd-status widget shutdown process for %p\n",
+		   gki);
+
+	for (i = sizeof (settings_signal_names) /
+	     sizeof (settings_signal_names[0]); --i >= 0;)
+		g_signal_handler_disconnect (ctk_settings_get_default (),
+					     gki->
+					     priv->settings_signal_handlers
+					     [i]);
+
+	/* remove BEFORE all termination work is finished */
+	globals.widget_instances =
+	    g_slist_remove (globals.widget_instances, gki);
+
+	cafekbd_status_global_cleanup (gki);
+
+	xkl_debug (100,
+		   "The instance of cafe-kbd-status successfully finalized\n");
+
+	g_free (gki->priv);
+
+	G_OBJECT_CLASS (cafekbd_status_parent_class)->finalize (obj);
+
+	if (!g_slist_length (globals.widget_instances))
+		cafekbd_status_global_term ();
+}
+
+static void
+cafekbd_status_global_term (void)
+{
+	xkl_debug (100, "*** Last  CafekbdStatus instance *** \n");
+	cafekbd_status_stop_listen ();
+
+	cafekbd_desktop_config_stop_listen (&globals.cfg);
+	cafekbd_indicator_config_stop_listen (&globals.ind_cfg);
+
+	cafekbd_indicator_config_term (&globals.ind_cfg);
+	cafekbd_keyboard_config_term (&globals.kbd_cfg);
+	cafekbd_desktop_config_term (&globals.cfg);
+
+	if (g_signal_handler_is_connected
+	    (globals.engine, globals.state_changed_handler)) {
+		g_signal_handler_disconnect (globals.engine,
+					     globals.state_changed_handler);
+		globals.state_changed_handler = 0;
+	}
+	if (g_signal_handler_is_connected
+	    (globals.engine, globals.config_changed_handler)) {
+		g_signal_handler_disconnect (globals.engine,
+					     globals.config_changed_handler);
+		globals.config_changed_handler = 0;
+	}
+
+	g_object_unref (G_OBJECT (globals.registry));
+	globals.registry = NULL;
+	g_object_unref (G_OBJECT (globals.engine));
+	globals.engine = NULL;
+	xkl_debug (100, "*** Terminated globals *** \n");
+}
+
+static void
+cafekbd_status_class_init (CafekbdStatusClass * klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+	xkl_debug (100, "*** First CafekbdStatus instance *** \n");
+
+	memset (&globals, 0, sizeof (globals));
+
+	/* Initing some global vars */
+	globals.tooltips_format = "%s";
+
+	/* Initing vtable */
+	object_class->finalize = cafekbd_status_finalize;
+
+	/* Signals */
+}
+
+static void
+cafekbd_status_global_init (void)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+
+	globals.engine = xkl_engine_get_instance(CDK_DISPLAY_XDISPLAY(cdk_display_get_default()));
+
+	if (globals.engine == NULL) {
+		xkl_debug (0, "Libxklavier initialization error");
+		return;
+	}
+
+	globals.state_changed_handler =
+	    g_signal_connect (globals.engine, "X-state-changed",
+			      G_CALLBACK (cafekbd_status_state_callback),
+			      NULL);
+	globals.config_changed_handler =
+	    g_signal_connect (globals.engine, "X-config-changed",
+			      G_CALLBACK (cafekbd_status_kbd_cfg_callback),
+			      NULL);
+
+	cafekbd_desktop_config_init (&globals.cfg, globals.engine);
+	cafekbd_keyboard_config_init (&globals.kbd_cfg, globals.engine);
+	cafekbd_indicator_config_init (&globals.ind_cfg, globals.engine);
+
+	cafekbd_desktop_config_start_listen (&globals.cfg,
+					  (GCallback)
+					  cafekbd_status_cfg_changed, NULL);
+	cafekbd_indicator_config_start_listen (&globals.ind_cfg,
+					    (GCallback)
+					    cafekbd_status_ind_cfg_changed,
+					    NULL);
+
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+
+	globals.registry =
+	    xkl_config_registry_get_instance (globals.engine);
+	xkl_config_registry_load (globals.registry,
+				  globals.cfg.load_extra_items);
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	cafekbd_status_load_group_names ((const gchar **) xklrec->layouts,
+				      (const gchar **) xklrec->variants);
+	g_object_unref (G_OBJECT (xklrec));
+
+	cafekbd_status_start_listen ();
+
+	xkl_debug (100, "*** Inited globals *** \n");
+}
+
+CtkStatusIcon *
+cafekbd_status_new (void)
+{
+	return
+	    CTK_STATUS_ICON (g_object_new (cafekbd_status_get_type (), NULL));
+}
+
+/**
+ * cafekbd_status_get_xkl_engine:
+ *
+ * Returns: (transfer none): The engine shared by all CafekbdStatus objects
+ */
+XklEngine *
+cafekbd_status_get_xkl_engine ()
+{
+	return globals.engine;
+}
+
+/**
+ * cafekbd_status_get_group_names:
+ *
+ * Returns: (transfer none) (array zero-terminated=1): List of group names
+ */
+gchar **
+cafekbd_status_get_group_names ()
+{
+	return globals.full_group_names;
+}
+
+gchar *
+cafekbd_status_get_image_filename (guint group)
+{
+	if (!globals.ind_cfg.show_flags)
+		return NULL;
+	return cafekbd_indicator_config_get_images_file (&globals.ind_cfg,
+						      &globals.kbd_cfg,
+						      group);
+}
+
+void
+cafekbd_status_set_angle (CafekbdStatus * gki, gdouble angle)
+{
+	gki->priv->angle = angle;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/6.html b/2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/6.html new file mode 100644 index 0000000..5ed6ace --- /dev/null +++ b/2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/6.html @@ -0,0 +1,806 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctk/ctk.h>
+#include <stdlib.h>
+#include <string.h>
+#include <glib.h>
+#include "libcafekbd/cafekbd-keyboard-drawing.h"
+
+
+static gchar *groups = NULL;
+static gchar *levels = NULL;
+static gchar *symbols = NULL;
+static gchar *keycodes = NULL;
+static gchar *geometry = NULL;
+
+static gboolean track_config = FALSE;
+static gboolean track_modifiers = FALSE;
+static gboolean program_version = FALSE;
+
+static const GOptionEntry options[] = {
+	{"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
+	 "Keyboard groups to display, from 1-4. Up to four groups only may be "
+	 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
+	 "group1[,group2[,group3[,group4]]]"},
+	{"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
+	 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
+	 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
+	 "level1[,level2[,level3[,level4]]]"},
+	{"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
+	 "Symbols component of the keyboard. If you omit this option, it is "
+	 "obtained from the X server; that is, the keyboard that is currently "
+	 "configured is drawn. Examples: --symbols=us or "
+	 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL},
+	{"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
+	 "Keycodes component of the keyboard. If you omit this option, it is "
+	 "obtained from the X server; that is, the keyboard that is currently"
+	 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
+	 NULL},
+	{"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
+	 "Geometry xkb component. If you omit this option, it is obtained from the"
+	 " X server; that is, the keyboard that is currently configured is drawn. "
+	 "Example: --geometry=kinesis", NULL},
+	{"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
+	 "Track the current modifiers", NULL},
+	{"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
+	 "Track the server XKB configuration", NULL},
+	{"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
+	 "Show current version", NULL},
+	{NULL},
+};
+
+static gboolean
+set_groups (gchar * groups_option,
+	    CafekbdKeyboardDrawingGroupLevel * groupLevels)
+{
+	CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
+	gint cntr, g;
+
+	groupLevels[0].group =
+	    groupLevels[1].group =
+	    groupLevels[2].group = groupLevels[3].group = -1;
+
+	if (groups_option == NULL)
+		return TRUE;
+
+	for (cntr = 4; --cntr >= 0;) {
+		if (*groups_option == '\0')
+			return FALSE;
+
+		g = *groups_option - '1';
+		if (g < 0 || g >= 4)
+			return FALSE;
+
+		pgl->group = g;
+		/* printf ("group %d\n", pgl->group); */
+
+		groups_option++;
+		if (*groups_option == '\0')
+			return TRUE;
+		if (*groups_option != ',')
+			return FALSE;
+
+		groups_option++;
+		pgl++;
+	}
+
+	return TRUE;
+}
+
+static gboolean
+set_levels (gchar * levels_option,
+	    CafekbdKeyboardDrawingGroupLevel * groupLevels)
+{
+	CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
+	gint cntr, l;
+	gchar *p;
+
+	groupLevels[0].level =
+	    groupLevels[1].level =
+	    groupLevels[2].level = groupLevels[3].level = -1;
+
+	if (levels_option == NULL)
+		return TRUE;
+
+	for (cntr = 4; --cntr >= 0;) {
+		if (*levels_option == '\0')
+			return FALSE;
+
+		l = (gint) strtol (levels_option, &p, 10) - 1;
+		if (l < 0 || l >= 64)
+			return FALSE;
+
+		pgl->level = l;
+		/* printf ("level %d\n", pgl->level); */
+
+		levels_option = p;
+		if (*levels_option == '\0')
+			return TRUE;
+		if (*levels_option != ',')
+			return FALSE;
+
+		levels_option++;
+		pgl++;
+	}
+
+	return TRUE;
+}
+
+static void
+bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED,
+	     guint                   keycode)
+{
+	g_warning
+	    ("got keycode %u, which is not on your keyboard according to your configuration",
+	     keycode);
+}
+
+gint
+main (gint argc, gchar ** argv)
+{
+	CtkWidget *window;
+	CtkWidget *cafekbd_keyboard_drawing;
+	CdkScreen *screen;
+	CdkMonitor *monitor;
+	CdkRectangle rect;
+	GOptionContext *context;
+	GError *error = NULL;
+
+	CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
+	    { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
+	CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
+	    { &groupLevels[0], &groupLevels[1], &groupLevels[2],
+		&groupLevels[3]
+	};
+
+	context = g_option_context_new ("kbdraw");
+	g_option_context_add_main_entries (context, options, NULL);
+	if (!g_option_context_parse (context, &argc, &argv, &error)) {
+		g_message ("option parsing failed: %s", error->message);
+		g_option_context_free (context);
+		exit (EXIT_FAILURE);
+	}
+	g_option_context_free (context);
+
+	if (program_version) {
+		g_print ("kbdraw %s\n", VERSION);
+		exit (0);
+	}
+
+	ctk_init (&argc, &argv);
+
+	if (!set_groups (groups, groupLevels)) {
+		g_printerr ("--groups: invalid argument\n");
+		exit (1);
+	}
+
+	if (!set_levels (levels, groupLevels)) {
+		g_printerr ("--levels: invalid argument\n");
+		exit (1);
+	}
+
+	window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
+	g_signal_connect (G_OBJECT (window), "destroy",
+			  G_CALLBACK (ctk_main_quit), NULL);
+
+	screen = ctk_window_get_screen (CTK_WINDOW (window));
+	monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
+	cdk_monitor_get_geometry (monitor, &rect);
+	ctk_window_set_default_size (CTK_WINDOW (window),
+				     rect.width * 4 / 5,
+				     rect.height * 1 / 2);
+
+	ctk_widget_show (window);
+
+	cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
+	ctk_widget_show (cafekbd_keyboard_drawing);
+	ctk_container_add (CTK_CONTAINER (window), cafekbd_keyboard_drawing);
+
+	cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING
+						 (cafekbd_keyboard_drawing),
+						 pgroupLevels);
+
+	if (track_modifiers)
+		cafekbd_keyboard_drawing_set_track_modifiers
+		    (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing), TRUE);
+	if (track_config)
+		cafekbd_keyboard_drawing_set_track_config
+		    (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing), TRUE);
+	g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",
+			  G_CALLBACK (bad_keycode), NULL);
+
+	if (symbols || geometry || keycodes) {
+		XkbComponentNamesRec names;
+		gint success;
+
+		memset (&names, '\0', sizeof (names));
+
+		if (symbols)
+			names.symbols = symbols;
+		else
+			names.symbols = (gchar *)
+			    cafekbd_keyboard_drawing_get_symbols
+			    (CAFEKBD_KEYBOARD_DRAWING
+			     (cafekbd_keyboard_drawing));
+
+		if (keycodes)
+			names.keycodes = keycodes;
+		else
+			names.keycodes = (gchar *)
+			    cafekbd_keyboard_drawing_get_keycodes
+			    (CAFEKBD_KEYBOARD_DRAWING
+			     (cafekbd_keyboard_drawing));
+
+		if (geometry)
+			names.geometry = geometry;
+		else
+			names.geometry = (gchar *)
+			    cafekbd_keyboard_drawing_get_geometry
+			    (CAFEKBD_KEYBOARD_DRAWING
+			     (cafekbd_keyboard_drawing));
+
+		success =
+		    cafekbd_keyboard_drawing_set_keyboard
+		    (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing),
+		     &names);
+		if (!success) {
+			g_printerr
+			    ("\nError loading new keyboard description with components:\n\n"
+			     "  keycodes:  %s\n" "  types:     %s\n"
+			     "  compat:    %s\n" "  symbols:   %s\n"
+			     "  geometry:  %s\n\n", names.keycodes,
+			     names.types, names.compat, names.symbols,
+			     names.geometry);
+			exit (1);
+		}
+	}
+
+	ctk_widget_grab_focus (cafekbd_keyboard_drawing);
+
+	ctk_main ();
+
+	return 0;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/7.html b/2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/7.html new file mode 100644 index 0000000..8122587 --- /dev/null +++ b/2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/7.html @@ -0,0 +1,358 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+
+#include "libxklavier/xklavier.h"
+#include "libcafekbd/cafekbd-status.h"
+
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include <cdk/cdk.h>
+#include <cdk/cdkx.h>
+#include <glib/gi18n.h>
+#include <ctk/ctk.h>
+
+#include "X11/XKBlib.h"
+
+int
+main (int argc, char **argv)
+{
+	CtkStatusIcon *icon;<--- Variable 'icon' can be declared as pointer to const
+
+	bindtextdomain (GETTEXT_PACKAGE, CAFELOCALEDIR);
+	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+	textdomain (GETTEXT_PACKAGE);
+
+	ctk_init (&argc, &argv);
+
+	icon = cafekbd_status_new ();
+
+        if (icon == NULL)
+	{
+		return 1;
+	}
+
+	ctk_main ();
+
+	return 0;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/commitmsg b/2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/commitmsg new file mode 100644 index 0000000..0d05158 --- /dev/null +++ b/2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/commitmsg @@ -0,0 +1 @@ +cafekbd-indicator: Fix [-Wstrict-prototypes] warnings diff --git a/2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/index.html b/2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/index.html new file mode 100644 index 0000000..1040930 --- /dev/null +++ b/2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/index.html @@ -0,0 +1,242 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LineIdCWESeverityMessage
checkersReportinformationActive checkers: There was critical errors (use --checkers-report=<filename> to see details)
libcafekbd/cafekbd-desktop-config.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
libcafekbd/cafekbd-indicator-config.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
libcafekbd/cafekbd-indicator.c
66unknownMacroerrorThere is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
libcafekbd/cafekbd-keyboard-config.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
67knownConditionTrueFalse571styleCondition '*l1' is always true
67knownConditionTrueFalse571styleCondition '*l2' is always true
226constVariablePointer398styleVariable 'delim' can be declared as pointer to const
227knownConditionTrueFalse571styleCondition 'option!=NULL' is always true
282knownConditionTrueFalse570styleCondition 'variant==NULL' is always false
609constParameterPointer398styleParameter 'kbd_config' can be declared as pointer to const
libcafekbd/cafekbd-keyboard-drawing.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
61constParameterPointer398styleParameter 'context' can be declared as pointer to const
67constParameterPointer398styleParameter 'context' can be declared as pointer to const
625constParameterPointer398styleParameter 'context' can be declared as pointer to const
1026constVariablePointer398styleVariable 'runp' can be declared as pointer to const
1036constVariablePointer398styleVariable 'geometry' can be declared as pointer to const
1202constParameterPointer398styleParameter 'outline' can be declared as pointer to const
1397constVariablePointer398styleVariable 'shape' can be declared as pointer to const
1786constParameterCallback398styleParameter 'drawing' can be declared as pointer to const. However it seems that 'button_press_event' is a callback function, if 'drawing' is declared with const you might also need to cast function pointer(s).
1823constParameterCallback398styleParameter 'event' can be declared as pointer to const. However it seems that 'focus_event' is a callback function, if 'event' is declared with const you might also need to cast function pointer(s).
1838constParameterCallback398styleParameter 'a' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'a' is declared with const you might also need to cast function pointer(s).
1839constParameterCallback398styleParameter 'b' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'b' is declared with const you might also need to cast function pointer(s).
1863constVariablePointer398styleVariable 'pind' can be declared as pointer to const
2124constParameterPointer398styleParameter 'iev' can be declared as pointer to const
libcafekbd/cafekbd-status.c
82unknownMacroerrorThere is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
test/cafekbd-keyboard-drawing-test.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
test/cafekbd-status-test.c
42constVariablePointer398styleVariable 'icon' can be declared as pointer to const
+
+ +
+ + diff --git a/2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/output_b1965751dcd5a6db17ae755139e63f860425ebf2 b/2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/output_b1965751dcd5a6db17ae755139e63f860425ebf2 new file mode 100644 index 0000000..5557817 --- /dev/null +++ b/2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/output_b1965751dcd5a6db17ae755139e63f860425ebf2 @@ -0,0 +1,1864 @@ +Checking libcafekbd/cafekbd-desktop-config.c ... +libcafekbd/cafekbd-desktop-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +1/10 files checked 4% done +Checking libcafekbd/cafekbd-indicator-config.c ... +libcafekbd/cafekbd-indicator-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +2/10 files checked 10% done +Checking libcafekbd/cafekbd-indicator.c ... +libcafekbd/cafekbd-indicator.c:66:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdIndicator, cafekbd_indicator, CTK_TYPE_NOTEBOOK) +^ +3/10 files checked 24% done +Checking libcafekbd/cafekbd-keyboard-config.c ... +libcafekbd/cafekbd-keyboard-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-config.c:67:8: style: Condition '*l1' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:67:15: style: Condition '*l2' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:227:16: style: Condition 'option!=NULL' is always true [knownConditionTrueFalse] + (option != NULL) ? strchr (option, ':') : NULL; + ^ +libcafekbd/cafekbd-keyboard-config.c:282:18: style: Condition 'variant==NULL' is always false [knownConditionTrueFalse] + (variant == + ^ +libcafekbd/cafekbd-keyboard-config.c:226:10: style: Variable 'delim' can be declared as pointer to const [constVariablePointer] + char *delim = + ^ +libcafekbd/cafekbd-keyboard-config.c:609:65: style: Parameter 'kbd_config' can be declared as pointer to const [constParameterPointer] +cafekbd_keyboard_config_options_is_set (CafekbdKeyboardConfig * kbd_config, + ^ +4/10 files checked 36% done +Checking libcafekbd/cafekbd-keyboard-drawing.c ... +libcafekbd/cafekbd-keyboard-drawing.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-drawing.c:61:60: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_coord (CafekbdKeyboardDrawingRenderContext * context, gint n) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:67:61: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_double (CafekbdKeyboardDrawingRenderContext * context, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:625:51: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +set_markup (CafekbdKeyboardDrawingRenderContext * context, gchar *txt) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1026:11: style: Variable 'runp' can be declared as pointer to const [constVariablePointer] + GSList *runp; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1036:25: style: Variable 'geometry' can be declared as pointer to const [constVariablePointer] + PangoGlyphGeometry *geometry; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1202:39: style: Parameter 'outline' can be declared as pointer to const [constParameterPointer] +calc_origin_offset_x (XkbOutlineRec * outline) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1397:15: style: Variable 'shape' can be declared as pointer to const [constVariablePointer] + XkbShapeRec *shape; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: style: Parameter 'drawing' can be declared as pointer to const. However it seems that 'button_press_event' is a callback function, if 'drawing' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2343:18: note: You might need to cast the function pointer here + G_CALLBACK (button_press_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: note: Parameter 'drawing' can be declared as pointer to const + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: style: Parameter 'event' can be declared as pointer to const. However it seems that 'focus_event' is a callback function, if 'event' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2347:18: note: You might need to cast the function pointer here + G_CALLBACK (focus_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: note: Parameter 'event' can be declared as pointer to const + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: style: Parameter 'a' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'a' is declared with const you might also need to cast function pointer(s). [constParameterCallback] +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: note: Parameter 'a' can be declared as pointer to const +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: style: Parameter 'b' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'b' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: note: Parameter 'b' can be declared as pointer to const + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1863:9: style: Variable 'pind' can be declared as pointer to const [constVariablePointer] + Atom *pind = drawing->xkb->names->indicators; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2124:60: style: Parameter 'iev' can be declared as pointer to const [constParameterPointer] +process_indicators_state_notify (XkbIndicatorNotifyEvent * iev, + ^ +Checking libcafekbd/cafekbd-keyboard-drawing.c: KBDRAW_DEBUG... +5/10 files checked 77% done +Checking libcafekbd/cafekbd-status.c ... +libcafekbd/cafekbd-status.c:82:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdStatus, cafekbd_status, CTK_TYPE_STATUS_ICON) +^ +6/10 files checked 91% done +Checking libcafekbd/cafekbd-util.c ... +7/10 files checked 93% done +Checking test/cafekbd-indicator-test.c ... +8/10 files checked 94% done +Checking test/cafekbd-keyboard-drawing-test.c ... +test/cafekbd-keyboard-drawing-test.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +Checking test/cafekbd-keyboard-drawing-test.c: HAVE_CONFIG_H... +9/10 files checked 99% done +Checking test/cafekbd-status-test.c ... +test/cafekbd-status-test.c:42:17: style: Variable 'icon' can be declared as pointer to const [constVariablePointer] + CtkStatusIcon *icon; + ^ +10/10 files checked 100% done +nofile:0:0: information: Active checkers: There was critical errors (use --checkers-report= to see details) [checkersReport] + +/usr/bin/cafe-autogen +checking for autoreconf >= 2.53... + testing autoreconf... found 2.72 +checking for pkg-config >= 0.14.0... + testing pkg-config... found 1.8.1 +checking for cafe-common >= 0.0.1... + testing cafe-doc-common... found 2.0.0 +Checking for required M4 macros... +Checking for forbidden M4 macros... +Processing ./configure.ac +Running cafe-doc-common... +Running autoreconf... +autoreconf: export WARNINGS=no-portability +autoreconf: Entering directory '.' +autoreconf: running: autopoint --force +Copying file ABOUT-NLS +Copying file config.rpath +Copying file m4/codeset.m4 +Copying file m4/extern-inline.m4 +Copying file m4/fcntl-o.m4 +Copying file m4/gettext.m4 +Copying file m4/glibc2.m4 +Copying file m4/glibc21.m4 +Copying file m4/iconv.m4 +Copying file m4/intdiv0.m4 +Copying file m4/intl.m4 +Copying file m4/intldir.m4 +Copying file m4/intlmacosx.m4 +Copying file m4/intmax.m4 +Copying file m4/inttypes-pri.m4 +Copying file m4/inttypes_h.m4 +Copying file m4/lcmessage.m4 +Copying file m4/lib-ld.m4 +Copying file m4/lib-link.m4 +Copying file m4/lib-prefix.m4 +Copying file m4/lock.m4 +Copying file m4/longlong.m4 +Copying file m4/nls.m4 +Copying file m4/po.m4 +Copying file m4/printf-posix.m4 +Copying file m4/progtest.m4 +Copying file m4/size_max.m4 +Copying file m4/stdint_h.m4 +Copying file m4/threadlib.m4 +Copying file m4/uintmax_t.m4 +Copying file m4/visibility.m4 +Copying file m4/wchar_t.m4 +Copying file m4/wint_t.m4 +Copying file m4/xsize.m4 +Copying file po/Makefile.in.in +Copying file po/Makevars.template +Copying file po/Rules-quot +Copying file po/boldquot.sed +Copying file po/en@boldquot.header +Copying file po/en@quot.header +Copying file po/insert-header.sin +Copying file po/quot.sed +Copying file po/remove-potcdate.sin +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: configure.ac: tracing +autoreconf: running: libtoolize --copy --force +libtoolize: putting auxiliary files in '.'. +libtoolize: copying file './ltmain.sh' +libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. +libtoolize: copying file 'm4/libtool.m4' +libtoolize: copying file 'm4/ltoptions.m4' +libtoolize: copying file 'm4/ltsugar.m4' +libtoolize: copying file 'm4/ltversion.m4' +libtoolize: copying file 'm4/lt~obsolete.m4' +autoreconf: configure.ac: not using Intltool +autoreconf: configure.ac: not using Gtkdoc +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: running: /usr/bin/autoconf --force +autoreconf: running: /usr/bin/autoheader --force +autoreconf: running: automake --add-missing --copy --force-missing +configure.ac:31: installing './compile' +configure.ac:34: installing './config.guess' +configure.ac:34: installing './config.sub' +configure.ac:16: installing './install-sh' +configure.ac:16: installing './missing' +Makefile.am: installing './INSTALL' +libcafekbd/Makefile.am: installing './depcomp' +autoreconf: Leaving directory '.' +Skipping configure process. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +checking for a BSD-compatible install... /usr/bin/install -c +checking whether build environment is sane... yes +checking for a race-free mkdir -p... /usr/bin/mkdir -p +checking for gawk... no +checking for mawk... mawk +checking whether make sets $(MAKE)... yes +checking whether make supports nested variables... yes +checking whether make supports nested variables... (cached) yes +checking whether make supports the include directive... yes (GNU style) +checking for gcc... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the C compiler works... yes +checking for C compiler default output file name... a.out +checking for suffix of executables... +checking whether we are cross compiling... no +checking for suffix of object files... o +checking whether the compiler supports GNU C... yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... rm: cannot remove 'conftest.plist': Is a directory +yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... gcc3 +checking whether C compiler accepts -Werror=unknown-warning-option... no +checking whether C compiler accepts -Wall... yes +checking whether C compiler accepts -Wmissing-prototypes... yes +checking whether C compiler accepts -Wbad-function-cast... yes +checking whether C compiler accepts -Wcast-align... yes +checking whether C compiler accepts -Wextra... yes +checking whether C compiler accepts -Wformat-nonliteral... yes +checking whether C compiler accepts -Wmissing-declarations... yes +checking whether C compiler accepts -Wnested-externs... yes +checking whether C compiler accepts -Wpointer-arith... yes +checking whether C compiler accepts -Wredundant-decls... yes +checking whether C compiler accepts -Wshadow... yes +checking whether C compiler accepts -Wstrict-prototypes... yes +checking whether C compiler accepts -Wunused-macros... yes +checking whether C compiler accepts -Werror=format-security... yes +checking whether C compiler accepts -fstrict-aliasing... yes +checking flags to pass to the C compiler /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing +checking for gcc... (cached) /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the compiler supports GNU C... (cached) yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... (cached) yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... (cached) none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... (cached) yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... (cached) gcc3 +checking build system type... x86_64-pc-linux-gnu +checking host system type... x86_64-pc-linux-gnu +checking how to print strings... printf +checking for a sed that does not truncate output... /usr/bin/sed +checking for grep that handles long lines and -e... /usr/bin/grep +checking for egrep... /usr/bin/grep -E +checking for fgrep... /usr/bin/grep -F +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld +checking if the linker (/usr/bin/ld) is GNU ld... yes +checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B +checking the name lister (/usr/bin/nm -B) interface... rm: cannot remove 'conftest.plist': Is a directory +BSD nm +checking whether ln -s works... yes +checking the maximum length of command line arguments... 3145728 +checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop +checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop +checking for /usr/bin/ld option to reload object files... -r +checking for file... file +checking for objdump... objdump +checking how to recognize dependent libraries... pass_all +checking for dlltool... no +checking how to associate runtime and link libraries... printf %s\n +checking for ranlib... ranlib +checking for ar... ar +checking for archiver @FILE support... rm: cannot remove 'conftest.plist': Is a directory +@ +checking for strip... strip +checking command to parse /usr/bin/nm -B output from /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer object... rm: cannot remove 'conftest.plist': Is a directory +ok +checking for sysroot... no +checking for a working dd... /usr/bin/dd +checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1 +checking for mt... no +checking if : is a manifest tool... no +checking for stdio.h... yes +checking for stdlib.h... yes +checking for string.h... yes +checking for inttypes.h... yes +checking for stdint.h... yes +checking for strings.h... yes +checking for sys/stat.h... yes +checking for sys/types.h... yes +checking for unistd.h... yes +checking for dlfcn.h... yes +checking for objdir... .libs +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -fno-rtti -fno-exceptions... no +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to produce PIC... -fPIC -DPIC +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer PIC flag -fPIC -DPIC works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer static flag -static works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... (cached) yes +checking whether the /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes +checking whether -lc should be explicitly linked in... no +checking dynamic linker characteristics... GNU/Linux ld.so +checking how to hardcode library paths into programs... immediate +checking whether stripping libraries is possible... yes +checking if libtool supports shared libraries... yes +checking whether to build shared libraries... yes +checking whether to build static libraries... yes +checking whether NLS is requested... yes +checking for msgfmt... /usr/bin/msgfmt +checking for gmsgfmt... /usr/bin/msgfmt +checking for xgettext... /usr/bin/xgettext +checking for msgmerge... /usr/bin/msgmerge +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld -m elf_x86_64 +checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes +checking for shared library run path origin... done +checking how to run the C preprocessor... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer -E +checking for egrep -e... (cached) /usr/bin/grep -E +checking for CFPreferencesCopyAppValue... no +checking for CFLocaleCopyCurrent... no +checking for GNU gettext in libc... yes +checking whether to use NLS... yes +checking where the gettext function comes from... libc +checking for glib-compile-resources... /usr/bin/glib-compile-resources +checking for xmllint... /usr/bin/xmllint +checking for setlocale... yes +checking for pkg-config... /usr/bin/pkg-config +checking pkg-config is at least version 0.9.0... yes +checking for glib-2.0 >= 2.50.0... yes +checking for gmodule-2.0... yes +checking for gio-2.0 >= 2.25.0... yes +checking for cdk-3.0 >= 3.22.0... yes +checking for ctk+-3.0 >= 3.22.0 cdk-x11-3.0 >= 3.22.0... yes +checking for libxklavier >= 5.2... yes +checking for X... libraries , headers +checking for gethostbyname... yes +checking for connect... yes +checking for remove... yes +checking for shmat... yes +checking for IceConnectionNumber in -lICE... yes +checking for pkg-config... (cached) /usr/bin/pkg-config +checking pkg-config is at least version 0.16... yes +checking for library containing sqrt... -lm +checking for gobject-introspection... yes +checking that generated files are newer than configure... done +configure: creating ./config.status +config.status: creating Makefile +config.status: creating libcafekbd.pc +config.status: creating libcafekbdui.pc +config.status: creating po/Makefile.in +config.status: creating libcafekbd/Makefile +config.status: creating libcafekbd/org.cafe.peripherals-keyboard-xkb.gschema.xml +config.status: creating test/Makefile +config.status: creating config.h +config.status: executing depfiles commands +config.status: executing libtool commands +config.status: executing po-directories commands +config.status: creating po/POTFILES +config.status: creating po/Makefile + +Configuration: + + prefix: /usr + exec_prefix: ${prefix} + libdir: ${exec_prefix}/lib + bindir: ${exec_prefix}/bin + sbindir: ${exec_prefix}/sbin + sysconfdir: ${prefix}/etc + datadir: ${datarootdir} + source code location: . + compiler: /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer + cflags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + Warning flags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + +scan-build: Analysis run complete. +scan-build: Removing directory '/tmp/scan-build-2025-02-06-115537-11799-1' because it contains no reports. +scan-build: No bugs found. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +make all-recursive +make[1]: Entering directory '/rootdir' +Making all in po +make[2]: Entering directory '/rootdir/po' +make libcafekbd.pot-update +make[3]: Entering directory '/rootdir/po' +sed -e '/^#/d' remove-potcdate.sin > t-remove-potcdate.sed +mv t-remove-potcdate.sed remove-potcdate.sed +package_gnu=""; \ +test -n "$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L .. -maxdepth 1 -type f \ + -size -10000000c -exec grep 'GNU libcafekbd' \ + /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU libcafekbd' ../* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ +}; \ +if test "$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ +else \ + package_prefix=''; \ +fi; \ +if test -n '' || test 'https://github.com/cafe-desktop/libcafekbd' = '@'PACKAGE_BUGREPORT'@'; then \ + msgid_bugs_address=''; \ +else \ + msgid_bugs_address='https://github.com/cafe-desktop/libcafekbd'; \ +fi; \ +case `/usr/bin/xgettext --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ + *) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --package-name="${package_prefix}libcafekbd" \ + --package-version='1.25.0' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ +esac +test ! -f libcafekbd.po || { \ + if test -f ./libcafekbd.pot-header; then \ + sed -e '1,/^#$/d' < libcafekbd.po > libcafekbd.1po && \ + cat ./libcafekbd.pot-header libcafekbd.1po > libcafekbd.po; \ + rm -f libcafekbd.1po; \ + fi; \ + if test -f ./libcafekbd.pot; then \ + sed -f remove-potcdate.sed < ./libcafekbd.pot > libcafekbd.1po && \ + sed -f remove-potcdate.sed < libcafekbd.po > libcafekbd.2po && \ + if cmp libcafekbd.1po libcafekbd.2po >/dev/null 2>&1; then \ + rm -f libcafekbd.1po libcafekbd.2po libcafekbd.po; \ + else \ + rm -f libcafekbd.1po libcafekbd.2po ./libcafekbd.pot && \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ + else \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ +} +make[3]: Leaving directory '/rootdir/po' +test ! -f ./libcafekbd.pot || \ + test -z "af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo" || make af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo +make[3]: Entering directory '/rootdir/po' +/usr/bin/msgmerge --update --quiet --lang=af af.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=am am.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=an an.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ar ar.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=as as.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ast ast.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=az az.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=be be.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn bn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bg bg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn_IN bn_IN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=br br.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bs bs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca ca.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cmn cmn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca@valencia ca@valencia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=crh crh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cs cs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cv cv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=csb csb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cy cy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=da da.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de de.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=dz dz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de_CH de_CH.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=el el.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_AU en_AU.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_CA en_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_GB en_GB.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eo eo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es es.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_419 es_419.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_AR es_AR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CL es_CL.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CO es_CO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CR es_CR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_EC es_EC.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_ES es_ES.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_DO es_DO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_MX es_MX.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_NI es_NI.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PA es_PA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PE es_PE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PR es_PR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_SV es_SV.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_US es_US.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_VE es_VE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_UY es_UY.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=et et.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eu eu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fa fa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fil fil.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fi fi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fo fo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr fr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr_CA fr_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=frp frp.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fur fur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fy fy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ga ga.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gd gd.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gl gl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gu gu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ha ha.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=he he.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hi hi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hu hu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hr hr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hy hy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=id id.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ie ie.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ia ia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ig ig.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=is is.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ja ja.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=it it.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=jv jv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ka ka.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kab kab.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kk kk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=km km.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kn kn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ko ko.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ks ks.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku_IQ ku_IQ.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku ku.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=la la.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ky ky.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=li li.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lb lb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lo lo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lt lt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lv lv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mai mai.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mg mg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mi mi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mk mk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ml ml.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mn mn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mr mr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ms ms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=my my.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nah nah.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nb nb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nds nds.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ne ne.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nl nl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nn nn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nso nso.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nqo nqo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=oc oc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=or or.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=om om.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pa pa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pl pl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ps ps.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt pt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pms pms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt_BR pt_BR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ru ru.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ro ro.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=rw rw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sc sc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=si si.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sco sco.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sk sk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sl sl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=so so.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr sr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sq sq.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr@latin sr@latin.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sv sv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sw sw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ta ta.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tg tg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=te te.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=th th.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tk tk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tl tl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ts ts.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tt tt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tr tr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ug ug.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uk uk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur ur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uz uz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur_PK ur_PK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=wa wa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=vi vi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=xh xh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yi yi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yo yo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_TW zh_TW.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_HK zh_HK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_CN zh_CN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zu zu.po libcafekbd.pot +rm -f af.gmo && /usr/bin/msgfmt -c --statistics --verbose -o af.gmo af.po +rm -f am.gmo && /usr/bin/msgfmt -c --statistics --verbose -o am.gmo am.po +af.po: 7 translated messages, 84 untranslated messages. +am.po: 54 translated messages, 37 untranslated messages. +rm -f an.gmo && /usr/bin/msgfmt -c --statistics --verbose -o an.gmo an.po +rm -f ar.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ar.gmo ar.po +rm -f ast.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ast.gmo ast.po +rm -f as.gmo && /usr/bin/msgfmt -c --statistics --verbose -o as.gmo as.po +rm -f az.gmo && /usr/bin/msgfmt -c --statistics --verbose -o az.gmo az.po +an.po:7: warning: header field 'Last-Translator' still has the initial default value +an.po: 0 translated messages, 91 untranslated messages. +ar.po: 50 translated messages, 41 untranslated messages. +ast.po: 47 translated messages, 44 untranslated messages. +az.po: 9 translated messages, 82 untranslated messages. +as.po: 41 translated messages, 50 untranslated messages. +rm -f be.gmo && /usr/bin/msgfmt -c --statistics --verbose -o be.gmo be.po +rm -f bg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bg.gmo bg.po +rm -f bn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn.gmo bn.po +rm -f bn_IN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn_IN.gmo bn_IN.po +bg.po: 54 translated messages, 37 untranslated messages. +be.po: 46 translated messages, 45 untranslated messages. +bn_IN.po: 41 translated messages, 50 untranslated messages. +bn.po: 43 translated messages, 48 untranslated messages. +rm -f bs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bs.gmo bs.po +rm -f ca.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca.gmo ca.po +rm -f br.gmo && /usr/bin/msgfmt -c --statistics --verbose -o br.gmo br.po +ca.po: bs.po: 25 translated messages, 66 untranslated messages. +87 translated messages, 4 untranslated messages. +br.po: 20 translated messages, 71 untranslated messages. +rm -f cmn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cmn.gmo cmn.po +rm -f ca@valencia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca@valencia.gmo ca@valencia.po +rm -f cs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cs.gmo cs.po +rm -f crh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o crh.gmo crh.po +rm -f csb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o csb.gmo csb.po +ca@valencia.po: 54 translated messages, 37 untranslated messages. +cmn.po: 46 translated messages, 45 untranslated messages. +csb.po:7: warning: header field 'Last-Translator' still has the initial default value +csb.po: 0 translated messages, 91 untranslated messages. +cs.po: 81 translated messages, 10 untranslated messages. +crh.po: 11 translated messages, 80 untranslated messages. +rm -f cv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cv.gmo cv.po +rm -f cy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cy.gmo cy.po +rm -f da.gmo && /usr/bin/msgfmt -c --statistics --verbose -o da.gmo da.po +rm -f de.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de.gmo de.po +rm -f de_CH.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de_CH.gmo de_CH.po +cv.po: 0 translated messages, 91 untranslated messages. +cy.po: 26 translated messages, 65 untranslated messages. +de_CH.po: 0 translated messages, 91 untranslated messages. +da.po: 91 translated messages. +de.po: 76 translated messages, 15 untranslated messages. +rm -f dz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o dz.gmo dz.po +rm -f el.gmo && /usr/bin/msgfmt -c --statistics --verbose -o el.gmo el.po +rm -f en_AU.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_AU.gmo en_AU.po +rm -f en_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_CA.gmo en_CA.po +rm -f en_GB.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_GB.gmo en_GB.po +el.po: 54 translated messages, 37 untranslated messages. +dz.po: 39 translated messages, 52 untranslated messages. +en_AU.po: 54 translated messages, 37 untranslated messages. +rm -f eo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eo.gmo eo.po +en_CA.po: 10 translated messages, 81 untranslated messages. +rm -f es.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es.gmo es.po +en_GB.po: 54 translated messages, 37 untranslated messages. +rm -f es_419.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_419.gmo es_419.po +es.po: 89 translated messages, 2 untranslated messages. +eo.po: 52 translated messages, 39 untranslated messages. +rm -f es_AR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_AR.gmo es_AR.po +es_419.po: 0 translated messages, 91 untranslated messages. +rm -f es_CL.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CL.gmo es_CL.po +rm -f es_CO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CO.gmo es_CO.po +es_AR.po: 21 translated messages, 70 untranslated messages. +rm -f es_DO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_DO.gmo es_DO.po +rm -f es_CR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CR.gmo es_CR.po +es_CL.po: 3 translated messages, 88 untranslated messages. +es_DO.po: 1 translated message, 90 untranslated messages. +es_CO.po: 49 translated messages, 42 untranslated messages. +rm -f es_EC.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_EC.gmo es_EC.po +rm -f es_ES.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_ES.gmo es_ES.po +es_CR.po: 1 translated message, 90 untranslated messages. +rm -f es_MX.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_MX.gmo es_MX.po +rm -f es_NI.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_NI.gmo es_NI.po +es_ES.po: 1 translated message, 90 untranslated messages. +es_EC.po: 1 translated message, 90 untranslated messages. +es_MX.po: 1 translated message, 90 untranslated messages. +rm -f es_PA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PA.gmo es_PA.po +rm -f es_PE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PE.gmo es_PE.po +es_NI.po: 1 translated message, 90 untranslated messages. +rm -f es_PR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PR.gmo es_PR.po +rm -f es_SV.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_SV.gmo es_SV.po +es_PE.po: 1 translated message, 90 untranslated messages. +es_PA.po: 1 translated message, 90 untranslated messages. +es_PR.po: 1 translated message, 90 untranslated messages. +rm -f es_US.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_US.gmo es_US.po +es_SV.po: 1 translated message, 90 untranslated messages. +rm -f es_UY.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_UY.gmo es_UY.po +es_US.po: 0 translated messages, 91 untranslated messages. +rm -f et.gmo && /usr/bin/msgfmt -c --statistics --verbose -o et.gmo et.po +rm -f es_VE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_VE.gmo es_VE.po +rm -f eu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eu.gmo eu.po +es_UY.po: 1 translated message, 90 untranslated messages. +et.po: 54 translated messages, 37 untranslated messages. +rm -f fa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fa.gmo fa.po +es_VE.po: 1 translated message, 90 untranslated messages. +eu.po: 54 translated messages, 37 untranslated messages. +rm -f fi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fi.gmo fi.po +fa.po: 11 translated messages, 80 untranslated messages. +rm -f fil.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fil.gmo fil.po +rm -f fr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr.gmo fr.po +rm -f fo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fo.gmo fo.po +fi.po: 48 translated messages, 43 untranslated messages. +rm -f fr_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr_CA.gmo fr_CA.po +fil.po: fo.po: 0 translated messages, 91 untranslated messages. +0 translated messages, 91 untranslated messages. +fr.po: 67 translated messages, 24 untranslated messages. +rm -f frp.gmo && /usr/bin/msgfmt -c --statistics --verbose -o frp.gmo frp.po +fr_CA.po: 3 translated messages, 88 untranslated messages. +rm -f fy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fy.gmo fy.po +rm -f fur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fur.gmo fur.po +rm -f ga.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ga.gmo ga.po +rm -f gd.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gd.gmo gd.po +frp.po: 7 translated messages, 84 untranslated messages. +fy.po: 4 translated messages, 87 untranslated messages. +fur.po: 4 translated messages, 87 untranslated messages. +gd.po: 0 translated messages, 91 untranslated messages. +ga.po: 41 translated messages, 50 untranslated messages. +rm -f gl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gl.gmo gl.po +rm -f gu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gu.gmo gu.po +rm -f ha.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ha.gmo ha.po +rm -f he.gmo && /usr/bin/msgfmt -c --statistics --verbose -o he.gmo he.po +rm -f hi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hi.gmo hi.po +gl.po: 89 translated messages, 2 untranslated messages. +ha.po: 5 translated messages, 86 untranslated messages. +gu.po: rm -f hr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hr.gmo hr.po +43 translated messages, 48 untranslated messages. +hi.po: 45 translated messages, 46 untranslated messages. +he.po: 54 translated messages, 37 untranslated messages. +rm -f hu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hu.gmo hu.po +rm -f hy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hy.gmo hy.po +hr.po: 54 translated messages, 37 untranslated messages. +rm -f id.gmo && /usr/bin/msgfmt -c --statistics --verbose -o id.gmo id.po +rm -f ia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ia.gmo ia.po +hy.po: 54 translated messages, 37 untranslated messages. +hu.po: 54 translated messages, 37 untranslated messages. +id.po: 91 translated messages. +rm -f ie.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ie.gmo ie.po +ia.po: 3 translated messages, 88 untranslated messages. +rm -f ig.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ig.gmo ig.po +rm -f is.gmo && /usr/bin/msgfmt -c --statistics --verbose -o is.gmo is.po +rm -f it.gmo && /usr/bin/msgfmt -c --statistics --verbose -o it.gmo it.po +ie.po: 45 translated messages, 46 untranslated messages. +ig.po: 5 translated messages, 86 untranslated messages. +rm -f ja.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ja.gmo ja.po +is.po: 12 translated messages, 79 untranslated messages. +it.po: 91 translated messages. +rm -f jv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o jv.gmo jv.po +rm -f kab.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kab.gmo kab.po +rm -f ka.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ka.gmo ka.po +ja.po: 54 translated messages, 37 untranslated messagesrm -f kk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kk.gmo kk.po +. +jv.po: 2 translated messages, 89 untranslated messages. +kab.po: 4 translated messages, 87 untranslated messages. +rm -f km.gmo && /usr/bin/msgfmt -c --statistics --verbose -o km.gmo km.po +kk.po: ka.po: 37 translated messages, 54 untranslated messages. +24 translated messages, 67 untranslated messages. +km.po:7: warning: header field 'Last-Translator' still has the initial default value +rm -f kn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kn.gmo kn.po +km.po: 0 translated messages, 91 untranslated messages. +rm -f ko.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ko.gmo ko.po +rm -f ks.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ks.gmo ks.po +rm -f ku.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku.gmo ku.po +kn.po: 43 translated messagesrm -f ku_IQ.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku_IQ.gmo ku_IQ.po +, 48 untranslated messages. +ko.po: 54 translated messages, 37 untranslated messages. +ks.po: 3 translated messages, 88 untranslated messages. +ku.po: 10 translated messages, 81 untranslated messages. +rm -f ky.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ky.gmo ky.po +ku_IQ.po: 16 translated messages, 75 untranslated messages. +rm -f lb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lb.gmo lb.po +rm -f la.gmo && /usr/bin/msgfmt -c --statistics --verbose -o la.gmo la.po +rm -f li.gmo && /usr/bin/msgfmt -c --statistics --verbose -o li.gmo li.po +ky.po: 26 translated messages, 65 untranslated messages. +rm -f lo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lo.gmo lo.po +lb.po:7: warning: header field 'Last-Translator' still has the initial default value +li.po:7: warning: header field 'Last-Translator' still has the initial default value +li.po: 0 translated messages, 91 untranslated messages. +lb.po: 0 translated messages, 91 untranslated messages. +rm -f lt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lt.gmo lt.po +la.po: 2 translated messages, 89 untranslated messages. +lo.po:7: warning: header field 'Last-Translator' still has the initial default value +lo.po: 0 translated messages, 91 untranslated messages. +rm -f lv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lv.gmo lv.po +rm -f mai.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mai.gmo mai.po +rm -f mg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mg.gmo mg.po +lt.po: 91 translated messages. +rm -f mi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mi.gmo mi.po +mai.po: 18 translated messages, 73 untranslated messages. +mg.po: 10 translated messages, 81 untranslated messages. +lv.po: 49 translated messages, 42 untranslated messages. +rm -f mk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mk.gmo mk.po +mi.po:7: warning: header field 'Last-Translator' still has the initial default value +rm -f ml.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ml.gmo ml.po +mi.po: 0 translated messages, 91 untranslated messages. +mk.po: 39 translated messages, 52 untranslated messages. +rm -f mr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mr.gmo mr.po +rm -f mn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mn.gmo mn.po +ml.po: 41 translated messages, 50 untranslated messages. +rm -f ms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ms.gmo ms.po +mn.po: 10 translated messages, 81 untranslated messages. +rm -f my.gmo && /usr/bin/msgfmt -c --statistics --verbose -o my.gmo my.po +mr.po: 47 translated messages, 44 untranslated messages. +rm -f nah.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nah.gmo nah.po +ms.po: 91 translated messages. +rm -f nb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nb.gmo nb.po +rm -f nds.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nds.gmo nds.po +my.po:7: warning: header field 'Last-Translator' still has the initial default value +my.po: 0 translated messages, 91 untranslated messages. +nah.po: 0 translated messages, 91 untranslated messages. +rm -f ne.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ne.gmo ne.po +nb.po: 91 translated messages. +rm -f nl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nl.gmo nl.po +nds.po: 12 translated messages, 79 untranslated messages. +rm -f nn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nn.gmo nn.po +ne.po: 13 translated messages, 78 untranslated messages. +rm -f nqo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nqo.gmo nqo.po +nl.po: 91 translated messages. +nn.po: 40 translated messages, 51 untranslated messages. +rm -f nso.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nso.gmo nso.po +rm -f oc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o oc.gmo oc.po +rm -f om.gmo && /usr/bin/msgfmt -c --statistics --verbose -o om.gmo om.po +nqo.po: 0 translated messages, 91 untranslated messagesnso.po: 3 translated messages, 88 untranslated messages. +. +rm -f or.gmo && /usr/bin/msgfmt -c --statistics --verbose -o or.gmo or.po +oc.po: 68 translated messages, 23 untranslated messages. +om.po: 0 translated messages, 91 untranslated messages. +rm -f pa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pa.gmo pa.po +rm -f pms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pms.gmo pms.po +or.po: 41 translated messages, 50 untranslated messages. +rm -f pl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pl.gmo pl.po +rm -f ps.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ps.gmo ps.po +rm -f pt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt.gmo pt.po +pa.po: 46 translated messages, 45 untranslated messages. +pl.po: 55 translated messages, 36 untranslated messages. +pms.po: 3 translated messages, 88 untranslated messages. +ps.po: 6 translated messages, 85 untranslated messages. +pt.po: 84 translated messages, 7 untranslated messages. +rm -f pt_BR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt_BR.gmo pt_BR.po +rm -f ro.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ro.gmo ro.po +rm -f ru.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ru.gmo ru.po +rm -f sc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sc.gmo sc.po +rm -f rw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o rw.gmo rw.po +ro.po: 54 translated messages, 37 untranslated messages. +pt_BR.po: 58 translated messages, 33 untranslated messages. +sc.po: 2 translated messages, 89 untranslated messages. +ru.po: 89 translated messages, 2 untranslated messages. +rw.po: 10 translated messages, 81 untranslated messages. +rm -f sco.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sco.gmo sco.po +rm -f si.gmo && /usr/bin/msgfmt -c --statistics --verbose -o si.gmo si.po +rm -f sk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sk.gmo sk.po +rm -f sl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sl.gmo sl.po +rm -f so.gmo && /usr/bin/msgfmt -c --statistics --verbose -o so.gmo so.po +sco.po: 0 translated messages, 91 untranslated messages. +so.po: 0 translated messages, 91 untranslated messages. +sl.po: 55 translated messages, 36 untranslated messages. +si.po: 36 translated messages, 55 untranslated messages. +rm -f sq.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sq.gmo sq.po +sk.po: 54 translated messages, 37 untranslated messages. +rm -f sr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr.gmo sr.po +rm -f sr@latin.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr@latin.gmo sr@latin.po +rm -f sv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sv.gmo sv.po +sq.po: 52 translated messages, 39 untranslated messages. +rm -f sw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sw.gmo sw.po +sv.po: 80 translated messages, 11 untranslated messages. +rm -f ta.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ta.gmo ta.po +sr.po: 91 translated messages. +sr@latin.po: 46 translated messages, 45 untranslated messages. +sw.po: 0 translated messages, 91 untranslated messages. +rm -f te.gmo && /usr/bin/msgfmt -c --statistics --verbose -o te.gmo te.po +rm -f th.gmo && /usr/bin/msgfmt -c --statistics --verbose -o th.gmo th.po +rm -f tg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tg.gmo tg.po +ta.po: 46 translated messages, 45 untranslated messages. +rm -f tk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tk.gmo tk.po +th.po: 45 translated messages, 46 untranslated messages. +te.po: 41 translated messages, 50 untranslated messages. +tg.po: 0 translated messages, 91 untranslated messages. +rm -f tl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tl.gmo tl.po +tk.po: 7 translated messages, 84 untranslated messages. +rm -f ts.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ts.gmo ts.po +rm -f tr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tr.gmo tr.po +rm -f tt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tt.gmo tt.po +tl.po: 0 translated messages, 91 untranslated messages. +ts.po: 0 translated messages, 91 untranslated messages. +tr.po: 58 translated messages, 33 untranslated messagestt.po:7: warning: header field 'Last-Translator' still has the initial default value +. +tt.po: 0 translated messages, 91 untranslated messages. +rm -f ug.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ug.gmo ug.po +rm -f uk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uk.gmo uk.po +rm -f ur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur.gmo ur.po +rm -f uz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uz.gmo uz.po +rm -f ur_PK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur_PK.gmo ur_PK.po +ug.po: 6 translated messages, 85 untranslated messages. +ur.po: 7 translated messages, 84 untranslated messages. +uk.po: 58 translated messages, 33 untranslated messages. +rm -f vi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o vi.gmo vi.po +uz.po: 26 translated messages, 65 untranslated messages. +ur_PK.po:7: warning: header field 'Last-Translator' still has the initial default value +ur_PK.po: 0 translated messages, 91 untranslated messages. +rm -f xh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o xh.gmo xh.po +rm -f wa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o wa.gmo wa.po +vi.po: rm -f yi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yi.gmo yi.po +52 translated messages, 39 untranslated messages. +xh.po: 8 translated messagesrm -f yo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yo.gmo yo.po +, 83 untranslated messages. +yi.po:7: warning: header field 'Last-Translator' still has the initial default value +yi.po: 0 translated messages, 91 untranslated messages. +wa.po: 9 translated messages, 82 untranslated messages. +rm -f zh_CN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_CN.gmo zh_CN.po +yo.po: 5 translated messages, 86 untranslated messages. +rm -f zh_HK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_HK.gmo zh_HK.po +rm -f zh_TW.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_TW.gmo zh_TW.po +zh_CN.po: 63 translated messages, 28 untranslated messages. +rm -f zu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zu.gmo zu.po +zh_HK.po: 47 translated messages, 44 untranslated messages. +zh_TW.po: 91 translated messages. +zu.po: 3 translated messages, 88 untranslated messages. +make[3]: Leaving directory '/rootdir/po' +touch stamp-po +make[2]: Leaving directory '/rootdir/po' +Making all in libcafekbd +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml + GEN cafekbd-indicator-marshal.h + GEN cafekbd-keyboard-drawing-marshal.h +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... +INFO: Reading ./cafekbd-indicator-marshal.list... + GEN cafekbd-indicator-marshal.c + GEN cafekbd-keyboard-drawing-marshal.c +INFO: Reading ./cafekbd-indicator-marshal.list... +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... +make all-am +make[3]: Entering directory '/rootdir/libcafekbd' + CC libcafekbd_la-cafekbd-desktop-config.lo + CC libcafekbd_la-cafekbd-keyboard-config.lo + CC libcafekbd_la-cafekbd-util.lo + CC libcafekbdui_la-cafekbd-indicator-config.lo + CC libcafekbdui_la-cafekbd-indicator.lo +cafekbd-desktop-config.c: In function 'cafekbd_desktop_config_load_from_gsettings': +cafekbd-desktop-config.c:176:38: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 176 | || config->default_group >= + | ^~ +cafekbd-indicator-config.c: In function 'cafekbd_indicator_config_get_images_file': +cafekbd-indicator-config.c:152:59: warning: comparison of integer expressions of different signedness: 'guint' {aka 'unsigned int'} and 'int' [-Wsign-compare] + 152 | (g_strv_length (kbd_config->layouts_variants) > group)) { + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_extract_layout_name': +cafekbd-indicator.c:293:19: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 293 | if (group < g_strv_length (short_group_names)) { + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_prepare_drawing': +cafekbd-indicator.c:418:31: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 418 | if (group + 1 == + | ^~ +cafekbd-indicator.c: In function 'cafekbd_indicator_update_tooltips': +cafekbd-indicator.c:446:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 446 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-indicator.c:450:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 450 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-indicator.c: In function 'cafekbd_indicator_kbd_cfg_callback': +cafekbd-indicator.c:61:44: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 61 | CafekbdIndicator * gki = (CafekbdIndicator*)cur->data; + | ^~~ +cafekbd-indicator.c:561:9: note: in expansion of macro 'ForAllIndicators' + 561 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-indicator.c:539:55: note: shadowed declaration is here + 539 | cafekbd_indicator_kbd_cfg_callback (CafekbdIndicator *gki G_GNUC_UNUSED) +cafekbd-indicator.c: In function 'cafekbd_indicator_start_listen': +cafekbd-indicator.c:647:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 647 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:650:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 650 | (CdkFilterFunc) + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_stop_listen': +cafekbd-indicator.c:663:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 663 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:667:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 667 | (CdkFilterFunc) cafekbd_indicator_filter_x_evt, NULL); + | ^ + CC libcafekbdui_la-cafekbd-status.lo +cafekbd-status.c: In function 'cafekbd_status_render_cairo': +cafekbd-status.c:214:23: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 214 | if (group + 1 == xkl_engine_get_num_groups (globals.engine)) { + | ^~ +cafekbd-status.c: In function 'cafekbd_status_prepare_drawing': +cafekbd-status.c:376:51: warning: cast between incompatible function types from 'void (*)(void *)' to 'void (*)(guchar *, void *)' {aka 'void (*)(unsigned char *, void *)'} [-Wcast-function-type] + 376 | (GdkPixbufDestroyNotify) + | ^ +cafekbd-status.c: In function 'cafekbd_status_update_tooltips': +cafekbd-status.c:395:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 395 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-status.c:399:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 399 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-status.c: In function 'cafekbd_status_kbd_cfg_callback': +cafekbd-status.c:77:41: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 77 | CafekbdStatus * gki = (CafekbdStatus*)cur->data; + | ^~~ +cafekbd-status.c:508:9: note: in expansion of macro 'ForAllIndicators' + 508 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-status.c:484:49: note: shadowed declaration is here + 484 | cafekbd_status_kbd_cfg_callback (CafekbdStatus *gki G_GNUC_UNUSED) +cafekbd-status.c: In function 'cafekbd_status_start_listen': +cafekbd-status.c:594:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 594 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:597:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 597 | (CdkFilterFunc) cafekbd_status_filter_x_evt, + | ^ +cafekbd-status.c: In function 'cafekbd_status_stop_listen': +cafekbd-status.c:610:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 610 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:614:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 614 | (CdkFilterFunc) cafekbd_status_filter_x_evt, NULL); + | ^ + CC libcafekbdui_la-cafekbd-indicator-marshal.lo +cafekbd-indicator-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ + CC libcafekbdui_la-cafekbd-keyboard-drawing-marshal.lo +cafekbd-keyboard-drawing-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + CC libcafekbdui_la-cafekbd-keyboard-drawing.lo +cafekbd-keyboard-drawing.c: In function 'draw_polygon': +cafekbd-keyboard-drawing.c:322:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 322 | for (i = 0; i < num_points; i++) { + | ^ +cafekbd-keyboard-drawing.c: In function 'process_indicators_state_notify': +cafekbd-keyboard-drawing.c:2131:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'long unsigned int' [-Wsign-compare] + 2131 | for (i = 0; i <= drawing->xkb->indicators->phys_indicators; i++) + | ^~ +cafekbd-keyboard-drawing.c: In function 'cafekbd_keyboard_drawing_get_type': +cafekbd-keyboard-drawing.c:2394:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawingClass *)' {aka 'void (*)(struct _CafekbdKeyboardDrawingClass *)'} to 'void (*)(void *, void *)' [-Wcast-function-type] + 2394 | (GClassInitFunc) cafekbd_keyboard_drawing_class_init, + | ^ +cafekbd-keyboard-drawing.c:2399:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawing *)' {aka 'void (*)(struct _CafekbdKeyboardDrawing *)'} to 'void (*)(GTypeInstance *, void *)' {aka 'void (*)(struct _GTypeInstance *, void *)'} [-Wcast-function-type] + 2399 | (GInstanceInitFunc) cafekbd_keyboard_drawing_init, + | ^ + GEN org.cafe.peripherals-keyboard-xkb.gschema.valid + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:114:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 114 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbd.la + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspect_nwrjnbg/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspect_nwrjnbg/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspect_nwrjnbg/Cafekbd-1.0.c:239:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 239 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspect_nwrjnbg/Cafekbd-1.0.c:246:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 246 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspect_nwrjnbg/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +5 warnings generated. + GICOMP Cafekbd-1.0.gir +make[3]: Leaving directory '/rootdir/libcafekbd' +make[2]: Leaving directory '/rootdir/libcafekbd' +Making all in test +make[2]: Entering directory '/rootdir/test' + CC cafekbd_indicator_test-cafekbd-indicator-test.o + CC cafekbd_keyboard_drawing_test-cafekbd-keyboard-drawing-test.o + CC cafekbd_status_test-cafekbd-status-test.o +cafekbd-keyboard-drawing-test.c:187:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 187 | g_print ("kbdraw %s\n", VERSION); + | ^~~~~~~ +cafekbd-keyboard-drawing-test.c:194:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 194 | g_printerr ("--groups: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:199:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 199 | g_printerr ("--levels: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:225:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 225 | cafekbd_keyboard_drawing_set_track_modifiers + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:228:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 228 | cafekbd_keyboard_drawing_set_track_config + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:248:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 248 | names.keycodes = keycodes; + | ^~~~~~~~ +cafekbd-keyboard-drawing-test.c:256:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 256 | names.geometry = geometry; + | ^~~~~~~~ +7 warnings generated. + CCLD cafekbd-keyboard-drawing-test + CCLD cafekbd-indicator-test + CCLD cafekbd-status-test +make[2]: Leaving directory '/rootdir/test' +make[2]: Entering directory '/rootdir' +make[2]: Leaving directory '/rootdir' +make[1]: Leaving directory '/rootdir' +scan-build: Analysis run complete. +scan-build: 11 bugs found. +scan-build: Run 'scan-view /rootdir/html-report/2025-02-06-115547-14435-1' to examine bug reports. +Making check in po +make[1]: Entering directory '/rootdir/po' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/po' +Making check in libcafekbd +make[1]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +make check-am +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:113:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 113 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspectv03xj95e/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectv03xj95e/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectv03xj95e/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +3 warnings generated. + GICOMP Cafekbd-1.0.gir +make[2]: Leaving directory '/rootdir/libcafekbd' +make[1]: Leaving directory '/rootdir/libcafekbd' +Making check in test +make[1]: Entering directory '/rootdir/test' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/test' +make[1]: Entering directory '/rootdir' +make[1]: Leaving directory '/rootdir' + Listing... 0% Listing... 0% Listing... 0% adduser/testing,now 3.137 all [installed,automatic] +advaita-icon-theme/unknown,now 3.25.0-1 all [installed,automatic] +apt/testing,now 2.9.26 amd64 [installed,automatic] +aptitude-common/testing,now 0.8.13-6.1 all [installed,automatic] +aptitude/testing,now 0.8.13-6.1 amd64 [installed] +at-spi2-common/testing,now 2.55.0.1-1 all [installed,automatic] +at-spi2-core/testing,now 2.55.0.1-1 amd64 [installed,automatic] +autoconf-archive/testing,now 20220903-3 all [installed] +autoconf/testing,now 2.72-3 all [installed,automatic] +automake/testing,now 1:1.16.5-1.3 all [installed,automatic] +autopoint/testing,now 0.23.1-1 all [installed] +autotools-dev/testing,now 20220109.1 all [installed,automatic] +base-files/testing,now 13.6 amd64 [installed,automatic] +base-passwd/testing,now 3.6.6 amd64 [installed,automatic] +bash/testing,now 5.2.37-1 amd64 [installed,automatic] +binfmt-support/testing,now 2.2.2-7 amd64 [installed,automatic] +binutils-common/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils-gold-x86-64-linux-gnu/testing,now 2.44-1 amd64 [installed,automatic] +binutils-gold/testing,now 2.44-1 amd64 [installed,automatic] +binutils-x86-64-linux-gnu/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +bsdutils/testing,now 1:2.40.4-2 amd64 [installed,automatic] +build-essential/testing,now 12.12 amd64 [installed,automatic] +bzip2-doc/testing,now 1.0.8-6 all [installed,automatic] +bzip2/testing,now 1.0.8-6 amd64 [installed,automatic] +ca-certificates/testing,now 20241223 all [installed,automatic] +clang-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools/testing,now 1:19.0-63 amd64 [installed] +clang/testing,now 1:19.0-63 amd64 [installed] +coreutils/testing,now 9.5-1+b1 amd64 [installed,automatic] +cpp-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-14/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cpp/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cppcheck/testing,now 2.16.0-1 amd64 [installed] +ctk-update-icon-cache/unknown,now 3.25.6-1 amd64 [installed,automatic] +dash/testing,now 0.5.12-12 amd64 [installed,automatic] +dbus-bin/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-daemon/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-session-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-system-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-user-session/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus/testing,now 1.16.0-1 amd64 [installed,automatic] +dconf-gsettings-backend/testing,now 0.40.0-5 amd64 [installed,automatic] +dconf-service/testing,now 0.40.0-5 amd64 [installed,automatic] +debconf/testing,now 1.5.89 all [installed,automatic] +debian-archive-keyring/testing,now 2023.4 all [installed,automatic] +debianutils/testing,now 5.21 amd64 [installed,automatic] +diffutils/testing,now 1:3.10-2 amd64 [installed,automatic] +dirmngr/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +dmsetup/testing,now 2:1.02.201-1 amd64 [installed,automatic] +dpkg-dev/testing,now 1.22.14 all [installed,automatic] +dpkg/testing,now 1.22.14 amd64 [installed,automatic] +e2fsprogs/testing,now 1.47.2-1 amd64 [installed,automatic] +expect/testing,now 5.45.4-3+b1 amd64 [installed] +fakeroot/testing,now 1.37-1 amd64 [installed,automatic] +file/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +findutils/testing,now 4.10.0-3 amd64 [installed,automatic] +fontconfig-config/testing,now 2.15.0-2 amd64 [installed,automatic] +fontconfig/testing,now 2.15.0-2 amd64 [installed,automatic] +fonts-dejavu-core/testing,now 2.37-8 all [installed,automatic] +fonts-dejavu-mono/testing,now 2.37-8 all [installed,automatic] +g++-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-14/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +g++/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc-14-base/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gettext-base/testing,now 0.23.1-1 amd64 [installed,automatic] +gettext/testing,now 0.23.1-1 amd64 [installed] +gir1.2-atk-1.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-atspi-2.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-ctk-3.0/unknown,now 3.25.6-1 amd64 [installed] +gir1.2-freedesktop-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-freedesktop/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-gdkpixbuf-2.0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +gir1.2-girepository-2.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-girepository-2.0/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-glib-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-glib-2.0/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-harfbuzz-0.0/testing,now 10.2.0-1 amd64 [installed,automatic] +gir1.2-pango-1.0/testing,now 1.56.1-1 amd64 [installed,automatic] +gir1.2-xkl-1.0/testing,now 5.4-5+b2 amd64 [installed,automatic] +girepository-tools/testing,now 2.82.4-2 amd64 [installed,automatic] +git-man/testing,now 1:2.47.2-0.1 all [installed,automatic] +git/testing,now 1:2.47.2-0.1 amd64 [installed] +gnupg-l10n/testing,now 2.2.46-1 all [installed,automatic] +gnupg-utils/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gnupg/testing,now 2.2.46-1 all [installed,automatic] +gobject-introspection-bin/testing,now 1.82.0-4 amd64 [installed,automatic] +gobject-introspection/testing,now 1.82.0-4 amd64 [installed] +gpg-agent/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg-wks-client/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgconf/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgsm/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgv/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +grep/testing,now 3.11-4 amd64 [installed,automatic] +gsettings-desktop-schemas/testing,now 47.1-1 all [installed,automatic] +gzip/testing,now 1.13-1 amd64 [installed,automatic] +hicolor-icon-theme/testing,now 0.18-2 all [installed,automatic] +hostname/testing,now 3.25 amd64 [installed,automatic] +icu-devtools/testing,now 72.1-6 amd64 [installed,automatic] +init-system-helpers/testing,now 1.68 all [installed,automatic] +krb5-locales/testing,now 1.21.3-4 all [installed,automatic] +less/testing,now 643-1 amd64 [installed,automatic] +lib32gcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +lib32stdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libacl1/testing,now 2.3.2-2+b1 amd64 [installed,automatic] +libalgorithm-diff-perl/testing,now 1.201-1 all [installed,automatic] +libalgorithm-diff-xs-perl/testing,now 0.04-8+b4 amd64 [installed,automatic] +libalgorithm-merge-perl/testing,now 0.08-5 all [installed,automatic] +libapparmor1/testing,now 3.1.7-1+b3 amd64 [installed,automatic] +libapt-pkg6.0t64/testing,now 2.9.26 amd64 [installed,automatic] +libasan8/testing,now 14.2.0-12 amd64 [installed,automatic] +libassuan9/testing,now 3.0.1-2 amd64 [installed,automatic] +libatk-bridge2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk-bridge2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatomic1/testing,now 14.2.0-12 amd64 [installed,automatic] +libatspi2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatspi2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libattr1/testing,now 1:2.5.2-2 amd64 [installed,automatic] +libaudit-common/testing,now 1:4.0.2-2 all [installed,automatic] +libaudit1/testing,now 1:4.0.2-2+b1 amd64 [installed,automatic] +libavahi-client3/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common-data/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common3/testing,now 0.8-16 amd64 [installed,automatic] +libbinutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libblkid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libblkid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libboost-iostreams1.83.0/testing,now 1.83.0-4 amd64 [installed,automatic] +libbrotli-dev/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbrotli1/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbsd0/testing,now 0.12.2-2 amd64 [installed,automatic] +libbz2-1.0/testing,now 1.0.8-6 amd64 [installed,automatic] +libbz2-dev/testing,now 1.0.8-6 amd64 [installed,automatic] +libc-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc-dev-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc6-dev/testing,now 2.40-6 amd64 [installed,automatic] +libc6-i386/testing,now 2.40-6 amd64 [installed,automatic] +libc6/testing,now 2.40-6 amd64 [installed,automatic] +libcairo-gobject2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo-script-interpreter2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2-dev/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcap-dev/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcap-ng0/testing,now 0.8.5-4 amd64 [installed,automatic] +libcap2/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcbor0.10/testing,now 0.10.2-2 amd64 [installed,automatic] +libcc1-0/testing,now 14.2.0-12 amd64 [installed,automatic] +libclang-common-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-cpp19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-rt-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang1-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libcolord2/testing,now 1.4.7-1+b2 amd64 [installed,automatic] +libcom-err2/testing,now 1.47.2-1 amd64 [installed,automatic] +libcrypt-dev/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcrypt1/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcryptsetup12/testing,now 2:2.7.5-1 amd64 [installed,automatic] +libctf-nobfd0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctf0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctk-3-0/unknown,now 3.25.6-1 amd64 [installed] +libctk-3-bin/unknown,now 3.25.6-1 amd64 [installed,automatic] +libctk-3-common/unknown,now 3.25.6-1 all [installed] +libctk-3-dev/unknown,now 3.25.6-1 amd64 [installed] +libcups2t64/testing,now 2.4.10-2+b1 amd64 [installed,automatic] +libcurl3t64-gnutls/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcurl4t64/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcwidget4/testing,now 0.5.18-6+b2 amd64 [installed,automatic] +libdatrie-dev/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdatrie1/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdav1d7/testing,now 1.5.1-1 amd64 [installed,automatic] +libdb5.3t64/testing,now 5.3.28+dfsg2-9 amd64 [installed,automatic] +libdbus-1-3/testing,now 1.16.0-1 amd64 [installed,automatic] +libdbus-1-dev/testing,now 1.16.0-1 amd64 [installed,automatic] +libdconf1/testing,now 0.40.0-5 amd64 [installed,automatic] +libdebconfclient0/testing,now 0.277 amd64 [installed,automatic] +libdeflate-dev/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdeflate0/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdevmapper1.02.1/testing,now 2:1.02.201-1 amd64 [installed,automatic] +libdpkg-perl/testing,now 1.22.14 all [installed,automatic] +libdrm-amdgpu1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-common/testing,now 2.4.123-1 all [installed,automatic] +libdrm-intel1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-radeon1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm2/testing,now 2.4.123-1 amd64 [installed,automatic] +libedit2/testing,now 3.1-20250104-1 amd64 [installed,automatic] +libegl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libegl-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1-mesa-dev/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libelf1t64/testing,now 0.192-4 amd64 [installed,automatic] +libepoxy-dev/testing,now 1.5.10-2 amd64 [installed,automatic] +libepoxy0/testing,now 1.5.10-2 amd64 [installed,automatic] +liberror-perl/testing,now 0.17029-2 all [installed,automatic] +libexpat1-dev/testing,now 2.6.4-1 amd64 [installed,automatic] +libexpat1/testing,now 2.6.4-1 amd64 [installed,automatic] +libext2fs2t64/testing,now 1.47.2-1 amd64 [installed,automatic] +libfakeroot/testing,now 1.37-1 amd64 [installed,automatic] +libffi-dev/testing,now 3.4.6-1 amd64 [installed,automatic] +libffi8/testing,now 3.4.6-1 amd64 [installed,automatic] +libfido2-1/testing,now 1.15.0-1+b1 amd64 [installed,automatic] +libfile-fcntllock-perl/testing,now 0.22-4+b4 amd64 [installed,automatic] +libfontconfig-dev/testing,now 2.15.0-2 amd64 [installed,automatic] +libfontconfig1/testing,now 2.15.0-2 amd64 [installed,automatic] +libfreetype-dev/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfreetype6/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfribidi-dev/testing,now 1.0.16-1 amd64 [installed,automatic] +libfribidi0/testing,now 1.0.16-1 amd64 [installed,automatic] +libgbm1/testing,now 24.2.8-1 amd64 [installed,automatic] +libgc1/testing,now 1:8.2.8-1 amd64 [installed,automatic] +libgcc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcrypt20/testing,now 1.11.0-7 amd64 [installed,automatic] +libgdbm-compat4t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdbm6t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-dev/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-bin/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-common/testing,now 2.42.12+dfsg-2 all [installed,automatic] +libgio-2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libgio-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository-1.0-1/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-1.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-2.0-0/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository1.0-dev/testing,now 1.82.0-4 amd64 [installed] +libgl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgl1-mesa-dri/testing,now 24.2.8-1 amd64 [installed,automatic] +libgl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglapi-mesa/testing,now 24.2.8-1 amd64 [installed,automatic] +libgles-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles2/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglib2.0-0t64/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-data/testing,now 2.82.4-2 all [installed,automatic] +libglib2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-dev/testing,now 2.82.4-2 amd64 [installed] +libglvnd-core-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libglx0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgmp10/testing,now 2:6.3.0+dfsg-3 amd64 [installed,automatic] +libgnutls30t64/testing,now 3.8.8-2 amd64 [installed,automatic] +libgomp1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgpg-error-l10n/testing,now 1.51-3 all [installed,automatic] +libgpg-error0/testing,now 1.51-3 amd64 [installed,automatic] +libgpm2/testing,now 1.20.7-11+b2 amd64 [installed,automatic] +libgprofng0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libgraphite2-3/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgraphite2-dev/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgssapi-krb5-2/testing,now 1.21.3-4 amd64 [installed,automatic] +libharfbuzz-cairo0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-dev/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-gobject0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-icu0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-subset0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz0b/testing,now 10.2.0-1 amd64 [installed,automatic] +libhogweed6t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libhwasan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libice-dev/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libice6/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libicu-dev/testing,now 72.1-6 amd64 [installed,automatic] +libicu72/testing,now 72.1-6 amd64 [installed,automatic] +libidn2-0/testing,now 2.3.7-2+b1 amd64 [installed,automatic] +libisl23/testing,now 0.27-1 amd64 [installed,automatic] +libitm1/testing,now 14.2.0-12 amd64 [installed,automatic] +libjansson4/testing,now 2.14-2+b3 amd64 [installed,automatic] +libjbig-dev/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjbig0/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjpeg-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjson-c5/testing,now 0.18+ds-1 amd64 [installed,automatic] +libk5crypto3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkeyutils1/testing,now 1.6.3-4 amd64 [installed,automatic] +libkmod2/testing,now 33+20240816-2 amd64 [installed,automatic] +libkrb5-3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkrb5support0/testing,now 1.21.3-4 amd64 [installed,automatic] +libksba8/testing,now 1.6.7-2+b1 amd64 [installed,automatic] +liblcms2-2/testing,now 2.16-2 amd64 [installed,automatic] +libldap-common/testing,now 2.6.9+dfsg-1 all [installed,automatic] +libldap2/testing,now 2.6.9+dfsg-1 amd64 [installed,automatic] +liblerc-dev/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +liblerc4/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +libllvm19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +liblocale-gettext-perl/testing,now 1.07-7+b1 amd64 [installed,automatic] +liblsan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libltdl-dev/testing,now 2.5.4-2 amd64 [installed,automatic] +libltdl7/testing,now 2.5.4-2 amd64 [installed,automatic] +liblz4-1/testing,now 1.10.0-3 amd64 [installed,automatic] +liblzma-dev/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzma5/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzo2-2/testing,now 2.10-3+b1 amd64 [installed,automatic] +libmagic-mgc/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmagic1t64/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmd0/testing,now 1.1.0-2+b1 amd64 [installed,automatic] +libmount-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libmount1/testing,now 2.40.4-2 amd64 [installed,automatic] +libmpc3/testing,now 1.3.1-1+b3 amd64 [installed,automatic] +libmpfr6/testing,now 4.2.1-1+b2 amd64 [installed,automatic] +libncurses-dev/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncurses6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncursesw6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libnettle8t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libnghttp2-14/testing,now 1.64.0-1 amd64 [installed,automatic] +libnghttp3-9/testing,now 1.6.0-2 amd64 [installed,automatic] +libngtcp2-16/testing,now 1.9.1-1 amd64 [installed,automatic] +libngtcp2-crypto-gnutls8/testing,now 1.9.1-1 amd64 [installed,automatic] +libnpth0t64/testing,now 1.8-2 amd64 [installed,automatic] +libnss-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libobjc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libobjc4/testing,now 14.2.0-12 amd64 [installed,automatic] +libopengl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libopengl0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libp11-kit0/testing,now 0.25.5-3 amd64 [installed,automatic] +libpam-modules-bin/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-modules/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-runtime/testing,now 1.7.0-2 all [installed,automatic] +libpam-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libpam0g/testing,now 1.7.0-2 amd64 [installed,automatic] +libpango-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpango1.0-dev/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangocairo-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoft2-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoxft-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpciaccess0/testing,now 0.17-3+b3 amd64 [installed,automatic] +libpcre2-16-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-32-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-8-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-dev/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-posix3/testing,now 10.44-5 amd64 [installed,automatic] +libperl5.40/testing,now 5.40.0-8 amd64 [installed,automatic] +libpfm4/testing,now 4.13.0+git83-g91970fe-1 amd64 [installed,automatic] +libpipeline1/testing,now 1.5.8-1 amd64 [installed,automatic] +libpixman-1-0/testing,now 0.44.0-3 amd64 [installed,automatic] +libpixman-1-dev/testing,now 0.44.0-3 amd64 [installed,automatic] +libpkgconf3/testing,now 1.8.1-4 amd64 [installed,automatic] +libpng-dev/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng-tools/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng16-16t64/testing,now 1.6.44-3 amd64 [installed,automatic] +libproc2-0/testing,now 2:4.0.4-7 amd64 [installed,automatic] +libpsl5t64/testing,now 0.21.2-1.1+b1 amd64 [installed,automatic] +libpython3-stdlib/testing,now 3.13.1-2 amd64 [installed,automatic] +libpython3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libpython3.13-stdlib/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libquadmath0/testing,now 14.2.0-12 amd64 [installed,automatic] +libreadline8t64/testing,now 8.2-6 amd64 [installed,automatic] +librsvg2-2/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librsvg2-common/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librtmp1/testing,now 2.4+20151223.gitfa8646d.1-2+b5 amd64 [installed,automatic] +libsasl2-2/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules-db/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libseccomp2/testing,now 2.5.5-2 amd64 [installed,automatic] +libselinux1-dev/testing,now 3.7-3.1 amd64 [installed,automatic] +libselinux1/testing,now 3.7-3.1 amd64 [installed,automatic] +libsemanage-common/testing,now 3.7-2.1 all [installed,automatic] +libsemanage2/testing,now 3.7-2.1 amd64 [installed,automatic] +libsensors-config/testing,now 1:3.6.0-10 all [installed,automatic] +libsensors5/testing,now 1:3.6.0-10+b1 amd64 [installed,automatic] +libsepol-dev/testing,now 3.7-1 amd64 [installed,automatic] +libsepol2/testing,now 3.7-1 amd64 [installed,automatic] +libsframe1/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libsharpyuv-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsharpyuv0/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsigc++-2.0-0v5/testing,now 2.12.1-3 amd64 [installed,automatic] +libsm-dev/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsm6/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsmartcols1/testing,now 2.40.4-2 amd64 [installed,automatic] +libsqlite3-0/testing,now 3.46.1-1 amd64 [installed,automatic] +libss2/testing,now 1.47.2-1 amd64 [installed,automatic] +libssh2-1t64/testing,now 1.11.1-1 amd64 [installed,automatic] +libssl3t64/testing,now 3.4.0-2 amd64 [installed,automatic] +libstdc++-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libstdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libsysprof-capture-4-dev/testing,now 47.2-1 amd64 [installed,automatic] +libsystemd-dev/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd-shared/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd0/testing,now 257.2-3 amd64 [installed,automatic] +libtasn1-6/testing,now 4.19.0-3+b3 amd64 [installed,automatic] +libtcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +libthai-data/testing,now 0.1.29-2 all [installed,automatic] +libthai-dev/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libthai0/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libtiff-dev/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiff6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiffxx6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtinfo6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libtinyxml2-10/testing,now 10.0.0+dfsg-2+b2 amd64 [installed,automatic] +libtool/testing,now 2.5.4-2 all [installed] +libtsan2/testing,now 14.2.0-12 amd64 [installed,automatic] +libubsan1/testing,now 14.2.0-12 amd64 [installed,automatic] +libudev1/testing,now 257.2-3 amd64 [installed,automatic] +libunistring5/testing,now 1.3-1 amd64 [installed,automatic] +libuuid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libvulkan1/testing,now 1.4.304.0-1 amd64 [installed,automatic] +libwayland-bin/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-client0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-cursor0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-dev/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-egl1/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-server0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwebp-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebp7/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdecoder3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdemux2/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpmux3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libx11-6/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-data/testing,now 2:1.8.10-2 all [installed,automatic] +libx11-dev/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-xcb1/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libxapian30/testing,now 1.4.25-2 amd64 [installed,automatic] +libxau-dev/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxau6/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxaw7/testing,now 2:1.0.16-1 amd64 [installed,automatic] +libxcb-dri2-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-dri3-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-glx0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-present0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-randr0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-sync1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-xfixes0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcomposite-dev/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcomposite1/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcursor-dev/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxcursor1/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxdamage-dev/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdamage1/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdmcp-dev/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxdmcp6/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxext-dev/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxext6/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxfixes-dev/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxfixes3/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxft-dev/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxft2/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxi-dev/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxi6/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxinerama-dev/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxinerama1/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxkbcommon-dev/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbcommon0/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbfile1/testing,now 1:1.1.0-1+b4 amd64 [installed,automatic] +libxklavier-dev/testing,now 5.4-5+b2 amd64 [installed] +libxklavier16/testing,now 5.4-5+b2 amd64 [installed,automatic] +libxml2-dev/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxml2-utils/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed] +libxml2/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxmu6/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxmuu1/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxpm4/testing,now 1:3.5.17-1+b3 amd64 [installed,automatic] +libxrandr-dev/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrandr2/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrender-dev/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxrender1/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxshmfence1/testing,now 1.3-1+b3 amd64 [installed,automatic] +libxt6t64/testing,now 1:1.2.1-1.2+b2 amd64 [installed,automatic] +libxtst-dev/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxtst6/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxxf86vm1/testing,now 1:1.1.4-1+b4 amd64 [installed,automatic] +libxxhash0/testing,now 0.8.2-2+b2 amd64 [installed,automatic] +libyaml-0-2/testing,now 0.2.5-2 amd64 [installed,automatic] +libz3-4/testing,now 4.13.3-1 amd64 [installed,automatic] +libz3-dev/testing,now 4.13.3-1 amd64 [installed,automatic] +libzstd-dev/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +libzstd1/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +linux-libc-dev/testing,now 6.12.11-1 all [installed,automatic] +linux-sysctl-defaults/testing,now 4.11 all [installed,automatic] +llvm-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-linker-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-runtime/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +login.defs/testing,now 1:4.16.0-7 all [installed,automatic] +login/testing,now 1:4.16.0-2+really2.40.4-2 amd64 [installed,automatic] +logsave/testing,now 1.47.2-1 amd64 [installed,automatic] +m4/testing,now 1.4.19-5 amd64 [installed,automatic] +make/testing,now 4.4.1-1 amd64 [installed] +manpages-dev/testing,now 6.9.1-1 all [installed,automatic] +manpages/testing,now 6.9.1-1 all [installed,automatic] +mawk/testing,now 1.3.4.20240905-1 amd64 [installed,automatic] +media-types/testing,now 10.1.0 all [installed,automatic] +mesa-libgallium/testing,now 24.2.8-1 amd64 [installed,automatic] +mesa-vulkan-drivers/testing,now 24.2.8-1 amd64 [installed,automatic] +mount/testing,now 2.40.4-2 amd64 [installed,automatic] +native-architecture/testing,now 0.2.5 all [installed,automatic] +ncurses-base/testing,now 6.5-2 all [installed,automatic] +ncurses-bin/testing,now 6.5-2+b1 amd64 [installed,automatic] +netbase/testing,now 6.4 all [installed,automatic] +openssh-client/testing,now 1:9.9p1-3 amd64 [installed,automatic] +openssl-provider-legacy/testing,now 3.4.0-2 amd64 [installed,automatic] +openssl/testing,now 3.4.0-2 amd64 [installed,automatic] +pango1.0-tools/testing,now 1.56.1-1 amd64 [installed,automatic] +passwd/testing,now 1:4.16.0-7 amd64 [installed,automatic] +patch/testing,now 2.7.6-7 amd64 [installed,automatic] +perl-base/testing,now 5.40.0-8 amd64 [installed,automatic] +perl-modules-5.40/testing,now 5.40.0-8 all [installed,automatic] +perl/testing,now 5.40.0-8 amd64 [installed,automatic] +pinentry-curses/testing,now 1.3.1-2 amd64 [installed,automatic] +pkgconf-bin/testing,now 1.8.1-4 amd64 [installed,automatic] +pkgconf/testing,now 1.8.1-4 amd64 [installed,automatic] +procps/testing,now 2:4.0.4-7 amd64 [installed,automatic] +psmisc/testing,now 23.7-1 amd64 [installed,automatic] +publicsuffix/testing,now 20250108.1153-0.1 all [installed,automatic] +python3-autocommand/testing,now 2.2.2-3 all [installed,automatic] +python3-inflect/testing,now 7.3.1-2 all [installed,automatic] +python3-jaraco.context/testing,now 6.0.0-1 all [installed,automatic] +python3-jaraco.functools/testing,now 4.1.0-1 all [installed,automatic] +python3-jaraco.text/testing,now 4.0.0-1 all [installed,automatic] +python3-mako/testing,now 1.3.8-2 all [installed,automatic] +python3-markdown/testing,now 3.7-2 all [installed,automatic] +python3-markupsafe/testing,now 2.1.5-1+b2 amd64 [installed,automatic] +python3-minimal/testing,now 3.13.1-2 amd64 [installed,automatic] +python3-more-itertools/testing,now 10.6.0-1 all [installed,automatic] +python3-packaging/testing,now 24.2-1 all [installed,automatic] +python3-pkg-resources/testing,now 75.6.0-1 all [installed,automatic] +python3-pygments/testing,now 2.18.0+dfsg-2 all [installed,automatic] +python3-setuptools/testing,now 75.6.0-1 all [installed,automatic] +python3-typeguard/testing,now 4.4.1-1 all [installed,automatic] +python3-typing-extensions/testing,now 4.12.2-2 all [installed,automatic] +python3-yaml/testing,now 6.0.2-1+b1 amd64 [installed,automatic] +python3-zipp/testing,now 3.21.0-1 all [installed,automatic] +python3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3.13/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3/testing,now 3.13.1-2 amd64 [installed,automatic] +readline-common/testing,now 8.2-6 all [installed,automatic] +rpcsvc-proto/testing,now 1.4.3-1 amd64 [installed,automatic] +sed/testing,now 4.9-2 amd64 [installed,automatic] +sensible-utils/testing,now 0.0.24 all [installed,automatic] +sgml-base/testing,now 1.31 all [installed,automatic] +shared-mime-info/testing,now 2.4-5+b2 amd64 [installed,automatic] +sqv/testing,now 1.2.1-5 amd64 [installed,automatic] +systemd-cryptsetup/testing,now 257.2-3 amd64 [installed,automatic] +systemd-sysv/testing,now 257.2-3 amd64 [installed,automatic] +systemd-timesyncd/testing,now 257.2-3 amd64 [installed,automatic] +systemd/testing,now 257.2-3 amd64 [installed,automatic] +sysvinit-utils/testing,now 3.13-1 amd64 [installed,automatic] +tar/testing,now 1.35+dfsg-3.1 amd64 [installed,automatic] +tcl-expect/testing,now 5.45.4-3+b1 amd64 [installed,automatic] +tcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +tzdata/testing,now 2024b-6 all [installed,automatic] +util-linux/testing,now 2.40.4-2 amd64 [installed,automatic] +uuid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +wayland-protocols/testing,now 1.39-1 all [installed,automatic] +wget/testing,now 1.24.5-2+b1 amd64 [installed] +x11-common/testing,now 1:7.7+24 all [installed,automatic] +x11-xkb-utils/testing,now 7.7+9 amd64 [installed,automatic] +x11proto-dev/testing,now 2024.1-1 all [installed,automatic] +xauth/testing,now 1:1.1.2-1.1 amd64 [installed,automatic] +xdg-user-dirs/testing,now 0.18-2 amd64 [installed,automatic] +xkb-data/testing,now 2.42-1 all [installed,automatic] +xml-core/testing,now 0.19 all [installed,automatic] +xorg-sgml-doctools/testing,now 1:1.11-1.1 all [installed,automatic] +xtrans-dev/testing,now 1.4.0-1 all [installed,automatic] +xz-utils/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +zlib1g-dev/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +zlib1g/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +Errors detected in the build 0 +Warnings detected in the logs 96 +cppcheck defects detected in the logs 28 +TOTAL warnings detected in the logs 124 diff --git a/2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/stats.html b/2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/stats.html new file mode 100644 index 0000000..a805ba6 --- /dev/null +++ b/2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/stats.html @@ -0,0 +1,180 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+

Top 10 files for error severity, total findings: 2
+   1  libcafekbd/cafekbd-status.c
+   1  libcafekbd/cafekbd-indicator.c
+

+

Top 10 files for style severity, total findings: 20
+   13  libcafekbd/cafekbd-keyboard-drawing.c
+   6   libcafekbd/cafekbd-keyboard-config.c
+   1   test/cafekbd-status-test.c
+

+

Top 10 files for information severity, total findings: 5
+   1  test/cafekbd-keyboard-drawing-test.c
+   1  libcafekbd/cafekbd-keyboard-drawing.c
+   1  libcafekbd/cafekbd-keyboard-config.c
+   1  libcafekbd/cafekbd-indicator-config.c
+   1  libcafekbd/cafekbd-desktop-config.c
+

+ +
+ +
+ + diff --git a/2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/style.css b/2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/style.css new file mode 100644 index 0000000..3897bfa --- /dev/null +++ b/2025-02-06-115718-3398-cppcheck@b1965751dcd5_master/style.css @@ -0,0 +1,177 @@ + +body { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; + font-size: 13px; + line-height: 1.5; + height: 100%; + margin: 0; +} + +#wrapper { + position: fixed; + height: 100vh; + width: 100vw; + display: grid; + grid-template-rows: fit-content(8rem) auto fit-content(8rem); + grid-template-columns: fit-content(25%) 1fr; + grid-template-areas: + "header header" + "menu content" + "footer footer"; +} + +h1 { + margin: 0 0 8px -2px; + font-size: 175%; +} + +.header { + padding: 0 0 5px 15px; + grid-area: header; + border-bottom: thin solid #aaa; +} + +.footer { + grid-area: footer; + border-top: thin solid #aaa; + font-size: 85%; + +} + +.footer > p { + margin: 4px; +} + +#menu, +#menu_index { + grid-area: menu; + text-align: left; + overflow: auto; + padding: 0 23px 15px 15px; + border-right: thin solid #aaa; + min-width: 200px; +} + +#menu > a { + display: block; + margin-left: 10px; + font-size: 12px; +} + +#content, +#content_index { + grid-area: content; + padding: 0px 5px 15px 15px; + overflow: auto; +} + +label { + white-space: nowrap; +} + +label.checkBtn.disabled { + color: #606060; + background: #e0e0e0; + font-style: italic; +} + +label.checkBtn, input[type="text"] { + border: 1px solid grey; + border-radius: 4px; + box-shadow: 1px 1px inset; + padding: 1px 5px; +} + +label.checkBtn { + white-space: nowrap; + background: #ccddff; +} + +label.unchecked { + background: #eff8ff; + box-shadow: 1px 1px 1px; +} + +label.checkBtn:hover, label.unchecked:hover{ + box-shadow: 0 0 2px; +} + +label.disabled:hover { + box-shadow: 1px 1px inset; +} + +label.checkBtn > input { + display:none; +} + +.summaryTable { + width: 100%; +} + +table.summaryTable td { padding: 0 5px 0 5px; } + +.statHeader, .severityHeader { + font-weight: bold; +} + +.warning { + background-color: #ffffa7; +} + +.error { + background-color: #ffb7b7; +} + +.error2 { + background-color: #faa; + display: inline-block; + margin-left: 4px; +} + +.inconclusive { + background-color: #b6b6b4; +} + +.inconclusive2 { + background-color: #b6b6b4; + display: inline-block; + margin-left: 4px; +} + +.verbose { + display: inline-block; + vertical-align: top; + cursor: help; +} + +.verbose .content { + display: none; + position: absolute; + padding: 10px; + margin: 4px; + max-width: 40%; + white-space: pre-wrap; + border: 1px solid #000; + background-color: #ffffcc; + cursor: auto; +} + +.highlight .hll { + padding: 1px; +} + +.highlighttable { + background-color: #fff; + position: relative; + margin: -10px; +} + +.linenos { + border-right: thin solid #aaa; + color: #d3d3d3; + padding-right: 6px; +} + +.id-filtered, .severity-filtered, .file-filtered, .tool-filtered, .text-filtered { + visibility: collapse; +} diff --git a/2025-02-06-151929-14522-1@8369334ba1f3_devel/commitmsg b/2025-02-06-151929-14522-1@8369334ba1f3_devel/commitmsg new file mode 100644 index 0000000..7d9ffe9 --- /dev/null +++ b/2025-02-06-151929-14522-1@8369334ba1f3_devel/commitmsg @@ -0,0 +1 @@ +update libcafekbd.pot for 2.0.0 diff --git a/2025-02-06-151929-14522-1@8369334ba1f3_devel/index.html b/2025-02-06-151929-14522-1@8369334ba1f3_devel/index.html new file mode 100644 index 0000000..5539bb8 --- /dev/null +++ b/2025-02-06-151929-14522-1@8369334ba1f3_devel/index.html @@ -0,0 +1,138 @@ + + +libcafekbd (clang-tools 1:19.0-63) - scan-build results + + + + + + +

libcafekbd (clang-tools 1:19.0-63) - scan-build results

+ + + + + + + +
User:root@5e008e27eb6d
Working Directory:/rootdir
Command Line:make -j 5
Clang Version:Debian clang version 19.1.6 (1+b1) +
Date:Thu Feb 6 15:19:29 2025
+

Bug Summary

+ + + + + + + + + +
Bug TypeQuantityDisplay?
All Bugs11
Logic error
Dereference of null pointer1
Stream handling error
Invalid stream state1
Stream already in EOF1
Unused code
Unreachable code8
+ +

Filter Results by File

+ + +

Reports

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Bug GroupBug Type ▾FileFunction/MethodLinePath Length
Logic errorDereference of null pointerlibcafekbd/tmp-introspect6j1o7dr2/Cafekbd-1.0.cmain81232View Report
Stream handling errorInvalid stream statelibcafekbd/tmp-introspect6j1o7dr2/Cafekbd-1.0.cread_line8933View Report
Stream handling errorStream already in EOFlibcafekbd/tmp-introspect6j1o7dr2/Cafekbd-1.0.cread_line8933View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2481View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain1991View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain1941View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2281View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain1871View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2251View Report
Unused codeUnreachable codelibcafekbd/tmp-introspect6j1o7dr2/Cafekbd-1.0.cvalue_to_string2391View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2561View Report
+ + diff --git a/2025-02-06-151929-14522-1@8369334ba1f3_devel/output_8369334ba1f33885257d28de0c8869ad0780c640 b/2025-02-06-151929-14522-1@8369334ba1f3_devel/output_8369334ba1f33885257d28de0c8869ad0780c640 new file mode 100644 index 0000000..9fb59ef --- /dev/null +++ b/2025-02-06-151929-14522-1@8369334ba1f3_devel/output_8369334ba1f33885257d28de0c8869ad0780c640 @@ -0,0 +1,1866 @@ +Checking libcafekbd/cafekbd-desktop-config.c ... +libcafekbd/cafekbd-desktop-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +1/10 files checked 4% done +Checking libcafekbd/cafekbd-indicator-config.c ... +libcafekbd/cafekbd-indicator-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +2/10 files checked 10% done +Checking libcafekbd/cafekbd-indicator.c ... +libcafekbd/cafekbd-indicator.c:66:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdIndicator, cafekbd_indicator, CTK_TYPE_NOTEBOOK) +^ +3/10 files checked 24% done +Checking libcafekbd/cafekbd-keyboard-config.c ... +libcafekbd/cafekbd-keyboard-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-config.c:67:8: style: Condition '*l1' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:67:15: style: Condition '*l2' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:227:16: style: Condition 'option!=NULL' is always true [knownConditionTrueFalse] + (option != NULL) ? strchr (option, ':') : NULL; + ^ +libcafekbd/cafekbd-keyboard-config.c:282:18: style: Condition 'variant==NULL' is always false [knownConditionTrueFalse] + (variant == + ^ +libcafekbd/cafekbd-keyboard-config.c:226:10: style: Variable 'delim' can be declared as pointer to const [constVariablePointer] + char *delim = + ^ +libcafekbd/cafekbd-keyboard-config.c:609:65: style: Parameter 'kbd_config' can be declared as pointer to const [constParameterPointer] +cafekbd_keyboard_config_options_is_set (CafekbdKeyboardConfig * kbd_config, + ^ +4/10 files checked 36% done +Checking libcafekbd/cafekbd-keyboard-drawing.c ... +libcafekbd/cafekbd-keyboard-drawing.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-drawing.c:61:60: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_coord (CafekbdKeyboardDrawingRenderContext * context, gint n) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:67:61: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_double (CafekbdKeyboardDrawingRenderContext * context, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:625:51: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +set_markup (CafekbdKeyboardDrawingRenderContext * context, gchar *txt) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1026:11: style: Variable 'runp' can be declared as pointer to const [constVariablePointer] + GSList *runp; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1036:25: style: Variable 'geometry' can be declared as pointer to const [constVariablePointer] + PangoGlyphGeometry *geometry; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1202:39: style: Parameter 'outline' can be declared as pointer to const [constParameterPointer] +calc_origin_offset_x (XkbOutlineRec * outline) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1397:15: style: Variable 'shape' can be declared as pointer to const [constVariablePointer] + XkbShapeRec *shape; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: style: Parameter 'drawing' can be declared as pointer to const. However it seems that 'button_press_event' is a callback function, if 'drawing' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2343:18: note: You might need to cast the function pointer here + G_CALLBACK (button_press_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: note: Parameter 'drawing' can be declared as pointer to const + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: style: Parameter 'event' can be declared as pointer to const. However it seems that 'focus_event' is a callback function, if 'event' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2347:18: note: You might need to cast the function pointer here + G_CALLBACK (focus_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: note: Parameter 'event' can be declared as pointer to const + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: style: Parameter 'a' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'a' is declared with const you might also need to cast function pointer(s). [constParameterCallback] +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: note: Parameter 'a' can be declared as pointer to const +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: style: Parameter 'b' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'b' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: note: Parameter 'b' can be declared as pointer to const + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1863:9: style: Variable 'pind' can be declared as pointer to const [constVariablePointer] + Atom *pind = drawing->xkb->names->indicators; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2124:60: style: Parameter 'iev' can be declared as pointer to const [constParameterPointer] +process_indicators_state_notify (XkbIndicatorNotifyEvent * iev, + ^ +Checking libcafekbd/cafekbd-keyboard-drawing.c: KBDRAW_DEBUG... +5/10 files checked 77% done +Checking libcafekbd/cafekbd-status.c ... +libcafekbd/cafekbd-status.c:82:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdStatus, cafekbd_status, CTK_TYPE_STATUS_ICON) +^ +6/10 files checked 91% done +Checking libcafekbd/cafekbd-util.c ... +7/10 files checked 93% done +Checking test/cafekbd-indicator-test.c ... +8/10 files checked 94% done +Checking test/cafekbd-keyboard-drawing-test.c ... +test/cafekbd-keyboard-drawing-test.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +Checking test/cafekbd-keyboard-drawing-test.c: HAVE_CONFIG_H... +9/10 files checked 99% done +Checking test/cafekbd-status-test.c ... +test/cafekbd-status-test.c:42:17: style: Variable 'icon' can be declared as pointer to const [constVariablePointer] + CtkStatusIcon *icon; + ^ +10/10 files checked 100% done +nofile:0:0: information: Active checkers: There was critical errors (use --checkers-report= to see details) [checkersReport] + +/usr/bin/cafe-autogen +checking for autoreconf >= 2.53... + testing autoreconf... found 2.72 +checking for pkg-config >= 0.14.0... + testing pkg-config... found 1.8.1 +checking for cafe-common >= 0.0.1... + testing cafe-doc-common... found 2.0.0 +Checking for required M4 macros... +Checking for forbidden M4 macros... +Processing ./configure.ac +Running cafe-doc-common... +Running autoreconf... +autoreconf: export WARNINGS=no-portability +autoreconf: Entering directory '.' +autoreconf: running: autopoint --force +Copying file ABOUT-NLS +Copying file config.rpath +Copying file m4/codeset.m4 +Copying file m4/extern-inline.m4 +Copying file m4/fcntl-o.m4 +Copying file m4/gettext.m4 +Copying file m4/glibc2.m4 +Copying file m4/glibc21.m4 +Copying file m4/iconv.m4 +Copying file m4/intdiv0.m4 +Copying file m4/intl.m4 +Copying file m4/intldir.m4 +Copying file m4/intlmacosx.m4 +Copying file m4/intmax.m4 +Copying file m4/inttypes-pri.m4 +Copying file m4/inttypes_h.m4 +Copying file m4/lcmessage.m4 +Copying file m4/lib-ld.m4 +Copying file m4/lib-link.m4 +Copying file m4/lib-prefix.m4 +Copying file m4/lock.m4 +Copying file m4/longlong.m4 +Copying file m4/nls.m4 +Copying file m4/po.m4 +Copying file m4/printf-posix.m4 +Copying file m4/progtest.m4 +Copying file m4/size_max.m4 +Copying file m4/stdint_h.m4 +Copying file m4/threadlib.m4 +Copying file m4/uintmax_t.m4 +Copying file m4/visibility.m4 +Copying file m4/wchar_t.m4 +Copying file m4/wint_t.m4 +Copying file m4/xsize.m4 +Copying file po/Makefile.in.in +Copying file po/Makevars.template +Copying file po/Rules-quot +Copying file po/boldquot.sed +Copying file po/en@boldquot.header +Copying file po/en@quot.header +Copying file po/insert-header.sin +Copying file po/quot.sed +Copying file po/remove-potcdate.sin +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: configure.ac: tracing +autoreconf: running: libtoolize --copy --force +libtoolize: putting auxiliary files in '.'. +libtoolize: copying file './ltmain.sh' +libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. +libtoolize: copying file 'm4/libtool.m4' +libtoolize: copying file 'm4/ltoptions.m4' +libtoolize: copying file 'm4/ltsugar.m4' +libtoolize: copying file 'm4/ltversion.m4' +libtoolize: copying file 'm4/lt~obsolete.m4' +autoreconf: configure.ac: not using Intltool +autoreconf: configure.ac: not using Gtkdoc +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: running: /usr/bin/autoconf --force +autoreconf: running: /usr/bin/autoheader --force +autoreconf: running: automake --add-missing --copy --force-missing +configure.ac:31: installing './compile' +configure.ac:34: installing './config.guess' +configure.ac:34: installing './config.sub' +configure.ac:16: installing './install-sh' +configure.ac:16: installing './missing' +Makefile.am: installing './INSTALL' +libcafekbd/Makefile.am: installing './depcomp' +autoreconf: Leaving directory '.' +Skipping configure process. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +checking for a BSD-compatible install... /usr/bin/install -c +checking whether sleep supports fractional seconds... yes +checking filesystem timestamp resolution... 0.01 +checking whether build environment is sane... yes +checking for a race-free mkdir -p... /usr/bin/mkdir -p +checking for gawk... no +checking for mawk... mawk +checking whether make sets $(MAKE)... yes +checking whether make supports nested variables... yes +checking xargs -n works... yes +checking whether make supports the include directive... yes (GNU style) +checking for gcc... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the C compiler works... yes +checking for C compiler default output file name... a.out +checking for suffix of executables... +checking whether we are cross compiling... no +checking for suffix of object files... o +checking whether the compiler supports GNU C... yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... rm: cannot remove 'conftest.plist': Is a directory +yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... gcc3 +checking whether C compiler accepts -Werror=unknown-warning-option... no +checking whether C compiler accepts -Wall... yes +checking whether C compiler accepts -Wmissing-prototypes... yes +checking whether C compiler accepts -Wbad-function-cast... yes +checking whether C compiler accepts -Wcast-align... yes +checking whether C compiler accepts -Wextra... yes +checking whether C compiler accepts -Wformat-nonliteral... yes +checking whether C compiler accepts -Wmissing-declarations... yes +checking whether C compiler accepts -Wnested-externs... yes +checking whether C compiler accepts -Wpointer-arith... yes +checking whether C compiler accepts -Wredundant-decls... yes +checking whether C compiler accepts -Wshadow... yes +checking whether C compiler accepts -Wstrict-prototypes... yes +checking whether C compiler accepts -Wunused-macros... yes +checking whether C compiler accepts -Werror=format-security... yes +checking whether C compiler accepts -fstrict-aliasing... yes +checking flags to pass to the C compiler /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing +checking for gcc... (cached) /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the compiler supports GNU C... (cached) yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... (cached) yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... (cached) none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... (cached) yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... (cached) gcc3 +checking build system type... x86_64-pc-linux-gnu +checking host system type... x86_64-pc-linux-gnu +checking how to print strings... printf +checking for a sed that does not truncate output... /usr/bin/sed +checking for grep that handles long lines and -e... /usr/bin/grep +checking for egrep... /usr/bin/grep -E +checking for fgrep... /usr/bin/grep -F +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld +checking if the linker (/usr/bin/ld) is GNU ld... yes +checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B +checking the name lister (/usr/bin/nm -B) interface... rm: cannot remove 'conftest.plist': Is a directory +BSD nm +checking whether ln -s works... yes +checking the maximum length of command line arguments... 3145728 +checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop +checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop +checking for /usr/bin/ld option to reload object files... -r +checking for file... file +checking for objdump... objdump +checking how to recognize dependent libraries... pass_all +checking for dlltool... no +checking how to associate runtime and link libraries... printf %s\n +checking for ranlib... ranlib +checking for ar... ar +checking for archiver @FILE support... rm: cannot remove 'conftest.plist': Is a directory +@ +checking for strip... strip +checking command to parse /usr/bin/nm -B output from /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer object... rm: cannot remove 'conftest.plist': Is a directory +ok +checking for sysroot... no +checking for a working dd... /usr/bin/dd +checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1 +checking for mt... no +checking if : is a manifest tool... no +checking for stdio.h... yes +checking for stdlib.h... yes +checking for string.h... yes +checking for inttypes.h... yes +checking for stdint.h... yes +checking for strings.h... yes +checking for sys/stat.h... yes +checking for sys/types.h... yes +checking for unistd.h... yes +checking for dlfcn.h... yes +checking for objdir... .libs +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -fno-rtti -fno-exceptions... no +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to produce PIC... -fPIC -DPIC +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer PIC flag -fPIC -DPIC works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer static flag -static works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... (cached) yes +checking whether the /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes +checking whether -lc should be explicitly linked in... no +checking dynamic linker characteristics... GNU/Linux ld.so +checking how to hardcode library paths into programs... immediate +checking whether stripping libraries is possible... yes +checking if libtool supports shared libraries... yes +checking whether to build shared libraries... yes +checking whether to build static libraries... yes +checking whether NLS is requested... yes +checking for msgfmt... /usr/bin/msgfmt +checking for gmsgfmt... /usr/bin/msgfmt +checking for xgettext... /usr/bin/xgettext +checking for msgmerge... /usr/bin/msgmerge +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld -m elf_x86_64 +checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes +checking for shared library run path origin... done +checking how to run the C preprocessor... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer -E +checking for egrep -e... (cached) /usr/bin/grep -E +checking for CFPreferencesCopyAppValue... no +checking for CFLocaleCopyCurrent... no +checking for GNU gettext in libc... yes +checking whether to use NLS... yes +checking where the gettext function comes from... libc +checking for glib-compile-resources... /usr/bin/glib-compile-resources +checking for xmllint... /usr/bin/xmllint +checking for setlocale... yes +checking for pkg-config... /usr/bin/pkg-config +checking pkg-config is at least version 0.9.0... yes +checking for glib-2.0 >= 2.50.0... yes +checking for gmodule-2.0... yes +checking for gio-2.0 >= 2.25.0... yes +checking for cdk-3.0 >= 3.22.0... yes +checking for ctk+-3.0 >= 3.22.0 cdk-x11-3.0 >= 3.22.0... yes +checking for libxklavier >= 5.2... yes +checking for X... libraries , headers +checking for gethostbyname... yes +checking for connect... yes +checking for remove... yes +checking for shmat... yes +checking for IceConnectionNumber in -lICE... yes +checking for pkg-config... (cached) /usr/bin/pkg-config +checking pkg-config is at least version 0.16... yes +checking for library containing sqrt... -lm +checking for gobject-introspection... yes +checking that generated files are newer than configure... done +configure: creating ./config.status +config.status: creating Makefile +config.status: creating libcafekbd.pc +config.status: creating libcafekbdui.pc +config.status: creating po/Makefile.in +config.status: creating libcafekbd/Makefile +config.status: creating libcafekbd/org.cafe.peripherals-keyboard-xkb.gschema.xml +config.status: creating test/Makefile +config.status: creating config.h +config.status: executing depfiles commands +config.status: executing libtool commands +config.status: executing po-directories commands +config.status: creating po/POTFILES +config.status: creating po/Makefile + +Configuration: + + prefix: /usr + exec_prefix: ${prefix} + libdir: ${exec_prefix}/lib + bindir: ${exec_prefix}/bin + sbindir: ${exec_prefix}/sbin + sysconfdir: ${prefix}/etc + datadir: ${datarootdir} + source code location: . + compiler: /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer + cflags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + Warning flags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + +scan-build: Analysis run complete. +scan-build: Removing directory '/tmp/scan-build-2025-02-06-151919-11857-1' because it contains no reports. +scan-build: No bugs found. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +make all-recursive +make[1]: Entering directory '/rootdir' +Making all in po +make[2]: Entering directory '/rootdir/po' +make libcafekbd.pot-update +make[3]: Entering directory '/rootdir/po' +sed -e '/^#/d' remove-potcdate.sin > t-remove-potcdate.sed +mv t-remove-potcdate.sed remove-potcdate.sed +package_gnu=""; \ +test -n "$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L .. -maxdepth 1 -type f \ + -size -10000000c -exec grep 'GNU libcafekbd' \ + /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU libcafekbd' ../* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ +}; \ +if test "$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ +else \ + package_prefix=''; \ +fi; \ +if test -n '' || test 'https://github.com/cafe-desktop/libcafekbd' = '@'PACKAGE_BUGREPORT'@'; then \ + msgid_bugs_address=''; \ +else \ + msgid_bugs_address='https://github.com/cafe-desktop/libcafekbd'; \ +fi; \ +case `/usr/bin/xgettext --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ + *) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --package-name="${package_prefix}libcafekbd" \ + --package-version='1.25.0' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ +esac +test ! -f libcafekbd.po || { \ + if test -f ./libcafekbd.pot-header; then \ + sed -e '1,/^#$/d' < libcafekbd.po > libcafekbd.1po && \ + cat ./libcafekbd.pot-header libcafekbd.1po > libcafekbd.po; \ + rm -f libcafekbd.1po; \ + fi; \ + if test -f ./libcafekbd.pot; then \ + sed -f remove-potcdate.sed < ./libcafekbd.pot > libcafekbd.1po && \ + sed -f remove-potcdate.sed < libcafekbd.po > libcafekbd.2po && \ + if cmp libcafekbd.1po libcafekbd.2po >/dev/null 2>&1; then \ + rm -f libcafekbd.1po libcafekbd.2po libcafekbd.po; \ + else \ + rm -f libcafekbd.1po libcafekbd.2po ./libcafekbd.pot && \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ + else \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ +} +make[3]: Leaving directory '/rootdir/po' +test ! -f ./libcafekbd.pot || \ + test -z "af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo" || make af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo +make[3]: Entering directory '/rootdir/po' +/usr/bin/msgmerge --update --quiet --lang=af af.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ar ar.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=as as.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=an an.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=am am.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=az az.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ast ast.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=be be.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bg bg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn bn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bs bs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=br br.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn_IN bn_IN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca@valencia ca@valencia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca ca.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cmn cmn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=crh crh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cs cs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cv cv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=csb csb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cy cy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de de.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=da da.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=dz dz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de_CH de_CH.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=el el.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_AU en_AU.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_GB en_GB.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_CA en_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eo eo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es es.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_419 es_419.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_AR es_AR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CL es_CL.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CO es_CO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CR es_CR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_DO es_DO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_EC es_EC.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_ES es_ES.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_MX es_MX.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_NI es_NI.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PA es_PA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PE es_PE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PR es_PR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_US es_US.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_SV es_SV.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_UY es_UY.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_VE es_VE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=et et.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eu eu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fa fa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fi fi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fo fo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fil fil.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr fr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=frp frp.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr_CA fr_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fur fur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fy fy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gl gl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gd gd.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ga ga.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gu gu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=he he.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ha ha.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hi hi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hr hr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hy hy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hu hu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ia ia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=id id.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ie ie.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ig ig.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=is is.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=it it.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ja ja.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=jv jv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ka ka.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kab kab.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kk kk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=km km.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kn kn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ko ko.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ks ks.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku ku.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku_IQ ku_IQ.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ky ky.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=la la.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lb lb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=li li.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lo lo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lt lt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lv lv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mai mai.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mg mg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mi mi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ml ml.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mk mk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mn mn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mr mr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ms ms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=my my.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nah nah.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nb nb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ne ne.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nds nds.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nn nn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nl nl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nqo nqo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=oc oc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nso nso.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=om om.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=or or.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pa pa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pl pl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pms pms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ps ps.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt pt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt_BR pt_BR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ro ro.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ru ru.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=rw rw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sc sc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=si si.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sco sco.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sk sk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sl sl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sq sq.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=so so.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr@latin sr@latin.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr sr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sw sw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sv sv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ta ta.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tg tg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=te te.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=th th.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tk tk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tl tl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tr tr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ts ts.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ug ug.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tt tt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uk uk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur ur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uz uz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur_PK ur_PK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=vi vi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=wa wa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yi yi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=xh xh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yo yo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_CN zh_CN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_HK zh_HK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_TW zh_TW.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zu zu.po libcafekbd.pot +rm -f af.gmo && /usr/bin/msgfmt -c --statistics --verbose -o af.gmo af.po +af.po: 7 translated messages, 84 untranslated messages. +rm -f am.gmo && /usr/bin/msgfmt -c --statistics --verbose -o am.gmo am.po +am.po: 54 translated messages, 37 untranslated messagesrm -f ar.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ar.gmo ar.po +. +rm -f an.gmo && /usr/bin/msgfmt -c --statistics --verbose -o an.gmo an.po +ar.po: 50 translated messages, 41 untranslated messages. +rm -f as.gmo && /usr/bin/msgfmt -c --statistics --verbose -o as.gmo as.po +rm -f ast.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ast.gmo ast.po +rm -f az.gmo && /usr/bin/msgfmt -c --statistics --verbose -o az.gmo az.po +rm -f be.gmo && /usr/bin/msgfmt -c --statistics --verbose -o be.gmo be.po +ast.po: 47 translated messages, 44 untranslated messages. +as.po: 41 translated messages, 50 untranslated messages. +an.po:7: warning: header field 'Last-Translator' still has the initial default value +an.po: 0 translated messages, 91 untranslated messages. +az.po: 9 translated messages, 82 untranslated messages. +rm -f bg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bg.gmo bg.po +be.po: 46 translated messages, 45 untranslated messages. +rm -f bn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn.gmo bn.po +rm -f br.gmo && /usr/bin/msgfmt -c --statistics --verbose -o br.gmo br.po +rm -f bn_IN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn_IN.gmo bn_IN.po +bg.po: 54 translated messages, 37 untranslated messages. +bn.po: 43 translated messages, 48 untranslated messages. +rm -f bs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bs.gmo bs.po +br.po: 20 translated messages, 71 untranslated messages. +rm -f ca.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca.gmo ca.po +bn_IN.po: 41 translated messages, 50 untranslated messages. +rm -f ca@valencia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca@valencia.gmo ca@valencia.po +bs.po: 25 translated messagesrm -f cmn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cmn.gmo cmn.po +, 66 untranslated messages. +ca.po: 87 translated messages, 4 untranslated messages. +rm -f crh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o crh.gmo crh.po +ca@valencia.po: 54 translated messages, 37 untranslated messages. +cmn.po: 46 translated messages, 45 untranslated messages. +rm -f cs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cs.gmo cs.po +rm -f csb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o csb.gmo csb.po +crh.po: 11 translated messages, 80 untranslated messages. +rm -f cy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cy.gmo cy.po +rm -f da.gmo && /usr/bin/msgfmt -c --statistics --verbose -o da.gmo da.po +rm -f cv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cv.gmo cv.po +cs.po: 81 translated messages, 10 untranslated messages. +csb.po:7: warning: header field 'Last-Translator' still has the initial default value +csb.po: 0 translated messages, 91 untranslated messages. +cy.po: 26 translated messages, 65 untranslated messages. +da.po: 91 translated messages. +cv.po: 0 translated messages, 91 untranslated messages. +rm -f de.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de.gmo de.po +rm -f dz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o dz.gmo dz.po +rm -f de_CH.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de_CH.gmo de_CH.po +rm -f en_AU.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_AU.gmo en_AU.po +rm -f el.gmo && /usr/bin/msgfmt -c --statistics --verbose -o el.gmo el.po +de.po: 76 translated messages, 15 untranslated messages. +de_CH.po: 0 translated messages, 91 untranslated messages. +en_AU.po: 54 translated messages, 37 untranslated messages. +dz.po: 39 translated messages, 52 untranslated messages. +rm -f en_GB.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_GB.gmo en_GB.po +rm -f en_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_CA.gmo en_CA.po +el.po: 54 translated messages, 37 untranslated messages. +rm -f eo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eo.gmo eo.po +rm -f es.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es.gmo es.po +en_GB.po: 54 translated messages, 37 untranslated messages. +en_CA.po: 10 translated messages, 81 untranslated messages. +rm -f es_419.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_419.gmo es_419.po +eo.po: 52 translated messages, 39 untranslated messages. +rm -f es_AR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_AR.gmo es_AR.po +es.po: 89 translated messages, 2 untranslated messages. +rm -f es_CL.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CL.gmo es_CL.po +es_419.po: 0 translated messages, 91 untranslated messages. +es_AR.po: 21 translated messages, 70 untranslated messagesrm -f es_CO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CO.gmo es_CO.po +rm -f es_CR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CR.gmo es_CR.po +. +es_CL.po: 3 translated messages, 88 untranslated messages. +rm -f es_DO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_DO.gmo es_DO.po +rm -f es_EC.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_EC.gmo es_EC.po +es_CR.po: 1 translated message, 90 untranslated messages. +es_CO.po: 49 translated messages, 42 untranslated messages. +rm -f es_ES.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_ES.gmo es_ES.po +rm -f es_MX.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_MX.gmo es_MX.po +es_EC.po: 1 translated message, 90 untranslated messages. +es_DO.po: 1 translated message, 90 untranslated messages. +rm -f es_NI.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_NI.gmo es_NI.po +es_ES.po: 1 translated message, 90 untranslated messages. +es_MX.po: 1 translated message, 90 untranslated messages. +rm -f es_PA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PA.gmo es_PA.po +rm -f es_PE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PE.gmo es_PE.po +rm -f es_PR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PR.gmo es_PR.po +es_NI.po: 1 translated message, 90 untranslated messages. +rm -f es_SV.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_SV.gmo es_SV.po +es_PE.po: 1 translated message, 90 untranslated messages. +es_PA.po: 1 translated message, 90 untranslated messages. +es_PR.po: 1 translated message, 90 untranslated messages. +rm -f es_UY.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_UY.gmo es_UY.po +rm -f es_US.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_US.gmo es_US.po +rm -f es_VE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_VE.gmo es_VE.po +rm -f et.gmo && /usr/bin/msgfmt -c --statistics --verbose -o et.gmo et.po +es_US.po: 0 translated messages, 91 untranslated messages. +es_SV.po: 1 translated message, 90 untranslated messages. +es_VE.po: 1 translated message, 90 untranslated messages. +es_UY.po: 1 translated message, 90 untranslated messages. +et.po: 54 translated messages, 37 untranslated messages. +rm -f eu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eu.gmo eu.po +rm -f fa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fa.gmo fa.po +rm -f fil.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fil.gmo fil.po +rm -f fo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fo.gmo fo.po +rm -f fi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fi.gmo fi.po +eu.po: fa.po: 54 translated messages, 37 untranslated messages11 translated messages. +, 80 untranslated messagesfil.po: 0 translated messages, 91 untranslated messages. +fo.po: 0 translated messages, 91 untranslated messages. +. +fi.po: 48 translated messages, 43 untranslated messages. +rm -f fr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr.gmo fr.po +rm -f fr_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr_CA.gmo fr_CA.po +rm -f frp.gmo && /usr/bin/msgfmt -c --statistics --verbose -o frp.gmo frp.po +rm -f fur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fur.gmo fur.po +rm -f fy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fy.gmo fy.po +fr.po: 67 translated messages, 24 untranslated messages. +frp.po: 7 translated messages, 84 untranslated messages. +fur.po: 4 translated messages, 87 untranslated messages. +fr_CA.po: 3 translated messages, 88 untranslated messages. +fy.po: 4 translated messages, 87 untranslated messages. +rm -f ga.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ga.gmo ga.po +rm -f gd.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gd.gmo gd.po +rm -f gl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gl.gmo gl.po +rm -f gu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gu.gmo gu.po +rm -f ha.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ha.gmo ha.po +ga.po: 41 translated messages, 50 untranslated messages. +gd.po: 0 translated messages, 91 untranslated messages. +gu.po: 43 translated messages, 48 untranslated messages. +ha.po: 5 translated messages, 86 untranslated messages. +gl.po: 89 translated messages, 2 untranslated messages. +rm -f he.gmo && /usr/bin/msgfmt -c --statistics --verbose -o he.gmo he.po +rm -f hi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hi.gmo hi.po +rm -f hr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hr.gmo hr.po +rm -f hu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hu.gmo hu.po +rm -f hy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hy.gmo hy.po +he.po: 54 translated messages, 37 untranslated messages. +hr.po: hi.po: 54 translated messages, 37 untranslated messages. +45 translated messages, 46 untranslated messages. +hu.po: 54 translated messages, 37 untranslated messages. +hy.po: 54 translated messages, 37 untranslated messages. +rm -f ia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ia.gmo ia.po +rm -f id.gmo && /usr/bin/msgfmt -c --statistics --verbose -o id.gmo id.po +rm -f ig.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ig.gmo ig.po +rm -f ie.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ie.gmo ie.po +rm -f is.gmo && /usr/bin/msgfmt -c --statistics --verbose -o is.gmo is.po +ia.po: 3 translated messages, 88 untranslated messages. +ig.po: 5 translated messages, 86 untranslated messages. +ie.po: 45 translated messages, 46 untranslated messages. +id.po: 91 translated messages. +rm -f it.gmo && /usr/bin/msgfmt -c --statistics --verbose -o it.gmo it.po +is.po: 12 translated messages, 79 untranslated messages. +rm -f ja.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ja.gmo ja.po +rm -f jv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o jv.gmo jv.po +rm -f ka.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ka.gmo ka.po +it.po: 91 translated messages. +ja.po: 54 translated messages, 37 untranslated messages. +rm -f kab.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kab.gmo kab.po +ka.po: 37 translated messages, 54 untranslated messages. +jv.po: 2 translated messages, 89 untranslated messages. +kab.po: 4 translated messages, 87 untranslated messages. +rm -f km.gmo && /usr/bin/msgfmt -c --statistics --verbose -o km.gmo km.po +rm -f kn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kn.gmo kn.po +rm -f kk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kk.gmo kk.po +rm -f ko.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ko.gmo ko.po +rm -f ks.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ks.gmo ks.po +kn.po: ko.po: 54 translated messages, 37 untranslated messages. +kk.po: 24 translated messages, 67 untranslated messages. +43 translated messages, 48 untranslated messages. +km.po:7: warning: header field 'Last-Translator' still has the initial default value +km.po: 0 translated messages, 91 untranslated messages. +ks.po: 3 translated messages, 88 untranslated messages. +rm -f ku_IQ.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku_IQ.gmo ku_IQ.po +rm -f ku.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku.gmo ku.po +rm -f ky.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ky.gmo ky.po +rm -f la.gmo && /usr/bin/msgfmt -c --statistics --verbose -o la.gmo la.po +rm -f lb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lb.gmo lb.po +ku_IQ.po: ky.po: 26 translated messages, 65 untranslated messages. +16 translated messages, 75 untranslated messages. +ku.po: 10 translated messagesla.po: 2 translated messages, 89 untranslated messages. +, 81 untranslated messages. +lb.po:7: warning: header field 'Last-Translator' still has the initial default value +lb.po: 0 translated messages, 91 untranslated messages. +rm -f li.gmo && /usr/bin/msgfmt -c --statistics --verbose -o li.gmo li.po +rm -f lo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lo.gmo lo.po +rm -f lt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lt.gmo lt.po +rm -f lv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lv.gmo lv.po +rm -f mai.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mai.gmo mai.po +li.po:7: warning: lo.po:7: warning: header field 'Last-Translator' still has the initial default value +lo.po: 0 translated messages, 91 untranslated messages. +header field 'Last-Translator' still has the initial default value +li.po: 0 translated messages, 91 untranslated messages. +lt.po: 91 translated messages. +lv.po: 49 translated messages, 42 untranslated messages. +mai.po: 18 translated messages, 73 untranslated messages. +rm -f mg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mg.gmo mg.po +rm -f mi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mi.gmo mi.po +rm -f mk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mk.gmo mk.po +rm -f ml.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ml.gmo ml.po +rm -f mn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mn.gmo mn.po +mk.po: 39 translated messages, 52 untranslated messages. +mi.po:7: warning: header field 'Last-Translator' still has the initial default value +mg.po: 10 translated messages, 81 untranslated messages. +mi.po: 0 translated messages, 91 untranslated messages. +ml.po: 41 translated messages, 50 untranslated messages. +mn.po: 10 translated messages, 81 untranslated messages. +rm -f ms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ms.gmo ms.po +rm -f mr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mr.gmo mr.po +rm -f my.gmo && /usr/bin/msgfmt -c --statistics --verbose -o my.gmo my.po +rm -f nah.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nah.gmo nah.po +my.po:7: warning: header field 'Last-Translator' still has the initial default value +my.po: 0 translated messages, 91 untranslated messages. +ms.po: 91 translated messages. +mr.po: 47 translated messages, 44 untranslated messages. +rm -f nb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nb.gmo nb.po +nah.po: 0 translated messages, 91 untranslated messages. +rm -f nds.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nds.gmo nds.po +rm -f nn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nn.gmo nn.po +rm -f ne.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ne.gmo ne.po +rm -f nl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nl.gmo nl.po +nb.po: 91 translated messages. +nds.po: 12 translated messages, 79 untranslated messages. +nl.po: 91 translated messages. +nn.po: 40 translated messages, 51 untranslated messages. +rm -f nqo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nqo.gmo nqo.po +ne.po: 13 translated messages, 78 untranslated messages. +rm -f nso.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nso.gmo nso.po +rm -f oc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o oc.gmo oc.po +rm -f om.gmo && /usr/bin/msgfmt -c --statistics --verbose -o om.gmo om.po +rm -f or.gmo && /usr/bin/msgfmt -c --statistics --verbose -o or.gmo or.po +nqo.po: 0 translated messages, 91 untranslated messages. +nso.po: 3 translated messages, 88 untranslated messages. +oc.po: 68 translated messages, 23 untranslated messages. +om.po: 0 translated messages, 91 untranslated messages. +rm -f pa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pa.gmo pa.po +or.po: 41 translated messages, 50 untranslated messages. +rm -f pms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pms.gmo pms.po +rm -f pl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pl.gmo pl.po +rm -f ps.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ps.gmo ps.po +rm -f pt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt.gmo pt.po +pa.po: 46 translated messages, 45 untranslated messages. +pms.po: 3 translated messages, 88 untranslated messages. +ps.po: pt.po: 84 translated messages, 7 untranslated messages. +pl.po: 55 translated messages, 36 untranslated messages. +6 translated messages, 85 untranslated messages. +rm -f pt_BR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt_BR.gmo pt_BR.po +rm -f ro.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ro.gmo ro.po +rm -f ru.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ru.gmo ru.po +rm -f rw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o rw.gmo rw.po +ro.po: 54 translated messages, 37 untranslated messages. +pt_BR.po: 58 translated messages, 33 untranslated messages. +rm -f sc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sc.gmo sc.po +ru.po: 89 translated messages, 2 untranslated messages. +rw.po: 10 translated messages, 81 untranslated messages. +sc.po: 2 translated messages, 89 untranslated messages. +rm -f sco.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sco.gmo sco.po +rm -f sk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sk.gmo sk.po +rm -f sl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sl.gmo sl.po +rm -f si.gmo && /usr/bin/msgfmt -c --statistics --verbose -o si.gmo si.po +rm -f so.gmo && /usr/bin/msgfmt -c --statistics --verbose -o so.gmo so.po +sl.po: sk.po: 54 translated messages, 37 untranslated messages. +sco.po: 0 translated messages, 91 untranslated messages. +55 translated messages, 36 untranslated messages. +si.po: 36 translated messages, 55 untranslated messages. +so.po: 0 translated messages, 91 untranslated messages. +rm -f sq.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sq.gmo sq.po +rm -f sr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr.gmo sr.po +rm -f sv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sv.gmo sv.po +rm -f sr@latin.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr@latin.gmo sr@latin.po +rm -f sw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sw.gmo sw.po +sq.po: 52 translated messages, 39 untranslated messages. +sv.po: 80 translated messages, 11 untranslated messages. +sw.po: 0 translated messages, 91 untranslated messages. +sr@latin.po: 46 translated messages, 45 untranslated messages. +sr.po: 91 translated messages. +rm -f ta.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ta.gmo ta.po +rm -f te.gmo && /usr/bin/msgfmt -c --statistics --verbose -o te.gmo te.po +rm -f tg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tg.gmo tg.po +rm -f th.gmo && /usr/bin/msgfmt -c --statistics --verbose -o th.gmo th.po +rm -f tk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tk.gmo tk.po +tg.po: 0 translated messages, 91 untranslated messages. +te.po: 41 translated messages, 50 untranslated messages. +tk.po: 7 translated messages, 84 untranslated messages. +ta.po: 46 translated messages, 45 untranslated messages. +rm -f tl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tl.gmo tl.po +rm -f tr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tr.gmo tr.po +th.po: 45 translated messages, 46 untranslated messages. +tl.po: 0 translated messages, 91 untranslated messages. +rm -f ts.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ts.gmo ts.po +rm -f tt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tt.gmo tt.po +tr.po: 58 translated messages, 33 untranslated messages. +rm -f ug.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ug.gmo ug.po +rm -f uk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uk.gmo uk.po +tt.po:7: warning: header field 'Last-Translator' still has the initial default value +ts.po: 0 translated messages, 91 untranslated messages. +rm -f ur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur.gmo ur.po +tt.po: 0 translated messages, 91 untranslated messages. +ug.po: 6 translated messages, 85 untranslated messages. +uk.po: 58 translated messages, 33 untranslated messages. +ur.po: 7 translated messages, 84 untranslated messages. +rm -f ur_PK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur_PK.gmo ur_PK.po +rm -f vi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o vi.gmo vi.po +rm -f uz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uz.gmo uz.po +rm -f wa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o wa.gmo wa.po +uz.po: 26 translated messages, 65 untranslated messages. +rm -f xh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o xh.gmo xh.po +ur_PK.po:7: warning: header field 'Last-Translator' still has the initial default value +ur_PK.po: 0 translated messages, 91 untranslated messages. +vi.po: 52 translated messages, 39 untranslated messages. +wa.po: 9 translated messages, 82 untranslated messages. +xh.po: 8 translated messages, 83 untranslated messages. +rm -f yo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yo.gmo yo.po +rm -f yi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yi.gmo yi.po +rm -f zh_CN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_CN.gmo zh_CN.po +rm -f zh_HK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_HK.gmo zh_HK.po +rm -f zh_TW.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_TW.gmo zh_TW.po +yi.po:7: warning: header field 'Last-Translator' still has the initial default value +yi.po: 0 translated messages, 91 untranslated messages. +yo.po: 5 translated messages, 86 untranslated messages. +zh_CN.po: 63 translated messages, 28 untranslated messageszh_HK.po: 47 translated messages, 44 untranslated messages. +. +zh_TW.po: 91 translated messages. +rm -f zu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zu.gmo zu.po +zu.po: 3 translated messages, 88 untranslated messages. +make[3]: Leaving directory '/rootdir/po' +touch stamp-po +make[2]: Leaving directory '/rootdir/po' +Making all in libcafekbd +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml + GEN cafekbd-indicator-marshal.h + GEN cafekbd-keyboard-drawing-marshal.h +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... +INFO: Reading ./cafekbd-indicator-marshal.list... + GEN cafekbd-indicator-marshal.c + GEN cafekbd-keyboard-drawing-marshal.c +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... +INFO: Reading ./cafekbd-indicator-marshal.list... +make all-am +make[3]: Entering directory '/rootdir/libcafekbd' + CC libcafekbd_la-cafekbd-desktop-config.lo + CC libcafekbd_la-cafekbd-keyboard-config.lo + CC libcafekbd_la-cafekbd-util.lo + CC libcafekbdui_la-cafekbd-indicator-config.lo + CC libcafekbdui_la-cafekbd-indicator.lo +cafekbd-desktop-config.c: In function 'cafekbd_desktop_config_load_from_gsettings': +cafekbd-desktop-config.c:176:38: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 176 | || config->default_group >= + | ^~ +cafekbd-indicator-config.c: In function 'cafekbd_indicator_config_get_images_file': +cafekbd-indicator-config.c:152:59: warning: comparison of integer expressions of different signedness: 'guint' {aka 'unsigned int'} and 'int' [-Wsign-compare] + 152 | (g_strv_length (kbd_config->layouts_variants) > group)) { + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_extract_layout_name': +cafekbd-indicator.c:293:19: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 293 | if (group < g_strv_length (short_group_names)) { + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_prepare_drawing': +cafekbd-indicator.c:418:31: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 418 | if (group + 1 == + | ^~ +cafekbd-indicator.c: In function 'cafekbd_indicator_update_tooltips': +cafekbd-indicator.c:446:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 446 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-indicator.c:450:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 450 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-indicator.c: In function 'cafekbd_indicator_kbd_cfg_callback': +cafekbd-indicator.c:61:44: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 61 | CafekbdIndicator * gki = (CafekbdIndicator*)cur->data; + | ^~~ +cafekbd-indicator.c:561:9: note: in expansion of macro 'ForAllIndicators' + 561 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-indicator.c:539:55: note: shadowed declaration is here + 539 | cafekbd_indicator_kbd_cfg_callback (CafekbdIndicator *gki G_GNUC_UNUSED) +cafekbd-indicator.c: In function 'cafekbd_indicator_start_listen': +cafekbd-indicator.c:647:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 647 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:650:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 650 | (CdkFilterFunc) + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_stop_listen': +cafekbd-indicator.c:663:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 663 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:667:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 667 | (CdkFilterFunc) cafekbd_indicator_filter_x_evt, NULL); + | ^ + CC libcafekbdui_la-cafekbd-status.lo +cafekbd-status.c: In function 'cafekbd_status_render_cairo': +cafekbd-status.c:214:23: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 214 | if (group + 1 == xkl_engine_get_num_groups (globals.engine)) { + | ^~ +cafekbd-status.c: In function 'cafekbd_status_prepare_drawing': +cafekbd-status.c:376:51: warning: cast between incompatible function types from 'void (*)(void *)' to 'void (*)(guchar *, void *)' {aka 'void (*)(unsigned char *, void *)'} [-Wcast-function-type] + 376 | (GdkPixbufDestroyNotify) + | ^ +cafekbd-status.c: In function 'cafekbd_status_update_tooltips': +cafekbd-status.c:395:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 395 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-status.c:399:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 399 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-status.c: In function 'cafekbd_status_kbd_cfg_callback': +cafekbd-status.c:77:41: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 77 | CafekbdStatus * gki = (CafekbdStatus*)cur->data; + | ^~~ +cafekbd-status.c:508:9: note: in expansion of macro 'ForAllIndicators' + 508 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-status.c:484:49: note: shadowed declaration is here + 484 | cafekbd_status_kbd_cfg_callback (CafekbdStatus *gki G_GNUC_UNUSED) +cafekbd-status.c: In function 'cafekbd_status_start_listen': +cafekbd-status.c:594:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 594 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:597:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 597 | (CdkFilterFunc) cafekbd_status_filter_x_evt, + | ^ +cafekbd-status.c: In function 'cafekbd_status_stop_listen': +cafekbd-status.c:610:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 610 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:614:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 614 | (CdkFilterFunc) cafekbd_status_filter_x_evt, NULL); + | ^ + CC libcafekbdui_la-cafekbd-indicator-marshal.lo +cafekbd-indicator-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ + CC libcafekbdui_la-cafekbd-keyboard-drawing-marshal.lo +cafekbd-keyboard-drawing-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + CC libcafekbdui_la-cafekbd-keyboard-drawing.lo +cafekbd-keyboard-drawing.c: In function 'draw_polygon': +cafekbd-keyboard-drawing.c:322:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 322 | for (i = 0; i < num_points; i++) { + | ^ +cafekbd-keyboard-drawing.c: In function 'process_indicators_state_notify': +cafekbd-keyboard-drawing.c:2131:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'long unsigned int' [-Wsign-compare] + 2131 | for (i = 0; i <= drawing->xkb->indicators->phys_indicators; i++) + | ^~ +cafekbd-keyboard-drawing.c: In function 'cafekbd_keyboard_drawing_get_type': +cafekbd-keyboard-drawing.c:2394:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawingClass *)' {aka 'void (*)(struct _CafekbdKeyboardDrawingClass *)'} to 'void (*)(void *, void *)' [-Wcast-function-type] + 2394 | (GClassInitFunc) cafekbd_keyboard_drawing_class_init, + | ^ +cafekbd-keyboard-drawing.c:2399:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawing *)' {aka 'void (*)(struct _CafekbdKeyboardDrawing *)'} to 'void (*)(GTypeInstance *, void *)' {aka 'void (*)(struct _GTypeInstance *, void *)'} [-Wcast-function-type] + 2399 | (GInstanceInitFunc) cafekbd_keyboard_drawing_init, + | ^ + GEN org.cafe.peripherals-keyboard-xkb.gschema.valid + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:114:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 114 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbd.la + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspect6j1o7dr2/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspect6j1o7dr2/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspect6j1o7dr2/Cafekbd-1.0.c:239:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 239 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspect6j1o7dr2/Cafekbd-1.0.c:246:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 246 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspect6j1o7dr2/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +5 warnings generated. + GICOMP Cafekbd-1.0.gir +make[3]: Leaving directory '/rootdir/libcafekbd' +make[2]: Leaving directory '/rootdir/libcafekbd' +Making all in test +make[2]: Entering directory '/rootdir/test' + CC cafekbd_indicator_test-cafekbd-indicator-test.o + CC cafekbd_keyboard_drawing_test-cafekbd-keyboard-drawing-test.o + CC cafekbd_status_test-cafekbd-status-test.o + CCLD cafekbd-status-test +cafekbd-keyboard-drawing-test.c:187:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 187 | g_print ("kbdraw %s\n", VERSION); + | ^~~~~~~ +cafekbd-keyboard-drawing-test.c:194:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 194 | g_printerr ("--groups: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:199:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 199 | g_printerr ("--levels: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:225:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 225 | cafekbd_keyboard_drawing_set_track_modifiers + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:228:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 228 | cafekbd_keyboard_drawing_set_track_config + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:248:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 248 | names.keycodes = keycodes; + | ^~~~~~~~ +cafekbd-keyboard-drawing-test.c:256:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 256 | names.geometry = geometry; + | ^~~~~~~~ +7 warnings generated. + CCLD cafekbd-keyboard-drawing-test + CCLD cafekbd-indicator-test +make[2]: Leaving directory '/rootdir/test' +make[2]: Entering directory '/rootdir' +make[2]: Leaving directory '/rootdir' +make[1]: Leaving directory '/rootdir' +scan-build: Analysis run complete. +scan-build: 11 bugs found. +scan-build: Run 'scan-view /rootdir/html-report/2025-02-06-151929-14522-1' to examine bug reports. +Making check in po +make[1]: Entering directory '/rootdir/po' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/po' +Making check in libcafekbd +make[1]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +make check-am +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:113:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 113 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspect95zf21cw/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspect95zf21cw/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspect95zf21cw/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +3 warnings generated. + GICOMP Cafekbd-1.0.gir +make[2]: Leaving directory '/rootdir/libcafekbd' +make[1]: Leaving directory '/rootdir/libcafekbd' +Making check in test +make[1]: Entering directory '/rootdir/test' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/test' +make[1]: Entering directory '/rootdir' +make[1]: Leaving directory '/rootdir' + Listing... 0% Listing... 0% Listing... 0% adduser/testing,now 3.137 all [installed,automatic] +advaita-icon-theme/unknown,now 3.25.0-1 all [installed,automatic] +apt/testing,now 2.9.26 amd64 [installed,automatic] +aptitude-common/testing,now 0.8.13-6.1 all [installed,automatic] +aptitude/testing,now 0.8.13-6.1 amd64 [installed] +at-spi2-common/testing,now 2.55.0.1-1 all [installed,automatic] +at-spi2-core/testing,now 2.55.0.1-1 amd64 [installed,automatic] +autoconf-archive/testing,now 20220903-3 all [installed] +autoconf/testing,now 2.72-3 all [installed,automatic] +automake/testing,now 1:1.17-3 all [installed,automatic] +autopoint/testing,now 0.23.1-1 all [installed] +autotools-dev/testing,now 20220109.1 all [installed,automatic] +base-files/testing,now 13.6 amd64 [installed,automatic] +base-passwd/testing,now 3.6.6 amd64 [installed,automatic] +bash/testing,now 5.2.37-1 amd64 [installed,automatic] +binfmt-support/testing,now 2.2.2-7 amd64 [installed,automatic] +binutils-common/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils-gold-x86-64-linux-gnu/testing,now 2.44-1 amd64 [installed,automatic] +binutils-gold/testing,now 2.44-1 amd64 [installed,automatic] +binutils-x86-64-linux-gnu/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +bsdutils/testing,now 1:2.40.4-2 amd64 [installed,automatic] +build-essential/testing,now 12.12 amd64 [installed,automatic] +bzip2-doc/testing,now 1.0.8-6 all [installed,automatic] +bzip2/testing,now 1.0.8-6 amd64 [installed,automatic] +ca-certificates/testing,now 20241223 all [installed,automatic] +clang-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools/testing,now 1:19.0-63 amd64 [installed] +clang/testing,now 1:19.0-63 amd64 [installed] +coreutils/testing,now 9.5-1+b1 amd64 [installed,automatic] +cpp-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-14/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cpp/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cppcheck/testing,now 2.16.0-1 amd64 [installed] +ctk-update-icon-cache/unknown,now 3.25.6-1 amd64 [installed,automatic] +dash/testing,now 0.5.12-12 amd64 [installed,automatic] +dbus-bin/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-daemon/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-session-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-system-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-user-session/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus/testing,now 1.16.0-1 amd64 [installed,automatic] +dconf-gsettings-backend/testing,now 0.40.0-5 amd64 [installed,automatic] +dconf-service/testing,now 0.40.0-5 amd64 [installed,automatic] +debconf/testing,now 1.5.89 all [installed,automatic] +debian-archive-keyring/testing,now 2023.4 all [installed,automatic] +debianutils/testing,now 5.21 amd64 [installed,automatic] +diffutils/testing,now 1:3.10-2 amd64 [installed,automatic] +dirmngr/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +dmsetup/testing,now 2:1.02.201-1 amd64 [installed,automatic] +dpkg-dev/testing,now 1.22.14 all [installed,automatic] +dpkg/testing,now 1.22.14 amd64 [installed,automatic] +e2fsprogs/testing,now 1.47.2-1 amd64 [installed,automatic] +expect/testing,now 5.45.4-3+b1 amd64 [installed] +fakeroot/testing,now 1.37-1 amd64 [installed,automatic] +file/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +findutils/testing,now 4.10.0-3 amd64 [installed,automatic] +fontconfig-config/testing,now 2.15.0-2 amd64 [installed,automatic] +fontconfig/testing,now 2.15.0-2 amd64 [installed,automatic] +fonts-dejavu-core/testing,now 2.37-8 all [installed,automatic] +fonts-dejavu-mono/testing,now 2.37-8 all [installed,automatic] +g++-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-14/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +g++/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc-14-base/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gettext-base/testing,now 0.23.1-1 amd64 [installed,automatic] +gettext/testing,now 0.23.1-1 amd64 [installed] +gir1.2-atk-1.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-atspi-2.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-ctk-3.0/unknown,now 3.25.6-1 amd64 [installed] +gir1.2-freedesktop-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-freedesktop/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-gdkpixbuf-2.0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +gir1.2-girepository-2.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-girepository-2.0/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-glib-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-glib-2.0/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-harfbuzz-0.0/testing,now 10.2.0-1 amd64 [installed,automatic] +gir1.2-pango-1.0/testing,now 1.56.1-1 amd64 [installed,automatic] +gir1.2-xkl-1.0/testing,now 5.4-5+b2 amd64 [installed,automatic] +girepository-tools/testing,now 2.82.4-2 amd64 [installed,automatic] +git-man/testing,now 1:2.47.2-0.1 all [installed,automatic] +git/testing,now 1:2.47.2-0.1 amd64 [installed] +gnupg-l10n/testing,now 2.2.46-1 all [installed,automatic] +gnupg-utils/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gnupg/testing,now 2.2.46-1 all [installed,automatic] +gobject-introspection-bin/testing,now 1.82.0-4 amd64 [installed,automatic] +gobject-introspection/testing,now 1.82.0-4 amd64 [installed] +gpg-agent/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg-wks-client/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgconf/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgsm/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgv/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +grep/testing,now 3.11-4 amd64 [installed,automatic] +gsettings-desktop-schemas/testing,now 47.1-1 all [installed,automatic] +gzip/testing,now 1.13-1 amd64 [installed,automatic] +hicolor-icon-theme/testing,now 0.18-2 all [installed,automatic] +hostname/testing,now 3.25 amd64 [installed,automatic] +icu-devtools/testing,now 72.1-6 amd64 [installed,automatic] +init-system-helpers/testing,now 1.68 all [installed,automatic] +krb5-locales/testing,now 1.21.3-4 all [installed,automatic] +less/testing,now 643-1 amd64 [installed,automatic] +lib32gcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +lib32stdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libacl1/testing,now 2.3.2-2+b1 amd64 [installed,automatic] +libalgorithm-diff-perl/testing,now 1.201-1 all [installed,automatic] +libalgorithm-diff-xs-perl/testing,now 0.04-8+b4 amd64 [installed,automatic] +libalgorithm-merge-perl/testing,now 0.08-5 all [installed,automatic] +libapparmor1/testing,now 3.1.7-1+b3 amd64 [installed,automatic] +libapt-pkg6.0t64/testing,now 2.9.26 amd64 [installed,automatic] +libasan8/testing,now 14.2.0-12 amd64 [installed,automatic] +libassuan9/testing,now 3.0.1-2 amd64 [installed,automatic] +libatk-bridge2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk-bridge2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatomic1/testing,now 14.2.0-12 amd64 [installed,automatic] +libatspi2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatspi2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libattr1/testing,now 1:2.5.2-2 amd64 [installed,automatic] +libaudit-common/testing,now 1:4.0.2-2 all [installed,automatic] +libaudit1/testing,now 1:4.0.2-2+b1 amd64 [installed,automatic] +libavahi-client3/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common-data/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common3/testing,now 0.8-16 amd64 [installed,automatic] +libbinutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libblkid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libblkid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libboost-iostreams1.83.0/testing,now 1.83.0-4 amd64 [installed,automatic] +libbrotli-dev/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbrotli1/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbsd0/testing,now 0.12.2-2 amd64 [installed,automatic] +libbz2-1.0/testing,now 1.0.8-6 amd64 [installed,automatic] +libbz2-dev/testing,now 1.0.8-6 amd64 [installed,automatic] +libc-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc-dev-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc6-dev/testing,now 2.40-6 amd64 [installed,automatic] +libc6-i386/testing,now 2.40-6 amd64 [installed,automatic] +libc6/testing,now 2.40-6 amd64 [installed,automatic] +libcairo-gobject2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo-script-interpreter2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2-dev/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcap-dev/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcap-ng0/testing,now 0.8.5-4 amd64 [installed,automatic] +libcap2/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcbor0.10/testing,now 0.10.2-2 amd64 [installed,automatic] +libcc1-0/testing,now 14.2.0-12 amd64 [installed,automatic] +libclang-common-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-cpp19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-rt-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang1-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libcolord2/testing,now 1.4.7-1+b2 amd64 [installed,automatic] +libcom-err2/testing,now 1.47.2-1 amd64 [installed,automatic] +libcrypt-dev/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcrypt1/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcryptsetup12/testing,now 2:2.7.5-1 amd64 [installed,automatic] +libctf-nobfd0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctf0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctk-3-0/unknown,now 3.25.6-1 amd64 [installed] +libctk-3-bin/unknown,now 3.25.6-1 amd64 [installed,automatic] +libctk-3-common/unknown,now 3.25.6-1 all [installed] +libctk-3-dev/unknown,now 3.25.6-1 amd64 [installed] +libcups2t64/testing,now 2.4.10-2+b1 amd64 [installed,automatic] +libcurl3t64-gnutls/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcurl4t64/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcwidget4/testing,now 0.5.18-6+b2 amd64 [installed,automatic] +libdatrie-dev/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdatrie1/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdav1d7/testing,now 1.5.1-1 amd64 [installed,automatic] +libdb5.3t64/testing,now 5.3.28+dfsg2-9 amd64 [installed,automatic] +libdbus-1-3/testing,now 1.16.0-1 amd64 [installed,automatic] +libdbus-1-dev/testing,now 1.16.0-1 amd64 [installed,automatic] +libdconf1/testing,now 0.40.0-5 amd64 [installed,automatic] +libdebconfclient0/testing,now 0.277 amd64 [installed,automatic] +libdeflate-dev/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdeflate0/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdevmapper1.02.1/testing,now 2:1.02.201-1 amd64 [installed,automatic] +libdpkg-perl/testing,now 1.22.14 all [installed,automatic] +libdrm-amdgpu1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-common/testing,now 2.4.123-1 all [installed,automatic] +libdrm-intel1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-radeon1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm2/testing,now 2.4.123-1 amd64 [installed,automatic] +libedit2/testing,now 3.1-20250104-1 amd64 [installed,automatic] +libegl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libegl-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1-mesa-dev/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libelf1t64/testing,now 0.192-4 amd64 [installed,automatic] +libepoxy-dev/testing,now 1.5.10-2 amd64 [installed,automatic] +libepoxy0/testing,now 1.5.10-2 amd64 [installed,automatic] +liberror-perl/testing,now 0.17029-2 all [installed,automatic] +libexpat1-dev/testing,now 2.6.4-1 amd64 [installed,automatic] +libexpat1/testing,now 2.6.4-1 amd64 [installed,automatic] +libext2fs2t64/testing,now 1.47.2-1 amd64 [installed,automatic] +libfakeroot/testing,now 1.37-1 amd64 [installed,automatic] +libffi-dev/testing,now 3.4.6-1 amd64 [installed,automatic] +libffi8/testing,now 3.4.6-1 amd64 [installed,automatic] +libfido2-1/testing,now 1.15.0-1+b1 amd64 [installed,automatic] +libfile-fcntllock-perl/testing,now 0.22-4+b4 amd64 [installed,automatic] +libfontconfig-dev/testing,now 2.15.0-2 amd64 [installed,automatic] +libfontconfig1/testing,now 2.15.0-2 amd64 [installed,automatic] +libfreetype-dev/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfreetype6/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfribidi-dev/testing,now 1.0.16-1 amd64 [installed,automatic] +libfribidi0/testing,now 1.0.16-1 amd64 [installed,automatic] +libgbm1/testing,now 24.2.8-1 amd64 [installed,automatic] +libgc1/testing,now 1:8.2.8-1 amd64 [installed,automatic] +libgcc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcrypt20/testing,now 1.11.0-7 amd64 [installed,automatic] +libgdbm-compat4t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdbm6t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-dev/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-bin/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-common/testing,now 2.42.12+dfsg-2 all [installed,automatic] +libgio-2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libgio-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository-1.0-1/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-1.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-2.0-0/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository1.0-dev/testing,now 1.82.0-4 amd64 [installed] +libgl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgl1-mesa-dri/testing,now 24.2.8-1 amd64 [installed,automatic] +libgl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglapi-mesa/testing,now 24.2.8-1 amd64 [installed,automatic] +libgles-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles2/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglib2.0-0t64/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-data/testing,now 2.82.4-2 all [installed,automatic] +libglib2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-dev/testing,now 2.82.4-2 amd64 [installed] +libglvnd-core-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libglx0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgmp10/testing,now 2:6.3.0+dfsg-3 amd64 [installed,automatic] +libgnutls30t64/testing,now 3.8.8-2 amd64 [installed,automatic] +libgomp1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgpg-error-l10n/testing,now 1.51-3 all [installed,automatic] +libgpg-error0/testing,now 1.51-3 amd64 [installed,automatic] +libgpm2/testing,now 1.20.7-11+b2 amd64 [installed,automatic] +libgprofng0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libgraphite2-3/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgraphite2-dev/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgssapi-krb5-2/testing,now 1.21.3-4 amd64 [installed,automatic] +libharfbuzz-cairo0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-dev/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-gobject0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-icu0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-subset0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz0b/testing,now 10.2.0-1 amd64 [installed,automatic] +libhogweed6t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libhwasan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libice-dev/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libice6/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libicu-dev/testing,now 72.1-6 amd64 [installed,automatic] +libicu72/testing,now 72.1-6 amd64 [installed,automatic] +libidn2-0/testing,now 2.3.7-2+b1 amd64 [installed,automatic] +libisl23/testing,now 0.27-1 amd64 [installed,automatic] +libitm1/testing,now 14.2.0-12 amd64 [installed,automatic] +libjansson4/testing,now 2.14-2+b3 amd64 [installed,automatic] +libjbig-dev/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjbig0/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjpeg-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjson-c5/testing,now 0.18+ds-1 amd64 [installed,automatic] +libk5crypto3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkeyutils1/testing,now 1.6.3-4 amd64 [installed,automatic] +libkmod2/testing,now 33+20240816-2 amd64 [installed,automatic] +libkrb5-3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkrb5support0/testing,now 1.21.3-4 amd64 [installed,automatic] +libksba8/testing,now 1.6.7-2+b1 amd64 [installed,automatic] +liblcms2-2/testing,now 2.16-2 amd64 [installed,automatic] +libldap-common/testing,now 2.6.9+dfsg-1 all [installed,automatic] +libldap2/testing,now 2.6.9+dfsg-1 amd64 [installed,automatic] +liblerc-dev/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +liblerc4/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +libllvm19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +liblocale-gettext-perl/testing,now 1.07-7+b1 amd64 [installed,automatic] +liblsan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libltdl-dev/testing,now 2.5.4-3 amd64 [installed,automatic] +libltdl7/testing,now 2.5.4-3 amd64 [installed,automatic] +liblz4-1/testing,now 1.10.0-3 amd64 [installed,automatic] +liblzma-dev/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzma5/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzo2-2/testing,now 2.10-3+b1 amd64 [installed,automatic] +libmagic-mgc/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmagic1t64/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmd0/testing,now 1.1.0-2+b1 amd64 [installed,automatic] +libmount-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libmount1/testing,now 2.40.4-2 amd64 [installed,automatic] +libmpc3/testing,now 1.3.1-1+b3 amd64 [installed,automatic] +libmpfr6/testing,now 4.2.1-1+b2 amd64 [installed,automatic] +libncurses-dev/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncurses6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncursesw6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libnettle8t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libnghttp2-14/testing,now 1.64.0-1 amd64 [installed,automatic] +libnghttp3-9/testing,now 1.6.0-2 amd64 [installed,automatic] +libngtcp2-16/testing,now 1.9.1-1 amd64 [installed,automatic] +libngtcp2-crypto-gnutls8/testing,now 1.9.1-1 amd64 [installed,automatic] +libnpth0t64/testing,now 1.8-2 amd64 [installed,automatic] +libnss-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libobjc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libobjc4/testing,now 14.2.0-12 amd64 [installed,automatic] +libopengl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libopengl0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libp11-kit0/testing,now 0.25.5-3 amd64 [installed,automatic] +libpam-modules-bin/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-modules/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-runtime/testing,now 1.7.0-2 all [installed,automatic] +libpam-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libpam0g/testing,now 1.7.0-2 amd64 [installed,automatic] +libpango-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpango1.0-dev/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangocairo-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoft2-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoxft-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpciaccess0/testing,now 0.17-3+b3 amd64 [installed,automatic] +libpcre2-16-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-32-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-8-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-dev/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-posix3/testing,now 10.44-5 amd64 [installed,automatic] +libperl5.40/testing,now 5.40.0-8 amd64 [installed,automatic] +libpfm4/testing,now 4.13.0+git83-g91970fe-1 amd64 [installed,automatic] +libpipeline1/testing,now 1.5.8-1 amd64 [installed,automatic] +libpixman-1-0/testing,now 0.44.0-3 amd64 [installed,automatic] +libpixman-1-dev/testing,now 0.44.0-3 amd64 [installed,automatic] +libpkgconf3/testing,now 1.8.1-4 amd64 [installed,automatic] +libpng-dev/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng-tools/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng16-16t64/testing,now 1.6.44-3 amd64 [installed,automatic] +libproc2-0/testing,now 2:4.0.4-7 amd64 [installed,automatic] +libpsl5t64/testing,now 0.21.2-1.1+b1 amd64 [installed,automatic] +libpython3-stdlib/testing,now 3.13.1-2 amd64 [installed,automatic] +libpython3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libpython3.13-stdlib/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libquadmath0/testing,now 14.2.0-12 amd64 [installed,automatic] +libreadline8t64/testing,now 8.2-6 amd64 [installed,automatic] +librsvg2-2/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librsvg2-common/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librtmp1/testing,now 2.4+20151223.gitfa8646d.1-2+b5 amd64 [installed,automatic] +libsasl2-2/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules-db/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libseccomp2/testing,now 2.5.5-2 amd64 [installed,automatic] +libselinux1-dev/testing,now 3.7-3.1 amd64 [installed,automatic] +libselinux1/testing,now 3.7-3.1 amd64 [installed,automatic] +libsemanage-common/testing,now 3.7-2.1 all [installed,automatic] +libsemanage2/testing,now 3.7-2.1 amd64 [installed,automatic] +libsensors-config/testing,now 1:3.6.0-10 all [installed,automatic] +libsensors5/testing,now 1:3.6.0-10+b1 amd64 [installed,automatic] +libsepol-dev/testing,now 3.7-1 amd64 [installed,automatic] +libsepol2/testing,now 3.7-1 amd64 [installed,automatic] +libsframe1/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libsharpyuv-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsharpyuv0/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsigc++-2.0-0v5/testing,now 2.12.1-3 amd64 [installed,automatic] +libsm-dev/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsm6/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsmartcols1/testing,now 2.40.4-2 amd64 [installed,automatic] +libsqlite3-0/testing,now 3.46.1-1 amd64 [installed,automatic] +libss2/testing,now 1.47.2-1 amd64 [installed,automatic] +libssh2-1t64/testing,now 1.11.1-1 amd64 [installed,automatic] +libssl3t64/testing,now 3.4.0-2 amd64 [installed,automatic] +libstdc++-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libstdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libsysprof-capture-4-dev/testing,now 47.2-1 amd64 [installed,automatic] +libsystemd-dev/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd-shared/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd0/testing,now 257.2-3 amd64 [installed,automatic] +libtasn1-6/testing,now 4.19.0-3+b3 amd64 [installed,automatic] +libtcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +libthai-data/testing,now 0.1.29-2 all [installed,automatic] +libthai-dev/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libthai0/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libtiff-dev/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiff6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiffxx6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtinfo6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libtinyxml2-10/testing,now 10.0.0+dfsg-2+b2 amd64 [installed,automatic] +libtool/testing,now 2.5.4-3 all [installed] +libtsan2/testing,now 14.2.0-12 amd64 [installed,automatic] +libubsan1/testing,now 14.2.0-12 amd64 [installed,automatic] +libudev1/testing,now 257.2-3 amd64 [installed,automatic] +libunistring5/testing,now 1.3-1 amd64 [installed,automatic] +libuuid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libvulkan1/testing,now 1.4.304.0-1 amd64 [installed,automatic] +libwayland-bin/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-client0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-cursor0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-dev/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-egl1/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-server0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwebp-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebp7/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdecoder3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdemux2/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpmux3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libx11-6/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-data/testing,now 2:1.8.10-2 all [installed,automatic] +libx11-dev/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-xcb1/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libxapian30/testing,now 1.4.25-2 amd64 [installed,automatic] +libxau-dev/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxau6/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxaw7/testing,now 2:1.0.16-1 amd64 [installed,automatic] +libxcb-dri2-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-dri3-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-glx0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-present0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-randr0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-sync1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-xfixes0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcomposite-dev/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcomposite1/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcursor-dev/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxcursor1/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxdamage-dev/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdamage1/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdmcp-dev/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxdmcp6/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxext-dev/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxext6/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxfixes-dev/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxfixes3/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxft-dev/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxft2/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxi-dev/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxi6/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxinerama-dev/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxinerama1/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxkbcommon-dev/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbcommon0/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbfile1/testing,now 1:1.1.0-1+b4 amd64 [installed,automatic] +libxklavier-dev/testing,now 5.4-5+b2 amd64 [installed] +libxklavier16/testing,now 5.4-5+b2 amd64 [installed,automatic] +libxml2-dev/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxml2-utils/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed] +libxml2/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxmu6/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxmuu1/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxpm4/testing,now 1:3.5.17-1+b3 amd64 [installed,automatic] +libxrandr-dev/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrandr2/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrender-dev/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxrender1/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxshmfence1/testing,now 1.3-1+b3 amd64 [installed,automatic] +libxt6t64/testing,now 1:1.2.1-1.2+b2 amd64 [installed,automatic] +libxtst-dev/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxtst6/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxxf86vm1/testing,now 1:1.1.4-1+b4 amd64 [installed,automatic] +libxxhash0/testing,now 0.8.2-2+b2 amd64 [installed,automatic] +libyaml-0-2/testing,now 0.2.5-2 amd64 [installed,automatic] +libz3-4/testing,now 4.13.3-1 amd64 [installed,automatic] +libz3-dev/testing,now 4.13.3-1 amd64 [installed,automatic] +libzstd-dev/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +libzstd1/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +linux-libc-dev/testing,now 6.12.11-1 all [installed,automatic] +linux-sysctl-defaults/testing,now 4.11 all [installed,automatic] +llvm-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-linker-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-runtime/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +login.defs/testing,now 1:4.16.0-7 all [installed,automatic] +login/testing,now 1:4.16.0-2+really2.40.4-2 amd64 [installed,automatic] +logsave/testing,now 1.47.2-1 amd64 [installed,automatic] +m4/testing,now 1.4.19-5 amd64 [installed,automatic] +make/testing,now 4.4.1-1 amd64 [installed] +manpages-dev/testing,now 6.9.1-1 all [installed,automatic] +manpages/testing,now 6.9.1-1 all [installed,automatic] +mawk/testing,now 1.3.4.20240905-1 amd64 [installed,automatic] +media-types/testing,now 10.1.0 all [installed,automatic] +mesa-libgallium/testing,now 24.2.8-1 amd64 [installed,automatic] +mesa-vulkan-drivers/testing,now 24.2.8-1 amd64 [installed,automatic] +mount/testing,now 2.40.4-2 amd64 [installed,automatic] +native-architecture/testing,now 0.2.5 all [installed,automatic] +ncurses-base/testing,now 6.5-2 all [installed,automatic] +ncurses-bin/testing,now 6.5-2+b1 amd64 [installed,automatic] +netbase/testing,now 6.4 all [installed,automatic] +openssh-client/testing,now 1:9.9p1-3 amd64 [installed,automatic] +openssl-provider-legacy/testing,now 3.4.0-2 amd64 [installed,automatic] +openssl/testing,now 3.4.0-2 amd64 [installed,automatic] +pango1.0-tools/testing,now 1.56.1-1 amd64 [installed,automatic] +passwd/testing,now 1:4.16.0-7 amd64 [installed,automatic] +patch/testing,now 2.7.6-7 amd64 [installed,automatic] +perl-base/testing,now 5.40.0-8 amd64 [installed,automatic] +perl-modules-5.40/testing,now 5.40.0-8 all [installed,automatic] +perl/testing,now 5.40.0-8 amd64 [installed,automatic] +pinentry-curses/testing,now 1.3.1-2 amd64 [installed,automatic] +pkgconf-bin/testing,now 1.8.1-4 amd64 [installed,automatic] +pkgconf/testing,now 1.8.1-4 amd64 [installed,automatic] +procps/testing,now 2:4.0.4-7 amd64 [installed,automatic] +psmisc/testing,now 23.7-1 amd64 [installed,automatic] +publicsuffix/testing,now 20250108.1153-0.1 all [installed,automatic] +python3-autocommand/testing,now 2.2.2-3 all [installed,automatic] +python3-inflect/testing,now 7.3.1-2 all [installed,automatic] +python3-jaraco.context/testing,now 6.0.0-1 all [installed,automatic] +python3-jaraco.functools/testing,now 4.1.0-1 all [installed,automatic] +python3-jaraco.text/testing,now 4.0.0-1 all [installed,automatic] +python3-mako/testing,now 1.3.8-2 all [installed,automatic] +python3-markdown/testing,now 3.7-2 all [installed,automatic] +python3-markupsafe/testing,now 2.1.5-1+b2 amd64 [installed,automatic] +python3-minimal/testing,now 3.13.1-2 amd64 [installed,automatic] +python3-more-itertools/testing,now 10.6.0-1 all [installed,automatic] +python3-packaging/testing,now 24.2-1 all [installed,automatic] +python3-pkg-resources/testing,now 75.6.0-1 all [installed,automatic] +python3-pygments/testing,now 2.18.0+dfsg-2 all [installed,automatic] +python3-setuptools/testing,now 75.6.0-1 all [installed,automatic] +python3-typeguard/testing,now 4.4.1-1 all [installed,automatic] +python3-typing-extensions/testing,now 4.12.2-2 all [installed,automatic] +python3-yaml/testing,now 6.0.2-1+b1 amd64 [installed,automatic] +python3-zipp/testing,now 3.21.0-1 all [installed,automatic] +python3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3.13/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3/testing,now 3.13.1-2 amd64 [installed,automatic] +readline-common/testing,now 8.2-6 all [installed,automatic] +rpcsvc-proto/testing,now 1.4.3-1 amd64 [installed,automatic] +sed/testing,now 4.9-2 amd64 [installed,automatic] +sensible-utils/testing,now 0.0.24 all [installed,automatic] +sgml-base/testing,now 1.31 all [installed,automatic] +shared-mime-info/testing,now 2.4-5+b2 amd64 [installed,automatic] +sqv/testing,now 1.2.1-5 amd64 [installed,automatic] +systemd-cryptsetup/testing,now 257.2-3 amd64 [installed,automatic] +systemd-sysv/testing,now 257.2-3 amd64 [installed,automatic] +systemd-timesyncd/testing,now 257.2-3 amd64 [installed,automatic] +systemd/testing,now 257.2-3 amd64 [installed,automatic] +sysvinit-utils/testing,now 3.13-1 amd64 [installed,automatic] +tar/testing,now 1.35+dfsg-3.1 amd64 [installed,automatic] +tcl-expect/testing,now 5.45.4-3+b1 amd64 [installed,automatic] +tcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +tzdata/testing,now 2024b-6 all [installed,automatic] +util-linux/testing,now 2.40.4-2 amd64 [installed,automatic] +uuid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +wayland-protocols/testing,now 1.39-1 all [installed,automatic] +wget/testing,now 1.24.5-2+b1 amd64 [installed] +x11-common/testing,now 1:7.7+24 all [installed,automatic] +x11-xkb-utils/testing,now 7.7+9 amd64 [installed,automatic] +x11proto-dev/testing,now 2024.1-1 all [installed,automatic] +xauth/testing,now 1:1.1.2-1.1 amd64 [installed,automatic] +xdg-user-dirs/testing,now 0.18-2 amd64 [installed,automatic] +xkb-data/testing,now 2.42-1 all [installed,automatic] +xml-core/testing,now 0.19 all [installed,automatic] +xorg-sgml-doctools/testing,now 1:1.11-1.1 all [installed,automatic] +xtrans-dev/testing,now 1.4.0-1 all [installed,automatic] +xz-utils/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +zlib1g-dev/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +zlib1g/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +Errors detected in the build 0 +Warnings detected in the logs 95 +cppcheck defects detected in the logs 28 +TOTAL warnings detected in the logs 123 diff --git a/2025-02-06-151929-14522-1@8369334ba1f3_devel/report-37cb39.html b/2025-02-06-151929-14522-1@8369334ba1f3_devel/report-37cb39.html new file mode 100644 index 0000000..774b57b --- /dev/null +++ b/2025-02-06-151929-14522-1@8369334ba1f3_devel/report-37cb39.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 248, column 21
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-151929-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
This statement is never executed
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-151929-14522-1@8369334ba1f3_devel/report-523ef4.html b/2025-02-06-151929-14522-1@8369334ba1f3_devel/report-523ef4.html new file mode 100644 index 0000000..dc045e9 --- /dev/null +++ b/2025-02-06-151929-14522-1@8369334ba1f3_devel/report-523ef4.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 199, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-151929-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
This statement is never executed
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-151929-14522-1@8369334ba1f3_devel/report-5ce420.html b/2025-02-06-151929-14522-1@8369334ba1f3_devel/report-5ce420.html new file mode 100644 index 0000000..d3ac47a --- /dev/null +++ b/2025-02-06-151929-14522-1@8369334ba1f3_devel/report-5ce420.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 194, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-151929-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
This statement is never executed
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-151929-14522-1@8369334ba1f3_devel/report-5d4bc8.html b/2025-02-06-151929-14522-1@8369334ba1f3_devel/report-5d4bc8.html new file mode 100644 index 0000000..caadf8e --- /dev/null +++ b/2025-02-06-151929-14522-1@8369334ba1f3_devel/report-5d4bc8.html @@ -0,0 +1,1609 @@ + + + +/rootdir/libcafekbd/tmp-introspect6j1o7dr2/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspect6j1o7dr2/Cafekbd-1.0.c
Warning:line 89, column 13
File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libpng16 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/atk-1.0 -I /usr/include/pango-1.0 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/libxml2 -I /usr/include/gio-unix-2.0 -I /usr/include/ctk-3.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-151929-14522-1 -x c /rootdir/libcafekbd/tmp-introspect6j1o7dr2/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
14
Loop condition is true. Entering loop body
28
Loop condition is true. Entering loop body
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
15
Assuming this stream operation fails
29
File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior
90 if (ret
15.1
'ret' is equal to 0
== 0)
16
Taking true branch
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out
16.1
'len_out' is not equal to NULL
!= NULL((void*)0))
17
Taking true branch
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
6
Assuming 'args' is not equal to NULL
7
Taking false branch
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
8
Assuming 'self' is non-null
9
Taking false branch
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input
9.1
'input' is not equal to NULL
== NULL((void*)0))
10
Taking false branch
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output
10.1
'output' is not equal to NULL
== NULL((void*)0))
11
Taking false branch
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
12
Loop condition is true. Entering loop body
26
Loop condition is true. Entering loop body
702 {
703 gsize len;
704 char *line = read_line (input, &len);
13
Calling 'read_line'
18
Returning from 'read_line'
27
Calling 'read_line'
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
19
Assuming 'line' is not equal to NULL
20
Assuming the condition is false
21
Taking false branch
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
22
Assuming the condition is false
23
Taking false branch
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
24
Assuming the condition is false
25
Taking false branch
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
742
743 if (quark == 0)
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
1
Assuming 'argc' is equal to 2
2
'?' condition is false
3
Assuming the condition is false
4
Taking false branch
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
5
Calling 'dump_irepository'
811 {
812 g_printerr ("%s\n", error->message);
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-151929-14522-1@8369334ba1f3_devel/report-891289.html b/2025-02-06-151929-14522-1@8369334ba1f3_devel/report-891289.html new file mode 100644 index 0000000..566dd17 --- /dev/null +++ b/2025-02-06-151929-14522-1@8369334ba1f3_devel/report-891289.html @@ -0,0 +1,1603 @@ + + + +/rootdir/libcafekbd/tmp-introspect6j1o7dr2/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspect6j1o7dr2/Cafekbd-1.0.c
Warning:line 812, column 27
Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error')
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libpng16 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/atk-1.0 -I /usr/include/pango-1.0 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/libxml2 -I /usr/include/gio-unix-2.0 -I /usr/include/ctk-3.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-151929-14522-1 -x c /rootdir/libcafekbd/tmp-introspect6j1o7dr2/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
90 if (ret == 0)
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out != NULL((void*)0))
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
21
Assuming the condition is false
22
Taking false branch
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
23
Returning without writing to '*error'
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
7
Assuming 'args' is not equal to NULL
8
Taking false branch
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
9
Assuming 'self' is non-null
10
Taking false branch
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input
10.1
'input' is not equal to NULL
== NULL((void*)0))
11
Taking false branch
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output
11.1
'output' is not equal to NULL
== NULL((void*)0))
12
Taking false branch
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
13
Loop condition is true. Entering loop body
702 {
703 gsize len;
704 char *line = read_line (input, &len);
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
14
Assuming 'line' is not equal to NULL
15
Assuming the condition is false
16
Taking false branch
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
17
Assuming the condition is false
18
Taking false branch
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
19
Taking true branch
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
20
Calling 'invoke_error_quark'
24
Returning from 'invoke_error_quark'
742
743 if (quark == 0)
25
Assuming 'quark' is equal to 0
26
Taking true branch
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
27
Returning without writing to '*error'
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
1
'error' initialized to a null pointer value
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
2
Assuming 'argc' is equal to 2
3
'?' condition is false
4
Assuming the condition is false
5
Taking false branch
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
6
Calling 'dump_irepository'
28
Returning from 'dump_irepository'
29
Taking true branch
811 {
812 g_printerr ("%s\n", error->message);
30
Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error')
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-151929-14522-1@8369334ba1f3_devel/report-9361af.html b/2025-02-06-151929-14522-1@8369334ba1f3_devel/report-9361af.html new file mode 100644 index 0000000..0a5117e --- /dev/null +++ b/2025-02-06-151929-14522-1@8369334ba1f3_devel/report-9361af.html @@ -0,0 +1,1609 @@ + + + +/rootdir/libcafekbd/tmp-introspect6j1o7dr2/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspect6j1o7dr2/Cafekbd-1.0.c
Warning:line 89, column 13
Read function called when stream is in EOF state. Function has no effect
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libpng16 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/atk-1.0 -I /usr/include/pango-1.0 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/libxml2 -I /usr/include/gio-unix-2.0 -I /usr/include/ctk-3.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-151929-14522-1 -x c /rootdir/libcafekbd/tmp-introspect6j1o7dr2/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
14
Loop condition is true. Entering loop body
28
Loop condition is true. Entering loop body
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
15
Assuming stream reaches end-of-file here
29
Read function called when stream is in EOF state. Function has no effect
90 if (ret
15.1
'ret' is equal to 0
== 0)
16
Taking true branch
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out
16.1
'len_out' is not equal to NULL
!= NULL((void*)0))
17
Taking true branch
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
6
Assuming 'args' is not equal to NULL
7
Taking false branch
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
8
Assuming 'self' is non-null
9
Taking false branch
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input
9.1
'input' is not equal to NULL
== NULL((void*)0))
10
Taking false branch
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output
10.1
'output' is not equal to NULL
== NULL((void*)0))
11
Taking false branch
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
12
Loop condition is true. Entering loop body
26
Loop condition is true. Entering loop body
702 {
703 gsize len;
704 char *line = read_line (input, &len);
13
Calling 'read_line'
18
Returning from 'read_line'
27
Calling 'read_line'
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
19
Assuming 'line' is not equal to NULL
20
Assuming the condition is false
21
Taking false branch
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
22
Assuming the condition is false
23
Taking false branch
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
24
Assuming the condition is false
25
Taking false branch
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
742
743 if (quark == 0)
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
1
Assuming 'argc' is equal to 2
2
'?' condition is false
3
Assuming the condition is false
4
Taking false branch
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
5
Calling 'dump_irepository'
811 {
812 g_printerr ("%s\n", error->message);
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-151929-14522-1@8369334ba1f3_devel/report-b4532a.html b/2025-02-06-151929-14522-1@8369334ba1f3_devel/report-b4532a.html new file mode 100644 index 0000000..e37aa44 --- /dev/null +++ b/2025-02-06-151929-14522-1@8369334ba1f3_devel/report-b4532a.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 228, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-151929-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
This statement is never executed
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-151929-14522-1@8369334ba1f3_devel/report-c098bd.html b/2025-02-06-151929-14522-1@8369334ba1f3_devel/report-c098bd.html new file mode 100644 index 0000000..3548bbf --- /dev/null +++ b/2025-02-06-151929-14522-1@8369334ba1f3_devel/report-c098bd.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 187, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-151929-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
This statement is never executed
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-151929-14522-1@8369334ba1f3_devel/report-e0f2de.html b/2025-02-06-151929-14522-1@8369334ba1f3_devel/report-e0f2de.html new file mode 100644 index 0000000..46c5ae1 --- /dev/null +++ b/2025-02-06-151929-14522-1@8369334ba1f3_devel/report-e0f2de.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 225, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-151929-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
This statement is never executed
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-151929-14522-1@8369334ba1f3_devel/report-fb6164.html b/2025-02-06-151929-14522-1@8369334ba1f3_devel/report-fb6164.html new file mode 100644 index 0000000..73421d9 --- /dev/null +++ b/2025-02-06-151929-14522-1@8369334ba1f3_devel/report-fb6164.html @@ -0,0 +1,1504 @@ + + + +/rootdir/libcafekbd/tmp-introspect6j1o7dr2/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspect6j1o7dr2/Cafekbd-1.0.c
Warning:line 239, column 11
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libpng16 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/atk-1.0 -I /usr/include/pango-1.0 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/libxml2 -I /usr/include/gio-unix-2.0 -I /usr/include/ctk-3.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-151929-14522-1 -x c /rootdir/libcafekbd/tmp-introspect6j1o7dr2/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
90 if (ret == 0)
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out != NULL((void*)0))
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
This statement is never executed
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input == NULL((void*)0))
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output == NULL((void*)0))
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
702 {
703 gsize len;
704 char *line = read_line (input, &len);
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
742
743 if (quark == 0)
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
811 {
812 g_printerr ("%s\n", error->message);
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-151929-14522-1@8369334ba1f3_devel/report-ff92e7.html b/2025-02-06-151929-14522-1@8369334ba1f3_devel/report-ff92e7.html new file mode 100644 index 0000000..6a76fda --- /dev/null +++ b/2025-02-06-151929-14522-1@8369334ba1f3_devel/report-ff92e7.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 256, column 21
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-151929-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
This statement is never executed
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-151929-14522-1@8369334ba1f3_devel/scanview.css b/2025-02-06-151929-14522-1@8369334ba1f3_devel/scanview.css new file mode 100644 index 0000000..cf8a5a6 --- /dev/null +++ b/2025-02-06-151929-14522-1@8369334ba1f3_devel/scanview.css @@ -0,0 +1,62 @@ +body { color:#000000; background-color:#ffffff } +body { font-family: Helvetica, sans-serif; font-size:9pt } +h1 { font-size: 14pt; } +h2 { font-size: 12pt; } +table { font-size:9pt } +table { border-spacing: 0px; border: 1px solid black } +th, table thead { + background-color:#eee; color:#666666; + font-weight: bold; cursor: default; + text-align:center; + font-weight: bold; font-family: Verdana; + white-space:nowrap; +} +.W { font-size:0px } +th, td { padding:5px; padding-left:8px; text-align:left } +td.SUMM_DESC { padding-left:12px } +td.DESC { white-space:pre } +td.Q { text-align:right } +td { text-align:left } +tbody.scrollContent { overflow:auto } + +table.form_group { + background-color: #ccc; + border: 1px solid #333; + padding: 2px; +} + +table.form_inner_group { + background-color: #ccc; + border: 1px solid #333; + padding: 0px; +} + +table.form { + background-color: #999; + border: 1px solid #333; + padding: 2px; +} + +td.form_label { + text-align: right; + vertical-align: top; +} +/* For one line entires */ +td.form_clabel { + text-align: right; + vertical-align: center; +} +td.form_value { + text-align: left; + vertical-align: top; +} +td.form_submit { + text-align: right; + vertical-align: top; +} + +h1.SubmitFail { + color: #f00; +} +h1.SubmitOk { +} diff --git a/2025-02-06-151929-14522-1@8369334ba1f3_devel/sorttable.js b/2025-02-06-151929-14522-1@8369334ba1f3_devel/sorttable.js new file mode 100644 index 0000000..e608daa --- /dev/null +++ b/2025-02-06-151929-14522-1@8369334ba1f3_devel/sorttable.js @@ -0,0 +1,512 @@ +/* + SortTable + version 2 + 7th April 2007 + Stuart Langridge, http://www.kryogenix.org/code/browser/sorttable/ + + Instructions: + Download this file + Add to your HTML + Add class="sortable" to any table you'd like to make sortable + Click on the headers to sort + + Thanks to many, many people for contributions and suggestions. + Licenced as X11: http://www.kryogenix.org/code/browser/licence.html + This basically means: do what you want with it. +*/ + + +var stIsIE = /*@cc_on!@*/false; + +sorttable = { + init: function() { + // quit if this function has already been called + if (arguments.callee.done) return; + // flag this function so we don't do the same thing twice + arguments.callee.done = true; + // kill the timer + if (_timer) clearInterval(_timer); + + if (!document.createElement || !document.getElementsByTagName) return; + + sorttable.DATE_RE = /^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/; + + forEach(document.getElementsByTagName('table'), function(table) { + if (table.className.search(/\bsortable\b/) != -1) { + sorttable.makeSortable(table); + } + }); + + }, + + makeSortable: function(table) { + if (table.getElementsByTagName('thead').length == 0) { + // table doesn't have a tHead. Since it should have, create one and + // put the first table row in it. + the = document.createElement('thead'); + the.appendChild(table.rows[0]); + table.insertBefore(the,table.firstChild); + } + // Safari doesn't support table.tHead, sigh + if (table.tHead == null) table.tHead = table.getElementsByTagName('thead')[0]; + + if (table.tHead.rows.length != 1) return; // can't cope with two header rows + + // Sorttable v1 put rows with a class of "sortbottom" at the bottom (as + // "total" rows, for example). This is B&R, since what you're supposed + // to do is put them in a tfoot. So, if there are sortbottom rows, + // for backward compatibility, move them to tfoot (creating it if needed). + sortbottomrows = []; + for (var i=0; i5' : ' ▴'; + this.appendChild(sortrevind); + return; + } + if (this.className.search(/\bsorttable_sorted_reverse\b/) != -1) { + // if we're already sorted by this column in reverse, just + // re-reverse the table, which is quicker + sorttable.reverse(this.sorttable_tbody); + this.className = this.className.replace('sorttable_sorted_reverse', + 'sorttable_sorted'); + this.removeChild(document.getElementById('sorttable_sortrevind')); + sortfwdind = document.createElement('span'); + sortfwdind.id = "sorttable_sortfwdind"; + sortfwdind.innerHTML = stIsIE ? ' 6' : ' ▾'; + this.appendChild(sortfwdind); + return; + } + + // remove sorttable_sorted classes + theadrow = this.parentNode; + forEach(theadrow.childNodes, function(cell) { + if (cell.nodeType == 1) { // an element + cell.className = cell.className.replace('sorttable_sorted_reverse',''); + cell.className = cell.className.replace('sorttable_sorted',''); + } + }); + sortfwdind = document.getElementById('sorttable_sortfwdind'); + if (sortfwdind) { sortfwdind.parentNode.removeChild(sortfwdind); } + sortrevind = document.getElementById('sorttable_sortrevind'); + if (sortrevind) { sortrevind.parentNode.removeChild(sortrevind); } + + this.className += ' sorttable_sorted'; + sortfwdind = document.createElement('span'); + sortfwdind.id = "sorttable_sortfwdind"; + sortfwdind.innerHTML = stIsIE ? ' 6' : ' ▾'; + this.appendChild(sortfwdind); + + // build an array to sort. This is a Schwartzian transform thing, + // i.e., we "decorate" each row with the actual sort key, + // sort based on the sort keys, and then put the rows back in order + // which is a lot faster because you only do getInnerText once per row + row_array = []; + col = this.sorttable_columnindex; + rows = this.sorttable_tbody.rows; + for (var j=0; j 12) { + // definitely dd/mm + return sorttable.sort_ddmm; + } else if (second > 12) { + return sorttable.sort_mmdd; + } else { + // looks like a date, but we can't tell which, so assume + // that it's dd/mm (English imperialism!) and keep looking + sortfn = sorttable.sort_ddmm; + } + } + } + } + return sortfn; + }, + + getInnerText: function(node) { + // gets the text we want to use for sorting for a cell. + // strips leading and trailing whitespace. + // this is *not* a generic getInnerText function; it's special to sorttable. + // for example, you can override the cell text with a customkey attribute. + // it also gets .value for fields. + + hasInputs = (typeof node.getElementsByTagName == 'function') && + node.getElementsByTagName('input').length; + + if (node.getAttribute("sorttable_customkey") != null) { + return node.getAttribute("sorttable_customkey"); + } + else if (typeof node.textContent != 'undefined' && !hasInputs) { + return node.textContent.replace(/^\s+|\s+$/g, ''); + } + else if (typeof node.innerText != 'undefined' && !hasInputs) { + return node.innerText.replace(/^\s+|\s+$/g, ''); + } + else if (typeof node.text != 'undefined' && !hasInputs) { + return node.text.replace(/^\s+|\s+$/g, ''); + } + else { + switch (node.nodeType) { + case 3: + if (node.nodeName.toLowerCase() == 'input') { + return node.value.replace(/^\s+|\s+$/g, ''); + } + case 4: + return node.nodeValue.replace(/^\s+|\s+$/g, ''); + break; + case 1: + case 11: + var innerText = ''; + for (var i = 0; i < node.childNodes.length; i++) { + innerText += sorttable.getInnerText(node.childNodes[i]); + } + return innerText.replace(/^\s+|\s+$/g, ''); + break; + default: + return ''; + } + } + }, + + reverse: function(tbody) { + // reverse the rows in a tbody + newrows = []; + for (var i=0; i=0; i--) { + tbody.appendChild(newrows[i]); + } + delete newrows; + }, + + /* sort functions + each sort function takes two parameters, a and b + you are comparing a[0] and b[0] */ + sort_numeric: function(a,b) { + aa = parseFloat(a[0].replace(/[^0-9.-]/g,'')); + if (isNaN(aa)) aa = 0; + bb = parseFloat(b[0].replace(/[^0-9.-]/g,'')); + if (isNaN(bb)) bb = 0; + return aa-bb; + }, + sort_alpha: function(a,b) { + if (a[0]==b[0]) return 0; + if (a[0] 0 ) { + var q = list[i]; list[i] = list[i+1]; list[i+1] = q; + swap = true; + } + } // for + t--; + + if (!swap) break; + + for(var i = t; i > b; --i) { + if ( comp_func(list[i], list[i-1]) < 0 ) { + var q = list[i]; list[i] = list[i-1]; list[i-1] = q; + swap = true; + } + } // for + b++; + + } // while(swap) + } +} + +/* ****************************************************************** + Supporting functions: bundled here to avoid depending on a library + ****************************************************************** */ + +// Dean Edwards/Matthias Miller/John Resig + +/* for Mozilla/Opera9 */ +if (document.addEventListener) { + document.addEventListener("DOMContentLoaded", sorttable.init, false); +} + +/* for Internet Explorer */ +/*@cc_on @*/ +/*@if (@_win32) + document.write(" + + + + +

libcafekbd (clang-tools 1:19.0-63) - scan-build results

+ + + + + + + +
User:root@8a83486eb19b
Working Directory:/rootdir
Command Line:make -j 5
Clang Version:Debian clang version 19.1.6 (1+b1) +
Date:Thu Feb 6 15:20:34 2025
+

Bug Summary

+ + + + + + + + + +
Bug TypeQuantityDisplay?
All Bugs11
Logic error
Dereference of null pointer1
Stream handling error
Invalid stream state1
Stream already in EOF1
Unused code
Unreachable code8
+ +

Filter Results by File

+ + +

Reports

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Bug GroupBug Type ▾FileFunction/MethodLinePath Length
Logic errorDereference of null pointerlibcafekbd/tmp-introspectya_6du8x/Cafekbd-1.0.cmain81232View Report
Stream handling errorInvalid stream statelibcafekbd/tmp-introspectya_6du8x/Cafekbd-1.0.cread_line8933View Report
Stream handling errorStream already in EOFlibcafekbd/tmp-introspectya_6du8x/Cafekbd-1.0.cread_line8933View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2481View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain1991View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain1941View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2281View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain1871View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2251View Report
Unused codeUnreachable codelibcafekbd/tmp-introspectya_6du8x/Cafekbd-1.0.cvalue_to_string2391View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2561View Report
+ + diff --git a/2025-02-06-152034-14522-1@76170f64aaf1_devel/output_76170f64aaf12527a5400b10171e2b01d43a5d7b b/2025-02-06-152034-14522-1@76170f64aaf1_devel/output_76170f64aaf12527a5400b10171e2b01d43a5d7b new file mode 100644 index 0000000..93e81bd --- /dev/null +++ b/2025-02-06-152034-14522-1@76170f64aaf1_devel/output_76170f64aaf12527a5400b10171e2b01d43a5d7b @@ -0,0 +1,1866 @@ +Checking libcafekbd/cafekbd-desktop-config.c ... +libcafekbd/cafekbd-desktop-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +1/10 files checked 4% done +Checking libcafekbd/cafekbd-indicator-config.c ... +libcafekbd/cafekbd-indicator-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +2/10 files checked 10% done +Checking libcafekbd/cafekbd-indicator.c ... +libcafekbd/cafekbd-indicator.c:66:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdIndicator, cafekbd_indicator, CTK_TYPE_NOTEBOOK) +^ +3/10 files checked 24% done +Checking libcafekbd/cafekbd-keyboard-config.c ... +libcafekbd/cafekbd-keyboard-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-config.c:67:8: style: Condition '*l1' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:67:15: style: Condition '*l2' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:227:16: style: Condition 'option!=NULL' is always true [knownConditionTrueFalse] + (option != NULL) ? strchr (option, ':') : NULL; + ^ +libcafekbd/cafekbd-keyboard-config.c:282:18: style: Condition 'variant==NULL' is always false [knownConditionTrueFalse] + (variant == + ^ +libcafekbd/cafekbd-keyboard-config.c:226:10: style: Variable 'delim' can be declared as pointer to const [constVariablePointer] + char *delim = + ^ +libcafekbd/cafekbd-keyboard-config.c:609:65: style: Parameter 'kbd_config' can be declared as pointer to const [constParameterPointer] +cafekbd_keyboard_config_options_is_set (CafekbdKeyboardConfig * kbd_config, + ^ +4/10 files checked 36% done +Checking libcafekbd/cafekbd-keyboard-drawing.c ... +libcafekbd/cafekbd-keyboard-drawing.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-drawing.c:61:60: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_coord (CafekbdKeyboardDrawingRenderContext * context, gint n) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:67:61: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_double (CafekbdKeyboardDrawingRenderContext * context, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:625:51: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +set_markup (CafekbdKeyboardDrawingRenderContext * context, gchar *txt) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1026:11: style: Variable 'runp' can be declared as pointer to const [constVariablePointer] + GSList *runp; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1036:25: style: Variable 'geometry' can be declared as pointer to const [constVariablePointer] + PangoGlyphGeometry *geometry; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1202:39: style: Parameter 'outline' can be declared as pointer to const [constParameterPointer] +calc_origin_offset_x (XkbOutlineRec * outline) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1397:15: style: Variable 'shape' can be declared as pointer to const [constVariablePointer] + XkbShapeRec *shape; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: style: Parameter 'drawing' can be declared as pointer to const. However it seems that 'button_press_event' is a callback function, if 'drawing' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2343:18: note: You might need to cast the function pointer here + G_CALLBACK (button_press_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: note: Parameter 'drawing' can be declared as pointer to const + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: style: Parameter 'event' can be declared as pointer to const. However it seems that 'focus_event' is a callback function, if 'event' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2347:18: note: You might need to cast the function pointer here + G_CALLBACK (focus_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: note: Parameter 'event' can be declared as pointer to const + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: style: Parameter 'a' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'a' is declared with const you might also need to cast function pointer(s). [constParameterCallback] +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: note: Parameter 'a' can be declared as pointer to const +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: style: Parameter 'b' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'b' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: note: Parameter 'b' can be declared as pointer to const + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1863:9: style: Variable 'pind' can be declared as pointer to const [constVariablePointer] + Atom *pind = drawing->xkb->names->indicators; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2124:60: style: Parameter 'iev' can be declared as pointer to const [constParameterPointer] +process_indicators_state_notify (XkbIndicatorNotifyEvent * iev, + ^ +Checking libcafekbd/cafekbd-keyboard-drawing.c: KBDRAW_DEBUG... +5/10 files checked 77% done +Checking libcafekbd/cafekbd-status.c ... +libcafekbd/cafekbd-status.c:82:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdStatus, cafekbd_status, CTK_TYPE_STATUS_ICON) +^ +6/10 files checked 91% done +Checking libcafekbd/cafekbd-util.c ... +7/10 files checked 93% done +Checking test/cafekbd-indicator-test.c ... +8/10 files checked 94% done +Checking test/cafekbd-keyboard-drawing-test.c ... +test/cafekbd-keyboard-drawing-test.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +Checking test/cafekbd-keyboard-drawing-test.c: HAVE_CONFIG_H... +9/10 files checked 99% done +Checking test/cafekbd-status-test.c ... +test/cafekbd-status-test.c:42:17: style: Variable 'icon' can be declared as pointer to const [constVariablePointer] + CtkStatusIcon *icon; + ^ +10/10 files checked 100% done +nofile:0:0: information: Active checkers: There was critical errors (use --checkers-report= to see details) [checkersReport] + +/usr/bin/cafe-autogen +checking for autoreconf >= 2.53... + testing autoreconf... found 2.72 +checking for pkg-config >= 0.14.0... + testing pkg-config... found 1.8.1 +checking for cafe-common >= 0.0.1... + testing cafe-doc-common... found 2.0.0 +Checking for required M4 macros... +Checking for forbidden M4 macros... +Processing ./configure.ac +Running cafe-doc-common... +Running autoreconf... +autoreconf: export WARNINGS=no-portability +autoreconf: Entering directory '.' +autoreconf: running: autopoint --force +Copying file ABOUT-NLS +Copying file config.rpath +Copying file m4/codeset.m4 +Copying file m4/extern-inline.m4 +Copying file m4/fcntl-o.m4 +Copying file m4/gettext.m4 +Copying file m4/glibc2.m4 +Copying file m4/glibc21.m4 +Copying file m4/iconv.m4 +Copying file m4/intdiv0.m4 +Copying file m4/intl.m4 +Copying file m4/intldir.m4 +Copying file m4/intlmacosx.m4 +Copying file m4/intmax.m4 +Copying file m4/inttypes-pri.m4 +Copying file m4/inttypes_h.m4 +Copying file m4/lcmessage.m4 +Copying file m4/lib-ld.m4 +Copying file m4/lib-link.m4 +Copying file m4/lib-prefix.m4 +Copying file m4/lock.m4 +Copying file m4/longlong.m4 +Copying file m4/nls.m4 +Copying file m4/po.m4 +Copying file m4/printf-posix.m4 +Copying file m4/progtest.m4 +Copying file m4/size_max.m4 +Copying file m4/stdint_h.m4 +Copying file m4/threadlib.m4 +Copying file m4/uintmax_t.m4 +Copying file m4/visibility.m4 +Copying file m4/wchar_t.m4 +Copying file m4/wint_t.m4 +Copying file m4/xsize.m4 +Copying file po/Makefile.in.in +Copying file po/Makevars.template +Copying file po/Rules-quot +Copying file po/boldquot.sed +Copying file po/en@boldquot.header +Copying file po/en@quot.header +Copying file po/insert-header.sin +Copying file po/quot.sed +Copying file po/remove-potcdate.sin +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: configure.ac: tracing +autoreconf: running: libtoolize --copy --force +libtoolize: putting auxiliary files in '.'. +libtoolize: copying file './ltmain.sh' +libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. +libtoolize: copying file 'm4/libtool.m4' +libtoolize: copying file 'm4/ltoptions.m4' +libtoolize: copying file 'm4/ltsugar.m4' +libtoolize: copying file 'm4/ltversion.m4' +libtoolize: copying file 'm4/lt~obsolete.m4' +autoreconf: configure.ac: not using Intltool +autoreconf: configure.ac: not using Gtkdoc +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: running: /usr/bin/autoconf --force +autoreconf: running: /usr/bin/autoheader --force +autoreconf: running: automake --add-missing --copy --force-missing +configure.ac:31: installing './compile' +configure.ac:34: installing './config.guess' +configure.ac:34: installing './config.sub' +configure.ac:16: installing './install-sh' +configure.ac:16: installing './missing' +Makefile.am: installing './INSTALL' +libcafekbd/Makefile.am: installing './depcomp' +autoreconf: Leaving directory '.' +Skipping configure process. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +checking for a BSD-compatible install... /usr/bin/install -c +checking whether sleep supports fractional seconds... yes +checking filesystem timestamp resolution... 0.01 +checking whether build environment is sane... yes +checking for a race-free mkdir -p... /usr/bin/mkdir -p +checking for gawk... no +checking for mawk... mawk +checking whether make sets $(MAKE)... yes +checking whether make supports nested variables... yes +checking xargs -n works... yes +checking whether make supports the include directive... yes (GNU style) +checking for gcc... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the C compiler works... yes +checking for C compiler default output file name... a.out +checking for suffix of executables... +checking whether we are cross compiling... no +checking for suffix of object files... o +checking whether the compiler supports GNU C... yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... rm: cannot remove 'conftest.plist': Is a directory +yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... gcc3 +checking whether C compiler accepts -Werror=unknown-warning-option... no +checking whether C compiler accepts -Wall... yes +checking whether C compiler accepts -Wmissing-prototypes... yes +checking whether C compiler accepts -Wbad-function-cast... yes +checking whether C compiler accepts -Wcast-align... yes +checking whether C compiler accepts -Wextra... yes +checking whether C compiler accepts -Wformat-nonliteral... yes +checking whether C compiler accepts -Wmissing-declarations... yes +checking whether C compiler accepts -Wnested-externs... yes +checking whether C compiler accepts -Wpointer-arith... yes +checking whether C compiler accepts -Wredundant-decls... yes +checking whether C compiler accepts -Wshadow... yes +checking whether C compiler accepts -Wstrict-prototypes... yes +checking whether C compiler accepts -Wunused-macros... yes +checking whether C compiler accepts -Werror=format-security... yes +checking whether C compiler accepts -fstrict-aliasing... yes +checking flags to pass to the C compiler /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing +checking for gcc... (cached) /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the compiler supports GNU C... (cached) yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... (cached) yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... (cached) none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... (cached) yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... (cached) gcc3 +checking build system type... x86_64-pc-linux-gnu +checking host system type... x86_64-pc-linux-gnu +checking how to print strings... printf +checking for a sed that does not truncate output... /usr/bin/sed +checking for grep that handles long lines and -e... /usr/bin/grep +checking for egrep... /usr/bin/grep -E +checking for fgrep... /usr/bin/grep -F +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld +checking if the linker (/usr/bin/ld) is GNU ld... yes +checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B +checking the name lister (/usr/bin/nm -B) interface... rm: cannot remove 'conftest.plist': Is a directory +BSD nm +checking whether ln -s works... yes +checking the maximum length of command line arguments... 3145728 +checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop +checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop +checking for /usr/bin/ld option to reload object files... -r +checking for file... file +checking for objdump... objdump +checking how to recognize dependent libraries... pass_all +checking for dlltool... no +checking how to associate runtime and link libraries... printf %s\n +checking for ranlib... ranlib +checking for ar... ar +checking for archiver @FILE support... rm: cannot remove 'conftest.plist': Is a directory +@ +checking for strip... strip +checking command to parse /usr/bin/nm -B output from /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer object... rm: cannot remove 'conftest.plist': Is a directory +ok +checking for sysroot... no +checking for a working dd... /usr/bin/dd +checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1 +checking for mt... no +checking if : is a manifest tool... no +checking for stdio.h... yes +checking for stdlib.h... yes +checking for string.h... yes +checking for inttypes.h... yes +checking for stdint.h... yes +checking for strings.h... yes +checking for sys/stat.h... yes +checking for sys/types.h... yes +checking for unistd.h... yes +checking for dlfcn.h... yes +checking for objdir... .libs +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -fno-rtti -fno-exceptions... no +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to produce PIC... -fPIC -DPIC +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer PIC flag -fPIC -DPIC works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer static flag -static works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... (cached) yes +checking whether the /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes +checking whether -lc should be explicitly linked in... no +checking dynamic linker characteristics... GNU/Linux ld.so +checking how to hardcode library paths into programs... immediate +checking whether stripping libraries is possible... yes +checking if libtool supports shared libraries... yes +checking whether to build shared libraries... yes +checking whether to build static libraries... yes +checking whether NLS is requested... yes +checking for msgfmt... /usr/bin/msgfmt +checking for gmsgfmt... /usr/bin/msgfmt +checking for xgettext... /usr/bin/xgettext +checking for msgmerge... /usr/bin/msgmerge +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld -m elf_x86_64 +checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes +checking for shared library run path origin... done +checking how to run the C preprocessor... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer -E +checking for egrep -e... (cached) /usr/bin/grep -E +checking for CFPreferencesCopyAppValue... no +checking for CFLocaleCopyCurrent... no +checking for GNU gettext in libc... yes +checking whether to use NLS... yes +checking where the gettext function comes from... libc +checking for glib-compile-resources... /usr/bin/glib-compile-resources +checking for xmllint... /usr/bin/xmllint +checking for setlocale... yes +checking for pkg-config... /usr/bin/pkg-config +checking pkg-config is at least version 0.9.0... yes +checking for glib-2.0 >= 2.50.0... yes +checking for gmodule-2.0... yes +checking for gio-2.0 >= 2.25.0... yes +checking for cdk-3.0 >= 3.22.0... yes +checking for ctk+-3.0 >= 3.22.0 cdk-x11-3.0 >= 3.22.0... yes +checking for libxklavier >= 5.2... yes +checking for X... libraries , headers +checking for gethostbyname... yes +checking for connect... yes +checking for remove... yes +checking for shmat... yes +checking for IceConnectionNumber in -lICE... yes +checking for pkg-config... (cached) /usr/bin/pkg-config +checking pkg-config is at least version 0.16... yes +checking for library containing sqrt... -lm +checking for gobject-introspection... yes +checking that generated files are newer than configure... done +configure: creating ./config.status +config.status: creating Makefile +config.status: creating libcafekbd.pc +config.status: creating libcafekbdui.pc +config.status: creating po/Makefile.in +config.status: creating libcafekbd/Makefile +config.status: creating libcafekbd/org.cafe.peripherals-keyboard-xkb.gschema.xml +config.status: creating test/Makefile +config.status: creating config.h +config.status: executing depfiles commands +config.status: executing libtool commands +config.status: executing po-directories commands +config.status: creating po/POTFILES +config.status: creating po/Makefile + +Configuration: + + prefix: /usr + exec_prefix: ${prefix} + libdir: ${exec_prefix}/lib + bindir: ${exec_prefix}/bin + sbindir: ${exec_prefix}/sbin + sysconfdir: ${prefix}/etc + datadir: ${datarootdir} + source code location: . + compiler: /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer + cflags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + Warning flags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + +scan-build: Analysis run complete. +scan-build: Removing directory '/tmp/scan-build-2025-02-06-152024-11857-1' because it contains no reports. +scan-build: No bugs found. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +make all-recursive +make[1]: Entering directory '/rootdir' +Making all in po +make[2]: Entering directory '/rootdir/po' +make libcafekbd.pot-update +make[3]: Entering directory '/rootdir/po' +sed -e '/^#/d' remove-potcdate.sin > t-remove-potcdate.sed +mv t-remove-potcdate.sed remove-potcdate.sed +package_gnu=""; \ +test -n "$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L .. -maxdepth 1 -type f \ + -size -10000000c -exec grep 'GNU libcafekbd' \ + /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU libcafekbd' ../* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ +}; \ +if test "$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ +else \ + package_prefix=''; \ +fi; \ +if test -n '' || test 'https://github.com/cafe-desktop/libcafekbd' = '@'PACKAGE_BUGREPORT'@'; then \ + msgid_bugs_address=''; \ +else \ + msgid_bugs_address='https://github.com/cafe-desktop/libcafekbd'; \ +fi; \ +case `/usr/bin/xgettext --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ + *) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --package-name="${package_prefix}libcafekbd" \ + --package-version='1.25.0' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ +esac +test ! -f libcafekbd.po || { \ + if test -f ./libcafekbd.pot-header; then \ + sed -e '1,/^#$/d' < libcafekbd.po > libcafekbd.1po && \ + cat ./libcafekbd.pot-header libcafekbd.1po > libcafekbd.po; \ + rm -f libcafekbd.1po; \ + fi; \ + if test -f ./libcafekbd.pot; then \ + sed -f remove-potcdate.sed < ./libcafekbd.pot > libcafekbd.1po && \ + sed -f remove-potcdate.sed < libcafekbd.po > libcafekbd.2po && \ + if cmp libcafekbd.1po libcafekbd.2po >/dev/null 2>&1; then \ + rm -f libcafekbd.1po libcafekbd.2po libcafekbd.po; \ + else \ + rm -f libcafekbd.1po libcafekbd.2po ./libcafekbd.pot && \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ + else \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ +} +make[3]: Leaving directory '/rootdir/po' +test ! -f ./libcafekbd.pot || \ + test -z "af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo" || make af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo +make[3]: Entering directory '/rootdir/po' +/usr/bin/msgmerge --update --quiet --lang=af af.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=am am.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ar ar.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=an an.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=as as.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=az az.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ast ast.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=be be.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bg bg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn bn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn_IN bn_IN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bs bs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca ca.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=br br.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca@valencia ca@valencia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cmn cmn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=crh crh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cs cs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=csb csb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cv cv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cy cy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de_CH de_CH.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=da da.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de de.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=dz dz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=el el.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_AU en_AU.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_CA en_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_GB en_GB.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eo eo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es es.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_419 es_419.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_AR es_AR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CL es_CL.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CO es_CO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CR es_CR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_DO es_DO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_EC es_EC.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_ES es_ES.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_MX es_MX.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_NI es_NI.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PA es_PA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PE es_PE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PR es_PR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_SV es_SV.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_US es_US.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_UY es_UY.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_VE es_VE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=et et.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eu eu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fi fi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fa fa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fil fil.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fo fo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr fr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=frp frp.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr_CA fr_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fur fur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fy fy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ga ga.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gd gd.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gl gl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gu gu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=he he.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ha ha.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hi hi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hr hr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hu hu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hy hy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ia ia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=id id.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ie ie.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ig ig.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=is is.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=it it.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=jv jv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ja ja.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ka ka.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kk kk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=km km.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kn kn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kab kab.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ko ko.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ks ks.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku ku.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku_IQ ku_IQ.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ky ky.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=la la.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lb lb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=li li.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lo lo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lt lt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lv lv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mi mi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mai mai.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mg mg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mk mk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ml ml.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mn mn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mr mr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=my my.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ms ms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nah nah.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nb nb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nds nds.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ne ne.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nl nl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nn nn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nqo nqo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nso nso.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=om om.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=oc oc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=or or.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pa pa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pms pms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ps ps.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pl pl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt pt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt_BR pt_BR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ru ru.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=rw rw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ro ro.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sc sc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sco sco.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=si si.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sk sk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sl sl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=so so.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sq sq.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr sr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr@latin sr@latin.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sw sw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ta ta.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sv sv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=te te.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tg tg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tl tl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=th th.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tk tk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tr tr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ts ts.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tt tt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ug ug.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uk uk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur ur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur_PK ur_PK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uz uz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=vi vi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=wa wa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=xh xh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yi yi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yo yo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_HK zh_HK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_CN zh_CN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_TW zh_TW.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zu zu.po libcafekbd.pot +rm -f af.gmo && /usr/bin/msgfmt -c --statistics --verbose -o af.gmo af.po +af.po: 7 translated messages, 84 untranslated messages. +rm -f am.gmo && /usr/bin/msgfmt -c --statistics --verbose -o am.gmo am.po +rm -f ar.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ar.gmo ar.po +rm -f an.gmo && /usr/bin/msgfmt -c --statistics --verbose -o an.gmo an.po +rm -f as.gmo && /usr/bin/msgfmt -c --statistics --verbose -o as.gmo as.po +rm -f ast.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ast.gmo ast.po +ar.po: 50 translated messages, 41 untranslated messages. +an.po:7: warning: header field 'Last-Translator' still has the initial default value +an.po: 0 translated messages, 91 untranslated messages. +am.po: 54 translated messages, 37 untranslated messages. +as.po: 41 translated messages, 50 untranslated messages. +rm -f be.gmo && /usr/bin/msgfmt -c --statistics --verbose -o be.gmo be.po +rm -f az.gmo && /usr/bin/msgfmt -c --statistics --verbose -o az.gmo az.po +ast.po: 47 translated messages, 44 untranslated messages. +rm -f bn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn.gmo bn.po +rm -f bg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bg.gmo bg.po +rm -f bn_IN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn_IN.gmo bn_IN.po +be.po: 46 translated messages, 45 untranslated messages. +az.po: 9 translated messages, 82 untranslated messages. +rm -f bs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bs.gmo bs.po +bn.po: 43 translated messages, 48 untranslated messages. +bn_IN.po: 41 translated messages, 50 untranslated messages. +bg.po: 54 translated messages, 37 untranslated messages. +rm -f br.gmo && /usr/bin/msgfmt -c --statistics --verbose -o br.gmo br.po +bs.po: 25 translated messages, 66 untranslated messages. +rm -f ca.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca.gmo ca.po +rm -f cmn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cmn.gmo cmn.po +rm -f ca@valencia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca@valencia.gmo ca@valencia.po +br.po: 20 translated messages, 71 untranslated messages. +rm -f crh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o crh.gmo crh.po +ca.po: 87 translated messages, 4 untranslated messages. +ca@valencia.po: 54 translated messages, 37 untranslated messages. +cmn.po: 46 translated messages, 45 untranslated messages. +rm -f cs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cs.gmo cs.po +rm -f csb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o csb.gmo csb.po +crh.po: 11 translated messages, 80 untranslated messages. +rm -f cv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cv.gmo cv.po +rm -f cy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cy.gmo cy.po +cs.po: 81 translated messages, 10 untranslated messages. +cv.po: 0 translated messages, 91 untranslated messages. +csb.po:7: warning: header field 'Last-Translator' still has the initial default value +csb.po: 0 translated messages, 91 untranslated messages. +cy.po: 26 translated messages, 65 untranslated messages. +rm -f da.gmo && /usr/bin/msgfmt -c --statistics --verbose -o da.gmo da.po +rm -f de.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de.gmo de.po +rm -f de_CH.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de_CH.gmo de_CH.po +rm -f el.gmo && /usr/bin/msgfmt -c --statistics --verbose -o el.gmo el.po +rm -f dz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o dz.gmo dz.po +de.po: 76 translated messages, 15 untranslated messages. +de_CH.po: 0 translated messages, 91 untranslated messages. +da.po: 91 translated messages. +el.po: 54 translated messages, 37 untranslated messages. +dz.po: 39 translated messages, 52 untranslated messages. +rm -f en_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_CA.gmo en_CA.po +rm -f en_AU.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_AU.gmo en_AU.po +rm -f en_GB.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_GB.gmo en_GB.po +rm -f eo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eo.gmo eo.po +rm -f es.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es.gmo es.po +en_CA.po: 10 translated messages, 81 untranslated messages. +en_GB.po: 54 translated messages, 37 untranslated messages. +eo.po: 52 translated messages, 39 untranslated messages. +en_AU.po: 54 translated messages, 37 untranslated messages. +es.po: 89 translated messages, 2 untranslated messages. +rm -f es_419.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_419.gmo es_419.po +rm -f es_AR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_AR.gmo es_AR.po +rm -f es_CL.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CL.gmo es_CL.po +rm -f es_CO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CO.gmo es_CO.po +rm -f es_CR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CR.gmo es_CR.po +es_AR.po: 21 translated messages, 70 untranslated messages. +es_419.po: 0 translated messages, 91 untranslated messages. +es_CL.po: 3 translated messages, 88 untranslated messages. +es_CO.po: 49 translated messages, 42 untranslated messageses_CR.po: 1 translated message, 90 untranslated messages. +. +rm -f es_DO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_DO.gmo es_DO.po +rm -f es_EC.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_EC.gmo es_EC.po +rm -f es_MX.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_MX.gmo es_MX.po +rm -f es_ES.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_ES.gmo es_ES.po +rm -f es_NI.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_NI.gmo es_NI.po +es_DO.po: 1 translated message, 90 untranslated messages. +es_EC.po: 1 translated message, 90 untranslated messages. +rm -f es_PA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PA.gmo es_PA.po +es_NI.po: 1 translated message, 90 untranslated messages. +es_MX.po: 1 translated message, 90 untranslated messages. +es_ES.po: 1 translated message, 90 untranslated messages. +rm -f es_PE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PE.gmo es_PE.po +rm -f es_PR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PR.gmo es_PR.po +rm -f es_SV.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_SV.gmo es_SV.po +es_PA.po: 1 translated message, 90 untranslated messages. +es_PE.po: 1 translated message, 90 untranslated messages. +rm -f es_US.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_US.gmo es_US.po +rm -f es_UY.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_UY.gmo es_UY.po +es_US.po: 0 translated messages, 91 untranslated messages. +es_PR.po: 1 translated message, 90 untranslated messages. +rm -f es_VE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_VE.gmo es_VE.po +es_SV.po: 1 translated message, 90 untranslated messages. +es_UY.po: 1 translated message, 90 untranslated messages. +rm -f eu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eu.gmo eu.po +rm -f et.gmo && /usr/bin/msgfmt -c --statistics --verbose -o et.gmo et.po +es_VE.po: 1 translated message, 90 untranslated messages. +rm -f fa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fa.gmo fa.po +rm -f fi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fi.gmo fi.po +eu.po: 54 translated messages, 37 untranslated messages. +et.po: 54 translated messages, 37 untranslated messages. +fa.po: 11 translated messages, 80 untranslated messages. +rm -f fil.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fil.gmo fil.po +fi.po: 48 translated messages, 43 untranslated messages. +rm -f fo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fo.gmo fo.po +rm -f fr_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr_CA.gmo fr_CA.po +rm -f fr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr.gmo fr.po +fil.po: 0 translated messages, 91 untranslated messages. +fr_CA.po: 3 translated messages, 88 untranslated messages. +fo.po: 0 translated messages, 91 untranslated messages. +fr.po: 67 translated messages, 24 untranslated messages. +rm -f fur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fur.gmo fur.po +rm -f frp.gmo && /usr/bin/msgfmt -c --statistics --verbose -o frp.gmo frp.po +rm -f fy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fy.gmo fy.po +rm -f ga.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ga.gmo ga.po +rm -f gd.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gd.gmo gd.po +fur.po: 4 translated messages, 87 untranslated messages. +frp.po: 7 translated messages, 84 untranslated messages. +gd.po: 0 translated messages, 91 untranslated messages. +rm -f gl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gl.gmo gl.po +fy.po: 4 translated messages, 87 untranslated messages. +ga.po: 41 translated messages, 50 untranslated messages. +rm -f ha.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ha.gmo ha.po +rm -f gu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gu.gmo gu.po +rm -f he.gmo && /usr/bin/msgfmt -c --statistics --verbose -o he.gmo he.po +gl.po: 89 translated messages, 2 untranslated messages. +rm -f hi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hi.gmo hi.po +ha.po: 5 translated messages, 86 untranslated messages. +gu.po: 43 translated messages, 48 untranslated messages. +he.po: 54 translated messages, 37 untranslated messages. +rm -f hr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hr.gmo hr.po +hi.po: 45 translated messages, 46 untranslated messages. +rm -f hu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hu.gmo hu.po +rm -f hy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hy.gmo hy.po +rm -f ia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ia.gmo ia.po +rm -f id.gmo && /usr/bin/msgfmt -c --statistics --verbose -o id.gmo id.po +hr.po: 54 translated messages, 37 untranslated messages. +hu.po: 54 translated messages, 37 untranslated messages. +hy.po: 54 translated messages, 37 untranslated messages. +rm -f ie.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ie.gmo ie.po +id.po: 91 translated messages. +ia.po: 3 translated messages, 88 untranslated messages. +rm -f ig.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ig.gmo ig.po +rm -f is.gmo && /usr/bin/msgfmt -c --statistics --verbose -o is.gmo is.po +rm -f it.gmo && /usr/bin/msgfmt -c --statistics --verbose -o it.gmo it.po +rm -f ja.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ja.gmo ja.po +ie.po: 45 translated messages, 46 untranslated messages. +ig.po: 5 translated messages, 86 untranslated messages. +is.po: 12 translated messages, 79 untranslated messages. +it.po: 91 translated messages. +rm -f jv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o jv.gmo jv.po +rm -f ka.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ka.gmo ka.po +ja.po: 54 translated messages, 37 untranslated messages. +rm -f kab.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kab.gmo kab.po +rm -f kk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kk.gmo kk.po +jv.po: 2 translated messages, 89 untranslated messages. +ka.po: 37 translated messages, 54 untranslated messages. +kk.po: 24 translated messages, 67 untranslated messages. +kab.po: 4 translated messages, 87 untranslated messages. +rm -f km.gmo && /usr/bin/msgfmt -c --statistics --verbose -o km.gmo km.po +rm -f kn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kn.gmo kn.po +rm -f ks.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ks.gmo ks.po +rm -f ko.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ko.gmo ko.po +km.po:7: warning: header field 'Last-Translator' still has the initial default value +km.po: 0 translated messages, 91 untranslated messages. +rm -f ku.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku.gmo ku.po +kn.po: 43 translated messages, 48 untranslated messages. +ku.po: 10 translated messages, 81 untranslated messages. +ks.po: ko.po: 54 translated messages, 37 untranslated messages. +3 translated messages, 88 untranslated messages. +rm -f ku_IQ.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku_IQ.gmo ku_IQ.po +rm -f ky.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ky.gmo ky.po +rm -f la.gmo && /usr/bin/msgfmt -c --statistics --verbose -o la.gmo la.po +rm -f lb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lb.gmo lb.po +ku_IQ.po: 16 translated messages, 75 untranslated messages. +rm -f li.gmo && /usr/bin/msgfmt -c --statistics --verbose -o li.gmo li.po +ky.po: 26 translated messages, 65 untranslated messages. +la.po: 2 translated messages, 89 untranslated messages. +li.po:7: warning: header field 'Last-Translator' still has the initial default value +li.po: 0 translated messages, 91 untranslated messages. +rm -f lo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lo.gmo lo.po +lb.po:7: warning: header field 'Last-Translator' still has the initial default value +lb.po: 0 translated messages, 91 untranslated messages. +rm -f lt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lt.gmo lt.po +rm -f lv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lv.gmo lv.po +lo.po:7: warning: header field 'Last-Translator' still has the initial default value +lo.po: 0 translated messages, 91 untranslated messages. +rm -f mg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mg.gmo mg.po +rm -f mai.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mai.gmo mai.po +lt.po: 91 translated messages. +lv.po: 49 translated messages, 42 untranslated messages. +rm -f mi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mi.gmo mi.po +mai.po: 18 translated messages, 73 untranslated messages. +mg.po: 10 translated messagesrm -f mk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mk.gmo mk.po +, 81 untranslated messages. +rm -f ml.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ml.gmo ml.po +mk.po: 39 translated messages, 52 untranslated messages. +mi.po:7: warning: header field 'Last-Translator' still has the initial default value +mi.po: 0 translated messages, 91 untranslated messages. +rm -f mn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mn.gmo mn.po +rm -f mr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mr.gmo mr.po +ml.po: 41 translated messages, 50 untranslated messages. +rm -f ms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ms.gmo ms.po +rm -f my.gmo && /usr/bin/msgfmt -c --statistics --verbose -o my.gmo my.po +mn.po: 10 translated messages, 81 untranslated messages. +mr.po: 47 translated messages, 44 untranslated messages. +rm -f nah.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nah.gmo nah.po +my.po:7: warning: header field 'Last-Translator' still has the initial default value +my.po: 0 translated messages, 91 untranslated messages. +ms.po: 91 translated messages. +rm -f nb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nb.gmo nb.po +rm -f nds.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nds.gmo nds.po +rm -f ne.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ne.gmo ne.po +nah.po: 0 translated messages, 91 untranslated messages. +nb.po: 91 translated messages. +rm -f nl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nl.gmo nl.po +nds.po: 12 translated messages, 79 untranslated messages. +ne.po: 13 translated messages, 78 untranslated messages. +rm -f nn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nn.gmo nn.po +rm -f nqo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nqo.gmo nqo.po +rm -f nso.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nso.gmo nso.po +nl.po: 91 translated messages. +rm -f oc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o oc.gmo oc.po +nn.po: 40 translated messages, 51 untranslated messages. +rm -f om.gmo && /usr/bin/msgfmt -c --statistics --verbose -o om.gmo om.po +nqo.po: 0 translated messages, 91 untranslated messages. +nso.po: 3 translated messages, 88 untranslated messages. +oc.po: 68 translated messages, 23 untranslated messages. +rm -f or.gmo && /usr/bin/msgfmt -c --statistics --verbose -o or.gmo or.po +rm -f pa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pa.gmo pa.po +om.po: 0 translated messages, 91 untranslated messages. +rm -f pl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pl.gmo pl.po +rm -f pms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pms.gmo pms.po +rm -f ps.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ps.gmo ps.po +or.po: pa.po: 46 translated messages, 45 untranslated messages. +41 translated messages, 50 untranslated messages. +pl.po: 55 translated messages, 36 untranslated messages. +pms.po: 3 translated messages, 88 untranslated messages. +ps.po: 6 translated messages, 85 untranslated messages. +rm -f pt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt.gmo pt.po +rm -f pt_BR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt_BR.gmo pt_BR.po +rm -f ro.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ro.gmo ro.po +rm -f ru.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ru.gmo ru.po +rm -f rw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o rw.gmo rw.po +pt.po: 84 translated messages, 7 untranslated messages. +ro.po: 54 translated messages, 37 untranslated messages. +rw.po: 10 translated messages, 81 untranslated messages. +pt_BR.po: 58 translated messages, 33 untranslated messages. +rm -f sc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sc.gmo sc.po +ru.po: 89 translated messages, 2 untranslated messages. +rm -f si.gmo && /usr/bin/msgfmt -c --statistics --verbose -o si.gmo si.po +rm -f sco.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sco.gmo sco.po +sc.po: 2 translated messages, 89 untranslated messages. +rm -f sl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sl.gmo sl.po +rm -f sk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sk.gmo sk.po +si.po: 36 translated messages, 55 untranslated messages. +sco.po: 0 translated messages, 91 untranslated messages. +sk.po: 54 translated messages, 37 untranslated messagessl.po: 55 translated messages, 36 untranslated messages. +. +rm -f so.gmo && /usr/bin/msgfmt -c --statistics --verbose -o so.gmo so.po +rm -f sq.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sq.gmo sq.po +rm -f sr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr.gmo sr.po +rm -f sv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sv.gmo sv.po +rm -f sr@latin.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr@latin.gmo sr@latin.po +so.po: 0 translated messages, 91 untranslated messages. +sq.po: 52 translated messages, 39 untranslated messages. +sr.po: 91 translated messages. +sv.po: 80 translated messages, 11 untranslated messages. +sr@latin.po: 46 translated messages, 45 untranslated messages. +rm -f sw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sw.gmo sw.po +rm -f ta.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ta.gmo ta.po +rm -f te.gmo && /usr/bin/msgfmt -c --statistics --verbose -o te.gmo te.po +rm -f tg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tg.gmo tg.po +rm -f th.gmo && /usr/bin/msgfmt -c --statistics --verbose -o th.gmo th.po +sw.po: 0 translated messages, 91 untranslated messages. +te.po: 41 translated messages, 50 untranslated messages. +ta.po: 46 translated messages, 45 untranslated messages. +tg.po: 0 translated messages, 91 untranslated messages. +th.po: 45 translated messages, 46 untranslated messages. +rm -f tk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tk.gmo tk.po +rm -f tl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tl.gmo tl.po +rm -f tr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tr.gmo tr.po +rm -f ts.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ts.gmo ts.po +rm -f tt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tt.gmo tt.po +tk.po: 7 translated messages, 84 untranslated messages. +tl.po: 0 translated messages, 91 untranslated messages. +tr.po: 58 translated messages, 33 untranslated messages. +ts.po: 0 translated messages, 91 untranslated messages. +rm -f ug.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ug.gmo ug.po +tt.po:7: warning: header field 'Last-Translator' still has the initial default value +tt.po: 0 translated messages, 91 untranslated messages. +rm -f uk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uk.gmo uk.po +rm -f ur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur.gmo ur.po +rm -f ur_PK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur_PK.gmo ur_PK.po +ug.po: 6 translated messages, 85 untranslated messages. +rm -f uz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uz.gmo uz.po +ur.po: 7 translated messages, 84 untranslated messages. +ur_PK.po:7: warning: header field 'Last-Translator' still has the initial default value +ur_PK.po: 0 translated messages, 91 untranslated messages. +uk.po: 58 translated messages, 33 untranslated messages. +rm -f vi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o vi.gmo vi.po +uz.po: 26 translated messages, 65 untranslated messages. +rm -f wa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o wa.gmo wa.po +rm -f yi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yi.gmo yi.po +rm -f xh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o xh.gmo xh.po +wa.po: 9 translated messages, 82 untranslated messages. +vi.po: 52 translated messages, 39 untranslated messages. +xh.po: 8 translated messages, 83 untranslated messages. +rm -f yo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yo.gmo yo.po +yi.po:7: warning: header field 'Last-Translator' still has the initial default value +yi.po: 0 translated messagesrm -f zh_CN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_CN.gmo zh_CN.po +, 91 untranslated messages. +rm -f zh_TW.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_TW.gmo zh_TW.po +rm -f zh_HK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_HK.gmo zh_HK.po +yo.po: 5 translated messages, 86 untranslated messages. +zh_CN.po: 63 translated messages, 28 untranslated messages. +rm -f zu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zu.gmo zu.po +zh_HK.po: 47 translated messages, 44 untranslated messages. +zh_TW.po: 91 translated messages. +zu.po: 3 translated messages, 88 untranslated messages. +make[3]: Leaving directory '/rootdir/po' +touch stamp-po +make[2]: Leaving directory '/rootdir/po' +Making all in libcafekbd +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml + GEN cafekbd-indicator-marshal.h + GEN cafekbd-keyboard-drawing-marshal.h +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... +INFO: Reading ./cafekbd-indicator-marshal.list... + GEN cafekbd-keyboard-drawing-marshal.c + GEN cafekbd-indicator-marshal.c +INFO: Reading ./cafekbd-indicator-marshal.list... +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... +make all-am +make[3]: Entering directory '/rootdir/libcafekbd' + CC libcafekbd_la-cafekbd-desktop-config.lo + CC libcafekbd_la-cafekbd-keyboard-config.lo + CC libcafekbd_la-cafekbd-util.lo + CC libcafekbdui_la-cafekbd-indicator-config.lo + CC libcafekbdui_la-cafekbd-indicator.lo +cafekbd-desktop-config.c: In function 'cafekbd_desktop_config_load_from_gsettings': +cafekbd-desktop-config.c:176:38: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 176 | || config->default_group >= + | ^~ +cafekbd-indicator.c: In function 'cafekbd_indicator_extract_layout_name': +cafekbd-indicator.c:293:19: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 293 | if (group < g_strv_length (short_group_names)) { + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_prepare_drawing': +cafekbd-indicator.c:418:31: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 418 | if (group + 1 == + | ^~ +cafekbd-indicator.c: In function 'cafekbd_indicator_update_tooltips': +cafekbd-indicator.c:446:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 446 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-indicator.c:450:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 450 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-indicator.c: In function 'cafekbd_indicator_kbd_cfg_callback': +cafekbd-indicator.c:61:44: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 61 | CafekbdIndicator * gki = (CafekbdIndicator*)cur->data; + | ^~~ +cafekbd-indicator.c:561:9: note: in expansion of macro 'ForAllIndicators' + 561 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-indicator.c:539:55: note: shadowed declaration is here + 539 | cafekbd_indicator_kbd_cfg_callback (CafekbdIndicator *gki G_GNUC_UNUSED) +cafekbd-indicator.c: In function 'cafekbd_indicator_start_listen': +cafekbd-indicator.c:647:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 647 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:650:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 650 | (CdkFilterFunc) + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_stop_listen': +cafekbd-indicator.c:663:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 663 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:667:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 667 | (CdkFilterFunc) cafekbd_indicator_filter_x_evt, NULL); + | ^ +cafekbd-indicator-config.c: In function 'cafekbd_indicator_config_get_images_file': +cafekbd-indicator-config.c:152:59: warning: comparison of integer expressions of different signedness: 'guint' {aka 'unsigned int'} and 'int' [-Wsign-compare] + 152 | (g_strv_length (kbd_config->layouts_variants) > group)) { + | ^ + CC libcafekbdui_la-cafekbd-status.lo +cafekbd-status.c: In function 'cafekbd_status_render_cairo': +cafekbd-status.c:214:23: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 214 | if (group + 1 == xkl_engine_get_num_groups (globals.engine)) { + | ^~ +cafekbd-status.c: In function 'cafekbd_status_prepare_drawing': +cafekbd-status.c:376:51: warning: cast between incompatible function types from 'void (*)(void *)' to 'void (*)(guchar *, void *)' {aka 'void (*)(unsigned char *, void *)'} [-Wcast-function-type] + 376 | (GdkPixbufDestroyNotify) + | ^ +cafekbd-status.c: In function 'cafekbd_status_update_tooltips': +cafekbd-status.c:395:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 395 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-status.c:399:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 399 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-status.c: In function 'cafekbd_status_kbd_cfg_callback': +cafekbd-status.c:77:41: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 77 | CafekbdStatus * gki = (CafekbdStatus*)cur->data; + | ^~~ +cafekbd-status.c:508:9: note: in expansion of macro 'ForAllIndicators' + 508 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-status.c:484:49: note: shadowed declaration is here + 484 | cafekbd_status_kbd_cfg_callback (CafekbdStatus *gki G_GNUC_UNUSED) +cafekbd-status.c: In function 'cafekbd_status_start_listen': +cafekbd-status.c:594:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 594 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:597:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 597 | (CdkFilterFunc) cafekbd_status_filter_x_evt, + | ^ +cafekbd-status.c: In function 'cafekbd_status_stop_listen': +cafekbd-status.c:610:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 610 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:614:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 614 | (CdkFilterFunc) cafekbd_status_filter_x_evt, NULL); + | ^ + CC libcafekbdui_la-cafekbd-indicator-marshal.lo +cafekbd-indicator-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ + CC libcafekbdui_la-cafekbd-keyboard-drawing-marshal.lo +cafekbd-keyboard-drawing-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + CC libcafekbdui_la-cafekbd-keyboard-drawing.lo +cafekbd-keyboard-drawing.c: In function 'draw_polygon': +cafekbd-keyboard-drawing.c:322:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 322 | for (i = 0; i < num_points; i++) { + | ^ +cafekbd-keyboard-drawing.c: In function 'process_indicators_state_notify': +cafekbd-keyboard-drawing.c:2131:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'long unsigned int' [-Wsign-compare] + 2131 | for (i = 0; i <= drawing->xkb->indicators->phys_indicators; i++) + | ^~ +cafekbd-keyboard-drawing.c: In function 'cafekbd_keyboard_drawing_get_type': +cafekbd-keyboard-drawing.c:2394:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawingClass *)' {aka 'void (*)(struct _CafekbdKeyboardDrawingClass *)'} to 'void (*)(void *, void *)' [-Wcast-function-type] + 2394 | (GClassInitFunc) cafekbd_keyboard_drawing_class_init, + | ^ +cafekbd-keyboard-drawing.c:2399:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawing *)' {aka 'void (*)(struct _CafekbdKeyboardDrawing *)'} to 'void (*)(GTypeInstance *, void *)' {aka 'void (*)(struct _GTypeInstance *, void *)'} [-Wcast-function-type] + 2399 | (GInstanceInitFunc) cafekbd_keyboard_drawing_init, + | ^ + GEN org.cafe.peripherals-keyboard-xkb.gschema.valid + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:114:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 114 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbd.la + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspectya_6du8x/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectya_6du8x/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectya_6du8x/Cafekbd-1.0.c:239:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 239 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspectya_6du8x/Cafekbd-1.0.c:246:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 246 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspectya_6du8x/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +5 warnings generated. + GICOMP Cafekbd-1.0.gir +make[3]: Leaving directory '/rootdir/libcafekbd' +make[2]: Leaving directory '/rootdir/libcafekbd' +Making all in test +make[2]: Entering directory '/rootdir/test' + CC cafekbd_indicator_test-cafekbd-indicator-test.o + CC cafekbd_keyboard_drawing_test-cafekbd-keyboard-drawing-test.o + CC cafekbd_status_test-cafekbd-status-test.o + CCLD cafekbd-status-test + CCLD cafekbd-indicator-test +cafekbd-keyboard-drawing-test.c:187:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 187 | g_print ("kbdraw %s\n", VERSION); + | ^~~~~~~ +cafekbd-keyboard-drawing-test.c:194:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 194 | g_printerr ("--groups: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:199:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 199 | g_printerr ("--levels: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:225:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 225 | cafekbd_keyboard_drawing_set_track_modifiers + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:228:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 228 | cafekbd_keyboard_drawing_set_track_config + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:248:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 248 | names.keycodes = keycodes; + | ^~~~~~~~ +cafekbd-keyboard-drawing-test.c:256:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 256 | names.geometry = geometry; + | ^~~~~~~~ +7 warnings generated. + CCLD cafekbd-keyboard-drawing-test +make[2]: Leaving directory '/rootdir/test' +make[2]: Entering directory '/rootdir' +make[2]: Leaving directory '/rootdir' +make[1]: Leaving directory '/rootdir' +scan-build: Analysis run complete. +scan-build: 11 bugs found. +scan-build: Run 'scan-view /rootdir/html-report/2025-02-06-152034-14522-1' to examine bug reports. +Making check in po +make[1]: Entering directory '/rootdir/po' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/po' +Making check in libcafekbd +make[1]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +make check-am +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:113:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 113 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspectf2f1gymw/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectf2f1gymw/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectf2f1gymw/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +3 warnings generated. + GICOMP Cafekbd-1.0.gir +make[2]: Leaving directory '/rootdir/libcafekbd' +make[1]: Leaving directory '/rootdir/libcafekbd' +Making check in test +make[1]: Entering directory '/rootdir/test' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/test' +make[1]: Entering directory '/rootdir' +make[1]: Leaving directory '/rootdir' + Listing... 0% Listing... 0% Listing... 0% adduser/testing,now 3.137 all [installed,automatic] +advaita-icon-theme/unknown,now 3.25.0-1 all [installed,automatic] +apt/testing,now 2.9.26 amd64 [installed,automatic] +aptitude-common/testing,now 0.8.13-6.1 all [installed,automatic] +aptitude/testing,now 0.8.13-6.1 amd64 [installed] +at-spi2-common/testing,now 2.55.0.1-1 all [installed,automatic] +at-spi2-core/testing,now 2.55.0.1-1 amd64 [installed,automatic] +autoconf-archive/testing,now 20220903-3 all [installed] +autoconf/testing,now 2.72-3 all [installed,automatic] +automake/testing,now 1:1.17-3 all [installed,automatic] +autopoint/testing,now 0.23.1-1 all [installed] +autotools-dev/testing,now 20220109.1 all [installed,automatic] +base-files/testing,now 13.6 amd64 [installed,automatic] +base-passwd/testing,now 3.6.6 amd64 [installed,automatic] +bash/testing,now 5.2.37-1 amd64 [installed,automatic] +binfmt-support/testing,now 2.2.2-7 amd64 [installed,automatic] +binutils-common/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils-gold-x86-64-linux-gnu/testing,now 2.44-1 amd64 [installed,automatic] +binutils-gold/testing,now 2.44-1 amd64 [installed,automatic] +binutils-x86-64-linux-gnu/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +bsdutils/testing,now 1:2.40.4-2 amd64 [installed,automatic] +build-essential/testing,now 12.12 amd64 [installed,automatic] +bzip2-doc/testing,now 1.0.8-6 all [installed,automatic] +bzip2/testing,now 1.0.8-6 amd64 [installed,automatic] +ca-certificates/testing,now 20241223 all [installed,automatic] +clang-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools/testing,now 1:19.0-63 amd64 [installed] +clang/testing,now 1:19.0-63 amd64 [installed] +coreutils/testing,now 9.5-1+b1 amd64 [installed,automatic] +cpp-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-14/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cpp/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cppcheck/testing,now 2.16.0-1 amd64 [installed] +ctk-update-icon-cache/unknown,now 3.25.6-1 amd64 [installed,automatic] +dash/testing,now 0.5.12-12 amd64 [installed,automatic] +dbus-bin/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-daemon/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-session-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-system-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-user-session/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus/testing,now 1.16.0-1 amd64 [installed,automatic] +dconf-gsettings-backend/testing,now 0.40.0-5 amd64 [installed,automatic] +dconf-service/testing,now 0.40.0-5 amd64 [installed,automatic] +debconf/testing,now 1.5.89 all [installed,automatic] +debian-archive-keyring/testing,now 2023.4 all [installed,automatic] +debianutils/testing,now 5.21 amd64 [installed,automatic] +diffutils/testing,now 1:3.10-2 amd64 [installed,automatic] +dirmngr/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +dmsetup/testing,now 2:1.02.201-1 amd64 [installed,automatic] +dpkg-dev/testing,now 1.22.14 all [installed,automatic] +dpkg/testing,now 1.22.14 amd64 [installed,automatic] +e2fsprogs/testing,now 1.47.2-1 amd64 [installed,automatic] +expect/testing,now 5.45.4-3+b1 amd64 [installed] +fakeroot/testing,now 1.37-1 amd64 [installed,automatic] +file/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +findutils/testing,now 4.10.0-3 amd64 [installed,automatic] +fontconfig-config/testing,now 2.15.0-2 amd64 [installed,automatic] +fontconfig/testing,now 2.15.0-2 amd64 [installed,automatic] +fonts-dejavu-core/testing,now 2.37-8 all [installed,automatic] +fonts-dejavu-mono/testing,now 2.37-8 all [installed,automatic] +g++-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-14/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +g++/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc-14-base/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gettext-base/testing,now 0.23.1-1 amd64 [installed,automatic] +gettext/testing,now 0.23.1-1 amd64 [installed] +gir1.2-atk-1.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-atspi-2.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-ctk-3.0/unknown,now 3.25.6-1 amd64 [installed] +gir1.2-freedesktop-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-freedesktop/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-gdkpixbuf-2.0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +gir1.2-girepository-2.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-girepository-2.0/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-glib-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-glib-2.0/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-harfbuzz-0.0/testing,now 10.2.0-1 amd64 [installed,automatic] +gir1.2-pango-1.0/testing,now 1.56.1-1 amd64 [installed,automatic] +gir1.2-xkl-1.0/testing,now 5.4-5+b2 amd64 [installed,automatic] +girepository-tools/testing,now 2.82.4-2 amd64 [installed,automatic] +git-man/testing,now 1:2.47.2-0.1 all [installed,automatic] +git/testing,now 1:2.47.2-0.1 amd64 [installed] +gnupg-l10n/testing,now 2.2.46-1 all [installed,automatic] +gnupg-utils/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gnupg/testing,now 2.2.46-1 all [installed,automatic] +gobject-introspection-bin/testing,now 1.82.0-4 amd64 [installed,automatic] +gobject-introspection/testing,now 1.82.0-4 amd64 [installed] +gpg-agent/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg-wks-client/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgconf/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgsm/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgv/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +grep/testing,now 3.11-4 amd64 [installed,automatic] +gsettings-desktop-schemas/testing,now 47.1-1 all [installed,automatic] +gzip/testing,now 1.13-1 amd64 [installed,automatic] +hicolor-icon-theme/testing,now 0.18-2 all [installed,automatic] +hostname/testing,now 3.25 amd64 [installed,automatic] +icu-devtools/testing,now 72.1-6 amd64 [installed,automatic] +init-system-helpers/testing,now 1.68 all [installed,automatic] +krb5-locales/testing,now 1.21.3-4 all [installed,automatic] +less/testing,now 643-1 amd64 [installed,automatic] +lib32gcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +lib32stdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libacl1/testing,now 2.3.2-2+b1 amd64 [installed,automatic] +libalgorithm-diff-perl/testing,now 1.201-1 all [installed,automatic] +libalgorithm-diff-xs-perl/testing,now 0.04-8+b4 amd64 [installed,automatic] +libalgorithm-merge-perl/testing,now 0.08-5 all [installed,automatic] +libapparmor1/testing,now 3.1.7-1+b3 amd64 [installed,automatic] +libapt-pkg6.0t64/testing,now 2.9.26 amd64 [installed,automatic] +libasan8/testing,now 14.2.0-12 amd64 [installed,automatic] +libassuan9/testing,now 3.0.1-2 amd64 [installed,automatic] +libatk-bridge2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk-bridge2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatomic1/testing,now 14.2.0-12 amd64 [installed,automatic] +libatspi2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatspi2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libattr1/testing,now 1:2.5.2-2 amd64 [installed,automatic] +libaudit-common/testing,now 1:4.0.2-2 all [installed,automatic] +libaudit1/testing,now 1:4.0.2-2+b1 amd64 [installed,automatic] +libavahi-client3/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common-data/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common3/testing,now 0.8-16 amd64 [installed,automatic] +libbinutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libblkid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libblkid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libboost-iostreams1.83.0/testing,now 1.83.0-4 amd64 [installed,automatic] +libbrotli-dev/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbrotli1/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbsd0/testing,now 0.12.2-2 amd64 [installed,automatic] +libbz2-1.0/testing,now 1.0.8-6 amd64 [installed,automatic] +libbz2-dev/testing,now 1.0.8-6 amd64 [installed,automatic] +libc-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc-dev-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc6-dev/testing,now 2.40-6 amd64 [installed,automatic] +libc6-i386/testing,now 2.40-6 amd64 [installed,automatic] +libc6/testing,now 2.40-6 amd64 [installed,automatic] +libcairo-gobject2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo-script-interpreter2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2-dev/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcap-dev/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcap-ng0/testing,now 0.8.5-4 amd64 [installed,automatic] +libcap2/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcbor0.10/testing,now 0.10.2-2 amd64 [installed,automatic] +libcc1-0/testing,now 14.2.0-12 amd64 [installed,automatic] +libclang-common-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-cpp19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-rt-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang1-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libcolord2/testing,now 1.4.7-1+b2 amd64 [installed,automatic] +libcom-err2/testing,now 1.47.2-1 amd64 [installed,automatic] +libcrypt-dev/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcrypt1/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcryptsetup12/testing,now 2:2.7.5-1 amd64 [installed,automatic] +libctf-nobfd0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctf0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctk-3-0/unknown,now 3.25.6-1 amd64 [installed] +libctk-3-bin/unknown,now 3.25.6-1 amd64 [installed,automatic] +libctk-3-common/unknown,now 3.25.6-1 all [installed] +libctk-3-dev/unknown,now 3.25.6-1 amd64 [installed] +libcups2t64/testing,now 2.4.10-2+b1 amd64 [installed,automatic] +libcurl3t64-gnutls/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcurl4t64/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcwidget4/testing,now 0.5.18-6+b2 amd64 [installed,automatic] +libdatrie-dev/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdatrie1/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdav1d7/testing,now 1.5.1-1 amd64 [installed,automatic] +libdb5.3t64/testing,now 5.3.28+dfsg2-9 amd64 [installed,automatic] +libdbus-1-3/testing,now 1.16.0-1 amd64 [installed,automatic] +libdbus-1-dev/testing,now 1.16.0-1 amd64 [installed,automatic] +libdconf1/testing,now 0.40.0-5 amd64 [installed,automatic] +libdebconfclient0/testing,now 0.277 amd64 [installed,automatic] +libdeflate-dev/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdeflate0/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdevmapper1.02.1/testing,now 2:1.02.201-1 amd64 [installed,automatic] +libdpkg-perl/testing,now 1.22.14 all [installed,automatic] +libdrm-amdgpu1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-common/testing,now 2.4.123-1 all [installed,automatic] +libdrm-intel1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-radeon1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm2/testing,now 2.4.123-1 amd64 [installed,automatic] +libedit2/testing,now 3.1-20250104-1 amd64 [installed,automatic] +libegl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libegl-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1-mesa-dev/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libelf1t64/testing,now 0.192-4 amd64 [installed,automatic] +libepoxy-dev/testing,now 1.5.10-2 amd64 [installed,automatic] +libepoxy0/testing,now 1.5.10-2 amd64 [installed,automatic] +liberror-perl/testing,now 0.17029-2 all [installed,automatic] +libexpat1-dev/testing,now 2.6.4-1 amd64 [installed,automatic] +libexpat1/testing,now 2.6.4-1 amd64 [installed,automatic] +libext2fs2t64/testing,now 1.47.2-1 amd64 [installed,automatic] +libfakeroot/testing,now 1.37-1 amd64 [installed,automatic] +libffi-dev/testing,now 3.4.6-1 amd64 [installed,automatic] +libffi8/testing,now 3.4.6-1 amd64 [installed,automatic] +libfido2-1/testing,now 1.15.0-1+b1 amd64 [installed,automatic] +libfile-fcntllock-perl/testing,now 0.22-4+b4 amd64 [installed,automatic] +libfontconfig-dev/testing,now 2.15.0-2 amd64 [installed,automatic] +libfontconfig1/testing,now 2.15.0-2 amd64 [installed,automatic] +libfreetype-dev/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfreetype6/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfribidi-dev/testing,now 1.0.16-1 amd64 [installed,automatic] +libfribidi0/testing,now 1.0.16-1 amd64 [installed,automatic] +libgbm1/testing,now 24.2.8-1 amd64 [installed,automatic] +libgc1/testing,now 1:8.2.8-1 amd64 [installed,automatic] +libgcc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcrypt20/testing,now 1.11.0-7 amd64 [installed,automatic] +libgdbm-compat4t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdbm6t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-dev/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-bin/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-common/testing,now 2.42.12+dfsg-2 all [installed,automatic] +libgio-2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libgio-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository-1.0-1/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-1.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-2.0-0/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository1.0-dev/testing,now 1.82.0-4 amd64 [installed] +libgl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgl1-mesa-dri/testing,now 24.2.8-1 amd64 [installed,automatic] +libgl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglapi-mesa/testing,now 24.2.8-1 amd64 [installed,automatic] +libgles-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles2/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglib2.0-0t64/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-data/testing,now 2.82.4-2 all [installed,automatic] +libglib2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-dev/testing,now 2.82.4-2 amd64 [installed] +libglvnd-core-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libglx0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgmp10/testing,now 2:6.3.0+dfsg-3 amd64 [installed,automatic] +libgnutls30t64/testing,now 3.8.8-2 amd64 [installed,automatic] +libgomp1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgpg-error-l10n/testing,now 1.51-3 all [installed,automatic] +libgpg-error0/testing,now 1.51-3 amd64 [installed,automatic] +libgpm2/testing,now 1.20.7-11+b2 amd64 [installed,automatic] +libgprofng0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libgraphite2-3/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgraphite2-dev/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgssapi-krb5-2/testing,now 1.21.3-4 amd64 [installed,automatic] +libharfbuzz-cairo0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-dev/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-gobject0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-icu0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-subset0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz0b/testing,now 10.2.0-1 amd64 [installed,automatic] +libhogweed6t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libhwasan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libice-dev/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libice6/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libicu-dev/testing,now 72.1-6 amd64 [installed,automatic] +libicu72/testing,now 72.1-6 amd64 [installed,automatic] +libidn2-0/testing,now 2.3.7-2+b1 amd64 [installed,automatic] +libisl23/testing,now 0.27-1 amd64 [installed,automatic] +libitm1/testing,now 14.2.0-12 amd64 [installed,automatic] +libjansson4/testing,now 2.14-2+b3 amd64 [installed,automatic] +libjbig-dev/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjbig0/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjpeg-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjson-c5/testing,now 0.18+ds-1 amd64 [installed,automatic] +libk5crypto3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkeyutils1/testing,now 1.6.3-4 amd64 [installed,automatic] +libkmod2/testing,now 33+20240816-2 amd64 [installed,automatic] +libkrb5-3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkrb5support0/testing,now 1.21.3-4 amd64 [installed,automatic] +libksba8/testing,now 1.6.7-2+b1 amd64 [installed,automatic] +liblcms2-2/testing,now 2.16-2 amd64 [installed,automatic] +libldap-common/testing,now 2.6.9+dfsg-1 all [installed,automatic] +libldap2/testing,now 2.6.9+dfsg-1 amd64 [installed,automatic] +liblerc-dev/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +liblerc4/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +libllvm19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +liblocale-gettext-perl/testing,now 1.07-7+b1 amd64 [installed,automatic] +liblsan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libltdl-dev/testing,now 2.5.4-3 amd64 [installed,automatic] +libltdl7/testing,now 2.5.4-3 amd64 [installed,automatic] +liblz4-1/testing,now 1.10.0-3 amd64 [installed,automatic] +liblzma-dev/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzma5/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzo2-2/testing,now 2.10-3+b1 amd64 [installed,automatic] +libmagic-mgc/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmagic1t64/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmd0/testing,now 1.1.0-2+b1 amd64 [installed,automatic] +libmount-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libmount1/testing,now 2.40.4-2 amd64 [installed,automatic] +libmpc3/testing,now 1.3.1-1+b3 amd64 [installed,automatic] +libmpfr6/testing,now 4.2.1-1+b2 amd64 [installed,automatic] +libncurses-dev/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncurses6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncursesw6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libnettle8t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libnghttp2-14/testing,now 1.64.0-1 amd64 [installed,automatic] +libnghttp3-9/testing,now 1.6.0-2 amd64 [installed,automatic] +libngtcp2-16/testing,now 1.9.1-1 amd64 [installed,automatic] +libngtcp2-crypto-gnutls8/testing,now 1.9.1-1 amd64 [installed,automatic] +libnpth0t64/testing,now 1.8-2 amd64 [installed,automatic] +libnss-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libobjc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libobjc4/testing,now 14.2.0-12 amd64 [installed,automatic] +libopengl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libopengl0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libp11-kit0/testing,now 0.25.5-3 amd64 [installed,automatic] +libpam-modules-bin/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-modules/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-runtime/testing,now 1.7.0-2 all [installed,automatic] +libpam-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libpam0g/testing,now 1.7.0-2 amd64 [installed,automatic] +libpango-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpango1.0-dev/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangocairo-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoft2-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoxft-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpciaccess0/testing,now 0.17-3+b3 amd64 [installed,automatic] +libpcre2-16-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-32-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-8-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-dev/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-posix3/testing,now 10.44-5 amd64 [installed,automatic] +libperl5.40/testing,now 5.40.0-8 amd64 [installed,automatic] +libpfm4/testing,now 4.13.0+git83-g91970fe-1 amd64 [installed,automatic] +libpipeline1/testing,now 1.5.8-1 amd64 [installed,automatic] +libpixman-1-0/testing,now 0.44.0-3 amd64 [installed,automatic] +libpixman-1-dev/testing,now 0.44.0-3 amd64 [installed,automatic] +libpkgconf3/testing,now 1.8.1-4 amd64 [installed,automatic] +libpng-dev/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng-tools/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng16-16t64/testing,now 1.6.44-3 amd64 [installed,automatic] +libproc2-0/testing,now 2:4.0.4-7 amd64 [installed,automatic] +libpsl5t64/testing,now 0.21.2-1.1+b1 amd64 [installed,automatic] +libpython3-stdlib/testing,now 3.13.1-2 amd64 [installed,automatic] +libpython3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libpython3.13-stdlib/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libquadmath0/testing,now 14.2.0-12 amd64 [installed,automatic] +libreadline8t64/testing,now 8.2-6 amd64 [installed,automatic] +librsvg2-2/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librsvg2-common/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librtmp1/testing,now 2.4+20151223.gitfa8646d.1-2+b5 amd64 [installed,automatic] +libsasl2-2/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules-db/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libseccomp2/testing,now 2.5.5-2 amd64 [installed,automatic] +libselinux1-dev/testing,now 3.7-3.1 amd64 [installed,automatic] +libselinux1/testing,now 3.7-3.1 amd64 [installed,automatic] +libsemanage-common/testing,now 3.7-2.1 all [installed,automatic] +libsemanage2/testing,now 3.7-2.1 amd64 [installed,automatic] +libsensors-config/testing,now 1:3.6.0-10 all [installed,automatic] +libsensors5/testing,now 1:3.6.0-10+b1 amd64 [installed,automatic] +libsepol-dev/testing,now 3.7-1 amd64 [installed,automatic] +libsepol2/testing,now 3.7-1 amd64 [installed,automatic] +libsframe1/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libsharpyuv-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsharpyuv0/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsigc++-2.0-0v5/testing,now 2.12.1-3 amd64 [installed,automatic] +libsm-dev/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsm6/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsmartcols1/testing,now 2.40.4-2 amd64 [installed,automatic] +libsqlite3-0/testing,now 3.46.1-1 amd64 [installed,automatic] +libss2/testing,now 1.47.2-1 amd64 [installed,automatic] +libssh2-1t64/testing,now 1.11.1-1 amd64 [installed,automatic] +libssl3t64/testing,now 3.4.0-2 amd64 [installed,automatic] +libstdc++-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libstdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libsysprof-capture-4-dev/testing,now 47.2-1 amd64 [installed,automatic] +libsystemd-dev/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd-shared/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd0/testing,now 257.2-3 amd64 [installed,automatic] +libtasn1-6/testing,now 4.19.0-3+b3 amd64 [installed,automatic] +libtcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +libthai-data/testing,now 0.1.29-2 all [installed,automatic] +libthai-dev/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libthai0/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libtiff-dev/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiff6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiffxx6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtinfo6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libtinyxml2-10/testing,now 10.0.0+dfsg-2+b2 amd64 [installed,automatic] +libtool/testing,now 2.5.4-3 all [installed] +libtsan2/testing,now 14.2.0-12 amd64 [installed,automatic] +libubsan1/testing,now 14.2.0-12 amd64 [installed,automatic] +libudev1/testing,now 257.2-3 amd64 [installed,automatic] +libunistring5/testing,now 1.3-1 amd64 [installed,automatic] +libuuid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libvulkan1/testing,now 1.4.304.0-1 amd64 [installed,automatic] +libwayland-bin/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-client0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-cursor0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-dev/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-egl1/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-server0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwebp-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebp7/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdecoder3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdemux2/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpmux3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libx11-6/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-data/testing,now 2:1.8.10-2 all [installed,automatic] +libx11-dev/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-xcb1/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libxapian30/testing,now 1.4.25-2 amd64 [installed,automatic] +libxau-dev/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxau6/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxaw7/testing,now 2:1.0.16-1 amd64 [installed,automatic] +libxcb-dri2-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-dri3-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-glx0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-present0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-randr0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-sync1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-xfixes0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcomposite-dev/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcomposite1/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcursor-dev/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxcursor1/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxdamage-dev/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdamage1/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdmcp-dev/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxdmcp6/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxext-dev/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxext6/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxfixes-dev/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxfixes3/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxft-dev/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxft2/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxi-dev/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxi6/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxinerama-dev/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxinerama1/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxkbcommon-dev/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbcommon0/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbfile1/testing,now 1:1.1.0-1+b4 amd64 [installed,automatic] +libxklavier-dev/testing,now 5.4-5+b2 amd64 [installed] +libxklavier16/testing,now 5.4-5+b2 amd64 [installed,automatic] +libxml2-dev/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxml2-utils/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed] +libxml2/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxmu6/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxmuu1/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxpm4/testing,now 1:3.5.17-1+b3 amd64 [installed,automatic] +libxrandr-dev/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrandr2/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrender-dev/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxrender1/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxshmfence1/testing,now 1.3-1+b3 amd64 [installed,automatic] +libxt6t64/testing,now 1:1.2.1-1.2+b2 amd64 [installed,automatic] +libxtst-dev/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxtst6/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxxf86vm1/testing,now 1:1.1.4-1+b4 amd64 [installed,automatic] +libxxhash0/testing,now 0.8.2-2+b2 amd64 [installed,automatic] +libyaml-0-2/testing,now 0.2.5-2 amd64 [installed,automatic] +libz3-4/testing,now 4.13.3-1 amd64 [installed,automatic] +libz3-dev/testing,now 4.13.3-1 amd64 [installed,automatic] +libzstd-dev/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +libzstd1/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +linux-libc-dev/testing,now 6.12.11-1 all [installed,automatic] +linux-sysctl-defaults/testing,now 4.11 all [installed,automatic] +llvm-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-linker-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-runtime/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +login.defs/testing,now 1:4.16.0-7 all [installed,automatic] +login/testing,now 1:4.16.0-2+really2.40.4-2 amd64 [installed,automatic] +logsave/testing,now 1.47.2-1 amd64 [installed,automatic] +m4/testing,now 1.4.19-5 amd64 [installed,automatic] +make/testing,now 4.4.1-1 amd64 [installed] +manpages-dev/testing,now 6.9.1-1 all [installed,automatic] +manpages/testing,now 6.9.1-1 all [installed,automatic] +mawk/testing,now 1.3.4.20240905-1 amd64 [installed,automatic] +media-types/testing,now 10.1.0 all [installed,automatic] +mesa-libgallium/testing,now 24.2.8-1 amd64 [installed,automatic] +mesa-vulkan-drivers/testing,now 24.2.8-1 amd64 [installed,automatic] +mount/testing,now 2.40.4-2 amd64 [installed,automatic] +native-architecture/testing,now 0.2.5 all [installed,automatic] +ncurses-base/testing,now 6.5-2 all [installed,automatic] +ncurses-bin/testing,now 6.5-2+b1 amd64 [installed,automatic] +netbase/testing,now 6.4 all [installed,automatic] +openssh-client/testing,now 1:9.9p1-3 amd64 [installed,automatic] +openssl-provider-legacy/testing,now 3.4.0-2 amd64 [installed,automatic] +openssl/testing,now 3.4.0-2 amd64 [installed,automatic] +pango1.0-tools/testing,now 1.56.1-1 amd64 [installed,automatic] +passwd/testing,now 1:4.16.0-7 amd64 [installed,automatic] +patch/testing,now 2.7.6-7 amd64 [installed,automatic] +perl-base/testing,now 5.40.0-8 amd64 [installed,automatic] +perl-modules-5.40/testing,now 5.40.0-8 all [installed,automatic] +perl/testing,now 5.40.0-8 amd64 [installed,automatic] +pinentry-curses/testing,now 1.3.1-2 amd64 [installed,automatic] +pkgconf-bin/testing,now 1.8.1-4 amd64 [installed,automatic] +pkgconf/testing,now 1.8.1-4 amd64 [installed,automatic] +procps/testing,now 2:4.0.4-7 amd64 [installed,automatic] +psmisc/testing,now 23.7-1 amd64 [installed,automatic] +publicsuffix/testing,now 20250108.1153-0.1 all [installed,automatic] +python3-autocommand/testing,now 2.2.2-3 all [installed,automatic] +python3-inflect/testing,now 7.3.1-2 all [installed,automatic] +python3-jaraco.context/testing,now 6.0.0-1 all [installed,automatic] +python3-jaraco.functools/testing,now 4.1.0-1 all [installed,automatic] +python3-jaraco.text/testing,now 4.0.0-1 all [installed,automatic] +python3-mako/testing,now 1.3.8-2 all [installed,automatic] +python3-markdown/testing,now 3.7-2 all [installed,automatic] +python3-markupsafe/testing,now 2.1.5-1+b2 amd64 [installed,automatic] +python3-minimal/testing,now 3.13.1-2 amd64 [installed,automatic] +python3-more-itertools/testing,now 10.6.0-1 all [installed,automatic] +python3-packaging/testing,now 24.2-1 all [installed,automatic] +python3-pkg-resources/testing,now 75.6.0-1 all [installed,automatic] +python3-pygments/testing,now 2.18.0+dfsg-2 all [installed,automatic] +python3-setuptools/testing,now 75.6.0-1 all [installed,automatic] +python3-typeguard/testing,now 4.4.1-1 all [installed,automatic] +python3-typing-extensions/testing,now 4.12.2-2 all [installed,automatic] +python3-yaml/testing,now 6.0.2-1+b1 amd64 [installed,automatic] +python3-zipp/testing,now 3.21.0-1 all [installed,automatic] +python3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3.13/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3/testing,now 3.13.1-2 amd64 [installed,automatic] +readline-common/testing,now 8.2-6 all [installed,automatic] +rpcsvc-proto/testing,now 1.4.3-1 amd64 [installed,automatic] +sed/testing,now 4.9-2 amd64 [installed,automatic] +sensible-utils/testing,now 0.0.24 all [installed,automatic] +sgml-base/testing,now 1.31 all [installed,automatic] +shared-mime-info/testing,now 2.4-5+b2 amd64 [installed,automatic] +sqv/testing,now 1.2.1-5 amd64 [installed,automatic] +systemd-cryptsetup/testing,now 257.2-3 amd64 [installed,automatic] +systemd-sysv/testing,now 257.2-3 amd64 [installed,automatic] +systemd-timesyncd/testing,now 257.2-3 amd64 [installed,automatic] +systemd/testing,now 257.2-3 amd64 [installed,automatic] +sysvinit-utils/testing,now 3.13-1 amd64 [installed,automatic] +tar/testing,now 1.35+dfsg-3.1 amd64 [installed,automatic] +tcl-expect/testing,now 5.45.4-3+b1 amd64 [installed,automatic] +tcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +tzdata/testing,now 2024b-6 all [installed,automatic] +util-linux/testing,now 2.40.4-2 amd64 [installed,automatic] +uuid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +wayland-protocols/testing,now 1.39-1 all [installed,automatic] +wget/testing,now 1.24.5-2+b1 amd64 [installed] +x11-common/testing,now 1:7.7+24 all [installed,automatic] +x11-xkb-utils/testing,now 7.7+9 amd64 [installed,automatic] +x11proto-dev/testing,now 2024.1-1 all [installed,automatic] +xauth/testing,now 1:1.1.2-1.1 amd64 [installed,automatic] +xdg-user-dirs/testing,now 0.18-2 amd64 [installed,automatic] +xkb-data/testing,now 2.42-1 all [installed,automatic] +xml-core/testing,now 0.19 all [installed,automatic] +xorg-sgml-doctools/testing,now 1:1.11-1.1 all [installed,automatic] +xtrans-dev/testing,now 1.4.0-1 all [installed,automatic] +xz-utils/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +zlib1g-dev/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +zlib1g/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +Errors detected in the build 0 +Warnings detected in the logs 96 +cppcheck defects detected in the logs 28 +TOTAL warnings detected in the logs 124 diff --git a/2025-02-06-152034-14522-1@76170f64aaf1_devel/report-37cb39.html b/2025-02-06-152034-14522-1@76170f64aaf1_devel/report-37cb39.html new file mode 100644 index 0000000..6e3c871 --- /dev/null +++ b/2025-02-06-152034-14522-1@76170f64aaf1_devel/report-37cb39.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 248, column 21
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-152034-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
This statement is never executed
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-152034-14522-1@76170f64aaf1_devel/report-523ef4.html b/2025-02-06-152034-14522-1@76170f64aaf1_devel/report-523ef4.html new file mode 100644 index 0000000..656b8c5 --- /dev/null +++ b/2025-02-06-152034-14522-1@76170f64aaf1_devel/report-523ef4.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 199, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-152034-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
This statement is never executed
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-152034-14522-1@76170f64aaf1_devel/report-5ce420.html b/2025-02-06-152034-14522-1@76170f64aaf1_devel/report-5ce420.html new file mode 100644 index 0000000..539b26b --- /dev/null +++ b/2025-02-06-152034-14522-1@76170f64aaf1_devel/report-5ce420.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 194, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-152034-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
This statement is never executed
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-152034-14522-1@76170f64aaf1_devel/report-5d4bc8.html b/2025-02-06-152034-14522-1@76170f64aaf1_devel/report-5d4bc8.html new file mode 100644 index 0000000..74b6d24 --- /dev/null +++ b/2025-02-06-152034-14522-1@76170f64aaf1_devel/report-5d4bc8.html @@ -0,0 +1,1609 @@ + + + +/rootdir/libcafekbd/tmp-introspectya_6du8x/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspectya_6du8x/Cafekbd-1.0.c
Warning:line 89, column 13
File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/libxml2 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-152034-14522-1 -x c /rootdir/libcafekbd/tmp-introspectya_6du8x/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
14
Loop condition is true. Entering loop body
28
Loop condition is true. Entering loop body
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
15
Assuming this stream operation fails
29
File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior
90 if (ret
15.1
'ret' is equal to 0
== 0)
16
Taking true branch
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out
16.1
'len_out' is not equal to NULL
!= NULL((void*)0))
17
Taking true branch
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
6
Assuming 'args' is not equal to NULL
7
Taking false branch
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
8
Assuming 'self' is non-null
9
Taking false branch
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input
9.1
'input' is not equal to NULL
== NULL((void*)0))
10
Taking false branch
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output
10.1
'output' is not equal to NULL
== NULL((void*)0))
11
Taking false branch
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
12
Loop condition is true. Entering loop body
26
Loop condition is true. Entering loop body
702 {
703 gsize len;
704 char *line = read_line (input, &len);
13
Calling 'read_line'
18
Returning from 'read_line'
27
Calling 'read_line'
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
19
Assuming 'line' is not equal to NULL
20
Assuming the condition is false
21
Taking false branch
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
22
Assuming the condition is false
23
Taking false branch
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
24
Assuming the condition is false
25
Taking false branch
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
742
743 if (quark == 0)
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
1
Assuming 'argc' is equal to 2
2
'?' condition is false
3
Assuming the condition is false
4
Taking false branch
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
5
Calling 'dump_irepository'
811 {
812 g_printerr ("%s\n", error->message);
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-152034-14522-1@76170f64aaf1_devel/report-891289.html b/2025-02-06-152034-14522-1@76170f64aaf1_devel/report-891289.html new file mode 100644 index 0000000..9880cd4 --- /dev/null +++ b/2025-02-06-152034-14522-1@76170f64aaf1_devel/report-891289.html @@ -0,0 +1,1603 @@ + + + +/rootdir/libcafekbd/tmp-introspectya_6du8x/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspectya_6du8x/Cafekbd-1.0.c
Warning:line 812, column 27
Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error')
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/libxml2 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-152034-14522-1 -x c /rootdir/libcafekbd/tmp-introspectya_6du8x/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
90 if (ret == 0)
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out != NULL((void*)0))
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
21
Assuming the condition is false
22
Taking false branch
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
23
Returning without writing to '*error'
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
7
Assuming 'args' is not equal to NULL
8
Taking false branch
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
9
Assuming 'self' is non-null
10
Taking false branch
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input
10.1
'input' is not equal to NULL
== NULL((void*)0))
11
Taking false branch
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output
11.1
'output' is not equal to NULL
== NULL((void*)0))
12
Taking false branch
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
13
Loop condition is true. Entering loop body
702 {
703 gsize len;
704 char *line = read_line (input, &len);
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
14
Assuming 'line' is not equal to NULL
15
Assuming the condition is false
16
Taking false branch
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
17
Assuming the condition is false
18
Taking false branch
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
19
Taking true branch
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
20
Calling 'invoke_error_quark'
24
Returning from 'invoke_error_quark'
742
743 if (quark == 0)
25
Assuming 'quark' is equal to 0
26
Taking true branch
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
27
Returning without writing to '*error'
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
1
'error' initialized to a null pointer value
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
2
Assuming 'argc' is equal to 2
3
'?' condition is false
4
Assuming the condition is false
5
Taking false branch
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
6
Calling 'dump_irepository'
28
Returning from 'dump_irepository'
29
Taking true branch
811 {
812 g_printerr ("%s\n", error->message);
30
Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error')
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-152034-14522-1@76170f64aaf1_devel/report-9361af.html b/2025-02-06-152034-14522-1@76170f64aaf1_devel/report-9361af.html new file mode 100644 index 0000000..8ff71be --- /dev/null +++ b/2025-02-06-152034-14522-1@76170f64aaf1_devel/report-9361af.html @@ -0,0 +1,1609 @@ + + + +/rootdir/libcafekbd/tmp-introspectya_6du8x/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspectya_6du8x/Cafekbd-1.0.c
Warning:line 89, column 13
Read function called when stream is in EOF state. Function has no effect
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/libxml2 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-152034-14522-1 -x c /rootdir/libcafekbd/tmp-introspectya_6du8x/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
14
Loop condition is true. Entering loop body
28
Loop condition is true. Entering loop body
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
15
Assuming stream reaches end-of-file here
29
Read function called when stream is in EOF state. Function has no effect
90 if (ret
15.1
'ret' is equal to 0
== 0)
16
Taking true branch
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out
16.1
'len_out' is not equal to NULL
!= NULL((void*)0))
17
Taking true branch
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
6
Assuming 'args' is not equal to NULL
7
Taking false branch
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
8
Assuming 'self' is non-null
9
Taking false branch
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input
9.1
'input' is not equal to NULL
== NULL((void*)0))
10
Taking false branch
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output
10.1
'output' is not equal to NULL
== NULL((void*)0))
11
Taking false branch
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
12
Loop condition is true. Entering loop body
26
Loop condition is true. Entering loop body
702 {
703 gsize len;
704 char *line = read_line (input, &len);
13
Calling 'read_line'
18
Returning from 'read_line'
27
Calling 'read_line'
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
19
Assuming 'line' is not equal to NULL
20
Assuming the condition is false
21
Taking false branch
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
22
Assuming the condition is false
23
Taking false branch
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
24
Assuming the condition is false
25
Taking false branch
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
742
743 if (quark == 0)
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
1
Assuming 'argc' is equal to 2
2
'?' condition is false
3
Assuming the condition is false
4
Taking false branch
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
5
Calling 'dump_irepository'
811 {
812 g_printerr ("%s\n", error->message);
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-152034-14522-1@76170f64aaf1_devel/report-b4532a.html b/2025-02-06-152034-14522-1@76170f64aaf1_devel/report-b4532a.html new file mode 100644 index 0000000..a74b7b4 --- /dev/null +++ b/2025-02-06-152034-14522-1@76170f64aaf1_devel/report-b4532a.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 228, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-152034-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
This statement is never executed
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-152034-14522-1@76170f64aaf1_devel/report-c098bd.html b/2025-02-06-152034-14522-1@76170f64aaf1_devel/report-c098bd.html new file mode 100644 index 0000000..109d817 --- /dev/null +++ b/2025-02-06-152034-14522-1@76170f64aaf1_devel/report-c098bd.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 187, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-152034-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
This statement is never executed
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-152034-14522-1@76170f64aaf1_devel/report-e0f2de.html b/2025-02-06-152034-14522-1@76170f64aaf1_devel/report-e0f2de.html new file mode 100644 index 0000000..c8af308 --- /dev/null +++ b/2025-02-06-152034-14522-1@76170f64aaf1_devel/report-e0f2de.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 225, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-152034-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
This statement is never executed
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-152034-14522-1@76170f64aaf1_devel/report-fb6164.html b/2025-02-06-152034-14522-1@76170f64aaf1_devel/report-fb6164.html new file mode 100644 index 0000000..77323c6 --- /dev/null +++ b/2025-02-06-152034-14522-1@76170f64aaf1_devel/report-fb6164.html @@ -0,0 +1,1504 @@ + + + +/rootdir/libcafekbd/tmp-introspectya_6du8x/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspectya_6du8x/Cafekbd-1.0.c
Warning:line 239, column 11
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/libxml2 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-152034-14522-1 -x c /rootdir/libcafekbd/tmp-introspectya_6du8x/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
90 if (ret == 0)
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out != NULL((void*)0))
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
This statement is never executed
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input == NULL((void*)0))
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output == NULL((void*)0))
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
702 {
703 gsize len;
704 char *line = read_line (input, &len);
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
742
743 if (quark == 0)
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
811 {
812 g_printerr ("%s\n", error->message);
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-152034-14522-1@76170f64aaf1_devel/report-ff92e7.html b/2025-02-06-152034-14522-1@76170f64aaf1_devel/report-ff92e7.html new file mode 100644 index 0000000..7a2eaa3 --- /dev/null +++ b/2025-02-06-152034-14522-1@76170f64aaf1_devel/report-ff92e7.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 256, column 21
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-152034-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
This statement is never executed
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-152034-14522-1@76170f64aaf1_devel/scanview.css b/2025-02-06-152034-14522-1@76170f64aaf1_devel/scanview.css new file mode 100644 index 0000000..cf8a5a6 --- /dev/null +++ b/2025-02-06-152034-14522-1@76170f64aaf1_devel/scanview.css @@ -0,0 +1,62 @@ +body { color:#000000; background-color:#ffffff } +body { font-family: Helvetica, sans-serif; font-size:9pt } +h1 { font-size: 14pt; } +h2 { font-size: 12pt; } +table { font-size:9pt } +table { border-spacing: 0px; border: 1px solid black } +th, table thead { + background-color:#eee; color:#666666; + font-weight: bold; cursor: default; + text-align:center; + font-weight: bold; font-family: Verdana; + white-space:nowrap; +} +.W { font-size:0px } +th, td { padding:5px; padding-left:8px; text-align:left } +td.SUMM_DESC { padding-left:12px } +td.DESC { white-space:pre } +td.Q { text-align:right } +td { text-align:left } +tbody.scrollContent { overflow:auto } + +table.form_group { + background-color: #ccc; + border: 1px solid #333; + padding: 2px; +} + +table.form_inner_group { + background-color: #ccc; + border: 1px solid #333; + padding: 0px; +} + +table.form { + background-color: #999; + border: 1px solid #333; + padding: 2px; +} + +td.form_label { + text-align: right; + vertical-align: top; +} +/* For one line entires */ +td.form_clabel { + text-align: right; + vertical-align: center; +} +td.form_value { + text-align: left; + vertical-align: top; +} +td.form_submit { + text-align: right; + vertical-align: top; +} + +h1.SubmitFail { + color: #f00; +} +h1.SubmitOk { +} diff --git a/2025-02-06-152034-14522-1@76170f64aaf1_devel/sorttable.js b/2025-02-06-152034-14522-1@76170f64aaf1_devel/sorttable.js new file mode 100644 index 0000000..e608daa --- /dev/null +++ b/2025-02-06-152034-14522-1@76170f64aaf1_devel/sorttable.js @@ -0,0 +1,512 @@ +/* + SortTable + version 2 + 7th April 2007 + Stuart Langridge, http://www.kryogenix.org/code/browser/sorttable/ + + Instructions: + Download this file + Add to your HTML + Add class="sortable" to any table you'd like to make sortable + Click on the headers to sort + + Thanks to many, many people for contributions and suggestions. + Licenced as X11: http://www.kryogenix.org/code/browser/licence.html + This basically means: do what you want with it. +*/ + + +var stIsIE = /*@cc_on!@*/false; + +sorttable = { + init: function() { + // quit if this function has already been called + if (arguments.callee.done) return; + // flag this function so we don't do the same thing twice + arguments.callee.done = true; + // kill the timer + if (_timer) clearInterval(_timer); + + if (!document.createElement || !document.getElementsByTagName) return; + + sorttable.DATE_RE = /^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/; + + forEach(document.getElementsByTagName('table'), function(table) { + if (table.className.search(/\bsortable\b/) != -1) { + sorttable.makeSortable(table); + } + }); + + }, + + makeSortable: function(table) { + if (table.getElementsByTagName('thead').length == 0) { + // table doesn't have a tHead. Since it should have, create one and + // put the first table row in it. + the = document.createElement('thead'); + the.appendChild(table.rows[0]); + table.insertBefore(the,table.firstChild); + } + // Safari doesn't support table.tHead, sigh + if (table.tHead == null) table.tHead = table.getElementsByTagName('thead')[0]; + + if (table.tHead.rows.length != 1) return; // can't cope with two header rows + + // Sorttable v1 put rows with a class of "sortbottom" at the bottom (as + // "total" rows, for example). This is B&R, since what you're supposed + // to do is put them in a tfoot. So, if there are sortbottom rows, + // for backward compatibility, move them to tfoot (creating it if needed). + sortbottomrows = []; + for (var i=0; i5' : ' ▴'; + this.appendChild(sortrevind); + return; + } + if (this.className.search(/\bsorttable_sorted_reverse\b/) != -1) { + // if we're already sorted by this column in reverse, just + // re-reverse the table, which is quicker + sorttable.reverse(this.sorttable_tbody); + this.className = this.className.replace('sorttable_sorted_reverse', + 'sorttable_sorted'); + this.removeChild(document.getElementById('sorttable_sortrevind')); + sortfwdind = document.createElement('span'); + sortfwdind.id = "sorttable_sortfwdind"; + sortfwdind.innerHTML = stIsIE ? ' 6' : ' ▾'; + this.appendChild(sortfwdind); + return; + } + + // remove sorttable_sorted classes + theadrow = this.parentNode; + forEach(theadrow.childNodes, function(cell) { + if (cell.nodeType == 1) { // an element + cell.className = cell.className.replace('sorttable_sorted_reverse',''); + cell.className = cell.className.replace('sorttable_sorted',''); + } + }); + sortfwdind = document.getElementById('sorttable_sortfwdind'); + if (sortfwdind) { sortfwdind.parentNode.removeChild(sortfwdind); } + sortrevind = document.getElementById('sorttable_sortrevind'); + if (sortrevind) { sortrevind.parentNode.removeChild(sortrevind); } + + this.className += ' sorttable_sorted'; + sortfwdind = document.createElement('span'); + sortfwdind.id = "sorttable_sortfwdind"; + sortfwdind.innerHTML = stIsIE ? ' 6' : ' ▾'; + this.appendChild(sortfwdind); + + // build an array to sort. This is a Schwartzian transform thing, + // i.e., we "decorate" each row with the actual sort key, + // sort based on the sort keys, and then put the rows back in order + // which is a lot faster because you only do getInnerText once per row + row_array = []; + col = this.sorttable_columnindex; + rows = this.sorttable_tbody.rows; + for (var j=0; j 12) { + // definitely dd/mm + return sorttable.sort_ddmm; + } else if (second > 12) { + return sorttable.sort_mmdd; + } else { + // looks like a date, but we can't tell which, so assume + // that it's dd/mm (English imperialism!) and keep looking + sortfn = sorttable.sort_ddmm; + } + } + } + } + return sortfn; + }, + + getInnerText: function(node) { + // gets the text we want to use for sorting for a cell. + // strips leading and trailing whitespace. + // this is *not* a generic getInnerText function; it's special to sorttable. + // for example, you can override the cell text with a customkey attribute. + // it also gets .value for fields. + + hasInputs = (typeof node.getElementsByTagName == 'function') && + node.getElementsByTagName('input').length; + + if (node.getAttribute("sorttable_customkey") != null) { + return node.getAttribute("sorttable_customkey"); + } + else if (typeof node.textContent != 'undefined' && !hasInputs) { + return node.textContent.replace(/^\s+|\s+$/g, ''); + } + else if (typeof node.innerText != 'undefined' && !hasInputs) { + return node.innerText.replace(/^\s+|\s+$/g, ''); + } + else if (typeof node.text != 'undefined' && !hasInputs) { + return node.text.replace(/^\s+|\s+$/g, ''); + } + else { + switch (node.nodeType) { + case 3: + if (node.nodeName.toLowerCase() == 'input') { + return node.value.replace(/^\s+|\s+$/g, ''); + } + case 4: + return node.nodeValue.replace(/^\s+|\s+$/g, ''); + break; + case 1: + case 11: + var innerText = ''; + for (var i = 0; i < node.childNodes.length; i++) { + innerText += sorttable.getInnerText(node.childNodes[i]); + } + return innerText.replace(/^\s+|\s+$/g, ''); + break; + default: + return ''; + } + } + }, + + reverse: function(tbody) { + // reverse the rows in a tbody + newrows = []; + for (var i=0; i=0; i--) { + tbody.appendChild(newrows[i]); + } + delete newrows; + }, + + /* sort functions + each sort function takes two parameters, a and b + you are comparing a[0] and b[0] */ + sort_numeric: function(a,b) { + aa = parseFloat(a[0].replace(/[^0-9.-]/g,'')); + if (isNaN(aa)) aa = 0; + bb = parseFloat(b[0].replace(/[^0-9.-]/g,'')); + if (isNaN(bb)) bb = 0; + return aa-bb; + }, + sort_alpha: function(a,b) { + if (a[0]==b[0]) return 0; + if (a[0] 0 ) { + var q = list[i]; list[i] = list[i+1]; list[i+1] = q; + swap = true; + } + } // for + t--; + + if (!swap) break; + + for(var i = t; i > b; --i) { + if ( comp_func(list[i], list[i-1]) < 0 ) { + var q = list[i]; list[i] = list[i-1]; list[i-1] = q; + swap = true; + } + } // for + b++; + + } // while(swap) + } +} + +/* ****************************************************************** + Supporting functions: bundled here to avoid depending on a library + ****************************************************************** */ + +// Dean Edwards/Matthias Miller/John Resig + +/* for Mozilla/Opera9 */ +if (document.addEventListener) { + document.addEventListener("DOMContentLoaded", sorttable.init, false); +} + +/* for Internet Explorer */ +/*@cc_on @*/ +/*@if (@_win32) + document.write(" + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <X11/keysym.h>
+
+#include <glib/gi18n-lib.h>
+#include <gio/gio.h>
+#include <cafekbd-desktop-config.h>
+#include <cafekbd-config-private.h>
+
+/**
+ * CafekbdDesktopConfig:
+ */
+#define CAFEKBD_DESKTOP_CONFIG_SCHEMA  CAFEKBD_CONFIG_SCHEMA ".general"
+
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP[] = "default-group";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW[] = "group-per-window";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS[] = "handle-indicators";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES[] = "layout-names-as-group-names";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_LOAD_EXTRA_ITEMS[] = "load-extra-items";
+
+/*
+ * static common functions
+ */
+
+static gboolean
+    cafekbd_desktop_config_get_lv_descriptions
+    (CafekbdDesktopConfig * config,
+     XklConfigRegistry * registry,
+     const gchar ** layout_ids,
+     const gchar ** variant_ids,
+     gchar *** short_layout_descriptions,
+     gchar *** long_layout_descriptions,
+     gchar *** short_variant_descriptions,
+     gchar *** long_variant_descriptions) {
+	const gchar **pl, **pv;
+	guint total_layouts;
+	gchar **sld, **lld, **svd, **lvd;
+	XklConfigItem *item = xkl_config_item_new ();
+
+	if (!
+	    (xkl_engine_get_features (config->engine) &
+	     XKLF_MULTIPLE_LAYOUTS_SUPPORTED))
+		return FALSE;
+
+	pl = layout_ids;
+	pv = variant_ids;
+	total_layouts = g_strv_length ((char **) layout_ids);
+	sld = *short_layout_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+	lld = *long_layout_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+	svd = *short_variant_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+	lvd = *long_variant_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+
+	while (pl != NULL && *pl != NULL) {
+
+		xkl_debug (100, "ids: [%s][%s]\n", *pl,
+			   pv == NULL ? NULL : *pv);
+
+		g_snprintf (item->name, sizeof item->name, "%s", *pl);
+		if (xkl_config_registry_find_layout (registry, item)) {
+			*sld = g_strdup (item->short_description);
+			*lld = g_strdup (item->description);
+		} else {
+			*sld = g_strdup ("");
+			*lld = g_strdup ("");
+		}
+
+		if (pv != NULL && *pv != NULL) {
+			g_snprintf (item->name, sizeof item->name, "%s",
+				    *pv);
+			if (xkl_config_registry_find_variant
+			    (registry, *pl, item)) {
+				*svd = g_strdup (item->short_description);
+				*lvd = g_strdup (item->description);
+			} else {
+				*svd = g_strdup ("");
+				*lvd = g_strdup ("");
+			}
+		} else {
+			*svd = g_strdup ("");
+			*lvd = g_strdup ("");
+		}
+
+		xkl_debug (100, "description: [%s][%s][%s][%s]\n",
+			   *sld, *lld, *svd, *lvd);
+		sld++;
+		lld++;
+		svd++;
+		lvd++;
+
+		pl++;
+
+		if (pv != NULL && *pv != NULL)
+			pv++;
+	}
+
+	g_object_unref (item);
+	return TRUE;
+}
+
+/*
+ * extern CafekbdDesktopConfig config functions
+ */
+void
+cafekbd_desktop_config_init (CafekbdDesktopConfig * config,
+			  XklEngine * engine)
+{
+	memset (config, 0, sizeof (*config));
+	config->settings = g_settings_new (CAFEKBD_DESKTOP_CONFIG_SCHEMA);
+	config->engine = engine;
+}
+
+void
+cafekbd_desktop_config_term (CafekbdDesktopConfig * config)
+{
+	g_object_unref (config->settings);
+	config->settings = NULL;
+}
+
+void
+cafekbd_desktop_config_load_from_gsettings (CafekbdDesktopConfig * config)
+{
+	config->group_per_app =
+	    g_settings_get_boolean (config->settings,
+				 CAFEKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW);
+	xkl_debug (150, "group_per_app: %d\n", config->group_per_app);
+
+	config->handle_indicators =
+	    g_settings_get_boolean (config->settings,
+				 CAFEKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS);
+	xkl_debug (150, "handle_indicators: %d\n",
+		   config->handle_indicators);
+
+	config->layout_names_as_group_names =
+	    g_settings_get_boolean (config->settings,
+				   CAFEKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES);
+	xkl_debug (150, "layout_names_as_group_names: %d\n",
+		   config->layout_names_as_group_names);
+
+	config->load_extra_items =
+	    g_settings_get_boolean (config->settings,
+				   CAFEKBD_DESKTOP_CONFIG_KEY_LOAD_EXTRA_ITEMS);
+	xkl_debug (150, "load_extra_items: %d\n",
+		   config->load_extra_items);
+
+	config->default_group =
+	    g_settings_get_int (config->settings,
+				  CAFEKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP);
+
+	if (config->default_group < -1
+	    || config->default_group >=
+	    xkl_engine_get_max_num_groups (config->engine))
+		config->default_group = -1;
+	xkl_debug (150, "default_group: %d\n", config->default_group);
+}
+
+void
+cafekbd_desktop_config_save_to_gsettings (CafekbdDesktopConfig * config)
+{
+	g_settings_delay (config->settings);
+
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW,
+			     config->group_per_app);
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS,
+			     config->handle_indicators);
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES,
+			     config->layout_names_as_group_names);
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_LOAD_EXTRA_ITEMS,
+			     config->load_extra_items);
+	g_settings_set_int (config->settings,
+			    CAFEKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP,
+			    config->default_group);
+
+	g_settings_apply (config->settings);
+}
+
+gboolean
+cafekbd_desktop_config_activate (CafekbdDesktopConfig * config)
+{
+	gboolean rv = TRUE;
+
+	xkl_engine_set_group_per_toplevel_window (config->engine,
+						  config->group_per_app);
+	xkl_engine_set_indicators_handling (config->engine,
+					    config->handle_indicators);
+	xkl_engine_set_default_group (config->engine,
+				      config->default_group);
+
+	return rv;
+}
+
+void
+cafekbd_desktop_config_lock_next_group (CafekbdDesktopConfig * config)
+{
+	int group = xkl_engine_get_next_group (config->engine);
+	xkl_engine_lock_group (config->engine, group);
+}
+
+void
+cafekbd_desktop_config_lock_prev_group (CafekbdDesktopConfig * config)
+{
+	int group = xkl_engine_get_prev_group (config->engine);
+	xkl_engine_lock_group (config->engine, group);
+}
+
+void
+cafekbd_desktop_config_restore_group (CafekbdDesktopConfig * config)
+{
+	int group = xkl_engine_get_current_window_group (config->engine);
+	xkl_engine_lock_group (config->engine, group);
+}
+
+/**
+ * cafekbd_desktop_config_start_listen:
+ * @func: (scope notified): a function to call when settings are changed
+ */
+void
+cafekbd_desktop_config_start_listen (CafekbdDesktopConfig * config,
+				  GCallback func,
+				  gpointer user_data)
+{
+	config->config_listener_id =
+	    g_signal_connect (config->settings, "changed", func,
+			      user_data);
+}
+
+void
+cafekbd_desktop_config_stop_listen (CafekbdDesktopConfig * config)
+{
+	g_signal_handler_disconnect (config->settings,
+				    config->config_listener_id);
+	config->config_listener_id = 0;
+}
+
+gboolean
+cafekbd_desktop_config_load_group_descriptions (CafekbdDesktopConfig
+					     * config,
+					     XklConfigRegistry *
+					     registry,
+					     const gchar **
+					     layout_ids,
+					     const gchar **
+					     variant_ids,
+					     gchar ***
+					     short_group_names,
+					     gchar *** full_group_names)
+{
+	gchar **sld, **lld, **svd, **lvd;
+	gchar **psld, **plld, **plvd;
+	gchar **psgn, **pfgn, **psvd;
+	gint total_descriptions;
+
+	if (!cafekbd_desktop_config_get_lv_descriptions
+	    (config, registry, layout_ids, variant_ids, &sld, &lld, &svd,
+	     &lvd)) {
+		return False;
+	}
+
+	total_descriptions = g_strv_length (sld);
+
+	*short_group_names = psgn =
+	    g_new0 (gchar *, total_descriptions + 1);
+	*full_group_names = pfgn =
+	    g_new0 (gchar *, total_descriptions + 1);
+
+	plld = lld;
+	psld = sld;
+	plvd = lvd;
+	psvd = svd;
+	while (plld != NULL && *plld != NULL) {
+		gchar *sd = (*psvd[0] == '\0') ? *psld : *psvd;
+		psld++, psvd++;
+		*psgn++ = g_strdup (sd);
+		*pfgn++ = g_strdup (cafekbd_keyboard_config_format_full_layout
+				    (*plld++, *plvd++));
+	}
+	g_strfreev (sld);
+	g_strfreev (lld);
+	g_strfreev (svd);
+	g_strfreev (lvd);
+
+	return True;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/1.html b/2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/1.html new file mode 100644 index 0000000..43abc15 --- /dev/null +++ b/2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/1.html @@ -0,0 +1,914 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <X11/keysym.h>
+
+#include <pango/pango.h>
+
+#include <glib/gi18n-lib.h>
+#include <cdk/cdkx.h>
+
+#include <cafekbd-keyboard-config.h>
+#include <cafekbd-indicator-config.h>
+
+#include <cafekbd-config-private.h>
+
+/**
+ * CafekbdIndicatorConfig:
+ */
+#define CAFEKBD_INDICATOR_CONFIG_SCHEMA  CAFEKBD_CONFIG_SCHEMA ".indicator"
+
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS[] = "show-flags";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_SECONDARIES[] = "secondary";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_FONT_FAMILY[] = "font-family";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_FOREGROUND_COLOR[] = "foreground-color";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_BACKGROUND_COLOR[] = "background-color";
+
+/*
+ * static applet config functions
+ */
+static void
+cafekbd_indicator_config_load_font (CafekbdIndicatorConfig * ind_config)
+{
+	ind_config->font_family =
+	    g_settings_get_string (ind_config->settings,
+				   CAFEKBD_INDICATOR_CONFIG_KEY_FONT_FAMILY);
+
+	if (ind_config->font_family == NULL ||
+	    ind_config->font_family[0] == '\0') {
+		PangoFontDescription *fd = NULL;
+		CtkWidgetPath *widget_path = ctk_widget_path_new ();
+		CtkStyleContext *context = ctk_style_context_new ();
+
+		ctk_widget_path_append_type (widget_path, CTK_TYPE_WINDOW);
+		ctk_widget_path_iter_set_name (widget_path, -1 , "PanelWidget");
+
+		ctk_style_context_set_path (context, widget_path);
+		ctk_style_context_set_screen (context, cdk_screen_get_default ());
+		ctk_style_context_set_state (context, CTK_STATE_FLAG_NORMAL);
+		ctk_style_context_add_class (context, CTK_STYLE_CLASS_DEFAULT);
+		ctk_style_context_add_class (context, "gnome-panel-menu-bar");
+		ctk_style_context_add_class (context, "cafe-panel-menu-bar");
+
+		ctk_style_context_get (context, CTK_STATE_FLAG_NORMAL,
+		                       CTK_STYLE_PROPERTY_FONT, &fd, NULL);
+
+		if (fd != NULL) {
+			ind_config->font_family =
+			    g_strdup (pango_font_description_to_string(fd));
+		}
+
+		g_object_unref (G_OBJECT (context));
+		ctk_widget_path_unref (widget_path);
+	}
+	xkl_debug (150, "font: [%s]\n", ind_config->font_family);
+
+}
+
+static void
+cafekbd_indicator_config_load_colors (CafekbdIndicatorConfig * ind_config)
+{
+	ind_config->foreground_color =
+	    g_settings_get_string (ind_config->settings,
+	                           CAFEKBD_INDICATOR_CONFIG_KEY_FOREGROUND_COLOR);
+
+	if (ind_config->foreground_color == NULL ||
+	    ind_config->foreground_color[0] == '\0') {
+		CtkWidgetPath *widget_path = ctk_widget_path_new ();
+		CtkStyleContext *context = ctk_style_context_new ();
+		CdkRGBA fg_color;
+
+		ctk_widget_path_append_type (widget_path, CTK_TYPE_WINDOW);
+		ctk_widget_path_iter_set_name (widget_path, -1 , "PanelWidget");
+
+		ctk_style_context_set_path (context, widget_path);
+		ctk_style_context_set_screen (context, cdk_screen_get_default ());
+		ctk_style_context_set_state (context, CTK_STATE_FLAG_NORMAL);
+		ctk_style_context_add_class (context, CTK_STYLE_CLASS_DEFAULT);
+		ctk_style_context_add_class (context, "gnome-panel-menu-bar");
+		ctk_style_context_add_class (context, "cafe-panel-menu-bar");
+
+		ctk_style_context_get_color (context,
+		                             CTK_STATE_FLAG_NORMAL, &fg_color);
+		ind_config->foreground_color =
+		    g_strdup_printf ("%g %g %g",
+		                     fg_color.red,
+		                     fg_color.green,
+		                     fg_color.blue);
+
+		g_object_unref (G_OBJECT (context));
+		ctk_widget_path_unref (widget_path);
+	}
+
+	ind_config->background_color =
+	    g_settings_get_string (ind_config->settings,
+				     CAFEKBD_INDICATOR_CONFIG_KEY_BACKGROUND_COLOR);
+}
+
+void
+cafekbd_indicator_config_refresh_style (CafekbdIndicatorConfig * ind_config)
+{
+	g_free (ind_config->font_family);
+	g_free (ind_config->foreground_color);
+	g_free (ind_config->background_color);
+	cafekbd_indicator_config_load_font (ind_config);
+	cafekbd_indicator_config_load_colors (ind_config);
+}
+
+gchar *
+cafekbd_indicator_config_get_images_file (CafekbdIndicatorConfig *
+				       ind_config,
+				       CafekbdKeyboardConfig *
+				       kbd_config, int group)
+{
+	char *image_file = NULL;
+	CtkIconInfo *icon_info = NULL;
+
+	if (!ind_config->show_flags)
+		return NULL;
+
+	if ((kbd_config->layouts_variants != NULL) &&
+	    (g_strv_length (kbd_config->layouts_variants) > group)) {
+		char *full_layout_name =
+		    kbd_config->layouts_variants[group];
+
+		if (full_layout_name != NULL) {
+			char *l, *v;
+			cafekbd_keyboard_config_split_items (full_layout_name,
+							  &l, &v);
+			if (l != NULL) {
+				/* probably there is something in theme? */
+				icon_info = ctk_icon_theme_lookup_icon
+				    (ind_config->icon_theme, l, 48, 0);
+
+				/* Unbelievable but happens */
+				if (icon_info != NULL &&
+				    ctk_icon_info_get_filename (icon_info) == NULL) {
+					g_object_unref (icon_info);
+					icon_info = NULL;
+				}
+			}
+		}
+	}
+	/* fallback to the default value */
+	if (icon_info == NULL) {
+		icon_info = ctk_icon_theme_lookup_icon
+		    (ind_config->icon_theme, "stock_dialog-error", 48, 0);
+	}
+	if (icon_info != NULL) {
+		image_file =
+		    g_strdup (ctk_icon_info_get_filename (icon_info));
+		g_object_unref (icon_info);
+	}
+
+	return image_file;
+}
+
+void
+cafekbd_indicator_config_load_image_filenames (CafekbdIndicatorConfig *
+					    ind_config,
+					    CafekbdKeyboardConfig *
+					    kbd_config)
+{
+	int i;
+	ind_config->image_filenames = NULL;
+
+	if (!ind_config->show_flags)
+		return;
+
+	for (i = xkl_engine_get_max_num_groups (ind_config->engine);
+	     --i >= 0;) {
+		gchar *image_file =
+		    cafekbd_indicator_config_get_images_file (ind_config,
+							   kbd_config,
+							   i);
+		ind_config->image_filenames =
+		    g_slist_prepend (ind_config->image_filenames,
+				     image_file);
+	}
+}
+
+void
+cafekbd_indicator_config_free_image_filenames (CafekbdIndicatorConfig *
+					    ind_config)
+{
+	while (ind_config->image_filenames) {
+		if (ind_config->image_filenames->data)
+			g_free (ind_config->image_filenames->data);
+		ind_config->image_filenames =
+		    g_slist_delete_link (ind_config->image_filenames,
+					 ind_config->image_filenames);
+	}
+}
+
+void
+cafekbd_indicator_config_init (CafekbdIndicatorConfig * ind_config,
+			       XklEngine * engine)
+{
+	gchar *sp;
+
+	memset (ind_config, 0, sizeof (*ind_config));
+	ind_config->settings = g_settings_new (CAFEKBD_INDICATOR_CONFIG_SCHEMA);
+	ind_config->engine = engine;
+
+	ind_config->icon_theme = ctk_icon_theme_get_default ();
+
+	ctk_icon_theme_append_search_path (ind_config->icon_theme, sp =
+					   g_build_filename (g_get_home_dir
+							     (),
+							     ".icons/flags",
+							     NULL));
+	g_free (sp);
+
+	ctk_icon_theme_append_search_path (ind_config->icon_theme,
+					   sp =
+					   g_build_filename (DATADIR,
+							     "pixmaps/flags",
+							     NULL));
+	g_free (sp);
+
+	ctk_icon_theme_append_search_path (ind_config->icon_theme,
+					   sp =
+					   g_build_filename (DATADIR,
+							     "icons/flags",
+							     NULL));
+	g_free (sp);
+}
+
+void
+cafekbd_indicator_config_term (CafekbdIndicatorConfig * ind_config)
+{
+	g_free (ind_config->font_family);
+	ind_config->font_family = NULL;
+
+	g_free (ind_config->foreground_color);
+	ind_config->foreground_color = NULL;
+
+	g_free (ind_config->background_color);
+	ind_config->background_color = NULL;
+
+	ind_config->icon_theme = NULL;
+
+	cafekbd_indicator_config_free_image_filenames (ind_config);
+
+	g_object_unref (ind_config->settings);
+	ind_config->settings = NULL;
+}
+
+void
+cafekbd_indicator_config_load_from_gsettings (CafekbdIndicatorConfig * ind_config)
+{
+	ind_config->secondary_groups_mask =
+	    g_settings_get_int (ind_config->settings,
+				CAFEKBD_INDICATOR_CONFIG_KEY_SECONDARIES);
+
+	ind_config->show_flags =
+	    g_settings_get_boolean (ind_config->settings,
+				 CAFEKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS);
+
+	cafekbd_indicator_config_load_font (ind_config);
+	cafekbd_indicator_config_load_colors (ind_config);
+
+}
+
+void
+cafekbd_indicator_config_save_to_gsettings (CafekbdIndicatorConfig * ind_config)
+{
+	g_settings_delay (ind_config->settings);
+
+	g_settings_set_int (ind_config->settings,
+				  CAFEKBD_INDICATOR_CONFIG_KEY_SECONDARIES,
+				  ind_config->secondary_groups_mask);
+	g_settings_set_boolean (ind_config->settings,
+				   CAFEKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS,
+				   ind_config->show_flags);
+
+	g_settings_apply (ind_config->settings);
+}
+
+void
+cafekbd_indicator_config_activate (CafekbdIndicatorConfig * ind_config)
+{
+	xkl_engine_set_secondary_groups_mask (ind_config->engine,
+					      ind_config->secondary_groups_mask);
+}
+
+/**
+ * cafekbd_indicator_config_start_listen:
+ * @func: (scope notified): a function to call when settings are changed
+ */
+void
+cafekbd_indicator_config_start_listen (CafekbdIndicatorConfig *
+				    ind_config,
+				    GCallback func,
+				    gpointer user_data)
+{
+	ind_config->config_listener_id =
+	    g_signal_connect (ind_config->settings, "changed", func,
+			      user_data);
+}
+
+void
+cafekbd_indicator_config_stop_listen (CafekbdIndicatorConfig * ind_config)
+{
+	g_signal_handler_disconnect (ind_config->settings,
+				     ind_config->config_listener_id);
+	ind_config->config_listener_id = 0;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/2.html b/2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/2.html new file mode 100644 index 0000000..4489934 --- /dev/null +++ b/2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/2.html @@ -0,0 +1,2100 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
+871
+872
+873
+874
+875
+876
+877
+878
+879
+880
+881
+882
+883
+884
+885
+886
+887
+888
+889
+890
+891
+892
+893
+894
+895
+896
+897
+898
+899
+900
+901
+902
+903
+904
+905
+906
+907
+908
+909
+910
+911
+912
+913
+914
+915
+916
+917
+918
+919
+920
+921
+922
+923
+924
+925
+926
+927
+928
+929
+930
+931
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+#include <config.h>
+
+#include <memory.h>
+
+#include <ctk/ctk.h>
+#include <cdk/cdkkeysyms.h>
+#include <cdk/cdkx.h>
+#include <glib/gi18n-lib.h>
+
+#include <cafekbd-indicator.h>
+#include <cafekbd-indicator-marshal.h>
+
+#include <cafekbd-desktop-config.h>
+#include <cafekbd-indicator-config.h>
+
+typedef struct _gki_globals {
+	XklEngine *engine;
+	XklConfigRegistry *registry;
+
+	CafekbdDesktopConfig cfg;
+	CafekbdIndicatorConfig ind_cfg;
+	CafekbdKeyboardConfig kbd_cfg;
+
+	const gchar *tooltips_format;
+	gchar **full_group_names;
+	gchar **short_group_names;
+	GSList *widget_instances;
+	GSList *images;
+} gki_globals;
+
+struct _CafekbdIndicatorPrivate {
+	gboolean set_parent_tooltips;
+	gdouble angle;
+};
+
+/* one instance for ALL widgets */
+static gki_globals globals;
+
+#define ForAllIndicators() \
+	{ \
+		GSList* cur; \
+		for (cur = globals.widget_instances; cur != NULL; cur = cur->next) { \
+			CafekbdIndicator * gki = (CafekbdIndicator*)cur->data;
+#define NextIndicator() \
+		} \
+	}
+
+G_DEFINE_TYPE (CafekbdIndicator, cafekbd_indicator, CTK_TYPE_NOTEBOOK)<--- There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
+
+static void
+cafekbd_indicator_global_init (void);
+static void
+cafekbd_indicator_global_term (void);
+static CtkWidget *
+cafekbd_indicator_prepare_drawing (CafekbdIndicator * gki, int group);
+static void
+cafekbd_indicator_set_current_page_for_group (CafekbdIndicator * gki, int group);
+static void
+cafekbd_indicator_set_current_page (CafekbdIndicator * gki);
+static void
+cafekbd_indicator_cleanup (CafekbdIndicator * gki);
+static void
+cafekbd_indicator_fill (CafekbdIndicator * gki);
+static void
+cafekbd_indicator_set_tooltips (CafekbdIndicator * gki, const char *str);
+
+gchar *
+cafekbd_indicator_extract_layout_name (int group, XklEngine *engine, CafekbdKeyboardConfig *kbd_cfg, gchar **short_group_names, gchar **full_group_names);
+gchar *
+cafekbd_indicator_create_label_title (int group, GHashTable **ln2cnt_map, gchar *layout_name);
+
+static void
+cafekbd_indicator_load_images (void)
+{
+	int i;
+	GSList *image_filename;
+
+	globals.images = NULL;
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	if (!globals.ind_cfg.show_flags)
+		return;
+
+	image_filename = globals.ind_cfg.image_filenames;
+
+	for (i = xkl_engine_get_max_num_groups (globals.engine);
+	     --i >= 0; image_filename = image_filename->next) {
+		GdkPixbuf *image = NULL;
+		char *image_file = (char *) image_filename->data;
+
+		if (image_file != NULL) {
+			GError *gerror = NULL;
+			image =
+			    gdk_pixbuf_new_from_file (image_file, &gerror);
+			if (image == NULL) {
+				CtkWidget *dialog =
+				    ctk_message_dialog_new (NULL,
+							    CTK_DIALOG_DESTROY_WITH_PARENT,
+							    CTK_MESSAGE_ERROR,
+							    CTK_BUTTONS_OK,
+							    _
+							    ("There was an error loading an image: %s"),
+							    gerror->
+							    message);
+				g_signal_connect (G_OBJECT (dialog),
+						  "response",
+						  G_CALLBACK
+						  (ctk_widget_destroy),
+						  NULL);
+
+				ctk_window_set_resizable (CTK_WINDOW
+							  (dialog), FALSE);
+
+				ctk_widget_show (dialog);
+				g_error_free (gerror);
+			}
+			xkl_debug (150,
+				   "Image %d[%s] loaded -> %p[%dx%d]\n",
+				   i, image_file, image,
+				   gdk_pixbuf_get_width (image),
+				   gdk_pixbuf_get_height (image));
+		}
+		/* We append the image anyway - even if it is NULL! */
+		globals.images = g_slist_append (globals.images, image);
+	}
+}
+
+static void
+cafekbd_indicator_free_images (void)
+{
+	GSList *img_node;
+
+	cafekbd_indicator_config_free_image_filenames (&globals.ind_cfg);
+
+	while ((img_node = globals.images) != NULL) {
+		GdkPixbuf *pi;
+
+		pi = GDK_PIXBUF (img_node->data);
+		/* It can be NULL - some images may be missing */
+		if (pi != NULL) {
+			g_object_unref (pi);
+		}
+		globals.images =
+		    g_slist_remove_link (globals.images, img_node);
+		g_slist_free_1 (img_node);
+	}
+}
+
+static void
+cafekbd_indicator_update_images (void)
+{
+	cafekbd_indicator_free_images ();
+	cafekbd_indicator_load_images ();
+}
+
+void
+cafekbd_indicator_set_tooltips (CafekbdIndicator * gki, const char *str)
+{
+	g_assert (str == NULL || g_utf8_validate (str, -1, NULL));
+
+	ctk_widget_set_tooltip_text (CTK_WIDGET (gki), str);
+
+	if (gki->priv->set_parent_tooltips) {
+		CtkWidget *parent =
+		    ctk_widget_get_parent (CTK_WIDGET (gki));
+		if (parent) {
+			ctk_widget_set_tooltip_text (parent, str);
+		}
+	}
+}
+
+void
+cafekbd_indicator_cleanup (CafekbdIndicator * gki)
+{
+	int i;
+	CtkNotebook *notebook = CTK_NOTEBOOK (gki);
+
+	/* Do not remove the first page! It is the default page */
+	for (i = ctk_notebook_get_n_pages (notebook); --i > 0;) {
+		ctk_notebook_remove_page (notebook, i);
+	}
+}
+
+void
+cafekbd_indicator_fill (CafekbdIndicator * gki)
+{
+	int grp;
+	int total_groups = xkl_engine_get_num_groups (globals.engine);
+	CtkNotebook *notebook = CTK_NOTEBOOK (gki);
+
+	for (grp = 0; grp < total_groups; grp++) {
+		CtkWidget *page;
+		page = cafekbd_indicator_prepare_drawing (gki, grp);
+
+		if (page == NULL)
+			page = ctk_label_new ("");
+
+		ctk_notebook_append_page (notebook, page, NULL);
+		ctk_widget_show_all (page);
+	}
+}
+
+static gboolean cafekbd_indicator_key_pressed (CtkWidget        *widget G_GNUC_UNUSED,
+					       CdkEventKey      *event,
+					       CafekbdIndicator *gki G_GNUC_UNUSED)
+{
+	switch (event->keyval)
+	{
+			case CDK_KEY_KP_Enter:
+			case CDK_KEY_ISO_Enter:
+			case CDK_KEY_3270_Enter:
+			case CDK_KEY_Return:
+			case CDK_KEY_space:
+			case CDK_KEY_KP_Space:
+			cafekbd_desktop_config_lock_next_group(&globals.cfg);
+			return TRUE;
+		default:
+			break;
+	}
+
+	return FALSE;
+}
+
+static gboolean
+cafekbd_indicator_button_pressed (CtkWidget        *widget,
+				  CdkEventButton   *event,
+				  CafekbdIndicator *gki G_GNUC_UNUSED)
+{
+	CtkWidget *img = ctk_bin_get_child (CTK_BIN (widget));
+	CtkAllocation allocation;
+	ctk_widget_get_allocation (img, &allocation);
+	xkl_debug (150, "Flag img size %d x %d\n",
+		   allocation.width, allocation.height);
+	if (event->button == 1 && event->type == CDK_BUTTON_PRESS) {
+		xkl_debug (150, "Mouse button pressed on applet\n");
+		cafekbd_desktop_config_lock_next_group (&globals.cfg);
+		return TRUE;
+	}
+	return FALSE;
+}
+
+static void
+draw_flag (CtkWidget * flag, cairo_t * cr, GdkPixbuf * image)
+{
+	/* Image width and height */
+	int iw = gdk_pixbuf_get_width (image);
+	int ih = gdk_pixbuf_get_height (image);
+	CtkAllocation allocation;
+	double xwiratio, ywiratio, wiratio;
+
+	ctk_widget_get_allocation (flag, &allocation);
+
+	/* widget-to-image scales, X and Y */
+	xwiratio = 1.0 * allocation.width / iw;
+	ywiratio = 1.0 * allocation.height / ih;
+	wiratio = xwiratio < ywiratio ? xwiratio : ywiratio;
+
+	/* transform cairo context */
+	cairo_translate (cr, allocation.width / 2.0, allocation.height / 2.0);
+	cairo_scale (cr, wiratio, wiratio);
+	cairo_translate (cr, - iw / 2.0, - ih / 2.0);
+
+	cdk_cairo_set_source_pixbuf (cr, image, 0, 0);
+	cairo_paint (cr);
+}
+
+gchar *
+cafekbd_indicator_extract_layout_name (int group, XklEngine * engine,
+				    CafekbdKeyboardConfig * kbd_cfg,
+				    gchar ** short_group_names,
+				    gchar ** full_group_names)
+{
+	char *layout_name = NULL;
+	if (group < g_strv_length (short_group_names)) {
+		if (xkl_engine_get_features (engine) &
+		    XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
+			char *full_layout_name =
+			    kbd_cfg->layouts_variants[group];
+			char *variant_name;
+			if (!cafekbd_keyboard_config_split_items
+			    (full_layout_name, &layout_name,
+			     &variant_name))
+				/* just in case */
+				layout_name = full_layout_name;
+
+			/* make it freeable */
+			layout_name = g_strdup (layout_name);
+
+			if (short_group_names != NULL) {
+				char *short_group_name =
+				    short_group_names[group];
+				if (short_group_name != NULL
+				    && *short_group_name != '\0') {
+					/* drop the long name */
+					g_free (layout_name);
+					layout_name =
+					    g_strdup (short_group_name);
+				}
+			}
+		} else {
+			layout_name = g_strdup (full_group_names[group]);
+		}
+	}
+
+	if (layout_name == NULL)
+		layout_name = g_strdup ("");
+
+	return layout_name;
+}
+
+gchar *
+cafekbd_indicator_create_label_title (int group, GHashTable ** ln2cnt_map,
+				   gchar * layout_name)
+{
+	gpointer pcounter = NULL;
+	char *prev_layout_name = NULL;
+	char *lbl_title = NULL;
+	int counter = 0;
+
+	if (group == 0) {
+		*ln2cnt_map =
+		    g_hash_table_new_full (g_str_hash, g_str_equal,
+					   g_free, NULL);
+	}
+
+	/* Process layouts with repeating description */
+	if (g_hash_table_lookup_extended
+	    (*ln2cnt_map, layout_name, (gpointer *) & prev_layout_name,
+	     &pcounter)) {
+		/* "next" same description */
+		gchar appendix[10] = "";
+		gint utf8length;
+		gunichar cidx;
+		counter = GPOINTER_TO_INT (pcounter);
+		/* Unicode subscript 2, 3, 4 */
+		cidx = 0x2081 + counter;
+		utf8length = g_unichar_to_utf8 (cidx, appendix);
+		appendix[utf8length] = '\0';
+		lbl_title = g_strconcat (layout_name, appendix, NULL);
+	} else {
+		/* "first" time this description */
+		lbl_title = g_strdup (layout_name);
+	}
+	g_hash_table_insert (*ln2cnt_map, layout_name,
+			     GINT_TO_POINTER (counter + 1));
+	return lbl_title;
+}
+
+static CtkWidget *
+cafekbd_indicator_prepare_drawing (CafekbdIndicator * gki, int group)
+{
+	gpointer pimage;
+	CtkWidget *ebox;
+
+	pimage = g_slist_nth_data (globals.images, group);
+	ebox = ctk_event_box_new ();
+	ctk_event_box_set_visible_window (CTK_EVENT_BOX (ebox), FALSE);
+	if (globals.ind_cfg.show_flags) {
+		GdkPixbuf *image;
+		CtkWidget *flag;
+
+		if (pimage == NULL)
+			return NULL;
+		image = GDK_PIXBUF (pimage);
+		flag = ctk_drawing_area_new ();
+		ctk_widget_add_events (CTK_WIDGET (flag),
+				       CDK_BUTTON_PRESS_MASK);
+		g_signal_connect (G_OBJECT (flag), "draw",
+		                  G_CALLBACK (draw_flag), image);
+		ctk_container_add (CTK_CONTAINER (ebox), flag);
+	} else {
+		char *lbl_title = NULL;
+		char *layout_name = NULL;
+		CtkWidget *label;
+		static GHashTable *ln2cnt_map = NULL;
+
+		layout_name =
+		    cafekbd_indicator_extract_layout_name (group,
+							globals.engine,
+							&globals.kbd_cfg,
+							globals.short_group_names,
+							globals.full_group_names);
+
+		lbl_title =
+		    cafekbd_indicator_create_label_title (group,
+						       &ln2cnt_map,
+						       layout_name);
+
+		label = ctk_label_new (lbl_title);
+		ctk_widget_set_halign (label, CTK_ALIGN_CENTER);
+		ctk_widget_set_valign (label, CTK_ALIGN_CENTER);
+		ctk_widget_set_margin_start (label, 2);
+		ctk_widget_set_margin_end (label, 2);
+		ctk_widget_set_margin_top (label, 2);
+		ctk_widget_set_margin_bottom (label, 2);
+		g_free (lbl_title);
+		ctk_label_set_angle (CTK_LABEL (label), gki->priv->angle);
+
+		if (group + 1 ==
+		    xkl_engine_get_num_groups (globals.engine)) {
+			g_hash_table_destroy (ln2cnt_map);
+			ln2cnt_map = NULL;
+		}
+
+		ctk_container_add (CTK_CONTAINER (ebox), label);
+	}
+
+	g_signal_connect (G_OBJECT (ebox),
+			  "button_press_event",
+			  G_CALLBACK (cafekbd_indicator_button_pressed), gki);
+
+	g_signal_connect (G_OBJECT (gki),
+			  "key_press_event",
+			  G_CALLBACK (cafekbd_indicator_key_pressed), gki);
+
+	/* We have everything prepared for that size */
+
+	return ebox;
+}
+
+static void
+cafekbd_indicator_update_tooltips (CafekbdIndicator * gki)
+{
+	XklState *state = xkl_engine_get_current_state (globals.engine);
+	gchar *buf;
+	if (state == NULL || state->group < 0
+	    || state->group >= g_strv_length (globals.full_group_names))
+		return;
+
+	buf = g_strdup_printf (globals.tooltips_format,
+			       globals.full_group_names[state->group]);
+
+	cafekbd_indicator_set_tooltips (gki, buf);
+	g_free (buf);
+}
+
+static void
+cafekbd_indicator_parent_set (CtkWidget *gki,
+			      CtkWidget *previous_parent G_GNUC_UNUSED)
+{
+	cafekbd_indicator_update_tooltips (CAFEKBD_INDICATOR (gki));
+}
+
+
+void
+cafekbd_indicator_reinit_ui (CafekbdIndicator * gki)
+{
+	cafekbd_indicator_cleanup (gki);
+	cafekbd_indicator_fill (gki);
+
+	cafekbd_indicator_set_current_page (gki);
+
+	g_signal_emit_by_name (gki, "reinit-ui");
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+			       gchar     *key G_GNUC_UNUSED,
+			       gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "General configuration changed in GSettings - reiniting...\n");
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+	ForAllIndicators () {
+		cafekbd_indicator_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_ind_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+				   gchar     *key G_GNUC_UNUSED,
+				   gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "Applet configuration changed in GSettings - reiniting...\n");
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+	cafekbd_indicator_update_images ();
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	ForAllIndicators () {
+		cafekbd_indicator_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+static void
+cafekbd_indicator_load_group_names (const gchar ** layout_ids,
+				 const gchar ** variant_ids)
+{
+	if (!cafekbd_desktop_config_load_group_descriptions
+	    (&globals.cfg, globals.registry, layout_ids, variant_ids,
+	     &globals.short_group_names, &globals.full_group_names)) {
+		/* We just populate no short names (remain NULL) -
+		 * full names are going to be used anyway */
+		gint i, total_groups =
+		    xkl_engine_get_num_groups (globals.engine);
+		globals.full_group_names =
+		    g_new0 (gchar *, total_groups + 1);
+
+		if (xkl_engine_get_features (globals.engine) &
+		    XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
+			gchar **lst = globals.kbd_cfg.layouts_variants;
+			for (i = 0; *lst; lst++, i++) {
+				globals.full_group_names[i] =
+				    g_strdup ((char *) *lst);
+			}
+		} else {
+			for (i = total_groups; --i >= 0;) {
+				globals.full_group_names[i] =
+				    g_strdup_printf ("Group %d", i);
+			}
+		}
+	}
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_kbd_cfg_callback (CafekbdIndicator *gki G_GNUC_UNUSED)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+	xkl_debug (100,
+		   "XKB configuration changed on X Server - reiniting...\n");
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+	cafekbd_indicator_update_images ();
+
+	g_strfreev (globals.full_group_names);
+	globals.full_group_names = NULL;
+
+	if (globals.short_group_names != NULL) {
+		g_strfreev (globals.short_group_names);
+		globals.short_group_names = NULL;
+	}
+
+	cafekbd_indicator_load_group_names ((const gchar **) xklrec->layouts,
+					 (const gchar **)
+					 xklrec->variants);
+
+	ForAllIndicators () {
+		cafekbd_indicator_reinit_ui (gki);
+	} NextIndicator ();
+	g_object_unref (G_OBJECT (xklrec));
+}
+
+/* Should be called once for all applets */
+static void
+cafekbd_indicator_state_callback (XklEngine           *engine G_GNUC_UNUSED,
+				  XklEngineStateChange changeType,
+				  gint                 group,
+				  gboolean             restore)
+{
+	xkl_debug (150, "group is now %d, restore: %d\n", group, restore);
+
+	if (changeType == GROUP_CHANGED) {
+		ForAllIndicators () {
+			xkl_debug (200, "do repaint\n");
+			cafekbd_indicator_set_current_page_for_group
+			    (gki, group);
+		}
+		NextIndicator ();
+	}
+}
+
+
+void
+cafekbd_indicator_set_current_page (CafekbdIndicator * gki)
+{
+	XklState *cur_state;
+	cur_state = xkl_engine_get_current_state (globals.engine);
+	if (cur_state->group >= 0)
+		cafekbd_indicator_set_current_page_for_group (gki,
+							   cur_state->
+							   group);
+}
+
+void
+cafekbd_indicator_set_current_page_for_group (CafekbdIndicator * gki, int group)
+{
+	xkl_debug (200, "Revalidating for group %d\n", group);
+
+	ctk_notebook_set_current_page (CTK_NOTEBOOK (gki), group + 1);
+
+	cafekbd_indicator_update_tooltips (gki);
+}
+
+/* Should be called once for all widgets */
+static CdkFilterReturn
+cafekbd_indicator_filter_x_evt (CdkXEvent *xev,
+				CdkEvent  *event G_GNUC_UNUSED)
+{
+	XEvent *xevent = (XEvent *) xev;
+
+	xkl_engine_filter_events (globals.engine, xevent);
+	switch (xevent->type) {
+	case ReparentNotify:
+		{
+			XReparentEvent *rne = (XReparentEvent *) xev;
+
+			ForAllIndicators () {
+				CdkWindow *w =
+				    ctk_widget_get_parent_window
+				    (CTK_WIDGET (gki));
+
+				/* compare the indicator's parent window with the even window */
+				if (w != NULL
+				    && CDK_WINDOW_XID (w) == rne->window) {
+					/* if so - make it transparent... */
+					xkl_engine_set_window_transparent
+					    (globals.engine, rne->window,
+					     TRUE);
+				}
+			}
+			NextIndicator ()
+		}
+		break;
+	}
+	return CDK_FILTER_CONTINUE;
+}
+
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_start_listen (void)
+{
+	cdk_window_add_filter (NULL, (CdkFilterFunc)
+			       cafekbd_indicator_filter_x_evt, NULL);
+	cdk_window_add_filter (cdk_get_default_root_window (),
+			       (CdkFilterFunc)
+			       cafekbd_indicator_filter_x_evt, NULL);
+
+	xkl_engine_start_listen (globals.engine,
+				 XKLL_TRACK_KEYBOARD_STATE);
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_stop_listen (void)
+{
+	xkl_engine_stop_listen (globals.engine, XKLL_TRACK_KEYBOARD_STATE);
+
+	cdk_window_remove_filter (NULL, (CdkFilterFunc)
+				  cafekbd_indicator_filter_x_evt, NULL);
+	cdk_window_remove_filter
+	    (cdk_get_default_root_window (),
+	     (CdkFilterFunc) cafekbd_indicator_filter_x_evt, NULL);
+}
+
+static gboolean
+cafekbd_indicator_scroll (CtkWidget      *gki G_GNUC_UNUSED,
+			  CdkEventScroll *event G_GNUC_UNUSED)
+{
+	/* mouse wheel events should be ignored, otherwise funny effects appear */
+	return TRUE;
+}
+
+static void cafekbd_indicator_init(CafekbdIndicator* gki)
+{
+	CtkWidget *def_drawing;
+	CtkNotebook *notebook;
+
+	if (!g_slist_length(globals.widget_instances))
+	{
+		cafekbd_indicator_global_init();
+	}
+
+	gki->priv = g_new0 (CafekbdIndicatorPrivate, 1);
+
+	notebook = CTK_NOTEBOOK (gki);
+
+	xkl_debug (100, "Initiating the widget startup process for %p\n", gki);
+
+	ctk_notebook_set_show_tabs (notebook, FALSE);
+	ctk_notebook_set_show_border (notebook, FALSE);
+
+	def_drawing =
+	    ctk_image_new_from_icon_name ("process-stop",
+				      CTK_ICON_SIZE_BUTTON);
+
+	ctk_notebook_append_page (notebook, def_drawing,
+				  ctk_label_new (""));
+
+	if (globals.engine == NULL) {
+		cafekbd_indicator_set_tooltips (gki,
+					     _
+					     ("XKB initialization error"));
+		return;
+	}
+
+	cafekbd_indicator_set_tooltips (gki, NULL);
+
+	cafekbd_indicator_fill (gki);
+	cafekbd_indicator_set_current_page (gki);
+
+	ctk_widget_add_events (CTK_WIDGET (gki), CDK_BUTTON_PRESS_MASK);
+
+	/* append AFTER all initialization work is finished */
+	globals.widget_instances =
+	    g_slist_append (globals.widget_instances, gki);
+}
+
+static void
+cafekbd_indicator_finalize (GObject * obj)
+{
+	CafekbdIndicator *gki = CAFEKBD_INDICATOR (obj);
+	xkl_debug (100,
+		   "Starting the cafe-kbd-indicator widget shutdown process for %p\n",
+		   gki);
+
+	/* remove BEFORE all termination work is finished */
+	globals.widget_instances =
+	    g_slist_remove (globals.widget_instances, gki);
+
+	cafekbd_indicator_cleanup (gki);
+
+	xkl_debug (100,
+		   "The instance of cafe-kbd-indicator successfully finalized\n");
+
+	g_free (gki->priv);
+
+	G_OBJECT_CLASS (cafekbd_indicator_parent_class)->finalize (obj);
+
+	if (!g_slist_length (globals.widget_instances))
+		cafekbd_indicator_global_term ();
+}
+
+static void
+cafekbd_indicator_global_term (void)
+{
+	xkl_debug (100, "*** Last  CafekbdIndicator instance *** \n");
+	cafekbd_indicator_stop_listen ();
+
+	cafekbd_desktop_config_stop_listen (&globals.cfg);
+	cafekbd_indicator_config_stop_listen (&globals.ind_cfg);
+
+	cafekbd_indicator_config_term (&globals.ind_cfg);
+	cafekbd_keyboard_config_term (&globals.kbd_cfg);
+	cafekbd_desktop_config_term (&globals.cfg);
+
+	g_object_unref (G_OBJECT (globals.registry));
+	globals.registry = NULL;
+	g_object_unref (G_OBJECT (globals.engine));
+	globals.engine = NULL;
+	xkl_debug (100, "*** Terminated globals *** \n");
+}
+
+static void
+cafekbd_indicator_class_init (CafekbdIndicatorClass * klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+	CtkWidgetClass *widget_class = CTK_WIDGET_CLASS (klass);
+
+	xkl_debug (100, "*** First CafekbdIndicator instance *** \n");
+
+	memset (&globals, 0, sizeof (globals));
+
+	/* Initing some global vars */
+	globals.tooltips_format = "%s";
+
+	/* Initing vtable */
+	object_class->finalize = cafekbd_indicator_finalize;
+
+	widget_class->scroll_event = cafekbd_indicator_scroll;
+	widget_class->parent_set = cafekbd_indicator_parent_set;
+
+	/* Signals */
+	g_signal_new ("reinit-ui", CAFEKBD_TYPE_INDICATOR,
+		      G_SIGNAL_RUN_LAST,
+		      G_STRUCT_OFFSET (CafekbdIndicatorClass, reinit_ui),
+		      NULL, NULL, cafekbd_indicator_VOID__VOID,
+		      G_TYPE_NONE, 0);
+}
+
+static void
+cafekbd_indicator_global_init (void)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+
+	globals.engine = xkl_engine_get_instance(CDK_DISPLAY_XDISPLAY(cdk_display_get_default()));
+
+	if (globals.engine == NULL)
+	{
+		xkl_debug (0, "Libxklavier initialization error");
+		return;
+	}
+
+	g_signal_connect (globals.engine, "X-state-changed",
+			  G_CALLBACK (cafekbd_indicator_state_callback),
+			  NULL);
+	g_signal_connect (globals.engine, "X-config-changed",
+			  G_CALLBACK (cafekbd_indicator_kbd_cfg_callback),
+			  NULL);
+
+	cafekbd_desktop_config_init (&globals.cfg, globals.engine);
+	cafekbd_keyboard_config_init (&globals.kbd_cfg, globals.engine);
+	cafekbd_indicator_config_init (&globals.ind_cfg, globals.engine);
+
+	cafekbd_desktop_config_start_listen (&globals.cfg,
+					  (GCallback)
+					  cafekbd_indicator_cfg_changed,
+					  NULL);
+	cafekbd_indicator_config_start_listen (&globals.ind_cfg,
+					    (GCallback)
+					    cafekbd_indicator_ind_cfg_changed,
+					    NULL);
+
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+
+	globals.registry =
+	    xkl_config_registry_get_instance (globals.engine);
+	xkl_config_registry_load (globals.registry,
+				  globals.cfg.load_extra_items);
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+	cafekbd_indicator_update_images ();
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	cafekbd_indicator_load_group_names ((const gchar **) xklrec->layouts,
+					 (const gchar **)
+					 xklrec->variants);
+	g_object_unref (G_OBJECT (xklrec));
+
+	cafekbd_indicator_start_listen ();
+
+	xkl_debug (100, "*** Inited globals *** \n");
+}
+
+CtkWidget *
+cafekbd_indicator_new (void)
+{
+	return
+	    CTK_WIDGET (g_object_new (cafekbd_indicator_get_type (), NULL));
+}
+
+void
+cafekbd_indicator_set_parent_tooltips (CafekbdIndicator * gki, gboolean spt)
+{
+	gki->priv->set_parent_tooltips = spt;
+	cafekbd_indicator_update_tooltips (gki);
+}
+
+void
+cafekbd_indicator_set_tooltips_format (const gchar format[])
+{
+	globals.tooltips_format = format;
+	ForAllIndicators ()
+	    cafekbd_indicator_update_tooltips (gki);
+	NextIndicator ()
+}
+
+/**
+ * cafekbd_indicator_get_xkl_engine:
+ *
+ * Returns: (transfer none): The engine shared by all CafekbdIndicator objects
+ */
+XklEngine *
+cafekbd_indicator_get_xkl_engine ()
+{
+	return globals.engine;
+}
+
+/**
+ * cafekbd_indicator_get_group_names:
+ *
+ * Returns: (transfer none) (array zero-terminated=1): List of group names
+ */
+gchar **
+cafekbd_indicator_get_group_names ()
+{
+	return globals.full_group_names;
+}
+
+gchar *
+cafekbd_indicator_get_image_filename (guint group)
+{
+	if (!globals.ind_cfg.show_flags)
+		return NULL;
+	return cafekbd_indicator_config_get_images_file (&globals.ind_cfg,
+						      &globals.kbd_cfg,
+						      group);
+}
+
+gdouble
+cafekbd_indicator_get_max_width_height_ratio (void)
+{
+	gdouble rv = 0.0;
+	GSList *ip = globals.images;
+	if (!globals.ind_cfg.show_flags)
+		return 0;
+	while (ip != NULL) {
+		GdkPixbuf *img = GDK_PIXBUF (ip->data);
+		gdouble r =
+		    1.0 * gdk_pixbuf_get_width (img) /
+		    gdk_pixbuf_get_height (img);
+		if (r > rv)
+			rv = r;
+		ip = ip->next;
+	}
+	return rv;
+}
+
+void
+cafekbd_indicator_set_angle (CafekbdIndicator * gki, gdouble angle)
+{
+	gki->priv->angle = angle;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/3.html b/2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/3.html new file mode 100644 index 0000000..2dbd2a6 --- /dev/null +++ b/2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/3.html @@ -0,0 +1,1832 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <X11/keysym.h>
+
+#include <glib/gi18n-lib.h>
+
+#include <cafekbd-keyboard-config.h>
+#include <cafekbd-config-private.h>
+#include <cafekbd-util.h>
+
+/*
+ * CafekbdKeyboardConfig
+ */
+#define CAFEKBD_KEYBOARD_CONFIG_SCHEMA CAFEKBD_CONFIG_SCHEMA ".kbd"
+
+#define GROUP_SWITCHERS_GROUP "grp"
+#define DEFAULT_GROUP_SWITCH "grp:shift_caps_toggle"
+
+const gchar CAFEKBD_KEYBOARD_CONFIG_KEY_MODEL[] = "model";
+const gchar CAFEKBD_KEYBOARD_CONFIG_KEY_LAYOUTS[] = "layouts";
+const gchar CAFEKBD_KEYBOARD_CONFIG_KEY_OPTIONS[] = "options";
+
+const gchar *CAFEKBD_KEYBOARD_CONFIG_ACTIVE[] = {
+	CAFEKBD_KEYBOARD_CONFIG_KEY_MODEL,
+	CAFEKBD_KEYBOARD_CONFIG_KEY_LAYOUTS,
+	CAFEKBD_KEYBOARD_CONFIG_KEY_OPTIONS
+};
+
+/*
+ * static common functions
+ */
+
+static gboolean
+cafekbd_strv_equal (gchar ** l1, gchar ** l2)
+{
+	if (l1 == l2)
+		return TRUE;
+	if (l1 == NULL)
+		return g_strv_length (l2) == 0;
+	if (l2 == NULL)
+		return g_strv_length (l1) == 0;
+
+	while ((*l1 != NULL) && (*l2 != NULL)) {
+		if (*l1 != *l2) {
+			if (*l1 && *l2) {<--- Condition '*l1' is always true<--- Condition '*l2' is always true
+				if (g_ascii_strcasecmp (*l1, *l2))
+					return FALSE;
+			} else
+				return FALSE;
+		}
+
+		l1++;
+		l2++;
+	}
+	return (*l1 == NULL) && (*l2 == NULL);
+}
+
+gboolean
+cafekbd_keyboard_config_get_lv_descriptions (XklConfigRegistry *
+					  config_registry,
+					  const gchar * layout_name,
+					  const gchar * variant_name,
+					  gchar ** layout_short_descr,
+					  gchar ** layout_descr,
+					  gchar ** variant_short_descr,
+					  gchar ** variant_descr)
+{
+	/* TODO make it not static */
+	static XklConfigItem *litem = NULL;
+	static XklConfigItem *vitem = NULL;
+
+	if (litem == NULL)
+		litem = xkl_config_item_new ();
+	if (vitem == NULL)
+		vitem = xkl_config_item_new ();
+
+	layout_name = g_strdup (layout_name);
+
+	g_snprintf (litem->name, sizeof litem->name, "%s", layout_name);
+	if (xkl_config_registry_find_layout (config_registry, litem)) {
+		*layout_short_descr = litem->short_description;
+		*layout_descr = litem->description;
+	} else
+		*layout_short_descr = *layout_descr = NULL;
+
+	if (variant_name != NULL) {
+		variant_name = g_strdup (variant_name);
+		g_snprintf (vitem->name, sizeof vitem->name, "%s",
+			    variant_name);
+		if (xkl_config_registry_find_variant
+		    (config_registry, layout_name, vitem)) {
+			*variant_short_descr = vitem->short_description;
+			*variant_descr = vitem->description;
+		} else
+			*variant_short_descr = *variant_descr = NULL;
+
+		g_free ((char *) variant_name);
+	} else
+		*variant_descr = NULL;
+
+	g_free ((char *) layout_name);
+	return *layout_descr != NULL;
+}
+
+/*
+ * extern common functions
+ */
+const gchar *
+cafekbd_keyboard_config_merge_items (const gchar * parent,
+				  const gchar * child)
+{
+	static gchar buffer[XKL_MAX_CI_NAME_LENGTH * 2 - 1];
+	*buffer = '\0';
+	if (parent != NULL) {
+		if (strlen (parent) >= XKL_MAX_CI_NAME_LENGTH)
+			return NULL;
+		strcat (buffer, parent);
+	}
+	if (child != NULL && *child != 0) {
+		if (strlen (child) >= XKL_MAX_CI_NAME_LENGTH)
+			return NULL;
+		strcat (buffer, "\t");
+		strcat (buffer, child);
+	}
+	return buffer;
+}
+
+gboolean
+cafekbd_keyboard_config_split_items (const gchar * merged, gchar ** parent,
+				  gchar ** child)
+{
+	static gchar pbuffer[XKL_MAX_CI_NAME_LENGTH];
+	static gchar cbuffer[XKL_MAX_CI_NAME_LENGTH];
+	int plen;
+	const gchar *pos;
+	*parent = *child = NULL;
+
+	if (merged == NULL)
+		return FALSE;
+
+	pos = strchr (merged, '\t');
+	if (pos == NULL) {
+		plen = strlen (merged);
+	} else {
+		plen = pos - merged;
+		if (strlen (pos + 1) >= XKL_MAX_CI_NAME_LENGTH)
+			return FALSE;
+		strcpy (*child = cbuffer, pos + 1);
+	}
+	if (plen >= XKL_MAX_CI_NAME_LENGTH)
+		return FALSE;
+	memcpy (*parent = pbuffer, merged, plen);
+	pbuffer[plen] = '\0';
+	return TRUE;
+}
+
+/*
+ * static CafekbdKeyboardConfig functions
+ */
+static void
+cafekbd_keyboard_config_copy_from_xkl_config (CafekbdKeyboardConfig * kbd_config,
+					   XklConfigRec * pdata)
+{
+	char **p;
+	int i;
+	cafekbd_keyboard_config_model_set (kbd_config, pdata->model);
+	xkl_debug (150, "Loaded Kbd model: [%s]\n", pdata->model);
+
+	/* Layouts */
+	g_strfreev (kbd_config->layouts_variants);
+	kbd_config->layouts_variants = NULL;
+	if (pdata->layouts != NULL) {
+		char **p1;
+
+		p = pdata->layouts;
+		p1 = pdata->variants;
+		kbd_config->layouts_variants =
+		    g_new0 (gchar *, g_strv_length (pdata->layouts) + 1);
+		i = 0;
+		while (*p != NULL) {
+			const gchar *full_layout =
+			    cafekbd_keyboard_config_merge_items (*p, *p1);
+			xkl_debug (150,
+				   "Loaded Kbd layout (with variant): [%s]\n",
+				   full_layout);
+			kbd_config->layouts_variants[i++] =
+			    g_strdup (full_layout);
+			p++;
+			p1++;
+		}
+	}
+
+	/* Options */
+	g_strfreev (kbd_config->options);
+	kbd_config->options = NULL;
+
+	if (pdata->options != NULL) {
+		p = pdata->options;
+		kbd_config->options =
+		    g_new0 (gchar *, g_strv_length (pdata->options) + 1);
+		i = 0;
+		while (*p != NULL) {
+			char *option = *p;
+			char *delim =<--- Variable 'delim' can be declared as pointer to const
+			    (option != NULL) ? strchr (option, ':') : NULL;<--- Condition 'option!=NULL' is always true
+			int len;
+			if ((delim != NULL) &&
+			    ((len =
+			      (delim - option)) <
+			     XKL_MAX_CI_NAME_LENGTH)) {
+				char group[XKL_MAX_CI_NAME_LENGTH];
+
+				strncpy (group, option, len);
+				group[len] = 0;
+				xkl_debug (150,
+					   "Loaded Kbd option: [%s][%s]\n",
+					   group, option);
+				cafekbd_keyboard_config_options_set
+				    (kbd_config, i++, group, option);
+			}
+			p++;
+		}
+	}
+}
+
+static void
+cafekbd_keyboard_config_copy_to_xkl_config (CafekbdKeyboardConfig * kbd_config,
+					 XklConfigRec * pdata)
+{
+	int i;
+	int num_layouts, num_options;
+	pdata->model =
+	    (kbd_config->model ==
+	     NULL) ? NULL : g_strdup (kbd_config->model);
+
+	num_layouts =
+	    (kbd_config->layouts_variants ==
+	     NULL) ? 0 : g_strv_length (kbd_config->layouts_variants);
+	num_options =
+	    (kbd_config->options ==
+	     NULL) ? 0 : g_strv_length (kbd_config->options);
+
+	xkl_debug (150, "Taking %d layouts\n", num_layouts);
+	if (num_layouts != 0) {
+		gchar **the_layout_variant = kbd_config->layouts_variants;
+		char **p1 = pdata->layouts =
+		    g_new0 (char *, num_layouts + 1);
+		char **p2 = pdata->variants =
+		    g_new0 (char *, num_layouts + 1);
+		for (i = num_layouts; --i >= 0;) {
+			char *layout, *variant;
+			if (cafekbd_keyboard_config_split_items
+			    (*the_layout_variant, &layout, &variant)
+			    && variant != NULL) {
+				*p1 =
+				    (layout ==
+				     NULL) ? g_strdup ("") :
+				    g_strdup (layout);
+				*p2 =
+				    (variant ==<--- Condition 'variant==NULL' is always false
+				     NULL) ? g_strdup ("") :
+				    g_strdup (variant);
+			} else {
+				*p1 =
+				    (*the_layout_variant ==
+				     NULL) ? g_strdup ("") :
+				    g_strdup (*the_layout_variant);
+				*p2 = g_strdup ("");
+			}
+			xkl_debug (150, "Adding [%s]/%p and [%s]/%p\n",
+				   *p1 ? *p1 : "(nil)", *p1,
+				   *p2 ? *p2 : "(nil)", *p2);
+			p1++;
+			p2++;
+			the_layout_variant++;
+		}
+	}
+
+	if (num_options != 0) {
+		gchar **the_option = kbd_config->options;
+		char **p = pdata->options =
+		    g_new0 (char *, num_options + 1);
+		for (i = num_options; --i >= 0;) {
+			char *group, *option;
+			if (cafekbd_keyboard_config_split_items
+			    (*the_option, &group, &option)
+			    && option != NULL)
+				*(p++) = g_strdup (option);
+			else {
+				*(p++) = g_strdup ("");
+				xkl_debug (150, "Could not split [%s]\n",
+					   *the_option);
+			}
+			the_option++;
+		}
+	}
+}
+
+static void
+cafekbd_keyboard_config_load_params (CafekbdKeyboardConfig * kbd_config,
+				  const gchar * param_names[])
+{
+	gchar *pc;
+
+	pc = g_settings_get_string (kbd_config->settings, param_names[0]);
+	if (pc == NULL) {
+		cafekbd_keyboard_config_model_set (kbd_config, NULL);
+	} else {
+		cafekbd_keyboard_config_model_set (kbd_config, pc);
+		g_free (pc);
+	}
+	xkl_debug (150, "Loaded Kbd model: [%s]\n",
+		   kbd_config->model ? kbd_config->model : "(null)");
+
+	g_strfreev (kbd_config->layouts_variants);
+
+	kbd_config->layouts_variants =
+	    g_settings_get_strv (kbd_config->settings, param_names[1]);
+
+	if (kbd_config->layouts_variants != NULL
+	    && kbd_config->layouts_variants[0] == NULL) {
+		g_strfreev (kbd_config->layouts_variants);
+		kbd_config->layouts_variants = NULL;
+	}
+
+	g_strfreev (kbd_config->options);
+
+	kbd_config->options =
+	    g_settings_get_strv (kbd_config->settings, param_names[2]);
+
+	if (kbd_config->options != NULL && kbd_config->options[0] == NULL) {
+		g_strfreev (kbd_config->options);
+		kbd_config->options = NULL;
+	}
+}
+
+static void
+cafekbd_keyboard_config_save_params (CafekbdKeyboardConfig * kbd_config,
+				  const gchar * param_names[])
+{
+	gchar **pl;
+
+	if (kbd_config->model)
+		g_settings_set_string (kbd_config->settings, param_names[0],
+				       kbd_config->model);
+	else
+		g_settings_set_string (kbd_config->settings, param_names[0],
+				       NULL);
+	xkl_debug (150, "Saved Kbd model: [%s]\n",
+		   kbd_config->model ? kbd_config->model : "(null)");
+
+	if (kbd_config->layouts_variants) {
+		pl = kbd_config->layouts_variants;
+		while (*pl != NULL) {
+			xkl_debug (150, "Saved Kbd layout: [%s]\n", *pl);
+			pl++;
+		}
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[1],
+				     (const gchar * const *)
+				     kbd_config->layouts_variants);
+	} else {
+		xkl_debug (150, "Saved Kbd layouts: []\n");
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[1], NULL);
+	}
+
+	if (kbd_config->options) {
+		pl = kbd_config->options;
+		while (*pl != NULL) {
+			xkl_debug (150, "Saved Kbd option: [%s]\n", *pl);
+			pl++;
+		}
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[2],
+				     (const gchar *
+				      const *) kbd_config->options);
+	} else {
+		xkl_debug (150, "Saved Kbd options: []\n");
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[2], NULL);
+	}
+}
+
+/*
+ * extern CafekbdKeyboardConfig config functions
+ */
+void
+cafekbd_keyboard_config_init (CafekbdKeyboardConfig * kbd_config,
+			      XklEngine * engine)
+{
+	memset (kbd_config, 0, sizeof (*kbd_config));
+	kbd_config->settings = g_settings_new (CAFEKBD_KEYBOARD_CONFIG_SCHEMA);
+	kbd_config->engine = engine;
+}
+
+void
+cafekbd_keyboard_config_term (CafekbdKeyboardConfig * kbd_config)
+{
+	cafekbd_keyboard_config_model_set (kbd_config, NULL);
+
+	g_strfreev (kbd_config->layouts_variants);
+	kbd_config->layouts_variants = NULL;
+	g_strfreev (kbd_config->options);
+	kbd_config->options = NULL;
+
+	g_object_unref (kbd_config->settings);
+	kbd_config->settings = NULL;
+}
+
+void
+cafekbd_keyboard_config_load_from_gsettings (CafekbdKeyboardConfig * kbd_config,
+				      CafekbdKeyboardConfig *
+				      kbd_config_default)
+{
+	cafekbd_keyboard_config_load_params (kbd_config,
+					  CAFEKBD_KEYBOARD_CONFIG_ACTIVE);
+
+	if (kbd_config_default != NULL) {
+
+		if (kbd_config->model == NULL)
+			kbd_config->model =
+			    g_strdup (kbd_config_default->model);
+
+		if (kbd_config->layouts_variants == NULL) {
+			kbd_config->layouts_variants =
+			    g_strdupv
+			    (kbd_config_default->layouts_variants);
+		}
+
+		if (kbd_config->options == NULL) {
+			kbd_config->options =
+			    g_strdupv (kbd_config_default->options);
+		}
+	}
+}
+
+void
+cafekbd_keyboard_config_load_from_x_current (CafekbdKeyboardConfig * kbd_config,
+					  XklConfigRec * data)
+{
+	gboolean own_data = data == NULL;
+	xkl_debug (150, "Copying config from X(current)\n");
+	if (own_data)
+		data = xkl_config_rec_new ();
+	if (xkl_config_rec_get_from_server (data, kbd_config->engine))
+		cafekbd_keyboard_config_copy_from_xkl_config (kbd_config,
+							   data);
+	else
+		xkl_debug (150,
+			   "Could not load keyboard config from server: [%s]\n",
+			   xkl_get_last_error ());
+	if (own_data)
+		g_object_unref (G_OBJECT (data));
+}
+
+void
+cafekbd_keyboard_config_load_from_x_initial (CafekbdKeyboardConfig * kbd_config,
+					  XklConfigRec * data)
+{
+	gboolean own_data = data == NULL;
+	xkl_debug (150, "Copying config from X(initial)\n");
+	if (own_data)
+		data = xkl_config_rec_new ();
+	if (xkl_config_rec_get_from_backup (data, kbd_config->engine))
+		cafekbd_keyboard_config_copy_from_xkl_config (kbd_config,
+							   data);
+	else
+		xkl_debug (150,
+			   "Could not load keyboard config from backup: [%s]\n",
+			   xkl_get_last_error ());
+	if (own_data)
+		g_object_unref (G_OBJECT (data));
+}
+
+static gboolean
+cafekbd_keyboard_config_options_equals (CafekbdKeyboardConfig * kbd_config1,
+				     CafekbdKeyboardConfig * kbd_config2)
+{
+	int num_options, num_options2;
+
+	num_options =
+	    (kbd_config1->options ==
+	     NULL) ? 0 : g_strv_length (kbd_config1->options);
+	num_options2 =
+	    (kbd_config2->options ==
+	     NULL) ? 0 : g_strv_length (kbd_config2->options);
+
+	if (num_options != num_options2)
+		return False;
+
+	if (num_options != 0) {
+		int i;
+		char *group1, *option1;
+
+		for (i = 0; i < num_options; i++) {
+			int j;
+			char *group2, *option2;
+			gboolean are_equal = FALSE;
+
+			if (!cafekbd_keyboard_config_split_items
+			    (kbd_config1->options[i], &group1, &option1))
+				continue;
+
+			option1 = g_strdup (option1);
+
+			for (j = 0; j < num_options && !are_equal; j++) {
+				if (cafekbd_keyboard_config_split_items
+				    (kbd_config2->options[j], &group2,
+				     &option2)) {
+					are_equal =
+					    strcmp (option1, option2) == 0;
+				}
+			}
+
+			g_free (option1);
+
+			if (!are_equal)
+				return False;
+		}
+	}
+
+	return True;
+}
+
+gboolean
+cafekbd_keyboard_config_equals (CafekbdKeyboardConfig * kbd_config1,
+			     CafekbdKeyboardConfig * kbd_config2)
+{
+	if (kbd_config1 == kbd_config2)
+		return True;
+	if ((kbd_config1->model != kbd_config2->model) &&
+	    (kbd_config1->model != NULL) &&
+	    (kbd_config2->model != NULL) &&
+	    g_ascii_strcasecmp (kbd_config1->model, kbd_config2->model))
+		return False;
+	if (!cafekbd_strv_equal (kbd_config1->layouts_variants,
+			   kbd_config2->layouts_variants))
+		return False;
+
+	if (!cafekbd_keyboard_config_options_equals
+	    (kbd_config1, kbd_config2))
+		return False;
+
+	return True;
+}
+
+void
+cafekbd_keyboard_config_save_to_gsettings (CafekbdKeyboardConfig * kbd_config)
+{
+	g_settings_delay (kbd_config->settings);
+
+	cafekbd_keyboard_config_save_params (kbd_config,
+					     CAFEKBD_KEYBOARD_CONFIG_ACTIVE);
+
+	g_settings_apply (kbd_config->settings);
+}
+
+void
+cafekbd_keyboard_config_model_set (CafekbdKeyboardConfig * kbd_config,
+				const gchar * model_name)
+{
+	if (kbd_config->model != NULL)
+		g_free (kbd_config->model);
+	kbd_config->model =
+	    (model_name == NULL
+	     || model_name[0] == '\0') ? NULL : g_strdup (model_name);
+}
+
+void
+cafekbd_keyboard_config_options_set (CafekbdKeyboardConfig * kbd_config,
+				  gint idx,
+				  const gchar * group_name,
+				  const gchar * option_name)
+{
+	const gchar *merged;
+	if (group_name == NULL || option_name == NULL)
+		return;
+	merged =
+	    cafekbd_keyboard_config_merge_items (group_name, option_name);
+	if (merged == NULL)
+		return;
+	kbd_config->options[idx] = g_strdup (merged);
+}
+
+gboolean
+cafekbd_keyboard_config_options_is_set (CafekbdKeyboardConfig * kbd_config,<--- Parameter 'kbd_config' can be declared as pointer to const
+				     const gchar * group_name,
+				     const gchar * option_name)
+{
+	gchar **p = kbd_config->options;
+	const gchar *merged =
+	    cafekbd_keyboard_config_merge_items (group_name, option_name);
+	if (merged == NULL)
+		return FALSE;
+
+	while (p && *p) {
+		if (!g_ascii_strcasecmp (merged, *p++))
+			return TRUE;
+	}
+	return FALSE;
+}
+
+gboolean
+cafekbd_keyboard_config_activate (CafekbdKeyboardConfig * kbd_config)
+{
+	gboolean rv;
+	XklConfigRec *data = xkl_config_rec_new ();
+
+	cafekbd_keyboard_config_copy_to_xkl_config (kbd_config, data);
+	rv = xkl_config_rec_activate (data, kbd_config->engine);
+	g_object_unref (G_OBJECT (data));
+
+	return rv;
+}
+
+/**
+ * cafekbd_keyboard_config_start_listen:
+ * @func: (scope notified): a function to call when settings are changed
+ */
+void
+cafekbd_keyboard_config_start_listen (CafekbdKeyboardConfig * kbd_config,
+				   GCallback func,
+				   gpointer user_data)
+{
+	kbd_config->config_listener_id =
+	    g_signal_connect (kbd_config->settings, "changed", func,
+			      user_data);
+}
+
+void
+cafekbd_keyboard_config_stop_listen (CafekbdKeyboardConfig * kbd_config)
+{
+	g_signal_handler_disconnect (kbd_config->settings,
+				     kbd_config->config_listener_id);
+	kbd_config->config_listener_id = 0;
+}
+
+gboolean
+cafekbd_keyboard_config_get_descriptions (XklConfigRegistry * config_registry,
+				       const gchar * name,
+				       gchar ** layout_short_descr,
+				       gchar ** layout_descr,
+				       gchar ** variant_short_descr,
+				       gchar ** variant_descr)
+{
+	char *layout_name = NULL, *variant_name = NULL;
+	if (!cafekbd_keyboard_config_split_items
+	    (name, &layout_name, &variant_name))
+		return FALSE;
+	return cafekbd_keyboard_config_get_lv_descriptions (config_registry,
+							 layout_name,
+							 variant_name,
+							 layout_short_descr,
+							 layout_descr,
+							 variant_short_descr,
+							 variant_descr);
+}
+
+const gchar *
+cafekbd_keyboard_config_format_full_layout (const gchar * layout_descr,
+					 const gchar * variant_descr)
+{
+	static gchar full_descr[XKL_MAX_CI_DESC_LENGTH * 2];
+	if (variant_descr == NULL || variant_descr[0] == 0)
+		g_snprintf (full_descr, sizeof (full_descr), "%s",
+			    layout_descr);
+	else
+		g_snprintf (full_descr, sizeof (full_descr), "%s %s",
+			    layout_descr, variant_descr);
+	return full_descr;
+}
+
+gchar *
+cafekbd_keyboard_config_to_string (const CafekbdKeyboardConfig * config)
+{
+	gchar *layouts = NULL, *options = NULL;
+	GString *buffer = g_string_new (NULL);
+
+	gchar **iter;
+	gint count;
+	gchar *result;
+
+	if (config->layouts_variants) {
+		/* g_slist_length is "expensive", so we determinate the length on the fly */
+		for (iter = config->layouts_variants, count = 0; *iter;
+		     iter++, ++count) {
+			if (buffer->len)
+				g_string_append (buffer, " ");
+
+			g_string_append (buffer, *iter);
+		}
+
+		/* Translators: The count is related to the number of options. The %s
+		 * format specifier should not be modified, left "as is". */
+		layouts =
+		    g_strdup_printf (ngettext
+				     ("layout \"%s\"", "layouts \"%s\"",
+				      count), buffer->str);
+		g_string_truncate (buffer, 0);
+	}
+	if (config->options) {
+		/* g_slist_length is "expensive", so we determinate the length on the fly */
+		for (iter = config->options, count = 0; *iter;
+		     iter++, ++count) {
+			if (buffer->len)
+				g_string_append (buffer, " ");
+
+			g_string_append (buffer, *iter);
+		}
+
+		/* Translators: The count is related to the number of options. The %s
+		 * format specifier should not be modified, left "as is". */
+		options =
+		    g_strdup_printf (ngettext
+				     ("option \"%s\"", "options \"%s\"",
+				      count), buffer->str);
+		g_string_truncate (buffer, 0);
+	}
+
+	g_string_free (buffer, TRUE);
+
+	result =
+	    g_strdup_printf (_("model \"%s\", %s and %s"), config->model,
+			     layouts ? layouts : _("no layout"),
+			     options ? options : _("no options"));
+
+	g_free (options);
+	g_free (layouts);
+
+	return result;
+}
+
+/**
+ * cafekbd_keyboard_config_add_default_switch_option_if_necessary:
+ *
+ * Returns: (transfer full) (array zero-terminated=1): List of options
+ */
+gchar **
+cafekbd_keyboard_config_add_default_switch_option_if_necessary (gchar **
+							        layouts_list,
+							        gchar **
+							        options_list,
+							        gboolean *was_appended)
+{
+	*was_appended = FALSE;
+	if (g_strv_length (layouts_list) >= 2) {
+		gboolean any_switcher = False;
+		if (*options_list != NULL) {
+			gchar **option = options_list;
+			while (*option != NULL) {
+				char *g, *o;
+				if (cafekbd_keyboard_config_split_items
+				    (*option, &g, &o)) {
+					if (!g_ascii_strcasecmp
+					    (g, GROUP_SWITCHERS_GROUP)) {
+						any_switcher = True;
+						break;
+					}
+				}
+				option++;
+			}
+		}
+		if (!any_switcher) {
+			const gchar *id =
+			    cafekbd_keyboard_config_merge_items
+			    (GROUP_SWITCHERS_GROUP,
+			     DEFAULT_GROUP_SWITCH);
+			options_list =
+			    cafekbd_strv_append (options_list, g_strdup (id));
+			*was_appended = TRUE;
+		}
+	}
+	return options_list;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/4.html b/2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/4.html new file mode 100644 index 0000000..1d97c26 --- /dev/null +++ b/2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/4.html @@ -0,0 +1,6042 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
   1
+   2
+   3
+   4
+   5
+   6
+   7
+   8
+   9
+  10
+  11
+  12
+  13
+  14
+  15
+  16
+  17
+  18
+  19
+  20
+  21
+  22
+  23
+  24
+  25
+  26
+  27
+  28
+  29
+  30
+  31
+  32
+  33
+  34
+  35
+  36
+  37
+  38
+  39
+  40
+  41
+  42
+  43
+  44
+  45
+  46
+  47
+  48
+  49
+  50
+  51
+  52
+  53
+  54
+  55
+  56
+  57
+  58
+  59
+  60
+  61
+  62
+  63
+  64
+  65
+  66
+  67
+  68
+  69
+  70
+  71
+  72
+  73
+  74
+  75
+  76
+  77
+  78
+  79
+  80
+  81
+  82
+  83
+  84
+  85
+  86
+  87
+  88
+  89
+  90
+  91
+  92
+  93
+  94
+  95
+  96
+  97
+  98
+  99
+ 100
+ 101
+ 102
+ 103
+ 104
+ 105
+ 106
+ 107
+ 108
+ 109
+ 110
+ 111
+ 112
+ 113
+ 114
+ 115
+ 116
+ 117
+ 118
+ 119
+ 120
+ 121
+ 122
+ 123
+ 124
+ 125
+ 126
+ 127
+ 128
+ 129
+ 130
+ 131
+ 132
+ 133
+ 134
+ 135
+ 136
+ 137
+ 138
+ 139
+ 140
+ 141
+ 142
+ 143
+ 144
+ 145
+ 146
+ 147
+ 148
+ 149
+ 150
+ 151
+ 152
+ 153
+ 154
+ 155
+ 156
+ 157
+ 158
+ 159
+ 160
+ 161
+ 162
+ 163
+ 164
+ 165
+ 166
+ 167
+ 168
+ 169
+ 170
+ 171
+ 172
+ 173
+ 174
+ 175
+ 176
+ 177
+ 178
+ 179
+ 180
+ 181
+ 182
+ 183
+ 184
+ 185
+ 186
+ 187
+ 188
+ 189
+ 190
+ 191
+ 192
+ 193
+ 194
+ 195
+ 196
+ 197
+ 198
+ 199
+ 200
+ 201
+ 202
+ 203
+ 204
+ 205
+ 206
+ 207
+ 208
+ 209
+ 210
+ 211
+ 212
+ 213
+ 214
+ 215
+ 216
+ 217
+ 218
+ 219
+ 220
+ 221
+ 222
+ 223
+ 224
+ 225
+ 226
+ 227
+ 228
+ 229
+ 230
+ 231
+ 232
+ 233
+ 234
+ 235
+ 236
+ 237
+ 238
+ 239
+ 240
+ 241
+ 242
+ 243
+ 244
+ 245
+ 246
+ 247
+ 248
+ 249
+ 250
+ 251
+ 252
+ 253
+ 254
+ 255
+ 256
+ 257
+ 258
+ 259
+ 260
+ 261
+ 262
+ 263
+ 264
+ 265
+ 266
+ 267
+ 268
+ 269
+ 270
+ 271
+ 272
+ 273
+ 274
+ 275
+ 276
+ 277
+ 278
+ 279
+ 280
+ 281
+ 282
+ 283
+ 284
+ 285
+ 286
+ 287
+ 288
+ 289
+ 290
+ 291
+ 292
+ 293
+ 294
+ 295
+ 296
+ 297
+ 298
+ 299
+ 300
+ 301
+ 302
+ 303
+ 304
+ 305
+ 306
+ 307
+ 308
+ 309
+ 310
+ 311
+ 312
+ 313
+ 314
+ 315
+ 316
+ 317
+ 318
+ 319
+ 320
+ 321
+ 322
+ 323
+ 324
+ 325
+ 326
+ 327
+ 328
+ 329
+ 330
+ 331
+ 332
+ 333
+ 334
+ 335
+ 336
+ 337
+ 338
+ 339
+ 340
+ 341
+ 342
+ 343
+ 344
+ 345
+ 346
+ 347
+ 348
+ 349
+ 350
+ 351
+ 352
+ 353
+ 354
+ 355
+ 356
+ 357
+ 358
+ 359
+ 360
+ 361
+ 362
+ 363
+ 364
+ 365
+ 366
+ 367
+ 368
+ 369
+ 370
+ 371
+ 372
+ 373
+ 374
+ 375
+ 376
+ 377
+ 378
+ 379
+ 380
+ 381
+ 382
+ 383
+ 384
+ 385
+ 386
+ 387
+ 388
+ 389
+ 390
+ 391
+ 392
+ 393
+ 394
+ 395
+ 396
+ 397
+ 398
+ 399
+ 400
+ 401
+ 402
+ 403
+ 404
+ 405
+ 406
+ 407
+ 408
+ 409
+ 410
+ 411
+ 412
+ 413
+ 414
+ 415
+ 416
+ 417
+ 418
+ 419
+ 420
+ 421
+ 422
+ 423
+ 424
+ 425
+ 426
+ 427
+ 428
+ 429
+ 430
+ 431
+ 432
+ 433
+ 434
+ 435
+ 436
+ 437
+ 438
+ 439
+ 440
+ 441
+ 442
+ 443
+ 444
+ 445
+ 446
+ 447
+ 448
+ 449
+ 450
+ 451
+ 452
+ 453
+ 454
+ 455
+ 456
+ 457
+ 458
+ 459
+ 460
+ 461
+ 462
+ 463
+ 464
+ 465
+ 466
+ 467
+ 468
+ 469
+ 470
+ 471
+ 472
+ 473
+ 474
+ 475
+ 476
+ 477
+ 478
+ 479
+ 480
+ 481
+ 482
+ 483
+ 484
+ 485
+ 486
+ 487
+ 488
+ 489
+ 490
+ 491
+ 492
+ 493
+ 494
+ 495
+ 496
+ 497
+ 498
+ 499
+ 500
+ 501
+ 502
+ 503
+ 504
+ 505
+ 506
+ 507
+ 508
+ 509
+ 510
+ 511
+ 512
+ 513
+ 514
+ 515
+ 516
+ 517
+ 518
+ 519
+ 520
+ 521
+ 522
+ 523
+ 524
+ 525
+ 526
+ 527
+ 528
+ 529
+ 530
+ 531
+ 532
+ 533
+ 534
+ 535
+ 536
+ 537
+ 538
+ 539
+ 540
+ 541
+ 542
+ 543
+ 544
+ 545
+ 546
+ 547
+ 548
+ 549
+ 550
+ 551
+ 552
+ 553
+ 554
+ 555
+ 556
+ 557
+ 558
+ 559
+ 560
+ 561
+ 562
+ 563
+ 564
+ 565
+ 566
+ 567
+ 568
+ 569
+ 570
+ 571
+ 572
+ 573
+ 574
+ 575
+ 576
+ 577
+ 578
+ 579
+ 580
+ 581
+ 582
+ 583
+ 584
+ 585
+ 586
+ 587
+ 588
+ 589
+ 590
+ 591
+ 592
+ 593
+ 594
+ 595
+ 596
+ 597
+ 598
+ 599
+ 600
+ 601
+ 602
+ 603
+ 604
+ 605
+ 606
+ 607
+ 608
+ 609
+ 610
+ 611
+ 612
+ 613
+ 614
+ 615
+ 616
+ 617
+ 618
+ 619
+ 620
+ 621
+ 622
+ 623
+ 624
+ 625
+ 626
+ 627
+ 628
+ 629
+ 630
+ 631
+ 632
+ 633
+ 634
+ 635
+ 636
+ 637
+ 638
+ 639
+ 640
+ 641
+ 642
+ 643
+ 644
+ 645
+ 646
+ 647
+ 648
+ 649
+ 650
+ 651
+ 652
+ 653
+ 654
+ 655
+ 656
+ 657
+ 658
+ 659
+ 660
+ 661
+ 662
+ 663
+ 664
+ 665
+ 666
+ 667
+ 668
+ 669
+ 670
+ 671
+ 672
+ 673
+ 674
+ 675
+ 676
+ 677
+ 678
+ 679
+ 680
+ 681
+ 682
+ 683
+ 684
+ 685
+ 686
+ 687
+ 688
+ 689
+ 690
+ 691
+ 692
+ 693
+ 694
+ 695
+ 696
+ 697
+ 698
+ 699
+ 700
+ 701
+ 702
+ 703
+ 704
+ 705
+ 706
+ 707
+ 708
+ 709
+ 710
+ 711
+ 712
+ 713
+ 714
+ 715
+ 716
+ 717
+ 718
+ 719
+ 720
+ 721
+ 722
+ 723
+ 724
+ 725
+ 726
+ 727
+ 728
+ 729
+ 730
+ 731
+ 732
+ 733
+ 734
+ 735
+ 736
+ 737
+ 738
+ 739
+ 740
+ 741
+ 742
+ 743
+ 744
+ 745
+ 746
+ 747
+ 748
+ 749
+ 750
+ 751
+ 752
+ 753
+ 754
+ 755
+ 756
+ 757
+ 758
+ 759
+ 760
+ 761
+ 762
+ 763
+ 764
+ 765
+ 766
+ 767
+ 768
+ 769
+ 770
+ 771
+ 772
+ 773
+ 774
+ 775
+ 776
+ 777
+ 778
+ 779
+ 780
+ 781
+ 782
+ 783
+ 784
+ 785
+ 786
+ 787
+ 788
+ 789
+ 790
+ 791
+ 792
+ 793
+ 794
+ 795
+ 796
+ 797
+ 798
+ 799
+ 800
+ 801
+ 802
+ 803
+ 804
+ 805
+ 806
+ 807
+ 808
+ 809
+ 810
+ 811
+ 812
+ 813
+ 814
+ 815
+ 816
+ 817
+ 818
+ 819
+ 820
+ 821
+ 822
+ 823
+ 824
+ 825
+ 826
+ 827
+ 828
+ 829
+ 830
+ 831
+ 832
+ 833
+ 834
+ 835
+ 836
+ 837
+ 838
+ 839
+ 840
+ 841
+ 842
+ 843
+ 844
+ 845
+ 846
+ 847
+ 848
+ 849
+ 850
+ 851
+ 852
+ 853
+ 854
+ 855
+ 856
+ 857
+ 858
+ 859
+ 860
+ 861
+ 862
+ 863
+ 864
+ 865
+ 866
+ 867
+ 868
+ 869
+ 870
+ 871
+ 872
+ 873
+ 874
+ 875
+ 876
+ 877
+ 878
+ 879
+ 880
+ 881
+ 882
+ 883
+ 884
+ 885
+ 886
+ 887
+ 888
+ 889
+ 890
+ 891
+ 892
+ 893
+ 894
+ 895
+ 896
+ 897
+ 898
+ 899
+ 900
+ 901
+ 902
+ 903
+ 904
+ 905
+ 906
+ 907
+ 908
+ 909
+ 910
+ 911
+ 912
+ 913
+ 914
+ 915
+ 916
+ 917
+ 918
+ 919
+ 920
+ 921
+ 922
+ 923
+ 924
+ 925
+ 926
+ 927
+ 928
+ 929
+ 930
+ 931
+ 932
+ 933
+ 934
+ 935
+ 936
+ 937
+ 938
+ 939
+ 940
+ 941
+ 942
+ 943
+ 944
+ 945
+ 946
+ 947
+ 948
+ 949
+ 950
+ 951
+ 952
+ 953
+ 954
+ 955
+ 956
+ 957
+ 958
+ 959
+ 960
+ 961
+ 962
+ 963
+ 964
+ 965
+ 966
+ 967
+ 968
+ 969
+ 970
+ 971
+ 972
+ 973
+ 974
+ 975
+ 976
+ 977
+ 978
+ 979
+ 980
+ 981
+ 982
+ 983
+ 984
+ 985
+ 986
+ 987
+ 988
+ 989
+ 990
+ 991
+ 992
+ 993
+ 994
+ 995
+ 996
+ 997
+ 998
+ 999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+1011
+1012
+1013
+1014
+1015
+1016
+1017
+1018
+1019
+1020
+1021
+1022
+1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
+1033
+1034
+1035
+1036
+1037
+1038
+1039
+1040
+1041
+1042
+1043
+1044
+1045
+1046
+1047
+1048
+1049
+1050
+1051
+1052
+1053
+1054
+1055
+1056
+1057
+1058
+1059
+1060
+1061
+1062
+1063
+1064
+1065
+1066
+1067
+1068
+1069
+1070
+1071
+1072
+1073
+1074
+1075
+1076
+1077
+1078
+1079
+1080
+1081
+1082
+1083
+1084
+1085
+1086
+1087
+1088
+1089
+1090
+1091
+1092
+1093
+1094
+1095
+1096
+1097
+1098
+1099
+1100
+1101
+1102
+1103
+1104
+1105
+1106
+1107
+1108
+1109
+1110
+1111
+1112
+1113
+1114
+1115
+1116
+1117
+1118
+1119
+1120
+1121
+1122
+1123
+1124
+1125
+1126
+1127
+1128
+1129
+1130
+1131
+1132
+1133
+1134
+1135
+1136
+1137
+1138
+1139
+1140
+1141
+1142
+1143
+1144
+1145
+1146
+1147
+1148
+1149
+1150
+1151
+1152
+1153
+1154
+1155
+1156
+1157
+1158
+1159
+1160
+1161
+1162
+1163
+1164
+1165
+1166
+1167
+1168
+1169
+1170
+1171
+1172
+1173
+1174
+1175
+1176
+1177
+1178
+1179
+1180
+1181
+1182
+1183
+1184
+1185
+1186
+1187
+1188
+1189
+1190
+1191
+1192
+1193
+1194
+1195
+1196
+1197
+1198
+1199
+1200
+1201
+1202
+1203
+1204
+1205
+1206
+1207
+1208
+1209
+1210
+1211
+1212
+1213
+1214
+1215
+1216
+1217
+1218
+1219
+1220
+1221
+1222
+1223
+1224
+1225
+1226
+1227
+1228
+1229
+1230
+1231
+1232
+1233
+1234
+1235
+1236
+1237
+1238
+1239
+1240
+1241
+1242
+1243
+1244
+1245
+1246
+1247
+1248
+1249
+1250
+1251
+1252
+1253
+1254
+1255
+1256
+1257
+1258
+1259
+1260
+1261
+1262
+1263
+1264
+1265
+1266
+1267
+1268
+1269
+1270
+1271
+1272
+1273
+1274
+1275
+1276
+1277
+1278
+1279
+1280
+1281
+1282
+1283
+1284
+1285
+1286
+1287
+1288
+1289
+1290
+1291
+1292
+1293
+1294
+1295
+1296
+1297
+1298
+1299
+1300
+1301
+1302
+1303
+1304
+1305
+1306
+1307
+1308
+1309
+1310
+1311
+1312
+1313
+1314
+1315
+1316
+1317
+1318
+1319
+1320
+1321
+1322
+1323
+1324
+1325
+1326
+1327
+1328
+1329
+1330
+1331
+1332
+1333
+1334
+1335
+1336
+1337
+1338
+1339
+1340
+1341
+1342
+1343
+1344
+1345
+1346
+1347
+1348
+1349
+1350
+1351
+1352
+1353
+1354
+1355
+1356
+1357
+1358
+1359
+1360
+1361
+1362
+1363
+1364
+1365
+1366
+1367
+1368
+1369
+1370
+1371
+1372
+1373
+1374
+1375
+1376
+1377
+1378
+1379
+1380
+1381
+1382
+1383
+1384
+1385
+1386
+1387
+1388
+1389
+1390
+1391
+1392
+1393
+1394
+1395
+1396
+1397
+1398
+1399
+1400
+1401
+1402
+1403
+1404
+1405
+1406
+1407
+1408
+1409
+1410
+1411
+1412
+1413
+1414
+1415
+1416
+1417
+1418
+1419
+1420
+1421
+1422
+1423
+1424
+1425
+1426
+1427
+1428
+1429
+1430
+1431
+1432
+1433
+1434
+1435
+1436
+1437
+1438
+1439
+1440
+1441
+1442
+1443
+1444
+1445
+1446
+1447
+1448
+1449
+1450
+1451
+1452
+1453
+1454
+1455
+1456
+1457
+1458
+1459
+1460
+1461
+1462
+1463
+1464
+1465
+1466
+1467
+1468
+1469
+1470
+1471
+1472
+1473
+1474
+1475
+1476
+1477
+1478
+1479
+1480
+1481
+1482
+1483
+1484
+1485
+1486
+1487
+1488
+1489
+1490
+1491
+1492
+1493
+1494
+1495
+1496
+1497
+1498
+1499
+1500
+1501
+1502
+1503
+1504
+1505
+1506
+1507
+1508
+1509
+1510
+1511
+1512
+1513
+1514
+1515
+1516
+1517
+1518
+1519
+1520
+1521
+1522
+1523
+1524
+1525
+1526
+1527
+1528
+1529
+1530
+1531
+1532
+1533
+1534
+1535
+1536
+1537
+1538
+1539
+1540
+1541
+1542
+1543
+1544
+1545
+1546
+1547
+1548
+1549
+1550
+1551
+1552
+1553
+1554
+1555
+1556
+1557
+1558
+1559
+1560
+1561
+1562
+1563
+1564
+1565
+1566
+1567
+1568
+1569
+1570
+1571
+1572
+1573
+1574
+1575
+1576
+1577
+1578
+1579
+1580
+1581
+1582
+1583
+1584
+1585
+1586
+1587
+1588
+1589
+1590
+1591
+1592
+1593
+1594
+1595
+1596
+1597
+1598
+1599
+1600
+1601
+1602
+1603
+1604
+1605
+1606
+1607
+1608
+1609
+1610
+1611
+1612
+1613
+1614
+1615
+1616
+1617
+1618
+1619
+1620
+1621
+1622
+1623
+1624
+1625
+1626
+1627
+1628
+1629
+1630
+1631
+1632
+1633
+1634
+1635
+1636
+1637
+1638
+1639
+1640
+1641
+1642
+1643
+1644
+1645
+1646
+1647
+1648
+1649
+1650
+1651
+1652
+1653
+1654
+1655
+1656
+1657
+1658
+1659
+1660
+1661
+1662
+1663
+1664
+1665
+1666
+1667
+1668
+1669
+1670
+1671
+1672
+1673
+1674
+1675
+1676
+1677
+1678
+1679
+1680
+1681
+1682
+1683
+1684
+1685
+1686
+1687
+1688
+1689
+1690
+1691
+1692
+1693
+1694
+1695
+1696
+1697
+1698
+1699
+1700
+1701
+1702
+1703
+1704
+1705
+1706
+1707
+1708
+1709
+1710
+1711
+1712
+1713
+1714
+1715
+1716
+1717
+1718
+1719
+1720
+1721
+1722
+1723
+1724
+1725
+1726
+1727
+1728
+1729
+1730
+1731
+1732
+1733
+1734
+1735
+1736
+1737
+1738
+1739
+1740
+1741
+1742
+1743
+1744
+1745
+1746
+1747
+1748
+1749
+1750
+1751
+1752
+1753
+1754
+1755
+1756
+1757
+1758
+1759
+1760
+1761
+1762
+1763
+1764
+1765
+1766
+1767
+1768
+1769
+1770
+1771
+1772
+1773
+1774
+1775
+1776
+1777
+1778
+1779
+1780
+1781
+1782
+1783
+1784
+1785
+1786
+1787
+1788
+1789
+1790
+1791
+1792
+1793
+1794
+1795
+1796
+1797
+1798
+1799
+1800
+1801
+1802
+1803
+1804
+1805
+1806
+1807
+1808
+1809
+1810
+1811
+1812
+1813
+1814
+1815
+1816
+1817
+1818
+1819
+1820
+1821
+1822
+1823
+1824
+1825
+1826
+1827
+1828
+1829
+1830
+1831
+1832
+1833
+1834
+1835
+1836
+1837
+1838
+1839
+1840
+1841
+1842
+1843
+1844
+1845
+1846
+1847
+1848
+1849
+1850
+1851
+1852
+1853
+1854
+1855
+1856
+1857
+1858
+1859
+1860
+1861
+1862
+1863
+1864
+1865
+1866
+1867
+1868
+1869
+1870
+1871
+1872
+1873
+1874
+1875
+1876
+1877
+1878
+1879
+1880
+1881
+1882
+1883
+1884
+1885
+1886
+1887
+1888
+1889
+1890
+1891
+1892
+1893
+1894
+1895
+1896
+1897
+1898
+1899
+1900
+1901
+1902
+1903
+1904
+1905
+1906
+1907
+1908
+1909
+1910
+1911
+1912
+1913
+1914
+1915
+1916
+1917
+1918
+1919
+1920
+1921
+1922
+1923
+1924
+1925
+1926
+1927
+1928
+1929
+1930
+1931
+1932
+1933
+1934
+1935
+1936
+1937
+1938
+1939
+1940
+1941
+1942
+1943
+1944
+1945
+1946
+1947
+1948
+1949
+1950
+1951
+1952
+1953
+1954
+1955
+1956
+1957
+1958
+1959
+1960
+1961
+1962
+1963
+1964
+1965
+1966
+1967
+1968
+1969
+1970
+1971
+1972
+1973
+1974
+1975
+1976
+1977
+1978
+1979
+1980
+1981
+1982
+1983
+1984
+1985
+1986
+1987
+1988
+1989
+1990
+1991
+1992
+1993
+1994
+1995
+1996
+1997
+1998
+1999
+2000
+2001
+2002
+2003
+2004
+2005
+2006
+2007
+2008
+2009
+2010
+2011
+2012
+2013
+2014
+2015
+2016
+2017
+2018
+2019
+2020
+2021
+2022
+2023
+2024
+2025
+2026
+2027
+2028
+2029
+2030
+2031
+2032
+2033
+2034
+2035
+2036
+2037
+2038
+2039
+2040
+2041
+2042
+2043
+2044
+2045
+2046
+2047
+2048
+2049
+2050
+2051
+2052
+2053
+2054
+2055
+2056
+2057
+2058
+2059
+2060
+2061
+2062
+2063
+2064
+2065
+2066
+2067
+2068
+2069
+2070
+2071
+2072
+2073
+2074
+2075
+2076
+2077
+2078
+2079
+2080
+2081
+2082
+2083
+2084
+2085
+2086
+2087
+2088
+2089
+2090
+2091
+2092
+2093
+2094
+2095
+2096
+2097
+2098
+2099
+2100
+2101
+2102
+2103
+2104
+2105
+2106
+2107
+2108
+2109
+2110
+2111
+2112
+2113
+2114
+2115
+2116
+2117
+2118
+2119
+2120
+2121
+2122
+2123
+2124
+2125
+2126
+2127
+2128
+2129
+2130
+2131
+2132
+2133
+2134
+2135
+2136
+2137
+2138
+2139
+2140
+2141
+2142
+2143
+2144
+2145
+2146
+2147
+2148
+2149
+2150
+2151
+2152
+2153
+2154
+2155
+2156
+2157
+2158
+2159
+2160
+2161
+2162
+2163
+2164
+2165
+2166
+2167
+2168
+2169
+2170
+2171
+2172
+2173
+2174
+2175
+2176
+2177
+2178
+2179
+2180
+2181
+2182
+2183
+2184
+2185
+2186
+2187
+2188
+2189
+2190
+2191
+2192
+2193
+2194
+2195
+2196
+2197
+2198
+2199
+2200
+2201
+2202
+2203
+2204
+2205
+2206
+2207
+2208
+2209
+2210
+2211
+2212
+2213
+2214
+2215
+2216
+2217
+2218
+2219
+2220
+2221
+2222
+2223
+2224
+2225
+2226
+2227
+2228
+2229
+2230
+2231
+2232
+2233
+2234
+2235
+2236
+2237
+2238
+2239
+2240
+2241
+2242
+2243
+2244
+2245
+2246
+2247
+2248
+2249
+2250
+2251
+2252
+2253
+2254
+2255
+2256
+2257
+2258
+2259
+2260
+2261
+2262
+2263
+2264
+2265
+2266
+2267
+2268
+2269
+2270
+2271
+2272
+2273
+2274
+2275
+2276
+2277
+2278
+2279
+2280
+2281
+2282
+2283
+2284
+2285
+2286
+2287
+2288
+2289
+2290
+2291
+2292
+2293
+2294
+2295
+2296
+2297
+2298
+2299
+2300
+2301
+2302
+2303
+2304
+2305
+2306
+2307
+2308
+2309
+2310
+2311
+2312
+2313
+2314
+2315
+2316
+2317
+2318
+2319
+2320
+2321
+2322
+2323
+2324
+2325
+2326
+2327
+2328
+2329
+2330
+2331
+2332
+2333
+2334
+2335
+2336
+2337
+2338
+2339
+2340
+2341
+2342
+2343
+2344
+2345
+2346
+2347
+2348
+2349
+2350
+2351
+2352
+2353
+2354
+2355
+2356
+2357
+2358
+2359
+2360
+2361
+2362
+2363
+2364
+2365
+2366
+2367
+2368
+2369
+2370
+2371
+2372
+2373
+2374
+2375
+2376
+2377
+2378
+2379
+2380
+2381
+2382
+2383
+2384
+2385
+2386
+2387
+2388
+2389
+2390
+2391
+2392
+2393
+2394
+2395
+2396
+2397
+2398
+2399
+2400
+2401
+2402
+2403
+2404
+2405
+2406
+2407
+2408
+2409
+2410
+2411
+2412
+2413
+2414
+2415
+2416
+2417
+2418
+2419
+2420
+2421
+2422
+2423
+2424
+2425
+2426
+2427
+2428
+2429
+2430
+2431
+2432
+2433
+2434
+2435
+2436
+2437
+2438
+2439
+2440
+2441
+2442
+2443
+2444
+2445
+2446
+2447
+2448
+2449
+2450
+2451
+2452
+2453
+2454
+2455
+2456
+2457
+2458
+2459
+2460
+2461
+2462
+2463
+2464
+2465
+2466
+2467
+2468
+2469
+2470
+2471
+2472
+2473
+2474
+2475
+2476
+2477
+2478
+2479
+2480
+2481
+2482
+2483
+2484
+2485
+2486
+2487
+2488
+2489
+2490
+2491
+2492
+2493
+2494
+2495
+2496
+2497
+2498
+2499
+2500
+2501
+2502
+2503
+2504
+2505
+2506
+2507
+2508
+2509
+2510
+2511
+2512
+2513
+2514
+2515
+2516
+2517
+2518
+2519
+2520
+2521
+2522
+2523
+2524
+2525
+2526
+2527
+2528
+2529
+2530
+2531
+2532
+2533
+2534
+2535
+2536
+2537
+2538
+2539
+2540
+2541
+2542
+2543
+2544
+2545
+2546
+2547
+2548
+2549
+2550
+2551
+2552
+2553
+2554
+2555
+2556
+2557
+2558
+2559
+2560
+2561
+2562
+2563
+2564
+2565
+2566
+2567
+2568
+2569
+2570
+2571
+2572
+2573
+2574
+2575
+2576
+2577
+2578
+2579
+2580
+2581
+2582
+2583
+2584
+2585
+2586
+2587
+2588
+2589
+2590
+2591
+2592
+2593
+2594
+2595
+2596
+2597
+2598
+2599
+2600
+2601
+2602
+2603
+2604
+2605
+2606
+2607
+2608
+2609
+2610
+2611
+2612
+2613
+2614
+2615
+2616
+2617
+2618
+2619
+2620
+2621
+2622
+2623
+2624
+2625
+2626
+2627
+2628
+2629
+2630
+2631
+2632
+2633
+2634
+2635
+2636
+2637
+2638
+2639
+2640
+2641
+2642
+2643
+2644
+2645
+2646
+2647
+2648
+2649
+2650
+2651
+2652
+2653
+2654
+2655
+2656
+2657
+2658
+2659
+2660
+2661
+2662
+2663
+2664
+2665
+2666
+2667
+2668
+2669
+2670
+2671
+2672
+2673
+2674
+2675
+2676
+2677
+2678
+2679
+2680
+2681
+2682
+2683
+2684
+2685
+2686
+2687
+2688
+2689
+2690
+2691
+2692
+2693
+2694
+2695
+2696
+2697
+2698
+2699
+2700
+2701
+2702
+2703
+2704
+2705
+2706
+2707
+2708
+2709
+2710
+2711
+2712
+2713
+2714
+2715
+2716
+2717
+2718
+2719
+2720
+2721
+2722
+2723
+2724
+2725
+2726
+2727
+2728
+2729
+2730
+2731
+2732
+2733
+2734
+2735
+2736
+2737
+2738
+2739
+2740
+2741
+2742
+2743
+2744
+2745
+2746
+2747
+2748
+2749
+2750
+2751
+2752
+2753
+2754
+2755
+2756
+2757
+2758
+2759
+2760
+2761
+2762
+2763
+2764
+2765
+2766
+2767
+2768
+2769
+2770
+2771
+2772
+2773
+2774
+2775
+2776
+2777
+2778
+2779
+2780
+2781
+2782
+2783
+2784
+2785
+2786
+2787
+2788
+2789
+2790
+2791
+2792
+2793
+2794
+2795
+2796
+2797
+2798
+2799
+2800
+2801
+2802
+2803
+2804
+2805
+2806
+2807
+2808
+2809
+2810
+2811
+2812
+2813
+2814
+2815
+2816
+2817
+2818
+2819
+2820
+2821
+2822
+2823
+2824
+2825
+2826
+2827
+2828
+2829
+2830
+2831
+2832
+2833
+2834
+2835
+2836
+2837
+2838
+2839
+2840
+2841
+2842
+2843
+2844
+2845
+2846
+2847
+2848
+2849
+2850
+2851
+2852
+2853
+2854
+2855
+2856
+2857
+2858
+2859
+2860
+2861
+2862
+2863
+2864
+2865
+2866
+2867
+2868
+2869
+2870
+2871
+2872
+2873
+2874
+2875
+2876
+2877
+2878
+2879
+2880
+2881
+2882
+2883
+2884
+2885
+2886
+2887
+2888
+2889
+2890
+2891
+2892
+2893
+2894
+2895
+2896
+2897
+2898
+2899
+2900
+2901
+2902
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+#include <ctk/ctk.h>
+#include <cdk/cdkx.h>
+#include <cdk/cdkkeysyms.h>
+#include <X11/XKBlib.h>
+#include <X11/extensions/XKBgeom.h>
+#include <stdlib.h>
+#include <memory.h>
+#include <math.h>
+#include <glib/gi18n-lib.h>
+#include <libxklavier/xklavier.h>
+
+#include <cafekbd-keyboard-drawing.h>
+#include <cafekbd-keyboard-drawing-marshal.h>
+#include <cafekbd-util.h>
+
+#define INVALID_KEYCODE ((guint)(-1))
+
+#define CTK_RESPONSE_PRINT 2
+
+#define KEY_FONT_SIZE 12
+
+enum {
+	BAD_KEYCODE = 0,
+	NUM_SIGNALS
+};
+
+static guint cafekbd_keyboard_drawing_signals[NUM_SIGNALS] = { 0 };
+
+static void cafekbd_keyboard_drawing_set_mods (CafekbdKeyboardDrawing * drawing,
+					    guint mods);
+
+extern gboolean xkl_xkb_config_native_prepare (XklEngine * engine,
+					      const XklConfigRec * data,
+					      gpointer component_names);
+
+extern void xkl_xkb_config_native_cleanup (XklEngine * engine,
+					  gpointer component_names);
+
+
+static gint
+xkb_to_pixmap_coord (CafekbdKeyboardDrawingRenderContext * context, gint n)<--- Parameter 'context' can be declared as pointer to const
+{
+	return n * context->scale_numerator / context->scale_denominator;
+}
+
+static gdouble
+xkb_to_pixmap_double (CafekbdKeyboardDrawingRenderContext * context,<--- Parameter 'context' can be declared as pointer to const
+		      gdouble d)
+{
+	return d * context->scale_numerator / context->scale_denominator;
+}
+
+
+/* angle is in tenths of a degree; coordinates can be anything as (xkb,
+ * pixels, pango) as long as they are all the same */
+static void
+rotate_coordinate (gint origin_x,
+		   gint origin_y,
+		   gint x,
+		   gint y, gint angle, gint * rotated_x, gint * rotated_y)
+{
+	*rotated_x =
+	    origin_x + (x - origin_x) * cos (M_PI * angle / 1800.0) - (y -
+								       origin_y)
+	    * sin (M_PI * angle / 1800.0);
+	*rotated_y =
+	    origin_y + (x - origin_x) * sin (M_PI * angle / 1800.0) + (y -
+								       origin_y)
+	    * cos (M_PI * angle / 1800.0);
+}
+
+static gdouble
+length (gdouble x, gdouble y)
+{
+	return sqrt (x * x + y * y);
+}
+
+static gdouble
+point_line_distance (gdouble ax, gdouble ay, gdouble nx, gdouble ny)
+{
+	return ax * nx + ay * ny;
+}
+
+static void
+normal_form (gdouble ax, gdouble ay,
+	     gdouble bx, gdouble by,
+	     gdouble * nx, gdouble * ny, gdouble * d)
+{
+	gdouble l;
+
+	*nx = by - ay;
+	*ny = ax - bx;
+
+	l = length (*nx, *ny);
+
+	*nx /= l;
+	*ny /= l;
+
+	*d = point_line_distance (ax, ay, *nx, *ny);
+}
+
+static void
+inverse (gdouble a, gdouble b, gdouble c, gdouble d,
+	 gdouble * e, gdouble * f, gdouble * g, gdouble * h)
+{
+	gdouble det;
+
+	det = a * d - b * c;
+
+	*e = d / det;
+	*f = -b / det;
+	*g = -c / det;
+	*h = a / det;
+}
+
+static void
+multiply (gdouble a, gdouble b, gdouble c, gdouble d,
+	  gdouble e, gdouble f, gdouble * x, gdouble * y)
+{
+	*x = a * e + b * f;
+	*y = c * e + d * f;
+}
+
+static void
+intersect (gdouble n1x, gdouble n1y, gdouble d1,
+	   gdouble n2x, gdouble n2y, gdouble d2, gdouble * x, gdouble * y)
+{
+	gdouble e, f, g, h;
+
+	inverse (n1x, n1y, n2x, n2y, &e, &f, &g, &h);
+	multiply (e, f, g, h, d1, d2, x, y);
+}
+
+
+/* draw an angle from the current point to b and then to c,
+ * with a rounded corner of the given radius.
+ */
+static void
+rounded_corner (cairo_t * cr,
+		gdouble bx, gdouble by,
+		gdouble cx, gdouble cy, gdouble radius)
+{
+	gdouble ax, ay;
+	gdouble n1x, n1y, d1;
+	gdouble n2x, n2y, d2;
+	gdouble pd1, pd2;
+	gdouble ix, iy;
+	gdouble dist1, dist2;
+	gdouble nx, ny, d;
+	gdouble a1x, a1y, c1x, c1y;
+	gdouble phi1, phi2;
+
+	cairo_get_current_point (cr, &ax, &ay);
+#ifdef KBDRAW_DEBUG
+	printf ("        current point: (%f, %f), radius %f:\n", ax, ay,
+		radius);
+#endif
+
+	/* make sure radius is not too large */
+	dist1 = length (bx - ax, by - ay);
+	dist2 = length (cx - bx, cy - by);
+
+	radius = MIN (radius, MIN (dist1, dist2));
+
+	/* construct normal forms of the lines */
+	normal_form (ax, ay, bx, by, &n1x, &n1y, &d1);
+	normal_form (bx, by, cx, cy, &n2x, &n2y, &d2);
+
+	/* find which side of the line a,b the point c is on */
+	if (point_line_distance (cx, cy, n1x, n1y) < d1)
+		pd1 = d1 - radius;
+	else
+		pd1 = d1 + radius;
+
+	/* find which side of the line b,c the point a is on */
+	if (point_line_distance (ax, ay, n2x, n2y) < d2)
+		pd2 = d2 - radius;
+	else
+		pd2 = d2 + radius;
+
+	/* intersect the parallels to find the center of the arc */
+	intersect (n1x, n1y, pd1, n2x, n2y, pd2, &ix, &iy);
+
+	nx = (bx - ax) / dist1;
+	ny = (by - ay) / dist1;
+	d = point_line_distance (ix, iy, nx, ny);
+
+	/* a1 is the point on the line a-b where the arc starts */
+	intersect (n1x, n1y, d1, nx, ny, d, &a1x, &a1y);
+
+	nx = (cx - bx) / dist2;
+	ny = (cy - by) / dist2;
+	d = point_line_distance (ix, iy, nx, ny);
+
+	/* c1 is the point on the line b-c where the arc ends */
+	intersect (n2x, n2y, d2, nx, ny, d, &c1x, &c1y);
+
+	/* determine the first angle */
+	if (a1x - ix == 0)
+		phi1 = (a1y - iy > 0) ? M_PI_2 : 3 * M_PI_2;
+	else if (a1x - ix > 0)
+		phi1 = atan ((a1y - iy) / (a1x - ix));
+	else
+		phi1 = M_PI + atan ((a1y - iy) / (a1x - ix));
+
+	/* determine the second angle */
+	if (c1x - ix == 0)
+		phi2 = (c1y - iy > 0) ? M_PI_2 : 3 * M_PI_2;
+	else if (c1x - ix > 0)
+		phi2 = atan ((c1y - iy) / (c1x - ix));
+	else
+		phi2 = M_PI + atan ((c1y - iy) / (c1x - ix));
+
+	/* compute the difference between phi2 and phi1 mod 2pi */
+	d = phi2 - phi1;
+	while (d < 0)
+		d += 2 * M_PI;
+	while (d > 2 * M_PI)
+		d -= 2 * M_PI;
+
+#ifdef KBDRAW_DEBUG
+	printf ("        line 1 to: (%f, %f):\n", a1x, a1y);
+#endif
+	if (!(isnan (a1x) || isnan (a1y)))
+		cairo_line_to (cr, a1x, a1y);
+
+	/* pick the short arc from phi1 to phi2 */
+	if (d < M_PI)
+		cairo_arc (cr, ix, iy, radius, phi1, phi2);
+	else
+		cairo_arc_negative (cr, ix, iy, radius, phi1, phi2);
+
+#ifdef KBDRAW_DEBUG
+	printf ("        line 2 to: (%f, %f):\n", cx, cy);
+#endif
+	cairo_line_to (cr, cx, cy);
+}
+
+static void
+rounded_polygon (cairo_t * cr,
+		 gboolean filled,
+		 gdouble radius, CdkPoint * points, gint num_points)
+{
+	gint i, j;
+
+	cairo_move_to (cr,
+		       (gdouble) (points[num_points - 1].x +
+				  points[0].x) / 2,
+		       (gdouble) (points[num_points - 1].y +
+				  points[0].y) / 2);
+
+
+#ifdef KBDRAW_DEBUG
+	printf ("    rounded polygon of radius %f:\n", radius);
+#endif
+	for (i = 0; i < num_points; i++) {
+		j = (i + 1) % num_points;
+		rounded_corner (cr, (gdouble) points[i].x,
+				(gdouble) points[i].y,
+				(gdouble) (points[i].x + points[j].x) / 2,
+				(gdouble) (points[i].y + points[j].y) / 2,
+				radius);
+#ifdef KBDRAW_DEBUG
+		printf ("      corner (%d, %d) -> (%d, %d):\n",
+			points[i].x, points[i].y, points[j].x,
+			points[j].y);
+#endif
+	};
+	cairo_close_path (cr);
+
+	if (filled)
+		cairo_fill (cr);
+	else
+		cairo_stroke (cr);
+}
+
+static void
+draw_polygon (CafekbdKeyboardDrawingRenderContext * context,
+	      CdkRGBA * fill_color,
+	      gint xkb_x,
+	      gint xkb_y, XkbPointRec * xkb_points, guint num_points,
+	      gdouble radius)
+{
+	CdkPoint *points;
+	gboolean filled;
+	gint i;
+
+	if (fill_color) {
+		filled = TRUE;
+	} else {
+		fill_color = &context->dark_color;
+		filled = FALSE;
+	}
+
+	cdk_cairo_set_source_rgba (context->cr, fill_color);
+
+	points = g_new (CdkPoint, num_points);
+
+#ifdef KBDRAW_DEBUG
+	printf ("    Polygon points:\n");
+#endif
+	for (i = 0; i < num_points; i++) {
+		points[i].x =
+		    xkb_to_pixmap_coord (context, xkb_x + xkb_points[i].x);
+		points[i].y =
+		    xkb_to_pixmap_coord (context, xkb_y + xkb_points[i].y);
+#ifdef KBDRAW_DEBUG
+		printf ("      %d, %d\n", points[i].x, points[i].y);
+#endif
+	}
+
+	rounded_polygon (context->cr, filled,
+			 xkb_to_pixmap_double (context, radius),
+			 points, num_points);
+
+	g_free (points);
+}
+
+static void
+curve_rectangle (cairo_t * cr,
+		 gdouble x0,
+		 gdouble y0, gdouble width, gdouble height, gdouble radius)
+{
+	gdouble x1, y1;
+
+	if (!width || !height)
+		return;
+
+	x1 = x0 + width;
+	y1 = y0 + height;
+
+	radius = MIN (radius, MIN (width / 2, height / 2));
+
+	cairo_move_to (cr, x0, y0 + radius);
+	cairo_arc (cr, x0 + radius, y0 + radius, radius, M_PI,
+		   3 * M_PI / 2);
+	cairo_line_to (cr, x1 - radius, y0);
+	cairo_arc (cr, x1 - radius, y0 + radius, radius, 3 * M_PI / 2,
+		   2 * M_PI);
+	cairo_line_to (cr, x1, y1 - radius);
+	cairo_arc (cr, x1 - radius, y1 - radius, radius, 0, M_PI / 2);
+	cairo_line_to (cr, x0 + radius, y1);
+	cairo_arc (cr, x0 + radius, y1 - radius, radius, M_PI / 2, M_PI);
+
+	cairo_close_path (cr);
+}
+
+static void
+draw_curve_rectangle (cairo_t * cr,
+		      gboolean filled,
+		      CdkRGBA * fill_color,
+		      gint x, gint y, gint width, gint height, gint radius)
+{
+	curve_rectangle (cr, x, y, width, height, radius);
+
+	cdk_cairo_set_source_rgba (cr, fill_color);
+
+	if (filled)
+		cairo_fill (cr);
+	else
+		cairo_stroke (cr);
+}
+
+/* x, y, width, height are in the xkb coordinate system */
+static void
+draw_rectangle (CafekbdKeyboardDrawingRenderContext * context,
+		CdkRGBA * fill_color,
+		gint angle,
+		gint xkb_x, gint xkb_y, gint xkb_width, gint xkb_height,
+		gint radius)
+{
+	if (angle == 0) {
+		gint x, y, width, height;
+		gboolean filled;
+
+		if (fill_color) {
+			filled = TRUE;
+		} else {
+			fill_color = &context->dark_color;
+			filled = FALSE;
+		}
+
+		x = xkb_to_pixmap_coord (context, xkb_x);
+		y = xkb_to_pixmap_coord (context, xkb_y);
+		width =
+		    xkb_to_pixmap_coord (context, xkb_x + xkb_width) - x;
+		height =
+		    xkb_to_pixmap_coord (context, xkb_y + xkb_height) - y;
+
+		draw_curve_rectangle (context->cr, filled, fill_color,
+				      x, y, width, height,
+				      xkb_to_pixmap_double (context,
+							    radius));
+	} else {
+		XkbPointRec points[4];
+		gint x, y;
+
+		points[0].x = xkb_x;
+		points[0].y = xkb_y;
+		rotate_coordinate (xkb_x, xkb_y, xkb_x + xkb_width, xkb_y,
+				   angle, &x, &y);
+		points[1].x = x;
+		points[1].y = y;
+		rotate_coordinate (xkb_x, xkb_y, xkb_x + xkb_width,
+				   xkb_y + xkb_height, angle, &x, &y);
+		points[2].x = x;
+		points[2].y = y;
+		rotate_coordinate (xkb_x, xkb_y, xkb_x, xkb_y + xkb_height,
+				   angle, &x, &y);
+		points[3].x = x;
+		points[3].y = y;
+
+		/* the points we've calculated are relative to 0,0 */
+		draw_polygon (context, fill_color, 0, 0, points, 4,
+			      radius);
+	}
+}
+
+static void
+draw_outline (CafekbdKeyboardDrawingRenderContext * context,
+	      XkbOutlineRec * outline,
+	      CdkRGBA * color,
+	      gint angle, gint origin_x, gint origin_y)
+{
+#ifdef KBDRAW_DEBUG
+	printf (" num_points in %p: %d\n", outline, outline->num_points);
+#endif
+
+	if (outline->num_points == 1) {
+		if (color)
+			draw_rectangle (context, color, angle, origin_x,
+					origin_y, outline->points[0].x,
+					outline->points[0].y,
+					outline->corner_radius);
+
+#ifdef KBDRAW_DEBUG
+		printf ("pointsxy:%d %d %d\n", outline->points[0].x,
+			outline->points[0].y, outline->corner_radius);
+#endif
+
+		draw_rectangle (context, NULL, angle, origin_x, origin_y,
+				outline->points[0].x,
+				outline->points[0].y,
+				outline->corner_radius);
+	} else if (outline->num_points == 2) {
+		gint rotated_x0, rotated_y0;
+
+		rotate_coordinate (origin_x, origin_y,
+				   origin_x + outline->points[0].x,
+				   origin_y + outline->points[0].y,
+				   angle, &rotated_x0, &rotated_y0);
+		if (color)
+			draw_rectangle (context, color, angle, rotated_x0,
+					rotated_y0, outline->points[1].x,
+					outline->points[1].y,
+					outline->corner_radius);
+
+		draw_rectangle (context, NULL, angle, rotated_x0,
+				rotated_y0, outline->points[1].x,
+				outline->points[1].y,
+				outline->corner_radius);
+	} else {
+		if (color)
+			draw_polygon (context, color, origin_x, origin_y,
+				      outline->points,
+				      outline->num_points,
+				      outline->corner_radius);
+
+		draw_polygon (context, NULL, origin_x, origin_y,
+			      outline->points, outline->num_points,
+			      outline->corner_radius);
+	}
+}
+
+/* see PSColorDef in xkbprint */
+static gboolean
+parse_xkb_color_spec (gchar * colorspec, CdkRGBA * color)
+{
+	glong level;
+
+	color->alpha = 1.0;
+
+	if (g_ascii_strcasecmp (colorspec, "black") == 0) {
+		color->red = 0;
+		color->green = 0;
+		color->blue = 0;
+	} else if (g_ascii_strcasecmp (colorspec, "white") == 0) {
+		color->red = 1.0;
+		color->green = 1.0;
+		color->blue = 1.0;
+	} else if (g_ascii_strncasecmp (colorspec, "grey", 4) == 0 ||
+		   g_ascii_strncasecmp (colorspec, "gray", 4) == 0) {
+		level = strtol (colorspec + 4, NULL, 10);
+
+		color->red = 1.0 - 1.0 * level / 100.0;
+		color->green = 1.0 - 1.0 * level / 100.0;
+		color->blue = 1.0 - 1.0 * level / 100.0;
+	} else if (g_ascii_strcasecmp (colorspec, "red") == 0) {
+		color->red = 1.0;
+		color->green = 0;
+		color->blue = 0;
+	} else if (g_ascii_strcasecmp (colorspec, "green") == 0) {
+		color->red = 0;
+		color->green = 1.0;
+		color->blue = 0;
+	} else if (g_ascii_strcasecmp (colorspec, "blue") == 0) {
+		color->red = 0;
+		color->green = 0;
+		color->blue = 1.0;
+	} else if (g_ascii_strncasecmp (colorspec, "red", 3) == 0) {
+		level = strtol (colorspec + 3, NULL, 10);
+
+		color->red = 1.0 * level / 100.0;
+		color->green = 0;
+		color->blue = 0;
+	} else if (g_ascii_strncasecmp (colorspec, "green", 5) == 0) {
+		level = strtol (colorspec + 5, NULL, 10);
+
+		color->red = 0;
+		color->green = 1.0 * level / 100.0;
+		color->blue = 0;
+	} else if (g_ascii_strncasecmp (colorspec, "blue", 4) == 0) {
+		level = strtol (colorspec + 4, NULL, 10);
+
+		color->red = 0;
+		color->green = 0;
+		color->blue = 1.0 * level / 100.0;
+	} else
+		return FALSE;
+
+	return TRUE;
+}
+
+
+static guint
+find_keycode (CafekbdKeyboardDrawing * drawing, gchar * key_name)
+{
+#define KEYSYM_NAME_MAX_LENGTH 4
+	guint keycode;
+	gint i, j;
+	XkbKeyNamePtr pkey;
+	XkbKeyAliasPtr palias;
+	guint is_name_matched;
+	gchar *src, *dst;
+
+	if (!drawing->xkb)
+		return INVALID_KEYCODE;
+
+#ifdef KBDRAW_DEBUG
+	printf ("    looking for keycode for (%c%c%c%c)\n",
+		key_name[0], key_name[1], key_name[2], key_name[3]);
+#endif
+
+	pkey = drawing->xkb->names->keys + drawing->xkb->min_key_code;
+	for (keycode = drawing->xkb->min_key_code;
+	     keycode <= drawing->xkb->max_key_code; keycode++) {
+		is_name_matched = 1;
+		src = key_name;
+		dst = pkey->name;
+		for (i = KEYSYM_NAME_MAX_LENGTH; --i >= 0;) {
+			if ('\0' == *src)
+				break;
+			if (*src++ != *dst++) {
+				is_name_matched = 0;
+				break;
+			}
+		}
+		if (is_name_matched) {
+#ifdef KBDRAW_DEBUG
+			printf ("      found keycode %u\n", keycode);
+#endif
+			return keycode;
+		}
+		pkey++;
+	}
+
+	palias = drawing->xkb->names->key_aliases;
+	for (j = drawing->xkb->names->num_key_aliases; --j >= 0;) {
+		is_name_matched = 1;
+		src = key_name;
+		dst = palias->alias;
+		for (i = KEYSYM_NAME_MAX_LENGTH; --i >= 0;) {
+			if ('\0' == *src)
+				break;
+			if (*src++ != *dst++) {
+				is_name_matched = 0;
+				break;
+			}
+		}
+
+		if (is_name_matched) {
+			keycode = find_keycode (drawing, palias->real);
+#ifdef KBDRAW_DEBUG
+			printf ("found alias keycode %u\n", keycode);
+#endif
+			return keycode;
+		}
+		palias++;
+	}
+
+	return INVALID_KEYCODE;
+}
+
+static void
+set_markup (CafekbdKeyboardDrawingRenderContext * context, gchar *txt)<--- Parameter 'context' can be declared as pointer to const
+{
+	PangoLayout *layout = context->layout;
+	txt = strcmp ("<", txt) ? txt : "&lt;";
+	txt = strcmp ("&", txt) ? txt : "&amp;";
+	if (g_utf8_strlen (txt, -1) > 1) {
+		gchar* buf =
+		    g_strdup_printf ("<span size=\"xx-small\">%s</span>", txt);
+		pango_layout_set_markup (layout, buf, -1);
+		g_free (buf);
+	} else {
+		pango_layout_set_markup (layout, txt, -1);
+	}
+}
+
+static void
+set_key_label_in_layout (CafekbdKeyboardDrawingRenderContext * context,
+			 guint keyval)
+{
+	gchar buf[5];
+	gunichar uc;
+
+	switch (keyval) {
+	case CDK_KEY_Scroll_Lock:
+		set_markup (context, _("Scroll\nLock"));
+		break;
+
+	case CDK_KEY_space:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_Sys_Req:
+		set_markup (context, _("Sys Rq"));
+		break;
+
+	case CDK_KEY_Page_Up:
+		set_markup (context, _("Page\nUp"));
+		break;
+
+	case CDK_KEY_Page_Down:
+		set_markup (context, _("Page\nDown"));
+		break;
+
+	case CDK_KEY_Num_Lock:
+		set_markup (context, _("Num\nLock"));
+		break;
+
+	case CDK_KEY_KP_Page_Up:
+		set_markup (context, _("Pg Up"));
+		break;
+
+	case CDK_KEY_KP_Page_Down:
+		set_markup (context, _("Pg Dn"));
+		break;
+
+	case CDK_KEY_KP_Home:
+		set_markup (context, _("Home"));
+		break;
+
+	case CDK_KEY_KP_Left:
+		set_markup (context, _("Left"));
+		break;
+
+	case CDK_KEY_KP_End:
+		set_markup (context, _("End"));
+		break;
+
+	case CDK_KEY_KP_Up:
+		set_markup (context, _("Up"));
+		break;
+
+	case CDK_KEY_KP_Begin:
+		set_markup (context, _("Begin"));
+		break;
+
+	case CDK_KEY_KP_Right:
+		set_markup (context, _("Right"));
+		break;
+
+	case CDK_KEY_KP_Enter:
+		set_markup (context, _("Enter"));
+		break;
+
+	case CDK_KEY_KP_Down:
+		set_markup (context, _("Down"));
+		break;
+
+	case CDK_KEY_KP_Insert:
+		set_markup (context, _("Ins"));
+		break;
+
+	case CDK_KEY_KP_Delete:
+		set_markup (context, _("Del"));
+		break;
+
+	/* 0xfe03 */
+	case CDK_KEY_ISO_Level3_Shift:
+		set_markup (context, _("ISO_Level3_Shift"));
+		break;
+
+	/* 0xfe20 */
+	case CDK_KEY_ISO_Left_Tab:
+		set_markup (context, _("Tab"));
+		break;
+
+	/* 0xff08 */
+	case CDK_KEY_BackSpace:
+		set_markup (context, _("BackSpace"));
+		break;
+
+	/* 0xff09 */
+	case CDK_KEY_Tab:
+		set_markup (context, _("Tab"));
+		break;
+
+	/* 0xff0d */
+	case CDK_KEY_Return:
+		set_markup (context, _("Return"));
+		break;
+
+	/* 0xff13 */
+	case CDK_KEY_Pause:
+		set_markup (context, _("Pause"));
+		break;
+
+	/* 0xff1b */
+	case CDK_KEY_Escape:
+		set_markup (context, _("Esc"));
+		break;
+
+	/* 0xff50 */
+	case CDK_KEY_Home:
+		set_markup (context, _("Home"));
+		break;
+
+	/* 0xff51 */
+	case CDK_KEY_Left:
+		set_markup (context, _("Left"));
+		break;
+
+	/* 0xff52 */
+	case CDK_KEY_Up:
+		set_markup (context, _("Up"));
+		break;
+
+	/* 0xff53 */
+	case CDK_KEY_Right:
+		set_markup (context, _("Right"));
+		break;
+
+	/* 0xff54 */
+	case CDK_KEY_Down:
+		set_markup (context, _("Down"));
+		break;
+
+	/* 0xff57 */
+	case CDK_KEY_End:
+		set_markup (context, _("End"));
+		break;
+
+	/* 0xff61 */
+	case CDK_KEY_Print:
+		set_markup (context, _("Print"));
+		break;
+
+	/* 0xff63 */
+	case CDK_KEY_Insert:
+		set_markup (context, _("Insert"));
+		break;
+
+	/* 0xff67 */
+	case CDK_KEY_Menu:
+		set_markup (context, _("Menu"));
+		break;
+
+	/* 0xffbe */
+	case CDK_KEY_F1:
+		set_markup (context, _("F1"));
+		break;
+
+	/* 0xffbf */
+	case CDK_KEY_F2:
+		set_markup (context, _("F2"));
+		break;
+
+	/* 0xffc0 */
+	case CDK_KEY_F3:
+		set_markup (context, _("F3"));
+		break;
+
+	/* 0xffc1 */
+	case CDK_KEY_F4:
+		set_markup (context, _("F4"));
+		break;
+
+	/* 0xffc2 */
+	case CDK_KEY_F5:
+		set_markup (context, _("F5"));
+		break;
+
+	/* 0xffc3 */
+	case CDK_KEY_F6:
+		set_markup (context, _("F6"));
+		break;
+
+	/* 0xffc4 */
+	case CDK_KEY_F7:
+		set_markup (context, _("F7"));
+		break;
+
+	/* 0xffc5 */
+	case CDK_KEY_F8:
+		set_markup (context, _("F8"));
+		break;
+
+	/* 0xffc6 */
+	case CDK_KEY_F9:
+		set_markup (context, _("F9"));
+		break;
+
+	/* 0xffc7 */
+	case CDK_KEY_F10:
+		set_markup (context, _("F10"));
+		break;
+
+	/* 0xffc8 */
+	case CDK_KEY_F11:
+		set_markup (context, _("F11"));
+		break;
+
+	/* 0xffc9 */
+	case CDK_KEY_F12:
+		set_markup (context, _("F12"));
+		break;
+
+	/* 0xffe1 */
+	case CDK_KEY_Shift_L:
+		set_markup (context, _("Shift"));
+		break;
+
+	/* 0xffe2 */
+	case CDK_KEY_Shift_R:
+		set_markup (context, _("Shift"));
+		break;
+
+	/* 0xffe3 */
+	case CDK_KEY_Control_L:
+		set_markup (context, _("Control"));
+		break;
+
+	/* 0xffe4 */
+	case CDK_KEY_Control_R:
+		set_markup (context, _("Control"));
+		break;
+
+	/* 0xffe5 */
+	case CDK_KEY_Caps_Lock:
+		set_markup (context, _("Caps\nLock"));
+		break;
+
+	/* 0xffe7 */
+	case CDK_KEY_Meta_L:
+		set_markup (context, _("Meta"));
+		break;
+
+	/* 0xffe9 */
+	case CDK_KEY_Alt_L:
+		set_markup (context, _("Alt"));
+		break;
+
+	/* 0xffeb */
+	case CDK_KEY_Super_L:
+		set_markup (context, _("Super"));
+		break;
+
+	/* 0xffec */
+	case CDK_KEY_Super_R:
+		set_markup (context, _("Super"));
+		break;
+
+	/* 0xffff */
+	case CDK_KEY_VoidSymbol:
+		set_markup (context, _("Delete"));
+		break;
+
+	case CDK_KEY_dead_grave:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_acute:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_circumflex:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_tilde:
+		set_markup (context, "~");
+		break;
+
+	case CDK_KEY_dead_macron:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_breve:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_abovedot:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_diaeresis:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_abovering:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_doubleacute:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_caron:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_cedilla:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_ogonek:
+		set_markup (context, "");
+		break;
+
+		/* case CDK_KEY_dead_iota:
+		 * case CDK_KEY_dead_voiced_sound:
+		 * case CDK_KEY_dead_semivoiced_sound: */
+
+	case CDK_KEY_dead_belowdot:
+		set_markup (context, " ");
+		break;
+
+	case CDK_KEY_horizconnector:
+		set_markup (context, _("horiz\nconn"));
+		break;
+
+	case CDK_KEY_Mode_switch:
+		set_markup (context, _("AltGr"));
+		break;
+
+	case CDK_KEY_Multi_key:
+		set_markup (context, _("Compose"));
+		break;
+
+	default:
+		uc = cdk_keyval_to_unicode (keyval);
+		if (uc != 0 && g_unichar_isgraph (uc)) {
+			buf[g_unichar_to_utf8 (uc, buf)] = '\0';
+			set_markup (context, buf);
+		} else {
+			gchar *name = cdk_keyval_name (keyval);
+			if (name) {
+				set_markup (context, name);
+			} else
+				set_markup (context, "");
+		}
+	}
+}
+
+
+static void
+draw_pango_layout (CafekbdKeyboardDrawingRenderContext * context,
+		   CafekbdKeyboardDrawing * drawing,
+		   gint angle, gint x, gint y)
+{
+	PangoLayout *layout = context->layout;
+	CdkRGBA *color;
+	PangoLayoutLine *line;
+	gint x_off, y_off;
+	gint i;
+
+	color =
+	    drawing->colors + (drawing->xkb->geom->label_color -
+			       drawing->xkb->geom->colors);
+
+	if (angle != context->angle) {
+		PangoMatrix matrix = PANGO_MATRIX_INIT;
+		pango_matrix_rotate (&matrix, -angle / 10.0);
+		pango_context_set_matrix (pango_layout_get_context
+					  (layout), &matrix);
+		pango_layout_context_changed (layout);
+		context->angle = angle;
+	}
+
+	i = 0;
+	y_off = 0;
+	for (line = pango_layout_get_line (layout, i);
+	     line != NULL; line = pango_layout_get_line (layout, ++i)) {
+		GSList *runp;<--- Variable 'runp' can be declared as pointer to const
+		PangoRectangle line_extents;
+
+		x_off = 0;
+
+		for (runp = line->runs; runp != NULL; runp = runp->next) {
+			PangoGlyphItem *run = runp->data;
+			gint j;
+
+			for (j = 0; j < run->glyphs->num_glyphs; j++) {
+				PangoGlyphGeometry *geometry;<--- Variable 'geometry' can be declared as pointer to const
+
+				geometry =
+				    &run->glyphs->glyphs[j].geometry;
+
+				x_off += geometry->width;
+			}
+		}
+
+		pango_layout_line_get_extents (line, NULL, &line_extents);
+		y_off +=
+		    line_extents.height +
+		    pango_layout_get_spacing (layout);
+	}
+
+	cairo_move_to (context->cr, x, y);
+	cdk_cairo_set_source_rgba (context->cr, color);
+	pango_cairo_show_layout (context->cr, layout);
+}
+
+static void
+draw_key_label_helper (CafekbdKeyboardDrawingRenderContext * context,
+		       CafekbdKeyboardDrawing * drawing,
+		       KeySym keysym,
+		       gint angle,
+		       CafekbdKeyboardDrawingGroupLevelPosition glp,
+		       gint x,
+		       gint y, gint width, gint height, gint padding)
+{
+	gint label_x, label_y, label_max_width, ycell;
+
+	if (keysym == 0)
+		return;
+#ifdef KBDRAW_DEBUG
+	printf ("keysym: %04X(%c) at glp: %d\n",
+		(unsigned) keysym, (char) keysym, (int) glp);
+#endif
+
+	switch (glp) {
+	case CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT:
+	case CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT:
+		{
+			ycell =
+			    glp == CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT;
+
+			rotate_coordinate (x, y, x + padding,
+					   y + padding + (height -
+							  2 * padding) *
+					   ycell * 4 / 7, angle, &label_x,
+					   &label_y);
+			label_max_width =
+			    PANGO_SCALE * (width - 2 * padding);
+			break;
+		}
+	case CAFEKBD_KEYBOARD_DRAWING_POS_TOPRIGHT:
+	case CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT:
+		{
+			ycell =
+			    glp == CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT;
+
+			rotate_coordinate (x, y,
+					   x + padding + (width -
+							  2 * padding) *
+					   4 / 7,
+					   y + padding + (height -
+							  2 * padding) *
+					   ycell * 4 / 7, angle, &label_x,
+					   &label_y);
+			label_max_width =
+			    PANGO_SCALE * ((width - 2 * padding) -
+					   (width - 2 * padding) * 4 / 7);
+			break;
+		}
+	default:
+		return;
+	}
+	set_key_label_in_layout (context, keysym);
+	pango_layout_set_width (context->layout, label_max_width);
+	label_y -= (pango_layout_get_line_count (context->layout) - 1) *
+	    (pango_font_description_get_size (context->font_desc) /
+	     PANGO_SCALE);
+	cairo_save (context->cr);
+	cairo_rectangle (context->cr, x + padding / 2, y + padding / 2,
+			 width - padding, height - padding);
+	cairo_clip (context->cr);
+	draw_pango_layout (context, drawing, angle, label_x, label_y);
+	cairo_restore (context->cr);
+}
+
+static void
+draw_key_label (CafekbdKeyboardDrawingRenderContext * context,
+		CafekbdKeyboardDrawing * drawing,
+		guint keycode,
+		gint angle,
+		gint xkb_origin_x,
+		gint xkb_origin_y, gint xkb_width, gint xkb_height)
+{
+	gint x, y, width, height;
+	gint padding;
+	gint g, l, glp;
+
+	if (!drawing->xkb)
+		return;
+
+	padding = 23 * context->scale_numerator / context->scale_denominator;	/* 2.3mm */
+
+	x = xkb_to_pixmap_coord (context, xkb_origin_x);
+	y = xkb_to_pixmap_coord (context, xkb_origin_y);
+	width =
+	    xkb_to_pixmap_coord (context, xkb_origin_x + xkb_width) - x;
+	height =
+	    xkb_to_pixmap_coord (context, xkb_origin_y + xkb_height) - y;
+
+	for (glp = CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT;
+	     glp < CAFEKBD_KEYBOARD_DRAWING_POS_TOTAL; glp++) {
+		if (drawing->groupLevels[glp] == NULL)
+			continue;
+		g = drawing->groupLevels[glp]->group;
+		l = drawing->groupLevels[glp]->level;
+
+		if (g < 0 || g >= XkbKeyNumGroups (drawing->xkb, keycode))
+			continue;
+		if (l < 0
+		    || l >= XkbKeyGroupWidth (drawing->xkb, keycode, g))
+			continue;
+
+		/* Skip "exotic" levels like the "Ctrl" level in PC_SYSREQ */
+		if (l > 0) {
+			guint mods = XkbKeyKeyType (drawing->xkb, keycode,
+						    g)->mods.mask;
+			if ((mods & (ShiftMask | drawing->l3mod)) == 0)
+				continue;
+		}
+
+		if (drawing->track_modifiers) {
+			guint mods_rtrn;
+			KeySym keysym;
+
+			if (XkbTranslateKeyCode (drawing->xkb, keycode,
+						 XkbBuildCoreState
+						 (drawing->mods, g),
+						 &mods_rtrn, &keysym)) {
+				draw_key_label_helper (context, drawing,
+						       keysym, angle, glp,
+						       x, y, width, height,
+						       padding);
+				/* reverse y order */
+			}
+		} else {
+			KeySym keysym;
+
+			keysym =
+			    XkbKeySymEntry (drawing->xkb, keycode, l, g);
+
+			draw_key_label_helper (context, drawing, keysym,
+					       angle, glp, x, y, width,
+					       height, padding);
+			/* reverse y order */
+		}
+	}
+}
+
+/*
+ * The x offset is calculated for complex shapes. It is the rightmost of the vertical lines in the outline
+ */
+static gint
+calc_origin_offset_x (XkbOutlineRec * outline)<--- Parameter 'outline' can be declared as pointer to const
+{
+	gint rv = 0;
+	gint i;
+	XkbPointPtr point = outline->points;
+	if (outline->num_points < 3)
+		return 0;
+	for (i = outline->num_points; --i > 0;) {
+		gint x1 = point->x;
+		gint y1 = point++->y;
+		gint x2 = point->x;
+		gint y2 = point->y;
+
+		/*vertical, bottom to top (clock-wise), on the left */
+		if ((x1 == x2) && (y1 > y2) && (x1 > rv)) {
+			rv = x1;
+		}
+	}
+	return rv;
+}
+
+/* groups are from 0-3 */
+static void
+draw_key (CafekbdKeyboardDrawingRenderContext * context,
+	  CafekbdKeyboardDrawing * drawing, CafekbdKeyboardDrawingKey * key)
+{
+	XkbShapeRec *shape;
+	CtkStyleContext *style_context;
+	CdkRGBA color;
+	XkbOutlineRec *outline;
+	int origin_offset_x;
+	/* gint i; */
+
+	if (!drawing->xkb)
+		return;
+
+#ifdef KBDRAW_DEBUG
+	printf ("shape: %p (base %p, index %d)\n",
+		drawing->xkb->geom->shapes + key->xkbkey->shape_ndx,
+		drawing->xkb->geom->shapes, key->xkbkey->shape_ndx);
+#endif
+
+	shape = drawing->xkb->geom->shapes + key->xkbkey->shape_ndx;
+
+	if (key->pressed) {
+		style_context = ctk_widget_get_style_context (CTK_WIDGET (drawing));
+		ctk_style_context_save (style_context);
+		ctk_style_context_add_class (style_context, CTK_STYLE_CLASS_VIEW);
+		ctk_style_context_get_background_color (style_context,
+		                                        CTK_STATE_FLAG_SELECTED,
+		                                        &color);
+		ctk_style_context_restore (style_context);
+	 } else
+		color = *(drawing->colors + key->xkbkey->color_ndx);
+
+#ifdef KBDRAW_DEBUG
+	printf
+	    (" outlines base in the shape: %p (total: %d), origin: (%d, %d), angle %d\n",
+	     shape->outlines, shape->num_outlines, key->origin_x,
+	     key->origin_y, key->angle);
+#endif
+
+	/* draw the primary outline */
+	outline = shape->primary ? shape->primary : shape->outlines;
+	draw_outline (context, outline, &color, key->angle, key->origin_x,
+		      key->origin_y);
+#if 0
+	/* don't draw other outlines for now, since
+	 * the text placement does not take them into account
+	 */
+	for (i = 0; i < shape->num_outlines; i++) {
+		if (shape->outlines + i == shape->approx ||
+		    shape->outlines + i == shape->primary)
+			continue;
+		draw_outline (context, shape->outlines + i, NULL,
+			      key->angle, key->origin_x, key->origin_y);
+	}
+#endif
+
+	origin_offset_x = calc_origin_offset_x (outline);
+	draw_key_label (context, drawing, key->keycode, key->angle,
+			key->origin_x + origin_offset_x, key->origin_y,
+			shape->bounds.x2, shape->bounds.y2);
+}
+
+static void
+invalidate_region (CafekbdKeyboardDrawing * drawing,
+		   gdouble angle,
+		   gint origin_x, gint origin_y, XkbShapeRec * shape)
+{
+	CdkPoint points[4];
+	gint x_min, x_max, y_min, y_max;
+	gint x, y, width, height;
+	gint xx, yy;
+
+	rotate_coordinate (0, 0, 0, 0, angle, &xx, &yy);
+	points[0].x = xx;
+	points[0].y = yy;
+	rotate_coordinate (0, 0, shape->bounds.x2, 0, angle, &xx, &yy);
+	points[1].x = xx;
+	points[1].y = yy;
+	rotate_coordinate (0, 0, shape->bounds.x2, shape->bounds.y2, angle,
+			   &xx, &yy);
+	points[2].x = xx;
+	points[2].y = yy;
+	rotate_coordinate (0, 0, 0, shape->bounds.y2, angle, &xx, &yy);
+	points[3].x = xx;
+	points[3].y = yy;
+
+	x_min =
+	    MIN (MIN (points[0].x, points[1].x),
+		 MIN (points[2].x, points[3].x));
+	x_max =
+	    MAX (MAX (points[0].x, points[1].x),
+		 MAX (points[2].x, points[3].x));
+	y_min =
+	    MIN (MIN (points[0].y, points[1].y),
+		 MIN (points[2].y, points[3].y));
+	y_max =
+	    MAX (MAX (points[0].y, points[1].y),
+		 MAX (points[2].y, points[3].y));
+
+	x = xkb_to_pixmap_coord (drawing->renderContext,
+				 origin_x + x_min) - 6;
+	y = xkb_to_pixmap_coord (drawing->renderContext,
+				 origin_y + y_min) - 6;
+	width =
+	    xkb_to_pixmap_coord (drawing->renderContext,
+				 x_max - x_min) + 12;
+	height =
+	    xkb_to_pixmap_coord (drawing->renderContext,
+				 y_max - y_min) + 12;
+
+	ctk_widget_queue_draw_area (CTK_WIDGET (drawing), x, y, width,
+				    height);
+}
+
+static void
+invalidate_indicator_doodad_region (CafekbdKeyboardDrawing * drawing,
+				    CafekbdKeyboardDrawingDoodad * doodad)
+{
+	if (!drawing->xkb)
+		return;
+
+	invalidate_region (drawing,
+			   doodad->angle,
+			   doodad->origin_x +
+			   doodad->doodad->indicator.left,
+			   doodad->origin_y +
+			   doodad->doodad->indicator.top,
+			   &drawing->xkb->geom->shapes[doodad->
+						       doodad->indicator.shape_ndx]);
+}
+
+static void
+invalidate_key_region (CafekbdKeyboardDrawing * drawing,
+		       CafekbdKeyboardDrawingKey * key)
+{
+	if (!drawing->xkb)
+		return;
+
+	invalidate_region (drawing,
+			   key->angle,
+			   key->origin_x,
+			   key->origin_y,
+			   &drawing->xkb->geom->shapes[key->
+						       xkbkey->shape_ndx]);
+}
+
+static void
+draw_text_doodad (CafekbdKeyboardDrawingRenderContext * context,
+		  CafekbdKeyboardDrawing * drawing,
+		  CafekbdKeyboardDrawingDoodad * doodad,
+		  XkbTextDoodadRec * text_doodad)
+{
+	gint x, y;
+	if (!drawing->xkb)
+		return;
+
+	x = xkb_to_pixmap_coord (context,
+				 doodad->origin_x + text_doodad->left);
+	y = xkb_to_pixmap_coord (context,
+				 doodad->origin_y + text_doodad->top);
+
+	set_markup (context, text_doodad->text);
+	draw_pango_layout (context, drawing, doodad->angle, x, y);
+}
+
+static void
+draw_indicator_doodad (CafekbdKeyboardDrawingRenderContext * context,
+		       CafekbdKeyboardDrawing * drawing,
+		       CafekbdKeyboardDrawingDoodad * doodad,
+		       XkbIndicatorDoodadRec * indicator_doodad)
+{
+	CdkRGBA *color;
+	XkbShapeRec *shape;<--- Variable 'shape' can be declared as pointer to const
+	gint i;
+
+	if (!drawing->xkb)
+		return;
+
+	shape = drawing->xkb->geom->shapes + indicator_doodad->shape_ndx;
+
+	color = drawing->colors + (doodad->on ?
+				   indicator_doodad->on_color_ndx :
+				   indicator_doodad->off_color_ndx);
+
+	for (i = 0; i < 1; i++)
+		draw_outline (context, shape->outlines + i, color,
+			      doodad->angle,
+			      doodad->origin_x + indicator_doodad->left,
+			      doodad->origin_y + indicator_doodad->top);
+}
+
+static void
+draw_shape_doodad (CafekbdKeyboardDrawingRenderContext * context,
+		   CafekbdKeyboardDrawing * drawing,
+		   CafekbdKeyboardDrawingDoodad * doodad,
+		   XkbShapeDoodadRec * shape_doodad)
+{
+	XkbShapeRec *shape;
+	CdkRGBA *color;
+	gint i;
+
+	if (!drawing->xkb)
+		return;
+
+	shape = drawing->xkb->geom->shapes + shape_doodad->shape_ndx;
+	color = drawing->colors + shape_doodad->color_ndx;
+
+	/* draw the primary outline filled */
+	draw_outline (context,
+		      shape->primary ? shape->primary : shape->outlines,
+		      color, doodad->angle,
+		      doodad->origin_x + shape_doodad->left,
+		      doodad->origin_y + shape_doodad->top);
+
+	/* stroke the other outlines */
+	for (i = 0; i < shape->num_outlines; i++) {
+		if (shape->outlines + i == shape->approx ||
+		    shape->outlines + i == shape->primary)
+			continue;
+		draw_outline (context, shape->outlines + i, NULL,
+			      doodad->angle,
+			      doodad->origin_x + shape_doodad->left,
+			      doodad->origin_y + shape_doodad->top);
+	}
+}
+
+static void
+draw_doodad (CafekbdKeyboardDrawingRenderContext * context,
+	     CafekbdKeyboardDrawing * drawing,
+	     CafekbdKeyboardDrawingDoodad * doodad)
+{
+	switch (doodad->doodad->any.type) {
+	case XkbOutlineDoodad:
+	case XkbSolidDoodad:
+		draw_shape_doodad (context, drawing, doodad,
+				   &doodad->doodad->shape);
+		break;
+
+	case XkbTextDoodad:
+		draw_text_doodad (context, drawing, doodad,
+				  &doodad->doodad->text);
+		break;
+
+	case XkbIndicatorDoodad:
+		draw_indicator_doodad (context, drawing, doodad,
+				       &doodad->doodad->indicator);
+		break;
+
+	case XkbLogoDoodad:
+		/* g_print ("draw_doodad: logo: %s\n", doodad->doodad->logo.logo_name); */
+		/* XkbLogoDoodadRec is essentially a subclass of XkbShapeDoodadRec */
+		draw_shape_doodad (context, drawing, doodad,
+				   &doodad->doodad->shape);
+		break;
+	}
+}
+
+typedef struct {
+	CafekbdKeyboardDrawing *drawing;
+	CafekbdKeyboardDrawingRenderContext *context;
+} DrawKeyboardItemData;
+
+static void
+redraw_overlapping_doodads (CafekbdKeyboardDrawingRenderContext * context,
+			    CafekbdKeyboardDrawing * drawing,
+			    const CafekbdKeyboardDrawingKey * key)
+{
+	GList *list;
+	gboolean do_draw = FALSE;
+
+	for (list = drawing->keyboard_items; list; list = list->next) {
+		CafekbdKeyboardDrawingItem *item = list->data;
+
+		if (do_draw
+		    && item->type ==
+		    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD)
+			draw_doodad (context, drawing,
+				     (CafekbdKeyboardDrawingDoodad *) item);
+
+		if (list->data == key)
+			do_draw = TRUE;
+	}
+}
+
+static void
+draw_keyboard_item (CafekbdKeyboardDrawingItem * item,
+		    DrawKeyboardItemData * data)
+{
+	CafekbdKeyboardDrawing *drawing = data->drawing;
+	CafekbdKeyboardDrawingRenderContext *context = data->context;
+
+	if (!drawing->xkb)
+		return;
+
+	switch (item->type) {
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_INVALID:
+		break;
+
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY:
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA:
+		draw_key (context, drawing,
+			  (CafekbdKeyboardDrawingKey *) item);
+		break;
+
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD:
+		draw_doodad (context, drawing,
+			     (CafekbdKeyboardDrawingDoodad *) item);
+		break;
+	}
+}
+
+static void
+draw_keyboard_to_context (CafekbdKeyboardDrawingRenderContext * context,
+			  CafekbdKeyboardDrawing * drawing)
+{
+	DrawKeyboardItemData data = { drawing, context };
+#ifdef KBDRAW_DEBUG
+	printf ("mods: %d\n", drawing->mods);
+#endif
+	g_list_foreach (drawing->keyboard_items,
+			(GFunc) draw_keyboard_item, &data);
+}
+
+static gboolean
+create_cairo (CafekbdKeyboardDrawing * drawing)
+{
+	CtkStyleContext *style_context = NULL;
+	CtkStateFlags state;
+	CdkRGBA dark_color;
+
+	if (drawing == NULL)
+		return FALSE;
+	if (drawing->surface == NULL)
+		return FALSE;
+
+	drawing->renderContext->cr =
+	    cairo_create (drawing->surface);
+
+	style_context = ctk_widget_get_style_context (CTK_WIDGET (drawing));
+	state = ctk_style_context_get_state (style_context);
+
+	ctk_style_context_get_background_color (style_context, state,
+	                                        &dark_color);
+	/* make dark background by making regular background darker */
+	dark_color.red *= 0.7;
+	dark_color.green *= 0.7;
+	dark_color.blue *= 0.7;
+
+	drawing->renderContext->dark_color = dark_color;
+
+	return TRUE;
+}
+
+static void
+destroy_cairo (CafekbdKeyboardDrawing * drawing)
+{
+	cairo_destroy (drawing->renderContext->cr);
+	drawing->renderContext->cr = NULL;
+}
+
+static void
+draw_keyboard (CafekbdKeyboardDrawing * drawing)
+{
+        CtkStyleContext *context =
+	    ctk_widget_get_style_context (CTK_WIDGET (drawing));
+	CtkStateFlags state = ctk_style_context_get_state (context);
+	CdkRGBA color;
+	CtkAllocation allocation;
+
+	if (!drawing->xkb)
+		return;
+
+	ctk_widget_get_allocation (CTK_WIDGET (drawing), &allocation);
+
+	drawing->surface =
+	    cdk_window_create_similar_surface (ctk_widget_get_window
+					       (CTK_WIDGET (drawing)),
+					       CAIRO_CONTENT_COLOR,
+					       allocation.width,
+					       allocation.height);
+
+	if (create_cairo (drawing)) {
+		/* blank background */
+		ctk_style_context_save (context);
+		ctk_style_context_add_class (context, CTK_STYLE_CLASS_VIEW);
+		ctk_style_context_get_background_color (context, state, &color);
+		ctk_style_context_restore (context);
+		cdk_cairo_set_source_rgba (drawing->renderContext->cr, &color);
+		cairo_paint (drawing->renderContext->cr);
+
+		draw_keyboard_to_context (drawing->renderContext, drawing);
+		destroy_cairo (drawing);
+	}
+}
+
+static void
+alloc_render_context (CafekbdKeyboardDrawing * drawing)
+{
+	CafekbdKeyboardDrawingRenderContext *context =
+	    drawing->renderContext =
+	    g_new0 (CafekbdKeyboardDrawingRenderContext, 1);
+
+	PangoContext *pangoContext =
+	    ctk_widget_get_pango_context (CTK_WIDGET (drawing));
+
+	CtkStyleContext *style_context =
+	    ctk_widget_get_style_context (CTK_WIDGET (drawing));
+	PangoFontDescription *fd = NULL;
+
+	ctk_style_context_get (style_context,
+	                       ctk_style_context_get_state (style_context),
+	                       CTK_STYLE_PROPERTY_FONT, &fd, NULL);
+
+	context->layout = pango_layout_new (pangoContext);
+	pango_layout_set_ellipsize (context->layout, PANGO_ELLIPSIZE_END);
+
+	context->font_desc = pango_font_description_copy (fd);
+	context->angle = 0;
+	context->scale_numerator = 1;
+	context->scale_denominator = 1;
+}
+
+static void
+free_render_context (CafekbdKeyboardDrawing * drawing)
+{
+	CafekbdKeyboardDrawingRenderContext *context = drawing->renderContext;
+	g_object_unref (G_OBJECT (context->layout));
+	pango_font_description_free (context->font_desc);
+
+	g_free (drawing->renderContext);
+	drawing->renderContext = NULL;
+}
+
+static gboolean
+draw (CtkWidget              *widget G_GNUC_UNUSED,
+      cairo_t                *cr,
+      CafekbdKeyboardDrawing *drawing)
+{
+	if (!drawing->xkb)
+		return FALSE;
+
+	if (drawing->surface == NULL)
+		return FALSE;
+
+	cairo_set_source_surface (cr, drawing->surface, 0, 0);
+	cairo_paint (cr);
+
+	return FALSE;
+}
+
+static gboolean
+idle_redraw (gpointer user_data)
+{
+	CafekbdKeyboardDrawing *drawing = user_data;
+
+	drawing->idle_redraw = 0;
+	draw_keyboard (drawing);
+	ctk_widget_queue_draw (CTK_WIDGET (drawing));
+	return FALSE;
+}
+
+static gboolean
+context_setup_scaling (CafekbdKeyboardDrawingRenderContext * context,
+		       CafekbdKeyboardDrawing * drawing,
+		       gdouble width, gdouble height,
+		       gdouble dpi_x, gdouble dpi_y)
+{
+	if (!drawing->xkb)
+		return FALSE;
+
+	if (drawing->xkb->geom->width_mm <= 0
+	    || drawing->xkb->geom->height_mm <= 0) {
+		g_critical
+		    ("keyboard geometry reports width or height as zero!");
+		return FALSE;
+	}
+
+	if (width * drawing->xkb->geom->height_mm <
+	    height * drawing->xkb->geom->width_mm) {
+		context->scale_numerator = width;
+		context->scale_denominator = drawing->xkb->geom->width_mm;
+	} else {
+		context->scale_numerator = height;
+		context->scale_denominator = drawing->xkb->geom->height_mm;
+	}
+
+	pango_font_description_set_size (context->font_desc,
+					 72 * KEY_FONT_SIZE * dpi_x *
+					 context->scale_numerator /
+					 context->scale_denominator);
+	pango_layout_set_spacing (context->layout,
+				  -160 * dpi_y * context->scale_numerator /
+				  context->scale_denominator);
+	pango_layout_set_font_description (context->layout,
+					   context->font_desc);
+
+	return TRUE;
+}
+
+static void
+size_allocate (CtkWidget              *widget G_GNUC_UNUSED,
+	       CtkAllocation          *allocation,
+	       CafekbdKeyboardDrawing *drawing)
+{
+	CafekbdKeyboardDrawingRenderContext *context = drawing->renderContext;
+
+	if (drawing->surface) {
+		cairo_surface_destroy (drawing->surface);
+		drawing->surface = NULL;
+	}
+
+	if (!context_setup_scaling (context, drawing,
+				    allocation->width, allocation->height,
+				    50, 50))
+		return;
+
+	if (!drawing->idle_redraw)
+		drawing->idle_redraw = g_idle_add (idle_redraw, drawing);
+}
+
+static gint
+key_event (CtkWidget              *widget G_GNUC_UNUSED,
+	   CdkEventKey            *event,
+	   CafekbdKeyboardDrawing *drawing)
+{
+	CafekbdKeyboardDrawingKey *key;
+	if (!drawing->xkb)
+		return FALSE;
+
+	key = drawing->keys + event->hardware_keycode;
+
+	if (event->hardware_keycode > drawing->xkb->max_key_code ||
+	    event->hardware_keycode < drawing->xkb->min_key_code ||
+	    key->xkbkey == NULL) {
+		g_signal_emit (drawing,
+			       cafekbd_keyboard_drawing_signals[BAD_KEYCODE],
+			       0, event->hardware_keycode);
+		return TRUE;
+	}
+
+	if ((event->type == CDK_KEY_PRESS && key->pressed) ||
+	    (event->type == CDK_KEY_RELEASE && !key->pressed))
+		return TRUE;
+	/* otherwise this event changes the state we believed we had before */
+
+	key->pressed = (event->type == CDK_KEY_PRESS);
+
+	if (create_cairo (drawing)) {
+		draw_key (drawing->renderContext, drawing, key);
+		redraw_overlapping_doodads (drawing->renderContext,
+					    drawing, key);
+		destroy_cairo (drawing);
+	}
+
+	invalidate_key_region (drawing, key);
+	return TRUE;
+}
+
+static gint
+button_press_event (CtkWidget              *widget,
+		    CdkEventButton         *event G_GNUC_UNUSED,
+		    CafekbdKeyboardDrawing *drawing)<--- Parameter 'drawing' can be declared as pointer to const
+{
+	if (!drawing->xkb)
+		return FALSE;
+
+	ctk_widget_grab_focus (widget);
+	return FALSE;
+}
+
+static gboolean
+unpress_keys (CafekbdKeyboardDrawing * drawing)
+{
+	gint i;
+
+	drawing->timeout = 0;
+
+	if (!drawing->xkb)
+		return FALSE;
+
+	if (create_cairo (drawing)) {
+		for (i = drawing->xkb->min_key_code;
+		     i <= drawing->xkb->max_key_code; i++)
+			if (drawing->keys[i].pressed) {
+				drawing->keys[i].pressed = FALSE;
+				draw_key (drawing->renderContext, drawing,
+					  drawing->keys + i);
+				invalidate_key_region (drawing,
+						       drawing->keys + i);
+			}
+		destroy_cairo (drawing);
+	}
+
+	return FALSE;
+}
+
+static gint
+focus_event (CtkWidget              *widget G_GNUC_UNUSED,
+	     CdkEventFocus          *event,<--- Parameter 'event' can be declared as pointer to const
+	     CafekbdKeyboardDrawing *drawing)
+{
+	if (event->in && drawing->timeout > 0) {
+		g_source_remove (drawing->timeout);
+		drawing->timeout = 0;
+	} else if (drawing->timeout == 0)
+		drawing->timeout =
+		    g_timeout_add (120, (GSourceFunc) unpress_keys,
+				   drawing);
+
+	return FALSE;
+}
+
+static gint
+compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a,<--- Parameter 'a' can be declared as pointer to const
+				  CafekbdKeyboardDrawingItem * b)<--- Parameter 'b' can be declared as pointer to const
+{
+	if (a->priority > b->priority)
+		return 1;
+	else if (a->priority < b->priority)
+		return -1;
+	else
+		return 0;
+}
+
+static void
+init_indicator_doodad (CafekbdKeyboardDrawing * drawing,
+		       XkbDoodadRec * xkbdoodad,
+		       CafekbdKeyboardDrawingDoodad * doodad)
+{
+	if (!drawing->xkb)
+		return;
+
+	if (xkbdoodad->any.type == XkbIndicatorDoodad) {
+		gint index;
+		Atom iname = 0;
+		Atom sname = xkbdoodad->indicator.name;
+		unsigned long phys_indicators =
+		    drawing->xkb->indicators->phys_indicators;
+		Atom *pind = drawing->xkb->names->indicators;<--- Variable 'pind' can be declared as pointer to const
+
+#ifdef KBDRAW_DEBUG
+		printf ("Looking for %d[%s]\n",
+			(int) sname, XGetAtomName (drawing->display,
+						   sname));
+#endif
+
+		for (index = 0; index < XkbNumIndicators; index++) {
+			iname = *pind++;
+			/* name matches and it is real */
+			if (iname == sname
+			    && (phys_indicators & (1 << index)))
+				break;
+			if (iname == 0)
+				break;
+		}
+		if (iname == 0)
+			g_warning ("Could not find indicator %d [%s]\n",
+				   (int) sname,
+				   XGetAtomName (drawing->display, sname));
+		else {
+#ifdef KBDRAW_DEBUG
+			printf ("Found in xkbdesc as %d\n", index);
+#endif
+			drawing->physical_indicators[index] = doodad;
+			/* Trying to obtain the real state, but if fail - just assume OFF */
+			if (!XkbGetNamedIndicator
+			    (drawing->display, sname, NULL, &doodad->on,
+			     NULL, NULL))
+				doodad->on = 0;
+		}
+	}
+}
+
+static void
+init_keys_and_doodads (CafekbdKeyboardDrawing * drawing)
+{
+	gint i, j, k;
+	gint x, y;
+
+	if (!drawing->xkb)
+		return;
+
+	for (i = 0; i < drawing->xkb->geom->num_doodads; i++) {
+		XkbDoodadRec *xkbdoodad = drawing->xkb->geom->doodads + i;
+		CafekbdKeyboardDrawingDoodad *doodad =
+		    g_new (CafekbdKeyboardDrawingDoodad, 1);
+
+		doodad->type = CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD;
+		doodad->origin_x = 0;
+		doodad->origin_y = 0;
+		doodad->angle = 0;
+		doodad->priority = xkbdoodad->any.priority * 256 * 256;
+		doodad->doodad = xkbdoodad;
+
+		init_indicator_doodad (drawing, xkbdoodad, doodad);
+
+		drawing->keyboard_items =
+		    g_list_append (drawing->keyboard_items, doodad);
+	}
+
+	for (i = 0; i < drawing->xkb->geom->num_sections; i++) {
+		XkbSectionRec *section = drawing->xkb->geom->sections + i;
+		guint priority;
+
+#ifdef KBDRAW_DEBUG
+		printf ("initing section %d containing %d rows\n", i,
+			section->num_rows);
+#endif
+		x = section->left;
+		y = section->top;
+		priority = section->priority * 256 * 256;
+
+		for (j = 0; j < section->num_rows; j++) {
+			XkbRowRec *row = section->rows + j;
+
+#ifdef KBDRAW_DEBUG
+			printf ("  initing row %d\n", j);
+#endif
+			x = section->left + row->left;
+			y = section->top + row->top;
+
+			for (k = 0; k < row->num_keys; k++) {
+				XkbKeyRec *xkbkey = row->keys + k;
+				CafekbdKeyboardDrawingKey *key;
+				XkbShapeRec *shape =
+				    drawing->xkb->geom->shapes +
+				    xkbkey->shape_ndx;
+				guint keycode = find_keycode (drawing,
+							      xkbkey->
+							      name.name);
+
+				if (keycode == INVALID_KEYCODE)
+					continue;
+#ifdef KBDRAW_DEBUG
+				printf
+				    ("    initing key %d, shape: %p(%p + %d), code: %u\n",
+				     k, shape, drawing->xkb->geom->shapes,
+				     xkbkey->shape_ndx, keycode);
+#endif
+				if (row->vertical)
+					y += xkbkey->gap;
+				else
+					x += xkbkey->gap;
+
+				if (keycode >= drawing->xkb->min_key_code
+				    && keycode <=
+				    drawing->xkb->max_key_code) {
+					key = drawing->keys + keycode;
+					if (key->type ==
+					    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_INVALID)
+					{
+						key->type =
+						    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY;
+					} else {
+						/* duplicate key for the same keycode,
+						   already defined as CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY */
+						key =
+						    g_new0
+						    (CafekbdKeyboardDrawingKey,
+						     1);
+						key->type =
+						    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA;
+					}
+				} else {
+					g_warning
+					    ("key %4.4s: keycode = %u; not in range %d..%d\n",
+					     xkbkey->name.name, keycode,
+					     drawing->xkb->min_key_code,
+					     drawing->xkb->max_key_code);
+
+					key =
+					    g_new0 (CafekbdKeyboardDrawingKey,
+						    1);
+					key->type =
+					    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA;
+				}
+
+				key->xkbkey = xkbkey;
+				key->angle = section->angle;
+				rotate_coordinate (section->left,
+						   section->top, x, y,
+						   section->angle,
+						   &key->origin_x,
+						   &key->origin_y);
+				key->priority = priority;
+				key->keycode = keycode;
+
+				drawing->keyboard_items =
+				    g_list_append (drawing->keyboard_items,
+						   key);
+
+				if (row->vertical)
+					y += shape->bounds.y2;
+				else
+					x += shape->bounds.x2;
+
+				priority++;
+			}
+		}
+
+		for (j = 0; j < section->num_doodads; j++) {
+			XkbDoodadRec *xkbdoodad = section->doodads + j;
+			CafekbdKeyboardDrawingDoodad *doodad =
+			    g_new (CafekbdKeyboardDrawingDoodad, 1);
+
+			doodad->type =
+			    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD;
+			doodad->origin_x = x;
+			doodad->origin_y = y;
+			doodad->angle = section->angle;
+			doodad->priority =
+			    priority + xkbdoodad->any.priority;
+			doodad->doodad = xkbdoodad;
+
+			init_indicator_doodad (drawing, xkbdoodad, doodad);
+
+			drawing->keyboard_items =
+			    g_list_append (drawing->keyboard_items,
+					   doodad);
+		}
+	}
+
+	drawing->keyboard_items = g_list_sort (drawing->keyboard_items,
+					       (GCompareFunc)
+					       compare_keyboard_item_priorities);<--- You might need to cast the function pointer here<--- You might need to cast the function pointer here
+}
+
+static void
+init_colors (CafekbdKeyboardDrawing * drawing)
+{
+	gboolean result;
+	gint i;
+
+	if (!drawing->xkb)
+		return;
+
+	drawing->colors = g_new (CdkRGBA, drawing->xkb->geom->num_colors);
+
+	for (i = 0; i < drawing->xkb->geom->num_colors; i++) {
+		result =
+		    parse_xkb_color_spec (drawing->xkb->geom->
+					  colors[i].spec,
+					  drawing->colors + i);
+
+		if (!result)
+			g_warning
+			    ("init_colors: unable to parse color %s\n",
+			     drawing->xkb->geom->colors[i].spec);
+	}
+}
+
+static void
+free_cdik (			/*colors doodads indicators keys */
+		  CafekbdKeyboardDrawing * drawing)
+{
+	GList *itemp;
+
+	if (!drawing->xkb)
+		return;
+
+	for (itemp = drawing->keyboard_items; itemp; itemp = itemp->next) {
+		CafekbdKeyboardDrawingItem *item = itemp->data;
+
+		switch (item->type) {
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_INVALID:
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY:
+			break;
+
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA:
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD:
+			g_free (item);
+			break;
+		}
+	}
+
+	g_list_free (drawing->keyboard_items);
+	drawing->keyboard_items = NULL;
+
+	g_free (drawing->keys);
+	g_free (drawing->colors);
+}
+
+static void
+alloc_cdik (CafekbdKeyboardDrawing * drawing)
+{
+	if (!drawing->xkb)
+		return;
+
+	drawing->physical_indicators_size =
+	    drawing->xkb->indicators->phys_indicators + 1;
+	drawing->physical_indicators =
+	    g_new0 (CafekbdKeyboardDrawingDoodad *,
+		    drawing->physical_indicators_size);
+	drawing->keys =
+	    g_new0 (CafekbdKeyboardDrawingKey,
+		    drawing->xkb->max_key_code + 1);
+}
+
+static void
+process_indicators_state_notify (XkbIndicatorNotifyEvent * iev,<--- Parameter 'iev' can be declared as pointer to const
+				 CafekbdKeyboardDrawing * drawing)
+{
+	/* Good question: should we track indicators when the keyboard is
+	   NOT really taken from the screen */
+	gint i;
+
+	for (i = 0; i <= drawing->xkb->indicators->phys_indicators; i++)
+		if (drawing->physical_indicators[i] != NULL
+		    && (iev->changed & 1 << i)) {
+			gint state = (iev->state & 1 << i) != FALSE;
+
+			if ((state && !drawing->physical_indicators[i]->on)
+			    || (!state
+				&& drawing->physical_indicators[i]->on)) {
+				drawing->physical_indicators[i]->on =
+				    state;
+				if (create_cairo (drawing)) {
+					draw_doodad
+					    (drawing->renderContext,
+					     drawing,
+					     drawing->physical_indicators
+					     [i]);
+					destroy_cairo (drawing);
+				}
+				invalidate_indicator_doodad_region
+				    (drawing,
+				     drawing->physical_indicators[i]);
+			}
+		}
+}
+
+static CdkFilterReturn
+xkb_state_notify_event_filter (CdkXEvent              *cdkxev,
+			       CdkEvent               *event G_GNUC_UNUSED,
+			       CafekbdKeyboardDrawing *drawing)
+{
+#define modifier_change_mask (XkbModifierStateMask | XkbModifierBaseMask | XkbModifierLatchMask | XkbModifierLockMask)
+
+	if (!drawing->xkb)
+		return CDK_FILTER_CONTINUE;
+
+	if (((XEvent *) cdkxev)->type == drawing->xkb_event_type) {
+		XkbEvent *kev = (XkbEvent *) cdkxev;
+		CtkAllocation allocation;
+		switch (kev->any.xkb_type) {
+		case XkbStateNotify:
+			if (((kev->state.changed & modifier_change_mask) &&
+			     drawing->track_modifiers)) {
+				free_cdik (drawing);
+				if (drawing->track_modifiers)
+					cafekbd_keyboard_drawing_set_mods
+					    (drawing,
+					     kev->state.compat_state);
+				drawing->keys =
+				    g_new0 (CafekbdKeyboardDrawingKey,
+					    drawing->xkb->max_key_code +
+					    1);
+
+				ctk_widget_get_allocation (CTK_WIDGET
+							   (drawing),
+							   &allocation);
+				size_allocate (CTK_WIDGET (drawing),
+					       &allocation, drawing);
+
+				init_keys_and_doodads (drawing);
+				init_colors (drawing);
+			}
+			break;
+
+		case XkbIndicatorStateNotify:
+			{
+				process_indicators_state_notify (&
+								 ((XkbEvent
+								   *)
+								  cdkxev)->indicators,
+drawing);
+			}
+			break;
+
+		case XkbIndicatorMapNotify:
+		case XkbControlsNotify:
+		case XkbNamesNotify:
+		case XkbNewKeyboardNotify:
+			{
+				XkbStateRec state;
+				memset (&state, 0, sizeof (state));
+				XkbGetState (drawing->display,
+					     XkbUseCoreKbd, &state);
+				if (drawing->track_modifiers)
+					cafekbd_keyboard_drawing_set_mods
+					    (drawing, state.compat_state);
+				if (drawing->track_config)
+					cafekbd_keyboard_drawing_set_keyboard
+					    (drawing, NULL);
+			}
+			break;
+		}
+	}
+
+	return CDK_FILTER_CONTINUE;
+}
+
+static void
+destroy (CafekbdKeyboardDrawing * drawing)
+{
+	free_render_context (drawing);
+	cdk_window_remove_filter (NULL, (CdkFilterFunc)
+				  xkb_state_notify_event_filter, drawing);
+	if (drawing->timeout > 0) {
+		g_source_remove (drawing->timeout);
+		drawing->timeout = 0;
+	}
+	if (drawing->idle_redraw > 0) {
+		g_source_remove (drawing->idle_redraw);
+		drawing->idle_redraw = 0;
+	}
+
+	if (drawing->surface != NULL) {
+		cairo_surface_destroy (drawing->surface);
+	}
+}
+
+static void
+style_changed (CafekbdKeyboardDrawing * drawing)
+{
+	pango_layout_context_changed (drawing->renderContext->layout);
+}
+
+static void
+cafekbd_keyboard_drawing_init (CafekbdKeyboardDrawing * drawing)
+{
+	gint opcode = 0, error = 0, major = 1, minor = 0;
+	gint mask;
+
+	drawing->display = CDK_DISPLAY_XDISPLAY(cdk_display_get_default());
+
+	printf ("dpy: %p\n", (void *) drawing->display);
+
+	if (!XkbQueryExtension
+	    (drawing->display, &opcode, &drawing->xkb_event_type, &error,
+	     &major, &minor))
+		g_critical
+		    ("XkbQueryExtension failed! Stuff probably won't work.");
+
+	printf ("evt/error/major/minor: %d/%d/%d/%d\n",
+		drawing->xkb_event_type, error, major, minor);
+
+	/* XXX: this stuff probably doesn't matter.. also, cdk_screen_get_default can fail */
+	if (ctk_widget_has_screen (CTK_WIDGET (drawing)))
+		drawing->screen_num =
+		    cdk_x11_screen_get_screen_number (ctk_widget_get_screen
+					   (CTK_WIDGET (drawing)));
+	else
+		drawing->screen_num =
+		    cdk_x11_screen_get_screen_number (cdk_screen_get_default ());
+
+	drawing->surface = NULL;
+	alloc_render_context (drawing);
+
+	drawing->keyboard_items = NULL;
+	drawing->colors = NULL;
+
+	drawing->track_modifiers = 0;
+	drawing->track_config = 0;
+
+	/* XXX: XkbClientMapMask | XkbIndicatorMapMask | XkbNamesMask | XkbGeometryMask */
+	drawing->xkb = XkbGetKeyboard (drawing->display,
+				       XkbGBN_GeometryMask |
+				       XkbGBN_KeyNamesMask |
+				       XkbGBN_OtherNamesMask |
+				       XkbGBN_SymbolsMask |
+				       XkbGBN_IndicatorMapMask,
+				       XkbUseCoreKbd);
+	if (drawing->xkb) {
+		XkbGetNames (drawing->display, XkbAllNamesMask, drawing->xkb);
+		XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+				       XkbIndicatorStateNotify,
+				       drawing->xkb->indicators->phys_indicators,
+				       drawing->xkb->indicators->phys_indicators);
+	}
+
+	drawing->l3mod = XkbKeysymToModifiers (drawing->display,
+					       CDK_KEY_ISO_Level3_Shift);
+
+	drawing->xkbOnDisplay = TRUE;
+
+	alloc_cdik (drawing);
+
+	mask =
+	    (XkbStateNotifyMask | XkbNamesNotifyMask |
+	     XkbControlsNotifyMask | XkbIndicatorMapNotifyMask |
+	     XkbNewKeyboardNotifyMask);
+	XkbSelectEvents (drawing->display, XkbUseCoreKbd, mask, mask);
+
+	mask = XkbGroupStateMask | XkbModifierStateMask;
+	XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+			       XkbStateNotify, mask, mask);
+
+	mask = (XkbGroupNamesMask | XkbIndicatorNamesMask);
+	XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+			       XkbNamesNotify, mask, mask);
+	init_keys_and_doodads (drawing);
+	init_colors (drawing);
+
+	/* required to get key events */
+	ctk_widget_set_can_focus (CTK_WIDGET (drawing), TRUE);
+
+	ctk_widget_set_events (CTK_WIDGET (drawing),
+			       CDK_EXPOSURE_MASK | CDK_KEY_PRESS_MASK |
+			       CDK_KEY_RELEASE_MASK | CDK_BUTTON_PRESS_MASK
+			       | CDK_FOCUS_CHANGE_MASK);
+	g_signal_connect (G_OBJECT (drawing), "draw",
+			  G_CALLBACK (draw), drawing);
+	g_signal_connect_after (G_OBJECT (drawing), "key-press-event",
+				G_CALLBACK (key_event), drawing);
+	g_signal_connect_after (G_OBJECT (drawing), "key-release-event",
+				G_CALLBACK (key_event), drawing);
+	g_signal_connect (G_OBJECT (drawing), "button-press-event",
+			  G_CALLBACK (button_press_event), drawing);<--- You might need to cast the function pointer here
+	g_signal_connect (G_OBJECT (drawing), "focus-out-event",
+			  G_CALLBACK (focus_event), drawing);
+	g_signal_connect (G_OBJECT (drawing), "focus-in-event",
+			  G_CALLBACK (focus_event), drawing);<--- You might need to cast the function pointer here
+	g_signal_connect (G_OBJECT (drawing), "size-allocate",
+			  G_CALLBACK (size_allocate), drawing);
+	g_signal_connect (G_OBJECT (drawing), "destroy",
+			  G_CALLBACK (destroy), drawing);
+	g_signal_connect (G_OBJECT (drawing), "style-set",
+			  G_CALLBACK (style_changed), drawing);
+
+	cdk_window_add_filter (NULL, (CdkFilterFunc)
+			       xkb_state_notify_event_filter, drawing);
+}
+
+CtkWidget *
+cafekbd_keyboard_drawing_new (void)
+{
+	return
+	    CTK_WIDGET (g_object_new
+			(cafekbd_keyboard_drawing_get_type (), NULL));
+}
+
+static void
+cafekbd_keyboard_drawing_class_init (CafekbdKeyboardDrawingClass * klass)
+{
+	CtkWidgetClass *widget_class = CTK_WIDGET_CLASS (klass);
+	ctk_widget_class_set_css_name (widget_class, "cafekbd-keyboard-drawing");
+
+	klass->bad_keycode = NULL;
+
+	cafekbd_keyboard_drawing_signals[BAD_KEYCODE] =
+	    g_signal_new ("bad-keycode", cafekbd_keyboard_drawing_get_type (),
+			  G_SIGNAL_RUN_FIRST,
+			  G_STRUCT_OFFSET (CafekbdKeyboardDrawingClass,
+					   bad_keycode), NULL, NULL,
+			  cafekbd_keyboard_drawing_VOID__UINT, G_TYPE_NONE, 1,
+			  G_TYPE_UINT);
+}
+
+GType
+cafekbd_keyboard_drawing_get_type (void)
+{
+	static GType cafekbd_keyboard_drawing_type = 0;
+
+	if (!cafekbd_keyboard_drawing_type) {
+		static const GTypeInfo cafekbd_keyboard_drawing_info = {
+			sizeof (CafekbdKeyboardDrawingClass),
+			NULL,	/* base_init */
+			NULL,	/* base_finalize */
+			(GClassInitFunc) cafekbd_keyboard_drawing_class_init,
+			NULL,	/* class_finalize */
+			NULL,	/* class_data */
+			sizeof (CafekbdKeyboardDrawing),
+			0,	/* n_preallocs */
+			(GInstanceInitFunc) cafekbd_keyboard_drawing_init,
+			NULL	/* *value_table */
+		};
+
+		cafekbd_keyboard_drawing_type =
+		    g_type_register_static (CTK_TYPE_DRAWING_AREA,
+					    "CafekbdKeyboardDrawing",
+					    &cafekbd_keyboard_drawing_info,
+					    0);
+	}
+
+	return cafekbd_keyboard_drawing_type;
+}
+
+void
+cafekbd_keyboard_drawing_set_mods (CafekbdKeyboardDrawing * drawing, guint mods)
+{
+#ifdef KBDRAW_DEBUG
+	printf ("set_mods: %d\n", mods);
+#endif
+	if (mods != drawing->mods) {
+		drawing->mods = mods;
+		ctk_widget_queue_draw (CTK_WIDGET (drawing));
+	}
+}
+
+/**
+ * cafekbd_keyboard_drawing_render:
+ * @kbdrawing: keyboard layout to render
+ * @cr:        Cairo context to render to
+ * @layout:    Pango layout to use to render text
+ * @x:         left coordinate (pixels) of region to render in
+ * @y:         top coordinate (pixels) of region to render in
+ * @width:     width (pixels) of region to render in
+ * @height:    height (pixels) of region to render in
+ *
+ * Renders a keyboard layout to a cairo_t context.  @cr and @layout can be got
+ * from e.g. a CtkWidget or a CtkPrintContext.  @cr and @layout may be modified
+ * by the function but will not be unreffed.
+ *
+ * Returns: %TRUE on success, %FALSE on failure
+ */
+gboolean
+cafekbd_keyboard_drawing_render (CafekbdKeyboardDrawing * kbdrawing,
+			      cairo_t * cr,
+			      PangoLayout * layout,
+			      double x, double y,
+			      double width, double height,
+			      double dpi_x, double dpi_y)
+{
+	CtkStyleContext *style_context =
+	    ctk_widget_get_style_context (CTK_WIDGET (kbdrawing));
+	CdkRGBA dark_color;
+	PangoFontDescription *fd = NULL;
+
+	ctk_style_context_get_background_color (style_context,
+	                                        ctk_style_context_get_state (style_context),
+	                                        &dark_color);
+	/* make dark background by making regular background darker */
+	dark_color.red *= 0.7;
+	dark_color.green *= 0.7;
+	dark_color.blue *= 0.7;
+
+	ctk_style_context_get (style_context,
+	                       ctk_style_context_get_state (style_context),
+	                       CTK_STYLE_PROPERTY_FONT, &fd, NULL);
+	fd = pango_font_description_copy (fd);
+
+	CafekbdKeyboardDrawingRenderContext context = {
+		cr,
+		kbdrawing->renderContext->angle,
+		layout,
+		pango_font_description_copy (fd),
+		1, 1,
+		dark_color
+	};
+
+	if (!context_setup_scaling (&context, kbdrawing, width, height,
+	                            dpi_x, dpi_y))
+		return FALSE;
+	cairo_translate (cr, x, y);
+
+	draw_keyboard_to_context (&context, kbdrawing);
+
+	pango_font_description_free (fd);
+
+	return TRUE;
+}
+
+/**
+ * cafekbd_keyboard_drawing_set_keyboard: (skip)
+ */
+gboolean
+cafekbd_keyboard_drawing_set_keyboard (CafekbdKeyboardDrawing * drawing,
+				    XkbComponentNamesRec * names)
+{
+	CtkAllocation allocation;
+
+	free_cdik (drawing);
+	if (drawing->xkb)
+		XkbFreeKeyboard (drawing->xkb, 0, TRUE);	/* free_all = TRUE */
+	drawing->xkb = NULL;
+
+	if (names) {
+		drawing->xkb =
+		    XkbGetKeyboardByName (drawing->display, XkbUseCoreKbd,
+					  names, 0,
+					  XkbGBN_GeometryMask |
+					  XkbGBN_KeyNamesMask |
+					  XkbGBN_OtherNamesMask |
+					  XkbGBN_ClientSymbolsMask |
+					  XkbGBN_IndicatorMapMask, FALSE);
+		drawing->xkbOnDisplay = FALSE;
+	} else {
+		drawing->xkb = XkbGetKeyboard (drawing->display,
+					       XkbGBN_GeometryMask |
+					       XkbGBN_KeyNamesMask |
+					       XkbGBN_OtherNamesMask |
+					       XkbGBN_SymbolsMask |
+					       XkbGBN_IndicatorMapMask,
+					       XkbUseCoreKbd);
+		XkbGetNames (drawing->display, XkbAllNamesMask,
+			     drawing->xkb);
+		drawing->xkbOnDisplay = TRUE;
+	}
+
+	if (drawing->xkb) {
+		XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+				       XkbIndicatorStateNotify,
+				       drawing->xkb->indicators->phys_indicators,
+				       drawing->xkb->indicators->phys_indicators);
+	}
+
+	alloc_cdik (drawing);
+
+	init_keys_and_doodads (drawing);
+	init_colors (drawing);
+
+	ctk_widget_get_allocation (CTK_WIDGET (drawing), &allocation);
+	size_allocate (CTK_WIDGET (drawing), &allocation, drawing);
+	ctk_widget_queue_draw (CTK_WIDGET (drawing));
+
+	return TRUE;
+}
+
+const gchar* cafekbd_keyboard_drawing_get_keycodes(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->keycodes <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->keycodes);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_geometry(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->geometry <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->geometry);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_symbols(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->symbols <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->symbols);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_types(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->types <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->types);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_compat(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->compat <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->compat);
+	}
+}
+
+void
+cafekbd_keyboard_drawing_set_track_modifiers (CafekbdKeyboardDrawing * drawing,
+					   gboolean enable)
+{
+	if (enable) {
+		XkbStateRec state;
+		drawing->track_modifiers = 1;
+		memset (&state, 0, sizeof (state));
+		XkbGetState (drawing->display, XkbUseCoreKbd, &state);
+		cafekbd_keyboard_drawing_set_mods (drawing,
+						state.compat_state);
+	} else
+		drawing->track_modifiers = 0;
+}
+
+void
+cafekbd_keyboard_drawing_set_track_config (CafekbdKeyboardDrawing * drawing,
+					gboolean enable)
+{
+	if (enable)
+		drawing->track_config = 1;
+	else
+		drawing->track_config = 0;
+}
+
+void
+cafekbd_keyboard_drawing_set_groups_levels (CafekbdKeyboardDrawing * drawing,
+					 CafekbdKeyboardDrawingGroupLevel *
+					 groupLevels[])
+{
+#ifdef KBDRAW_DEBUG
+	printf ("set_group_levels [topLeft]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT]->level);
+	printf ("set_group_levels [topRight]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPRIGHT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPRIGHT]->level);
+	printf ("set_group_levels [bottomLeft]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT]->level);
+	printf ("set_group_levels [bottomRight]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT]->level);
+#endif
+	drawing->groupLevels = groupLevels;
+
+	ctk_widget_queue_draw (CTK_WIDGET (drawing));
+}
+
+typedef struct {
+	CafekbdKeyboardDrawing *drawing;
+	const gchar *description;
+} XkbLayoutPreviewPrintData;
+
+static void
+cafekbd_keyboard_drawing_begin_print (CtkPrintOperation         *operation,
+				      CtkPrintContext           *context G_GNUC_UNUSED,
+				      XkbLayoutPreviewPrintData *data G_GNUC_UNUSED)
+{
+	/* We always print single-page documents */
+	CtkPrintSettings *settings =
+	    ctk_print_operation_get_print_settings (operation);
+	ctk_print_operation_set_n_pages (operation, 1);
+	if (!ctk_print_settings_has_key
+	    (settings, CTK_PRINT_SETTINGS_ORIENTATION))
+		ctk_print_settings_set_orientation (settings,
+						    CTK_PAGE_ORIENTATION_LANDSCAPE);
+}
+
+static void
+cafekbd_keyboard_drawing_draw_page (CtkPrintOperation         *operation,
+				    CtkPrintContext           *context,
+				    gint                       page_nr G_GNUC_UNUSED,
+				    XkbLayoutPreviewPrintData *data)
+{
+	cairo_t *cr = ctk_print_context_get_cairo_context (context);
+	PangoLayout *layout =
+	    ctk_print_context_create_pango_layout (context);
+	PangoFontDescription *desc =
+	    pango_font_description_from_string ("sans 8");
+	gdouble width = ctk_print_context_get_width (context);
+	gdouble height = ctk_print_context_get_height (context);
+	gdouble dpi_x = ctk_print_context_get_dpi_x (context);
+	gdouble dpi_y = ctk_print_context_get_dpi_y (context);
+	gchar *header;
+
+	ctk_print_operation_set_unit (operation, CTK_UNIT_PIXEL);
+
+	header = g_strdup_printf
+	    (_("Keyboard layout \"%s\"\n"
+	       "Copyright &#169; X.Org Foundation and "
+	       "XKeyboardConfig contributors\n"
+	       "For licensing see package metadata"), data->description);
+	pango_layout_set_markup (layout, header, -1);
+	pango_layout_set_font_description (layout, desc);
+	pango_font_description_free (desc);
+	pango_layout_set_width (layout, pango_units_from_double (width));
+	pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER);
+	cairo_set_source_rgb (cr, 0, 0, 0);
+	cairo_move_to (cr, 0, 0);
+	pango_cairo_show_layout (cr, layout);
+
+	cafekbd_keyboard_drawing_render (CAFEKBD_KEYBOARD_DRAWING
+				      (data->drawing), cr, layout, 0.0,
+				      0.0, width, height, dpi_x, dpi_y);
+
+	g_object_unref (layout);
+}
+
+void
+cafekbd_keyboard_drawing_print (CafekbdKeyboardDrawing * drawing,
+			     CtkWindow * parent_window,
+			     const gchar * description)
+{
+	CtkPrintOperation *print;
+	CtkPrintOperationResult res;
+	static CtkPrintSettings *settings = NULL;
+	XkbLayoutPreviewPrintData data = { drawing, description };
+
+	print = ctk_print_operation_new ();
+
+	if (settings != NULL)
+		ctk_print_operation_set_print_settings (print, settings);
+
+	g_signal_connect (print, "begin_print",
+			  G_CALLBACK (cafekbd_keyboard_drawing_begin_print),
+			  &data);
+	g_signal_connect (print, "draw_page",
+			  G_CALLBACK (cafekbd_keyboard_drawing_draw_page),
+			  &data);
+
+	res = ctk_print_operation_run (print,
+				       CTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
+				       parent_window, NULL);
+
+	if (res == CTK_PRINT_OPERATION_RESULT_APPLY) {
+		if (settings != NULL)
+			g_object_unref (settings);
+		settings = ctk_print_operation_get_print_settings (print);
+		g_object_ref (settings);
+	}
+
+	g_object_unref (print);
+}
+
+static void
+show_layout_response (CtkWidget * dialog, gint resp)
+{
+	CdkRectangle rect;
+	CtkWidget *kbdraw;
+	const gchar *groupName;
+
+	switch (resp) {
+	case CTK_RESPONSE_CLOSE:
+		ctk_window_get_position (CTK_WINDOW (dialog), &rect.x,
+					 &rect.y);
+		ctk_window_get_size (CTK_WINDOW (dialog), &rect.width,
+				     &rect.height);
+		cafekbd_preview_save_position (&rect);
+		ctk_widget_destroy (dialog);
+		break;
+	case CTK_RESPONSE_PRINT:
+		kbdraw =
+		    CTK_WIDGET (g_object_get_data
+				(G_OBJECT (dialog), "kbdraw"));
+		groupName =
+		    (const gchar *) g_object_get_data (G_OBJECT (dialog),
+						       "groupName");
+		cafekbd_keyboard_drawing_print (CAFEKBD_KEYBOARD_DRAWING
+					     (kbdraw), CTK_WINDOW (dialog),
+					     groupName ? groupName :
+					     _("Unknown"));
+	}
+}
+
+CtkWidget *
+cafekbd_keyboard_drawing_new_dialog (gint group, gchar * group_name)
+{
+	static CafekbdKeyboardDrawingGroupLevel groupsLevels[] = { {
+								 0, 1}, {
+									 0,
+									 3},
+	{
+	 0, 0}, {
+		 0, 2}
+	};
+	static CafekbdKeyboardDrawingGroupLevel *pGroupsLevels[] = {
+		groupsLevels, groupsLevels + 1, groupsLevels + 2,
+		groupsLevels + 3
+	};
+
+	CtkBuilder *builder;
+	CtkWidget *dialog, *kbdraw;
+	XkbComponentNamesRec component_names;
+	XklConfigRec *xkl_data;
+	CdkRectangle *rect;
+	GError *error = NULL;
+	char title[128] = "";
+	XklEngine* engine = xkl_engine_get_instance(CDK_DISPLAY_XDISPLAY(cdk_display_get_default()));
+
+	builder = ctk_builder_new ();
+	ctk_builder_add_from_resource (builder,
+	                               "/org/cafe/peripherals/keyboard/show-layout.ui",
+	                               &error);
+
+	if (error) {
+		g_error ("Could not load UI: %s", error->message);
+		g_clear_error (&error);
+	}
+
+
+	dialog =
+	    CTK_WIDGET (ctk_builder_get_object
+			(builder, "gswitchit_layout_view"));
+	kbdraw = cafekbd_keyboard_drawing_new ();
+	ctk_widget_set_vexpand (kbdraw, TRUE);
+
+	snprintf (title, sizeof (title), _("Keyboard Layout \"%s\""),
+		  group_name);
+	ctk_window_set_title (CTK_WINDOW (dialog), title);
+	g_object_set_data_full (G_OBJECT (dialog), "group_name",
+				g_strdup (group_name), g_free);
+
+	cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING
+						 (kbdraw), pGroupsLevels);
+
+	xkl_data = xkl_config_rec_new ();
+	if (xkl_config_rec_get_from_server (xkl_data, engine)) {
+		int num_layouts = g_strv_length (xkl_data->layouts);
+		int num_variants = g_strv_length (xkl_data->variants);
+		if (group >= 0 && group < num_layouts
+		    && group < num_variants) {
+			char *l = g_strdup (xkl_data->layouts[group]);
+			char *v = g_strdup (xkl_data->variants[group]);
+			char **p;
+			int i;
+
+			if ((p = xkl_data->layouts) != NULL)
+				for (i = num_layouts; --i >= 0;)
+					g_free (*p++);
+
+			if ((p = xkl_data->variants) != NULL)
+				for (i = num_variants; --i >= 0;)
+					g_free (*p++);
+
+			xkl_data->layouts =
+			    g_realloc (xkl_data->layouts,
+				       sizeof (char *) * 2);
+			xkl_data->variants =
+			    g_realloc (xkl_data->variants,
+				       sizeof (char *) * 2);
+			xkl_data->layouts[0] = l;
+			xkl_data->variants[0] = v;
+			xkl_data->layouts[1] = xkl_data->variants[1] =
+			    NULL;
+		}
+
+		if (xkl_xkb_config_native_prepare(engine, xkl_data, &component_names))
+		{
+			cafekbd_keyboard_drawing_set_keyboard
+			    (CAFEKBD_KEYBOARD_DRAWING (kbdraw),
+			     &component_names);
+			xkl_xkb_config_native_cleanup (engine,
+						       &component_names);
+		}
+	}
+
+	g_object_unref (G_OBJECT (xkl_data));
+
+	g_object_set_data (G_OBJECT (dialog), "builderData", builder);
+	g_signal_connect (G_OBJECT (dialog), "response", G_CALLBACK (show_layout_response), NULL);
+
+	rect = cafekbd_preview_load_position ();
+
+	if (rect != NULL)
+	{
+		ctk_window_move (CTK_WINDOW (dialog), rect->x, rect->y);
+		ctk_window_resize (CTK_WINDOW (dialog), rect->width, rect->height);
+		g_free (rect);
+	}
+	else
+	{
+		ctk_window_resize (CTK_WINDOW (dialog), 700, 400);
+	}
+
+	ctk_window_set_resizable (CTK_WINDOW (dialog), TRUE);
+
+	ctk_container_add (CTK_CONTAINER
+			   (ctk_builder_get_object
+			    (builder, "preview_vbox")), kbdraw);
+
+	g_object_set_data (G_OBJECT (dialog), "kbdraw", kbdraw);
+
+		g_signal_connect_swapped(dialog, "destroy", G_CALLBACK(g_object_unref),  g_object_get_data(G_OBJECT(dialog), "builderData"));
+
+	ctk_widget_show_all(dialog);
+
+	return dialog;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/5.html b/2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/5.html new file mode 100644 index 0000000..a0afe30 --- /dev/null +++ b/2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/5.html @@ -0,0 +1,1978 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+#include <config.h>
+
+#include <memory.h>
+
+#include <cairo.h>
+
+#include <cdk/cdkkeysyms.h>
+#include <cdk/cdkx.h>
+#include <glib/gi18n-lib.h>
+#include <glib/gprintf.h>
+
+#include <cafekbd-status.h>
+
+#include <cafekbd-desktop-config.h>
+#include <cafekbd-indicator-config.h>
+
+typedef struct _gki_globals {
+	XklEngine *engine;
+	XklConfigRegistry *registry;
+
+	CafekbdDesktopConfig cfg;
+	CafekbdIndicatorConfig ind_cfg;
+	CafekbdKeyboardConfig kbd_cfg;
+
+	const gchar *tooltips_format;
+	gchar **full_group_names;
+	gchar **short_group_names;
+
+	gint current_width;
+	gint current_height;
+	int real_width;
+
+	GSList *icons;		/* list of GdkPixbuf */
+	GSList *widget_instances;	/* list of CafekbdStatus */
+	gulong state_changed_handler;
+	gulong config_changed_handler;
+} gki_globals;
+
+static gchar *settings_signal_names[] = {
+	"notify::ctk-theme-name",
+	"notify::ctk-key-theme-name",
+	"notify::ctk-font-name",
+	"notify::font-options",
+};
+
+struct _CafekbdStatusPrivate {
+	gdouble angle;
+	gulong settings_signal_handlers[sizeof (settings_signal_names) /
+					sizeof (settings_signal_names[0])];
+};
+
+/* one instance for ALL widgets */
+static gki_globals globals;
+
+#define ForAllIndicators() \
+	{ \
+		GSList* cur; \
+		for (cur = globals.widget_instances; cur != NULL; cur = cur->next) { \
+			CafekbdStatus * gki = (CafekbdStatus*)cur->data;
+#define NextIndicator() \
+		} \
+	}
+
+G_DEFINE_TYPE (CafekbdStatus, cafekbd_status, CTK_TYPE_STATUS_ICON)<--- There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
+static void
+cafekbd_status_global_init (void);
+static void
+cafekbd_status_global_term (void);
+static GdkPixbuf *
+cafekbd_status_prepare_drawing (CafekbdStatus * gki, int group);
+static void
+cafekbd_status_set_current_page_for_group (CafekbdStatus * gki, int group);
+static void
+cafekbd_status_set_current_page (CafekbdStatus * gki);
+static void
+cafekbd_status_global_cleanup (CafekbdStatus * gki);
+static void
+cafekbd_status_global_fill (CafekbdStatus * gki);
+static void
+cafekbd_status_set_tooltips (CafekbdStatus * gki, const char *str);
+
+void
+cafekbd_status_set_tooltips (CafekbdStatus * gki, const char *str)
+{
+	g_assert (str == NULL || g_utf8_validate (str, -1, NULL));
+
+	ctk_status_icon_set_tooltip_text (CTK_STATUS_ICON (gki), str);
+}
+
+void
+cafekbd_status_global_cleanup (CafekbdStatus *gki G_GNUC_UNUSED)
+{
+	while (globals.icons) {
+		if (globals.icons->data)
+			g_object_unref (G_OBJECT (globals.icons->data));
+		globals.icons =
+		    g_slist_delete_link (globals.icons, globals.icons);
+	}
+}
+
+void
+cafekbd_status_global_fill (CafekbdStatus * gki)
+{
+	int grp;
+	int total_groups = xkl_engine_get_num_groups (globals.engine);
+
+	for (grp = 0; grp < total_groups; grp++) {
+		GdkPixbuf *page = cafekbd_status_prepare_drawing (gki, grp);
+		globals.icons = g_slist_append (globals.icons, page);
+	}
+}
+
+static void
+cafekbd_status_activate (CafekbdStatus *gki G_GNUC_UNUSED)
+{
+	xkl_debug (150, "Mouse button pressed on applet\n");
+	cafekbd_desktop_config_lock_next_group (&globals.cfg);
+}
+
+/* hackish xref */
+extern gchar *cafekbd_indicator_extract_layout_name (int group,
+						  XklEngine * engine,
+						  CafekbdKeyboardConfig *
+						  kbd_cfg,
+						  gchar **
+						  short_group_names,
+						  gchar **
+						  full_group_names);
+
+extern gchar *cafekbd_indicator_create_label_title (int group,
+						 GHashTable **
+						 ln2cnt_map,
+						 gchar * layout_name);
+
+static void
+cafekbd_status_render_cairo (cairo_t * cr, int group)
+{
+	double r, g, b;
+	PangoFontDescription *pfd;
+	PangoContext *pcc;
+	PangoLayout *pl;
+	int lwidth, lheight;
+	gchar *layout_name, *lbl_title;
+	double screen_res;
+	cairo_font_options_t *fo;
+	static GHashTable *ln2cnt_map = NULL;
+
+	xkl_debug (160, "Rendering cairo for group %d\n", group);
+	if (globals.ind_cfg.background_color != NULL &&
+	    globals.ind_cfg.background_color[0] != 0) {
+		if (sscanf
+		    (globals.ind_cfg.background_color, "%lg %lg %lg", &r,
+		     &g, &b) == 3) {
+			cairo_set_source_rgb (cr, r, g, b);
+			cairo_rectangle (cr, 0, 0, globals.current_width,
+					 globals.current_height);
+			cairo_fill (cr);
+		}
+	}
+
+	if (globals.ind_cfg.foreground_color != NULL &&
+	    globals.ind_cfg.foreground_color[0] != 0) {
+		if (sscanf
+		    (globals.ind_cfg.foreground_color, "%lg %lg %lg", &r,
+		     &g, &b) == 3) {
+			cairo_set_source_rgb (cr, r, g, b);
+		}
+	}
+
+	pcc = pango_cairo_create_context (cr);
+
+	screen_res = cdk_screen_get_resolution (cdk_screen_get_default ());
+	if (screen_res > 0)
+		pango_cairo_context_set_resolution (pcc, screen_res);
+
+	fo = cairo_font_options_copy (cdk_screen_get_font_options
+				      (cdk_screen_get_default ()));
+	/* SUBPIXEL antialiasing gives bad results on in-memory images */
+	if (cairo_font_options_get_antialias (fo) ==
+	    CAIRO_ANTIALIAS_SUBPIXEL)
+		cairo_font_options_set_antialias (fo,
+						  CAIRO_ANTIALIAS_GRAY);
+	pango_cairo_context_set_font_options (pcc, fo);
+
+	pl = pango_layout_new (pcc);
+
+	layout_name = cafekbd_indicator_extract_layout_name (group,
+							  globals.engine,
+							  &globals.kbd_cfg,
+							  globals.short_group_names,
+							  globals.full_group_names);
+	lbl_title =
+	    cafekbd_indicator_create_label_title (group, &ln2cnt_map,
+					       layout_name);
+
+	if (group + 1 == xkl_engine_get_num_groups (globals.engine)) {
+		g_hash_table_destroy (ln2cnt_map);
+		ln2cnt_map = NULL;
+	}
+
+	pango_layout_set_text (pl, lbl_title, -1);
+
+	g_free (lbl_title);
+
+	pfd = pango_font_description_from_string (globals.ind_cfg.font_family);
+
+	pango_layout_set_font_description (pl, pfd);
+	pango_layout_get_size (pl, &lwidth, &lheight);
+
+	cairo_move_to (cr,
+		       (globals.current_width - lwidth / PANGO_SCALE) / 2,
+		       (globals.current_height -
+			lheight / PANGO_SCALE) / 2);
+
+	pango_cairo_show_layout (cr, pl);
+
+	pango_font_description_free (pfd);
+	g_object_unref (pl);
+	g_object_unref (pcc);
+	cairo_font_options_destroy (fo);
+	cairo_destroy (cr);
+
+	globals.real_width = (lwidth / PANGO_SCALE) + 4;
+	if (globals.real_width > globals.current_width)
+		globals.real_width = globals.current_width;
+	if (globals.real_width < globals.current_height)
+		globals.real_width = globals.current_height;
+}
+
+static inline guint8
+convert_color_channel (guint8 src, guint8 alpha)
+{
+	return alpha ? ((((guint) src) << 8) - src) / alpha : 0;
+}
+
+static void
+convert_bgra_to_rgba (guint8 const *src, guint8 * dst, int width,
+		      int height, int new_width)
+{
+	int xoffset = width - new_width;
+
+	/* *4 */
+	int ptr_step = xoffset << 2;
+
+	int x, y;
+
+	/* / 2 * 4 */
+	src = src + ((xoffset >> 1) << 2);
+
+	for (y = height; --y >= 0; src += ptr_step) {
+		for (x = new_width; --x >= 0;) {
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+			dst[0] = convert_color_channel (src[2], src[3]);
+			dst[1] = convert_color_channel (src[1], src[3]);
+			dst[2] = convert_color_channel (src[0], src[3]);
+			dst[3] = src[3];
+#else
+			dst[0] = convert_color_channel (src[1], src[0]);
+			dst[1] = convert_color_channel (src[2], src[0]);
+			dst[2] = convert_color_channel (src[3], src[0]);
+			dst[3] = src[0];
+#endif
+			dst += 4;
+			src += 4;
+		}
+	}
+}
+
+static GdkPixbuf *
+cafekbd_status_prepare_drawing (CafekbdStatus *gki G_GNUC_UNUSED,
+				int            group)
+{
+	GError *gerror = NULL;
+	char *image_filename;
+	GdkPixbuf *image;
+
+	if (globals.current_width == 0)
+		return NULL;
+
+	if (globals.ind_cfg.show_flags) {
+
+		image_filename =
+		    (char *) g_slist_nth_data (globals.
+					       ind_cfg.image_filenames,
+					       group);
+
+		image = gdk_pixbuf_new_from_file_at_size (image_filename,
+							  globals.current_width,
+							  globals.current_height,
+							  &gerror);
+
+		if (image == NULL) {
+			CtkWidget *dialog = ctk_message_dialog_new (NULL,
+								    CTK_DIALOG_DESTROY_WITH_PARENT,
+								    CTK_MESSAGE_ERROR,
+								    CTK_BUTTONS_OK,
+								    _
+								    ("There was an error loading an image: %s"),
+								    gerror
+								    ==
+								    NULL ?
+								    "Unknown"
+								    :
+								    gerror->message);
+			g_signal_connect (G_OBJECT (dialog), "response",
+					  G_CALLBACK (ctk_widget_destroy),
+					  NULL);
+
+			ctk_window_set_resizable (CTK_WINDOW (dialog),
+						  FALSE);
+
+			ctk_widget_show (dialog);
+			g_error_free (gerror);
+
+			return NULL;
+		}
+		xkl_debug (150,
+			   "Image %d[%s] loaded -> %p[%dx%d], alpha: %d\n",
+			   group, image_filename, image,
+			   gdk_pixbuf_get_width (image),
+			   gdk_pixbuf_get_height (image),
+			   gdk_pixbuf_get_has_alpha (image));
+
+		return image;
+	} else {
+		cairo_surface_t *cs =
+		    cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
+						globals.current_width,
+						globals.current_height);
+		unsigned char *cairo_data;
+		guchar *pixbuf_data;
+		cafekbd_status_render_cairo (cairo_create (cs), group);
+		cairo_data = cairo_image_surface_get_data (cs);
+#if 0
+		char pngfilename[20];
+		g_sprintf (pngfilename, "label%d.png", group);
+		cairo_surface_write_to_png (cs, pngfilename);
+#endif
+		pixbuf_data =
+		    g_new0 (guchar,
+			    4 * globals.real_width *
+			    globals.current_height);
+		convert_bgra_to_rgba (cairo_data, pixbuf_data,
+				      globals.current_width,
+				      globals.current_height,
+				      globals.real_width);
+
+		cairo_surface_destroy (cs);
+
+		image = gdk_pixbuf_new_from_data (pixbuf_data,
+						  GDK_COLORSPACE_RGB,
+						  TRUE,
+						  8,
+						  globals.real_width,
+						  globals.current_height,
+						  globals.real_width *
+						  4,
+						  (GdkPixbufDestroyNotify)
+						  g_free, NULL);
+		xkl_debug (150,
+			   "Image %d created -> %p[%dx%d], alpha: %d\n",
+			   group, image, gdk_pixbuf_get_width (image),
+			   gdk_pixbuf_get_height (image),
+			   gdk_pixbuf_get_has_alpha (image));
+
+		return image;
+	}
+	return NULL;
+}
+
+static void
+cafekbd_status_update_tooltips (CafekbdStatus * gki)
+{
+	XklState *state = xkl_engine_get_current_state (globals.engine);
+	gchar *buf;
+	if (state == NULL || state->group < 0
+	    || state->group >= g_strv_length (globals.full_group_names))
+		return;
+
+	buf = g_strdup_printf (globals.tooltips_format,
+			       globals.full_group_names[state->group]);
+
+	cafekbd_status_set_tooltips (gki, buf);
+	g_free (buf);
+}
+
+void
+cafekbd_status_reinit_ui (CafekbdStatus * gki)
+{
+	cafekbd_status_global_cleanup (gki);
+	cafekbd_status_global_fill (gki);
+
+	cafekbd_status_set_current_page (gki);
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+			    gchar     *key G_GNUC_UNUSED,
+			    gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "General configuration changed in settings - reiniting...\n");
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+	ForAllIndicators () {
+		cafekbd_status_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_ind_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+				gchar     *key G_GNUC_UNUSED,
+				gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "Applet configuration changed in settings - reiniting...\n");
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+
+	cafekbd_indicator_config_free_image_filenames (&globals.ind_cfg);
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	ForAllIndicators () {
+		cafekbd_status_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+static void
+cafekbd_status_load_group_names (const gchar ** layout_ids,
+			      const gchar ** variant_ids)
+{
+	if (!cafekbd_desktop_config_load_group_descriptions
+	    (&globals.cfg, globals.registry, layout_ids, variant_ids,
+	     &globals.short_group_names, &globals.full_group_names)) {
+		/* We just populate no short names (remain NULL) -
+		 * full names are going to be used anyway */
+		gint i, total_groups =
+		    xkl_engine_get_num_groups (globals.engine);
+		xkl_debug (150, "group descriptions loaded: %d!\n",
+			   total_groups);
+		globals.full_group_names =
+		    g_new0 (char *, total_groups + 1);
+
+		if (xkl_engine_get_features (globals.engine) &
+		    XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
+			gchar **lst = globals.kbd_cfg.layouts_variants;
+			for (i = 0; *lst; lst++, i++) {
+				globals.full_group_names[i] =
+				    g_strdup ((char *) *lst);
+			}
+		} else {
+			for (i = total_groups; --i >= 0;) {
+				globals.full_group_names[i] =
+				    g_strdup_printf ("Group %d", i);
+			}
+		}
+	}
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_kbd_cfg_callback (CafekbdStatus *gki G_GNUC_UNUSED)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+	xkl_debug (100,
+		   "XKB configuration changed on X Server - reiniting...\n");
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+
+	cafekbd_indicator_config_free_image_filenames (&globals.ind_cfg);
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	g_strfreev (globals.full_group_names);
+	globals.full_group_names = NULL;
+
+	if (globals.short_group_names != NULL) {
+		g_strfreev (globals.short_group_names);
+		globals.short_group_names = NULL;
+	}
+
+	cafekbd_status_load_group_names ((const gchar **) xklrec->layouts,
+				      (const gchar **) xklrec->variants);
+
+	ForAllIndicators () {
+		cafekbd_status_reinit_ui (gki);
+	} NextIndicator ();
+	g_object_unref (G_OBJECT (xklrec));
+}
+
+/* Should be called once for all applets */
+static void
+cafekbd_status_state_callback (XklEngine           *engine G_GNUC_UNUSED,
+			       XklEngineStateChange changeType,
+			       gint                 group,
+			       gboolean             restore)
+{
+	xkl_debug (150, "group is now %d, restore: %d\n", group, restore);
+
+	if (changeType == GROUP_CHANGED) {
+		ForAllIndicators () {
+			xkl_debug (200, "do repaint\n");
+			cafekbd_status_set_current_page_for_group (gki,
+								group);
+		}
+		NextIndicator ();
+	}
+}
+
+
+void
+cafekbd_status_set_current_page (CafekbdStatus * gki)
+{
+	XklState *cur_state;
+	cur_state = xkl_engine_get_current_state (globals.engine);
+	if (cur_state->group >= 0)
+		cafekbd_status_set_current_page_for_group (gki,
+							cur_state->group);
+}
+
+void
+cafekbd_status_set_current_page_for_group (CafekbdStatus * gki, int group)
+{
+	xkl_debug (200, "Revalidating for group %d\n", group);
+
+	ctk_status_icon_set_from_pixbuf (CTK_STATUS_ICON (gki),
+					 GDK_PIXBUF (g_slist_nth_data
+						     (globals.icons,
+						      group)));
+
+	cafekbd_status_update_tooltips (gki);
+}
+
+/* Should be called once for all widgets */
+static CdkFilterReturn
+cafekbd_status_filter_x_evt (CdkXEvent *xev,
+			     CdkEvent  *event G_GNUC_UNUSED)
+{
+	XEvent *xevent = (XEvent *) xev;
+
+	xkl_engine_filter_events (globals.engine, xevent);
+	switch (xevent->type) {
+	case ReparentNotify:
+		{
+			XReparentEvent *rne = (XReparentEvent *) xev;
+
+			ForAllIndicators () {
+				guint32 xid =
+				    ctk_status_icon_get_x11_window_id
+				    (CTK_STATUS_ICON (gki));
+
+				/* compare the indicator's parent window with the even window */
+				if (xid == rne->window) {
+					/* if so - make it transparent... */
+					xkl_engine_set_window_transparent
+					    (globals.engine, rne->window,
+					     TRUE);
+				}
+			}
+		NextIndicator ()}
+		break;
+	}
+	return CDK_FILTER_CONTINUE;
+}
+
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_start_listen (void)
+{
+	cdk_window_add_filter (NULL, (CdkFilterFunc)
+			       cafekbd_status_filter_x_evt, NULL);
+	cdk_window_add_filter (cdk_get_default_root_window (),
+			       (CdkFilterFunc) cafekbd_status_filter_x_evt,
+			       NULL);
+
+	xkl_engine_start_listen (globals.engine,
+				 XKLL_TRACK_KEYBOARD_STATE);
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_stop_listen (void)
+{
+	xkl_engine_stop_listen (globals.engine, XKLL_TRACK_KEYBOARD_STATE);
+
+	cdk_window_remove_filter (NULL, (CdkFilterFunc)
+				  cafekbd_status_filter_x_evt, NULL);
+	cdk_window_remove_filter
+	    (cdk_get_default_root_window (),
+	     (CdkFilterFunc) cafekbd_status_filter_x_evt, NULL);
+}
+
+static void
+cafekbd_status_size_changed (CafekbdStatus * gki, gint size)
+{
+	if (globals.current_height != size) {
+		globals.current_height = size;
+		globals.current_width = size * 3 / 2;
+		cafekbd_status_reinit_ui (gki);
+	}
+}
+
+static void
+cafekbd_status_theme_changed (CtkSettings   *settings G_GNUC_UNUSED,
+			      GParamSpec    *pspec G_GNUC_UNUSED,
+			      CafekbdStatus *gki)
+{
+	cafekbd_indicator_config_refresh_style (&globals.ind_cfg);
+	cafekbd_status_reinit_ui (gki);
+}
+
+static void
+cafekbd_status_init (CafekbdStatus * gki)
+{
+	int i;
+
+	if (!g_slist_length (globals.widget_instances))
+		cafekbd_status_global_init ();
+
+	gki->priv = g_new0 (CafekbdStatusPrivate, 1);
+
+	/* This should give NA a hint about the order */
+	/* commenting out fixes a Cdk-critical warning */
+/*	ctk_status_icon_set_name (CTK_STATUS_ICON (gki), "keyboard"); */
+
+	xkl_debug (100, "Initiating the widget startup process for %p\n",
+		   gki);
+
+	if (globals.engine == NULL) {
+		cafekbd_status_set_tooltips (gki,
+					  _("XKB initialization error"));
+		return;
+	}
+
+	cafekbd_status_set_tooltips (gki, NULL);
+
+	cafekbd_status_global_fill (gki);
+	cafekbd_status_set_current_page (gki);
+
+	/* append AFTER all initialization work is finished */
+	globals.widget_instances =
+	    g_slist_append (globals.widget_instances, gki);
+
+	g_signal_connect (gki, "size-changed",
+			  G_CALLBACK (cafekbd_status_size_changed), NULL);
+	g_signal_connect (gki, "activate",
+			  G_CALLBACK (cafekbd_status_activate), NULL);
+
+	for (i = sizeof (settings_signal_names) /
+	     sizeof (settings_signal_names[0]); --i >= 0;)
+		gki->priv->settings_signal_handlers[i] =
+		    g_signal_connect_after (ctk_settings_get_default (),
+					    settings_signal_names[i],
+					    G_CALLBACK
+					    (cafekbd_status_theme_changed),
+					    gki);
+}
+
+static void
+cafekbd_status_finalize (GObject * obj)
+{
+	int i;
+	CafekbdStatus *gki = CAFEKBD_STATUS (obj);
+	xkl_debug (100,
+		   "Starting the cafe-kbd-status widget shutdown process for %p\n",
+		   gki);
+
+	for (i = sizeof (settings_signal_names) /
+	     sizeof (settings_signal_names[0]); --i >= 0;)
+		g_signal_handler_disconnect (ctk_settings_get_default (),
+					     gki->
+					     priv->settings_signal_handlers
+					     [i]);
+
+	/* remove BEFORE all termination work is finished */
+	globals.widget_instances =
+	    g_slist_remove (globals.widget_instances, gki);
+
+	cafekbd_status_global_cleanup (gki);
+
+	xkl_debug (100,
+		   "The instance of cafe-kbd-status successfully finalized\n");
+
+	g_free (gki->priv);
+
+	G_OBJECT_CLASS (cafekbd_status_parent_class)->finalize (obj);
+
+	if (!g_slist_length (globals.widget_instances))
+		cafekbd_status_global_term ();
+}
+
+static void
+cafekbd_status_global_term (void)
+{
+	xkl_debug (100, "*** Last  CafekbdStatus instance *** \n");
+	cafekbd_status_stop_listen ();
+
+	cafekbd_desktop_config_stop_listen (&globals.cfg);
+	cafekbd_indicator_config_stop_listen (&globals.ind_cfg);
+
+	cafekbd_indicator_config_term (&globals.ind_cfg);
+	cafekbd_keyboard_config_term (&globals.kbd_cfg);
+	cafekbd_desktop_config_term (&globals.cfg);
+
+	if (g_signal_handler_is_connected
+	    (globals.engine, globals.state_changed_handler)) {
+		g_signal_handler_disconnect (globals.engine,
+					     globals.state_changed_handler);
+		globals.state_changed_handler = 0;
+	}
+	if (g_signal_handler_is_connected
+	    (globals.engine, globals.config_changed_handler)) {
+		g_signal_handler_disconnect (globals.engine,
+					     globals.config_changed_handler);
+		globals.config_changed_handler = 0;
+	}
+
+	g_object_unref (G_OBJECT (globals.registry));
+	globals.registry = NULL;
+	g_object_unref (G_OBJECT (globals.engine));
+	globals.engine = NULL;
+	xkl_debug (100, "*** Terminated globals *** \n");
+}
+
+static void
+cafekbd_status_class_init (CafekbdStatusClass * klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+	xkl_debug (100, "*** First CafekbdStatus instance *** \n");
+
+	memset (&globals, 0, sizeof (globals));
+
+	/* Initing some global vars */
+	globals.tooltips_format = "%s";
+
+	/* Initing vtable */
+	object_class->finalize = cafekbd_status_finalize;
+
+	/* Signals */
+}
+
+static void
+cafekbd_status_global_init (void)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+
+	globals.engine = xkl_engine_get_instance(CDK_DISPLAY_XDISPLAY(cdk_display_get_default()));
+
+	if (globals.engine == NULL) {
+		xkl_debug (0, "Libxklavier initialization error");
+		return;
+	}
+
+	globals.state_changed_handler =
+	    g_signal_connect (globals.engine, "X-state-changed",
+			      G_CALLBACK (cafekbd_status_state_callback),
+			      NULL);
+	globals.config_changed_handler =
+	    g_signal_connect (globals.engine, "X-config-changed",
+			      G_CALLBACK (cafekbd_status_kbd_cfg_callback),
+			      NULL);
+
+	cafekbd_desktop_config_init (&globals.cfg, globals.engine);
+	cafekbd_keyboard_config_init (&globals.kbd_cfg, globals.engine);
+	cafekbd_indicator_config_init (&globals.ind_cfg, globals.engine);
+
+	cafekbd_desktop_config_start_listen (&globals.cfg,
+					  (GCallback)
+					  cafekbd_status_cfg_changed, NULL);
+	cafekbd_indicator_config_start_listen (&globals.ind_cfg,
+					    (GCallback)
+					    cafekbd_status_ind_cfg_changed,
+					    NULL);
+
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+
+	globals.registry =
+	    xkl_config_registry_get_instance (globals.engine);
+	xkl_config_registry_load (globals.registry,
+				  globals.cfg.load_extra_items);
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	cafekbd_status_load_group_names ((const gchar **) xklrec->layouts,
+				      (const gchar **) xklrec->variants);
+	g_object_unref (G_OBJECT (xklrec));
+
+	cafekbd_status_start_listen ();
+
+	xkl_debug (100, "*** Inited globals *** \n");
+}
+
+CtkStatusIcon *
+cafekbd_status_new (void)
+{
+	return
+	    CTK_STATUS_ICON (g_object_new (cafekbd_status_get_type (), NULL));
+}
+
+/**
+ * cafekbd_status_get_xkl_engine:
+ *
+ * Returns: (transfer none): The engine shared by all CafekbdStatus objects
+ */
+XklEngine *
+cafekbd_status_get_xkl_engine ()
+{
+	return globals.engine;
+}
+
+/**
+ * cafekbd_status_get_group_names:
+ *
+ * Returns: (transfer none) (array zero-terminated=1): List of group names
+ */
+gchar **
+cafekbd_status_get_group_names ()
+{
+	return globals.full_group_names;
+}
+
+gchar *
+cafekbd_status_get_image_filename (guint group)
+{
+	if (!globals.ind_cfg.show_flags)
+		return NULL;
+	return cafekbd_indicator_config_get_images_file (&globals.ind_cfg,
+						      &globals.kbd_cfg,
+						      group);
+}
+
+void
+cafekbd_status_set_angle (CafekbdStatus * gki, gdouble angle)
+{
+	gki->priv->angle = angle;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/6.html b/2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/6.html new file mode 100644 index 0000000..5ed6ace --- /dev/null +++ b/2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/6.html @@ -0,0 +1,806 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctk/ctk.h>
+#include <stdlib.h>
+#include <string.h>
+#include <glib.h>
+#include "libcafekbd/cafekbd-keyboard-drawing.h"
+
+
+static gchar *groups = NULL;
+static gchar *levels = NULL;
+static gchar *symbols = NULL;
+static gchar *keycodes = NULL;
+static gchar *geometry = NULL;
+
+static gboolean track_config = FALSE;
+static gboolean track_modifiers = FALSE;
+static gboolean program_version = FALSE;
+
+static const GOptionEntry options[] = {
+	{"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
+	 "Keyboard groups to display, from 1-4. Up to four groups only may be "
+	 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
+	 "group1[,group2[,group3[,group4]]]"},
+	{"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
+	 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
+	 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
+	 "level1[,level2[,level3[,level4]]]"},
+	{"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
+	 "Symbols component of the keyboard. If you omit this option, it is "
+	 "obtained from the X server; that is, the keyboard that is currently "
+	 "configured is drawn. Examples: --symbols=us or "
+	 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL},
+	{"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
+	 "Keycodes component of the keyboard. If you omit this option, it is "
+	 "obtained from the X server; that is, the keyboard that is currently"
+	 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
+	 NULL},
+	{"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
+	 "Geometry xkb component. If you omit this option, it is obtained from the"
+	 " X server; that is, the keyboard that is currently configured is drawn. "
+	 "Example: --geometry=kinesis", NULL},
+	{"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
+	 "Track the current modifiers", NULL},
+	{"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
+	 "Track the server XKB configuration", NULL},
+	{"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
+	 "Show current version", NULL},
+	{NULL},
+};
+
+static gboolean
+set_groups (gchar * groups_option,
+	    CafekbdKeyboardDrawingGroupLevel * groupLevels)
+{
+	CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
+	gint cntr, g;
+
+	groupLevels[0].group =
+	    groupLevels[1].group =
+	    groupLevels[2].group = groupLevels[3].group = -1;
+
+	if (groups_option == NULL)
+		return TRUE;
+
+	for (cntr = 4; --cntr >= 0;) {
+		if (*groups_option == '\0')
+			return FALSE;
+
+		g = *groups_option - '1';
+		if (g < 0 || g >= 4)
+			return FALSE;
+
+		pgl->group = g;
+		/* printf ("group %d\n", pgl->group); */
+
+		groups_option++;
+		if (*groups_option == '\0')
+			return TRUE;
+		if (*groups_option != ',')
+			return FALSE;
+
+		groups_option++;
+		pgl++;
+	}
+
+	return TRUE;
+}
+
+static gboolean
+set_levels (gchar * levels_option,
+	    CafekbdKeyboardDrawingGroupLevel * groupLevels)
+{
+	CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
+	gint cntr, l;
+	gchar *p;
+
+	groupLevels[0].level =
+	    groupLevels[1].level =
+	    groupLevels[2].level = groupLevels[3].level = -1;
+
+	if (levels_option == NULL)
+		return TRUE;
+
+	for (cntr = 4; --cntr >= 0;) {
+		if (*levels_option == '\0')
+			return FALSE;
+
+		l = (gint) strtol (levels_option, &p, 10) - 1;
+		if (l < 0 || l >= 64)
+			return FALSE;
+
+		pgl->level = l;
+		/* printf ("level %d\n", pgl->level); */
+
+		levels_option = p;
+		if (*levels_option == '\0')
+			return TRUE;
+		if (*levels_option != ',')
+			return FALSE;
+
+		levels_option++;
+		pgl++;
+	}
+
+	return TRUE;
+}
+
+static void
+bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED,
+	     guint                   keycode)
+{
+	g_warning
+	    ("got keycode %u, which is not on your keyboard according to your configuration",
+	     keycode);
+}
+
+gint
+main (gint argc, gchar ** argv)
+{
+	CtkWidget *window;
+	CtkWidget *cafekbd_keyboard_drawing;
+	CdkScreen *screen;
+	CdkMonitor *monitor;
+	CdkRectangle rect;
+	GOptionContext *context;
+	GError *error = NULL;
+
+	CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
+	    { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
+	CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
+	    { &groupLevels[0], &groupLevels[1], &groupLevels[2],
+		&groupLevels[3]
+	};
+
+	context = g_option_context_new ("kbdraw");
+	g_option_context_add_main_entries (context, options, NULL);
+	if (!g_option_context_parse (context, &argc, &argv, &error)) {
+		g_message ("option parsing failed: %s", error->message);
+		g_option_context_free (context);
+		exit (EXIT_FAILURE);
+	}
+	g_option_context_free (context);
+
+	if (program_version) {
+		g_print ("kbdraw %s\n", VERSION);
+		exit (0);
+	}
+
+	ctk_init (&argc, &argv);
+
+	if (!set_groups (groups, groupLevels)) {
+		g_printerr ("--groups: invalid argument\n");
+		exit (1);
+	}
+
+	if (!set_levels (levels, groupLevels)) {
+		g_printerr ("--levels: invalid argument\n");
+		exit (1);
+	}
+
+	window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
+	g_signal_connect (G_OBJECT (window), "destroy",
+			  G_CALLBACK (ctk_main_quit), NULL);
+
+	screen = ctk_window_get_screen (CTK_WINDOW (window));
+	monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
+	cdk_monitor_get_geometry (monitor, &rect);
+	ctk_window_set_default_size (CTK_WINDOW (window),
+				     rect.width * 4 / 5,
+				     rect.height * 1 / 2);
+
+	ctk_widget_show (window);
+
+	cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
+	ctk_widget_show (cafekbd_keyboard_drawing);
+	ctk_container_add (CTK_CONTAINER (window), cafekbd_keyboard_drawing);
+
+	cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING
+						 (cafekbd_keyboard_drawing),
+						 pgroupLevels);
+
+	if (track_modifiers)
+		cafekbd_keyboard_drawing_set_track_modifiers
+		    (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing), TRUE);
+	if (track_config)
+		cafekbd_keyboard_drawing_set_track_config
+		    (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing), TRUE);
+	g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",
+			  G_CALLBACK (bad_keycode), NULL);
+
+	if (symbols || geometry || keycodes) {
+		XkbComponentNamesRec names;
+		gint success;
+
+		memset (&names, '\0', sizeof (names));
+
+		if (symbols)
+			names.symbols = symbols;
+		else
+			names.symbols = (gchar *)
+			    cafekbd_keyboard_drawing_get_symbols
+			    (CAFEKBD_KEYBOARD_DRAWING
+			     (cafekbd_keyboard_drawing));
+
+		if (keycodes)
+			names.keycodes = keycodes;
+		else
+			names.keycodes = (gchar *)
+			    cafekbd_keyboard_drawing_get_keycodes
+			    (CAFEKBD_KEYBOARD_DRAWING
+			     (cafekbd_keyboard_drawing));
+
+		if (geometry)
+			names.geometry = geometry;
+		else
+			names.geometry = (gchar *)
+			    cafekbd_keyboard_drawing_get_geometry
+			    (CAFEKBD_KEYBOARD_DRAWING
+			     (cafekbd_keyboard_drawing));
+
+		success =
+		    cafekbd_keyboard_drawing_set_keyboard
+		    (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing),
+		     &names);
+		if (!success) {
+			g_printerr
+			    ("\nError loading new keyboard description with components:\n\n"
+			     "  keycodes:  %s\n" "  types:     %s\n"
+			     "  compat:    %s\n" "  symbols:   %s\n"
+			     "  geometry:  %s\n\n", names.keycodes,
+			     names.types, names.compat, names.symbols,
+			     names.geometry);
+			exit (1);
+		}
+	}
+
+	ctk_widget_grab_focus (cafekbd_keyboard_drawing);
+
+	ctk_main ();
+
+	return 0;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/7.html b/2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/7.html new file mode 100644 index 0000000..8122587 --- /dev/null +++ b/2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/7.html @@ -0,0 +1,358 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+
+#include "libxklavier/xklavier.h"
+#include "libcafekbd/cafekbd-status.h"
+
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include <cdk/cdk.h>
+#include <cdk/cdkx.h>
+#include <glib/gi18n.h>
+#include <ctk/ctk.h>
+
+#include "X11/XKBlib.h"
+
+int
+main (int argc, char **argv)
+{
+	CtkStatusIcon *icon;<--- Variable 'icon' can be declared as pointer to const
+
+	bindtextdomain (GETTEXT_PACKAGE, CAFELOCALEDIR);
+	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+	textdomain (GETTEXT_PACKAGE);
+
+	ctk_init (&argc, &argv);
+
+	icon = cafekbd_status_new ();
+
+        if (icon == NULL)
+	{
+		return 1;
+	}
+
+	ctk_main ();
+
+	return 0;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/commitmsg b/2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/commitmsg new file mode 100644 index 0000000..7d9ffe9 --- /dev/null +++ b/2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/commitmsg @@ -0,0 +1 @@ +update libcafekbd.pot for 2.0.0 diff --git a/2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/index.html b/2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/index.html new file mode 100644 index 0000000..1040930 --- /dev/null +++ b/2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/index.html @@ -0,0 +1,242 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LineIdCWESeverityMessage
checkersReportinformationActive checkers: There was critical errors (use --checkers-report=<filename> to see details)
libcafekbd/cafekbd-desktop-config.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
libcafekbd/cafekbd-indicator-config.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
libcafekbd/cafekbd-indicator.c
66unknownMacroerrorThere is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
libcafekbd/cafekbd-keyboard-config.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
67knownConditionTrueFalse571styleCondition '*l1' is always true
67knownConditionTrueFalse571styleCondition '*l2' is always true
226constVariablePointer398styleVariable 'delim' can be declared as pointer to const
227knownConditionTrueFalse571styleCondition 'option!=NULL' is always true
282knownConditionTrueFalse570styleCondition 'variant==NULL' is always false
609constParameterPointer398styleParameter 'kbd_config' can be declared as pointer to const
libcafekbd/cafekbd-keyboard-drawing.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
61constParameterPointer398styleParameter 'context' can be declared as pointer to const
67constParameterPointer398styleParameter 'context' can be declared as pointer to const
625constParameterPointer398styleParameter 'context' can be declared as pointer to const
1026constVariablePointer398styleVariable 'runp' can be declared as pointer to const
1036constVariablePointer398styleVariable 'geometry' can be declared as pointer to const
1202constParameterPointer398styleParameter 'outline' can be declared as pointer to const
1397constVariablePointer398styleVariable 'shape' can be declared as pointer to const
1786constParameterCallback398styleParameter 'drawing' can be declared as pointer to const. However it seems that 'button_press_event' is a callback function, if 'drawing' is declared with const you might also need to cast function pointer(s).
1823constParameterCallback398styleParameter 'event' can be declared as pointer to const. However it seems that 'focus_event' is a callback function, if 'event' is declared with const you might also need to cast function pointer(s).
1838constParameterCallback398styleParameter 'a' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'a' is declared with const you might also need to cast function pointer(s).
1839constParameterCallback398styleParameter 'b' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'b' is declared with const you might also need to cast function pointer(s).
1863constVariablePointer398styleVariable 'pind' can be declared as pointer to const
2124constParameterPointer398styleParameter 'iev' can be declared as pointer to const
libcafekbd/cafekbd-status.c
82unknownMacroerrorThere is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
test/cafekbd-keyboard-drawing-test.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
test/cafekbd-status-test.c
42constVariablePointer398styleVariable 'icon' can be declared as pointer to const
+
+ +
+ + diff --git a/2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/output_8369334ba1f33885257d28de0c8869ad0780c640 b/2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/output_8369334ba1f33885257d28de0c8869ad0780c640 new file mode 100644 index 0000000..9fb59ef --- /dev/null +++ b/2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/output_8369334ba1f33885257d28de0c8869ad0780c640 @@ -0,0 +1,1866 @@ +Checking libcafekbd/cafekbd-desktop-config.c ... +libcafekbd/cafekbd-desktop-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +1/10 files checked 4% done +Checking libcafekbd/cafekbd-indicator-config.c ... +libcafekbd/cafekbd-indicator-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +2/10 files checked 10% done +Checking libcafekbd/cafekbd-indicator.c ... +libcafekbd/cafekbd-indicator.c:66:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdIndicator, cafekbd_indicator, CTK_TYPE_NOTEBOOK) +^ +3/10 files checked 24% done +Checking libcafekbd/cafekbd-keyboard-config.c ... +libcafekbd/cafekbd-keyboard-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-config.c:67:8: style: Condition '*l1' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:67:15: style: Condition '*l2' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:227:16: style: Condition 'option!=NULL' is always true [knownConditionTrueFalse] + (option != NULL) ? strchr (option, ':') : NULL; + ^ +libcafekbd/cafekbd-keyboard-config.c:282:18: style: Condition 'variant==NULL' is always false [knownConditionTrueFalse] + (variant == + ^ +libcafekbd/cafekbd-keyboard-config.c:226:10: style: Variable 'delim' can be declared as pointer to const [constVariablePointer] + char *delim = + ^ +libcafekbd/cafekbd-keyboard-config.c:609:65: style: Parameter 'kbd_config' can be declared as pointer to const [constParameterPointer] +cafekbd_keyboard_config_options_is_set (CafekbdKeyboardConfig * kbd_config, + ^ +4/10 files checked 36% done +Checking libcafekbd/cafekbd-keyboard-drawing.c ... +libcafekbd/cafekbd-keyboard-drawing.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-drawing.c:61:60: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_coord (CafekbdKeyboardDrawingRenderContext * context, gint n) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:67:61: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_double (CafekbdKeyboardDrawingRenderContext * context, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:625:51: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +set_markup (CafekbdKeyboardDrawingRenderContext * context, gchar *txt) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1026:11: style: Variable 'runp' can be declared as pointer to const [constVariablePointer] + GSList *runp; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1036:25: style: Variable 'geometry' can be declared as pointer to const [constVariablePointer] + PangoGlyphGeometry *geometry; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1202:39: style: Parameter 'outline' can be declared as pointer to const [constParameterPointer] +calc_origin_offset_x (XkbOutlineRec * outline) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1397:15: style: Variable 'shape' can be declared as pointer to const [constVariablePointer] + XkbShapeRec *shape; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: style: Parameter 'drawing' can be declared as pointer to const. However it seems that 'button_press_event' is a callback function, if 'drawing' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2343:18: note: You might need to cast the function pointer here + G_CALLBACK (button_press_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: note: Parameter 'drawing' can be declared as pointer to const + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: style: Parameter 'event' can be declared as pointer to const. However it seems that 'focus_event' is a callback function, if 'event' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2347:18: note: You might need to cast the function pointer here + G_CALLBACK (focus_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: note: Parameter 'event' can be declared as pointer to const + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: style: Parameter 'a' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'a' is declared with const you might also need to cast function pointer(s). [constParameterCallback] +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: note: Parameter 'a' can be declared as pointer to const +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: style: Parameter 'b' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'b' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: note: Parameter 'b' can be declared as pointer to const + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1863:9: style: Variable 'pind' can be declared as pointer to const [constVariablePointer] + Atom *pind = drawing->xkb->names->indicators; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2124:60: style: Parameter 'iev' can be declared as pointer to const [constParameterPointer] +process_indicators_state_notify (XkbIndicatorNotifyEvent * iev, + ^ +Checking libcafekbd/cafekbd-keyboard-drawing.c: KBDRAW_DEBUG... +5/10 files checked 77% done +Checking libcafekbd/cafekbd-status.c ... +libcafekbd/cafekbd-status.c:82:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdStatus, cafekbd_status, CTK_TYPE_STATUS_ICON) +^ +6/10 files checked 91% done +Checking libcafekbd/cafekbd-util.c ... +7/10 files checked 93% done +Checking test/cafekbd-indicator-test.c ... +8/10 files checked 94% done +Checking test/cafekbd-keyboard-drawing-test.c ... +test/cafekbd-keyboard-drawing-test.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +Checking test/cafekbd-keyboard-drawing-test.c: HAVE_CONFIG_H... +9/10 files checked 99% done +Checking test/cafekbd-status-test.c ... +test/cafekbd-status-test.c:42:17: style: Variable 'icon' can be declared as pointer to const [constVariablePointer] + CtkStatusIcon *icon; + ^ +10/10 files checked 100% done +nofile:0:0: information: Active checkers: There was critical errors (use --checkers-report= to see details) [checkersReport] + +/usr/bin/cafe-autogen +checking for autoreconf >= 2.53... + testing autoreconf... found 2.72 +checking for pkg-config >= 0.14.0... + testing pkg-config... found 1.8.1 +checking for cafe-common >= 0.0.1... + testing cafe-doc-common... found 2.0.0 +Checking for required M4 macros... +Checking for forbidden M4 macros... +Processing ./configure.ac +Running cafe-doc-common... +Running autoreconf... +autoreconf: export WARNINGS=no-portability +autoreconf: Entering directory '.' +autoreconf: running: autopoint --force +Copying file ABOUT-NLS +Copying file config.rpath +Copying file m4/codeset.m4 +Copying file m4/extern-inline.m4 +Copying file m4/fcntl-o.m4 +Copying file m4/gettext.m4 +Copying file m4/glibc2.m4 +Copying file m4/glibc21.m4 +Copying file m4/iconv.m4 +Copying file m4/intdiv0.m4 +Copying file m4/intl.m4 +Copying file m4/intldir.m4 +Copying file m4/intlmacosx.m4 +Copying file m4/intmax.m4 +Copying file m4/inttypes-pri.m4 +Copying file m4/inttypes_h.m4 +Copying file m4/lcmessage.m4 +Copying file m4/lib-ld.m4 +Copying file m4/lib-link.m4 +Copying file m4/lib-prefix.m4 +Copying file m4/lock.m4 +Copying file m4/longlong.m4 +Copying file m4/nls.m4 +Copying file m4/po.m4 +Copying file m4/printf-posix.m4 +Copying file m4/progtest.m4 +Copying file m4/size_max.m4 +Copying file m4/stdint_h.m4 +Copying file m4/threadlib.m4 +Copying file m4/uintmax_t.m4 +Copying file m4/visibility.m4 +Copying file m4/wchar_t.m4 +Copying file m4/wint_t.m4 +Copying file m4/xsize.m4 +Copying file po/Makefile.in.in +Copying file po/Makevars.template +Copying file po/Rules-quot +Copying file po/boldquot.sed +Copying file po/en@boldquot.header +Copying file po/en@quot.header +Copying file po/insert-header.sin +Copying file po/quot.sed +Copying file po/remove-potcdate.sin +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: configure.ac: tracing +autoreconf: running: libtoolize --copy --force +libtoolize: putting auxiliary files in '.'. +libtoolize: copying file './ltmain.sh' +libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. +libtoolize: copying file 'm4/libtool.m4' +libtoolize: copying file 'm4/ltoptions.m4' +libtoolize: copying file 'm4/ltsugar.m4' +libtoolize: copying file 'm4/ltversion.m4' +libtoolize: copying file 'm4/lt~obsolete.m4' +autoreconf: configure.ac: not using Intltool +autoreconf: configure.ac: not using Gtkdoc +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: running: /usr/bin/autoconf --force +autoreconf: running: /usr/bin/autoheader --force +autoreconf: running: automake --add-missing --copy --force-missing +configure.ac:31: installing './compile' +configure.ac:34: installing './config.guess' +configure.ac:34: installing './config.sub' +configure.ac:16: installing './install-sh' +configure.ac:16: installing './missing' +Makefile.am: installing './INSTALL' +libcafekbd/Makefile.am: installing './depcomp' +autoreconf: Leaving directory '.' +Skipping configure process. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +checking for a BSD-compatible install... /usr/bin/install -c +checking whether sleep supports fractional seconds... yes +checking filesystem timestamp resolution... 0.01 +checking whether build environment is sane... yes +checking for a race-free mkdir -p... /usr/bin/mkdir -p +checking for gawk... no +checking for mawk... mawk +checking whether make sets $(MAKE)... yes +checking whether make supports nested variables... yes +checking xargs -n works... yes +checking whether make supports the include directive... yes (GNU style) +checking for gcc... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the C compiler works... yes +checking for C compiler default output file name... a.out +checking for suffix of executables... +checking whether we are cross compiling... no +checking for suffix of object files... o +checking whether the compiler supports GNU C... yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... rm: cannot remove 'conftest.plist': Is a directory +yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... gcc3 +checking whether C compiler accepts -Werror=unknown-warning-option... no +checking whether C compiler accepts -Wall... yes +checking whether C compiler accepts -Wmissing-prototypes... yes +checking whether C compiler accepts -Wbad-function-cast... yes +checking whether C compiler accepts -Wcast-align... yes +checking whether C compiler accepts -Wextra... yes +checking whether C compiler accepts -Wformat-nonliteral... yes +checking whether C compiler accepts -Wmissing-declarations... yes +checking whether C compiler accepts -Wnested-externs... yes +checking whether C compiler accepts -Wpointer-arith... yes +checking whether C compiler accepts -Wredundant-decls... yes +checking whether C compiler accepts -Wshadow... yes +checking whether C compiler accepts -Wstrict-prototypes... yes +checking whether C compiler accepts -Wunused-macros... yes +checking whether C compiler accepts -Werror=format-security... yes +checking whether C compiler accepts -fstrict-aliasing... yes +checking flags to pass to the C compiler /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing +checking for gcc... (cached) /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the compiler supports GNU C... (cached) yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... (cached) yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... (cached) none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... (cached) yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... (cached) gcc3 +checking build system type... x86_64-pc-linux-gnu +checking host system type... x86_64-pc-linux-gnu +checking how to print strings... printf +checking for a sed that does not truncate output... /usr/bin/sed +checking for grep that handles long lines and -e... /usr/bin/grep +checking for egrep... /usr/bin/grep -E +checking for fgrep... /usr/bin/grep -F +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld +checking if the linker (/usr/bin/ld) is GNU ld... yes +checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B +checking the name lister (/usr/bin/nm -B) interface... rm: cannot remove 'conftest.plist': Is a directory +BSD nm +checking whether ln -s works... yes +checking the maximum length of command line arguments... 3145728 +checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop +checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop +checking for /usr/bin/ld option to reload object files... -r +checking for file... file +checking for objdump... objdump +checking how to recognize dependent libraries... pass_all +checking for dlltool... no +checking how to associate runtime and link libraries... printf %s\n +checking for ranlib... ranlib +checking for ar... ar +checking for archiver @FILE support... rm: cannot remove 'conftest.plist': Is a directory +@ +checking for strip... strip +checking command to parse /usr/bin/nm -B output from /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer object... rm: cannot remove 'conftest.plist': Is a directory +ok +checking for sysroot... no +checking for a working dd... /usr/bin/dd +checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1 +checking for mt... no +checking if : is a manifest tool... no +checking for stdio.h... yes +checking for stdlib.h... yes +checking for string.h... yes +checking for inttypes.h... yes +checking for stdint.h... yes +checking for strings.h... yes +checking for sys/stat.h... yes +checking for sys/types.h... yes +checking for unistd.h... yes +checking for dlfcn.h... yes +checking for objdir... .libs +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -fno-rtti -fno-exceptions... no +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to produce PIC... -fPIC -DPIC +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer PIC flag -fPIC -DPIC works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer static flag -static works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... (cached) yes +checking whether the /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes +checking whether -lc should be explicitly linked in... no +checking dynamic linker characteristics... GNU/Linux ld.so +checking how to hardcode library paths into programs... immediate +checking whether stripping libraries is possible... yes +checking if libtool supports shared libraries... yes +checking whether to build shared libraries... yes +checking whether to build static libraries... yes +checking whether NLS is requested... yes +checking for msgfmt... /usr/bin/msgfmt +checking for gmsgfmt... /usr/bin/msgfmt +checking for xgettext... /usr/bin/xgettext +checking for msgmerge... /usr/bin/msgmerge +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld -m elf_x86_64 +checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes +checking for shared library run path origin... done +checking how to run the C preprocessor... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer -E +checking for egrep -e... (cached) /usr/bin/grep -E +checking for CFPreferencesCopyAppValue... no +checking for CFLocaleCopyCurrent... no +checking for GNU gettext in libc... yes +checking whether to use NLS... yes +checking where the gettext function comes from... libc +checking for glib-compile-resources... /usr/bin/glib-compile-resources +checking for xmllint... /usr/bin/xmllint +checking for setlocale... yes +checking for pkg-config... /usr/bin/pkg-config +checking pkg-config is at least version 0.9.0... yes +checking for glib-2.0 >= 2.50.0... yes +checking for gmodule-2.0... yes +checking for gio-2.0 >= 2.25.0... yes +checking for cdk-3.0 >= 3.22.0... yes +checking for ctk+-3.0 >= 3.22.0 cdk-x11-3.0 >= 3.22.0... yes +checking for libxklavier >= 5.2... yes +checking for X... libraries , headers +checking for gethostbyname... yes +checking for connect... yes +checking for remove... yes +checking for shmat... yes +checking for IceConnectionNumber in -lICE... yes +checking for pkg-config... (cached) /usr/bin/pkg-config +checking pkg-config is at least version 0.16... yes +checking for library containing sqrt... -lm +checking for gobject-introspection... yes +checking that generated files are newer than configure... done +configure: creating ./config.status +config.status: creating Makefile +config.status: creating libcafekbd.pc +config.status: creating libcafekbdui.pc +config.status: creating po/Makefile.in +config.status: creating libcafekbd/Makefile +config.status: creating libcafekbd/org.cafe.peripherals-keyboard-xkb.gschema.xml +config.status: creating test/Makefile +config.status: creating config.h +config.status: executing depfiles commands +config.status: executing libtool commands +config.status: executing po-directories commands +config.status: creating po/POTFILES +config.status: creating po/Makefile + +Configuration: + + prefix: /usr + exec_prefix: ${prefix} + libdir: ${exec_prefix}/lib + bindir: ${exec_prefix}/bin + sbindir: ${exec_prefix}/sbin + sysconfdir: ${prefix}/etc + datadir: ${datarootdir} + source code location: . + compiler: /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer + cflags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + Warning flags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + +scan-build: Analysis run complete. +scan-build: Removing directory '/tmp/scan-build-2025-02-06-151919-11857-1' because it contains no reports. +scan-build: No bugs found. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +make all-recursive +make[1]: Entering directory '/rootdir' +Making all in po +make[2]: Entering directory '/rootdir/po' +make libcafekbd.pot-update +make[3]: Entering directory '/rootdir/po' +sed -e '/^#/d' remove-potcdate.sin > t-remove-potcdate.sed +mv t-remove-potcdate.sed remove-potcdate.sed +package_gnu=""; \ +test -n "$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L .. -maxdepth 1 -type f \ + -size -10000000c -exec grep 'GNU libcafekbd' \ + /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU libcafekbd' ../* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ +}; \ +if test "$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ +else \ + package_prefix=''; \ +fi; \ +if test -n '' || test 'https://github.com/cafe-desktop/libcafekbd' = '@'PACKAGE_BUGREPORT'@'; then \ + msgid_bugs_address=''; \ +else \ + msgid_bugs_address='https://github.com/cafe-desktop/libcafekbd'; \ +fi; \ +case `/usr/bin/xgettext --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ + *) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --package-name="${package_prefix}libcafekbd" \ + --package-version='1.25.0' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ +esac +test ! -f libcafekbd.po || { \ + if test -f ./libcafekbd.pot-header; then \ + sed -e '1,/^#$/d' < libcafekbd.po > libcafekbd.1po && \ + cat ./libcafekbd.pot-header libcafekbd.1po > libcafekbd.po; \ + rm -f libcafekbd.1po; \ + fi; \ + if test -f ./libcafekbd.pot; then \ + sed -f remove-potcdate.sed < ./libcafekbd.pot > libcafekbd.1po && \ + sed -f remove-potcdate.sed < libcafekbd.po > libcafekbd.2po && \ + if cmp libcafekbd.1po libcafekbd.2po >/dev/null 2>&1; then \ + rm -f libcafekbd.1po libcafekbd.2po libcafekbd.po; \ + else \ + rm -f libcafekbd.1po libcafekbd.2po ./libcafekbd.pot && \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ + else \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ +} +make[3]: Leaving directory '/rootdir/po' +test ! -f ./libcafekbd.pot || \ + test -z "af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo" || make af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo +make[3]: Entering directory '/rootdir/po' +/usr/bin/msgmerge --update --quiet --lang=af af.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ar ar.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=as as.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=an an.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=am am.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=az az.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ast ast.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=be be.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bg bg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn bn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bs bs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=br br.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn_IN bn_IN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca@valencia ca@valencia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca ca.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cmn cmn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=crh crh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cs cs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cv cv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=csb csb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cy cy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de de.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=da da.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=dz dz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de_CH de_CH.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=el el.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_AU en_AU.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_GB en_GB.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_CA en_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eo eo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es es.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_419 es_419.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_AR es_AR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CL es_CL.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CO es_CO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CR es_CR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_DO es_DO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_EC es_EC.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_ES es_ES.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_MX es_MX.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_NI es_NI.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PA es_PA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PE es_PE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PR es_PR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_US es_US.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_SV es_SV.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_UY es_UY.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_VE es_VE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=et et.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eu eu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fa fa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fi fi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fo fo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fil fil.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr fr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=frp frp.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr_CA fr_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fur fur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fy fy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gl gl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gd gd.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ga ga.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gu gu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=he he.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ha ha.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hi hi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hr hr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hy hy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hu hu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ia ia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=id id.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ie ie.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ig ig.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=is is.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=it it.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ja ja.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=jv jv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ka ka.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kab kab.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kk kk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=km km.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kn kn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ko ko.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ks ks.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku ku.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku_IQ ku_IQ.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ky ky.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=la la.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lb lb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=li li.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lo lo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lt lt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lv lv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mai mai.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mg mg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mi mi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ml ml.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mk mk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mn mn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mr mr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ms ms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=my my.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nah nah.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nb nb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ne ne.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nds nds.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nn nn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nl nl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nqo nqo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=oc oc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nso nso.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=om om.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=or or.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pa pa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pl pl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pms pms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ps ps.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt pt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt_BR pt_BR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ro ro.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ru ru.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=rw rw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sc sc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=si si.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sco sco.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sk sk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sl sl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sq sq.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=so so.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr@latin sr@latin.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr sr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sw sw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sv sv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ta ta.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tg tg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=te te.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=th th.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tk tk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tl tl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tr tr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ts ts.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ug ug.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tt tt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uk uk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur ur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uz uz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur_PK ur_PK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=vi vi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=wa wa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yi yi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=xh xh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yo yo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_CN zh_CN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_HK zh_HK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_TW zh_TW.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zu zu.po libcafekbd.pot +rm -f af.gmo && /usr/bin/msgfmt -c --statistics --verbose -o af.gmo af.po +af.po: 7 translated messages, 84 untranslated messages. +rm -f am.gmo && /usr/bin/msgfmt -c --statistics --verbose -o am.gmo am.po +am.po: 54 translated messages, 37 untranslated messagesrm -f ar.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ar.gmo ar.po +. +rm -f an.gmo && /usr/bin/msgfmt -c --statistics --verbose -o an.gmo an.po +ar.po: 50 translated messages, 41 untranslated messages. +rm -f as.gmo && /usr/bin/msgfmt -c --statistics --verbose -o as.gmo as.po +rm -f ast.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ast.gmo ast.po +rm -f az.gmo && /usr/bin/msgfmt -c --statistics --verbose -o az.gmo az.po +rm -f be.gmo && /usr/bin/msgfmt -c --statistics --verbose -o be.gmo be.po +ast.po: 47 translated messages, 44 untranslated messages. +as.po: 41 translated messages, 50 untranslated messages. +an.po:7: warning: header field 'Last-Translator' still has the initial default value +an.po: 0 translated messages, 91 untranslated messages. +az.po: 9 translated messages, 82 untranslated messages. +rm -f bg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bg.gmo bg.po +be.po: 46 translated messages, 45 untranslated messages. +rm -f bn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn.gmo bn.po +rm -f br.gmo && /usr/bin/msgfmt -c --statistics --verbose -o br.gmo br.po +rm -f bn_IN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn_IN.gmo bn_IN.po +bg.po: 54 translated messages, 37 untranslated messages. +bn.po: 43 translated messages, 48 untranslated messages. +rm -f bs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bs.gmo bs.po +br.po: 20 translated messages, 71 untranslated messages. +rm -f ca.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca.gmo ca.po +bn_IN.po: 41 translated messages, 50 untranslated messages. +rm -f ca@valencia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca@valencia.gmo ca@valencia.po +bs.po: 25 translated messagesrm -f cmn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cmn.gmo cmn.po +, 66 untranslated messages. +ca.po: 87 translated messages, 4 untranslated messages. +rm -f crh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o crh.gmo crh.po +ca@valencia.po: 54 translated messages, 37 untranslated messages. +cmn.po: 46 translated messages, 45 untranslated messages. +rm -f cs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cs.gmo cs.po +rm -f csb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o csb.gmo csb.po +crh.po: 11 translated messages, 80 untranslated messages. +rm -f cy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cy.gmo cy.po +rm -f da.gmo && /usr/bin/msgfmt -c --statistics --verbose -o da.gmo da.po +rm -f cv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cv.gmo cv.po +cs.po: 81 translated messages, 10 untranslated messages. +csb.po:7: warning: header field 'Last-Translator' still has the initial default value +csb.po: 0 translated messages, 91 untranslated messages. +cy.po: 26 translated messages, 65 untranslated messages. +da.po: 91 translated messages. +cv.po: 0 translated messages, 91 untranslated messages. +rm -f de.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de.gmo de.po +rm -f dz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o dz.gmo dz.po +rm -f de_CH.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de_CH.gmo de_CH.po +rm -f en_AU.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_AU.gmo en_AU.po +rm -f el.gmo && /usr/bin/msgfmt -c --statistics --verbose -o el.gmo el.po +de.po: 76 translated messages, 15 untranslated messages. +de_CH.po: 0 translated messages, 91 untranslated messages. +en_AU.po: 54 translated messages, 37 untranslated messages. +dz.po: 39 translated messages, 52 untranslated messages. +rm -f en_GB.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_GB.gmo en_GB.po +rm -f en_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_CA.gmo en_CA.po +el.po: 54 translated messages, 37 untranslated messages. +rm -f eo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eo.gmo eo.po +rm -f es.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es.gmo es.po +en_GB.po: 54 translated messages, 37 untranslated messages. +en_CA.po: 10 translated messages, 81 untranslated messages. +rm -f es_419.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_419.gmo es_419.po +eo.po: 52 translated messages, 39 untranslated messages. +rm -f es_AR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_AR.gmo es_AR.po +es.po: 89 translated messages, 2 untranslated messages. +rm -f es_CL.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CL.gmo es_CL.po +es_419.po: 0 translated messages, 91 untranslated messages. +es_AR.po: 21 translated messages, 70 untranslated messagesrm -f es_CO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CO.gmo es_CO.po +rm -f es_CR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CR.gmo es_CR.po +. +es_CL.po: 3 translated messages, 88 untranslated messages. +rm -f es_DO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_DO.gmo es_DO.po +rm -f es_EC.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_EC.gmo es_EC.po +es_CR.po: 1 translated message, 90 untranslated messages. +es_CO.po: 49 translated messages, 42 untranslated messages. +rm -f es_ES.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_ES.gmo es_ES.po +rm -f es_MX.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_MX.gmo es_MX.po +es_EC.po: 1 translated message, 90 untranslated messages. +es_DO.po: 1 translated message, 90 untranslated messages. +rm -f es_NI.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_NI.gmo es_NI.po +es_ES.po: 1 translated message, 90 untranslated messages. +es_MX.po: 1 translated message, 90 untranslated messages. +rm -f es_PA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PA.gmo es_PA.po +rm -f es_PE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PE.gmo es_PE.po +rm -f es_PR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PR.gmo es_PR.po +es_NI.po: 1 translated message, 90 untranslated messages. +rm -f es_SV.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_SV.gmo es_SV.po +es_PE.po: 1 translated message, 90 untranslated messages. +es_PA.po: 1 translated message, 90 untranslated messages. +es_PR.po: 1 translated message, 90 untranslated messages. +rm -f es_UY.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_UY.gmo es_UY.po +rm -f es_US.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_US.gmo es_US.po +rm -f es_VE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_VE.gmo es_VE.po +rm -f et.gmo && /usr/bin/msgfmt -c --statistics --verbose -o et.gmo et.po +es_US.po: 0 translated messages, 91 untranslated messages. +es_SV.po: 1 translated message, 90 untranslated messages. +es_VE.po: 1 translated message, 90 untranslated messages. +es_UY.po: 1 translated message, 90 untranslated messages. +et.po: 54 translated messages, 37 untranslated messages. +rm -f eu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eu.gmo eu.po +rm -f fa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fa.gmo fa.po +rm -f fil.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fil.gmo fil.po +rm -f fo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fo.gmo fo.po +rm -f fi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fi.gmo fi.po +eu.po: fa.po: 54 translated messages, 37 untranslated messages11 translated messages. +, 80 untranslated messagesfil.po: 0 translated messages, 91 untranslated messages. +fo.po: 0 translated messages, 91 untranslated messages. +. +fi.po: 48 translated messages, 43 untranslated messages. +rm -f fr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr.gmo fr.po +rm -f fr_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr_CA.gmo fr_CA.po +rm -f frp.gmo && /usr/bin/msgfmt -c --statistics --verbose -o frp.gmo frp.po +rm -f fur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fur.gmo fur.po +rm -f fy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fy.gmo fy.po +fr.po: 67 translated messages, 24 untranslated messages. +frp.po: 7 translated messages, 84 untranslated messages. +fur.po: 4 translated messages, 87 untranslated messages. +fr_CA.po: 3 translated messages, 88 untranslated messages. +fy.po: 4 translated messages, 87 untranslated messages. +rm -f ga.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ga.gmo ga.po +rm -f gd.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gd.gmo gd.po +rm -f gl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gl.gmo gl.po +rm -f gu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gu.gmo gu.po +rm -f ha.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ha.gmo ha.po +ga.po: 41 translated messages, 50 untranslated messages. +gd.po: 0 translated messages, 91 untranslated messages. +gu.po: 43 translated messages, 48 untranslated messages. +ha.po: 5 translated messages, 86 untranslated messages. +gl.po: 89 translated messages, 2 untranslated messages. +rm -f he.gmo && /usr/bin/msgfmt -c --statistics --verbose -o he.gmo he.po +rm -f hi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hi.gmo hi.po +rm -f hr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hr.gmo hr.po +rm -f hu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hu.gmo hu.po +rm -f hy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hy.gmo hy.po +he.po: 54 translated messages, 37 untranslated messages. +hr.po: hi.po: 54 translated messages, 37 untranslated messages. +45 translated messages, 46 untranslated messages. +hu.po: 54 translated messages, 37 untranslated messages. +hy.po: 54 translated messages, 37 untranslated messages. +rm -f ia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ia.gmo ia.po +rm -f id.gmo && /usr/bin/msgfmt -c --statistics --verbose -o id.gmo id.po +rm -f ig.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ig.gmo ig.po +rm -f ie.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ie.gmo ie.po +rm -f is.gmo && /usr/bin/msgfmt -c --statistics --verbose -o is.gmo is.po +ia.po: 3 translated messages, 88 untranslated messages. +ig.po: 5 translated messages, 86 untranslated messages. +ie.po: 45 translated messages, 46 untranslated messages. +id.po: 91 translated messages. +rm -f it.gmo && /usr/bin/msgfmt -c --statistics --verbose -o it.gmo it.po +is.po: 12 translated messages, 79 untranslated messages. +rm -f ja.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ja.gmo ja.po +rm -f jv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o jv.gmo jv.po +rm -f ka.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ka.gmo ka.po +it.po: 91 translated messages. +ja.po: 54 translated messages, 37 untranslated messages. +rm -f kab.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kab.gmo kab.po +ka.po: 37 translated messages, 54 untranslated messages. +jv.po: 2 translated messages, 89 untranslated messages. +kab.po: 4 translated messages, 87 untranslated messages. +rm -f km.gmo && /usr/bin/msgfmt -c --statistics --verbose -o km.gmo km.po +rm -f kn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kn.gmo kn.po +rm -f kk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kk.gmo kk.po +rm -f ko.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ko.gmo ko.po +rm -f ks.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ks.gmo ks.po +kn.po: ko.po: 54 translated messages, 37 untranslated messages. +kk.po: 24 translated messages, 67 untranslated messages. +43 translated messages, 48 untranslated messages. +km.po:7: warning: header field 'Last-Translator' still has the initial default value +km.po: 0 translated messages, 91 untranslated messages. +ks.po: 3 translated messages, 88 untranslated messages. +rm -f ku_IQ.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku_IQ.gmo ku_IQ.po +rm -f ku.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku.gmo ku.po +rm -f ky.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ky.gmo ky.po +rm -f la.gmo && /usr/bin/msgfmt -c --statistics --verbose -o la.gmo la.po +rm -f lb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lb.gmo lb.po +ku_IQ.po: ky.po: 26 translated messages, 65 untranslated messages. +16 translated messages, 75 untranslated messages. +ku.po: 10 translated messagesla.po: 2 translated messages, 89 untranslated messages. +, 81 untranslated messages. +lb.po:7: warning: header field 'Last-Translator' still has the initial default value +lb.po: 0 translated messages, 91 untranslated messages. +rm -f li.gmo && /usr/bin/msgfmt -c --statistics --verbose -o li.gmo li.po +rm -f lo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lo.gmo lo.po +rm -f lt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lt.gmo lt.po +rm -f lv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lv.gmo lv.po +rm -f mai.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mai.gmo mai.po +li.po:7: warning: lo.po:7: warning: header field 'Last-Translator' still has the initial default value +lo.po: 0 translated messages, 91 untranslated messages. +header field 'Last-Translator' still has the initial default value +li.po: 0 translated messages, 91 untranslated messages. +lt.po: 91 translated messages. +lv.po: 49 translated messages, 42 untranslated messages. +mai.po: 18 translated messages, 73 untranslated messages. +rm -f mg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mg.gmo mg.po +rm -f mi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mi.gmo mi.po +rm -f mk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mk.gmo mk.po +rm -f ml.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ml.gmo ml.po +rm -f mn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mn.gmo mn.po +mk.po: 39 translated messages, 52 untranslated messages. +mi.po:7: warning: header field 'Last-Translator' still has the initial default value +mg.po: 10 translated messages, 81 untranslated messages. +mi.po: 0 translated messages, 91 untranslated messages. +ml.po: 41 translated messages, 50 untranslated messages. +mn.po: 10 translated messages, 81 untranslated messages. +rm -f ms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ms.gmo ms.po +rm -f mr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mr.gmo mr.po +rm -f my.gmo && /usr/bin/msgfmt -c --statistics --verbose -o my.gmo my.po +rm -f nah.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nah.gmo nah.po +my.po:7: warning: header field 'Last-Translator' still has the initial default value +my.po: 0 translated messages, 91 untranslated messages. +ms.po: 91 translated messages. +mr.po: 47 translated messages, 44 untranslated messages. +rm -f nb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nb.gmo nb.po +nah.po: 0 translated messages, 91 untranslated messages. +rm -f nds.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nds.gmo nds.po +rm -f nn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nn.gmo nn.po +rm -f ne.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ne.gmo ne.po +rm -f nl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nl.gmo nl.po +nb.po: 91 translated messages. +nds.po: 12 translated messages, 79 untranslated messages. +nl.po: 91 translated messages. +nn.po: 40 translated messages, 51 untranslated messages. +rm -f nqo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nqo.gmo nqo.po +ne.po: 13 translated messages, 78 untranslated messages. +rm -f nso.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nso.gmo nso.po +rm -f oc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o oc.gmo oc.po +rm -f om.gmo && /usr/bin/msgfmt -c --statistics --verbose -o om.gmo om.po +rm -f or.gmo && /usr/bin/msgfmt -c --statistics --verbose -o or.gmo or.po +nqo.po: 0 translated messages, 91 untranslated messages. +nso.po: 3 translated messages, 88 untranslated messages. +oc.po: 68 translated messages, 23 untranslated messages. +om.po: 0 translated messages, 91 untranslated messages. +rm -f pa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pa.gmo pa.po +or.po: 41 translated messages, 50 untranslated messages. +rm -f pms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pms.gmo pms.po +rm -f pl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pl.gmo pl.po +rm -f ps.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ps.gmo ps.po +rm -f pt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt.gmo pt.po +pa.po: 46 translated messages, 45 untranslated messages. +pms.po: 3 translated messages, 88 untranslated messages. +ps.po: pt.po: 84 translated messages, 7 untranslated messages. +pl.po: 55 translated messages, 36 untranslated messages. +6 translated messages, 85 untranslated messages. +rm -f pt_BR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt_BR.gmo pt_BR.po +rm -f ro.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ro.gmo ro.po +rm -f ru.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ru.gmo ru.po +rm -f rw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o rw.gmo rw.po +ro.po: 54 translated messages, 37 untranslated messages. +pt_BR.po: 58 translated messages, 33 untranslated messages. +rm -f sc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sc.gmo sc.po +ru.po: 89 translated messages, 2 untranslated messages. +rw.po: 10 translated messages, 81 untranslated messages. +sc.po: 2 translated messages, 89 untranslated messages. +rm -f sco.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sco.gmo sco.po +rm -f sk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sk.gmo sk.po +rm -f sl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sl.gmo sl.po +rm -f si.gmo && /usr/bin/msgfmt -c --statistics --verbose -o si.gmo si.po +rm -f so.gmo && /usr/bin/msgfmt -c --statistics --verbose -o so.gmo so.po +sl.po: sk.po: 54 translated messages, 37 untranslated messages. +sco.po: 0 translated messages, 91 untranslated messages. +55 translated messages, 36 untranslated messages. +si.po: 36 translated messages, 55 untranslated messages. +so.po: 0 translated messages, 91 untranslated messages. +rm -f sq.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sq.gmo sq.po +rm -f sr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr.gmo sr.po +rm -f sv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sv.gmo sv.po +rm -f sr@latin.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr@latin.gmo sr@latin.po +rm -f sw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sw.gmo sw.po +sq.po: 52 translated messages, 39 untranslated messages. +sv.po: 80 translated messages, 11 untranslated messages. +sw.po: 0 translated messages, 91 untranslated messages. +sr@latin.po: 46 translated messages, 45 untranslated messages. +sr.po: 91 translated messages. +rm -f ta.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ta.gmo ta.po +rm -f te.gmo && /usr/bin/msgfmt -c --statistics --verbose -o te.gmo te.po +rm -f tg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tg.gmo tg.po +rm -f th.gmo && /usr/bin/msgfmt -c --statistics --verbose -o th.gmo th.po +rm -f tk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tk.gmo tk.po +tg.po: 0 translated messages, 91 untranslated messages. +te.po: 41 translated messages, 50 untranslated messages. +tk.po: 7 translated messages, 84 untranslated messages. +ta.po: 46 translated messages, 45 untranslated messages. +rm -f tl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tl.gmo tl.po +rm -f tr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tr.gmo tr.po +th.po: 45 translated messages, 46 untranslated messages. +tl.po: 0 translated messages, 91 untranslated messages. +rm -f ts.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ts.gmo ts.po +rm -f tt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tt.gmo tt.po +tr.po: 58 translated messages, 33 untranslated messages. +rm -f ug.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ug.gmo ug.po +rm -f uk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uk.gmo uk.po +tt.po:7: warning: header field 'Last-Translator' still has the initial default value +ts.po: 0 translated messages, 91 untranslated messages. +rm -f ur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur.gmo ur.po +tt.po: 0 translated messages, 91 untranslated messages. +ug.po: 6 translated messages, 85 untranslated messages. +uk.po: 58 translated messages, 33 untranslated messages. +ur.po: 7 translated messages, 84 untranslated messages. +rm -f ur_PK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur_PK.gmo ur_PK.po +rm -f vi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o vi.gmo vi.po +rm -f uz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uz.gmo uz.po +rm -f wa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o wa.gmo wa.po +uz.po: 26 translated messages, 65 untranslated messages. +rm -f xh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o xh.gmo xh.po +ur_PK.po:7: warning: header field 'Last-Translator' still has the initial default value +ur_PK.po: 0 translated messages, 91 untranslated messages. +vi.po: 52 translated messages, 39 untranslated messages. +wa.po: 9 translated messages, 82 untranslated messages. +xh.po: 8 translated messages, 83 untranslated messages. +rm -f yo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yo.gmo yo.po +rm -f yi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yi.gmo yi.po +rm -f zh_CN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_CN.gmo zh_CN.po +rm -f zh_HK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_HK.gmo zh_HK.po +rm -f zh_TW.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_TW.gmo zh_TW.po +yi.po:7: warning: header field 'Last-Translator' still has the initial default value +yi.po: 0 translated messages, 91 untranslated messages. +yo.po: 5 translated messages, 86 untranslated messages. +zh_CN.po: 63 translated messages, 28 untranslated messageszh_HK.po: 47 translated messages, 44 untranslated messages. +. +zh_TW.po: 91 translated messages. +rm -f zu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zu.gmo zu.po +zu.po: 3 translated messages, 88 untranslated messages. +make[3]: Leaving directory '/rootdir/po' +touch stamp-po +make[2]: Leaving directory '/rootdir/po' +Making all in libcafekbd +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml + GEN cafekbd-indicator-marshal.h + GEN cafekbd-keyboard-drawing-marshal.h +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... +INFO: Reading ./cafekbd-indicator-marshal.list... + GEN cafekbd-indicator-marshal.c + GEN cafekbd-keyboard-drawing-marshal.c +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... +INFO: Reading ./cafekbd-indicator-marshal.list... +make all-am +make[3]: Entering directory '/rootdir/libcafekbd' + CC libcafekbd_la-cafekbd-desktop-config.lo + CC libcafekbd_la-cafekbd-keyboard-config.lo + CC libcafekbd_la-cafekbd-util.lo + CC libcafekbdui_la-cafekbd-indicator-config.lo + CC libcafekbdui_la-cafekbd-indicator.lo +cafekbd-desktop-config.c: In function 'cafekbd_desktop_config_load_from_gsettings': +cafekbd-desktop-config.c:176:38: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 176 | || config->default_group >= + | ^~ +cafekbd-indicator-config.c: In function 'cafekbd_indicator_config_get_images_file': +cafekbd-indicator-config.c:152:59: warning: comparison of integer expressions of different signedness: 'guint' {aka 'unsigned int'} and 'int' [-Wsign-compare] + 152 | (g_strv_length (kbd_config->layouts_variants) > group)) { + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_extract_layout_name': +cafekbd-indicator.c:293:19: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 293 | if (group < g_strv_length (short_group_names)) { + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_prepare_drawing': +cafekbd-indicator.c:418:31: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 418 | if (group + 1 == + | ^~ +cafekbd-indicator.c: In function 'cafekbd_indicator_update_tooltips': +cafekbd-indicator.c:446:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 446 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-indicator.c:450:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 450 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-indicator.c: In function 'cafekbd_indicator_kbd_cfg_callback': +cafekbd-indicator.c:61:44: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 61 | CafekbdIndicator * gki = (CafekbdIndicator*)cur->data; + | ^~~ +cafekbd-indicator.c:561:9: note: in expansion of macro 'ForAllIndicators' + 561 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-indicator.c:539:55: note: shadowed declaration is here + 539 | cafekbd_indicator_kbd_cfg_callback (CafekbdIndicator *gki G_GNUC_UNUSED) +cafekbd-indicator.c: In function 'cafekbd_indicator_start_listen': +cafekbd-indicator.c:647:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 647 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:650:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 650 | (CdkFilterFunc) + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_stop_listen': +cafekbd-indicator.c:663:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 663 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:667:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 667 | (CdkFilterFunc) cafekbd_indicator_filter_x_evt, NULL); + | ^ + CC libcafekbdui_la-cafekbd-status.lo +cafekbd-status.c: In function 'cafekbd_status_render_cairo': +cafekbd-status.c:214:23: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 214 | if (group + 1 == xkl_engine_get_num_groups (globals.engine)) { + | ^~ +cafekbd-status.c: In function 'cafekbd_status_prepare_drawing': +cafekbd-status.c:376:51: warning: cast between incompatible function types from 'void (*)(void *)' to 'void (*)(guchar *, void *)' {aka 'void (*)(unsigned char *, void *)'} [-Wcast-function-type] + 376 | (GdkPixbufDestroyNotify) + | ^ +cafekbd-status.c: In function 'cafekbd_status_update_tooltips': +cafekbd-status.c:395:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 395 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-status.c:399:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 399 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-status.c: In function 'cafekbd_status_kbd_cfg_callback': +cafekbd-status.c:77:41: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 77 | CafekbdStatus * gki = (CafekbdStatus*)cur->data; + | ^~~ +cafekbd-status.c:508:9: note: in expansion of macro 'ForAllIndicators' + 508 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-status.c:484:49: note: shadowed declaration is here + 484 | cafekbd_status_kbd_cfg_callback (CafekbdStatus *gki G_GNUC_UNUSED) +cafekbd-status.c: In function 'cafekbd_status_start_listen': +cafekbd-status.c:594:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 594 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:597:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 597 | (CdkFilterFunc) cafekbd_status_filter_x_evt, + | ^ +cafekbd-status.c: In function 'cafekbd_status_stop_listen': +cafekbd-status.c:610:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 610 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:614:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 614 | (CdkFilterFunc) cafekbd_status_filter_x_evt, NULL); + | ^ + CC libcafekbdui_la-cafekbd-indicator-marshal.lo +cafekbd-indicator-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ + CC libcafekbdui_la-cafekbd-keyboard-drawing-marshal.lo +cafekbd-keyboard-drawing-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + CC libcafekbdui_la-cafekbd-keyboard-drawing.lo +cafekbd-keyboard-drawing.c: In function 'draw_polygon': +cafekbd-keyboard-drawing.c:322:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 322 | for (i = 0; i < num_points; i++) { + | ^ +cafekbd-keyboard-drawing.c: In function 'process_indicators_state_notify': +cafekbd-keyboard-drawing.c:2131:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'long unsigned int' [-Wsign-compare] + 2131 | for (i = 0; i <= drawing->xkb->indicators->phys_indicators; i++) + | ^~ +cafekbd-keyboard-drawing.c: In function 'cafekbd_keyboard_drawing_get_type': +cafekbd-keyboard-drawing.c:2394:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawingClass *)' {aka 'void (*)(struct _CafekbdKeyboardDrawingClass *)'} to 'void (*)(void *, void *)' [-Wcast-function-type] + 2394 | (GClassInitFunc) cafekbd_keyboard_drawing_class_init, + | ^ +cafekbd-keyboard-drawing.c:2399:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawing *)' {aka 'void (*)(struct _CafekbdKeyboardDrawing *)'} to 'void (*)(GTypeInstance *, void *)' {aka 'void (*)(struct _GTypeInstance *, void *)'} [-Wcast-function-type] + 2399 | (GInstanceInitFunc) cafekbd_keyboard_drawing_init, + | ^ + GEN org.cafe.peripherals-keyboard-xkb.gschema.valid + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:114:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 114 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbd.la + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspect6j1o7dr2/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspect6j1o7dr2/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspect6j1o7dr2/Cafekbd-1.0.c:239:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 239 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspect6j1o7dr2/Cafekbd-1.0.c:246:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 246 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspect6j1o7dr2/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +5 warnings generated. + GICOMP Cafekbd-1.0.gir +make[3]: Leaving directory '/rootdir/libcafekbd' +make[2]: Leaving directory '/rootdir/libcafekbd' +Making all in test +make[2]: Entering directory '/rootdir/test' + CC cafekbd_indicator_test-cafekbd-indicator-test.o + CC cafekbd_keyboard_drawing_test-cafekbd-keyboard-drawing-test.o + CC cafekbd_status_test-cafekbd-status-test.o + CCLD cafekbd-status-test +cafekbd-keyboard-drawing-test.c:187:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 187 | g_print ("kbdraw %s\n", VERSION); + | ^~~~~~~ +cafekbd-keyboard-drawing-test.c:194:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 194 | g_printerr ("--groups: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:199:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 199 | g_printerr ("--levels: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:225:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 225 | cafekbd_keyboard_drawing_set_track_modifiers + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:228:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 228 | cafekbd_keyboard_drawing_set_track_config + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:248:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 248 | names.keycodes = keycodes; + | ^~~~~~~~ +cafekbd-keyboard-drawing-test.c:256:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 256 | names.geometry = geometry; + | ^~~~~~~~ +7 warnings generated. + CCLD cafekbd-keyboard-drawing-test + CCLD cafekbd-indicator-test +make[2]: Leaving directory '/rootdir/test' +make[2]: Entering directory '/rootdir' +make[2]: Leaving directory '/rootdir' +make[1]: Leaving directory '/rootdir' +scan-build: Analysis run complete. +scan-build: 11 bugs found. +scan-build: Run 'scan-view /rootdir/html-report/2025-02-06-151929-14522-1' to examine bug reports. +Making check in po +make[1]: Entering directory '/rootdir/po' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/po' +Making check in libcafekbd +make[1]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +make check-am +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:113:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 113 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspect95zf21cw/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspect95zf21cw/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspect95zf21cw/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +3 warnings generated. + GICOMP Cafekbd-1.0.gir +make[2]: Leaving directory '/rootdir/libcafekbd' +make[1]: Leaving directory '/rootdir/libcafekbd' +Making check in test +make[1]: Entering directory '/rootdir/test' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/test' +make[1]: Entering directory '/rootdir' +make[1]: Leaving directory '/rootdir' + Listing... 0% Listing... 0% Listing... 0% adduser/testing,now 3.137 all [installed,automatic] +advaita-icon-theme/unknown,now 3.25.0-1 all [installed,automatic] +apt/testing,now 2.9.26 amd64 [installed,automatic] +aptitude-common/testing,now 0.8.13-6.1 all [installed,automatic] +aptitude/testing,now 0.8.13-6.1 amd64 [installed] +at-spi2-common/testing,now 2.55.0.1-1 all [installed,automatic] +at-spi2-core/testing,now 2.55.0.1-1 amd64 [installed,automatic] +autoconf-archive/testing,now 20220903-3 all [installed] +autoconf/testing,now 2.72-3 all [installed,automatic] +automake/testing,now 1:1.17-3 all [installed,automatic] +autopoint/testing,now 0.23.1-1 all [installed] +autotools-dev/testing,now 20220109.1 all [installed,automatic] +base-files/testing,now 13.6 amd64 [installed,automatic] +base-passwd/testing,now 3.6.6 amd64 [installed,automatic] +bash/testing,now 5.2.37-1 amd64 [installed,automatic] +binfmt-support/testing,now 2.2.2-7 amd64 [installed,automatic] +binutils-common/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils-gold-x86-64-linux-gnu/testing,now 2.44-1 amd64 [installed,automatic] +binutils-gold/testing,now 2.44-1 amd64 [installed,automatic] +binutils-x86-64-linux-gnu/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +bsdutils/testing,now 1:2.40.4-2 amd64 [installed,automatic] +build-essential/testing,now 12.12 amd64 [installed,automatic] +bzip2-doc/testing,now 1.0.8-6 all [installed,automatic] +bzip2/testing,now 1.0.8-6 amd64 [installed,automatic] +ca-certificates/testing,now 20241223 all [installed,automatic] +clang-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools/testing,now 1:19.0-63 amd64 [installed] +clang/testing,now 1:19.0-63 amd64 [installed] +coreutils/testing,now 9.5-1+b1 amd64 [installed,automatic] +cpp-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-14/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cpp/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cppcheck/testing,now 2.16.0-1 amd64 [installed] +ctk-update-icon-cache/unknown,now 3.25.6-1 amd64 [installed,automatic] +dash/testing,now 0.5.12-12 amd64 [installed,automatic] +dbus-bin/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-daemon/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-session-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-system-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-user-session/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus/testing,now 1.16.0-1 amd64 [installed,automatic] +dconf-gsettings-backend/testing,now 0.40.0-5 amd64 [installed,automatic] +dconf-service/testing,now 0.40.0-5 amd64 [installed,automatic] +debconf/testing,now 1.5.89 all [installed,automatic] +debian-archive-keyring/testing,now 2023.4 all [installed,automatic] +debianutils/testing,now 5.21 amd64 [installed,automatic] +diffutils/testing,now 1:3.10-2 amd64 [installed,automatic] +dirmngr/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +dmsetup/testing,now 2:1.02.201-1 amd64 [installed,automatic] +dpkg-dev/testing,now 1.22.14 all [installed,automatic] +dpkg/testing,now 1.22.14 amd64 [installed,automatic] +e2fsprogs/testing,now 1.47.2-1 amd64 [installed,automatic] +expect/testing,now 5.45.4-3+b1 amd64 [installed] +fakeroot/testing,now 1.37-1 amd64 [installed,automatic] +file/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +findutils/testing,now 4.10.0-3 amd64 [installed,automatic] +fontconfig-config/testing,now 2.15.0-2 amd64 [installed,automatic] +fontconfig/testing,now 2.15.0-2 amd64 [installed,automatic] +fonts-dejavu-core/testing,now 2.37-8 all [installed,automatic] +fonts-dejavu-mono/testing,now 2.37-8 all [installed,automatic] +g++-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-14/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +g++/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc-14-base/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gettext-base/testing,now 0.23.1-1 amd64 [installed,automatic] +gettext/testing,now 0.23.1-1 amd64 [installed] +gir1.2-atk-1.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-atspi-2.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-ctk-3.0/unknown,now 3.25.6-1 amd64 [installed] +gir1.2-freedesktop-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-freedesktop/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-gdkpixbuf-2.0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +gir1.2-girepository-2.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-girepository-2.0/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-glib-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-glib-2.0/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-harfbuzz-0.0/testing,now 10.2.0-1 amd64 [installed,automatic] +gir1.2-pango-1.0/testing,now 1.56.1-1 amd64 [installed,automatic] +gir1.2-xkl-1.0/testing,now 5.4-5+b2 amd64 [installed,automatic] +girepository-tools/testing,now 2.82.4-2 amd64 [installed,automatic] +git-man/testing,now 1:2.47.2-0.1 all [installed,automatic] +git/testing,now 1:2.47.2-0.1 amd64 [installed] +gnupg-l10n/testing,now 2.2.46-1 all [installed,automatic] +gnupg-utils/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gnupg/testing,now 2.2.46-1 all [installed,automatic] +gobject-introspection-bin/testing,now 1.82.0-4 amd64 [installed,automatic] +gobject-introspection/testing,now 1.82.0-4 amd64 [installed] +gpg-agent/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg-wks-client/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgconf/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgsm/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgv/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +grep/testing,now 3.11-4 amd64 [installed,automatic] +gsettings-desktop-schemas/testing,now 47.1-1 all [installed,automatic] +gzip/testing,now 1.13-1 amd64 [installed,automatic] +hicolor-icon-theme/testing,now 0.18-2 all [installed,automatic] +hostname/testing,now 3.25 amd64 [installed,automatic] +icu-devtools/testing,now 72.1-6 amd64 [installed,automatic] +init-system-helpers/testing,now 1.68 all [installed,automatic] +krb5-locales/testing,now 1.21.3-4 all [installed,automatic] +less/testing,now 643-1 amd64 [installed,automatic] +lib32gcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +lib32stdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libacl1/testing,now 2.3.2-2+b1 amd64 [installed,automatic] +libalgorithm-diff-perl/testing,now 1.201-1 all [installed,automatic] +libalgorithm-diff-xs-perl/testing,now 0.04-8+b4 amd64 [installed,automatic] +libalgorithm-merge-perl/testing,now 0.08-5 all [installed,automatic] +libapparmor1/testing,now 3.1.7-1+b3 amd64 [installed,automatic] +libapt-pkg6.0t64/testing,now 2.9.26 amd64 [installed,automatic] +libasan8/testing,now 14.2.0-12 amd64 [installed,automatic] +libassuan9/testing,now 3.0.1-2 amd64 [installed,automatic] +libatk-bridge2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk-bridge2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatomic1/testing,now 14.2.0-12 amd64 [installed,automatic] +libatspi2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatspi2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libattr1/testing,now 1:2.5.2-2 amd64 [installed,automatic] +libaudit-common/testing,now 1:4.0.2-2 all [installed,automatic] +libaudit1/testing,now 1:4.0.2-2+b1 amd64 [installed,automatic] +libavahi-client3/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common-data/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common3/testing,now 0.8-16 amd64 [installed,automatic] +libbinutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libblkid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libblkid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libboost-iostreams1.83.0/testing,now 1.83.0-4 amd64 [installed,automatic] +libbrotli-dev/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbrotli1/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbsd0/testing,now 0.12.2-2 amd64 [installed,automatic] +libbz2-1.0/testing,now 1.0.8-6 amd64 [installed,automatic] +libbz2-dev/testing,now 1.0.8-6 amd64 [installed,automatic] +libc-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc-dev-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc6-dev/testing,now 2.40-6 amd64 [installed,automatic] +libc6-i386/testing,now 2.40-6 amd64 [installed,automatic] +libc6/testing,now 2.40-6 amd64 [installed,automatic] +libcairo-gobject2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo-script-interpreter2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2-dev/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcap-dev/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcap-ng0/testing,now 0.8.5-4 amd64 [installed,automatic] +libcap2/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcbor0.10/testing,now 0.10.2-2 amd64 [installed,automatic] +libcc1-0/testing,now 14.2.0-12 amd64 [installed,automatic] +libclang-common-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-cpp19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-rt-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang1-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libcolord2/testing,now 1.4.7-1+b2 amd64 [installed,automatic] +libcom-err2/testing,now 1.47.2-1 amd64 [installed,automatic] +libcrypt-dev/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcrypt1/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcryptsetup12/testing,now 2:2.7.5-1 amd64 [installed,automatic] +libctf-nobfd0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctf0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctk-3-0/unknown,now 3.25.6-1 amd64 [installed] +libctk-3-bin/unknown,now 3.25.6-1 amd64 [installed,automatic] +libctk-3-common/unknown,now 3.25.6-1 all [installed] +libctk-3-dev/unknown,now 3.25.6-1 amd64 [installed] +libcups2t64/testing,now 2.4.10-2+b1 amd64 [installed,automatic] +libcurl3t64-gnutls/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcurl4t64/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcwidget4/testing,now 0.5.18-6+b2 amd64 [installed,automatic] +libdatrie-dev/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdatrie1/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdav1d7/testing,now 1.5.1-1 amd64 [installed,automatic] +libdb5.3t64/testing,now 5.3.28+dfsg2-9 amd64 [installed,automatic] +libdbus-1-3/testing,now 1.16.0-1 amd64 [installed,automatic] +libdbus-1-dev/testing,now 1.16.0-1 amd64 [installed,automatic] +libdconf1/testing,now 0.40.0-5 amd64 [installed,automatic] +libdebconfclient0/testing,now 0.277 amd64 [installed,automatic] +libdeflate-dev/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdeflate0/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdevmapper1.02.1/testing,now 2:1.02.201-1 amd64 [installed,automatic] +libdpkg-perl/testing,now 1.22.14 all [installed,automatic] +libdrm-amdgpu1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-common/testing,now 2.4.123-1 all [installed,automatic] +libdrm-intel1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-radeon1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm2/testing,now 2.4.123-1 amd64 [installed,automatic] +libedit2/testing,now 3.1-20250104-1 amd64 [installed,automatic] +libegl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libegl-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1-mesa-dev/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libelf1t64/testing,now 0.192-4 amd64 [installed,automatic] +libepoxy-dev/testing,now 1.5.10-2 amd64 [installed,automatic] +libepoxy0/testing,now 1.5.10-2 amd64 [installed,automatic] +liberror-perl/testing,now 0.17029-2 all [installed,automatic] +libexpat1-dev/testing,now 2.6.4-1 amd64 [installed,automatic] +libexpat1/testing,now 2.6.4-1 amd64 [installed,automatic] +libext2fs2t64/testing,now 1.47.2-1 amd64 [installed,automatic] +libfakeroot/testing,now 1.37-1 amd64 [installed,automatic] +libffi-dev/testing,now 3.4.6-1 amd64 [installed,automatic] +libffi8/testing,now 3.4.6-1 amd64 [installed,automatic] +libfido2-1/testing,now 1.15.0-1+b1 amd64 [installed,automatic] +libfile-fcntllock-perl/testing,now 0.22-4+b4 amd64 [installed,automatic] +libfontconfig-dev/testing,now 2.15.0-2 amd64 [installed,automatic] +libfontconfig1/testing,now 2.15.0-2 amd64 [installed,automatic] +libfreetype-dev/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfreetype6/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfribidi-dev/testing,now 1.0.16-1 amd64 [installed,automatic] +libfribidi0/testing,now 1.0.16-1 amd64 [installed,automatic] +libgbm1/testing,now 24.2.8-1 amd64 [installed,automatic] +libgc1/testing,now 1:8.2.8-1 amd64 [installed,automatic] +libgcc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcrypt20/testing,now 1.11.0-7 amd64 [installed,automatic] +libgdbm-compat4t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdbm6t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-dev/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-bin/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-common/testing,now 2.42.12+dfsg-2 all [installed,automatic] +libgio-2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libgio-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository-1.0-1/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-1.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-2.0-0/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository1.0-dev/testing,now 1.82.0-4 amd64 [installed] +libgl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgl1-mesa-dri/testing,now 24.2.8-1 amd64 [installed,automatic] +libgl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglapi-mesa/testing,now 24.2.8-1 amd64 [installed,automatic] +libgles-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles2/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglib2.0-0t64/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-data/testing,now 2.82.4-2 all [installed,automatic] +libglib2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-dev/testing,now 2.82.4-2 amd64 [installed] +libglvnd-core-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libglx0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgmp10/testing,now 2:6.3.0+dfsg-3 amd64 [installed,automatic] +libgnutls30t64/testing,now 3.8.8-2 amd64 [installed,automatic] +libgomp1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgpg-error-l10n/testing,now 1.51-3 all [installed,automatic] +libgpg-error0/testing,now 1.51-3 amd64 [installed,automatic] +libgpm2/testing,now 1.20.7-11+b2 amd64 [installed,automatic] +libgprofng0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libgraphite2-3/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgraphite2-dev/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgssapi-krb5-2/testing,now 1.21.3-4 amd64 [installed,automatic] +libharfbuzz-cairo0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-dev/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-gobject0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-icu0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-subset0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz0b/testing,now 10.2.0-1 amd64 [installed,automatic] +libhogweed6t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libhwasan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libice-dev/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libice6/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libicu-dev/testing,now 72.1-6 amd64 [installed,automatic] +libicu72/testing,now 72.1-6 amd64 [installed,automatic] +libidn2-0/testing,now 2.3.7-2+b1 amd64 [installed,automatic] +libisl23/testing,now 0.27-1 amd64 [installed,automatic] +libitm1/testing,now 14.2.0-12 amd64 [installed,automatic] +libjansson4/testing,now 2.14-2+b3 amd64 [installed,automatic] +libjbig-dev/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjbig0/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjpeg-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjson-c5/testing,now 0.18+ds-1 amd64 [installed,automatic] +libk5crypto3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkeyutils1/testing,now 1.6.3-4 amd64 [installed,automatic] +libkmod2/testing,now 33+20240816-2 amd64 [installed,automatic] +libkrb5-3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkrb5support0/testing,now 1.21.3-4 amd64 [installed,automatic] +libksba8/testing,now 1.6.7-2+b1 amd64 [installed,automatic] +liblcms2-2/testing,now 2.16-2 amd64 [installed,automatic] +libldap-common/testing,now 2.6.9+dfsg-1 all [installed,automatic] +libldap2/testing,now 2.6.9+dfsg-1 amd64 [installed,automatic] +liblerc-dev/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +liblerc4/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +libllvm19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +liblocale-gettext-perl/testing,now 1.07-7+b1 amd64 [installed,automatic] +liblsan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libltdl-dev/testing,now 2.5.4-3 amd64 [installed,automatic] +libltdl7/testing,now 2.5.4-3 amd64 [installed,automatic] +liblz4-1/testing,now 1.10.0-3 amd64 [installed,automatic] +liblzma-dev/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzma5/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzo2-2/testing,now 2.10-3+b1 amd64 [installed,automatic] +libmagic-mgc/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmagic1t64/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmd0/testing,now 1.1.0-2+b1 amd64 [installed,automatic] +libmount-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libmount1/testing,now 2.40.4-2 amd64 [installed,automatic] +libmpc3/testing,now 1.3.1-1+b3 amd64 [installed,automatic] +libmpfr6/testing,now 4.2.1-1+b2 amd64 [installed,automatic] +libncurses-dev/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncurses6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncursesw6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libnettle8t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libnghttp2-14/testing,now 1.64.0-1 amd64 [installed,automatic] +libnghttp3-9/testing,now 1.6.0-2 amd64 [installed,automatic] +libngtcp2-16/testing,now 1.9.1-1 amd64 [installed,automatic] +libngtcp2-crypto-gnutls8/testing,now 1.9.1-1 amd64 [installed,automatic] +libnpth0t64/testing,now 1.8-2 amd64 [installed,automatic] +libnss-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libobjc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libobjc4/testing,now 14.2.0-12 amd64 [installed,automatic] +libopengl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libopengl0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libp11-kit0/testing,now 0.25.5-3 amd64 [installed,automatic] +libpam-modules-bin/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-modules/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-runtime/testing,now 1.7.0-2 all [installed,automatic] +libpam-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libpam0g/testing,now 1.7.0-2 amd64 [installed,automatic] +libpango-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpango1.0-dev/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangocairo-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoft2-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoxft-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpciaccess0/testing,now 0.17-3+b3 amd64 [installed,automatic] +libpcre2-16-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-32-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-8-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-dev/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-posix3/testing,now 10.44-5 amd64 [installed,automatic] +libperl5.40/testing,now 5.40.0-8 amd64 [installed,automatic] +libpfm4/testing,now 4.13.0+git83-g91970fe-1 amd64 [installed,automatic] +libpipeline1/testing,now 1.5.8-1 amd64 [installed,automatic] +libpixman-1-0/testing,now 0.44.0-3 amd64 [installed,automatic] +libpixman-1-dev/testing,now 0.44.0-3 amd64 [installed,automatic] +libpkgconf3/testing,now 1.8.1-4 amd64 [installed,automatic] +libpng-dev/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng-tools/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng16-16t64/testing,now 1.6.44-3 amd64 [installed,automatic] +libproc2-0/testing,now 2:4.0.4-7 amd64 [installed,automatic] +libpsl5t64/testing,now 0.21.2-1.1+b1 amd64 [installed,automatic] +libpython3-stdlib/testing,now 3.13.1-2 amd64 [installed,automatic] +libpython3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libpython3.13-stdlib/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libquadmath0/testing,now 14.2.0-12 amd64 [installed,automatic] +libreadline8t64/testing,now 8.2-6 amd64 [installed,automatic] +librsvg2-2/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librsvg2-common/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librtmp1/testing,now 2.4+20151223.gitfa8646d.1-2+b5 amd64 [installed,automatic] +libsasl2-2/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules-db/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libseccomp2/testing,now 2.5.5-2 amd64 [installed,automatic] +libselinux1-dev/testing,now 3.7-3.1 amd64 [installed,automatic] +libselinux1/testing,now 3.7-3.1 amd64 [installed,automatic] +libsemanage-common/testing,now 3.7-2.1 all [installed,automatic] +libsemanage2/testing,now 3.7-2.1 amd64 [installed,automatic] +libsensors-config/testing,now 1:3.6.0-10 all [installed,automatic] +libsensors5/testing,now 1:3.6.0-10+b1 amd64 [installed,automatic] +libsepol-dev/testing,now 3.7-1 amd64 [installed,automatic] +libsepol2/testing,now 3.7-1 amd64 [installed,automatic] +libsframe1/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libsharpyuv-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsharpyuv0/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsigc++-2.0-0v5/testing,now 2.12.1-3 amd64 [installed,automatic] +libsm-dev/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsm6/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsmartcols1/testing,now 2.40.4-2 amd64 [installed,automatic] +libsqlite3-0/testing,now 3.46.1-1 amd64 [installed,automatic] +libss2/testing,now 1.47.2-1 amd64 [installed,automatic] +libssh2-1t64/testing,now 1.11.1-1 amd64 [installed,automatic] +libssl3t64/testing,now 3.4.0-2 amd64 [installed,automatic] +libstdc++-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libstdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libsysprof-capture-4-dev/testing,now 47.2-1 amd64 [installed,automatic] +libsystemd-dev/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd-shared/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd0/testing,now 257.2-3 amd64 [installed,automatic] +libtasn1-6/testing,now 4.19.0-3+b3 amd64 [installed,automatic] +libtcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +libthai-data/testing,now 0.1.29-2 all [installed,automatic] +libthai-dev/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libthai0/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libtiff-dev/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiff6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiffxx6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtinfo6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libtinyxml2-10/testing,now 10.0.0+dfsg-2+b2 amd64 [installed,automatic] +libtool/testing,now 2.5.4-3 all [installed] +libtsan2/testing,now 14.2.0-12 amd64 [installed,automatic] +libubsan1/testing,now 14.2.0-12 amd64 [installed,automatic] +libudev1/testing,now 257.2-3 amd64 [installed,automatic] +libunistring5/testing,now 1.3-1 amd64 [installed,automatic] +libuuid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libvulkan1/testing,now 1.4.304.0-1 amd64 [installed,automatic] +libwayland-bin/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-client0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-cursor0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-dev/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-egl1/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-server0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwebp-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebp7/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdecoder3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdemux2/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpmux3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libx11-6/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-data/testing,now 2:1.8.10-2 all [installed,automatic] +libx11-dev/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-xcb1/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libxapian30/testing,now 1.4.25-2 amd64 [installed,automatic] +libxau-dev/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxau6/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxaw7/testing,now 2:1.0.16-1 amd64 [installed,automatic] +libxcb-dri2-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-dri3-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-glx0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-present0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-randr0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-sync1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-xfixes0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcomposite-dev/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcomposite1/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcursor-dev/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxcursor1/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxdamage-dev/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdamage1/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdmcp-dev/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxdmcp6/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxext-dev/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxext6/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxfixes-dev/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxfixes3/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxft-dev/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxft2/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxi-dev/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxi6/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxinerama-dev/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxinerama1/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxkbcommon-dev/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbcommon0/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbfile1/testing,now 1:1.1.0-1+b4 amd64 [installed,automatic] +libxklavier-dev/testing,now 5.4-5+b2 amd64 [installed] +libxklavier16/testing,now 5.4-5+b2 amd64 [installed,automatic] +libxml2-dev/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxml2-utils/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed] +libxml2/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxmu6/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxmuu1/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxpm4/testing,now 1:3.5.17-1+b3 amd64 [installed,automatic] +libxrandr-dev/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrandr2/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrender-dev/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxrender1/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxshmfence1/testing,now 1.3-1+b3 amd64 [installed,automatic] +libxt6t64/testing,now 1:1.2.1-1.2+b2 amd64 [installed,automatic] +libxtst-dev/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxtst6/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxxf86vm1/testing,now 1:1.1.4-1+b4 amd64 [installed,automatic] +libxxhash0/testing,now 0.8.2-2+b2 amd64 [installed,automatic] +libyaml-0-2/testing,now 0.2.5-2 amd64 [installed,automatic] +libz3-4/testing,now 4.13.3-1 amd64 [installed,automatic] +libz3-dev/testing,now 4.13.3-1 amd64 [installed,automatic] +libzstd-dev/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +libzstd1/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +linux-libc-dev/testing,now 6.12.11-1 all [installed,automatic] +linux-sysctl-defaults/testing,now 4.11 all [installed,automatic] +llvm-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-linker-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-runtime/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +login.defs/testing,now 1:4.16.0-7 all [installed,automatic] +login/testing,now 1:4.16.0-2+really2.40.4-2 amd64 [installed,automatic] +logsave/testing,now 1.47.2-1 amd64 [installed,automatic] +m4/testing,now 1.4.19-5 amd64 [installed,automatic] +make/testing,now 4.4.1-1 amd64 [installed] +manpages-dev/testing,now 6.9.1-1 all [installed,automatic] +manpages/testing,now 6.9.1-1 all [installed,automatic] +mawk/testing,now 1.3.4.20240905-1 amd64 [installed,automatic] +media-types/testing,now 10.1.0 all [installed,automatic] +mesa-libgallium/testing,now 24.2.8-1 amd64 [installed,automatic] +mesa-vulkan-drivers/testing,now 24.2.8-1 amd64 [installed,automatic] +mount/testing,now 2.40.4-2 amd64 [installed,automatic] +native-architecture/testing,now 0.2.5 all [installed,automatic] +ncurses-base/testing,now 6.5-2 all [installed,automatic] +ncurses-bin/testing,now 6.5-2+b1 amd64 [installed,automatic] +netbase/testing,now 6.4 all [installed,automatic] +openssh-client/testing,now 1:9.9p1-3 amd64 [installed,automatic] +openssl-provider-legacy/testing,now 3.4.0-2 amd64 [installed,automatic] +openssl/testing,now 3.4.0-2 amd64 [installed,automatic] +pango1.0-tools/testing,now 1.56.1-1 amd64 [installed,automatic] +passwd/testing,now 1:4.16.0-7 amd64 [installed,automatic] +patch/testing,now 2.7.6-7 amd64 [installed,automatic] +perl-base/testing,now 5.40.0-8 amd64 [installed,automatic] +perl-modules-5.40/testing,now 5.40.0-8 all [installed,automatic] +perl/testing,now 5.40.0-8 amd64 [installed,automatic] +pinentry-curses/testing,now 1.3.1-2 amd64 [installed,automatic] +pkgconf-bin/testing,now 1.8.1-4 amd64 [installed,automatic] +pkgconf/testing,now 1.8.1-4 amd64 [installed,automatic] +procps/testing,now 2:4.0.4-7 amd64 [installed,automatic] +psmisc/testing,now 23.7-1 amd64 [installed,automatic] +publicsuffix/testing,now 20250108.1153-0.1 all [installed,automatic] +python3-autocommand/testing,now 2.2.2-3 all [installed,automatic] +python3-inflect/testing,now 7.3.1-2 all [installed,automatic] +python3-jaraco.context/testing,now 6.0.0-1 all [installed,automatic] +python3-jaraco.functools/testing,now 4.1.0-1 all [installed,automatic] +python3-jaraco.text/testing,now 4.0.0-1 all [installed,automatic] +python3-mako/testing,now 1.3.8-2 all [installed,automatic] +python3-markdown/testing,now 3.7-2 all [installed,automatic] +python3-markupsafe/testing,now 2.1.5-1+b2 amd64 [installed,automatic] +python3-minimal/testing,now 3.13.1-2 amd64 [installed,automatic] +python3-more-itertools/testing,now 10.6.0-1 all [installed,automatic] +python3-packaging/testing,now 24.2-1 all [installed,automatic] +python3-pkg-resources/testing,now 75.6.0-1 all [installed,automatic] +python3-pygments/testing,now 2.18.0+dfsg-2 all [installed,automatic] +python3-setuptools/testing,now 75.6.0-1 all [installed,automatic] +python3-typeguard/testing,now 4.4.1-1 all [installed,automatic] +python3-typing-extensions/testing,now 4.12.2-2 all [installed,automatic] +python3-yaml/testing,now 6.0.2-1+b1 amd64 [installed,automatic] +python3-zipp/testing,now 3.21.0-1 all [installed,automatic] +python3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3.13/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3/testing,now 3.13.1-2 amd64 [installed,automatic] +readline-common/testing,now 8.2-6 all [installed,automatic] +rpcsvc-proto/testing,now 1.4.3-1 amd64 [installed,automatic] +sed/testing,now 4.9-2 amd64 [installed,automatic] +sensible-utils/testing,now 0.0.24 all [installed,automatic] +sgml-base/testing,now 1.31 all [installed,automatic] +shared-mime-info/testing,now 2.4-5+b2 amd64 [installed,automatic] +sqv/testing,now 1.2.1-5 amd64 [installed,automatic] +systemd-cryptsetup/testing,now 257.2-3 amd64 [installed,automatic] +systemd-sysv/testing,now 257.2-3 amd64 [installed,automatic] +systemd-timesyncd/testing,now 257.2-3 amd64 [installed,automatic] +systemd/testing,now 257.2-3 amd64 [installed,automatic] +sysvinit-utils/testing,now 3.13-1 amd64 [installed,automatic] +tar/testing,now 1.35+dfsg-3.1 amd64 [installed,automatic] +tcl-expect/testing,now 5.45.4-3+b1 amd64 [installed,automatic] +tcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +tzdata/testing,now 2024b-6 all [installed,automatic] +util-linux/testing,now 2.40.4-2 amd64 [installed,automatic] +uuid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +wayland-protocols/testing,now 1.39-1 all [installed,automatic] +wget/testing,now 1.24.5-2+b1 amd64 [installed] +x11-common/testing,now 1:7.7+24 all [installed,automatic] +x11-xkb-utils/testing,now 7.7+9 amd64 [installed,automatic] +x11proto-dev/testing,now 2024.1-1 all [installed,automatic] +xauth/testing,now 1:1.1.2-1.1 amd64 [installed,automatic] +xdg-user-dirs/testing,now 0.18-2 amd64 [installed,automatic] +xkb-data/testing,now 2.42-1 all [installed,automatic] +xml-core/testing,now 0.19 all [installed,automatic] +xorg-sgml-doctools/testing,now 1:1.11-1.1 all [installed,automatic] +xtrans-dev/testing,now 1.4.0-1 all [installed,automatic] +xz-utils/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +zlib1g-dev/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +zlib1g/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +Errors detected in the build 0 +Warnings detected in the logs 95 +cppcheck defects detected in the logs 28 +TOTAL warnings detected in the logs 123 diff --git a/2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/stats.html b/2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/stats.html new file mode 100644 index 0000000..a805ba6 --- /dev/null +++ b/2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/stats.html @@ -0,0 +1,180 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+

Top 10 files for error severity, total findings: 2
+   1  libcafekbd/cafekbd-status.c
+   1  libcafekbd/cafekbd-indicator.c
+

+

Top 10 files for style severity, total findings: 20
+   13  libcafekbd/cafekbd-keyboard-drawing.c
+   6   libcafekbd/cafekbd-keyboard-config.c
+   1   test/cafekbd-status-test.c
+

+

Top 10 files for information severity, total findings: 5
+   1  test/cafekbd-keyboard-drawing-test.c
+   1  libcafekbd/cafekbd-keyboard-drawing.c
+   1  libcafekbd/cafekbd-keyboard-config.c
+   1  libcafekbd/cafekbd-indicator-config.c
+   1  libcafekbd/cafekbd-desktop-config.c
+

+ +
+ +
+ + diff --git a/2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/style.css b/2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/style.css new file mode 100644 index 0000000..3897bfa --- /dev/null +++ b/2025-02-06-152100-7368-cppcheck@8369334ba1f3_devel/style.css @@ -0,0 +1,177 @@ + +body { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; + font-size: 13px; + line-height: 1.5; + height: 100%; + margin: 0; +} + +#wrapper { + position: fixed; + height: 100vh; + width: 100vw; + display: grid; + grid-template-rows: fit-content(8rem) auto fit-content(8rem); + grid-template-columns: fit-content(25%) 1fr; + grid-template-areas: + "header header" + "menu content" + "footer footer"; +} + +h1 { + margin: 0 0 8px -2px; + font-size: 175%; +} + +.header { + padding: 0 0 5px 15px; + grid-area: header; + border-bottom: thin solid #aaa; +} + +.footer { + grid-area: footer; + border-top: thin solid #aaa; + font-size: 85%; + +} + +.footer > p { + margin: 4px; +} + +#menu, +#menu_index { + grid-area: menu; + text-align: left; + overflow: auto; + padding: 0 23px 15px 15px; + border-right: thin solid #aaa; + min-width: 200px; +} + +#menu > a { + display: block; + margin-left: 10px; + font-size: 12px; +} + +#content, +#content_index { + grid-area: content; + padding: 0px 5px 15px 15px; + overflow: auto; +} + +label { + white-space: nowrap; +} + +label.checkBtn.disabled { + color: #606060; + background: #e0e0e0; + font-style: italic; +} + +label.checkBtn, input[type="text"] { + border: 1px solid grey; + border-radius: 4px; + box-shadow: 1px 1px inset; + padding: 1px 5px; +} + +label.checkBtn { + white-space: nowrap; + background: #ccddff; +} + +label.unchecked { + background: #eff8ff; + box-shadow: 1px 1px 1px; +} + +label.checkBtn:hover, label.unchecked:hover{ + box-shadow: 0 0 2px; +} + +label.disabled:hover { + box-shadow: 1px 1px inset; +} + +label.checkBtn > input { + display:none; +} + +.summaryTable { + width: 100%; +} + +table.summaryTable td { padding: 0 5px 0 5px; } + +.statHeader, .severityHeader { + font-weight: bold; +} + +.warning { + background-color: #ffffa7; +} + +.error { + background-color: #ffb7b7; +} + +.error2 { + background-color: #faa; + display: inline-block; + margin-left: 4px; +} + +.inconclusive { + background-color: #b6b6b4; +} + +.inconclusive2 { + background-color: #b6b6b4; + display: inline-block; + margin-left: 4px; +} + +.verbose { + display: inline-block; + vertical-align: top; + cursor: help; +} + +.verbose .content { + display: none; + position: absolute; + padding: 10px; + margin: 4px; + max-width: 40%; + white-space: pre-wrap; + border: 1px solid #000; + background-color: #ffffcc; + cursor: auto; +} + +.highlight .hll { + padding: 1px; +} + +.highlighttable { + background-color: #fff; + position: relative; + margin: -10px; +} + +.linenos { + border-right: thin solid #aaa; + color: #d3d3d3; + padding-right: 6px; +} + +.id-filtered, .severity-filtered, .file-filtered, .tool-filtered, .text-filtered { + visibility: collapse; +} diff --git a/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/0.html b/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/0.html new file mode 100644 index 0000000..98f4aaa --- /dev/null +++ b/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/0.html @@ -0,0 +1,862 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <X11/keysym.h>
+
+#include <glib/gi18n-lib.h>
+#include <gio/gio.h>
+#include <cafekbd-desktop-config.h>
+#include <cafekbd-config-private.h>
+
+/**
+ * CafekbdDesktopConfig:
+ */
+#define CAFEKBD_DESKTOP_CONFIG_SCHEMA  CAFEKBD_CONFIG_SCHEMA ".general"
+
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP[] = "default-group";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW[] = "group-per-window";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS[] = "handle-indicators";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES[] = "layout-names-as-group-names";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_LOAD_EXTRA_ITEMS[] = "load-extra-items";
+
+/*
+ * static common functions
+ */
+
+static gboolean
+    cafekbd_desktop_config_get_lv_descriptions
+    (CafekbdDesktopConfig * config,
+     XklConfigRegistry * registry,
+     const gchar ** layout_ids,
+     const gchar ** variant_ids,
+     gchar *** short_layout_descriptions,
+     gchar *** long_layout_descriptions,
+     gchar *** short_variant_descriptions,
+     gchar *** long_variant_descriptions) {
+	const gchar **pl, **pv;
+	guint total_layouts;
+	gchar **sld, **lld, **svd, **lvd;
+	XklConfigItem *item = xkl_config_item_new ();
+
+	if (!
+	    (xkl_engine_get_features (config->engine) &
+	     XKLF_MULTIPLE_LAYOUTS_SUPPORTED))
+		return FALSE;
+
+	pl = layout_ids;
+	pv = variant_ids;
+	total_layouts = g_strv_length ((char **) layout_ids);
+	sld = *short_layout_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+	lld = *long_layout_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+	svd = *short_variant_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+	lvd = *long_variant_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+
+	while (pl != NULL && *pl != NULL) {
+
+		xkl_debug (100, "ids: [%s][%s]\n", *pl,
+			   pv == NULL ? NULL : *pv);
+
+		g_snprintf (item->name, sizeof item->name, "%s", *pl);
+		if (xkl_config_registry_find_layout (registry, item)) {
+			*sld = g_strdup (item->short_description);
+			*lld = g_strdup (item->description);
+		} else {
+			*sld = g_strdup ("");
+			*lld = g_strdup ("");
+		}
+
+		if (pv != NULL && *pv != NULL) {
+			g_snprintf (item->name, sizeof item->name, "%s",
+				    *pv);
+			if (xkl_config_registry_find_variant
+			    (registry, *pl, item)) {
+				*svd = g_strdup (item->short_description);
+				*lvd = g_strdup (item->description);
+			} else {
+				*svd = g_strdup ("");
+				*lvd = g_strdup ("");
+			}
+		} else {
+			*svd = g_strdup ("");
+			*lvd = g_strdup ("");
+		}
+
+		xkl_debug (100, "description: [%s][%s][%s][%s]\n",
+			   *sld, *lld, *svd, *lvd);
+		sld++;
+		lld++;
+		svd++;
+		lvd++;
+
+		pl++;
+
+		if (pv != NULL && *pv != NULL)
+			pv++;
+	}
+
+	g_object_unref (item);
+	return TRUE;
+}
+
+/*
+ * extern CafekbdDesktopConfig config functions
+ */
+void
+cafekbd_desktop_config_init (CafekbdDesktopConfig * config,
+			  XklEngine * engine)
+{
+	memset (config, 0, sizeof (*config));
+	config->settings = g_settings_new (CAFEKBD_DESKTOP_CONFIG_SCHEMA);
+	config->engine = engine;
+}
+
+void
+cafekbd_desktop_config_term (CafekbdDesktopConfig * config)
+{
+	g_object_unref (config->settings);
+	config->settings = NULL;
+}
+
+void
+cafekbd_desktop_config_load_from_gsettings (CafekbdDesktopConfig * config)
+{
+	config->group_per_app =
+	    g_settings_get_boolean (config->settings,
+				 CAFEKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW);
+	xkl_debug (150, "group_per_app: %d\n", config->group_per_app);
+
+	config->handle_indicators =
+	    g_settings_get_boolean (config->settings,
+				 CAFEKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS);
+	xkl_debug (150, "handle_indicators: %d\n",
+		   config->handle_indicators);
+
+	config->layout_names_as_group_names =
+	    g_settings_get_boolean (config->settings,
+				   CAFEKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES);
+	xkl_debug (150, "layout_names_as_group_names: %d\n",
+		   config->layout_names_as_group_names);
+
+	config->load_extra_items =
+	    g_settings_get_boolean (config->settings,
+				   CAFEKBD_DESKTOP_CONFIG_KEY_LOAD_EXTRA_ITEMS);
+	xkl_debug (150, "load_extra_items: %d\n",
+		   config->load_extra_items);
+
+	config->default_group =
+	    g_settings_get_int (config->settings,
+				  CAFEKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP);
+
+	if (config->default_group < -1
+	    || config->default_group >=
+	    xkl_engine_get_max_num_groups (config->engine))
+		config->default_group = -1;
+	xkl_debug (150, "default_group: %d\n", config->default_group);
+}
+
+void
+cafekbd_desktop_config_save_to_gsettings (CafekbdDesktopConfig * config)
+{
+	g_settings_delay (config->settings);
+
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW,
+			     config->group_per_app);
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS,
+			     config->handle_indicators);
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES,
+			     config->layout_names_as_group_names);
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_LOAD_EXTRA_ITEMS,
+			     config->load_extra_items);
+	g_settings_set_int (config->settings,
+			    CAFEKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP,
+			    config->default_group);
+
+	g_settings_apply (config->settings);
+}
+
+gboolean
+cafekbd_desktop_config_activate (CafekbdDesktopConfig * config)
+{
+	gboolean rv = TRUE;
+
+	xkl_engine_set_group_per_toplevel_window (config->engine,
+						  config->group_per_app);
+	xkl_engine_set_indicators_handling (config->engine,
+					    config->handle_indicators);
+	xkl_engine_set_default_group (config->engine,
+				      config->default_group);
+
+	return rv;
+}
+
+void
+cafekbd_desktop_config_lock_next_group (CafekbdDesktopConfig * config)
+{
+	int group = xkl_engine_get_next_group (config->engine);
+	xkl_engine_lock_group (config->engine, group);
+}
+
+void
+cafekbd_desktop_config_lock_prev_group (CafekbdDesktopConfig * config)
+{
+	int group = xkl_engine_get_prev_group (config->engine);
+	xkl_engine_lock_group (config->engine, group);
+}
+
+void
+cafekbd_desktop_config_restore_group (CafekbdDesktopConfig * config)
+{
+	int group = xkl_engine_get_current_window_group (config->engine);
+	xkl_engine_lock_group (config->engine, group);
+}
+
+/**
+ * cafekbd_desktop_config_start_listen:
+ * @func: (scope notified): a function to call when settings are changed
+ */
+void
+cafekbd_desktop_config_start_listen (CafekbdDesktopConfig * config,
+				  GCallback func,
+				  gpointer user_data)
+{
+	config->config_listener_id =
+	    g_signal_connect (config->settings, "changed", func,
+			      user_data);
+}
+
+void
+cafekbd_desktop_config_stop_listen (CafekbdDesktopConfig * config)
+{
+	g_signal_handler_disconnect (config->settings,
+				    config->config_listener_id);
+	config->config_listener_id = 0;
+}
+
+gboolean
+cafekbd_desktop_config_load_group_descriptions (CafekbdDesktopConfig
+					     * config,
+					     XklConfigRegistry *
+					     registry,
+					     const gchar **
+					     layout_ids,
+					     const gchar **
+					     variant_ids,
+					     gchar ***
+					     short_group_names,
+					     gchar *** full_group_names)
+{
+	gchar **sld, **lld, **svd, **lvd;
+	gchar **psld, **plld, **plvd;
+	gchar **psgn, **pfgn, **psvd;
+	gint total_descriptions;
+
+	if (!cafekbd_desktop_config_get_lv_descriptions
+	    (config, registry, layout_ids, variant_ids, &sld, &lld, &svd,
+	     &lvd)) {
+		return False;
+	}
+
+	total_descriptions = g_strv_length (sld);
+
+	*short_group_names = psgn =
+	    g_new0 (gchar *, total_descriptions + 1);
+	*full_group_names = pfgn =
+	    g_new0 (gchar *, total_descriptions + 1);
+
+	plld = lld;
+	psld = sld;
+	plvd = lvd;
+	psvd = svd;
+	while (plld != NULL && *plld != NULL) {
+		gchar *sd = (*psvd[0] == '\0') ? *psld : *psvd;
+		psld++, psvd++;
+		*psgn++ = g_strdup (sd);
+		*pfgn++ = g_strdup (cafekbd_keyboard_config_format_full_layout
+				    (*plld++, *plvd++));
+	}
+	g_strfreev (sld);
+	g_strfreev (lld);
+	g_strfreev (svd);
+	g_strfreev (lvd);
+
+	return True;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/1.html b/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/1.html new file mode 100644 index 0000000..43abc15 --- /dev/null +++ b/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/1.html @@ -0,0 +1,914 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <X11/keysym.h>
+
+#include <pango/pango.h>
+
+#include <glib/gi18n-lib.h>
+#include <cdk/cdkx.h>
+
+#include <cafekbd-keyboard-config.h>
+#include <cafekbd-indicator-config.h>
+
+#include <cafekbd-config-private.h>
+
+/**
+ * CafekbdIndicatorConfig:
+ */
+#define CAFEKBD_INDICATOR_CONFIG_SCHEMA  CAFEKBD_CONFIG_SCHEMA ".indicator"
+
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS[] = "show-flags";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_SECONDARIES[] = "secondary";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_FONT_FAMILY[] = "font-family";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_FOREGROUND_COLOR[] = "foreground-color";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_BACKGROUND_COLOR[] = "background-color";
+
+/*
+ * static applet config functions
+ */
+static void
+cafekbd_indicator_config_load_font (CafekbdIndicatorConfig * ind_config)
+{
+	ind_config->font_family =
+	    g_settings_get_string (ind_config->settings,
+				   CAFEKBD_INDICATOR_CONFIG_KEY_FONT_FAMILY);
+
+	if (ind_config->font_family == NULL ||
+	    ind_config->font_family[0] == '\0') {
+		PangoFontDescription *fd = NULL;
+		CtkWidgetPath *widget_path = ctk_widget_path_new ();
+		CtkStyleContext *context = ctk_style_context_new ();
+
+		ctk_widget_path_append_type (widget_path, CTK_TYPE_WINDOW);
+		ctk_widget_path_iter_set_name (widget_path, -1 , "PanelWidget");
+
+		ctk_style_context_set_path (context, widget_path);
+		ctk_style_context_set_screen (context, cdk_screen_get_default ());
+		ctk_style_context_set_state (context, CTK_STATE_FLAG_NORMAL);
+		ctk_style_context_add_class (context, CTK_STYLE_CLASS_DEFAULT);
+		ctk_style_context_add_class (context, "gnome-panel-menu-bar");
+		ctk_style_context_add_class (context, "cafe-panel-menu-bar");
+
+		ctk_style_context_get (context, CTK_STATE_FLAG_NORMAL,
+		                       CTK_STYLE_PROPERTY_FONT, &fd, NULL);
+
+		if (fd != NULL) {
+			ind_config->font_family =
+			    g_strdup (pango_font_description_to_string(fd));
+		}
+
+		g_object_unref (G_OBJECT (context));
+		ctk_widget_path_unref (widget_path);
+	}
+	xkl_debug (150, "font: [%s]\n", ind_config->font_family);
+
+}
+
+static void
+cafekbd_indicator_config_load_colors (CafekbdIndicatorConfig * ind_config)
+{
+	ind_config->foreground_color =
+	    g_settings_get_string (ind_config->settings,
+	                           CAFEKBD_INDICATOR_CONFIG_KEY_FOREGROUND_COLOR);
+
+	if (ind_config->foreground_color == NULL ||
+	    ind_config->foreground_color[0] == '\0') {
+		CtkWidgetPath *widget_path = ctk_widget_path_new ();
+		CtkStyleContext *context = ctk_style_context_new ();
+		CdkRGBA fg_color;
+
+		ctk_widget_path_append_type (widget_path, CTK_TYPE_WINDOW);
+		ctk_widget_path_iter_set_name (widget_path, -1 , "PanelWidget");
+
+		ctk_style_context_set_path (context, widget_path);
+		ctk_style_context_set_screen (context, cdk_screen_get_default ());
+		ctk_style_context_set_state (context, CTK_STATE_FLAG_NORMAL);
+		ctk_style_context_add_class (context, CTK_STYLE_CLASS_DEFAULT);
+		ctk_style_context_add_class (context, "gnome-panel-menu-bar");
+		ctk_style_context_add_class (context, "cafe-panel-menu-bar");
+
+		ctk_style_context_get_color (context,
+		                             CTK_STATE_FLAG_NORMAL, &fg_color);
+		ind_config->foreground_color =
+		    g_strdup_printf ("%g %g %g",
+		                     fg_color.red,
+		                     fg_color.green,
+		                     fg_color.blue);
+
+		g_object_unref (G_OBJECT (context));
+		ctk_widget_path_unref (widget_path);
+	}
+
+	ind_config->background_color =
+	    g_settings_get_string (ind_config->settings,
+				     CAFEKBD_INDICATOR_CONFIG_KEY_BACKGROUND_COLOR);
+}
+
+void
+cafekbd_indicator_config_refresh_style (CafekbdIndicatorConfig * ind_config)
+{
+	g_free (ind_config->font_family);
+	g_free (ind_config->foreground_color);
+	g_free (ind_config->background_color);
+	cafekbd_indicator_config_load_font (ind_config);
+	cafekbd_indicator_config_load_colors (ind_config);
+}
+
+gchar *
+cafekbd_indicator_config_get_images_file (CafekbdIndicatorConfig *
+				       ind_config,
+				       CafekbdKeyboardConfig *
+				       kbd_config, int group)
+{
+	char *image_file = NULL;
+	CtkIconInfo *icon_info = NULL;
+
+	if (!ind_config->show_flags)
+		return NULL;
+
+	if ((kbd_config->layouts_variants != NULL) &&
+	    (g_strv_length (kbd_config->layouts_variants) > group)) {
+		char *full_layout_name =
+		    kbd_config->layouts_variants[group];
+
+		if (full_layout_name != NULL) {
+			char *l, *v;
+			cafekbd_keyboard_config_split_items (full_layout_name,
+							  &l, &v);
+			if (l != NULL) {
+				/* probably there is something in theme? */
+				icon_info = ctk_icon_theme_lookup_icon
+				    (ind_config->icon_theme, l, 48, 0);
+
+				/* Unbelievable but happens */
+				if (icon_info != NULL &&
+				    ctk_icon_info_get_filename (icon_info) == NULL) {
+					g_object_unref (icon_info);
+					icon_info = NULL;
+				}
+			}
+		}
+	}
+	/* fallback to the default value */
+	if (icon_info == NULL) {
+		icon_info = ctk_icon_theme_lookup_icon
+		    (ind_config->icon_theme, "stock_dialog-error", 48, 0);
+	}
+	if (icon_info != NULL) {
+		image_file =
+		    g_strdup (ctk_icon_info_get_filename (icon_info));
+		g_object_unref (icon_info);
+	}
+
+	return image_file;
+}
+
+void
+cafekbd_indicator_config_load_image_filenames (CafekbdIndicatorConfig *
+					    ind_config,
+					    CafekbdKeyboardConfig *
+					    kbd_config)
+{
+	int i;
+	ind_config->image_filenames = NULL;
+
+	if (!ind_config->show_flags)
+		return;
+
+	for (i = xkl_engine_get_max_num_groups (ind_config->engine);
+	     --i >= 0;) {
+		gchar *image_file =
+		    cafekbd_indicator_config_get_images_file (ind_config,
+							   kbd_config,
+							   i);
+		ind_config->image_filenames =
+		    g_slist_prepend (ind_config->image_filenames,
+				     image_file);
+	}
+}
+
+void
+cafekbd_indicator_config_free_image_filenames (CafekbdIndicatorConfig *
+					    ind_config)
+{
+	while (ind_config->image_filenames) {
+		if (ind_config->image_filenames->data)
+			g_free (ind_config->image_filenames->data);
+		ind_config->image_filenames =
+		    g_slist_delete_link (ind_config->image_filenames,
+					 ind_config->image_filenames);
+	}
+}
+
+void
+cafekbd_indicator_config_init (CafekbdIndicatorConfig * ind_config,
+			       XklEngine * engine)
+{
+	gchar *sp;
+
+	memset (ind_config, 0, sizeof (*ind_config));
+	ind_config->settings = g_settings_new (CAFEKBD_INDICATOR_CONFIG_SCHEMA);
+	ind_config->engine = engine;
+
+	ind_config->icon_theme = ctk_icon_theme_get_default ();
+
+	ctk_icon_theme_append_search_path (ind_config->icon_theme, sp =
+					   g_build_filename (g_get_home_dir
+							     (),
+							     ".icons/flags",
+							     NULL));
+	g_free (sp);
+
+	ctk_icon_theme_append_search_path (ind_config->icon_theme,
+					   sp =
+					   g_build_filename (DATADIR,
+							     "pixmaps/flags",
+							     NULL));
+	g_free (sp);
+
+	ctk_icon_theme_append_search_path (ind_config->icon_theme,
+					   sp =
+					   g_build_filename (DATADIR,
+							     "icons/flags",
+							     NULL));
+	g_free (sp);
+}
+
+void
+cafekbd_indicator_config_term (CafekbdIndicatorConfig * ind_config)
+{
+	g_free (ind_config->font_family);
+	ind_config->font_family = NULL;
+
+	g_free (ind_config->foreground_color);
+	ind_config->foreground_color = NULL;
+
+	g_free (ind_config->background_color);
+	ind_config->background_color = NULL;
+
+	ind_config->icon_theme = NULL;
+
+	cafekbd_indicator_config_free_image_filenames (ind_config);
+
+	g_object_unref (ind_config->settings);
+	ind_config->settings = NULL;
+}
+
+void
+cafekbd_indicator_config_load_from_gsettings (CafekbdIndicatorConfig * ind_config)
+{
+	ind_config->secondary_groups_mask =
+	    g_settings_get_int (ind_config->settings,
+				CAFEKBD_INDICATOR_CONFIG_KEY_SECONDARIES);
+
+	ind_config->show_flags =
+	    g_settings_get_boolean (ind_config->settings,
+				 CAFEKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS);
+
+	cafekbd_indicator_config_load_font (ind_config);
+	cafekbd_indicator_config_load_colors (ind_config);
+
+}
+
+void
+cafekbd_indicator_config_save_to_gsettings (CafekbdIndicatorConfig * ind_config)
+{
+	g_settings_delay (ind_config->settings);
+
+	g_settings_set_int (ind_config->settings,
+				  CAFEKBD_INDICATOR_CONFIG_KEY_SECONDARIES,
+				  ind_config->secondary_groups_mask);
+	g_settings_set_boolean (ind_config->settings,
+				   CAFEKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS,
+				   ind_config->show_flags);
+
+	g_settings_apply (ind_config->settings);
+}
+
+void
+cafekbd_indicator_config_activate (CafekbdIndicatorConfig * ind_config)
+{
+	xkl_engine_set_secondary_groups_mask (ind_config->engine,
+					      ind_config->secondary_groups_mask);
+}
+
+/**
+ * cafekbd_indicator_config_start_listen:
+ * @func: (scope notified): a function to call when settings are changed
+ */
+void
+cafekbd_indicator_config_start_listen (CafekbdIndicatorConfig *
+				    ind_config,
+				    GCallback func,
+				    gpointer user_data)
+{
+	ind_config->config_listener_id =
+	    g_signal_connect (ind_config->settings, "changed", func,
+			      user_data);
+}
+
+void
+cafekbd_indicator_config_stop_listen (CafekbdIndicatorConfig * ind_config)
+{
+	g_signal_handler_disconnect (ind_config->settings,
+				     ind_config->config_listener_id);
+	ind_config->config_listener_id = 0;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/2.html b/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/2.html new file mode 100644 index 0000000..4489934 --- /dev/null +++ b/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/2.html @@ -0,0 +1,2100 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
+871
+872
+873
+874
+875
+876
+877
+878
+879
+880
+881
+882
+883
+884
+885
+886
+887
+888
+889
+890
+891
+892
+893
+894
+895
+896
+897
+898
+899
+900
+901
+902
+903
+904
+905
+906
+907
+908
+909
+910
+911
+912
+913
+914
+915
+916
+917
+918
+919
+920
+921
+922
+923
+924
+925
+926
+927
+928
+929
+930
+931
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+#include <config.h>
+
+#include <memory.h>
+
+#include <ctk/ctk.h>
+#include <cdk/cdkkeysyms.h>
+#include <cdk/cdkx.h>
+#include <glib/gi18n-lib.h>
+
+#include <cafekbd-indicator.h>
+#include <cafekbd-indicator-marshal.h>
+
+#include <cafekbd-desktop-config.h>
+#include <cafekbd-indicator-config.h>
+
+typedef struct _gki_globals {
+	XklEngine *engine;
+	XklConfigRegistry *registry;
+
+	CafekbdDesktopConfig cfg;
+	CafekbdIndicatorConfig ind_cfg;
+	CafekbdKeyboardConfig kbd_cfg;
+
+	const gchar *tooltips_format;
+	gchar **full_group_names;
+	gchar **short_group_names;
+	GSList *widget_instances;
+	GSList *images;
+} gki_globals;
+
+struct _CafekbdIndicatorPrivate {
+	gboolean set_parent_tooltips;
+	gdouble angle;
+};
+
+/* one instance for ALL widgets */
+static gki_globals globals;
+
+#define ForAllIndicators() \
+	{ \
+		GSList* cur; \
+		for (cur = globals.widget_instances; cur != NULL; cur = cur->next) { \
+			CafekbdIndicator * gki = (CafekbdIndicator*)cur->data;
+#define NextIndicator() \
+		} \
+	}
+
+G_DEFINE_TYPE (CafekbdIndicator, cafekbd_indicator, CTK_TYPE_NOTEBOOK)<--- There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
+
+static void
+cafekbd_indicator_global_init (void);
+static void
+cafekbd_indicator_global_term (void);
+static CtkWidget *
+cafekbd_indicator_prepare_drawing (CafekbdIndicator * gki, int group);
+static void
+cafekbd_indicator_set_current_page_for_group (CafekbdIndicator * gki, int group);
+static void
+cafekbd_indicator_set_current_page (CafekbdIndicator * gki);
+static void
+cafekbd_indicator_cleanup (CafekbdIndicator * gki);
+static void
+cafekbd_indicator_fill (CafekbdIndicator * gki);
+static void
+cafekbd_indicator_set_tooltips (CafekbdIndicator * gki, const char *str);
+
+gchar *
+cafekbd_indicator_extract_layout_name (int group, XklEngine *engine, CafekbdKeyboardConfig *kbd_cfg, gchar **short_group_names, gchar **full_group_names);
+gchar *
+cafekbd_indicator_create_label_title (int group, GHashTable **ln2cnt_map, gchar *layout_name);
+
+static void
+cafekbd_indicator_load_images (void)
+{
+	int i;
+	GSList *image_filename;
+
+	globals.images = NULL;
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	if (!globals.ind_cfg.show_flags)
+		return;
+
+	image_filename = globals.ind_cfg.image_filenames;
+
+	for (i = xkl_engine_get_max_num_groups (globals.engine);
+	     --i >= 0; image_filename = image_filename->next) {
+		GdkPixbuf *image = NULL;
+		char *image_file = (char *) image_filename->data;
+
+		if (image_file != NULL) {
+			GError *gerror = NULL;
+			image =
+			    gdk_pixbuf_new_from_file (image_file, &gerror);
+			if (image == NULL) {
+				CtkWidget *dialog =
+				    ctk_message_dialog_new (NULL,
+							    CTK_DIALOG_DESTROY_WITH_PARENT,
+							    CTK_MESSAGE_ERROR,
+							    CTK_BUTTONS_OK,
+							    _
+							    ("There was an error loading an image: %s"),
+							    gerror->
+							    message);
+				g_signal_connect (G_OBJECT (dialog),
+						  "response",
+						  G_CALLBACK
+						  (ctk_widget_destroy),
+						  NULL);
+
+				ctk_window_set_resizable (CTK_WINDOW
+							  (dialog), FALSE);
+
+				ctk_widget_show (dialog);
+				g_error_free (gerror);
+			}
+			xkl_debug (150,
+				   "Image %d[%s] loaded -> %p[%dx%d]\n",
+				   i, image_file, image,
+				   gdk_pixbuf_get_width (image),
+				   gdk_pixbuf_get_height (image));
+		}
+		/* We append the image anyway - even if it is NULL! */
+		globals.images = g_slist_append (globals.images, image);
+	}
+}
+
+static void
+cafekbd_indicator_free_images (void)
+{
+	GSList *img_node;
+
+	cafekbd_indicator_config_free_image_filenames (&globals.ind_cfg);
+
+	while ((img_node = globals.images) != NULL) {
+		GdkPixbuf *pi;
+
+		pi = GDK_PIXBUF (img_node->data);
+		/* It can be NULL - some images may be missing */
+		if (pi != NULL) {
+			g_object_unref (pi);
+		}
+		globals.images =
+		    g_slist_remove_link (globals.images, img_node);
+		g_slist_free_1 (img_node);
+	}
+}
+
+static void
+cafekbd_indicator_update_images (void)
+{
+	cafekbd_indicator_free_images ();
+	cafekbd_indicator_load_images ();
+}
+
+void
+cafekbd_indicator_set_tooltips (CafekbdIndicator * gki, const char *str)
+{
+	g_assert (str == NULL || g_utf8_validate (str, -1, NULL));
+
+	ctk_widget_set_tooltip_text (CTK_WIDGET (gki), str);
+
+	if (gki->priv->set_parent_tooltips) {
+		CtkWidget *parent =
+		    ctk_widget_get_parent (CTK_WIDGET (gki));
+		if (parent) {
+			ctk_widget_set_tooltip_text (parent, str);
+		}
+	}
+}
+
+void
+cafekbd_indicator_cleanup (CafekbdIndicator * gki)
+{
+	int i;
+	CtkNotebook *notebook = CTK_NOTEBOOK (gki);
+
+	/* Do not remove the first page! It is the default page */
+	for (i = ctk_notebook_get_n_pages (notebook); --i > 0;) {
+		ctk_notebook_remove_page (notebook, i);
+	}
+}
+
+void
+cafekbd_indicator_fill (CafekbdIndicator * gki)
+{
+	int grp;
+	int total_groups = xkl_engine_get_num_groups (globals.engine);
+	CtkNotebook *notebook = CTK_NOTEBOOK (gki);
+
+	for (grp = 0; grp < total_groups; grp++) {
+		CtkWidget *page;
+		page = cafekbd_indicator_prepare_drawing (gki, grp);
+
+		if (page == NULL)
+			page = ctk_label_new ("");
+
+		ctk_notebook_append_page (notebook, page, NULL);
+		ctk_widget_show_all (page);
+	}
+}
+
+static gboolean cafekbd_indicator_key_pressed (CtkWidget        *widget G_GNUC_UNUSED,
+					       CdkEventKey      *event,
+					       CafekbdIndicator *gki G_GNUC_UNUSED)
+{
+	switch (event->keyval)
+	{
+			case CDK_KEY_KP_Enter:
+			case CDK_KEY_ISO_Enter:
+			case CDK_KEY_3270_Enter:
+			case CDK_KEY_Return:
+			case CDK_KEY_space:
+			case CDK_KEY_KP_Space:
+			cafekbd_desktop_config_lock_next_group(&globals.cfg);
+			return TRUE;
+		default:
+			break;
+	}
+
+	return FALSE;
+}
+
+static gboolean
+cafekbd_indicator_button_pressed (CtkWidget        *widget,
+				  CdkEventButton   *event,
+				  CafekbdIndicator *gki G_GNUC_UNUSED)
+{
+	CtkWidget *img = ctk_bin_get_child (CTK_BIN (widget));
+	CtkAllocation allocation;
+	ctk_widget_get_allocation (img, &allocation);
+	xkl_debug (150, "Flag img size %d x %d\n",
+		   allocation.width, allocation.height);
+	if (event->button == 1 && event->type == CDK_BUTTON_PRESS) {
+		xkl_debug (150, "Mouse button pressed on applet\n");
+		cafekbd_desktop_config_lock_next_group (&globals.cfg);
+		return TRUE;
+	}
+	return FALSE;
+}
+
+static void
+draw_flag (CtkWidget * flag, cairo_t * cr, GdkPixbuf * image)
+{
+	/* Image width and height */
+	int iw = gdk_pixbuf_get_width (image);
+	int ih = gdk_pixbuf_get_height (image);
+	CtkAllocation allocation;
+	double xwiratio, ywiratio, wiratio;
+
+	ctk_widget_get_allocation (flag, &allocation);
+
+	/* widget-to-image scales, X and Y */
+	xwiratio = 1.0 * allocation.width / iw;
+	ywiratio = 1.0 * allocation.height / ih;
+	wiratio = xwiratio < ywiratio ? xwiratio : ywiratio;
+
+	/* transform cairo context */
+	cairo_translate (cr, allocation.width / 2.0, allocation.height / 2.0);
+	cairo_scale (cr, wiratio, wiratio);
+	cairo_translate (cr, - iw / 2.0, - ih / 2.0);
+
+	cdk_cairo_set_source_pixbuf (cr, image, 0, 0);
+	cairo_paint (cr);
+}
+
+gchar *
+cafekbd_indicator_extract_layout_name (int group, XklEngine * engine,
+				    CafekbdKeyboardConfig * kbd_cfg,
+				    gchar ** short_group_names,
+				    gchar ** full_group_names)
+{
+	char *layout_name = NULL;
+	if (group < g_strv_length (short_group_names)) {
+		if (xkl_engine_get_features (engine) &
+		    XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
+			char *full_layout_name =
+			    kbd_cfg->layouts_variants[group];
+			char *variant_name;
+			if (!cafekbd_keyboard_config_split_items
+			    (full_layout_name, &layout_name,
+			     &variant_name))
+				/* just in case */
+				layout_name = full_layout_name;
+
+			/* make it freeable */
+			layout_name = g_strdup (layout_name);
+
+			if (short_group_names != NULL) {
+				char *short_group_name =
+				    short_group_names[group];
+				if (short_group_name != NULL
+				    && *short_group_name != '\0') {
+					/* drop the long name */
+					g_free (layout_name);
+					layout_name =
+					    g_strdup (short_group_name);
+				}
+			}
+		} else {
+			layout_name = g_strdup (full_group_names[group]);
+		}
+	}
+
+	if (layout_name == NULL)
+		layout_name = g_strdup ("");
+
+	return layout_name;
+}
+
+gchar *
+cafekbd_indicator_create_label_title (int group, GHashTable ** ln2cnt_map,
+				   gchar * layout_name)
+{
+	gpointer pcounter = NULL;
+	char *prev_layout_name = NULL;
+	char *lbl_title = NULL;
+	int counter = 0;
+
+	if (group == 0) {
+		*ln2cnt_map =
+		    g_hash_table_new_full (g_str_hash, g_str_equal,
+					   g_free, NULL);
+	}
+
+	/* Process layouts with repeating description */
+	if (g_hash_table_lookup_extended
+	    (*ln2cnt_map, layout_name, (gpointer *) & prev_layout_name,
+	     &pcounter)) {
+		/* "next" same description */
+		gchar appendix[10] = "";
+		gint utf8length;
+		gunichar cidx;
+		counter = GPOINTER_TO_INT (pcounter);
+		/* Unicode subscript 2, 3, 4 */
+		cidx = 0x2081 + counter;
+		utf8length = g_unichar_to_utf8 (cidx, appendix);
+		appendix[utf8length] = '\0';
+		lbl_title = g_strconcat (layout_name, appendix, NULL);
+	} else {
+		/* "first" time this description */
+		lbl_title = g_strdup (layout_name);
+	}
+	g_hash_table_insert (*ln2cnt_map, layout_name,
+			     GINT_TO_POINTER (counter + 1));
+	return lbl_title;
+}
+
+static CtkWidget *
+cafekbd_indicator_prepare_drawing (CafekbdIndicator * gki, int group)
+{
+	gpointer pimage;
+	CtkWidget *ebox;
+
+	pimage = g_slist_nth_data (globals.images, group);
+	ebox = ctk_event_box_new ();
+	ctk_event_box_set_visible_window (CTK_EVENT_BOX (ebox), FALSE);
+	if (globals.ind_cfg.show_flags) {
+		GdkPixbuf *image;
+		CtkWidget *flag;
+
+		if (pimage == NULL)
+			return NULL;
+		image = GDK_PIXBUF (pimage);
+		flag = ctk_drawing_area_new ();
+		ctk_widget_add_events (CTK_WIDGET (flag),
+				       CDK_BUTTON_PRESS_MASK);
+		g_signal_connect (G_OBJECT (flag), "draw",
+		                  G_CALLBACK (draw_flag), image);
+		ctk_container_add (CTK_CONTAINER (ebox), flag);
+	} else {
+		char *lbl_title = NULL;
+		char *layout_name = NULL;
+		CtkWidget *label;
+		static GHashTable *ln2cnt_map = NULL;
+
+		layout_name =
+		    cafekbd_indicator_extract_layout_name (group,
+							globals.engine,
+							&globals.kbd_cfg,
+							globals.short_group_names,
+							globals.full_group_names);
+
+		lbl_title =
+		    cafekbd_indicator_create_label_title (group,
+						       &ln2cnt_map,
+						       layout_name);
+
+		label = ctk_label_new (lbl_title);
+		ctk_widget_set_halign (label, CTK_ALIGN_CENTER);
+		ctk_widget_set_valign (label, CTK_ALIGN_CENTER);
+		ctk_widget_set_margin_start (label, 2);
+		ctk_widget_set_margin_end (label, 2);
+		ctk_widget_set_margin_top (label, 2);
+		ctk_widget_set_margin_bottom (label, 2);
+		g_free (lbl_title);
+		ctk_label_set_angle (CTK_LABEL (label), gki->priv->angle);
+
+		if (group + 1 ==
+		    xkl_engine_get_num_groups (globals.engine)) {
+			g_hash_table_destroy (ln2cnt_map);
+			ln2cnt_map = NULL;
+		}
+
+		ctk_container_add (CTK_CONTAINER (ebox), label);
+	}
+
+	g_signal_connect (G_OBJECT (ebox),
+			  "button_press_event",
+			  G_CALLBACK (cafekbd_indicator_button_pressed), gki);
+
+	g_signal_connect (G_OBJECT (gki),
+			  "key_press_event",
+			  G_CALLBACK (cafekbd_indicator_key_pressed), gki);
+
+	/* We have everything prepared for that size */
+
+	return ebox;
+}
+
+static void
+cafekbd_indicator_update_tooltips (CafekbdIndicator * gki)
+{
+	XklState *state = xkl_engine_get_current_state (globals.engine);
+	gchar *buf;
+	if (state == NULL || state->group < 0
+	    || state->group >= g_strv_length (globals.full_group_names))
+		return;
+
+	buf = g_strdup_printf (globals.tooltips_format,
+			       globals.full_group_names[state->group]);
+
+	cafekbd_indicator_set_tooltips (gki, buf);
+	g_free (buf);
+}
+
+static void
+cafekbd_indicator_parent_set (CtkWidget *gki,
+			      CtkWidget *previous_parent G_GNUC_UNUSED)
+{
+	cafekbd_indicator_update_tooltips (CAFEKBD_INDICATOR (gki));
+}
+
+
+void
+cafekbd_indicator_reinit_ui (CafekbdIndicator * gki)
+{
+	cafekbd_indicator_cleanup (gki);
+	cafekbd_indicator_fill (gki);
+
+	cafekbd_indicator_set_current_page (gki);
+
+	g_signal_emit_by_name (gki, "reinit-ui");
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+			       gchar     *key G_GNUC_UNUSED,
+			       gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "General configuration changed in GSettings - reiniting...\n");
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+	ForAllIndicators () {
+		cafekbd_indicator_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_ind_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+				   gchar     *key G_GNUC_UNUSED,
+				   gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "Applet configuration changed in GSettings - reiniting...\n");
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+	cafekbd_indicator_update_images ();
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	ForAllIndicators () {
+		cafekbd_indicator_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+static void
+cafekbd_indicator_load_group_names (const gchar ** layout_ids,
+				 const gchar ** variant_ids)
+{
+	if (!cafekbd_desktop_config_load_group_descriptions
+	    (&globals.cfg, globals.registry, layout_ids, variant_ids,
+	     &globals.short_group_names, &globals.full_group_names)) {
+		/* We just populate no short names (remain NULL) -
+		 * full names are going to be used anyway */
+		gint i, total_groups =
+		    xkl_engine_get_num_groups (globals.engine);
+		globals.full_group_names =
+		    g_new0 (gchar *, total_groups + 1);
+
+		if (xkl_engine_get_features (globals.engine) &
+		    XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
+			gchar **lst = globals.kbd_cfg.layouts_variants;
+			for (i = 0; *lst; lst++, i++) {
+				globals.full_group_names[i] =
+				    g_strdup ((char *) *lst);
+			}
+		} else {
+			for (i = total_groups; --i >= 0;) {
+				globals.full_group_names[i] =
+				    g_strdup_printf ("Group %d", i);
+			}
+		}
+	}
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_kbd_cfg_callback (CafekbdIndicator *gki G_GNUC_UNUSED)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+	xkl_debug (100,
+		   "XKB configuration changed on X Server - reiniting...\n");
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+	cafekbd_indicator_update_images ();
+
+	g_strfreev (globals.full_group_names);
+	globals.full_group_names = NULL;
+
+	if (globals.short_group_names != NULL) {
+		g_strfreev (globals.short_group_names);
+		globals.short_group_names = NULL;
+	}
+
+	cafekbd_indicator_load_group_names ((const gchar **) xklrec->layouts,
+					 (const gchar **)
+					 xklrec->variants);
+
+	ForAllIndicators () {
+		cafekbd_indicator_reinit_ui (gki);
+	} NextIndicator ();
+	g_object_unref (G_OBJECT (xklrec));
+}
+
+/* Should be called once for all applets */
+static void
+cafekbd_indicator_state_callback (XklEngine           *engine G_GNUC_UNUSED,
+				  XklEngineStateChange changeType,
+				  gint                 group,
+				  gboolean             restore)
+{
+	xkl_debug (150, "group is now %d, restore: %d\n", group, restore);
+
+	if (changeType == GROUP_CHANGED) {
+		ForAllIndicators () {
+			xkl_debug (200, "do repaint\n");
+			cafekbd_indicator_set_current_page_for_group
+			    (gki, group);
+		}
+		NextIndicator ();
+	}
+}
+
+
+void
+cafekbd_indicator_set_current_page (CafekbdIndicator * gki)
+{
+	XklState *cur_state;
+	cur_state = xkl_engine_get_current_state (globals.engine);
+	if (cur_state->group >= 0)
+		cafekbd_indicator_set_current_page_for_group (gki,
+							   cur_state->
+							   group);
+}
+
+void
+cafekbd_indicator_set_current_page_for_group (CafekbdIndicator * gki, int group)
+{
+	xkl_debug (200, "Revalidating for group %d\n", group);
+
+	ctk_notebook_set_current_page (CTK_NOTEBOOK (gki), group + 1);
+
+	cafekbd_indicator_update_tooltips (gki);
+}
+
+/* Should be called once for all widgets */
+static CdkFilterReturn
+cafekbd_indicator_filter_x_evt (CdkXEvent *xev,
+				CdkEvent  *event G_GNUC_UNUSED)
+{
+	XEvent *xevent = (XEvent *) xev;
+
+	xkl_engine_filter_events (globals.engine, xevent);
+	switch (xevent->type) {
+	case ReparentNotify:
+		{
+			XReparentEvent *rne = (XReparentEvent *) xev;
+
+			ForAllIndicators () {
+				CdkWindow *w =
+				    ctk_widget_get_parent_window
+				    (CTK_WIDGET (gki));
+
+				/* compare the indicator's parent window with the even window */
+				if (w != NULL
+				    && CDK_WINDOW_XID (w) == rne->window) {
+					/* if so - make it transparent... */
+					xkl_engine_set_window_transparent
+					    (globals.engine, rne->window,
+					     TRUE);
+				}
+			}
+			NextIndicator ()
+		}
+		break;
+	}
+	return CDK_FILTER_CONTINUE;
+}
+
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_start_listen (void)
+{
+	cdk_window_add_filter (NULL, (CdkFilterFunc)
+			       cafekbd_indicator_filter_x_evt, NULL);
+	cdk_window_add_filter (cdk_get_default_root_window (),
+			       (CdkFilterFunc)
+			       cafekbd_indicator_filter_x_evt, NULL);
+
+	xkl_engine_start_listen (globals.engine,
+				 XKLL_TRACK_KEYBOARD_STATE);
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_stop_listen (void)
+{
+	xkl_engine_stop_listen (globals.engine, XKLL_TRACK_KEYBOARD_STATE);
+
+	cdk_window_remove_filter (NULL, (CdkFilterFunc)
+				  cafekbd_indicator_filter_x_evt, NULL);
+	cdk_window_remove_filter
+	    (cdk_get_default_root_window (),
+	     (CdkFilterFunc) cafekbd_indicator_filter_x_evt, NULL);
+}
+
+static gboolean
+cafekbd_indicator_scroll (CtkWidget      *gki G_GNUC_UNUSED,
+			  CdkEventScroll *event G_GNUC_UNUSED)
+{
+	/* mouse wheel events should be ignored, otherwise funny effects appear */
+	return TRUE;
+}
+
+static void cafekbd_indicator_init(CafekbdIndicator* gki)
+{
+	CtkWidget *def_drawing;
+	CtkNotebook *notebook;
+
+	if (!g_slist_length(globals.widget_instances))
+	{
+		cafekbd_indicator_global_init();
+	}
+
+	gki->priv = g_new0 (CafekbdIndicatorPrivate, 1);
+
+	notebook = CTK_NOTEBOOK (gki);
+
+	xkl_debug (100, "Initiating the widget startup process for %p\n", gki);
+
+	ctk_notebook_set_show_tabs (notebook, FALSE);
+	ctk_notebook_set_show_border (notebook, FALSE);
+
+	def_drawing =
+	    ctk_image_new_from_icon_name ("process-stop",
+				      CTK_ICON_SIZE_BUTTON);
+
+	ctk_notebook_append_page (notebook, def_drawing,
+				  ctk_label_new (""));
+
+	if (globals.engine == NULL) {
+		cafekbd_indicator_set_tooltips (gki,
+					     _
+					     ("XKB initialization error"));
+		return;
+	}
+
+	cafekbd_indicator_set_tooltips (gki, NULL);
+
+	cafekbd_indicator_fill (gki);
+	cafekbd_indicator_set_current_page (gki);
+
+	ctk_widget_add_events (CTK_WIDGET (gki), CDK_BUTTON_PRESS_MASK);
+
+	/* append AFTER all initialization work is finished */
+	globals.widget_instances =
+	    g_slist_append (globals.widget_instances, gki);
+}
+
+static void
+cafekbd_indicator_finalize (GObject * obj)
+{
+	CafekbdIndicator *gki = CAFEKBD_INDICATOR (obj);
+	xkl_debug (100,
+		   "Starting the cafe-kbd-indicator widget shutdown process for %p\n",
+		   gki);
+
+	/* remove BEFORE all termination work is finished */
+	globals.widget_instances =
+	    g_slist_remove (globals.widget_instances, gki);
+
+	cafekbd_indicator_cleanup (gki);
+
+	xkl_debug (100,
+		   "The instance of cafe-kbd-indicator successfully finalized\n");
+
+	g_free (gki->priv);
+
+	G_OBJECT_CLASS (cafekbd_indicator_parent_class)->finalize (obj);
+
+	if (!g_slist_length (globals.widget_instances))
+		cafekbd_indicator_global_term ();
+}
+
+static void
+cafekbd_indicator_global_term (void)
+{
+	xkl_debug (100, "*** Last  CafekbdIndicator instance *** \n");
+	cafekbd_indicator_stop_listen ();
+
+	cafekbd_desktop_config_stop_listen (&globals.cfg);
+	cafekbd_indicator_config_stop_listen (&globals.ind_cfg);
+
+	cafekbd_indicator_config_term (&globals.ind_cfg);
+	cafekbd_keyboard_config_term (&globals.kbd_cfg);
+	cafekbd_desktop_config_term (&globals.cfg);
+
+	g_object_unref (G_OBJECT (globals.registry));
+	globals.registry = NULL;
+	g_object_unref (G_OBJECT (globals.engine));
+	globals.engine = NULL;
+	xkl_debug (100, "*** Terminated globals *** \n");
+}
+
+static void
+cafekbd_indicator_class_init (CafekbdIndicatorClass * klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+	CtkWidgetClass *widget_class = CTK_WIDGET_CLASS (klass);
+
+	xkl_debug (100, "*** First CafekbdIndicator instance *** \n");
+
+	memset (&globals, 0, sizeof (globals));
+
+	/* Initing some global vars */
+	globals.tooltips_format = "%s";
+
+	/* Initing vtable */
+	object_class->finalize = cafekbd_indicator_finalize;
+
+	widget_class->scroll_event = cafekbd_indicator_scroll;
+	widget_class->parent_set = cafekbd_indicator_parent_set;
+
+	/* Signals */
+	g_signal_new ("reinit-ui", CAFEKBD_TYPE_INDICATOR,
+		      G_SIGNAL_RUN_LAST,
+		      G_STRUCT_OFFSET (CafekbdIndicatorClass, reinit_ui),
+		      NULL, NULL, cafekbd_indicator_VOID__VOID,
+		      G_TYPE_NONE, 0);
+}
+
+static void
+cafekbd_indicator_global_init (void)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+
+	globals.engine = xkl_engine_get_instance(CDK_DISPLAY_XDISPLAY(cdk_display_get_default()));
+
+	if (globals.engine == NULL)
+	{
+		xkl_debug (0, "Libxklavier initialization error");
+		return;
+	}
+
+	g_signal_connect (globals.engine, "X-state-changed",
+			  G_CALLBACK (cafekbd_indicator_state_callback),
+			  NULL);
+	g_signal_connect (globals.engine, "X-config-changed",
+			  G_CALLBACK (cafekbd_indicator_kbd_cfg_callback),
+			  NULL);
+
+	cafekbd_desktop_config_init (&globals.cfg, globals.engine);
+	cafekbd_keyboard_config_init (&globals.kbd_cfg, globals.engine);
+	cafekbd_indicator_config_init (&globals.ind_cfg, globals.engine);
+
+	cafekbd_desktop_config_start_listen (&globals.cfg,
+					  (GCallback)
+					  cafekbd_indicator_cfg_changed,
+					  NULL);
+	cafekbd_indicator_config_start_listen (&globals.ind_cfg,
+					    (GCallback)
+					    cafekbd_indicator_ind_cfg_changed,
+					    NULL);
+
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+
+	globals.registry =
+	    xkl_config_registry_get_instance (globals.engine);
+	xkl_config_registry_load (globals.registry,
+				  globals.cfg.load_extra_items);
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+	cafekbd_indicator_update_images ();
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	cafekbd_indicator_load_group_names ((const gchar **) xklrec->layouts,
+					 (const gchar **)
+					 xklrec->variants);
+	g_object_unref (G_OBJECT (xklrec));
+
+	cafekbd_indicator_start_listen ();
+
+	xkl_debug (100, "*** Inited globals *** \n");
+}
+
+CtkWidget *
+cafekbd_indicator_new (void)
+{
+	return
+	    CTK_WIDGET (g_object_new (cafekbd_indicator_get_type (), NULL));
+}
+
+void
+cafekbd_indicator_set_parent_tooltips (CafekbdIndicator * gki, gboolean spt)
+{
+	gki->priv->set_parent_tooltips = spt;
+	cafekbd_indicator_update_tooltips (gki);
+}
+
+void
+cafekbd_indicator_set_tooltips_format (const gchar format[])
+{
+	globals.tooltips_format = format;
+	ForAllIndicators ()
+	    cafekbd_indicator_update_tooltips (gki);
+	NextIndicator ()
+}
+
+/**
+ * cafekbd_indicator_get_xkl_engine:
+ *
+ * Returns: (transfer none): The engine shared by all CafekbdIndicator objects
+ */
+XklEngine *
+cafekbd_indicator_get_xkl_engine ()
+{
+	return globals.engine;
+}
+
+/**
+ * cafekbd_indicator_get_group_names:
+ *
+ * Returns: (transfer none) (array zero-terminated=1): List of group names
+ */
+gchar **
+cafekbd_indicator_get_group_names ()
+{
+	return globals.full_group_names;
+}
+
+gchar *
+cafekbd_indicator_get_image_filename (guint group)
+{
+	if (!globals.ind_cfg.show_flags)
+		return NULL;
+	return cafekbd_indicator_config_get_images_file (&globals.ind_cfg,
+						      &globals.kbd_cfg,
+						      group);
+}
+
+gdouble
+cafekbd_indicator_get_max_width_height_ratio (void)
+{
+	gdouble rv = 0.0;
+	GSList *ip = globals.images;
+	if (!globals.ind_cfg.show_flags)
+		return 0;
+	while (ip != NULL) {
+		GdkPixbuf *img = GDK_PIXBUF (ip->data);
+		gdouble r =
+		    1.0 * gdk_pixbuf_get_width (img) /
+		    gdk_pixbuf_get_height (img);
+		if (r > rv)
+			rv = r;
+		ip = ip->next;
+	}
+	return rv;
+}
+
+void
+cafekbd_indicator_set_angle (CafekbdIndicator * gki, gdouble angle)
+{
+	gki->priv->angle = angle;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/3.html b/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/3.html new file mode 100644 index 0000000..2dbd2a6 --- /dev/null +++ b/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/3.html @@ -0,0 +1,1832 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <X11/keysym.h>
+
+#include <glib/gi18n-lib.h>
+
+#include <cafekbd-keyboard-config.h>
+#include <cafekbd-config-private.h>
+#include <cafekbd-util.h>
+
+/*
+ * CafekbdKeyboardConfig
+ */
+#define CAFEKBD_KEYBOARD_CONFIG_SCHEMA CAFEKBD_CONFIG_SCHEMA ".kbd"
+
+#define GROUP_SWITCHERS_GROUP "grp"
+#define DEFAULT_GROUP_SWITCH "grp:shift_caps_toggle"
+
+const gchar CAFEKBD_KEYBOARD_CONFIG_KEY_MODEL[] = "model";
+const gchar CAFEKBD_KEYBOARD_CONFIG_KEY_LAYOUTS[] = "layouts";
+const gchar CAFEKBD_KEYBOARD_CONFIG_KEY_OPTIONS[] = "options";
+
+const gchar *CAFEKBD_KEYBOARD_CONFIG_ACTIVE[] = {
+	CAFEKBD_KEYBOARD_CONFIG_KEY_MODEL,
+	CAFEKBD_KEYBOARD_CONFIG_KEY_LAYOUTS,
+	CAFEKBD_KEYBOARD_CONFIG_KEY_OPTIONS
+};
+
+/*
+ * static common functions
+ */
+
+static gboolean
+cafekbd_strv_equal (gchar ** l1, gchar ** l2)
+{
+	if (l1 == l2)
+		return TRUE;
+	if (l1 == NULL)
+		return g_strv_length (l2) == 0;
+	if (l2 == NULL)
+		return g_strv_length (l1) == 0;
+
+	while ((*l1 != NULL) && (*l2 != NULL)) {
+		if (*l1 != *l2) {
+			if (*l1 && *l2) {<--- Condition '*l1' is always true<--- Condition '*l2' is always true
+				if (g_ascii_strcasecmp (*l1, *l2))
+					return FALSE;
+			} else
+				return FALSE;
+		}
+
+		l1++;
+		l2++;
+	}
+	return (*l1 == NULL) && (*l2 == NULL);
+}
+
+gboolean
+cafekbd_keyboard_config_get_lv_descriptions (XklConfigRegistry *
+					  config_registry,
+					  const gchar * layout_name,
+					  const gchar * variant_name,
+					  gchar ** layout_short_descr,
+					  gchar ** layout_descr,
+					  gchar ** variant_short_descr,
+					  gchar ** variant_descr)
+{
+	/* TODO make it not static */
+	static XklConfigItem *litem = NULL;
+	static XklConfigItem *vitem = NULL;
+
+	if (litem == NULL)
+		litem = xkl_config_item_new ();
+	if (vitem == NULL)
+		vitem = xkl_config_item_new ();
+
+	layout_name = g_strdup (layout_name);
+
+	g_snprintf (litem->name, sizeof litem->name, "%s", layout_name);
+	if (xkl_config_registry_find_layout (config_registry, litem)) {
+		*layout_short_descr = litem->short_description;
+		*layout_descr = litem->description;
+	} else
+		*layout_short_descr = *layout_descr = NULL;
+
+	if (variant_name != NULL) {
+		variant_name = g_strdup (variant_name);
+		g_snprintf (vitem->name, sizeof vitem->name, "%s",
+			    variant_name);
+		if (xkl_config_registry_find_variant
+		    (config_registry, layout_name, vitem)) {
+			*variant_short_descr = vitem->short_description;
+			*variant_descr = vitem->description;
+		} else
+			*variant_short_descr = *variant_descr = NULL;
+
+		g_free ((char *) variant_name);
+	} else
+		*variant_descr = NULL;
+
+	g_free ((char *) layout_name);
+	return *layout_descr != NULL;
+}
+
+/*
+ * extern common functions
+ */
+const gchar *
+cafekbd_keyboard_config_merge_items (const gchar * parent,
+				  const gchar * child)
+{
+	static gchar buffer[XKL_MAX_CI_NAME_LENGTH * 2 - 1];
+	*buffer = '\0';
+	if (parent != NULL) {
+		if (strlen (parent) >= XKL_MAX_CI_NAME_LENGTH)
+			return NULL;
+		strcat (buffer, parent);
+	}
+	if (child != NULL && *child != 0) {
+		if (strlen (child) >= XKL_MAX_CI_NAME_LENGTH)
+			return NULL;
+		strcat (buffer, "\t");
+		strcat (buffer, child);
+	}
+	return buffer;
+}
+
+gboolean
+cafekbd_keyboard_config_split_items (const gchar * merged, gchar ** parent,
+				  gchar ** child)
+{
+	static gchar pbuffer[XKL_MAX_CI_NAME_LENGTH];
+	static gchar cbuffer[XKL_MAX_CI_NAME_LENGTH];
+	int plen;
+	const gchar *pos;
+	*parent = *child = NULL;
+
+	if (merged == NULL)
+		return FALSE;
+
+	pos = strchr (merged, '\t');
+	if (pos == NULL) {
+		plen = strlen (merged);
+	} else {
+		plen = pos - merged;
+		if (strlen (pos + 1) >= XKL_MAX_CI_NAME_LENGTH)
+			return FALSE;
+		strcpy (*child = cbuffer, pos + 1);
+	}
+	if (plen >= XKL_MAX_CI_NAME_LENGTH)
+		return FALSE;
+	memcpy (*parent = pbuffer, merged, plen);
+	pbuffer[plen] = '\0';
+	return TRUE;
+}
+
+/*
+ * static CafekbdKeyboardConfig functions
+ */
+static void
+cafekbd_keyboard_config_copy_from_xkl_config (CafekbdKeyboardConfig * kbd_config,
+					   XklConfigRec * pdata)
+{
+	char **p;
+	int i;
+	cafekbd_keyboard_config_model_set (kbd_config, pdata->model);
+	xkl_debug (150, "Loaded Kbd model: [%s]\n", pdata->model);
+
+	/* Layouts */
+	g_strfreev (kbd_config->layouts_variants);
+	kbd_config->layouts_variants = NULL;
+	if (pdata->layouts != NULL) {
+		char **p1;
+
+		p = pdata->layouts;
+		p1 = pdata->variants;
+		kbd_config->layouts_variants =
+		    g_new0 (gchar *, g_strv_length (pdata->layouts) + 1);
+		i = 0;
+		while (*p != NULL) {
+			const gchar *full_layout =
+			    cafekbd_keyboard_config_merge_items (*p, *p1);
+			xkl_debug (150,
+				   "Loaded Kbd layout (with variant): [%s]\n",
+				   full_layout);
+			kbd_config->layouts_variants[i++] =
+			    g_strdup (full_layout);
+			p++;
+			p1++;
+		}
+	}
+
+	/* Options */
+	g_strfreev (kbd_config->options);
+	kbd_config->options = NULL;
+
+	if (pdata->options != NULL) {
+		p = pdata->options;
+		kbd_config->options =
+		    g_new0 (gchar *, g_strv_length (pdata->options) + 1);
+		i = 0;
+		while (*p != NULL) {
+			char *option = *p;
+			char *delim =<--- Variable 'delim' can be declared as pointer to const
+			    (option != NULL) ? strchr (option, ':') : NULL;<--- Condition 'option!=NULL' is always true
+			int len;
+			if ((delim != NULL) &&
+			    ((len =
+			      (delim - option)) <
+			     XKL_MAX_CI_NAME_LENGTH)) {
+				char group[XKL_MAX_CI_NAME_LENGTH];
+
+				strncpy (group, option, len);
+				group[len] = 0;
+				xkl_debug (150,
+					   "Loaded Kbd option: [%s][%s]\n",
+					   group, option);
+				cafekbd_keyboard_config_options_set
+				    (kbd_config, i++, group, option);
+			}
+			p++;
+		}
+	}
+}
+
+static void
+cafekbd_keyboard_config_copy_to_xkl_config (CafekbdKeyboardConfig * kbd_config,
+					 XklConfigRec * pdata)
+{
+	int i;
+	int num_layouts, num_options;
+	pdata->model =
+	    (kbd_config->model ==
+	     NULL) ? NULL : g_strdup (kbd_config->model);
+
+	num_layouts =
+	    (kbd_config->layouts_variants ==
+	     NULL) ? 0 : g_strv_length (kbd_config->layouts_variants);
+	num_options =
+	    (kbd_config->options ==
+	     NULL) ? 0 : g_strv_length (kbd_config->options);
+
+	xkl_debug (150, "Taking %d layouts\n", num_layouts);
+	if (num_layouts != 0) {
+		gchar **the_layout_variant = kbd_config->layouts_variants;
+		char **p1 = pdata->layouts =
+		    g_new0 (char *, num_layouts + 1);
+		char **p2 = pdata->variants =
+		    g_new0 (char *, num_layouts + 1);
+		for (i = num_layouts; --i >= 0;) {
+			char *layout, *variant;
+			if (cafekbd_keyboard_config_split_items
+			    (*the_layout_variant, &layout, &variant)
+			    && variant != NULL) {
+				*p1 =
+				    (layout ==
+				     NULL) ? g_strdup ("") :
+				    g_strdup (layout);
+				*p2 =
+				    (variant ==<--- Condition 'variant==NULL' is always false
+				     NULL) ? g_strdup ("") :
+				    g_strdup (variant);
+			} else {
+				*p1 =
+				    (*the_layout_variant ==
+				     NULL) ? g_strdup ("") :
+				    g_strdup (*the_layout_variant);
+				*p2 = g_strdup ("");
+			}
+			xkl_debug (150, "Adding [%s]/%p and [%s]/%p\n",
+				   *p1 ? *p1 : "(nil)", *p1,
+				   *p2 ? *p2 : "(nil)", *p2);
+			p1++;
+			p2++;
+			the_layout_variant++;
+		}
+	}
+
+	if (num_options != 0) {
+		gchar **the_option = kbd_config->options;
+		char **p = pdata->options =
+		    g_new0 (char *, num_options + 1);
+		for (i = num_options; --i >= 0;) {
+			char *group, *option;
+			if (cafekbd_keyboard_config_split_items
+			    (*the_option, &group, &option)
+			    && option != NULL)
+				*(p++) = g_strdup (option);
+			else {
+				*(p++) = g_strdup ("");
+				xkl_debug (150, "Could not split [%s]\n",
+					   *the_option);
+			}
+			the_option++;
+		}
+	}
+}
+
+static void
+cafekbd_keyboard_config_load_params (CafekbdKeyboardConfig * kbd_config,
+				  const gchar * param_names[])
+{
+	gchar *pc;
+
+	pc = g_settings_get_string (kbd_config->settings, param_names[0]);
+	if (pc == NULL) {
+		cafekbd_keyboard_config_model_set (kbd_config, NULL);
+	} else {
+		cafekbd_keyboard_config_model_set (kbd_config, pc);
+		g_free (pc);
+	}
+	xkl_debug (150, "Loaded Kbd model: [%s]\n",
+		   kbd_config->model ? kbd_config->model : "(null)");
+
+	g_strfreev (kbd_config->layouts_variants);
+
+	kbd_config->layouts_variants =
+	    g_settings_get_strv (kbd_config->settings, param_names[1]);
+
+	if (kbd_config->layouts_variants != NULL
+	    && kbd_config->layouts_variants[0] == NULL) {
+		g_strfreev (kbd_config->layouts_variants);
+		kbd_config->layouts_variants = NULL;
+	}
+
+	g_strfreev (kbd_config->options);
+
+	kbd_config->options =
+	    g_settings_get_strv (kbd_config->settings, param_names[2]);
+
+	if (kbd_config->options != NULL && kbd_config->options[0] == NULL) {
+		g_strfreev (kbd_config->options);
+		kbd_config->options = NULL;
+	}
+}
+
+static void
+cafekbd_keyboard_config_save_params (CafekbdKeyboardConfig * kbd_config,
+				  const gchar * param_names[])
+{
+	gchar **pl;
+
+	if (kbd_config->model)
+		g_settings_set_string (kbd_config->settings, param_names[0],
+				       kbd_config->model);
+	else
+		g_settings_set_string (kbd_config->settings, param_names[0],
+				       NULL);
+	xkl_debug (150, "Saved Kbd model: [%s]\n",
+		   kbd_config->model ? kbd_config->model : "(null)");
+
+	if (kbd_config->layouts_variants) {
+		pl = kbd_config->layouts_variants;
+		while (*pl != NULL) {
+			xkl_debug (150, "Saved Kbd layout: [%s]\n", *pl);
+			pl++;
+		}
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[1],
+				     (const gchar * const *)
+				     kbd_config->layouts_variants);
+	} else {
+		xkl_debug (150, "Saved Kbd layouts: []\n");
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[1], NULL);
+	}
+
+	if (kbd_config->options) {
+		pl = kbd_config->options;
+		while (*pl != NULL) {
+			xkl_debug (150, "Saved Kbd option: [%s]\n", *pl);
+			pl++;
+		}
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[2],
+				     (const gchar *
+				      const *) kbd_config->options);
+	} else {
+		xkl_debug (150, "Saved Kbd options: []\n");
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[2], NULL);
+	}
+}
+
+/*
+ * extern CafekbdKeyboardConfig config functions
+ */
+void
+cafekbd_keyboard_config_init (CafekbdKeyboardConfig * kbd_config,
+			      XklEngine * engine)
+{
+	memset (kbd_config, 0, sizeof (*kbd_config));
+	kbd_config->settings = g_settings_new (CAFEKBD_KEYBOARD_CONFIG_SCHEMA);
+	kbd_config->engine = engine;
+}
+
+void
+cafekbd_keyboard_config_term (CafekbdKeyboardConfig * kbd_config)
+{
+	cafekbd_keyboard_config_model_set (kbd_config, NULL);
+
+	g_strfreev (kbd_config->layouts_variants);
+	kbd_config->layouts_variants = NULL;
+	g_strfreev (kbd_config->options);
+	kbd_config->options = NULL;
+
+	g_object_unref (kbd_config->settings);
+	kbd_config->settings = NULL;
+}
+
+void
+cafekbd_keyboard_config_load_from_gsettings (CafekbdKeyboardConfig * kbd_config,
+				      CafekbdKeyboardConfig *
+				      kbd_config_default)
+{
+	cafekbd_keyboard_config_load_params (kbd_config,
+					  CAFEKBD_KEYBOARD_CONFIG_ACTIVE);
+
+	if (kbd_config_default != NULL) {
+
+		if (kbd_config->model == NULL)
+			kbd_config->model =
+			    g_strdup (kbd_config_default->model);
+
+		if (kbd_config->layouts_variants == NULL) {
+			kbd_config->layouts_variants =
+			    g_strdupv
+			    (kbd_config_default->layouts_variants);
+		}
+
+		if (kbd_config->options == NULL) {
+			kbd_config->options =
+			    g_strdupv (kbd_config_default->options);
+		}
+	}
+}
+
+void
+cafekbd_keyboard_config_load_from_x_current (CafekbdKeyboardConfig * kbd_config,
+					  XklConfigRec * data)
+{
+	gboolean own_data = data == NULL;
+	xkl_debug (150, "Copying config from X(current)\n");
+	if (own_data)
+		data = xkl_config_rec_new ();
+	if (xkl_config_rec_get_from_server (data, kbd_config->engine))
+		cafekbd_keyboard_config_copy_from_xkl_config (kbd_config,
+							   data);
+	else
+		xkl_debug (150,
+			   "Could not load keyboard config from server: [%s]\n",
+			   xkl_get_last_error ());
+	if (own_data)
+		g_object_unref (G_OBJECT (data));
+}
+
+void
+cafekbd_keyboard_config_load_from_x_initial (CafekbdKeyboardConfig * kbd_config,
+					  XklConfigRec * data)
+{
+	gboolean own_data = data == NULL;
+	xkl_debug (150, "Copying config from X(initial)\n");
+	if (own_data)
+		data = xkl_config_rec_new ();
+	if (xkl_config_rec_get_from_backup (data, kbd_config->engine))
+		cafekbd_keyboard_config_copy_from_xkl_config (kbd_config,
+							   data);
+	else
+		xkl_debug (150,
+			   "Could not load keyboard config from backup: [%s]\n",
+			   xkl_get_last_error ());
+	if (own_data)
+		g_object_unref (G_OBJECT (data));
+}
+
+static gboolean
+cafekbd_keyboard_config_options_equals (CafekbdKeyboardConfig * kbd_config1,
+				     CafekbdKeyboardConfig * kbd_config2)
+{
+	int num_options, num_options2;
+
+	num_options =
+	    (kbd_config1->options ==
+	     NULL) ? 0 : g_strv_length (kbd_config1->options);
+	num_options2 =
+	    (kbd_config2->options ==
+	     NULL) ? 0 : g_strv_length (kbd_config2->options);
+
+	if (num_options != num_options2)
+		return False;
+
+	if (num_options != 0) {
+		int i;
+		char *group1, *option1;
+
+		for (i = 0; i < num_options; i++) {
+			int j;
+			char *group2, *option2;
+			gboolean are_equal = FALSE;
+
+			if (!cafekbd_keyboard_config_split_items
+			    (kbd_config1->options[i], &group1, &option1))
+				continue;
+
+			option1 = g_strdup (option1);
+
+			for (j = 0; j < num_options && !are_equal; j++) {
+				if (cafekbd_keyboard_config_split_items
+				    (kbd_config2->options[j], &group2,
+				     &option2)) {
+					are_equal =
+					    strcmp (option1, option2) == 0;
+				}
+			}
+
+			g_free (option1);
+
+			if (!are_equal)
+				return False;
+		}
+	}
+
+	return True;
+}
+
+gboolean
+cafekbd_keyboard_config_equals (CafekbdKeyboardConfig * kbd_config1,
+			     CafekbdKeyboardConfig * kbd_config2)
+{
+	if (kbd_config1 == kbd_config2)
+		return True;
+	if ((kbd_config1->model != kbd_config2->model) &&
+	    (kbd_config1->model != NULL) &&
+	    (kbd_config2->model != NULL) &&
+	    g_ascii_strcasecmp (kbd_config1->model, kbd_config2->model))
+		return False;
+	if (!cafekbd_strv_equal (kbd_config1->layouts_variants,
+			   kbd_config2->layouts_variants))
+		return False;
+
+	if (!cafekbd_keyboard_config_options_equals
+	    (kbd_config1, kbd_config2))
+		return False;
+
+	return True;
+}
+
+void
+cafekbd_keyboard_config_save_to_gsettings (CafekbdKeyboardConfig * kbd_config)
+{
+	g_settings_delay (kbd_config->settings);
+
+	cafekbd_keyboard_config_save_params (kbd_config,
+					     CAFEKBD_KEYBOARD_CONFIG_ACTIVE);
+
+	g_settings_apply (kbd_config->settings);
+}
+
+void
+cafekbd_keyboard_config_model_set (CafekbdKeyboardConfig * kbd_config,
+				const gchar * model_name)
+{
+	if (kbd_config->model != NULL)
+		g_free (kbd_config->model);
+	kbd_config->model =
+	    (model_name == NULL
+	     || model_name[0] == '\0') ? NULL : g_strdup (model_name);
+}
+
+void
+cafekbd_keyboard_config_options_set (CafekbdKeyboardConfig * kbd_config,
+				  gint idx,
+				  const gchar * group_name,
+				  const gchar * option_name)
+{
+	const gchar *merged;
+	if (group_name == NULL || option_name == NULL)
+		return;
+	merged =
+	    cafekbd_keyboard_config_merge_items (group_name, option_name);
+	if (merged == NULL)
+		return;
+	kbd_config->options[idx] = g_strdup (merged);
+}
+
+gboolean
+cafekbd_keyboard_config_options_is_set (CafekbdKeyboardConfig * kbd_config,<--- Parameter 'kbd_config' can be declared as pointer to const
+				     const gchar * group_name,
+				     const gchar * option_name)
+{
+	gchar **p = kbd_config->options;
+	const gchar *merged =
+	    cafekbd_keyboard_config_merge_items (group_name, option_name);
+	if (merged == NULL)
+		return FALSE;
+
+	while (p && *p) {
+		if (!g_ascii_strcasecmp (merged, *p++))
+			return TRUE;
+	}
+	return FALSE;
+}
+
+gboolean
+cafekbd_keyboard_config_activate (CafekbdKeyboardConfig * kbd_config)
+{
+	gboolean rv;
+	XklConfigRec *data = xkl_config_rec_new ();
+
+	cafekbd_keyboard_config_copy_to_xkl_config (kbd_config, data);
+	rv = xkl_config_rec_activate (data, kbd_config->engine);
+	g_object_unref (G_OBJECT (data));
+
+	return rv;
+}
+
+/**
+ * cafekbd_keyboard_config_start_listen:
+ * @func: (scope notified): a function to call when settings are changed
+ */
+void
+cafekbd_keyboard_config_start_listen (CafekbdKeyboardConfig * kbd_config,
+				   GCallback func,
+				   gpointer user_data)
+{
+	kbd_config->config_listener_id =
+	    g_signal_connect (kbd_config->settings, "changed", func,
+			      user_data);
+}
+
+void
+cafekbd_keyboard_config_stop_listen (CafekbdKeyboardConfig * kbd_config)
+{
+	g_signal_handler_disconnect (kbd_config->settings,
+				     kbd_config->config_listener_id);
+	kbd_config->config_listener_id = 0;
+}
+
+gboolean
+cafekbd_keyboard_config_get_descriptions (XklConfigRegistry * config_registry,
+				       const gchar * name,
+				       gchar ** layout_short_descr,
+				       gchar ** layout_descr,
+				       gchar ** variant_short_descr,
+				       gchar ** variant_descr)
+{
+	char *layout_name = NULL, *variant_name = NULL;
+	if (!cafekbd_keyboard_config_split_items
+	    (name, &layout_name, &variant_name))
+		return FALSE;
+	return cafekbd_keyboard_config_get_lv_descriptions (config_registry,
+							 layout_name,
+							 variant_name,
+							 layout_short_descr,
+							 layout_descr,
+							 variant_short_descr,
+							 variant_descr);
+}
+
+const gchar *
+cafekbd_keyboard_config_format_full_layout (const gchar * layout_descr,
+					 const gchar * variant_descr)
+{
+	static gchar full_descr[XKL_MAX_CI_DESC_LENGTH * 2];
+	if (variant_descr == NULL || variant_descr[0] == 0)
+		g_snprintf (full_descr, sizeof (full_descr), "%s",
+			    layout_descr);
+	else
+		g_snprintf (full_descr, sizeof (full_descr), "%s %s",
+			    layout_descr, variant_descr);
+	return full_descr;
+}
+
+gchar *
+cafekbd_keyboard_config_to_string (const CafekbdKeyboardConfig * config)
+{
+	gchar *layouts = NULL, *options = NULL;
+	GString *buffer = g_string_new (NULL);
+
+	gchar **iter;
+	gint count;
+	gchar *result;
+
+	if (config->layouts_variants) {
+		/* g_slist_length is "expensive", so we determinate the length on the fly */
+		for (iter = config->layouts_variants, count = 0; *iter;
+		     iter++, ++count) {
+			if (buffer->len)
+				g_string_append (buffer, " ");
+
+			g_string_append (buffer, *iter);
+		}
+
+		/* Translators: The count is related to the number of options. The %s
+		 * format specifier should not be modified, left "as is". */
+		layouts =
+		    g_strdup_printf (ngettext
+				     ("layout \"%s\"", "layouts \"%s\"",
+				      count), buffer->str);
+		g_string_truncate (buffer, 0);
+	}
+	if (config->options) {
+		/* g_slist_length is "expensive", so we determinate the length on the fly */
+		for (iter = config->options, count = 0; *iter;
+		     iter++, ++count) {
+			if (buffer->len)
+				g_string_append (buffer, " ");
+
+			g_string_append (buffer, *iter);
+		}
+
+		/* Translators: The count is related to the number of options. The %s
+		 * format specifier should not be modified, left "as is". */
+		options =
+		    g_strdup_printf (ngettext
+				     ("option \"%s\"", "options \"%s\"",
+				      count), buffer->str);
+		g_string_truncate (buffer, 0);
+	}
+
+	g_string_free (buffer, TRUE);
+
+	result =
+	    g_strdup_printf (_("model \"%s\", %s and %s"), config->model,
+			     layouts ? layouts : _("no layout"),
+			     options ? options : _("no options"));
+
+	g_free (options);
+	g_free (layouts);
+
+	return result;
+}
+
+/**
+ * cafekbd_keyboard_config_add_default_switch_option_if_necessary:
+ *
+ * Returns: (transfer full) (array zero-terminated=1): List of options
+ */
+gchar **
+cafekbd_keyboard_config_add_default_switch_option_if_necessary (gchar **
+							        layouts_list,
+							        gchar **
+							        options_list,
+							        gboolean *was_appended)
+{
+	*was_appended = FALSE;
+	if (g_strv_length (layouts_list) >= 2) {
+		gboolean any_switcher = False;
+		if (*options_list != NULL) {
+			gchar **option = options_list;
+			while (*option != NULL) {
+				char *g, *o;
+				if (cafekbd_keyboard_config_split_items
+				    (*option, &g, &o)) {
+					if (!g_ascii_strcasecmp
+					    (g, GROUP_SWITCHERS_GROUP)) {
+						any_switcher = True;
+						break;
+					}
+				}
+				option++;
+			}
+		}
+		if (!any_switcher) {
+			const gchar *id =
+			    cafekbd_keyboard_config_merge_items
+			    (GROUP_SWITCHERS_GROUP,
+			     DEFAULT_GROUP_SWITCH);
+			options_list =
+			    cafekbd_strv_append (options_list, g_strdup (id));
+			*was_appended = TRUE;
+		}
+	}
+	return options_list;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/4.html b/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/4.html new file mode 100644 index 0000000..1d97c26 --- /dev/null +++ b/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/4.html @@ -0,0 +1,6042 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
   1
+   2
+   3
+   4
+   5
+   6
+   7
+   8
+   9
+  10
+  11
+  12
+  13
+  14
+  15
+  16
+  17
+  18
+  19
+  20
+  21
+  22
+  23
+  24
+  25
+  26
+  27
+  28
+  29
+  30
+  31
+  32
+  33
+  34
+  35
+  36
+  37
+  38
+  39
+  40
+  41
+  42
+  43
+  44
+  45
+  46
+  47
+  48
+  49
+  50
+  51
+  52
+  53
+  54
+  55
+  56
+  57
+  58
+  59
+  60
+  61
+  62
+  63
+  64
+  65
+  66
+  67
+  68
+  69
+  70
+  71
+  72
+  73
+  74
+  75
+  76
+  77
+  78
+  79
+  80
+  81
+  82
+  83
+  84
+  85
+  86
+  87
+  88
+  89
+  90
+  91
+  92
+  93
+  94
+  95
+  96
+  97
+  98
+  99
+ 100
+ 101
+ 102
+ 103
+ 104
+ 105
+ 106
+ 107
+ 108
+ 109
+ 110
+ 111
+ 112
+ 113
+ 114
+ 115
+ 116
+ 117
+ 118
+ 119
+ 120
+ 121
+ 122
+ 123
+ 124
+ 125
+ 126
+ 127
+ 128
+ 129
+ 130
+ 131
+ 132
+ 133
+ 134
+ 135
+ 136
+ 137
+ 138
+ 139
+ 140
+ 141
+ 142
+ 143
+ 144
+ 145
+ 146
+ 147
+ 148
+ 149
+ 150
+ 151
+ 152
+ 153
+ 154
+ 155
+ 156
+ 157
+ 158
+ 159
+ 160
+ 161
+ 162
+ 163
+ 164
+ 165
+ 166
+ 167
+ 168
+ 169
+ 170
+ 171
+ 172
+ 173
+ 174
+ 175
+ 176
+ 177
+ 178
+ 179
+ 180
+ 181
+ 182
+ 183
+ 184
+ 185
+ 186
+ 187
+ 188
+ 189
+ 190
+ 191
+ 192
+ 193
+ 194
+ 195
+ 196
+ 197
+ 198
+ 199
+ 200
+ 201
+ 202
+ 203
+ 204
+ 205
+ 206
+ 207
+ 208
+ 209
+ 210
+ 211
+ 212
+ 213
+ 214
+ 215
+ 216
+ 217
+ 218
+ 219
+ 220
+ 221
+ 222
+ 223
+ 224
+ 225
+ 226
+ 227
+ 228
+ 229
+ 230
+ 231
+ 232
+ 233
+ 234
+ 235
+ 236
+ 237
+ 238
+ 239
+ 240
+ 241
+ 242
+ 243
+ 244
+ 245
+ 246
+ 247
+ 248
+ 249
+ 250
+ 251
+ 252
+ 253
+ 254
+ 255
+ 256
+ 257
+ 258
+ 259
+ 260
+ 261
+ 262
+ 263
+ 264
+ 265
+ 266
+ 267
+ 268
+ 269
+ 270
+ 271
+ 272
+ 273
+ 274
+ 275
+ 276
+ 277
+ 278
+ 279
+ 280
+ 281
+ 282
+ 283
+ 284
+ 285
+ 286
+ 287
+ 288
+ 289
+ 290
+ 291
+ 292
+ 293
+ 294
+ 295
+ 296
+ 297
+ 298
+ 299
+ 300
+ 301
+ 302
+ 303
+ 304
+ 305
+ 306
+ 307
+ 308
+ 309
+ 310
+ 311
+ 312
+ 313
+ 314
+ 315
+ 316
+ 317
+ 318
+ 319
+ 320
+ 321
+ 322
+ 323
+ 324
+ 325
+ 326
+ 327
+ 328
+ 329
+ 330
+ 331
+ 332
+ 333
+ 334
+ 335
+ 336
+ 337
+ 338
+ 339
+ 340
+ 341
+ 342
+ 343
+ 344
+ 345
+ 346
+ 347
+ 348
+ 349
+ 350
+ 351
+ 352
+ 353
+ 354
+ 355
+ 356
+ 357
+ 358
+ 359
+ 360
+ 361
+ 362
+ 363
+ 364
+ 365
+ 366
+ 367
+ 368
+ 369
+ 370
+ 371
+ 372
+ 373
+ 374
+ 375
+ 376
+ 377
+ 378
+ 379
+ 380
+ 381
+ 382
+ 383
+ 384
+ 385
+ 386
+ 387
+ 388
+ 389
+ 390
+ 391
+ 392
+ 393
+ 394
+ 395
+ 396
+ 397
+ 398
+ 399
+ 400
+ 401
+ 402
+ 403
+ 404
+ 405
+ 406
+ 407
+ 408
+ 409
+ 410
+ 411
+ 412
+ 413
+ 414
+ 415
+ 416
+ 417
+ 418
+ 419
+ 420
+ 421
+ 422
+ 423
+ 424
+ 425
+ 426
+ 427
+ 428
+ 429
+ 430
+ 431
+ 432
+ 433
+ 434
+ 435
+ 436
+ 437
+ 438
+ 439
+ 440
+ 441
+ 442
+ 443
+ 444
+ 445
+ 446
+ 447
+ 448
+ 449
+ 450
+ 451
+ 452
+ 453
+ 454
+ 455
+ 456
+ 457
+ 458
+ 459
+ 460
+ 461
+ 462
+ 463
+ 464
+ 465
+ 466
+ 467
+ 468
+ 469
+ 470
+ 471
+ 472
+ 473
+ 474
+ 475
+ 476
+ 477
+ 478
+ 479
+ 480
+ 481
+ 482
+ 483
+ 484
+ 485
+ 486
+ 487
+ 488
+ 489
+ 490
+ 491
+ 492
+ 493
+ 494
+ 495
+ 496
+ 497
+ 498
+ 499
+ 500
+ 501
+ 502
+ 503
+ 504
+ 505
+ 506
+ 507
+ 508
+ 509
+ 510
+ 511
+ 512
+ 513
+ 514
+ 515
+ 516
+ 517
+ 518
+ 519
+ 520
+ 521
+ 522
+ 523
+ 524
+ 525
+ 526
+ 527
+ 528
+ 529
+ 530
+ 531
+ 532
+ 533
+ 534
+ 535
+ 536
+ 537
+ 538
+ 539
+ 540
+ 541
+ 542
+ 543
+ 544
+ 545
+ 546
+ 547
+ 548
+ 549
+ 550
+ 551
+ 552
+ 553
+ 554
+ 555
+ 556
+ 557
+ 558
+ 559
+ 560
+ 561
+ 562
+ 563
+ 564
+ 565
+ 566
+ 567
+ 568
+ 569
+ 570
+ 571
+ 572
+ 573
+ 574
+ 575
+ 576
+ 577
+ 578
+ 579
+ 580
+ 581
+ 582
+ 583
+ 584
+ 585
+ 586
+ 587
+ 588
+ 589
+ 590
+ 591
+ 592
+ 593
+ 594
+ 595
+ 596
+ 597
+ 598
+ 599
+ 600
+ 601
+ 602
+ 603
+ 604
+ 605
+ 606
+ 607
+ 608
+ 609
+ 610
+ 611
+ 612
+ 613
+ 614
+ 615
+ 616
+ 617
+ 618
+ 619
+ 620
+ 621
+ 622
+ 623
+ 624
+ 625
+ 626
+ 627
+ 628
+ 629
+ 630
+ 631
+ 632
+ 633
+ 634
+ 635
+ 636
+ 637
+ 638
+ 639
+ 640
+ 641
+ 642
+ 643
+ 644
+ 645
+ 646
+ 647
+ 648
+ 649
+ 650
+ 651
+ 652
+ 653
+ 654
+ 655
+ 656
+ 657
+ 658
+ 659
+ 660
+ 661
+ 662
+ 663
+ 664
+ 665
+ 666
+ 667
+ 668
+ 669
+ 670
+ 671
+ 672
+ 673
+ 674
+ 675
+ 676
+ 677
+ 678
+ 679
+ 680
+ 681
+ 682
+ 683
+ 684
+ 685
+ 686
+ 687
+ 688
+ 689
+ 690
+ 691
+ 692
+ 693
+ 694
+ 695
+ 696
+ 697
+ 698
+ 699
+ 700
+ 701
+ 702
+ 703
+ 704
+ 705
+ 706
+ 707
+ 708
+ 709
+ 710
+ 711
+ 712
+ 713
+ 714
+ 715
+ 716
+ 717
+ 718
+ 719
+ 720
+ 721
+ 722
+ 723
+ 724
+ 725
+ 726
+ 727
+ 728
+ 729
+ 730
+ 731
+ 732
+ 733
+ 734
+ 735
+ 736
+ 737
+ 738
+ 739
+ 740
+ 741
+ 742
+ 743
+ 744
+ 745
+ 746
+ 747
+ 748
+ 749
+ 750
+ 751
+ 752
+ 753
+ 754
+ 755
+ 756
+ 757
+ 758
+ 759
+ 760
+ 761
+ 762
+ 763
+ 764
+ 765
+ 766
+ 767
+ 768
+ 769
+ 770
+ 771
+ 772
+ 773
+ 774
+ 775
+ 776
+ 777
+ 778
+ 779
+ 780
+ 781
+ 782
+ 783
+ 784
+ 785
+ 786
+ 787
+ 788
+ 789
+ 790
+ 791
+ 792
+ 793
+ 794
+ 795
+ 796
+ 797
+ 798
+ 799
+ 800
+ 801
+ 802
+ 803
+ 804
+ 805
+ 806
+ 807
+ 808
+ 809
+ 810
+ 811
+ 812
+ 813
+ 814
+ 815
+ 816
+ 817
+ 818
+ 819
+ 820
+ 821
+ 822
+ 823
+ 824
+ 825
+ 826
+ 827
+ 828
+ 829
+ 830
+ 831
+ 832
+ 833
+ 834
+ 835
+ 836
+ 837
+ 838
+ 839
+ 840
+ 841
+ 842
+ 843
+ 844
+ 845
+ 846
+ 847
+ 848
+ 849
+ 850
+ 851
+ 852
+ 853
+ 854
+ 855
+ 856
+ 857
+ 858
+ 859
+ 860
+ 861
+ 862
+ 863
+ 864
+ 865
+ 866
+ 867
+ 868
+ 869
+ 870
+ 871
+ 872
+ 873
+ 874
+ 875
+ 876
+ 877
+ 878
+ 879
+ 880
+ 881
+ 882
+ 883
+ 884
+ 885
+ 886
+ 887
+ 888
+ 889
+ 890
+ 891
+ 892
+ 893
+ 894
+ 895
+ 896
+ 897
+ 898
+ 899
+ 900
+ 901
+ 902
+ 903
+ 904
+ 905
+ 906
+ 907
+ 908
+ 909
+ 910
+ 911
+ 912
+ 913
+ 914
+ 915
+ 916
+ 917
+ 918
+ 919
+ 920
+ 921
+ 922
+ 923
+ 924
+ 925
+ 926
+ 927
+ 928
+ 929
+ 930
+ 931
+ 932
+ 933
+ 934
+ 935
+ 936
+ 937
+ 938
+ 939
+ 940
+ 941
+ 942
+ 943
+ 944
+ 945
+ 946
+ 947
+ 948
+ 949
+ 950
+ 951
+ 952
+ 953
+ 954
+ 955
+ 956
+ 957
+ 958
+ 959
+ 960
+ 961
+ 962
+ 963
+ 964
+ 965
+ 966
+ 967
+ 968
+ 969
+ 970
+ 971
+ 972
+ 973
+ 974
+ 975
+ 976
+ 977
+ 978
+ 979
+ 980
+ 981
+ 982
+ 983
+ 984
+ 985
+ 986
+ 987
+ 988
+ 989
+ 990
+ 991
+ 992
+ 993
+ 994
+ 995
+ 996
+ 997
+ 998
+ 999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+1011
+1012
+1013
+1014
+1015
+1016
+1017
+1018
+1019
+1020
+1021
+1022
+1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
+1033
+1034
+1035
+1036
+1037
+1038
+1039
+1040
+1041
+1042
+1043
+1044
+1045
+1046
+1047
+1048
+1049
+1050
+1051
+1052
+1053
+1054
+1055
+1056
+1057
+1058
+1059
+1060
+1061
+1062
+1063
+1064
+1065
+1066
+1067
+1068
+1069
+1070
+1071
+1072
+1073
+1074
+1075
+1076
+1077
+1078
+1079
+1080
+1081
+1082
+1083
+1084
+1085
+1086
+1087
+1088
+1089
+1090
+1091
+1092
+1093
+1094
+1095
+1096
+1097
+1098
+1099
+1100
+1101
+1102
+1103
+1104
+1105
+1106
+1107
+1108
+1109
+1110
+1111
+1112
+1113
+1114
+1115
+1116
+1117
+1118
+1119
+1120
+1121
+1122
+1123
+1124
+1125
+1126
+1127
+1128
+1129
+1130
+1131
+1132
+1133
+1134
+1135
+1136
+1137
+1138
+1139
+1140
+1141
+1142
+1143
+1144
+1145
+1146
+1147
+1148
+1149
+1150
+1151
+1152
+1153
+1154
+1155
+1156
+1157
+1158
+1159
+1160
+1161
+1162
+1163
+1164
+1165
+1166
+1167
+1168
+1169
+1170
+1171
+1172
+1173
+1174
+1175
+1176
+1177
+1178
+1179
+1180
+1181
+1182
+1183
+1184
+1185
+1186
+1187
+1188
+1189
+1190
+1191
+1192
+1193
+1194
+1195
+1196
+1197
+1198
+1199
+1200
+1201
+1202
+1203
+1204
+1205
+1206
+1207
+1208
+1209
+1210
+1211
+1212
+1213
+1214
+1215
+1216
+1217
+1218
+1219
+1220
+1221
+1222
+1223
+1224
+1225
+1226
+1227
+1228
+1229
+1230
+1231
+1232
+1233
+1234
+1235
+1236
+1237
+1238
+1239
+1240
+1241
+1242
+1243
+1244
+1245
+1246
+1247
+1248
+1249
+1250
+1251
+1252
+1253
+1254
+1255
+1256
+1257
+1258
+1259
+1260
+1261
+1262
+1263
+1264
+1265
+1266
+1267
+1268
+1269
+1270
+1271
+1272
+1273
+1274
+1275
+1276
+1277
+1278
+1279
+1280
+1281
+1282
+1283
+1284
+1285
+1286
+1287
+1288
+1289
+1290
+1291
+1292
+1293
+1294
+1295
+1296
+1297
+1298
+1299
+1300
+1301
+1302
+1303
+1304
+1305
+1306
+1307
+1308
+1309
+1310
+1311
+1312
+1313
+1314
+1315
+1316
+1317
+1318
+1319
+1320
+1321
+1322
+1323
+1324
+1325
+1326
+1327
+1328
+1329
+1330
+1331
+1332
+1333
+1334
+1335
+1336
+1337
+1338
+1339
+1340
+1341
+1342
+1343
+1344
+1345
+1346
+1347
+1348
+1349
+1350
+1351
+1352
+1353
+1354
+1355
+1356
+1357
+1358
+1359
+1360
+1361
+1362
+1363
+1364
+1365
+1366
+1367
+1368
+1369
+1370
+1371
+1372
+1373
+1374
+1375
+1376
+1377
+1378
+1379
+1380
+1381
+1382
+1383
+1384
+1385
+1386
+1387
+1388
+1389
+1390
+1391
+1392
+1393
+1394
+1395
+1396
+1397
+1398
+1399
+1400
+1401
+1402
+1403
+1404
+1405
+1406
+1407
+1408
+1409
+1410
+1411
+1412
+1413
+1414
+1415
+1416
+1417
+1418
+1419
+1420
+1421
+1422
+1423
+1424
+1425
+1426
+1427
+1428
+1429
+1430
+1431
+1432
+1433
+1434
+1435
+1436
+1437
+1438
+1439
+1440
+1441
+1442
+1443
+1444
+1445
+1446
+1447
+1448
+1449
+1450
+1451
+1452
+1453
+1454
+1455
+1456
+1457
+1458
+1459
+1460
+1461
+1462
+1463
+1464
+1465
+1466
+1467
+1468
+1469
+1470
+1471
+1472
+1473
+1474
+1475
+1476
+1477
+1478
+1479
+1480
+1481
+1482
+1483
+1484
+1485
+1486
+1487
+1488
+1489
+1490
+1491
+1492
+1493
+1494
+1495
+1496
+1497
+1498
+1499
+1500
+1501
+1502
+1503
+1504
+1505
+1506
+1507
+1508
+1509
+1510
+1511
+1512
+1513
+1514
+1515
+1516
+1517
+1518
+1519
+1520
+1521
+1522
+1523
+1524
+1525
+1526
+1527
+1528
+1529
+1530
+1531
+1532
+1533
+1534
+1535
+1536
+1537
+1538
+1539
+1540
+1541
+1542
+1543
+1544
+1545
+1546
+1547
+1548
+1549
+1550
+1551
+1552
+1553
+1554
+1555
+1556
+1557
+1558
+1559
+1560
+1561
+1562
+1563
+1564
+1565
+1566
+1567
+1568
+1569
+1570
+1571
+1572
+1573
+1574
+1575
+1576
+1577
+1578
+1579
+1580
+1581
+1582
+1583
+1584
+1585
+1586
+1587
+1588
+1589
+1590
+1591
+1592
+1593
+1594
+1595
+1596
+1597
+1598
+1599
+1600
+1601
+1602
+1603
+1604
+1605
+1606
+1607
+1608
+1609
+1610
+1611
+1612
+1613
+1614
+1615
+1616
+1617
+1618
+1619
+1620
+1621
+1622
+1623
+1624
+1625
+1626
+1627
+1628
+1629
+1630
+1631
+1632
+1633
+1634
+1635
+1636
+1637
+1638
+1639
+1640
+1641
+1642
+1643
+1644
+1645
+1646
+1647
+1648
+1649
+1650
+1651
+1652
+1653
+1654
+1655
+1656
+1657
+1658
+1659
+1660
+1661
+1662
+1663
+1664
+1665
+1666
+1667
+1668
+1669
+1670
+1671
+1672
+1673
+1674
+1675
+1676
+1677
+1678
+1679
+1680
+1681
+1682
+1683
+1684
+1685
+1686
+1687
+1688
+1689
+1690
+1691
+1692
+1693
+1694
+1695
+1696
+1697
+1698
+1699
+1700
+1701
+1702
+1703
+1704
+1705
+1706
+1707
+1708
+1709
+1710
+1711
+1712
+1713
+1714
+1715
+1716
+1717
+1718
+1719
+1720
+1721
+1722
+1723
+1724
+1725
+1726
+1727
+1728
+1729
+1730
+1731
+1732
+1733
+1734
+1735
+1736
+1737
+1738
+1739
+1740
+1741
+1742
+1743
+1744
+1745
+1746
+1747
+1748
+1749
+1750
+1751
+1752
+1753
+1754
+1755
+1756
+1757
+1758
+1759
+1760
+1761
+1762
+1763
+1764
+1765
+1766
+1767
+1768
+1769
+1770
+1771
+1772
+1773
+1774
+1775
+1776
+1777
+1778
+1779
+1780
+1781
+1782
+1783
+1784
+1785
+1786
+1787
+1788
+1789
+1790
+1791
+1792
+1793
+1794
+1795
+1796
+1797
+1798
+1799
+1800
+1801
+1802
+1803
+1804
+1805
+1806
+1807
+1808
+1809
+1810
+1811
+1812
+1813
+1814
+1815
+1816
+1817
+1818
+1819
+1820
+1821
+1822
+1823
+1824
+1825
+1826
+1827
+1828
+1829
+1830
+1831
+1832
+1833
+1834
+1835
+1836
+1837
+1838
+1839
+1840
+1841
+1842
+1843
+1844
+1845
+1846
+1847
+1848
+1849
+1850
+1851
+1852
+1853
+1854
+1855
+1856
+1857
+1858
+1859
+1860
+1861
+1862
+1863
+1864
+1865
+1866
+1867
+1868
+1869
+1870
+1871
+1872
+1873
+1874
+1875
+1876
+1877
+1878
+1879
+1880
+1881
+1882
+1883
+1884
+1885
+1886
+1887
+1888
+1889
+1890
+1891
+1892
+1893
+1894
+1895
+1896
+1897
+1898
+1899
+1900
+1901
+1902
+1903
+1904
+1905
+1906
+1907
+1908
+1909
+1910
+1911
+1912
+1913
+1914
+1915
+1916
+1917
+1918
+1919
+1920
+1921
+1922
+1923
+1924
+1925
+1926
+1927
+1928
+1929
+1930
+1931
+1932
+1933
+1934
+1935
+1936
+1937
+1938
+1939
+1940
+1941
+1942
+1943
+1944
+1945
+1946
+1947
+1948
+1949
+1950
+1951
+1952
+1953
+1954
+1955
+1956
+1957
+1958
+1959
+1960
+1961
+1962
+1963
+1964
+1965
+1966
+1967
+1968
+1969
+1970
+1971
+1972
+1973
+1974
+1975
+1976
+1977
+1978
+1979
+1980
+1981
+1982
+1983
+1984
+1985
+1986
+1987
+1988
+1989
+1990
+1991
+1992
+1993
+1994
+1995
+1996
+1997
+1998
+1999
+2000
+2001
+2002
+2003
+2004
+2005
+2006
+2007
+2008
+2009
+2010
+2011
+2012
+2013
+2014
+2015
+2016
+2017
+2018
+2019
+2020
+2021
+2022
+2023
+2024
+2025
+2026
+2027
+2028
+2029
+2030
+2031
+2032
+2033
+2034
+2035
+2036
+2037
+2038
+2039
+2040
+2041
+2042
+2043
+2044
+2045
+2046
+2047
+2048
+2049
+2050
+2051
+2052
+2053
+2054
+2055
+2056
+2057
+2058
+2059
+2060
+2061
+2062
+2063
+2064
+2065
+2066
+2067
+2068
+2069
+2070
+2071
+2072
+2073
+2074
+2075
+2076
+2077
+2078
+2079
+2080
+2081
+2082
+2083
+2084
+2085
+2086
+2087
+2088
+2089
+2090
+2091
+2092
+2093
+2094
+2095
+2096
+2097
+2098
+2099
+2100
+2101
+2102
+2103
+2104
+2105
+2106
+2107
+2108
+2109
+2110
+2111
+2112
+2113
+2114
+2115
+2116
+2117
+2118
+2119
+2120
+2121
+2122
+2123
+2124
+2125
+2126
+2127
+2128
+2129
+2130
+2131
+2132
+2133
+2134
+2135
+2136
+2137
+2138
+2139
+2140
+2141
+2142
+2143
+2144
+2145
+2146
+2147
+2148
+2149
+2150
+2151
+2152
+2153
+2154
+2155
+2156
+2157
+2158
+2159
+2160
+2161
+2162
+2163
+2164
+2165
+2166
+2167
+2168
+2169
+2170
+2171
+2172
+2173
+2174
+2175
+2176
+2177
+2178
+2179
+2180
+2181
+2182
+2183
+2184
+2185
+2186
+2187
+2188
+2189
+2190
+2191
+2192
+2193
+2194
+2195
+2196
+2197
+2198
+2199
+2200
+2201
+2202
+2203
+2204
+2205
+2206
+2207
+2208
+2209
+2210
+2211
+2212
+2213
+2214
+2215
+2216
+2217
+2218
+2219
+2220
+2221
+2222
+2223
+2224
+2225
+2226
+2227
+2228
+2229
+2230
+2231
+2232
+2233
+2234
+2235
+2236
+2237
+2238
+2239
+2240
+2241
+2242
+2243
+2244
+2245
+2246
+2247
+2248
+2249
+2250
+2251
+2252
+2253
+2254
+2255
+2256
+2257
+2258
+2259
+2260
+2261
+2262
+2263
+2264
+2265
+2266
+2267
+2268
+2269
+2270
+2271
+2272
+2273
+2274
+2275
+2276
+2277
+2278
+2279
+2280
+2281
+2282
+2283
+2284
+2285
+2286
+2287
+2288
+2289
+2290
+2291
+2292
+2293
+2294
+2295
+2296
+2297
+2298
+2299
+2300
+2301
+2302
+2303
+2304
+2305
+2306
+2307
+2308
+2309
+2310
+2311
+2312
+2313
+2314
+2315
+2316
+2317
+2318
+2319
+2320
+2321
+2322
+2323
+2324
+2325
+2326
+2327
+2328
+2329
+2330
+2331
+2332
+2333
+2334
+2335
+2336
+2337
+2338
+2339
+2340
+2341
+2342
+2343
+2344
+2345
+2346
+2347
+2348
+2349
+2350
+2351
+2352
+2353
+2354
+2355
+2356
+2357
+2358
+2359
+2360
+2361
+2362
+2363
+2364
+2365
+2366
+2367
+2368
+2369
+2370
+2371
+2372
+2373
+2374
+2375
+2376
+2377
+2378
+2379
+2380
+2381
+2382
+2383
+2384
+2385
+2386
+2387
+2388
+2389
+2390
+2391
+2392
+2393
+2394
+2395
+2396
+2397
+2398
+2399
+2400
+2401
+2402
+2403
+2404
+2405
+2406
+2407
+2408
+2409
+2410
+2411
+2412
+2413
+2414
+2415
+2416
+2417
+2418
+2419
+2420
+2421
+2422
+2423
+2424
+2425
+2426
+2427
+2428
+2429
+2430
+2431
+2432
+2433
+2434
+2435
+2436
+2437
+2438
+2439
+2440
+2441
+2442
+2443
+2444
+2445
+2446
+2447
+2448
+2449
+2450
+2451
+2452
+2453
+2454
+2455
+2456
+2457
+2458
+2459
+2460
+2461
+2462
+2463
+2464
+2465
+2466
+2467
+2468
+2469
+2470
+2471
+2472
+2473
+2474
+2475
+2476
+2477
+2478
+2479
+2480
+2481
+2482
+2483
+2484
+2485
+2486
+2487
+2488
+2489
+2490
+2491
+2492
+2493
+2494
+2495
+2496
+2497
+2498
+2499
+2500
+2501
+2502
+2503
+2504
+2505
+2506
+2507
+2508
+2509
+2510
+2511
+2512
+2513
+2514
+2515
+2516
+2517
+2518
+2519
+2520
+2521
+2522
+2523
+2524
+2525
+2526
+2527
+2528
+2529
+2530
+2531
+2532
+2533
+2534
+2535
+2536
+2537
+2538
+2539
+2540
+2541
+2542
+2543
+2544
+2545
+2546
+2547
+2548
+2549
+2550
+2551
+2552
+2553
+2554
+2555
+2556
+2557
+2558
+2559
+2560
+2561
+2562
+2563
+2564
+2565
+2566
+2567
+2568
+2569
+2570
+2571
+2572
+2573
+2574
+2575
+2576
+2577
+2578
+2579
+2580
+2581
+2582
+2583
+2584
+2585
+2586
+2587
+2588
+2589
+2590
+2591
+2592
+2593
+2594
+2595
+2596
+2597
+2598
+2599
+2600
+2601
+2602
+2603
+2604
+2605
+2606
+2607
+2608
+2609
+2610
+2611
+2612
+2613
+2614
+2615
+2616
+2617
+2618
+2619
+2620
+2621
+2622
+2623
+2624
+2625
+2626
+2627
+2628
+2629
+2630
+2631
+2632
+2633
+2634
+2635
+2636
+2637
+2638
+2639
+2640
+2641
+2642
+2643
+2644
+2645
+2646
+2647
+2648
+2649
+2650
+2651
+2652
+2653
+2654
+2655
+2656
+2657
+2658
+2659
+2660
+2661
+2662
+2663
+2664
+2665
+2666
+2667
+2668
+2669
+2670
+2671
+2672
+2673
+2674
+2675
+2676
+2677
+2678
+2679
+2680
+2681
+2682
+2683
+2684
+2685
+2686
+2687
+2688
+2689
+2690
+2691
+2692
+2693
+2694
+2695
+2696
+2697
+2698
+2699
+2700
+2701
+2702
+2703
+2704
+2705
+2706
+2707
+2708
+2709
+2710
+2711
+2712
+2713
+2714
+2715
+2716
+2717
+2718
+2719
+2720
+2721
+2722
+2723
+2724
+2725
+2726
+2727
+2728
+2729
+2730
+2731
+2732
+2733
+2734
+2735
+2736
+2737
+2738
+2739
+2740
+2741
+2742
+2743
+2744
+2745
+2746
+2747
+2748
+2749
+2750
+2751
+2752
+2753
+2754
+2755
+2756
+2757
+2758
+2759
+2760
+2761
+2762
+2763
+2764
+2765
+2766
+2767
+2768
+2769
+2770
+2771
+2772
+2773
+2774
+2775
+2776
+2777
+2778
+2779
+2780
+2781
+2782
+2783
+2784
+2785
+2786
+2787
+2788
+2789
+2790
+2791
+2792
+2793
+2794
+2795
+2796
+2797
+2798
+2799
+2800
+2801
+2802
+2803
+2804
+2805
+2806
+2807
+2808
+2809
+2810
+2811
+2812
+2813
+2814
+2815
+2816
+2817
+2818
+2819
+2820
+2821
+2822
+2823
+2824
+2825
+2826
+2827
+2828
+2829
+2830
+2831
+2832
+2833
+2834
+2835
+2836
+2837
+2838
+2839
+2840
+2841
+2842
+2843
+2844
+2845
+2846
+2847
+2848
+2849
+2850
+2851
+2852
+2853
+2854
+2855
+2856
+2857
+2858
+2859
+2860
+2861
+2862
+2863
+2864
+2865
+2866
+2867
+2868
+2869
+2870
+2871
+2872
+2873
+2874
+2875
+2876
+2877
+2878
+2879
+2880
+2881
+2882
+2883
+2884
+2885
+2886
+2887
+2888
+2889
+2890
+2891
+2892
+2893
+2894
+2895
+2896
+2897
+2898
+2899
+2900
+2901
+2902
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+#include <ctk/ctk.h>
+#include <cdk/cdkx.h>
+#include <cdk/cdkkeysyms.h>
+#include <X11/XKBlib.h>
+#include <X11/extensions/XKBgeom.h>
+#include <stdlib.h>
+#include <memory.h>
+#include <math.h>
+#include <glib/gi18n-lib.h>
+#include <libxklavier/xklavier.h>
+
+#include <cafekbd-keyboard-drawing.h>
+#include <cafekbd-keyboard-drawing-marshal.h>
+#include <cafekbd-util.h>
+
+#define INVALID_KEYCODE ((guint)(-1))
+
+#define CTK_RESPONSE_PRINT 2
+
+#define KEY_FONT_SIZE 12
+
+enum {
+	BAD_KEYCODE = 0,
+	NUM_SIGNALS
+};
+
+static guint cafekbd_keyboard_drawing_signals[NUM_SIGNALS] = { 0 };
+
+static void cafekbd_keyboard_drawing_set_mods (CafekbdKeyboardDrawing * drawing,
+					    guint mods);
+
+extern gboolean xkl_xkb_config_native_prepare (XklEngine * engine,
+					      const XklConfigRec * data,
+					      gpointer component_names);
+
+extern void xkl_xkb_config_native_cleanup (XklEngine * engine,
+					  gpointer component_names);
+
+
+static gint
+xkb_to_pixmap_coord (CafekbdKeyboardDrawingRenderContext * context, gint n)<--- Parameter 'context' can be declared as pointer to const
+{
+	return n * context->scale_numerator / context->scale_denominator;
+}
+
+static gdouble
+xkb_to_pixmap_double (CafekbdKeyboardDrawingRenderContext * context,<--- Parameter 'context' can be declared as pointer to const
+		      gdouble d)
+{
+	return d * context->scale_numerator / context->scale_denominator;
+}
+
+
+/* angle is in tenths of a degree; coordinates can be anything as (xkb,
+ * pixels, pango) as long as they are all the same */
+static void
+rotate_coordinate (gint origin_x,
+		   gint origin_y,
+		   gint x,
+		   gint y, gint angle, gint * rotated_x, gint * rotated_y)
+{
+	*rotated_x =
+	    origin_x + (x - origin_x) * cos (M_PI * angle / 1800.0) - (y -
+								       origin_y)
+	    * sin (M_PI * angle / 1800.0);
+	*rotated_y =
+	    origin_y + (x - origin_x) * sin (M_PI * angle / 1800.0) + (y -
+								       origin_y)
+	    * cos (M_PI * angle / 1800.0);
+}
+
+static gdouble
+length (gdouble x, gdouble y)
+{
+	return sqrt (x * x + y * y);
+}
+
+static gdouble
+point_line_distance (gdouble ax, gdouble ay, gdouble nx, gdouble ny)
+{
+	return ax * nx + ay * ny;
+}
+
+static void
+normal_form (gdouble ax, gdouble ay,
+	     gdouble bx, gdouble by,
+	     gdouble * nx, gdouble * ny, gdouble * d)
+{
+	gdouble l;
+
+	*nx = by - ay;
+	*ny = ax - bx;
+
+	l = length (*nx, *ny);
+
+	*nx /= l;
+	*ny /= l;
+
+	*d = point_line_distance (ax, ay, *nx, *ny);
+}
+
+static void
+inverse (gdouble a, gdouble b, gdouble c, gdouble d,
+	 gdouble * e, gdouble * f, gdouble * g, gdouble * h)
+{
+	gdouble det;
+
+	det = a * d - b * c;
+
+	*e = d / det;
+	*f = -b / det;
+	*g = -c / det;
+	*h = a / det;
+}
+
+static void
+multiply (gdouble a, gdouble b, gdouble c, gdouble d,
+	  gdouble e, gdouble f, gdouble * x, gdouble * y)
+{
+	*x = a * e + b * f;
+	*y = c * e + d * f;
+}
+
+static void
+intersect (gdouble n1x, gdouble n1y, gdouble d1,
+	   gdouble n2x, gdouble n2y, gdouble d2, gdouble * x, gdouble * y)
+{
+	gdouble e, f, g, h;
+
+	inverse (n1x, n1y, n2x, n2y, &e, &f, &g, &h);
+	multiply (e, f, g, h, d1, d2, x, y);
+}
+
+
+/* draw an angle from the current point to b and then to c,
+ * with a rounded corner of the given radius.
+ */
+static void
+rounded_corner (cairo_t * cr,
+		gdouble bx, gdouble by,
+		gdouble cx, gdouble cy, gdouble radius)
+{
+	gdouble ax, ay;
+	gdouble n1x, n1y, d1;
+	gdouble n2x, n2y, d2;
+	gdouble pd1, pd2;
+	gdouble ix, iy;
+	gdouble dist1, dist2;
+	gdouble nx, ny, d;
+	gdouble a1x, a1y, c1x, c1y;
+	gdouble phi1, phi2;
+
+	cairo_get_current_point (cr, &ax, &ay);
+#ifdef KBDRAW_DEBUG
+	printf ("        current point: (%f, %f), radius %f:\n", ax, ay,
+		radius);
+#endif
+
+	/* make sure radius is not too large */
+	dist1 = length (bx - ax, by - ay);
+	dist2 = length (cx - bx, cy - by);
+
+	radius = MIN (radius, MIN (dist1, dist2));
+
+	/* construct normal forms of the lines */
+	normal_form (ax, ay, bx, by, &n1x, &n1y, &d1);
+	normal_form (bx, by, cx, cy, &n2x, &n2y, &d2);
+
+	/* find which side of the line a,b the point c is on */
+	if (point_line_distance (cx, cy, n1x, n1y) < d1)
+		pd1 = d1 - radius;
+	else
+		pd1 = d1 + radius;
+
+	/* find which side of the line b,c the point a is on */
+	if (point_line_distance (ax, ay, n2x, n2y) < d2)
+		pd2 = d2 - radius;
+	else
+		pd2 = d2 + radius;
+
+	/* intersect the parallels to find the center of the arc */
+	intersect (n1x, n1y, pd1, n2x, n2y, pd2, &ix, &iy);
+
+	nx = (bx - ax) / dist1;
+	ny = (by - ay) / dist1;
+	d = point_line_distance (ix, iy, nx, ny);
+
+	/* a1 is the point on the line a-b where the arc starts */
+	intersect (n1x, n1y, d1, nx, ny, d, &a1x, &a1y);
+
+	nx = (cx - bx) / dist2;
+	ny = (cy - by) / dist2;
+	d = point_line_distance (ix, iy, nx, ny);
+
+	/* c1 is the point on the line b-c where the arc ends */
+	intersect (n2x, n2y, d2, nx, ny, d, &c1x, &c1y);
+
+	/* determine the first angle */
+	if (a1x - ix == 0)
+		phi1 = (a1y - iy > 0) ? M_PI_2 : 3 * M_PI_2;
+	else if (a1x - ix > 0)
+		phi1 = atan ((a1y - iy) / (a1x - ix));
+	else
+		phi1 = M_PI + atan ((a1y - iy) / (a1x - ix));
+
+	/* determine the second angle */
+	if (c1x - ix == 0)
+		phi2 = (c1y - iy > 0) ? M_PI_2 : 3 * M_PI_2;
+	else if (c1x - ix > 0)
+		phi2 = atan ((c1y - iy) / (c1x - ix));
+	else
+		phi2 = M_PI + atan ((c1y - iy) / (c1x - ix));
+
+	/* compute the difference between phi2 and phi1 mod 2pi */
+	d = phi2 - phi1;
+	while (d < 0)
+		d += 2 * M_PI;
+	while (d > 2 * M_PI)
+		d -= 2 * M_PI;
+
+#ifdef KBDRAW_DEBUG
+	printf ("        line 1 to: (%f, %f):\n", a1x, a1y);
+#endif
+	if (!(isnan (a1x) || isnan (a1y)))
+		cairo_line_to (cr, a1x, a1y);
+
+	/* pick the short arc from phi1 to phi2 */
+	if (d < M_PI)
+		cairo_arc (cr, ix, iy, radius, phi1, phi2);
+	else
+		cairo_arc_negative (cr, ix, iy, radius, phi1, phi2);
+
+#ifdef KBDRAW_DEBUG
+	printf ("        line 2 to: (%f, %f):\n", cx, cy);
+#endif
+	cairo_line_to (cr, cx, cy);
+}
+
+static void
+rounded_polygon (cairo_t * cr,
+		 gboolean filled,
+		 gdouble radius, CdkPoint * points, gint num_points)
+{
+	gint i, j;
+
+	cairo_move_to (cr,
+		       (gdouble) (points[num_points - 1].x +
+				  points[0].x) / 2,
+		       (gdouble) (points[num_points - 1].y +
+				  points[0].y) / 2);
+
+
+#ifdef KBDRAW_DEBUG
+	printf ("    rounded polygon of radius %f:\n", radius);
+#endif
+	for (i = 0; i < num_points; i++) {
+		j = (i + 1) % num_points;
+		rounded_corner (cr, (gdouble) points[i].x,
+				(gdouble) points[i].y,
+				(gdouble) (points[i].x + points[j].x) / 2,
+				(gdouble) (points[i].y + points[j].y) / 2,
+				radius);
+#ifdef KBDRAW_DEBUG
+		printf ("      corner (%d, %d) -> (%d, %d):\n",
+			points[i].x, points[i].y, points[j].x,
+			points[j].y);
+#endif
+	};
+	cairo_close_path (cr);
+
+	if (filled)
+		cairo_fill (cr);
+	else
+		cairo_stroke (cr);
+}
+
+static void
+draw_polygon (CafekbdKeyboardDrawingRenderContext * context,
+	      CdkRGBA * fill_color,
+	      gint xkb_x,
+	      gint xkb_y, XkbPointRec * xkb_points, guint num_points,
+	      gdouble radius)
+{
+	CdkPoint *points;
+	gboolean filled;
+	gint i;
+
+	if (fill_color) {
+		filled = TRUE;
+	} else {
+		fill_color = &context->dark_color;
+		filled = FALSE;
+	}
+
+	cdk_cairo_set_source_rgba (context->cr, fill_color);
+
+	points = g_new (CdkPoint, num_points);
+
+#ifdef KBDRAW_DEBUG
+	printf ("    Polygon points:\n");
+#endif
+	for (i = 0; i < num_points; i++) {
+		points[i].x =
+		    xkb_to_pixmap_coord (context, xkb_x + xkb_points[i].x);
+		points[i].y =
+		    xkb_to_pixmap_coord (context, xkb_y + xkb_points[i].y);
+#ifdef KBDRAW_DEBUG
+		printf ("      %d, %d\n", points[i].x, points[i].y);
+#endif
+	}
+
+	rounded_polygon (context->cr, filled,
+			 xkb_to_pixmap_double (context, radius),
+			 points, num_points);
+
+	g_free (points);
+}
+
+static void
+curve_rectangle (cairo_t * cr,
+		 gdouble x0,
+		 gdouble y0, gdouble width, gdouble height, gdouble radius)
+{
+	gdouble x1, y1;
+
+	if (!width || !height)
+		return;
+
+	x1 = x0 + width;
+	y1 = y0 + height;
+
+	radius = MIN (radius, MIN (width / 2, height / 2));
+
+	cairo_move_to (cr, x0, y0 + radius);
+	cairo_arc (cr, x0 + radius, y0 + radius, radius, M_PI,
+		   3 * M_PI / 2);
+	cairo_line_to (cr, x1 - radius, y0);
+	cairo_arc (cr, x1 - radius, y0 + radius, radius, 3 * M_PI / 2,
+		   2 * M_PI);
+	cairo_line_to (cr, x1, y1 - radius);
+	cairo_arc (cr, x1 - radius, y1 - radius, radius, 0, M_PI / 2);
+	cairo_line_to (cr, x0 + radius, y1);
+	cairo_arc (cr, x0 + radius, y1 - radius, radius, M_PI / 2, M_PI);
+
+	cairo_close_path (cr);
+}
+
+static void
+draw_curve_rectangle (cairo_t * cr,
+		      gboolean filled,
+		      CdkRGBA * fill_color,
+		      gint x, gint y, gint width, gint height, gint radius)
+{
+	curve_rectangle (cr, x, y, width, height, radius);
+
+	cdk_cairo_set_source_rgba (cr, fill_color);
+
+	if (filled)
+		cairo_fill (cr);
+	else
+		cairo_stroke (cr);
+}
+
+/* x, y, width, height are in the xkb coordinate system */
+static void
+draw_rectangle (CafekbdKeyboardDrawingRenderContext * context,
+		CdkRGBA * fill_color,
+		gint angle,
+		gint xkb_x, gint xkb_y, gint xkb_width, gint xkb_height,
+		gint radius)
+{
+	if (angle == 0) {
+		gint x, y, width, height;
+		gboolean filled;
+
+		if (fill_color) {
+			filled = TRUE;
+		} else {
+			fill_color = &context->dark_color;
+			filled = FALSE;
+		}
+
+		x = xkb_to_pixmap_coord (context, xkb_x);
+		y = xkb_to_pixmap_coord (context, xkb_y);
+		width =
+		    xkb_to_pixmap_coord (context, xkb_x + xkb_width) - x;
+		height =
+		    xkb_to_pixmap_coord (context, xkb_y + xkb_height) - y;
+
+		draw_curve_rectangle (context->cr, filled, fill_color,
+				      x, y, width, height,
+				      xkb_to_pixmap_double (context,
+							    radius));
+	} else {
+		XkbPointRec points[4];
+		gint x, y;
+
+		points[0].x = xkb_x;
+		points[0].y = xkb_y;
+		rotate_coordinate (xkb_x, xkb_y, xkb_x + xkb_width, xkb_y,
+				   angle, &x, &y);
+		points[1].x = x;
+		points[1].y = y;
+		rotate_coordinate (xkb_x, xkb_y, xkb_x + xkb_width,
+				   xkb_y + xkb_height, angle, &x, &y);
+		points[2].x = x;
+		points[2].y = y;
+		rotate_coordinate (xkb_x, xkb_y, xkb_x, xkb_y + xkb_height,
+				   angle, &x, &y);
+		points[3].x = x;
+		points[3].y = y;
+
+		/* the points we've calculated are relative to 0,0 */
+		draw_polygon (context, fill_color, 0, 0, points, 4,
+			      radius);
+	}
+}
+
+static void
+draw_outline (CafekbdKeyboardDrawingRenderContext * context,
+	      XkbOutlineRec * outline,
+	      CdkRGBA * color,
+	      gint angle, gint origin_x, gint origin_y)
+{
+#ifdef KBDRAW_DEBUG
+	printf (" num_points in %p: %d\n", outline, outline->num_points);
+#endif
+
+	if (outline->num_points == 1) {
+		if (color)
+			draw_rectangle (context, color, angle, origin_x,
+					origin_y, outline->points[0].x,
+					outline->points[0].y,
+					outline->corner_radius);
+
+#ifdef KBDRAW_DEBUG
+		printf ("pointsxy:%d %d %d\n", outline->points[0].x,
+			outline->points[0].y, outline->corner_radius);
+#endif
+
+		draw_rectangle (context, NULL, angle, origin_x, origin_y,
+				outline->points[0].x,
+				outline->points[0].y,
+				outline->corner_radius);
+	} else if (outline->num_points == 2) {
+		gint rotated_x0, rotated_y0;
+
+		rotate_coordinate (origin_x, origin_y,
+				   origin_x + outline->points[0].x,
+				   origin_y + outline->points[0].y,
+				   angle, &rotated_x0, &rotated_y0);
+		if (color)
+			draw_rectangle (context, color, angle, rotated_x0,
+					rotated_y0, outline->points[1].x,
+					outline->points[1].y,
+					outline->corner_radius);
+
+		draw_rectangle (context, NULL, angle, rotated_x0,
+				rotated_y0, outline->points[1].x,
+				outline->points[1].y,
+				outline->corner_radius);
+	} else {
+		if (color)
+			draw_polygon (context, color, origin_x, origin_y,
+				      outline->points,
+				      outline->num_points,
+				      outline->corner_radius);
+
+		draw_polygon (context, NULL, origin_x, origin_y,
+			      outline->points, outline->num_points,
+			      outline->corner_radius);
+	}
+}
+
+/* see PSColorDef in xkbprint */
+static gboolean
+parse_xkb_color_spec (gchar * colorspec, CdkRGBA * color)
+{
+	glong level;
+
+	color->alpha = 1.0;
+
+	if (g_ascii_strcasecmp (colorspec, "black") == 0) {
+		color->red = 0;
+		color->green = 0;
+		color->blue = 0;
+	} else if (g_ascii_strcasecmp (colorspec, "white") == 0) {
+		color->red = 1.0;
+		color->green = 1.0;
+		color->blue = 1.0;
+	} else if (g_ascii_strncasecmp (colorspec, "grey", 4) == 0 ||
+		   g_ascii_strncasecmp (colorspec, "gray", 4) == 0) {
+		level = strtol (colorspec + 4, NULL, 10);
+
+		color->red = 1.0 - 1.0 * level / 100.0;
+		color->green = 1.0 - 1.0 * level / 100.0;
+		color->blue = 1.0 - 1.0 * level / 100.0;
+	} else if (g_ascii_strcasecmp (colorspec, "red") == 0) {
+		color->red = 1.0;
+		color->green = 0;
+		color->blue = 0;
+	} else if (g_ascii_strcasecmp (colorspec, "green") == 0) {
+		color->red = 0;
+		color->green = 1.0;
+		color->blue = 0;
+	} else if (g_ascii_strcasecmp (colorspec, "blue") == 0) {
+		color->red = 0;
+		color->green = 0;
+		color->blue = 1.0;
+	} else if (g_ascii_strncasecmp (colorspec, "red", 3) == 0) {
+		level = strtol (colorspec + 3, NULL, 10);
+
+		color->red = 1.0 * level / 100.0;
+		color->green = 0;
+		color->blue = 0;
+	} else if (g_ascii_strncasecmp (colorspec, "green", 5) == 0) {
+		level = strtol (colorspec + 5, NULL, 10);
+
+		color->red = 0;
+		color->green = 1.0 * level / 100.0;
+		color->blue = 0;
+	} else if (g_ascii_strncasecmp (colorspec, "blue", 4) == 0) {
+		level = strtol (colorspec + 4, NULL, 10);
+
+		color->red = 0;
+		color->green = 0;
+		color->blue = 1.0 * level / 100.0;
+	} else
+		return FALSE;
+
+	return TRUE;
+}
+
+
+static guint
+find_keycode (CafekbdKeyboardDrawing * drawing, gchar * key_name)
+{
+#define KEYSYM_NAME_MAX_LENGTH 4
+	guint keycode;
+	gint i, j;
+	XkbKeyNamePtr pkey;
+	XkbKeyAliasPtr palias;
+	guint is_name_matched;
+	gchar *src, *dst;
+
+	if (!drawing->xkb)
+		return INVALID_KEYCODE;
+
+#ifdef KBDRAW_DEBUG
+	printf ("    looking for keycode for (%c%c%c%c)\n",
+		key_name[0], key_name[1], key_name[2], key_name[3]);
+#endif
+
+	pkey = drawing->xkb->names->keys + drawing->xkb->min_key_code;
+	for (keycode = drawing->xkb->min_key_code;
+	     keycode <= drawing->xkb->max_key_code; keycode++) {
+		is_name_matched = 1;
+		src = key_name;
+		dst = pkey->name;
+		for (i = KEYSYM_NAME_MAX_LENGTH; --i >= 0;) {
+			if ('\0' == *src)
+				break;
+			if (*src++ != *dst++) {
+				is_name_matched = 0;
+				break;
+			}
+		}
+		if (is_name_matched) {
+#ifdef KBDRAW_DEBUG
+			printf ("      found keycode %u\n", keycode);
+#endif
+			return keycode;
+		}
+		pkey++;
+	}
+
+	palias = drawing->xkb->names->key_aliases;
+	for (j = drawing->xkb->names->num_key_aliases; --j >= 0;) {
+		is_name_matched = 1;
+		src = key_name;
+		dst = palias->alias;
+		for (i = KEYSYM_NAME_MAX_LENGTH; --i >= 0;) {
+			if ('\0' == *src)
+				break;
+			if (*src++ != *dst++) {
+				is_name_matched = 0;
+				break;
+			}
+		}
+
+		if (is_name_matched) {
+			keycode = find_keycode (drawing, palias->real);
+#ifdef KBDRAW_DEBUG
+			printf ("found alias keycode %u\n", keycode);
+#endif
+			return keycode;
+		}
+		palias++;
+	}
+
+	return INVALID_KEYCODE;
+}
+
+static void
+set_markup (CafekbdKeyboardDrawingRenderContext * context, gchar *txt)<--- Parameter 'context' can be declared as pointer to const
+{
+	PangoLayout *layout = context->layout;
+	txt = strcmp ("<", txt) ? txt : "&lt;";
+	txt = strcmp ("&", txt) ? txt : "&amp;";
+	if (g_utf8_strlen (txt, -1) > 1) {
+		gchar* buf =
+		    g_strdup_printf ("<span size=\"xx-small\">%s</span>", txt);
+		pango_layout_set_markup (layout, buf, -1);
+		g_free (buf);
+	} else {
+		pango_layout_set_markup (layout, txt, -1);
+	}
+}
+
+static void
+set_key_label_in_layout (CafekbdKeyboardDrawingRenderContext * context,
+			 guint keyval)
+{
+	gchar buf[5];
+	gunichar uc;
+
+	switch (keyval) {
+	case CDK_KEY_Scroll_Lock:
+		set_markup (context, _("Scroll\nLock"));
+		break;
+
+	case CDK_KEY_space:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_Sys_Req:
+		set_markup (context, _("Sys Rq"));
+		break;
+
+	case CDK_KEY_Page_Up:
+		set_markup (context, _("Page\nUp"));
+		break;
+
+	case CDK_KEY_Page_Down:
+		set_markup (context, _("Page\nDown"));
+		break;
+
+	case CDK_KEY_Num_Lock:
+		set_markup (context, _("Num\nLock"));
+		break;
+
+	case CDK_KEY_KP_Page_Up:
+		set_markup (context, _("Pg Up"));
+		break;
+
+	case CDK_KEY_KP_Page_Down:
+		set_markup (context, _("Pg Dn"));
+		break;
+
+	case CDK_KEY_KP_Home:
+		set_markup (context, _("Home"));
+		break;
+
+	case CDK_KEY_KP_Left:
+		set_markup (context, _("Left"));
+		break;
+
+	case CDK_KEY_KP_End:
+		set_markup (context, _("End"));
+		break;
+
+	case CDK_KEY_KP_Up:
+		set_markup (context, _("Up"));
+		break;
+
+	case CDK_KEY_KP_Begin:
+		set_markup (context, _("Begin"));
+		break;
+
+	case CDK_KEY_KP_Right:
+		set_markup (context, _("Right"));
+		break;
+
+	case CDK_KEY_KP_Enter:
+		set_markup (context, _("Enter"));
+		break;
+
+	case CDK_KEY_KP_Down:
+		set_markup (context, _("Down"));
+		break;
+
+	case CDK_KEY_KP_Insert:
+		set_markup (context, _("Ins"));
+		break;
+
+	case CDK_KEY_KP_Delete:
+		set_markup (context, _("Del"));
+		break;
+
+	/* 0xfe03 */
+	case CDK_KEY_ISO_Level3_Shift:
+		set_markup (context, _("ISO_Level3_Shift"));
+		break;
+
+	/* 0xfe20 */
+	case CDK_KEY_ISO_Left_Tab:
+		set_markup (context, _("Tab"));
+		break;
+
+	/* 0xff08 */
+	case CDK_KEY_BackSpace:
+		set_markup (context, _("BackSpace"));
+		break;
+
+	/* 0xff09 */
+	case CDK_KEY_Tab:
+		set_markup (context, _("Tab"));
+		break;
+
+	/* 0xff0d */
+	case CDK_KEY_Return:
+		set_markup (context, _("Return"));
+		break;
+
+	/* 0xff13 */
+	case CDK_KEY_Pause:
+		set_markup (context, _("Pause"));
+		break;
+
+	/* 0xff1b */
+	case CDK_KEY_Escape:
+		set_markup (context, _("Esc"));
+		break;
+
+	/* 0xff50 */
+	case CDK_KEY_Home:
+		set_markup (context, _("Home"));
+		break;
+
+	/* 0xff51 */
+	case CDK_KEY_Left:
+		set_markup (context, _("Left"));
+		break;
+
+	/* 0xff52 */
+	case CDK_KEY_Up:
+		set_markup (context, _("Up"));
+		break;
+
+	/* 0xff53 */
+	case CDK_KEY_Right:
+		set_markup (context, _("Right"));
+		break;
+
+	/* 0xff54 */
+	case CDK_KEY_Down:
+		set_markup (context, _("Down"));
+		break;
+
+	/* 0xff57 */
+	case CDK_KEY_End:
+		set_markup (context, _("End"));
+		break;
+
+	/* 0xff61 */
+	case CDK_KEY_Print:
+		set_markup (context, _("Print"));
+		break;
+
+	/* 0xff63 */
+	case CDK_KEY_Insert:
+		set_markup (context, _("Insert"));
+		break;
+
+	/* 0xff67 */
+	case CDK_KEY_Menu:
+		set_markup (context, _("Menu"));
+		break;
+
+	/* 0xffbe */
+	case CDK_KEY_F1:
+		set_markup (context, _("F1"));
+		break;
+
+	/* 0xffbf */
+	case CDK_KEY_F2:
+		set_markup (context, _("F2"));
+		break;
+
+	/* 0xffc0 */
+	case CDK_KEY_F3:
+		set_markup (context, _("F3"));
+		break;
+
+	/* 0xffc1 */
+	case CDK_KEY_F4:
+		set_markup (context, _("F4"));
+		break;
+
+	/* 0xffc2 */
+	case CDK_KEY_F5:
+		set_markup (context, _("F5"));
+		break;
+
+	/* 0xffc3 */
+	case CDK_KEY_F6:
+		set_markup (context, _("F6"));
+		break;
+
+	/* 0xffc4 */
+	case CDK_KEY_F7:
+		set_markup (context, _("F7"));
+		break;
+
+	/* 0xffc5 */
+	case CDK_KEY_F8:
+		set_markup (context, _("F8"));
+		break;
+
+	/* 0xffc6 */
+	case CDK_KEY_F9:
+		set_markup (context, _("F9"));
+		break;
+
+	/* 0xffc7 */
+	case CDK_KEY_F10:
+		set_markup (context, _("F10"));
+		break;
+
+	/* 0xffc8 */
+	case CDK_KEY_F11:
+		set_markup (context, _("F11"));
+		break;
+
+	/* 0xffc9 */
+	case CDK_KEY_F12:
+		set_markup (context, _("F12"));
+		break;
+
+	/* 0xffe1 */
+	case CDK_KEY_Shift_L:
+		set_markup (context, _("Shift"));
+		break;
+
+	/* 0xffe2 */
+	case CDK_KEY_Shift_R:
+		set_markup (context, _("Shift"));
+		break;
+
+	/* 0xffe3 */
+	case CDK_KEY_Control_L:
+		set_markup (context, _("Control"));
+		break;
+
+	/* 0xffe4 */
+	case CDK_KEY_Control_R:
+		set_markup (context, _("Control"));
+		break;
+
+	/* 0xffe5 */
+	case CDK_KEY_Caps_Lock:
+		set_markup (context, _("Caps\nLock"));
+		break;
+
+	/* 0xffe7 */
+	case CDK_KEY_Meta_L:
+		set_markup (context, _("Meta"));
+		break;
+
+	/* 0xffe9 */
+	case CDK_KEY_Alt_L:
+		set_markup (context, _("Alt"));
+		break;
+
+	/* 0xffeb */
+	case CDK_KEY_Super_L:
+		set_markup (context, _("Super"));
+		break;
+
+	/* 0xffec */
+	case CDK_KEY_Super_R:
+		set_markup (context, _("Super"));
+		break;
+
+	/* 0xffff */
+	case CDK_KEY_VoidSymbol:
+		set_markup (context, _("Delete"));
+		break;
+
+	case CDK_KEY_dead_grave:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_acute:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_circumflex:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_tilde:
+		set_markup (context, "~");
+		break;
+
+	case CDK_KEY_dead_macron:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_breve:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_abovedot:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_diaeresis:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_abovering:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_doubleacute:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_caron:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_cedilla:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_ogonek:
+		set_markup (context, "");
+		break;
+
+		/* case CDK_KEY_dead_iota:
+		 * case CDK_KEY_dead_voiced_sound:
+		 * case CDK_KEY_dead_semivoiced_sound: */
+
+	case CDK_KEY_dead_belowdot:
+		set_markup (context, " ");
+		break;
+
+	case CDK_KEY_horizconnector:
+		set_markup (context, _("horiz\nconn"));
+		break;
+
+	case CDK_KEY_Mode_switch:
+		set_markup (context, _("AltGr"));
+		break;
+
+	case CDK_KEY_Multi_key:
+		set_markup (context, _("Compose"));
+		break;
+
+	default:
+		uc = cdk_keyval_to_unicode (keyval);
+		if (uc != 0 && g_unichar_isgraph (uc)) {
+			buf[g_unichar_to_utf8 (uc, buf)] = '\0';
+			set_markup (context, buf);
+		} else {
+			gchar *name = cdk_keyval_name (keyval);
+			if (name) {
+				set_markup (context, name);
+			} else
+				set_markup (context, "");
+		}
+	}
+}
+
+
+static void
+draw_pango_layout (CafekbdKeyboardDrawingRenderContext * context,
+		   CafekbdKeyboardDrawing * drawing,
+		   gint angle, gint x, gint y)
+{
+	PangoLayout *layout = context->layout;
+	CdkRGBA *color;
+	PangoLayoutLine *line;
+	gint x_off, y_off;
+	gint i;
+
+	color =
+	    drawing->colors + (drawing->xkb->geom->label_color -
+			       drawing->xkb->geom->colors);
+
+	if (angle != context->angle) {
+		PangoMatrix matrix = PANGO_MATRIX_INIT;
+		pango_matrix_rotate (&matrix, -angle / 10.0);
+		pango_context_set_matrix (pango_layout_get_context
+					  (layout), &matrix);
+		pango_layout_context_changed (layout);
+		context->angle = angle;
+	}
+
+	i = 0;
+	y_off = 0;
+	for (line = pango_layout_get_line (layout, i);
+	     line != NULL; line = pango_layout_get_line (layout, ++i)) {
+		GSList *runp;<--- Variable 'runp' can be declared as pointer to const
+		PangoRectangle line_extents;
+
+		x_off = 0;
+
+		for (runp = line->runs; runp != NULL; runp = runp->next) {
+			PangoGlyphItem *run = runp->data;
+			gint j;
+
+			for (j = 0; j < run->glyphs->num_glyphs; j++) {
+				PangoGlyphGeometry *geometry;<--- Variable 'geometry' can be declared as pointer to const
+
+				geometry =
+				    &run->glyphs->glyphs[j].geometry;
+
+				x_off += geometry->width;
+			}
+		}
+
+		pango_layout_line_get_extents (line, NULL, &line_extents);
+		y_off +=
+		    line_extents.height +
+		    pango_layout_get_spacing (layout);
+	}
+
+	cairo_move_to (context->cr, x, y);
+	cdk_cairo_set_source_rgba (context->cr, color);
+	pango_cairo_show_layout (context->cr, layout);
+}
+
+static void
+draw_key_label_helper (CafekbdKeyboardDrawingRenderContext * context,
+		       CafekbdKeyboardDrawing * drawing,
+		       KeySym keysym,
+		       gint angle,
+		       CafekbdKeyboardDrawingGroupLevelPosition glp,
+		       gint x,
+		       gint y, gint width, gint height, gint padding)
+{
+	gint label_x, label_y, label_max_width, ycell;
+
+	if (keysym == 0)
+		return;
+#ifdef KBDRAW_DEBUG
+	printf ("keysym: %04X(%c) at glp: %d\n",
+		(unsigned) keysym, (char) keysym, (int) glp);
+#endif
+
+	switch (glp) {
+	case CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT:
+	case CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT:
+		{
+			ycell =
+			    glp == CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT;
+
+			rotate_coordinate (x, y, x + padding,
+					   y + padding + (height -
+							  2 * padding) *
+					   ycell * 4 / 7, angle, &label_x,
+					   &label_y);
+			label_max_width =
+			    PANGO_SCALE * (width - 2 * padding);
+			break;
+		}
+	case CAFEKBD_KEYBOARD_DRAWING_POS_TOPRIGHT:
+	case CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT:
+		{
+			ycell =
+			    glp == CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT;
+
+			rotate_coordinate (x, y,
+					   x + padding + (width -
+							  2 * padding) *
+					   4 / 7,
+					   y + padding + (height -
+							  2 * padding) *
+					   ycell * 4 / 7, angle, &label_x,
+					   &label_y);
+			label_max_width =
+			    PANGO_SCALE * ((width - 2 * padding) -
+					   (width - 2 * padding) * 4 / 7);
+			break;
+		}
+	default:
+		return;
+	}
+	set_key_label_in_layout (context, keysym);
+	pango_layout_set_width (context->layout, label_max_width);
+	label_y -= (pango_layout_get_line_count (context->layout) - 1) *
+	    (pango_font_description_get_size (context->font_desc) /
+	     PANGO_SCALE);
+	cairo_save (context->cr);
+	cairo_rectangle (context->cr, x + padding / 2, y + padding / 2,
+			 width - padding, height - padding);
+	cairo_clip (context->cr);
+	draw_pango_layout (context, drawing, angle, label_x, label_y);
+	cairo_restore (context->cr);
+}
+
+static void
+draw_key_label (CafekbdKeyboardDrawingRenderContext * context,
+		CafekbdKeyboardDrawing * drawing,
+		guint keycode,
+		gint angle,
+		gint xkb_origin_x,
+		gint xkb_origin_y, gint xkb_width, gint xkb_height)
+{
+	gint x, y, width, height;
+	gint padding;
+	gint g, l, glp;
+
+	if (!drawing->xkb)
+		return;
+
+	padding = 23 * context->scale_numerator / context->scale_denominator;	/* 2.3mm */
+
+	x = xkb_to_pixmap_coord (context, xkb_origin_x);
+	y = xkb_to_pixmap_coord (context, xkb_origin_y);
+	width =
+	    xkb_to_pixmap_coord (context, xkb_origin_x + xkb_width) - x;
+	height =
+	    xkb_to_pixmap_coord (context, xkb_origin_y + xkb_height) - y;
+
+	for (glp = CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT;
+	     glp < CAFEKBD_KEYBOARD_DRAWING_POS_TOTAL; glp++) {
+		if (drawing->groupLevels[glp] == NULL)
+			continue;
+		g = drawing->groupLevels[glp]->group;
+		l = drawing->groupLevels[glp]->level;
+
+		if (g < 0 || g >= XkbKeyNumGroups (drawing->xkb, keycode))
+			continue;
+		if (l < 0
+		    || l >= XkbKeyGroupWidth (drawing->xkb, keycode, g))
+			continue;
+
+		/* Skip "exotic" levels like the "Ctrl" level in PC_SYSREQ */
+		if (l > 0) {
+			guint mods = XkbKeyKeyType (drawing->xkb, keycode,
+						    g)->mods.mask;
+			if ((mods & (ShiftMask | drawing->l3mod)) == 0)
+				continue;
+		}
+
+		if (drawing->track_modifiers) {
+			guint mods_rtrn;
+			KeySym keysym;
+
+			if (XkbTranslateKeyCode (drawing->xkb, keycode,
+						 XkbBuildCoreState
+						 (drawing->mods, g),
+						 &mods_rtrn, &keysym)) {
+				draw_key_label_helper (context, drawing,
+						       keysym, angle, glp,
+						       x, y, width, height,
+						       padding);
+				/* reverse y order */
+			}
+		} else {
+			KeySym keysym;
+
+			keysym =
+			    XkbKeySymEntry (drawing->xkb, keycode, l, g);
+
+			draw_key_label_helper (context, drawing, keysym,
+					       angle, glp, x, y, width,
+					       height, padding);
+			/* reverse y order */
+		}
+	}
+}
+
+/*
+ * The x offset is calculated for complex shapes. It is the rightmost of the vertical lines in the outline
+ */
+static gint
+calc_origin_offset_x (XkbOutlineRec * outline)<--- Parameter 'outline' can be declared as pointer to const
+{
+	gint rv = 0;
+	gint i;
+	XkbPointPtr point = outline->points;
+	if (outline->num_points < 3)
+		return 0;
+	for (i = outline->num_points; --i > 0;) {
+		gint x1 = point->x;
+		gint y1 = point++->y;
+		gint x2 = point->x;
+		gint y2 = point->y;
+
+		/*vertical, bottom to top (clock-wise), on the left */
+		if ((x1 == x2) && (y1 > y2) && (x1 > rv)) {
+			rv = x1;
+		}
+	}
+	return rv;
+}
+
+/* groups are from 0-3 */
+static void
+draw_key (CafekbdKeyboardDrawingRenderContext * context,
+	  CafekbdKeyboardDrawing * drawing, CafekbdKeyboardDrawingKey * key)
+{
+	XkbShapeRec *shape;
+	CtkStyleContext *style_context;
+	CdkRGBA color;
+	XkbOutlineRec *outline;
+	int origin_offset_x;
+	/* gint i; */
+
+	if (!drawing->xkb)
+		return;
+
+#ifdef KBDRAW_DEBUG
+	printf ("shape: %p (base %p, index %d)\n",
+		drawing->xkb->geom->shapes + key->xkbkey->shape_ndx,
+		drawing->xkb->geom->shapes, key->xkbkey->shape_ndx);
+#endif
+
+	shape = drawing->xkb->geom->shapes + key->xkbkey->shape_ndx;
+
+	if (key->pressed) {
+		style_context = ctk_widget_get_style_context (CTK_WIDGET (drawing));
+		ctk_style_context_save (style_context);
+		ctk_style_context_add_class (style_context, CTK_STYLE_CLASS_VIEW);
+		ctk_style_context_get_background_color (style_context,
+		                                        CTK_STATE_FLAG_SELECTED,
+		                                        &color);
+		ctk_style_context_restore (style_context);
+	 } else
+		color = *(drawing->colors + key->xkbkey->color_ndx);
+
+#ifdef KBDRAW_DEBUG
+	printf
+	    (" outlines base in the shape: %p (total: %d), origin: (%d, %d), angle %d\n",
+	     shape->outlines, shape->num_outlines, key->origin_x,
+	     key->origin_y, key->angle);
+#endif
+
+	/* draw the primary outline */
+	outline = shape->primary ? shape->primary : shape->outlines;
+	draw_outline (context, outline, &color, key->angle, key->origin_x,
+		      key->origin_y);
+#if 0
+	/* don't draw other outlines for now, since
+	 * the text placement does not take them into account
+	 */
+	for (i = 0; i < shape->num_outlines; i++) {
+		if (shape->outlines + i == shape->approx ||
+		    shape->outlines + i == shape->primary)
+			continue;
+		draw_outline (context, shape->outlines + i, NULL,
+			      key->angle, key->origin_x, key->origin_y);
+	}
+#endif
+
+	origin_offset_x = calc_origin_offset_x (outline);
+	draw_key_label (context, drawing, key->keycode, key->angle,
+			key->origin_x + origin_offset_x, key->origin_y,
+			shape->bounds.x2, shape->bounds.y2);
+}
+
+static void
+invalidate_region (CafekbdKeyboardDrawing * drawing,
+		   gdouble angle,
+		   gint origin_x, gint origin_y, XkbShapeRec * shape)
+{
+	CdkPoint points[4];
+	gint x_min, x_max, y_min, y_max;
+	gint x, y, width, height;
+	gint xx, yy;
+
+	rotate_coordinate (0, 0, 0, 0, angle, &xx, &yy);
+	points[0].x = xx;
+	points[0].y = yy;
+	rotate_coordinate (0, 0, shape->bounds.x2, 0, angle, &xx, &yy);
+	points[1].x = xx;
+	points[1].y = yy;
+	rotate_coordinate (0, 0, shape->bounds.x2, shape->bounds.y2, angle,
+			   &xx, &yy);
+	points[2].x = xx;
+	points[2].y = yy;
+	rotate_coordinate (0, 0, 0, shape->bounds.y2, angle, &xx, &yy);
+	points[3].x = xx;
+	points[3].y = yy;
+
+	x_min =
+	    MIN (MIN (points[0].x, points[1].x),
+		 MIN (points[2].x, points[3].x));
+	x_max =
+	    MAX (MAX (points[0].x, points[1].x),
+		 MAX (points[2].x, points[3].x));
+	y_min =
+	    MIN (MIN (points[0].y, points[1].y),
+		 MIN (points[2].y, points[3].y));
+	y_max =
+	    MAX (MAX (points[0].y, points[1].y),
+		 MAX (points[2].y, points[3].y));
+
+	x = xkb_to_pixmap_coord (drawing->renderContext,
+				 origin_x + x_min) - 6;
+	y = xkb_to_pixmap_coord (drawing->renderContext,
+				 origin_y + y_min) - 6;
+	width =
+	    xkb_to_pixmap_coord (drawing->renderContext,
+				 x_max - x_min) + 12;
+	height =
+	    xkb_to_pixmap_coord (drawing->renderContext,
+				 y_max - y_min) + 12;
+
+	ctk_widget_queue_draw_area (CTK_WIDGET (drawing), x, y, width,
+				    height);
+}
+
+static void
+invalidate_indicator_doodad_region (CafekbdKeyboardDrawing * drawing,
+				    CafekbdKeyboardDrawingDoodad * doodad)
+{
+	if (!drawing->xkb)
+		return;
+
+	invalidate_region (drawing,
+			   doodad->angle,
+			   doodad->origin_x +
+			   doodad->doodad->indicator.left,
+			   doodad->origin_y +
+			   doodad->doodad->indicator.top,
+			   &drawing->xkb->geom->shapes[doodad->
+						       doodad->indicator.shape_ndx]);
+}
+
+static void
+invalidate_key_region (CafekbdKeyboardDrawing * drawing,
+		       CafekbdKeyboardDrawingKey * key)
+{
+	if (!drawing->xkb)
+		return;
+
+	invalidate_region (drawing,
+			   key->angle,
+			   key->origin_x,
+			   key->origin_y,
+			   &drawing->xkb->geom->shapes[key->
+						       xkbkey->shape_ndx]);
+}
+
+static void
+draw_text_doodad (CafekbdKeyboardDrawingRenderContext * context,
+		  CafekbdKeyboardDrawing * drawing,
+		  CafekbdKeyboardDrawingDoodad * doodad,
+		  XkbTextDoodadRec * text_doodad)
+{
+	gint x, y;
+	if (!drawing->xkb)
+		return;
+
+	x = xkb_to_pixmap_coord (context,
+				 doodad->origin_x + text_doodad->left);
+	y = xkb_to_pixmap_coord (context,
+				 doodad->origin_y + text_doodad->top);
+
+	set_markup (context, text_doodad->text);
+	draw_pango_layout (context, drawing, doodad->angle, x, y);
+}
+
+static void
+draw_indicator_doodad (CafekbdKeyboardDrawingRenderContext * context,
+		       CafekbdKeyboardDrawing * drawing,
+		       CafekbdKeyboardDrawingDoodad * doodad,
+		       XkbIndicatorDoodadRec * indicator_doodad)
+{
+	CdkRGBA *color;
+	XkbShapeRec *shape;<--- Variable 'shape' can be declared as pointer to const
+	gint i;
+
+	if (!drawing->xkb)
+		return;
+
+	shape = drawing->xkb->geom->shapes + indicator_doodad->shape_ndx;
+
+	color = drawing->colors + (doodad->on ?
+				   indicator_doodad->on_color_ndx :
+				   indicator_doodad->off_color_ndx);
+
+	for (i = 0; i < 1; i++)
+		draw_outline (context, shape->outlines + i, color,
+			      doodad->angle,
+			      doodad->origin_x + indicator_doodad->left,
+			      doodad->origin_y + indicator_doodad->top);
+}
+
+static void
+draw_shape_doodad (CafekbdKeyboardDrawingRenderContext * context,
+		   CafekbdKeyboardDrawing * drawing,
+		   CafekbdKeyboardDrawingDoodad * doodad,
+		   XkbShapeDoodadRec * shape_doodad)
+{
+	XkbShapeRec *shape;
+	CdkRGBA *color;
+	gint i;
+
+	if (!drawing->xkb)
+		return;
+
+	shape = drawing->xkb->geom->shapes + shape_doodad->shape_ndx;
+	color = drawing->colors + shape_doodad->color_ndx;
+
+	/* draw the primary outline filled */
+	draw_outline (context,
+		      shape->primary ? shape->primary : shape->outlines,
+		      color, doodad->angle,
+		      doodad->origin_x + shape_doodad->left,
+		      doodad->origin_y + shape_doodad->top);
+
+	/* stroke the other outlines */
+	for (i = 0; i < shape->num_outlines; i++) {
+		if (shape->outlines + i == shape->approx ||
+		    shape->outlines + i == shape->primary)
+			continue;
+		draw_outline (context, shape->outlines + i, NULL,
+			      doodad->angle,
+			      doodad->origin_x + shape_doodad->left,
+			      doodad->origin_y + shape_doodad->top);
+	}
+}
+
+static void
+draw_doodad (CafekbdKeyboardDrawingRenderContext * context,
+	     CafekbdKeyboardDrawing * drawing,
+	     CafekbdKeyboardDrawingDoodad * doodad)
+{
+	switch (doodad->doodad->any.type) {
+	case XkbOutlineDoodad:
+	case XkbSolidDoodad:
+		draw_shape_doodad (context, drawing, doodad,
+				   &doodad->doodad->shape);
+		break;
+
+	case XkbTextDoodad:
+		draw_text_doodad (context, drawing, doodad,
+				  &doodad->doodad->text);
+		break;
+
+	case XkbIndicatorDoodad:
+		draw_indicator_doodad (context, drawing, doodad,
+				       &doodad->doodad->indicator);
+		break;
+
+	case XkbLogoDoodad:
+		/* g_print ("draw_doodad: logo: %s\n", doodad->doodad->logo.logo_name); */
+		/* XkbLogoDoodadRec is essentially a subclass of XkbShapeDoodadRec */
+		draw_shape_doodad (context, drawing, doodad,
+				   &doodad->doodad->shape);
+		break;
+	}
+}
+
+typedef struct {
+	CafekbdKeyboardDrawing *drawing;
+	CafekbdKeyboardDrawingRenderContext *context;
+} DrawKeyboardItemData;
+
+static void
+redraw_overlapping_doodads (CafekbdKeyboardDrawingRenderContext * context,
+			    CafekbdKeyboardDrawing * drawing,
+			    const CafekbdKeyboardDrawingKey * key)
+{
+	GList *list;
+	gboolean do_draw = FALSE;
+
+	for (list = drawing->keyboard_items; list; list = list->next) {
+		CafekbdKeyboardDrawingItem *item = list->data;
+
+		if (do_draw
+		    && item->type ==
+		    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD)
+			draw_doodad (context, drawing,
+				     (CafekbdKeyboardDrawingDoodad *) item);
+
+		if (list->data == key)
+			do_draw = TRUE;
+	}
+}
+
+static void
+draw_keyboard_item (CafekbdKeyboardDrawingItem * item,
+		    DrawKeyboardItemData * data)
+{
+	CafekbdKeyboardDrawing *drawing = data->drawing;
+	CafekbdKeyboardDrawingRenderContext *context = data->context;
+
+	if (!drawing->xkb)
+		return;
+
+	switch (item->type) {
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_INVALID:
+		break;
+
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY:
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA:
+		draw_key (context, drawing,
+			  (CafekbdKeyboardDrawingKey *) item);
+		break;
+
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD:
+		draw_doodad (context, drawing,
+			     (CafekbdKeyboardDrawingDoodad *) item);
+		break;
+	}
+}
+
+static void
+draw_keyboard_to_context (CafekbdKeyboardDrawingRenderContext * context,
+			  CafekbdKeyboardDrawing * drawing)
+{
+	DrawKeyboardItemData data = { drawing, context };
+#ifdef KBDRAW_DEBUG
+	printf ("mods: %d\n", drawing->mods);
+#endif
+	g_list_foreach (drawing->keyboard_items,
+			(GFunc) draw_keyboard_item, &data);
+}
+
+static gboolean
+create_cairo (CafekbdKeyboardDrawing * drawing)
+{
+	CtkStyleContext *style_context = NULL;
+	CtkStateFlags state;
+	CdkRGBA dark_color;
+
+	if (drawing == NULL)
+		return FALSE;
+	if (drawing->surface == NULL)
+		return FALSE;
+
+	drawing->renderContext->cr =
+	    cairo_create (drawing->surface);
+
+	style_context = ctk_widget_get_style_context (CTK_WIDGET (drawing));
+	state = ctk_style_context_get_state (style_context);
+
+	ctk_style_context_get_background_color (style_context, state,
+	                                        &dark_color);
+	/* make dark background by making regular background darker */
+	dark_color.red *= 0.7;
+	dark_color.green *= 0.7;
+	dark_color.blue *= 0.7;
+
+	drawing->renderContext->dark_color = dark_color;
+
+	return TRUE;
+}
+
+static void
+destroy_cairo (CafekbdKeyboardDrawing * drawing)
+{
+	cairo_destroy (drawing->renderContext->cr);
+	drawing->renderContext->cr = NULL;
+}
+
+static void
+draw_keyboard (CafekbdKeyboardDrawing * drawing)
+{
+        CtkStyleContext *context =
+	    ctk_widget_get_style_context (CTK_WIDGET (drawing));
+	CtkStateFlags state = ctk_style_context_get_state (context);
+	CdkRGBA color;
+	CtkAllocation allocation;
+
+	if (!drawing->xkb)
+		return;
+
+	ctk_widget_get_allocation (CTK_WIDGET (drawing), &allocation);
+
+	drawing->surface =
+	    cdk_window_create_similar_surface (ctk_widget_get_window
+					       (CTK_WIDGET (drawing)),
+					       CAIRO_CONTENT_COLOR,
+					       allocation.width,
+					       allocation.height);
+
+	if (create_cairo (drawing)) {
+		/* blank background */
+		ctk_style_context_save (context);
+		ctk_style_context_add_class (context, CTK_STYLE_CLASS_VIEW);
+		ctk_style_context_get_background_color (context, state, &color);
+		ctk_style_context_restore (context);
+		cdk_cairo_set_source_rgba (drawing->renderContext->cr, &color);
+		cairo_paint (drawing->renderContext->cr);
+
+		draw_keyboard_to_context (drawing->renderContext, drawing);
+		destroy_cairo (drawing);
+	}
+}
+
+static void
+alloc_render_context (CafekbdKeyboardDrawing * drawing)
+{
+	CafekbdKeyboardDrawingRenderContext *context =
+	    drawing->renderContext =
+	    g_new0 (CafekbdKeyboardDrawingRenderContext, 1);
+
+	PangoContext *pangoContext =
+	    ctk_widget_get_pango_context (CTK_WIDGET (drawing));
+
+	CtkStyleContext *style_context =
+	    ctk_widget_get_style_context (CTK_WIDGET (drawing));
+	PangoFontDescription *fd = NULL;
+
+	ctk_style_context_get (style_context,
+	                       ctk_style_context_get_state (style_context),
+	                       CTK_STYLE_PROPERTY_FONT, &fd, NULL);
+
+	context->layout = pango_layout_new (pangoContext);
+	pango_layout_set_ellipsize (context->layout, PANGO_ELLIPSIZE_END);
+
+	context->font_desc = pango_font_description_copy (fd);
+	context->angle = 0;
+	context->scale_numerator = 1;
+	context->scale_denominator = 1;
+}
+
+static void
+free_render_context (CafekbdKeyboardDrawing * drawing)
+{
+	CafekbdKeyboardDrawingRenderContext *context = drawing->renderContext;
+	g_object_unref (G_OBJECT (context->layout));
+	pango_font_description_free (context->font_desc);
+
+	g_free (drawing->renderContext);
+	drawing->renderContext = NULL;
+}
+
+static gboolean
+draw (CtkWidget              *widget G_GNUC_UNUSED,
+      cairo_t                *cr,
+      CafekbdKeyboardDrawing *drawing)
+{
+	if (!drawing->xkb)
+		return FALSE;
+
+	if (drawing->surface == NULL)
+		return FALSE;
+
+	cairo_set_source_surface (cr, drawing->surface, 0, 0);
+	cairo_paint (cr);
+
+	return FALSE;
+}
+
+static gboolean
+idle_redraw (gpointer user_data)
+{
+	CafekbdKeyboardDrawing *drawing = user_data;
+
+	drawing->idle_redraw = 0;
+	draw_keyboard (drawing);
+	ctk_widget_queue_draw (CTK_WIDGET (drawing));
+	return FALSE;
+}
+
+static gboolean
+context_setup_scaling (CafekbdKeyboardDrawingRenderContext * context,
+		       CafekbdKeyboardDrawing * drawing,
+		       gdouble width, gdouble height,
+		       gdouble dpi_x, gdouble dpi_y)
+{
+	if (!drawing->xkb)
+		return FALSE;
+
+	if (drawing->xkb->geom->width_mm <= 0
+	    || drawing->xkb->geom->height_mm <= 0) {
+		g_critical
+		    ("keyboard geometry reports width or height as zero!");
+		return FALSE;
+	}
+
+	if (width * drawing->xkb->geom->height_mm <
+	    height * drawing->xkb->geom->width_mm) {
+		context->scale_numerator = width;
+		context->scale_denominator = drawing->xkb->geom->width_mm;
+	} else {
+		context->scale_numerator = height;
+		context->scale_denominator = drawing->xkb->geom->height_mm;
+	}
+
+	pango_font_description_set_size (context->font_desc,
+					 72 * KEY_FONT_SIZE * dpi_x *
+					 context->scale_numerator /
+					 context->scale_denominator);
+	pango_layout_set_spacing (context->layout,
+				  -160 * dpi_y * context->scale_numerator /
+				  context->scale_denominator);
+	pango_layout_set_font_description (context->layout,
+					   context->font_desc);
+
+	return TRUE;
+}
+
+static void
+size_allocate (CtkWidget              *widget G_GNUC_UNUSED,
+	       CtkAllocation          *allocation,
+	       CafekbdKeyboardDrawing *drawing)
+{
+	CafekbdKeyboardDrawingRenderContext *context = drawing->renderContext;
+
+	if (drawing->surface) {
+		cairo_surface_destroy (drawing->surface);
+		drawing->surface = NULL;
+	}
+
+	if (!context_setup_scaling (context, drawing,
+				    allocation->width, allocation->height,
+				    50, 50))
+		return;
+
+	if (!drawing->idle_redraw)
+		drawing->idle_redraw = g_idle_add (idle_redraw, drawing);
+}
+
+static gint
+key_event (CtkWidget              *widget G_GNUC_UNUSED,
+	   CdkEventKey            *event,
+	   CafekbdKeyboardDrawing *drawing)
+{
+	CafekbdKeyboardDrawingKey *key;
+	if (!drawing->xkb)
+		return FALSE;
+
+	key = drawing->keys + event->hardware_keycode;
+
+	if (event->hardware_keycode > drawing->xkb->max_key_code ||
+	    event->hardware_keycode < drawing->xkb->min_key_code ||
+	    key->xkbkey == NULL) {
+		g_signal_emit (drawing,
+			       cafekbd_keyboard_drawing_signals[BAD_KEYCODE],
+			       0, event->hardware_keycode);
+		return TRUE;
+	}
+
+	if ((event->type == CDK_KEY_PRESS && key->pressed) ||
+	    (event->type == CDK_KEY_RELEASE && !key->pressed))
+		return TRUE;
+	/* otherwise this event changes the state we believed we had before */
+
+	key->pressed = (event->type == CDK_KEY_PRESS);
+
+	if (create_cairo (drawing)) {
+		draw_key (drawing->renderContext, drawing, key);
+		redraw_overlapping_doodads (drawing->renderContext,
+					    drawing, key);
+		destroy_cairo (drawing);
+	}
+
+	invalidate_key_region (drawing, key);
+	return TRUE;
+}
+
+static gint
+button_press_event (CtkWidget              *widget,
+		    CdkEventButton         *event G_GNUC_UNUSED,
+		    CafekbdKeyboardDrawing *drawing)<--- Parameter 'drawing' can be declared as pointer to const
+{
+	if (!drawing->xkb)
+		return FALSE;
+
+	ctk_widget_grab_focus (widget);
+	return FALSE;
+}
+
+static gboolean
+unpress_keys (CafekbdKeyboardDrawing * drawing)
+{
+	gint i;
+
+	drawing->timeout = 0;
+
+	if (!drawing->xkb)
+		return FALSE;
+
+	if (create_cairo (drawing)) {
+		for (i = drawing->xkb->min_key_code;
+		     i <= drawing->xkb->max_key_code; i++)
+			if (drawing->keys[i].pressed) {
+				drawing->keys[i].pressed = FALSE;
+				draw_key (drawing->renderContext, drawing,
+					  drawing->keys + i);
+				invalidate_key_region (drawing,
+						       drawing->keys + i);
+			}
+		destroy_cairo (drawing);
+	}
+
+	return FALSE;
+}
+
+static gint
+focus_event (CtkWidget              *widget G_GNUC_UNUSED,
+	     CdkEventFocus          *event,<--- Parameter 'event' can be declared as pointer to const
+	     CafekbdKeyboardDrawing *drawing)
+{
+	if (event->in && drawing->timeout > 0) {
+		g_source_remove (drawing->timeout);
+		drawing->timeout = 0;
+	} else if (drawing->timeout == 0)
+		drawing->timeout =
+		    g_timeout_add (120, (GSourceFunc) unpress_keys,
+				   drawing);
+
+	return FALSE;
+}
+
+static gint
+compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a,<--- Parameter 'a' can be declared as pointer to const
+				  CafekbdKeyboardDrawingItem * b)<--- Parameter 'b' can be declared as pointer to const
+{
+	if (a->priority > b->priority)
+		return 1;
+	else if (a->priority < b->priority)
+		return -1;
+	else
+		return 0;
+}
+
+static void
+init_indicator_doodad (CafekbdKeyboardDrawing * drawing,
+		       XkbDoodadRec * xkbdoodad,
+		       CafekbdKeyboardDrawingDoodad * doodad)
+{
+	if (!drawing->xkb)
+		return;
+
+	if (xkbdoodad->any.type == XkbIndicatorDoodad) {
+		gint index;
+		Atom iname = 0;
+		Atom sname = xkbdoodad->indicator.name;
+		unsigned long phys_indicators =
+		    drawing->xkb->indicators->phys_indicators;
+		Atom *pind = drawing->xkb->names->indicators;<--- Variable 'pind' can be declared as pointer to const
+
+#ifdef KBDRAW_DEBUG
+		printf ("Looking for %d[%s]\n",
+			(int) sname, XGetAtomName (drawing->display,
+						   sname));
+#endif
+
+		for (index = 0; index < XkbNumIndicators; index++) {
+			iname = *pind++;
+			/* name matches and it is real */
+			if (iname == sname
+			    && (phys_indicators & (1 << index)))
+				break;
+			if (iname == 0)
+				break;
+		}
+		if (iname == 0)
+			g_warning ("Could not find indicator %d [%s]\n",
+				   (int) sname,
+				   XGetAtomName (drawing->display, sname));
+		else {
+#ifdef KBDRAW_DEBUG
+			printf ("Found in xkbdesc as %d\n", index);
+#endif
+			drawing->physical_indicators[index] = doodad;
+			/* Trying to obtain the real state, but if fail - just assume OFF */
+			if (!XkbGetNamedIndicator
+			    (drawing->display, sname, NULL, &doodad->on,
+			     NULL, NULL))
+				doodad->on = 0;
+		}
+	}
+}
+
+static void
+init_keys_and_doodads (CafekbdKeyboardDrawing * drawing)
+{
+	gint i, j, k;
+	gint x, y;
+
+	if (!drawing->xkb)
+		return;
+
+	for (i = 0; i < drawing->xkb->geom->num_doodads; i++) {
+		XkbDoodadRec *xkbdoodad = drawing->xkb->geom->doodads + i;
+		CafekbdKeyboardDrawingDoodad *doodad =
+		    g_new (CafekbdKeyboardDrawingDoodad, 1);
+
+		doodad->type = CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD;
+		doodad->origin_x = 0;
+		doodad->origin_y = 0;
+		doodad->angle = 0;
+		doodad->priority = xkbdoodad->any.priority * 256 * 256;
+		doodad->doodad = xkbdoodad;
+
+		init_indicator_doodad (drawing, xkbdoodad, doodad);
+
+		drawing->keyboard_items =
+		    g_list_append (drawing->keyboard_items, doodad);
+	}
+
+	for (i = 0; i < drawing->xkb->geom->num_sections; i++) {
+		XkbSectionRec *section = drawing->xkb->geom->sections + i;
+		guint priority;
+
+#ifdef KBDRAW_DEBUG
+		printf ("initing section %d containing %d rows\n", i,
+			section->num_rows);
+#endif
+		x = section->left;
+		y = section->top;
+		priority = section->priority * 256 * 256;
+
+		for (j = 0; j < section->num_rows; j++) {
+			XkbRowRec *row = section->rows + j;
+
+#ifdef KBDRAW_DEBUG
+			printf ("  initing row %d\n", j);
+#endif
+			x = section->left + row->left;
+			y = section->top + row->top;
+
+			for (k = 0; k < row->num_keys; k++) {
+				XkbKeyRec *xkbkey = row->keys + k;
+				CafekbdKeyboardDrawingKey *key;
+				XkbShapeRec *shape =
+				    drawing->xkb->geom->shapes +
+				    xkbkey->shape_ndx;
+				guint keycode = find_keycode (drawing,
+							      xkbkey->
+							      name.name);
+
+				if (keycode == INVALID_KEYCODE)
+					continue;
+#ifdef KBDRAW_DEBUG
+				printf
+				    ("    initing key %d, shape: %p(%p + %d), code: %u\n",
+				     k, shape, drawing->xkb->geom->shapes,
+				     xkbkey->shape_ndx, keycode);
+#endif
+				if (row->vertical)
+					y += xkbkey->gap;
+				else
+					x += xkbkey->gap;
+
+				if (keycode >= drawing->xkb->min_key_code
+				    && keycode <=
+				    drawing->xkb->max_key_code) {
+					key = drawing->keys + keycode;
+					if (key->type ==
+					    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_INVALID)
+					{
+						key->type =
+						    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY;
+					} else {
+						/* duplicate key for the same keycode,
+						   already defined as CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY */
+						key =
+						    g_new0
+						    (CafekbdKeyboardDrawingKey,
+						     1);
+						key->type =
+						    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA;
+					}
+				} else {
+					g_warning
+					    ("key %4.4s: keycode = %u; not in range %d..%d\n",
+					     xkbkey->name.name, keycode,
+					     drawing->xkb->min_key_code,
+					     drawing->xkb->max_key_code);
+
+					key =
+					    g_new0 (CafekbdKeyboardDrawingKey,
+						    1);
+					key->type =
+					    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA;
+				}
+
+				key->xkbkey = xkbkey;
+				key->angle = section->angle;
+				rotate_coordinate (section->left,
+						   section->top, x, y,
+						   section->angle,
+						   &key->origin_x,
+						   &key->origin_y);
+				key->priority = priority;
+				key->keycode = keycode;
+
+				drawing->keyboard_items =
+				    g_list_append (drawing->keyboard_items,
+						   key);
+
+				if (row->vertical)
+					y += shape->bounds.y2;
+				else
+					x += shape->bounds.x2;
+
+				priority++;
+			}
+		}
+
+		for (j = 0; j < section->num_doodads; j++) {
+			XkbDoodadRec *xkbdoodad = section->doodads + j;
+			CafekbdKeyboardDrawingDoodad *doodad =
+			    g_new (CafekbdKeyboardDrawingDoodad, 1);
+
+			doodad->type =
+			    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD;
+			doodad->origin_x = x;
+			doodad->origin_y = y;
+			doodad->angle = section->angle;
+			doodad->priority =
+			    priority + xkbdoodad->any.priority;
+			doodad->doodad = xkbdoodad;
+
+			init_indicator_doodad (drawing, xkbdoodad, doodad);
+
+			drawing->keyboard_items =
+			    g_list_append (drawing->keyboard_items,
+					   doodad);
+		}
+	}
+
+	drawing->keyboard_items = g_list_sort (drawing->keyboard_items,
+					       (GCompareFunc)
+					       compare_keyboard_item_priorities);<--- You might need to cast the function pointer here<--- You might need to cast the function pointer here
+}
+
+static void
+init_colors (CafekbdKeyboardDrawing * drawing)
+{
+	gboolean result;
+	gint i;
+
+	if (!drawing->xkb)
+		return;
+
+	drawing->colors = g_new (CdkRGBA, drawing->xkb->geom->num_colors);
+
+	for (i = 0; i < drawing->xkb->geom->num_colors; i++) {
+		result =
+		    parse_xkb_color_spec (drawing->xkb->geom->
+					  colors[i].spec,
+					  drawing->colors + i);
+
+		if (!result)
+			g_warning
+			    ("init_colors: unable to parse color %s\n",
+			     drawing->xkb->geom->colors[i].spec);
+	}
+}
+
+static void
+free_cdik (			/*colors doodads indicators keys */
+		  CafekbdKeyboardDrawing * drawing)
+{
+	GList *itemp;
+
+	if (!drawing->xkb)
+		return;
+
+	for (itemp = drawing->keyboard_items; itemp; itemp = itemp->next) {
+		CafekbdKeyboardDrawingItem *item = itemp->data;
+
+		switch (item->type) {
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_INVALID:
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY:
+			break;
+
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA:
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD:
+			g_free (item);
+			break;
+		}
+	}
+
+	g_list_free (drawing->keyboard_items);
+	drawing->keyboard_items = NULL;
+
+	g_free (drawing->keys);
+	g_free (drawing->colors);
+}
+
+static void
+alloc_cdik (CafekbdKeyboardDrawing * drawing)
+{
+	if (!drawing->xkb)
+		return;
+
+	drawing->physical_indicators_size =
+	    drawing->xkb->indicators->phys_indicators + 1;
+	drawing->physical_indicators =
+	    g_new0 (CafekbdKeyboardDrawingDoodad *,
+		    drawing->physical_indicators_size);
+	drawing->keys =
+	    g_new0 (CafekbdKeyboardDrawingKey,
+		    drawing->xkb->max_key_code + 1);
+}
+
+static void
+process_indicators_state_notify (XkbIndicatorNotifyEvent * iev,<--- Parameter 'iev' can be declared as pointer to const
+				 CafekbdKeyboardDrawing * drawing)
+{
+	/* Good question: should we track indicators when the keyboard is
+	   NOT really taken from the screen */
+	gint i;
+
+	for (i = 0; i <= drawing->xkb->indicators->phys_indicators; i++)
+		if (drawing->physical_indicators[i] != NULL
+		    && (iev->changed & 1 << i)) {
+			gint state = (iev->state & 1 << i) != FALSE;
+
+			if ((state && !drawing->physical_indicators[i]->on)
+			    || (!state
+				&& drawing->physical_indicators[i]->on)) {
+				drawing->physical_indicators[i]->on =
+				    state;
+				if (create_cairo (drawing)) {
+					draw_doodad
+					    (drawing->renderContext,
+					     drawing,
+					     drawing->physical_indicators
+					     [i]);
+					destroy_cairo (drawing);
+				}
+				invalidate_indicator_doodad_region
+				    (drawing,
+				     drawing->physical_indicators[i]);
+			}
+		}
+}
+
+static CdkFilterReturn
+xkb_state_notify_event_filter (CdkXEvent              *cdkxev,
+			       CdkEvent               *event G_GNUC_UNUSED,
+			       CafekbdKeyboardDrawing *drawing)
+{
+#define modifier_change_mask (XkbModifierStateMask | XkbModifierBaseMask | XkbModifierLatchMask | XkbModifierLockMask)
+
+	if (!drawing->xkb)
+		return CDK_FILTER_CONTINUE;
+
+	if (((XEvent *) cdkxev)->type == drawing->xkb_event_type) {
+		XkbEvent *kev = (XkbEvent *) cdkxev;
+		CtkAllocation allocation;
+		switch (kev->any.xkb_type) {
+		case XkbStateNotify:
+			if (((kev->state.changed & modifier_change_mask) &&
+			     drawing->track_modifiers)) {
+				free_cdik (drawing);
+				if (drawing->track_modifiers)
+					cafekbd_keyboard_drawing_set_mods
+					    (drawing,
+					     kev->state.compat_state);
+				drawing->keys =
+				    g_new0 (CafekbdKeyboardDrawingKey,
+					    drawing->xkb->max_key_code +
+					    1);
+
+				ctk_widget_get_allocation (CTK_WIDGET
+							   (drawing),
+							   &allocation);
+				size_allocate (CTK_WIDGET (drawing),
+					       &allocation, drawing);
+
+				init_keys_and_doodads (drawing);
+				init_colors (drawing);
+			}
+			break;
+
+		case XkbIndicatorStateNotify:
+			{
+				process_indicators_state_notify (&
+								 ((XkbEvent
+								   *)
+								  cdkxev)->indicators,
+drawing);
+			}
+			break;
+
+		case XkbIndicatorMapNotify:
+		case XkbControlsNotify:
+		case XkbNamesNotify:
+		case XkbNewKeyboardNotify:
+			{
+				XkbStateRec state;
+				memset (&state, 0, sizeof (state));
+				XkbGetState (drawing->display,
+					     XkbUseCoreKbd, &state);
+				if (drawing->track_modifiers)
+					cafekbd_keyboard_drawing_set_mods
+					    (drawing, state.compat_state);
+				if (drawing->track_config)
+					cafekbd_keyboard_drawing_set_keyboard
+					    (drawing, NULL);
+			}
+			break;
+		}
+	}
+
+	return CDK_FILTER_CONTINUE;
+}
+
+static void
+destroy (CafekbdKeyboardDrawing * drawing)
+{
+	free_render_context (drawing);
+	cdk_window_remove_filter (NULL, (CdkFilterFunc)
+				  xkb_state_notify_event_filter, drawing);
+	if (drawing->timeout > 0) {
+		g_source_remove (drawing->timeout);
+		drawing->timeout = 0;
+	}
+	if (drawing->idle_redraw > 0) {
+		g_source_remove (drawing->idle_redraw);
+		drawing->idle_redraw = 0;
+	}
+
+	if (drawing->surface != NULL) {
+		cairo_surface_destroy (drawing->surface);
+	}
+}
+
+static void
+style_changed (CafekbdKeyboardDrawing * drawing)
+{
+	pango_layout_context_changed (drawing->renderContext->layout);
+}
+
+static void
+cafekbd_keyboard_drawing_init (CafekbdKeyboardDrawing * drawing)
+{
+	gint opcode = 0, error = 0, major = 1, minor = 0;
+	gint mask;
+
+	drawing->display = CDK_DISPLAY_XDISPLAY(cdk_display_get_default());
+
+	printf ("dpy: %p\n", (void *) drawing->display);
+
+	if (!XkbQueryExtension
+	    (drawing->display, &opcode, &drawing->xkb_event_type, &error,
+	     &major, &minor))
+		g_critical
+		    ("XkbQueryExtension failed! Stuff probably won't work.");
+
+	printf ("evt/error/major/minor: %d/%d/%d/%d\n",
+		drawing->xkb_event_type, error, major, minor);
+
+	/* XXX: this stuff probably doesn't matter.. also, cdk_screen_get_default can fail */
+	if (ctk_widget_has_screen (CTK_WIDGET (drawing)))
+		drawing->screen_num =
+		    cdk_x11_screen_get_screen_number (ctk_widget_get_screen
+					   (CTK_WIDGET (drawing)));
+	else
+		drawing->screen_num =
+		    cdk_x11_screen_get_screen_number (cdk_screen_get_default ());
+
+	drawing->surface = NULL;
+	alloc_render_context (drawing);
+
+	drawing->keyboard_items = NULL;
+	drawing->colors = NULL;
+
+	drawing->track_modifiers = 0;
+	drawing->track_config = 0;
+
+	/* XXX: XkbClientMapMask | XkbIndicatorMapMask | XkbNamesMask | XkbGeometryMask */
+	drawing->xkb = XkbGetKeyboard (drawing->display,
+				       XkbGBN_GeometryMask |
+				       XkbGBN_KeyNamesMask |
+				       XkbGBN_OtherNamesMask |
+				       XkbGBN_SymbolsMask |
+				       XkbGBN_IndicatorMapMask,
+				       XkbUseCoreKbd);
+	if (drawing->xkb) {
+		XkbGetNames (drawing->display, XkbAllNamesMask, drawing->xkb);
+		XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+				       XkbIndicatorStateNotify,
+				       drawing->xkb->indicators->phys_indicators,
+				       drawing->xkb->indicators->phys_indicators);
+	}
+
+	drawing->l3mod = XkbKeysymToModifiers (drawing->display,
+					       CDK_KEY_ISO_Level3_Shift);
+
+	drawing->xkbOnDisplay = TRUE;
+
+	alloc_cdik (drawing);
+
+	mask =
+	    (XkbStateNotifyMask | XkbNamesNotifyMask |
+	     XkbControlsNotifyMask | XkbIndicatorMapNotifyMask |
+	     XkbNewKeyboardNotifyMask);
+	XkbSelectEvents (drawing->display, XkbUseCoreKbd, mask, mask);
+
+	mask = XkbGroupStateMask | XkbModifierStateMask;
+	XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+			       XkbStateNotify, mask, mask);
+
+	mask = (XkbGroupNamesMask | XkbIndicatorNamesMask);
+	XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+			       XkbNamesNotify, mask, mask);
+	init_keys_and_doodads (drawing);
+	init_colors (drawing);
+
+	/* required to get key events */
+	ctk_widget_set_can_focus (CTK_WIDGET (drawing), TRUE);
+
+	ctk_widget_set_events (CTK_WIDGET (drawing),
+			       CDK_EXPOSURE_MASK | CDK_KEY_PRESS_MASK |
+			       CDK_KEY_RELEASE_MASK | CDK_BUTTON_PRESS_MASK
+			       | CDK_FOCUS_CHANGE_MASK);
+	g_signal_connect (G_OBJECT (drawing), "draw",
+			  G_CALLBACK (draw), drawing);
+	g_signal_connect_after (G_OBJECT (drawing), "key-press-event",
+				G_CALLBACK (key_event), drawing);
+	g_signal_connect_after (G_OBJECT (drawing), "key-release-event",
+				G_CALLBACK (key_event), drawing);
+	g_signal_connect (G_OBJECT (drawing), "button-press-event",
+			  G_CALLBACK (button_press_event), drawing);<--- You might need to cast the function pointer here
+	g_signal_connect (G_OBJECT (drawing), "focus-out-event",
+			  G_CALLBACK (focus_event), drawing);
+	g_signal_connect (G_OBJECT (drawing), "focus-in-event",
+			  G_CALLBACK (focus_event), drawing);<--- You might need to cast the function pointer here
+	g_signal_connect (G_OBJECT (drawing), "size-allocate",
+			  G_CALLBACK (size_allocate), drawing);
+	g_signal_connect (G_OBJECT (drawing), "destroy",
+			  G_CALLBACK (destroy), drawing);
+	g_signal_connect (G_OBJECT (drawing), "style-set",
+			  G_CALLBACK (style_changed), drawing);
+
+	cdk_window_add_filter (NULL, (CdkFilterFunc)
+			       xkb_state_notify_event_filter, drawing);
+}
+
+CtkWidget *
+cafekbd_keyboard_drawing_new (void)
+{
+	return
+	    CTK_WIDGET (g_object_new
+			(cafekbd_keyboard_drawing_get_type (), NULL));
+}
+
+static void
+cafekbd_keyboard_drawing_class_init (CafekbdKeyboardDrawingClass * klass)
+{
+	CtkWidgetClass *widget_class = CTK_WIDGET_CLASS (klass);
+	ctk_widget_class_set_css_name (widget_class, "cafekbd-keyboard-drawing");
+
+	klass->bad_keycode = NULL;
+
+	cafekbd_keyboard_drawing_signals[BAD_KEYCODE] =
+	    g_signal_new ("bad-keycode", cafekbd_keyboard_drawing_get_type (),
+			  G_SIGNAL_RUN_FIRST,
+			  G_STRUCT_OFFSET (CafekbdKeyboardDrawingClass,
+					   bad_keycode), NULL, NULL,
+			  cafekbd_keyboard_drawing_VOID__UINT, G_TYPE_NONE, 1,
+			  G_TYPE_UINT);
+}
+
+GType
+cafekbd_keyboard_drawing_get_type (void)
+{
+	static GType cafekbd_keyboard_drawing_type = 0;
+
+	if (!cafekbd_keyboard_drawing_type) {
+		static const GTypeInfo cafekbd_keyboard_drawing_info = {
+			sizeof (CafekbdKeyboardDrawingClass),
+			NULL,	/* base_init */
+			NULL,	/* base_finalize */
+			(GClassInitFunc) cafekbd_keyboard_drawing_class_init,
+			NULL,	/* class_finalize */
+			NULL,	/* class_data */
+			sizeof (CafekbdKeyboardDrawing),
+			0,	/* n_preallocs */
+			(GInstanceInitFunc) cafekbd_keyboard_drawing_init,
+			NULL	/* *value_table */
+		};
+
+		cafekbd_keyboard_drawing_type =
+		    g_type_register_static (CTK_TYPE_DRAWING_AREA,
+					    "CafekbdKeyboardDrawing",
+					    &cafekbd_keyboard_drawing_info,
+					    0);
+	}
+
+	return cafekbd_keyboard_drawing_type;
+}
+
+void
+cafekbd_keyboard_drawing_set_mods (CafekbdKeyboardDrawing * drawing, guint mods)
+{
+#ifdef KBDRAW_DEBUG
+	printf ("set_mods: %d\n", mods);
+#endif
+	if (mods != drawing->mods) {
+		drawing->mods = mods;
+		ctk_widget_queue_draw (CTK_WIDGET (drawing));
+	}
+}
+
+/**
+ * cafekbd_keyboard_drawing_render:
+ * @kbdrawing: keyboard layout to render
+ * @cr:        Cairo context to render to
+ * @layout:    Pango layout to use to render text
+ * @x:         left coordinate (pixels) of region to render in
+ * @y:         top coordinate (pixels) of region to render in
+ * @width:     width (pixels) of region to render in
+ * @height:    height (pixels) of region to render in
+ *
+ * Renders a keyboard layout to a cairo_t context.  @cr and @layout can be got
+ * from e.g. a CtkWidget or a CtkPrintContext.  @cr and @layout may be modified
+ * by the function but will not be unreffed.
+ *
+ * Returns: %TRUE on success, %FALSE on failure
+ */
+gboolean
+cafekbd_keyboard_drawing_render (CafekbdKeyboardDrawing * kbdrawing,
+			      cairo_t * cr,
+			      PangoLayout * layout,
+			      double x, double y,
+			      double width, double height,
+			      double dpi_x, double dpi_y)
+{
+	CtkStyleContext *style_context =
+	    ctk_widget_get_style_context (CTK_WIDGET (kbdrawing));
+	CdkRGBA dark_color;
+	PangoFontDescription *fd = NULL;
+
+	ctk_style_context_get_background_color (style_context,
+	                                        ctk_style_context_get_state (style_context),
+	                                        &dark_color);
+	/* make dark background by making regular background darker */
+	dark_color.red *= 0.7;
+	dark_color.green *= 0.7;
+	dark_color.blue *= 0.7;
+
+	ctk_style_context_get (style_context,
+	                       ctk_style_context_get_state (style_context),
+	                       CTK_STYLE_PROPERTY_FONT, &fd, NULL);
+	fd = pango_font_description_copy (fd);
+
+	CafekbdKeyboardDrawingRenderContext context = {
+		cr,
+		kbdrawing->renderContext->angle,
+		layout,
+		pango_font_description_copy (fd),
+		1, 1,
+		dark_color
+	};
+
+	if (!context_setup_scaling (&context, kbdrawing, width, height,
+	                            dpi_x, dpi_y))
+		return FALSE;
+	cairo_translate (cr, x, y);
+
+	draw_keyboard_to_context (&context, kbdrawing);
+
+	pango_font_description_free (fd);
+
+	return TRUE;
+}
+
+/**
+ * cafekbd_keyboard_drawing_set_keyboard: (skip)
+ */
+gboolean
+cafekbd_keyboard_drawing_set_keyboard (CafekbdKeyboardDrawing * drawing,
+				    XkbComponentNamesRec * names)
+{
+	CtkAllocation allocation;
+
+	free_cdik (drawing);
+	if (drawing->xkb)
+		XkbFreeKeyboard (drawing->xkb, 0, TRUE);	/* free_all = TRUE */
+	drawing->xkb = NULL;
+
+	if (names) {
+		drawing->xkb =
+		    XkbGetKeyboardByName (drawing->display, XkbUseCoreKbd,
+					  names, 0,
+					  XkbGBN_GeometryMask |
+					  XkbGBN_KeyNamesMask |
+					  XkbGBN_OtherNamesMask |
+					  XkbGBN_ClientSymbolsMask |
+					  XkbGBN_IndicatorMapMask, FALSE);
+		drawing->xkbOnDisplay = FALSE;
+	} else {
+		drawing->xkb = XkbGetKeyboard (drawing->display,
+					       XkbGBN_GeometryMask |
+					       XkbGBN_KeyNamesMask |
+					       XkbGBN_OtherNamesMask |
+					       XkbGBN_SymbolsMask |
+					       XkbGBN_IndicatorMapMask,
+					       XkbUseCoreKbd);
+		XkbGetNames (drawing->display, XkbAllNamesMask,
+			     drawing->xkb);
+		drawing->xkbOnDisplay = TRUE;
+	}
+
+	if (drawing->xkb) {
+		XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+				       XkbIndicatorStateNotify,
+				       drawing->xkb->indicators->phys_indicators,
+				       drawing->xkb->indicators->phys_indicators);
+	}
+
+	alloc_cdik (drawing);
+
+	init_keys_and_doodads (drawing);
+	init_colors (drawing);
+
+	ctk_widget_get_allocation (CTK_WIDGET (drawing), &allocation);
+	size_allocate (CTK_WIDGET (drawing), &allocation, drawing);
+	ctk_widget_queue_draw (CTK_WIDGET (drawing));
+
+	return TRUE;
+}
+
+const gchar* cafekbd_keyboard_drawing_get_keycodes(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->keycodes <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->keycodes);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_geometry(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->geometry <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->geometry);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_symbols(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->symbols <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->symbols);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_types(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->types <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->types);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_compat(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->compat <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->compat);
+	}
+}
+
+void
+cafekbd_keyboard_drawing_set_track_modifiers (CafekbdKeyboardDrawing * drawing,
+					   gboolean enable)
+{
+	if (enable) {
+		XkbStateRec state;
+		drawing->track_modifiers = 1;
+		memset (&state, 0, sizeof (state));
+		XkbGetState (drawing->display, XkbUseCoreKbd, &state);
+		cafekbd_keyboard_drawing_set_mods (drawing,
+						state.compat_state);
+	} else
+		drawing->track_modifiers = 0;
+}
+
+void
+cafekbd_keyboard_drawing_set_track_config (CafekbdKeyboardDrawing * drawing,
+					gboolean enable)
+{
+	if (enable)
+		drawing->track_config = 1;
+	else
+		drawing->track_config = 0;
+}
+
+void
+cafekbd_keyboard_drawing_set_groups_levels (CafekbdKeyboardDrawing * drawing,
+					 CafekbdKeyboardDrawingGroupLevel *
+					 groupLevels[])
+{
+#ifdef KBDRAW_DEBUG
+	printf ("set_group_levels [topLeft]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT]->level);
+	printf ("set_group_levels [topRight]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPRIGHT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPRIGHT]->level);
+	printf ("set_group_levels [bottomLeft]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT]->level);
+	printf ("set_group_levels [bottomRight]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT]->level);
+#endif
+	drawing->groupLevels = groupLevels;
+
+	ctk_widget_queue_draw (CTK_WIDGET (drawing));
+}
+
+typedef struct {
+	CafekbdKeyboardDrawing *drawing;
+	const gchar *description;
+} XkbLayoutPreviewPrintData;
+
+static void
+cafekbd_keyboard_drawing_begin_print (CtkPrintOperation         *operation,
+				      CtkPrintContext           *context G_GNUC_UNUSED,
+				      XkbLayoutPreviewPrintData *data G_GNUC_UNUSED)
+{
+	/* We always print single-page documents */
+	CtkPrintSettings *settings =
+	    ctk_print_operation_get_print_settings (operation);
+	ctk_print_operation_set_n_pages (operation, 1);
+	if (!ctk_print_settings_has_key
+	    (settings, CTK_PRINT_SETTINGS_ORIENTATION))
+		ctk_print_settings_set_orientation (settings,
+						    CTK_PAGE_ORIENTATION_LANDSCAPE);
+}
+
+static void
+cafekbd_keyboard_drawing_draw_page (CtkPrintOperation         *operation,
+				    CtkPrintContext           *context,
+				    gint                       page_nr G_GNUC_UNUSED,
+				    XkbLayoutPreviewPrintData *data)
+{
+	cairo_t *cr = ctk_print_context_get_cairo_context (context);
+	PangoLayout *layout =
+	    ctk_print_context_create_pango_layout (context);
+	PangoFontDescription *desc =
+	    pango_font_description_from_string ("sans 8");
+	gdouble width = ctk_print_context_get_width (context);
+	gdouble height = ctk_print_context_get_height (context);
+	gdouble dpi_x = ctk_print_context_get_dpi_x (context);
+	gdouble dpi_y = ctk_print_context_get_dpi_y (context);
+	gchar *header;
+
+	ctk_print_operation_set_unit (operation, CTK_UNIT_PIXEL);
+
+	header = g_strdup_printf
+	    (_("Keyboard layout \"%s\"\n"
+	       "Copyright &#169; X.Org Foundation and "
+	       "XKeyboardConfig contributors\n"
+	       "For licensing see package metadata"), data->description);
+	pango_layout_set_markup (layout, header, -1);
+	pango_layout_set_font_description (layout, desc);
+	pango_font_description_free (desc);
+	pango_layout_set_width (layout, pango_units_from_double (width));
+	pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER);
+	cairo_set_source_rgb (cr, 0, 0, 0);
+	cairo_move_to (cr, 0, 0);
+	pango_cairo_show_layout (cr, layout);
+
+	cafekbd_keyboard_drawing_render (CAFEKBD_KEYBOARD_DRAWING
+				      (data->drawing), cr, layout, 0.0,
+				      0.0, width, height, dpi_x, dpi_y);
+
+	g_object_unref (layout);
+}
+
+void
+cafekbd_keyboard_drawing_print (CafekbdKeyboardDrawing * drawing,
+			     CtkWindow * parent_window,
+			     const gchar * description)
+{
+	CtkPrintOperation *print;
+	CtkPrintOperationResult res;
+	static CtkPrintSettings *settings = NULL;
+	XkbLayoutPreviewPrintData data = { drawing, description };
+
+	print = ctk_print_operation_new ();
+
+	if (settings != NULL)
+		ctk_print_operation_set_print_settings (print, settings);
+
+	g_signal_connect (print, "begin_print",
+			  G_CALLBACK (cafekbd_keyboard_drawing_begin_print),
+			  &data);
+	g_signal_connect (print, "draw_page",
+			  G_CALLBACK (cafekbd_keyboard_drawing_draw_page),
+			  &data);
+
+	res = ctk_print_operation_run (print,
+				       CTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
+				       parent_window, NULL);
+
+	if (res == CTK_PRINT_OPERATION_RESULT_APPLY) {
+		if (settings != NULL)
+			g_object_unref (settings);
+		settings = ctk_print_operation_get_print_settings (print);
+		g_object_ref (settings);
+	}
+
+	g_object_unref (print);
+}
+
+static void
+show_layout_response (CtkWidget * dialog, gint resp)
+{
+	CdkRectangle rect;
+	CtkWidget *kbdraw;
+	const gchar *groupName;
+
+	switch (resp) {
+	case CTK_RESPONSE_CLOSE:
+		ctk_window_get_position (CTK_WINDOW (dialog), &rect.x,
+					 &rect.y);
+		ctk_window_get_size (CTK_WINDOW (dialog), &rect.width,
+				     &rect.height);
+		cafekbd_preview_save_position (&rect);
+		ctk_widget_destroy (dialog);
+		break;
+	case CTK_RESPONSE_PRINT:
+		kbdraw =
+		    CTK_WIDGET (g_object_get_data
+				(G_OBJECT (dialog), "kbdraw"));
+		groupName =
+		    (const gchar *) g_object_get_data (G_OBJECT (dialog),
+						       "groupName");
+		cafekbd_keyboard_drawing_print (CAFEKBD_KEYBOARD_DRAWING
+					     (kbdraw), CTK_WINDOW (dialog),
+					     groupName ? groupName :
+					     _("Unknown"));
+	}
+}
+
+CtkWidget *
+cafekbd_keyboard_drawing_new_dialog (gint group, gchar * group_name)
+{
+	static CafekbdKeyboardDrawingGroupLevel groupsLevels[] = { {
+								 0, 1}, {
+									 0,
+									 3},
+	{
+	 0, 0}, {
+		 0, 2}
+	};
+	static CafekbdKeyboardDrawingGroupLevel *pGroupsLevels[] = {
+		groupsLevels, groupsLevels + 1, groupsLevels + 2,
+		groupsLevels + 3
+	};
+
+	CtkBuilder *builder;
+	CtkWidget *dialog, *kbdraw;
+	XkbComponentNamesRec component_names;
+	XklConfigRec *xkl_data;
+	CdkRectangle *rect;
+	GError *error = NULL;
+	char title[128] = "";
+	XklEngine* engine = xkl_engine_get_instance(CDK_DISPLAY_XDISPLAY(cdk_display_get_default()));
+
+	builder = ctk_builder_new ();
+	ctk_builder_add_from_resource (builder,
+	                               "/org/cafe/peripherals/keyboard/show-layout.ui",
+	                               &error);
+
+	if (error) {
+		g_error ("Could not load UI: %s", error->message);
+		g_clear_error (&error);
+	}
+
+
+	dialog =
+	    CTK_WIDGET (ctk_builder_get_object
+			(builder, "gswitchit_layout_view"));
+	kbdraw = cafekbd_keyboard_drawing_new ();
+	ctk_widget_set_vexpand (kbdraw, TRUE);
+
+	snprintf (title, sizeof (title), _("Keyboard Layout \"%s\""),
+		  group_name);
+	ctk_window_set_title (CTK_WINDOW (dialog), title);
+	g_object_set_data_full (G_OBJECT (dialog), "group_name",
+				g_strdup (group_name), g_free);
+
+	cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING
+						 (kbdraw), pGroupsLevels);
+
+	xkl_data = xkl_config_rec_new ();
+	if (xkl_config_rec_get_from_server (xkl_data, engine)) {
+		int num_layouts = g_strv_length (xkl_data->layouts);
+		int num_variants = g_strv_length (xkl_data->variants);
+		if (group >= 0 && group < num_layouts
+		    && group < num_variants) {
+			char *l = g_strdup (xkl_data->layouts[group]);
+			char *v = g_strdup (xkl_data->variants[group]);
+			char **p;
+			int i;
+
+			if ((p = xkl_data->layouts) != NULL)
+				for (i = num_layouts; --i >= 0;)
+					g_free (*p++);
+
+			if ((p = xkl_data->variants) != NULL)
+				for (i = num_variants; --i >= 0;)
+					g_free (*p++);
+
+			xkl_data->layouts =
+			    g_realloc (xkl_data->layouts,
+				       sizeof (char *) * 2);
+			xkl_data->variants =
+			    g_realloc (xkl_data->variants,
+				       sizeof (char *) * 2);
+			xkl_data->layouts[0] = l;
+			xkl_data->variants[0] = v;
+			xkl_data->layouts[1] = xkl_data->variants[1] =
+			    NULL;
+		}
+
+		if (xkl_xkb_config_native_prepare(engine, xkl_data, &component_names))
+		{
+			cafekbd_keyboard_drawing_set_keyboard
+			    (CAFEKBD_KEYBOARD_DRAWING (kbdraw),
+			     &component_names);
+			xkl_xkb_config_native_cleanup (engine,
+						       &component_names);
+		}
+	}
+
+	g_object_unref (G_OBJECT (xkl_data));
+
+	g_object_set_data (G_OBJECT (dialog), "builderData", builder);
+	g_signal_connect (G_OBJECT (dialog), "response", G_CALLBACK (show_layout_response), NULL);
+
+	rect = cafekbd_preview_load_position ();
+
+	if (rect != NULL)
+	{
+		ctk_window_move (CTK_WINDOW (dialog), rect->x, rect->y);
+		ctk_window_resize (CTK_WINDOW (dialog), rect->width, rect->height);
+		g_free (rect);
+	}
+	else
+	{
+		ctk_window_resize (CTK_WINDOW (dialog), 700, 400);
+	}
+
+	ctk_window_set_resizable (CTK_WINDOW (dialog), TRUE);
+
+	ctk_container_add (CTK_CONTAINER
+			   (ctk_builder_get_object
+			    (builder, "preview_vbox")), kbdraw);
+
+	g_object_set_data (G_OBJECT (dialog), "kbdraw", kbdraw);
+
+		g_signal_connect_swapped(dialog, "destroy", G_CALLBACK(g_object_unref),  g_object_get_data(G_OBJECT(dialog), "builderData"));
+
+	ctk_widget_show_all(dialog);
+
+	return dialog;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/5.html b/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/5.html new file mode 100644 index 0000000..a0afe30 --- /dev/null +++ b/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/5.html @@ -0,0 +1,1978 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+#include <config.h>
+
+#include <memory.h>
+
+#include <cairo.h>
+
+#include <cdk/cdkkeysyms.h>
+#include <cdk/cdkx.h>
+#include <glib/gi18n-lib.h>
+#include <glib/gprintf.h>
+
+#include <cafekbd-status.h>
+
+#include <cafekbd-desktop-config.h>
+#include <cafekbd-indicator-config.h>
+
+typedef struct _gki_globals {
+	XklEngine *engine;
+	XklConfigRegistry *registry;
+
+	CafekbdDesktopConfig cfg;
+	CafekbdIndicatorConfig ind_cfg;
+	CafekbdKeyboardConfig kbd_cfg;
+
+	const gchar *tooltips_format;
+	gchar **full_group_names;
+	gchar **short_group_names;
+
+	gint current_width;
+	gint current_height;
+	int real_width;
+
+	GSList *icons;		/* list of GdkPixbuf */
+	GSList *widget_instances;	/* list of CafekbdStatus */
+	gulong state_changed_handler;
+	gulong config_changed_handler;
+} gki_globals;
+
+static gchar *settings_signal_names[] = {
+	"notify::ctk-theme-name",
+	"notify::ctk-key-theme-name",
+	"notify::ctk-font-name",
+	"notify::font-options",
+};
+
+struct _CafekbdStatusPrivate {
+	gdouble angle;
+	gulong settings_signal_handlers[sizeof (settings_signal_names) /
+					sizeof (settings_signal_names[0])];
+};
+
+/* one instance for ALL widgets */
+static gki_globals globals;
+
+#define ForAllIndicators() \
+	{ \
+		GSList* cur; \
+		for (cur = globals.widget_instances; cur != NULL; cur = cur->next) { \
+			CafekbdStatus * gki = (CafekbdStatus*)cur->data;
+#define NextIndicator() \
+		} \
+	}
+
+G_DEFINE_TYPE (CafekbdStatus, cafekbd_status, CTK_TYPE_STATUS_ICON)<--- There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
+static void
+cafekbd_status_global_init (void);
+static void
+cafekbd_status_global_term (void);
+static GdkPixbuf *
+cafekbd_status_prepare_drawing (CafekbdStatus * gki, int group);
+static void
+cafekbd_status_set_current_page_for_group (CafekbdStatus * gki, int group);
+static void
+cafekbd_status_set_current_page (CafekbdStatus * gki);
+static void
+cafekbd_status_global_cleanup (CafekbdStatus * gki);
+static void
+cafekbd_status_global_fill (CafekbdStatus * gki);
+static void
+cafekbd_status_set_tooltips (CafekbdStatus * gki, const char *str);
+
+void
+cafekbd_status_set_tooltips (CafekbdStatus * gki, const char *str)
+{
+	g_assert (str == NULL || g_utf8_validate (str, -1, NULL));
+
+	ctk_status_icon_set_tooltip_text (CTK_STATUS_ICON (gki), str);
+}
+
+void
+cafekbd_status_global_cleanup (CafekbdStatus *gki G_GNUC_UNUSED)
+{
+	while (globals.icons) {
+		if (globals.icons->data)
+			g_object_unref (G_OBJECT (globals.icons->data));
+		globals.icons =
+		    g_slist_delete_link (globals.icons, globals.icons);
+	}
+}
+
+void
+cafekbd_status_global_fill (CafekbdStatus * gki)
+{
+	int grp;
+	int total_groups = xkl_engine_get_num_groups (globals.engine);
+
+	for (grp = 0; grp < total_groups; grp++) {
+		GdkPixbuf *page = cafekbd_status_prepare_drawing (gki, grp);
+		globals.icons = g_slist_append (globals.icons, page);
+	}
+}
+
+static void
+cafekbd_status_activate (CafekbdStatus *gki G_GNUC_UNUSED)
+{
+	xkl_debug (150, "Mouse button pressed on applet\n");
+	cafekbd_desktop_config_lock_next_group (&globals.cfg);
+}
+
+/* hackish xref */
+extern gchar *cafekbd_indicator_extract_layout_name (int group,
+						  XklEngine * engine,
+						  CafekbdKeyboardConfig *
+						  kbd_cfg,
+						  gchar **
+						  short_group_names,
+						  gchar **
+						  full_group_names);
+
+extern gchar *cafekbd_indicator_create_label_title (int group,
+						 GHashTable **
+						 ln2cnt_map,
+						 gchar * layout_name);
+
+static void
+cafekbd_status_render_cairo (cairo_t * cr, int group)
+{
+	double r, g, b;
+	PangoFontDescription *pfd;
+	PangoContext *pcc;
+	PangoLayout *pl;
+	int lwidth, lheight;
+	gchar *layout_name, *lbl_title;
+	double screen_res;
+	cairo_font_options_t *fo;
+	static GHashTable *ln2cnt_map = NULL;
+
+	xkl_debug (160, "Rendering cairo for group %d\n", group);
+	if (globals.ind_cfg.background_color != NULL &&
+	    globals.ind_cfg.background_color[0] != 0) {
+		if (sscanf
+		    (globals.ind_cfg.background_color, "%lg %lg %lg", &r,
+		     &g, &b) == 3) {
+			cairo_set_source_rgb (cr, r, g, b);
+			cairo_rectangle (cr, 0, 0, globals.current_width,
+					 globals.current_height);
+			cairo_fill (cr);
+		}
+	}
+
+	if (globals.ind_cfg.foreground_color != NULL &&
+	    globals.ind_cfg.foreground_color[0] != 0) {
+		if (sscanf
+		    (globals.ind_cfg.foreground_color, "%lg %lg %lg", &r,
+		     &g, &b) == 3) {
+			cairo_set_source_rgb (cr, r, g, b);
+		}
+	}
+
+	pcc = pango_cairo_create_context (cr);
+
+	screen_res = cdk_screen_get_resolution (cdk_screen_get_default ());
+	if (screen_res > 0)
+		pango_cairo_context_set_resolution (pcc, screen_res);
+
+	fo = cairo_font_options_copy (cdk_screen_get_font_options
+				      (cdk_screen_get_default ()));
+	/* SUBPIXEL antialiasing gives bad results on in-memory images */
+	if (cairo_font_options_get_antialias (fo) ==
+	    CAIRO_ANTIALIAS_SUBPIXEL)
+		cairo_font_options_set_antialias (fo,
+						  CAIRO_ANTIALIAS_GRAY);
+	pango_cairo_context_set_font_options (pcc, fo);
+
+	pl = pango_layout_new (pcc);
+
+	layout_name = cafekbd_indicator_extract_layout_name (group,
+							  globals.engine,
+							  &globals.kbd_cfg,
+							  globals.short_group_names,
+							  globals.full_group_names);
+	lbl_title =
+	    cafekbd_indicator_create_label_title (group, &ln2cnt_map,
+					       layout_name);
+
+	if (group + 1 == xkl_engine_get_num_groups (globals.engine)) {
+		g_hash_table_destroy (ln2cnt_map);
+		ln2cnt_map = NULL;
+	}
+
+	pango_layout_set_text (pl, lbl_title, -1);
+
+	g_free (lbl_title);
+
+	pfd = pango_font_description_from_string (globals.ind_cfg.font_family);
+
+	pango_layout_set_font_description (pl, pfd);
+	pango_layout_get_size (pl, &lwidth, &lheight);
+
+	cairo_move_to (cr,
+		       (globals.current_width - lwidth / PANGO_SCALE) / 2,
+		       (globals.current_height -
+			lheight / PANGO_SCALE) / 2);
+
+	pango_cairo_show_layout (cr, pl);
+
+	pango_font_description_free (pfd);
+	g_object_unref (pl);
+	g_object_unref (pcc);
+	cairo_font_options_destroy (fo);
+	cairo_destroy (cr);
+
+	globals.real_width = (lwidth / PANGO_SCALE) + 4;
+	if (globals.real_width > globals.current_width)
+		globals.real_width = globals.current_width;
+	if (globals.real_width < globals.current_height)
+		globals.real_width = globals.current_height;
+}
+
+static inline guint8
+convert_color_channel (guint8 src, guint8 alpha)
+{
+	return alpha ? ((((guint) src) << 8) - src) / alpha : 0;
+}
+
+static void
+convert_bgra_to_rgba (guint8 const *src, guint8 * dst, int width,
+		      int height, int new_width)
+{
+	int xoffset = width - new_width;
+
+	/* *4 */
+	int ptr_step = xoffset << 2;
+
+	int x, y;
+
+	/* / 2 * 4 */
+	src = src + ((xoffset >> 1) << 2);
+
+	for (y = height; --y >= 0; src += ptr_step) {
+		for (x = new_width; --x >= 0;) {
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+			dst[0] = convert_color_channel (src[2], src[3]);
+			dst[1] = convert_color_channel (src[1], src[3]);
+			dst[2] = convert_color_channel (src[0], src[3]);
+			dst[3] = src[3];
+#else
+			dst[0] = convert_color_channel (src[1], src[0]);
+			dst[1] = convert_color_channel (src[2], src[0]);
+			dst[2] = convert_color_channel (src[3], src[0]);
+			dst[3] = src[0];
+#endif
+			dst += 4;
+			src += 4;
+		}
+	}
+}
+
+static GdkPixbuf *
+cafekbd_status_prepare_drawing (CafekbdStatus *gki G_GNUC_UNUSED,
+				int            group)
+{
+	GError *gerror = NULL;
+	char *image_filename;
+	GdkPixbuf *image;
+
+	if (globals.current_width == 0)
+		return NULL;
+
+	if (globals.ind_cfg.show_flags) {
+
+		image_filename =
+		    (char *) g_slist_nth_data (globals.
+					       ind_cfg.image_filenames,
+					       group);
+
+		image = gdk_pixbuf_new_from_file_at_size (image_filename,
+							  globals.current_width,
+							  globals.current_height,
+							  &gerror);
+
+		if (image == NULL) {
+			CtkWidget *dialog = ctk_message_dialog_new (NULL,
+								    CTK_DIALOG_DESTROY_WITH_PARENT,
+								    CTK_MESSAGE_ERROR,
+								    CTK_BUTTONS_OK,
+								    _
+								    ("There was an error loading an image: %s"),
+								    gerror
+								    ==
+								    NULL ?
+								    "Unknown"
+								    :
+								    gerror->message);
+			g_signal_connect (G_OBJECT (dialog), "response",
+					  G_CALLBACK (ctk_widget_destroy),
+					  NULL);
+
+			ctk_window_set_resizable (CTK_WINDOW (dialog),
+						  FALSE);
+
+			ctk_widget_show (dialog);
+			g_error_free (gerror);
+
+			return NULL;
+		}
+		xkl_debug (150,
+			   "Image %d[%s] loaded -> %p[%dx%d], alpha: %d\n",
+			   group, image_filename, image,
+			   gdk_pixbuf_get_width (image),
+			   gdk_pixbuf_get_height (image),
+			   gdk_pixbuf_get_has_alpha (image));
+
+		return image;
+	} else {
+		cairo_surface_t *cs =
+		    cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
+						globals.current_width,
+						globals.current_height);
+		unsigned char *cairo_data;
+		guchar *pixbuf_data;
+		cafekbd_status_render_cairo (cairo_create (cs), group);
+		cairo_data = cairo_image_surface_get_data (cs);
+#if 0
+		char pngfilename[20];
+		g_sprintf (pngfilename, "label%d.png", group);
+		cairo_surface_write_to_png (cs, pngfilename);
+#endif
+		pixbuf_data =
+		    g_new0 (guchar,
+			    4 * globals.real_width *
+			    globals.current_height);
+		convert_bgra_to_rgba (cairo_data, pixbuf_data,
+				      globals.current_width,
+				      globals.current_height,
+				      globals.real_width);
+
+		cairo_surface_destroy (cs);
+
+		image = gdk_pixbuf_new_from_data (pixbuf_data,
+						  GDK_COLORSPACE_RGB,
+						  TRUE,
+						  8,
+						  globals.real_width,
+						  globals.current_height,
+						  globals.real_width *
+						  4,
+						  (GdkPixbufDestroyNotify)
+						  g_free, NULL);
+		xkl_debug (150,
+			   "Image %d created -> %p[%dx%d], alpha: %d\n",
+			   group, image, gdk_pixbuf_get_width (image),
+			   gdk_pixbuf_get_height (image),
+			   gdk_pixbuf_get_has_alpha (image));
+
+		return image;
+	}
+	return NULL;
+}
+
+static void
+cafekbd_status_update_tooltips (CafekbdStatus * gki)
+{
+	XklState *state = xkl_engine_get_current_state (globals.engine);
+	gchar *buf;
+	if (state == NULL || state->group < 0
+	    || state->group >= g_strv_length (globals.full_group_names))
+		return;
+
+	buf = g_strdup_printf (globals.tooltips_format,
+			       globals.full_group_names[state->group]);
+
+	cafekbd_status_set_tooltips (gki, buf);
+	g_free (buf);
+}
+
+void
+cafekbd_status_reinit_ui (CafekbdStatus * gki)
+{
+	cafekbd_status_global_cleanup (gki);
+	cafekbd_status_global_fill (gki);
+
+	cafekbd_status_set_current_page (gki);
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+			    gchar     *key G_GNUC_UNUSED,
+			    gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "General configuration changed in settings - reiniting...\n");
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+	ForAllIndicators () {
+		cafekbd_status_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_ind_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+				gchar     *key G_GNUC_UNUSED,
+				gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "Applet configuration changed in settings - reiniting...\n");
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+
+	cafekbd_indicator_config_free_image_filenames (&globals.ind_cfg);
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	ForAllIndicators () {
+		cafekbd_status_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+static void
+cafekbd_status_load_group_names (const gchar ** layout_ids,
+			      const gchar ** variant_ids)
+{
+	if (!cafekbd_desktop_config_load_group_descriptions
+	    (&globals.cfg, globals.registry, layout_ids, variant_ids,
+	     &globals.short_group_names, &globals.full_group_names)) {
+		/* We just populate no short names (remain NULL) -
+		 * full names are going to be used anyway */
+		gint i, total_groups =
+		    xkl_engine_get_num_groups (globals.engine);
+		xkl_debug (150, "group descriptions loaded: %d!\n",
+			   total_groups);
+		globals.full_group_names =
+		    g_new0 (char *, total_groups + 1);
+
+		if (xkl_engine_get_features (globals.engine) &
+		    XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
+			gchar **lst = globals.kbd_cfg.layouts_variants;
+			for (i = 0; *lst; lst++, i++) {
+				globals.full_group_names[i] =
+				    g_strdup ((char *) *lst);
+			}
+		} else {
+			for (i = total_groups; --i >= 0;) {
+				globals.full_group_names[i] =
+				    g_strdup_printf ("Group %d", i);
+			}
+		}
+	}
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_kbd_cfg_callback (CafekbdStatus *gki G_GNUC_UNUSED)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+	xkl_debug (100,
+		   "XKB configuration changed on X Server - reiniting...\n");
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+
+	cafekbd_indicator_config_free_image_filenames (&globals.ind_cfg);
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	g_strfreev (globals.full_group_names);
+	globals.full_group_names = NULL;
+
+	if (globals.short_group_names != NULL) {
+		g_strfreev (globals.short_group_names);
+		globals.short_group_names = NULL;
+	}
+
+	cafekbd_status_load_group_names ((const gchar **) xklrec->layouts,
+				      (const gchar **) xklrec->variants);
+
+	ForAllIndicators () {
+		cafekbd_status_reinit_ui (gki);
+	} NextIndicator ();
+	g_object_unref (G_OBJECT (xklrec));
+}
+
+/* Should be called once for all applets */
+static void
+cafekbd_status_state_callback (XklEngine           *engine G_GNUC_UNUSED,
+			       XklEngineStateChange changeType,
+			       gint                 group,
+			       gboolean             restore)
+{
+	xkl_debug (150, "group is now %d, restore: %d\n", group, restore);
+
+	if (changeType == GROUP_CHANGED) {
+		ForAllIndicators () {
+			xkl_debug (200, "do repaint\n");
+			cafekbd_status_set_current_page_for_group (gki,
+								group);
+		}
+		NextIndicator ();
+	}
+}
+
+
+void
+cafekbd_status_set_current_page (CafekbdStatus * gki)
+{
+	XklState *cur_state;
+	cur_state = xkl_engine_get_current_state (globals.engine);
+	if (cur_state->group >= 0)
+		cafekbd_status_set_current_page_for_group (gki,
+							cur_state->group);
+}
+
+void
+cafekbd_status_set_current_page_for_group (CafekbdStatus * gki, int group)
+{
+	xkl_debug (200, "Revalidating for group %d\n", group);
+
+	ctk_status_icon_set_from_pixbuf (CTK_STATUS_ICON (gki),
+					 GDK_PIXBUF (g_slist_nth_data
+						     (globals.icons,
+						      group)));
+
+	cafekbd_status_update_tooltips (gki);
+}
+
+/* Should be called once for all widgets */
+static CdkFilterReturn
+cafekbd_status_filter_x_evt (CdkXEvent *xev,
+			     CdkEvent  *event G_GNUC_UNUSED)
+{
+	XEvent *xevent = (XEvent *) xev;
+
+	xkl_engine_filter_events (globals.engine, xevent);
+	switch (xevent->type) {
+	case ReparentNotify:
+		{
+			XReparentEvent *rne = (XReparentEvent *) xev;
+
+			ForAllIndicators () {
+				guint32 xid =
+				    ctk_status_icon_get_x11_window_id
+				    (CTK_STATUS_ICON (gki));
+
+				/* compare the indicator's parent window with the even window */
+				if (xid == rne->window) {
+					/* if so - make it transparent... */
+					xkl_engine_set_window_transparent
+					    (globals.engine, rne->window,
+					     TRUE);
+				}
+			}
+		NextIndicator ()}
+		break;
+	}
+	return CDK_FILTER_CONTINUE;
+}
+
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_start_listen (void)
+{
+	cdk_window_add_filter (NULL, (CdkFilterFunc)
+			       cafekbd_status_filter_x_evt, NULL);
+	cdk_window_add_filter (cdk_get_default_root_window (),
+			       (CdkFilterFunc) cafekbd_status_filter_x_evt,
+			       NULL);
+
+	xkl_engine_start_listen (globals.engine,
+				 XKLL_TRACK_KEYBOARD_STATE);
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_stop_listen (void)
+{
+	xkl_engine_stop_listen (globals.engine, XKLL_TRACK_KEYBOARD_STATE);
+
+	cdk_window_remove_filter (NULL, (CdkFilterFunc)
+				  cafekbd_status_filter_x_evt, NULL);
+	cdk_window_remove_filter
+	    (cdk_get_default_root_window (),
+	     (CdkFilterFunc) cafekbd_status_filter_x_evt, NULL);
+}
+
+static void
+cafekbd_status_size_changed (CafekbdStatus * gki, gint size)
+{
+	if (globals.current_height != size) {
+		globals.current_height = size;
+		globals.current_width = size * 3 / 2;
+		cafekbd_status_reinit_ui (gki);
+	}
+}
+
+static void
+cafekbd_status_theme_changed (CtkSettings   *settings G_GNUC_UNUSED,
+			      GParamSpec    *pspec G_GNUC_UNUSED,
+			      CafekbdStatus *gki)
+{
+	cafekbd_indicator_config_refresh_style (&globals.ind_cfg);
+	cafekbd_status_reinit_ui (gki);
+}
+
+static void
+cafekbd_status_init (CafekbdStatus * gki)
+{
+	int i;
+
+	if (!g_slist_length (globals.widget_instances))
+		cafekbd_status_global_init ();
+
+	gki->priv = g_new0 (CafekbdStatusPrivate, 1);
+
+	/* This should give NA a hint about the order */
+	/* commenting out fixes a Cdk-critical warning */
+/*	ctk_status_icon_set_name (CTK_STATUS_ICON (gki), "keyboard"); */
+
+	xkl_debug (100, "Initiating the widget startup process for %p\n",
+		   gki);
+
+	if (globals.engine == NULL) {
+		cafekbd_status_set_tooltips (gki,
+					  _("XKB initialization error"));
+		return;
+	}
+
+	cafekbd_status_set_tooltips (gki, NULL);
+
+	cafekbd_status_global_fill (gki);
+	cafekbd_status_set_current_page (gki);
+
+	/* append AFTER all initialization work is finished */
+	globals.widget_instances =
+	    g_slist_append (globals.widget_instances, gki);
+
+	g_signal_connect (gki, "size-changed",
+			  G_CALLBACK (cafekbd_status_size_changed), NULL);
+	g_signal_connect (gki, "activate",
+			  G_CALLBACK (cafekbd_status_activate), NULL);
+
+	for (i = sizeof (settings_signal_names) /
+	     sizeof (settings_signal_names[0]); --i >= 0;)
+		gki->priv->settings_signal_handlers[i] =
+		    g_signal_connect_after (ctk_settings_get_default (),
+					    settings_signal_names[i],
+					    G_CALLBACK
+					    (cafekbd_status_theme_changed),
+					    gki);
+}
+
+static void
+cafekbd_status_finalize (GObject * obj)
+{
+	int i;
+	CafekbdStatus *gki = CAFEKBD_STATUS (obj);
+	xkl_debug (100,
+		   "Starting the cafe-kbd-status widget shutdown process for %p\n",
+		   gki);
+
+	for (i = sizeof (settings_signal_names) /
+	     sizeof (settings_signal_names[0]); --i >= 0;)
+		g_signal_handler_disconnect (ctk_settings_get_default (),
+					     gki->
+					     priv->settings_signal_handlers
+					     [i]);
+
+	/* remove BEFORE all termination work is finished */
+	globals.widget_instances =
+	    g_slist_remove (globals.widget_instances, gki);
+
+	cafekbd_status_global_cleanup (gki);
+
+	xkl_debug (100,
+		   "The instance of cafe-kbd-status successfully finalized\n");
+
+	g_free (gki->priv);
+
+	G_OBJECT_CLASS (cafekbd_status_parent_class)->finalize (obj);
+
+	if (!g_slist_length (globals.widget_instances))
+		cafekbd_status_global_term ();
+}
+
+static void
+cafekbd_status_global_term (void)
+{
+	xkl_debug (100, "*** Last  CafekbdStatus instance *** \n");
+	cafekbd_status_stop_listen ();
+
+	cafekbd_desktop_config_stop_listen (&globals.cfg);
+	cafekbd_indicator_config_stop_listen (&globals.ind_cfg);
+
+	cafekbd_indicator_config_term (&globals.ind_cfg);
+	cafekbd_keyboard_config_term (&globals.kbd_cfg);
+	cafekbd_desktop_config_term (&globals.cfg);
+
+	if (g_signal_handler_is_connected
+	    (globals.engine, globals.state_changed_handler)) {
+		g_signal_handler_disconnect (globals.engine,
+					     globals.state_changed_handler);
+		globals.state_changed_handler = 0;
+	}
+	if (g_signal_handler_is_connected
+	    (globals.engine, globals.config_changed_handler)) {
+		g_signal_handler_disconnect (globals.engine,
+					     globals.config_changed_handler);
+		globals.config_changed_handler = 0;
+	}
+
+	g_object_unref (G_OBJECT (globals.registry));
+	globals.registry = NULL;
+	g_object_unref (G_OBJECT (globals.engine));
+	globals.engine = NULL;
+	xkl_debug (100, "*** Terminated globals *** \n");
+}
+
+static void
+cafekbd_status_class_init (CafekbdStatusClass * klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+	xkl_debug (100, "*** First CafekbdStatus instance *** \n");
+
+	memset (&globals, 0, sizeof (globals));
+
+	/* Initing some global vars */
+	globals.tooltips_format = "%s";
+
+	/* Initing vtable */
+	object_class->finalize = cafekbd_status_finalize;
+
+	/* Signals */
+}
+
+static void
+cafekbd_status_global_init (void)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+
+	globals.engine = xkl_engine_get_instance(CDK_DISPLAY_XDISPLAY(cdk_display_get_default()));
+
+	if (globals.engine == NULL) {
+		xkl_debug (0, "Libxklavier initialization error");
+		return;
+	}
+
+	globals.state_changed_handler =
+	    g_signal_connect (globals.engine, "X-state-changed",
+			      G_CALLBACK (cafekbd_status_state_callback),
+			      NULL);
+	globals.config_changed_handler =
+	    g_signal_connect (globals.engine, "X-config-changed",
+			      G_CALLBACK (cafekbd_status_kbd_cfg_callback),
+			      NULL);
+
+	cafekbd_desktop_config_init (&globals.cfg, globals.engine);
+	cafekbd_keyboard_config_init (&globals.kbd_cfg, globals.engine);
+	cafekbd_indicator_config_init (&globals.ind_cfg, globals.engine);
+
+	cafekbd_desktop_config_start_listen (&globals.cfg,
+					  (GCallback)
+					  cafekbd_status_cfg_changed, NULL);
+	cafekbd_indicator_config_start_listen (&globals.ind_cfg,
+					    (GCallback)
+					    cafekbd_status_ind_cfg_changed,
+					    NULL);
+
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+
+	globals.registry =
+	    xkl_config_registry_get_instance (globals.engine);
+	xkl_config_registry_load (globals.registry,
+				  globals.cfg.load_extra_items);
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	cafekbd_status_load_group_names ((const gchar **) xklrec->layouts,
+				      (const gchar **) xklrec->variants);
+	g_object_unref (G_OBJECT (xklrec));
+
+	cafekbd_status_start_listen ();
+
+	xkl_debug (100, "*** Inited globals *** \n");
+}
+
+CtkStatusIcon *
+cafekbd_status_new (void)
+{
+	return
+	    CTK_STATUS_ICON (g_object_new (cafekbd_status_get_type (), NULL));
+}
+
+/**
+ * cafekbd_status_get_xkl_engine:
+ *
+ * Returns: (transfer none): The engine shared by all CafekbdStatus objects
+ */
+XklEngine *
+cafekbd_status_get_xkl_engine ()
+{
+	return globals.engine;
+}
+
+/**
+ * cafekbd_status_get_group_names:
+ *
+ * Returns: (transfer none) (array zero-terminated=1): List of group names
+ */
+gchar **
+cafekbd_status_get_group_names ()
+{
+	return globals.full_group_names;
+}
+
+gchar *
+cafekbd_status_get_image_filename (guint group)
+{
+	if (!globals.ind_cfg.show_flags)
+		return NULL;
+	return cafekbd_indicator_config_get_images_file (&globals.ind_cfg,
+						      &globals.kbd_cfg,
+						      group);
+}
+
+void
+cafekbd_status_set_angle (CafekbdStatus * gki, gdouble angle)
+{
+	gki->priv->angle = angle;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/6.html b/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/6.html new file mode 100644 index 0000000..5ed6ace --- /dev/null +++ b/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/6.html @@ -0,0 +1,806 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctk/ctk.h>
+#include <stdlib.h>
+#include <string.h>
+#include <glib.h>
+#include "libcafekbd/cafekbd-keyboard-drawing.h"
+
+
+static gchar *groups = NULL;
+static gchar *levels = NULL;
+static gchar *symbols = NULL;
+static gchar *keycodes = NULL;
+static gchar *geometry = NULL;
+
+static gboolean track_config = FALSE;
+static gboolean track_modifiers = FALSE;
+static gboolean program_version = FALSE;
+
+static const GOptionEntry options[] = {
+	{"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
+	 "Keyboard groups to display, from 1-4. Up to four groups only may be "
+	 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
+	 "group1[,group2[,group3[,group4]]]"},
+	{"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
+	 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
+	 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
+	 "level1[,level2[,level3[,level4]]]"},
+	{"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
+	 "Symbols component of the keyboard. If you omit this option, it is "
+	 "obtained from the X server; that is, the keyboard that is currently "
+	 "configured is drawn. Examples: --symbols=us or "
+	 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL},
+	{"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
+	 "Keycodes component of the keyboard. If you omit this option, it is "
+	 "obtained from the X server; that is, the keyboard that is currently"
+	 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
+	 NULL},
+	{"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
+	 "Geometry xkb component. If you omit this option, it is obtained from the"
+	 " X server; that is, the keyboard that is currently configured is drawn. "
+	 "Example: --geometry=kinesis", NULL},
+	{"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
+	 "Track the current modifiers", NULL},
+	{"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
+	 "Track the server XKB configuration", NULL},
+	{"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
+	 "Show current version", NULL},
+	{NULL},
+};
+
+static gboolean
+set_groups (gchar * groups_option,
+	    CafekbdKeyboardDrawingGroupLevel * groupLevels)
+{
+	CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
+	gint cntr, g;
+
+	groupLevels[0].group =
+	    groupLevels[1].group =
+	    groupLevels[2].group = groupLevels[3].group = -1;
+
+	if (groups_option == NULL)
+		return TRUE;
+
+	for (cntr = 4; --cntr >= 0;) {
+		if (*groups_option == '\0')
+			return FALSE;
+
+		g = *groups_option - '1';
+		if (g < 0 || g >= 4)
+			return FALSE;
+
+		pgl->group = g;
+		/* printf ("group %d\n", pgl->group); */
+
+		groups_option++;
+		if (*groups_option == '\0')
+			return TRUE;
+		if (*groups_option != ',')
+			return FALSE;
+
+		groups_option++;
+		pgl++;
+	}
+
+	return TRUE;
+}
+
+static gboolean
+set_levels (gchar * levels_option,
+	    CafekbdKeyboardDrawingGroupLevel * groupLevels)
+{
+	CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
+	gint cntr, l;
+	gchar *p;
+
+	groupLevels[0].level =
+	    groupLevels[1].level =
+	    groupLevels[2].level = groupLevels[3].level = -1;
+
+	if (levels_option == NULL)
+		return TRUE;
+
+	for (cntr = 4; --cntr >= 0;) {
+		if (*levels_option == '\0')
+			return FALSE;
+
+		l = (gint) strtol (levels_option, &p, 10) - 1;
+		if (l < 0 || l >= 64)
+			return FALSE;
+
+		pgl->level = l;
+		/* printf ("level %d\n", pgl->level); */
+
+		levels_option = p;
+		if (*levels_option == '\0')
+			return TRUE;
+		if (*levels_option != ',')
+			return FALSE;
+
+		levels_option++;
+		pgl++;
+	}
+
+	return TRUE;
+}
+
+static void
+bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED,
+	     guint                   keycode)
+{
+	g_warning
+	    ("got keycode %u, which is not on your keyboard according to your configuration",
+	     keycode);
+}
+
+gint
+main (gint argc, gchar ** argv)
+{
+	CtkWidget *window;
+	CtkWidget *cafekbd_keyboard_drawing;
+	CdkScreen *screen;
+	CdkMonitor *monitor;
+	CdkRectangle rect;
+	GOptionContext *context;
+	GError *error = NULL;
+
+	CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
+	    { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
+	CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
+	    { &groupLevels[0], &groupLevels[1], &groupLevels[2],
+		&groupLevels[3]
+	};
+
+	context = g_option_context_new ("kbdraw");
+	g_option_context_add_main_entries (context, options, NULL);
+	if (!g_option_context_parse (context, &argc, &argv, &error)) {
+		g_message ("option parsing failed: %s", error->message);
+		g_option_context_free (context);
+		exit (EXIT_FAILURE);
+	}
+	g_option_context_free (context);
+
+	if (program_version) {
+		g_print ("kbdraw %s\n", VERSION);
+		exit (0);
+	}
+
+	ctk_init (&argc, &argv);
+
+	if (!set_groups (groups, groupLevels)) {
+		g_printerr ("--groups: invalid argument\n");
+		exit (1);
+	}
+
+	if (!set_levels (levels, groupLevels)) {
+		g_printerr ("--levels: invalid argument\n");
+		exit (1);
+	}
+
+	window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
+	g_signal_connect (G_OBJECT (window), "destroy",
+			  G_CALLBACK (ctk_main_quit), NULL);
+
+	screen = ctk_window_get_screen (CTK_WINDOW (window));
+	monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
+	cdk_monitor_get_geometry (monitor, &rect);
+	ctk_window_set_default_size (CTK_WINDOW (window),
+				     rect.width * 4 / 5,
+				     rect.height * 1 / 2);
+
+	ctk_widget_show (window);
+
+	cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
+	ctk_widget_show (cafekbd_keyboard_drawing);
+	ctk_container_add (CTK_CONTAINER (window), cafekbd_keyboard_drawing);
+
+	cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING
+						 (cafekbd_keyboard_drawing),
+						 pgroupLevels);
+
+	if (track_modifiers)
+		cafekbd_keyboard_drawing_set_track_modifiers
+		    (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing), TRUE);
+	if (track_config)
+		cafekbd_keyboard_drawing_set_track_config
+		    (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing), TRUE);
+	g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",
+			  G_CALLBACK (bad_keycode), NULL);
+
+	if (symbols || geometry || keycodes) {
+		XkbComponentNamesRec names;
+		gint success;
+
+		memset (&names, '\0', sizeof (names));
+
+		if (symbols)
+			names.symbols = symbols;
+		else
+			names.symbols = (gchar *)
+			    cafekbd_keyboard_drawing_get_symbols
+			    (CAFEKBD_KEYBOARD_DRAWING
+			     (cafekbd_keyboard_drawing));
+
+		if (keycodes)
+			names.keycodes = keycodes;
+		else
+			names.keycodes = (gchar *)
+			    cafekbd_keyboard_drawing_get_keycodes
+			    (CAFEKBD_KEYBOARD_DRAWING
+			     (cafekbd_keyboard_drawing));
+
+		if (geometry)
+			names.geometry = geometry;
+		else
+			names.geometry = (gchar *)
+			    cafekbd_keyboard_drawing_get_geometry
+			    (CAFEKBD_KEYBOARD_DRAWING
+			     (cafekbd_keyboard_drawing));
+
+		success =
+		    cafekbd_keyboard_drawing_set_keyboard
+		    (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing),
+		     &names);
+		if (!success) {
+			g_printerr
+			    ("\nError loading new keyboard description with components:\n\n"
+			     "  keycodes:  %s\n" "  types:     %s\n"
+			     "  compat:    %s\n" "  symbols:   %s\n"
+			     "  geometry:  %s\n\n", names.keycodes,
+			     names.types, names.compat, names.symbols,
+			     names.geometry);
+			exit (1);
+		}
+	}
+
+	ctk_widget_grab_focus (cafekbd_keyboard_drawing);
+
+	ctk_main ();
+
+	return 0;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/7.html b/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/7.html new file mode 100644 index 0000000..8122587 --- /dev/null +++ b/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/7.html @@ -0,0 +1,358 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+
+#include "libxklavier/xklavier.h"
+#include "libcafekbd/cafekbd-status.h"
+
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include <cdk/cdk.h>
+#include <cdk/cdkx.h>
+#include <glib/gi18n.h>
+#include <ctk/ctk.h>
+
+#include "X11/XKBlib.h"
+
+int
+main (int argc, char **argv)
+{
+	CtkStatusIcon *icon;<--- Variable 'icon' can be declared as pointer to const
+
+	bindtextdomain (GETTEXT_PACKAGE, CAFELOCALEDIR);
+	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+	textdomain (GETTEXT_PACKAGE);
+
+	ctk_init (&argc, &argv);
+
+	icon = cafekbd_status_new ();
+
+        if (icon == NULL)
+	{
+		return 1;
+	}
+
+	ctk_main ();
+
+	return 0;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/commitmsg b/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/commitmsg new file mode 100644 index 0000000..1dddd53 --- /dev/null +++ b/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/commitmsg @@ -0,0 +1 @@ +po: update translations for 2.0.0 diff --git a/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/index.html b/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/index.html new file mode 100644 index 0000000..1040930 --- /dev/null +++ b/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/index.html @@ -0,0 +1,242 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LineIdCWESeverityMessage
checkersReportinformationActive checkers: There was critical errors (use --checkers-report=<filename> to see details)
libcafekbd/cafekbd-desktop-config.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
libcafekbd/cafekbd-indicator-config.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
libcafekbd/cafekbd-indicator.c
66unknownMacroerrorThere is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
libcafekbd/cafekbd-keyboard-config.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
67knownConditionTrueFalse571styleCondition '*l1' is always true
67knownConditionTrueFalse571styleCondition '*l2' is always true
226constVariablePointer398styleVariable 'delim' can be declared as pointer to const
227knownConditionTrueFalse571styleCondition 'option!=NULL' is always true
282knownConditionTrueFalse570styleCondition 'variant==NULL' is always false
609constParameterPointer398styleParameter 'kbd_config' can be declared as pointer to const
libcafekbd/cafekbd-keyboard-drawing.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
61constParameterPointer398styleParameter 'context' can be declared as pointer to const
67constParameterPointer398styleParameter 'context' can be declared as pointer to const
625constParameterPointer398styleParameter 'context' can be declared as pointer to const
1026constVariablePointer398styleVariable 'runp' can be declared as pointer to const
1036constVariablePointer398styleVariable 'geometry' can be declared as pointer to const
1202constParameterPointer398styleParameter 'outline' can be declared as pointer to const
1397constVariablePointer398styleVariable 'shape' can be declared as pointer to const
1786constParameterCallback398styleParameter 'drawing' can be declared as pointer to const. However it seems that 'button_press_event' is a callback function, if 'drawing' is declared with const you might also need to cast function pointer(s).
1823constParameterCallback398styleParameter 'event' can be declared as pointer to const. However it seems that 'focus_event' is a callback function, if 'event' is declared with const you might also need to cast function pointer(s).
1838constParameterCallback398styleParameter 'a' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'a' is declared with const you might also need to cast function pointer(s).
1839constParameterCallback398styleParameter 'b' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'b' is declared with const you might also need to cast function pointer(s).
1863constVariablePointer398styleVariable 'pind' can be declared as pointer to const
2124constParameterPointer398styleParameter 'iev' can be declared as pointer to const
libcafekbd/cafekbd-status.c
82unknownMacroerrorThere is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
test/cafekbd-keyboard-drawing-test.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
test/cafekbd-status-test.c
42constVariablePointer398styleVariable 'icon' can be declared as pointer to const
+
+ +
+ + diff --git a/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/output_76170f64aaf12527a5400b10171e2b01d43a5d7b b/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/output_76170f64aaf12527a5400b10171e2b01d43a5d7b new file mode 100644 index 0000000..93e81bd --- /dev/null +++ b/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/output_76170f64aaf12527a5400b10171e2b01d43a5d7b @@ -0,0 +1,1866 @@ +Checking libcafekbd/cafekbd-desktop-config.c ... +libcafekbd/cafekbd-desktop-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +1/10 files checked 4% done +Checking libcafekbd/cafekbd-indicator-config.c ... +libcafekbd/cafekbd-indicator-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +2/10 files checked 10% done +Checking libcafekbd/cafekbd-indicator.c ... +libcafekbd/cafekbd-indicator.c:66:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdIndicator, cafekbd_indicator, CTK_TYPE_NOTEBOOK) +^ +3/10 files checked 24% done +Checking libcafekbd/cafekbd-keyboard-config.c ... +libcafekbd/cafekbd-keyboard-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-config.c:67:8: style: Condition '*l1' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:67:15: style: Condition '*l2' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:227:16: style: Condition 'option!=NULL' is always true [knownConditionTrueFalse] + (option != NULL) ? strchr (option, ':') : NULL; + ^ +libcafekbd/cafekbd-keyboard-config.c:282:18: style: Condition 'variant==NULL' is always false [knownConditionTrueFalse] + (variant == + ^ +libcafekbd/cafekbd-keyboard-config.c:226:10: style: Variable 'delim' can be declared as pointer to const [constVariablePointer] + char *delim = + ^ +libcafekbd/cafekbd-keyboard-config.c:609:65: style: Parameter 'kbd_config' can be declared as pointer to const [constParameterPointer] +cafekbd_keyboard_config_options_is_set (CafekbdKeyboardConfig * kbd_config, + ^ +4/10 files checked 36% done +Checking libcafekbd/cafekbd-keyboard-drawing.c ... +libcafekbd/cafekbd-keyboard-drawing.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-drawing.c:61:60: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_coord (CafekbdKeyboardDrawingRenderContext * context, gint n) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:67:61: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_double (CafekbdKeyboardDrawingRenderContext * context, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:625:51: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +set_markup (CafekbdKeyboardDrawingRenderContext * context, gchar *txt) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1026:11: style: Variable 'runp' can be declared as pointer to const [constVariablePointer] + GSList *runp; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1036:25: style: Variable 'geometry' can be declared as pointer to const [constVariablePointer] + PangoGlyphGeometry *geometry; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1202:39: style: Parameter 'outline' can be declared as pointer to const [constParameterPointer] +calc_origin_offset_x (XkbOutlineRec * outline) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1397:15: style: Variable 'shape' can be declared as pointer to const [constVariablePointer] + XkbShapeRec *shape; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: style: Parameter 'drawing' can be declared as pointer to const. However it seems that 'button_press_event' is a callback function, if 'drawing' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2343:18: note: You might need to cast the function pointer here + G_CALLBACK (button_press_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: note: Parameter 'drawing' can be declared as pointer to const + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: style: Parameter 'event' can be declared as pointer to const. However it seems that 'focus_event' is a callback function, if 'event' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2347:18: note: You might need to cast the function pointer here + G_CALLBACK (focus_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: note: Parameter 'event' can be declared as pointer to const + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: style: Parameter 'a' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'a' is declared with const you might also need to cast function pointer(s). [constParameterCallback] +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: note: Parameter 'a' can be declared as pointer to const +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: style: Parameter 'b' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'b' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: note: Parameter 'b' can be declared as pointer to const + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1863:9: style: Variable 'pind' can be declared as pointer to const [constVariablePointer] + Atom *pind = drawing->xkb->names->indicators; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2124:60: style: Parameter 'iev' can be declared as pointer to const [constParameterPointer] +process_indicators_state_notify (XkbIndicatorNotifyEvent * iev, + ^ +Checking libcafekbd/cafekbd-keyboard-drawing.c: KBDRAW_DEBUG... +5/10 files checked 77% done +Checking libcafekbd/cafekbd-status.c ... +libcafekbd/cafekbd-status.c:82:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdStatus, cafekbd_status, CTK_TYPE_STATUS_ICON) +^ +6/10 files checked 91% done +Checking libcafekbd/cafekbd-util.c ... +7/10 files checked 93% done +Checking test/cafekbd-indicator-test.c ... +8/10 files checked 94% done +Checking test/cafekbd-keyboard-drawing-test.c ... +test/cafekbd-keyboard-drawing-test.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +Checking test/cafekbd-keyboard-drawing-test.c: HAVE_CONFIG_H... +9/10 files checked 99% done +Checking test/cafekbd-status-test.c ... +test/cafekbd-status-test.c:42:17: style: Variable 'icon' can be declared as pointer to const [constVariablePointer] + CtkStatusIcon *icon; + ^ +10/10 files checked 100% done +nofile:0:0: information: Active checkers: There was critical errors (use --checkers-report= to see details) [checkersReport] + +/usr/bin/cafe-autogen +checking for autoreconf >= 2.53... + testing autoreconf... found 2.72 +checking for pkg-config >= 0.14.0... + testing pkg-config... found 1.8.1 +checking for cafe-common >= 0.0.1... + testing cafe-doc-common... found 2.0.0 +Checking for required M4 macros... +Checking for forbidden M4 macros... +Processing ./configure.ac +Running cafe-doc-common... +Running autoreconf... +autoreconf: export WARNINGS=no-portability +autoreconf: Entering directory '.' +autoreconf: running: autopoint --force +Copying file ABOUT-NLS +Copying file config.rpath +Copying file m4/codeset.m4 +Copying file m4/extern-inline.m4 +Copying file m4/fcntl-o.m4 +Copying file m4/gettext.m4 +Copying file m4/glibc2.m4 +Copying file m4/glibc21.m4 +Copying file m4/iconv.m4 +Copying file m4/intdiv0.m4 +Copying file m4/intl.m4 +Copying file m4/intldir.m4 +Copying file m4/intlmacosx.m4 +Copying file m4/intmax.m4 +Copying file m4/inttypes-pri.m4 +Copying file m4/inttypes_h.m4 +Copying file m4/lcmessage.m4 +Copying file m4/lib-ld.m4 +Copying file m4/lib-link.m4 +Copying file m4/lib-prefix.m4 +Copying file m4/lock.m4 +Copying file m4/longlong.m4 +Copying file m4/nls.m4 +Copying file m4/po.m4 +Copying file m4/printf-posix.m4 +Copying file m4/progtest.m4 +Copying file m4/size_max.m4 +Copying file m4/stdint_h.m4 +Copying file m4/threadlib.m4 +Copying file m4/uintmax_t.m4 +Copying file m4/visibility.m4 +Copying file m4/wchar_t.m4 +Copying file m4/wint_t.m4 +Copying file m4/xsize.m4 +Copying file po/Makefile.in.in +Copying file po/Makevars.template +Copying file po/Rules-quot +Copying file po/boldquot.sed +Copying file po/en@boldquot.header +Copying file po/en@quot.header +Copying file po/insert-header.sin +Copying file po/quot.sed +Copying file po/remove-potcdate.sin +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: configure.ac: tracing +autoreconf: running: libtoolize --copy --force +libtoolize: putting auxiliary files in '.'. +libtoolize: copying file './ltmain.sh' +libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. +libtoolize: copying file 'm4/libtool.m4' +libtoolize: copying file 'm4/ltoptions.m4' +libtoolize: copying file 'm4/ltsugar.m4' +libtoolize: copying file 'm4/ltversion.m4' +libtoolize: copying file 'm4/lt~obsolete.m4' +autoreconf: configure.ac: not using Intltool +autoreconf: configure.ac: not using Gtkdoc +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: running: /usr/bin/autoconf --force +autoreconf: running: /usr/bin/autoheader --force +autoreconf: running: automake --add-missing --copy --force-missing +configure.ac:31: installing './compile' +configure.ac:34: installing './config.guess' +configure.ac:34: installing './config.sub' +configure.ac:16: installing './install-sh' +configure.ac:16: installing './missing' +Makefile.am: installing './INSTALL' +libcafekbd/Makefile.am: installing './depcomp' +autoreconf: Leaving directory '.' +Skipping configure process. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +checking for a BSD-compatible install... /usr/bin/install -c +checking whether sleep supports fractional seconds... yes +checking filesystem timestamp resolution... 0.01 +checking whether build environment is sane... yes +checking for a race-free mkdir -p... /usr/bin/mkdir -p +checking for gawk... no +checking for mawk... mawk +checking whether make sets $(MAKE)... yes +checking whether make supports nested variables... yes +checking xargs -n works... yes +checking whether make supports the include directive... yes (GNU style) +checking for gcc... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the C compiler works... yes +checking for C compiler default output file name... a.out +checking for suffix of executables... +checking whether we are cross compiling... no +checking for suffix of object files... o +checking whether the compiler supports GNU C... yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... rm: cannot remove 'conftest.plist': Is a directory +yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... gcc3 +checking whether C compiler accepts -Werror=unknown-warning-option... no +checking whether C compiler accepts -Wall... yes +checking whether C compiler accepts -Wmissing-prototypes... yes +checking whether C compiler accepts -Wbad-function-cast... yes +checking whether C compiler accepts -Wcast-align... yes +checking whether C compiler accepts -Wextra... yes +checking whether C compiler accepts -Wformat-nonliteral... yes +checking whether C compiler accepts -Wmissing-declarations... yes +checking whether C compiler accepts -Wnested-externs... yes +checking whether C compiler accepts -Wpointer-arith... yes +checking whether C compiler accepts -Wredundant-decls... yes +checking whether C compiler accepts -Wshadow... yes +checking whether C compiler accepts -Wstrict-prototypes... yes +checking whether C compiler accepts -Wunused-macros... yes +checking whether C compiler accepts -Werror=format-security... yes +checking whether C compiler accepts -fstrict-aliasing... yes +checking flags to pass to the C compiler /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing +checking for gcc... (cached) /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the compiler supports GNU C... (cached) yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... (cached) yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... (cached) none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... (cached) yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... (cached) gcc3 +checking build system type... x86_64-pc-linux-gnu +checking host system type... x86_64-pc-linux-gnu +checking how to print strings... printf +checking for a sed that does not truncate output... /usr/bin/sed +checking for grep that handles long lines and -e... /usr/bin/grep +checking for egrep... /usr/bin/grep -E +checking for fgrep... /usr/bin/grep -F +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld +checking if the linker (/usr/bin/ld) is GNU ld... yes +checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B +checking the name lister (/usr/bin/nm -B) interface... rm: cannot remove 'conftest.plist': Is a directory +BSD nm +checking whether ln -s works... yes +checking the maximum length of command line arguments... 3145728 +checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop +checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop +checking for /usr/bin/ld option to reload object files... -r +checking for file... file +checking for objdump... objdump +checking how to recognize dependent libraries... pass_all +checking for dlltool... no +checking how to associate runtime and link libraries... printf %s\n +checking for ranlib... ranlib +checking for ar... ar +checking for archiver @FILE support... rm: cannot remove 'conftest.plist': Is a directory +@ +checking for strip... strip +checking command to parse /usr/bin/nm -B output from /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer object... rm: cannot remove 'conftest.plist': Is a directory +ok +checking for sysroot... no +checking for a working dd... /usr/bin/dd +checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1 +checking for mt... no +checking if : is a manifest tool... no +checking for stdio.h... yes +checking for stdlib.h... yes +checking for string.h... yes +checking for inttypes.h... yes +checking for stdint.h... yes +checking for strings.h... yes +checking for sys/stat.h... yes +checking for sys/types.h... yes +checking for unistd.h... yes +checking for dlfcn.h... yes +checking for objdir... .libs +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -fno-rtti -fno-exceptions... no +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to produce PIC... -fPIC -DPIC +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer PIC flag -fPIC -DPIC works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer static flag -static works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... (cached) yes +checking whether the /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes +checking whether -lc should be explicitly linked in... no +checking dynamic linker characteristics... GNU/Linux ld.so +checking how to hardcode library paths into programs... immediate +checking whether stripping libraries is possible... yes +checking if libtool supports shared libraries... yes +checking whether to build shared libraries... yes +checking whether to build static libraries... yes +checking whether NLS is requested... yes +checking for msgfmt... /usr/bin/msgfmt +checking for gmsgfmt... /usr/bin/msgfmt +checking for xgettext... /usr/bin/xgettext +checking for msgmerge... /usr/bin/msgmerge +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld -m elf_x86_64 +checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes +checking for shared library run path origin... done +checking how to run the C preprocessor... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer -E +checking for egrep -e... (cached) /usr/bin/grep -E +checking for CFPreferencesCopyAppValue... no +checking for CFLocaleCopyCurrent... no +checking for GNU gettext in libc... yes +checking whether to use NLS... yes +checking where the gettext function comes from... libc +checking for glib-compile-resources... /usr/bin/glib-compile-resources +checking for xmllint... /usr/bin/xmllint +checking for setlocale... yes +checking for pkg-config... /usr/bin/pkg-config +checking pkg-config is at least version 0.9.0... yes +checking for glib-2.0 >= 2.50.0... yes +checking for gmodule-2.0... yes +checking for gio-2.0 >= 2.25.0... yes +checking for cdk-3.0 >= 3.22.0... yes +checking for ctk+-3.0 >= 3.22.0 cdk-x11-3.0 >= 3.22.0... yes +checking for libxklavier >= 5.2... yes +checking for X... libraries , headers +checking for gethostbyname... yes +checking for connect... yes +checking for remove... yes +checking for shmat... yes +checking for IceConnectionNumber in -lICE... yes +checking for pkg-config... (cached) /usr/bin/pkg-config +checking pkg-config is at least version 0.16... yes +checking for library containing sqrt... -lm +checking for gobject-introspection... yes +checking that generated files are newer than configure... done +configure: creating ./config.status +config.status: creating Makefile +config.status: creating libcafekbd.pc +config.status: creating libcafekbdui.pc +config.status: creating po/Makefile.in +config.status: creating libcafekbd/Makefile +config.status: creating libcafekbd/org.cafe.peripherals-keyboard-xkb.gschema.xml +config.status: creating test/Makefile +config.status: creating config.h +config.status: executing depfiles commands +config.status: executing libtool commands +config.status: executing po-directories commands +config.status: creating po/POTFILES +config.status: creating po/Makefile + +Configuration: + + prefix: /usr + exec_prefix: ${prefix} + libdir: ${exec_prefix}/lib + bindir: ${exec_prefix}/bin + sbindir: ${exec_prefix}/sbin + sysconfdir: ${prefix}/etc + datadir: ${datarootdir} + source code location: . + compiler: /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer + cflags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + Warning flags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + +scan-build: Analysis run complete. +scan-build: Removing directory '/tmp/scan-build-2025-02-06-152024-11857-1' because it contains no reports. +scan-build: No bugs found. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +make all-recursive +make[1]: Entering directory '/rootdir' +Making all in po +make[2]: Entering directory '/rootdir/po' +make libcafekbd.pot-update +make[3]: Entering directory '/rootdir/po' +sed -e '/^#/d' remove-potcdate.sin > t-remove-potcdate.sed +mv t-remove-potcdate.sed remove-potcdate.sed +package_gnu=""; \ +test -n "$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L .. -maxdepth 1 -type f \ + -size -10000000c -exec grep 'GNU libcafekbd' \ + /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU libcafekbd' ../* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ +}; \ +if test "$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ +else \ + package_prefix=''; \ +fi; \ +if test -n '' || test 'https://github.com/cafe-desktop/libcafekbd' = '@'PACKAGE_BUGREPORT'@'; then \ + msgid_bugs_address=''; \ +else \ + msgid_bugs_address='https://github.com/cafe-desktop/libcafekbd'; \ +fi; \ +case `/usr/bin/xgettext --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ + *) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --package-name="${package_prefix}libcafekbd" \ + --package-version='1.25.0' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ +esac +test ! -f libcafekbd.po || { \ + if test -f ./libcafekbd.pot-header; then \ + sed -e '1,/^#$/d' < libcafekbd.po > libcafekbd.1po && \ + cat ./libcafekbd.pot-header libcafekbd.1po > libcafekbd.po; \ + rm -f libcafekbd.1po; \ + fi; \ + if test -f ./libcafekbd.pot; then \ + sed -f remove-potcdate.sed < ./libcafekbd.pot > libcafekbd.1po && \ + sed -f remove-potcdate.sed < libcafekbd.po > libcafekbd.2po && \ + if cmp libcafekbd.1po libcafekbd.2po >/dev/null 2>&1; then \ + rm -f libcafekbd.1po libcafekbd.2po libcafekbd.po; \ + else \ + rm -f libcafekbd.1po libcafekbd.2po ./libcafekbd.pot && \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ + else \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ +} +make[3]: Leaving directory '/rootdir/po' +test ! -f ./libcafekbd.pot || \ + test -z "af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo" || make af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo +make[3]: Entering directory '/rootdir/po' +/usr/bin/msgmerge --update --quiet --lang=af af.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=am am.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ar ar.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=an an.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=as as.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=az az.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ast ast.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=be be.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bg bg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn bn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn_IN bn_IN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bs bs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca ca.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=br br.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca@valencia ca@valencia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cmn cmn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=crh crh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cs cs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=csb csb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cv cv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cy cy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de_CH de_CH.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=da da.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de de.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=dz dz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=el el.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_AU en_AU.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_CA en_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_GB en_GB.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eo eo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es es.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_419 es_419.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_AR es_AR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CL es_CL.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CO es_CO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CR es_CR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_DO es_DO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_EC es_EC.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_ES es_ES.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_MX es_MX.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_NI es_NI.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PA es_PA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PE es_PE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PR es_PR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_SV es_SV.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_US es_US.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_UY es_UY.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_VE es_VE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=et et.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eu eu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fi fi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fa fa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fil fil.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fo fo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr fr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=frp frp.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr_CA fr_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fur fur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fy fy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ga ga.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gd gd.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gl gl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gu gu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=he he.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ha ha.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hi hi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hr hr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hu hu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hy hy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ia ia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=id id.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ie ie.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ig ig.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=is is.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=it it.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=jv jv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ja ja.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ka ka.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kk kk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=km km.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kn kn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kab kab.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ko ko.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ks ks.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku ku.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku_IQ ku_IQ.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ky ky.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=la la.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lb lb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=li li.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lo lo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lt lt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lv lv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mi mi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mai mai.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mg mg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mk mk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ml ml.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mn mn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mr mr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=my my.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ms ms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nah nah.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nb nb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nds nds.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ne ne.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nl nl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nn nn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nqo nqo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nso nso.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=om om.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=oc oc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=or or.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pa pa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pms pms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ps ps.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pl pl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt pt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt_BR pt_BR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ru ru.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=rw rw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ro ro.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sc sc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sco sco.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=si si.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sk sk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sl sl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=so so.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sq sq.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr sr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr@latin sr@latin.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sw sw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ta ta.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sv sv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=te te.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tg tg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tl tl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=th th.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tk tk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tr tr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ts ts.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tt tt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ug ug.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uk uk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur ur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur_PK ur_PK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uz uz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=vi vi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=wa wa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=xh xh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yi yi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yo yo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_HK zh_HK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_CN zh_CN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_TW zh_TW.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zu zu.po libcafekbd.pot +rm -f af.gmo && /usr/bin/msgfmt -c --statistics --verbose -o af.gmo af.po +af.po: 7 translated messages, 84 untranslated messages. +rm -f am.gmo && /usr/bin/msgfmt -c --statistics --verbose -o am.gmo am.po +rm -f ar.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ar.gmo ar.po +rm -f an.gmo && /usr/bin/msgfmt -c --statistics --verbose -o an.gmo an.po +rm -f as.gmo && /usr/bin/msgfmt -c --statistics --verbose -o as.gmo as.po +rm -f ast.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ast.gmo ast.po +ar.po: 50 translated messages, 41 untranslated messages. +an.po:7: warning: header field 'Last-Translator' still has the initial default value +an.po: 0 translated messages, 91 untranslated messages. +am.po: 54 translated messages, 37 untranslated messages. +as.po: 41 translated messages, 50 untranslated messages. +rm -f be.gmo && /usr/bin/msgfmt -c --statistics --verbose -o be.gmo be.po +rm -f az.gmo && /usr/bin/msgfmt -c --statistics --verbose -o az.gmo az.po +ast.po: 47 translated messages, 44 untranslated messages. +rm -f bn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn.gmo bn.po +rm -f bg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bg.gmo bg.po +rm -f bn_IN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn_IN.gmo bn_IN.po +be.po: 46 translated messages, 45 untranslated messages. +az.po: 9 translated messages, 82 untranslated messages. +rm -f bs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bs.gmo bs.po +bn.po: 43 translated messages, 48 untranslated messages. +bn_IN.po: 41 translated messages, 50 untranslated messages. +bg.po: 54 translated messages, 37 untranslated messages. +rm -f br.gmo && /usr/bin/msgfmt -c --statistics --verbose -o br.gmo br.po +bs.po: 25 translated messages, 66 untranslated messages. +rm -f ca.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca.gmo ca.po +rm -f cmn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cmn.gmo cmn.po +rm -f ca@valencia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca@valencia.gmo ca@valencia.po +br.po: 20 translated messages, 71 untranslated messages. +rm -f crh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o crh.gmo crh.po +ca.po: 87 translated messages, 4 untranslated messages. +ca@valencia.po: 54 translated messages, 37 untranslated messages. +cmn.po: 46 translated messages, 45 untranslated messages. +rm -f cs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cs.gmo cs.po +rm -f csb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o csb.gmo csb.po +crh.po: 11 translated messages, 80 untranslated messages. +rm -f cv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cv.gmo cv.po +rm -f cy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cy.gmo cy.po +cs.po: 81 translated messages, 10 untranslated messages. +cv.po: 0 translated messages, 91 untranslated messages. +csb.po:7: warning: header field 'Last-Translator' still has the initial default value +csb.po: 0 translated messages, 91 untranslated messages. +cy.po: 26 translated messages, 65 untranslated messages. +rm -f da.gmo && /usr/bin/msgfmt -c --statistics --verbose -o da.gmo da.po +rm -f de.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de.gmo de.po +rm -f de_CH.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de_CH.gmo de_CH.po +rm -f el.gmo && /usr/bin/msgfmt -c --statistics --verbose -o el.gmo el.po +rm -f dz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o dz.gmo dz.po +de.po: 76 translated messages, 15 untranslated messages. +de_CH.po: 0 translated messages, 91 untranslated messages. +da.po: 91 translated messages. +el.po: 54 translated messages, 37 untranslated messages. +dz.po: 39 translated messages, 52 untranslated messages. +rm -f en_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_CA.gmo en_CA.po +rm -f en_AU.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_AU.gmo en_AU.po +rm -f en_GB.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_GB.gmo en_GB.po +rm -f eo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eo.gmo eo.po +rm -f es.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es.gmo es.po +en_CA.po: 10 translated messages, 81 untranslated messages. +en_GB.po: 54 translated messages, 37 untranslated messages. +eo.po: 52 translated messages, 39 untranslated messages. +en_AU.po: 54 translated messages, 37 untranslated messages. +es.po: 89 translated messages, 2 untranslated messages. +rm -f es_419.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_419.gmo es_419.po +rm -f es_AR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_AR.gmo es_AR.po +rm -f es_CL.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CL.gmo es_CL.po +rm -f es_CO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CO.gmo es_CO.po +rm -f es_CR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CR.gmo es_CR.po +es_AR.po: 21 translated messages, 70 untranslated messages. +es_419.po: 0 translated messages, 91 untranslated messages. +es_CL.po: 3 translated messages, 88 untranslated messages. +es_CO.po: 49 translated messages, 42 untranslated messageses_CR.po: 1 translated message, 90 untranslated messages. +. +rm -f es_DO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_DO.gmo es_DO.po +rm -f es_EC.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_EC.gmo es_EC.po +rm -f es_MX.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_MX.gmo es_MX.po +rm -f es_ES.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_ES.gmo es_ES.po +rm -f es_NI.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_NI.gmo es_NI.po +es_DO.po: 1 translated message, 90 untranslated messages. +es_EC.po: 1 translated message, 90 untranslated messages. +rm -f es_PA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PA.gmo es_PA.po +es_NI.po: 1 translated message, 90 untranslated messages. +es_MX.po: 1 translated message, 90 untranslated messages. +es_ES.po: 1 translated message, 90 untranslated messages. +rm -f es_PE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PE.gmo es_PE.po +rm -f es_PR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PR.gmo es_PR.po +rm -f es_SV.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_SV.gmo es_SV.po +es_PA.po: 1 translated message, 90 untranslated messages. +es_PE.po: 1 translated message, 90 untranslated messages. +rm -f es_US.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_US.gmo es_US.po +rm -f es_UY.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_UY.gmo es_UY.po +es_US.po: 0 translated messages, 91 untranslated messages. +es_PR.po: 1 translated message, 90 untranslated messages. +rm -f es_VE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_VE.gmo es_VE.po +es_SV.po: 1 translated message, 90 untranslated messages. +es_UY.po: 1 translated message, 90 untranslated messages. +rm -f eu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eu.gmo eu.po +rm -f et.gmo && /usr/bin/msgfmt -c --statistics --verbose -o et.gmo et.po +es_VE.po: 1 translated message, 90 untranslated messages. +rm -f fa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fa.gmo fa.po +rm -f fi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fi.gmo fi.po +eu.po: 54 translated messages, 37 untranslated messages. +et.po: 54 translated messages, 37 untranslated messages. +fa.po: 11 translated messages, 80 untranslated messages. +rm -f fil.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fil.gmo fil.po +fi.po: 48 translated messages, 43 untranslated messages. +rm -f fo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fo.gmo fo.po +rm -f fr_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr_CA.gmo fr_CA.po +rm -f fr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr.gmo fr.po +fil.po: 0 translated messages, 91 untranslated messages. +fr_CA.po: 3 translated messages, 88 untranslated messages. +fo.po: 0 translated messages, 91 untranslated messages. +fr.po: 67 translated messages, 24 untranslated messages. +rm -f fur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fur.gmo fur.po +rm -f frp.gmo && /usr/bin/msgfmt -c --statistics --verbose -o frp.gmo frp.po +rm -f fy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fy.gmo fy.po +rm -f ga.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ga.gmo ga.po +rm -f gd.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gd.gmo gd.po +fur.po: 4 translated messages, 87 untranslated messages. +frp.po: 7 translated messages, 84 untranslated messages. +gd.po: 0 translated messages, 91 untranslated messages. +rm -f gl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gl.gmo gl.po +fy.po: 4 translated messages, 87 untranslated messages. +ga.po: 41 translated messages, 50 untranslated messages. +rm -f ha.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ha.gmo ha.po +rm -f gu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gu.gmo gu.po +rm -f he.gmo && /usr/bin/msgfmt -c --statistics --verbose -o he.gmo he.po +gl.po: 89 translated messages, 2 untranslated messages. +rm -f hi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hi.gmo hi.po +ha.po: 5 translated messages, 86 untranslated messages. +gu.po: 43 translated messages, 48 untranslated messages. +he.po: 54 translated messages, 37 untranslated messages. +rm -f hr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hr.gmo hr.po +hi.po: 45 translated messages, 46 untranslated messages. +rm -f hu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hu.gmo hu.po +rm -f hy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hy.gmo hy.po +rm -f ia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ia.gmo ia.po +rm -f id.gmo && /usr/bin/msgfmt -c --statistics --verbose -o id.gmo id.po +hr.po: 54 translated messages, 37 untranslated messages. +hu.po: 54 translated messages, 37 untranslated messages. +hy.po: 54 translated messages, 37 untranslated messages. +rm -f ie.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ie.gmo ie.po +id.po: 91 translated messages. +ia.po: 3 translated messages, 88 untranslated messages. +rm -f ig.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ig.gmo ig.po +rm -f is.gmo && /usr/bin/msgfmt -c --statistics --verbose -o is.gmo is.po +rm -f it.gmo && /usr/bin/msgfmt -c --statistics --verbose -o it.gmo it.po +rm -f ja.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ja.gmo ja.po +ie.po: 45 translated messages, 46 untranslated messages. +ig.po: 5 translated messages, 86 untranslated messages. +is.po: 12 translated messages, 79 untranslated messages. +it.po: 91 translated messages. +rm -f jv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o jv.gmo jv.po +rm -f ka.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ka.gmo ka.po +ja.po: 54 translated messages, 37 untranslated messages. +rm -f kab.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kab.gmo kab.po +rm -f kk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kk.gmo kk.po +jv.po: 2 translated messages, 89 untranslated messages. +ka.po: 37 translated messages, 54 untranslated messages. +kk.po: 24 translated messages, 67 untranslated messages. +kab.po: 4 translated messages, 87 untranslated messages. +rm -f km.gmo && /usr/bin/msgfmt -c --statistics --verbose -o km.gmo km.po +rm -f kn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kn.gmo kn.po +rm -f ks.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ks.gmo ks.po +rm -f ko.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ko.gmo ko.po +km.po:7: warning: header field 'Last-Translator' still has the initial default value +km.po: 0 translated messages, 91 untranslated messages. +rm -f ku.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku.gmo ku.po +kn.po: 43 translated messages, 48 untranslated messages. +ku.po: 10 translated messages, 81 untranslated messages. +ks.po: ko.po: 54 translated messages, 37 untranslated messages. +3 translated messages, 88 untranslated messages. +rm -f ku_IQ.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku_IQ.gmo ku_IQ.po +rm -f ky.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ky.gmo ky.po +rm -f la.gmo && /usr/bin/msgfmt -c --statistics --verbose -o la.gmo la.po +rm -f lb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lb.gmo lb.po +ku_IQ.po: 16 translated messages, 75 untranslated messages. +rm -f li.gmo && /usr/bin/msgfmt -c --statistics --verbose -o li.gmo li.po +ky.po: 26 translated messages, 65 untranslated messages. +la.po: 2 translated messages, 89 untranslated messages. +li.po:7: warning: header field 'Last-Translator' still has the initial default value +li.po: 0 translated messages, 91 untranslated messages. +rm -f lo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lo.gmo lo.po +lb.po:7: warning: header field 'Last-Translator' still has the initial default value +lb.po: 0 translated messages, 91 untranslated messages. +rm -f lt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lt.gmo lt.po +rm -f lv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lv.gmo lv.po +lo.po:7: warning: header field 'Last-Translator' still has the initial default value +lo.po: 0 translated messages, 91 untranslated messages. +rm -f mg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mg.gmo mg.po +rm -f mai.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mai.gmo mai.po +lt.po: 91 translated messages. +lv.po: 49 translated messages, 42 untranslated messages. +rm -f mi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mi.gmo mi.po +mai.po: 18 translated messages, 73 untranslated messages. +mg.po: 10 translated messagesrm -f mk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mk.gmo mk.po +, 81 untranslated messages. +rm -f ml.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ml.gmo ml.po +mk.po: 39 translated messages, 52 untranslated messages. +mi.po:7: warning: header field 'Last-Translator' still has the initial default value +mi.po: 0 translated messages, 91 untranslated messages. +rm -f mn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mn.gmo mn.po +rm -f mr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mr.gmo mr.po +ml.po: 41 translated messages, 50 untranslated messages. +rm -f ms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ms.gmo ms.po +rm -f my.gmo && /usr/bin/msgfmt -c --statistics --verbose -o my.gmo my.po +mn.po: 10 translated messages, 81 untranslated messages. +mr.po: 47 translated messages, 44 untranslated messages. +rm -f nah.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nah.gmo nah.po +my.po:7: warning: header field 'Last-Translator' still has the initial default value +my.po: 0 translated messages, 91 untranslated messages. +ms.po: 91 translated messages. +rm -f nb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nb.gmo nb.po +rm -f nds.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nds.gmo nds.po +rm -f ne.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ne.gmo ne.po +nah.po: 0 translated messages, 91 untranslated messages. +nb.po: 91 translated messages. +rm -f nl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nl.gmo nl.po +nds.po: 12 translated messages, 79 untranslated messages. +ne.po: 13 translated messages, 78 untranslated messages. +rm -f nn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nn.gmo nn.po +rm -f nqo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nqo.gmo nqo.po +rm -f nso.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nso.gmo nso.po +nl.po: 91 translated messages. +rm -f oc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o oc.gmo oc.po +nn.po: 40 translated messages, 51 untranslated messages. +rm -f om.gmo && /usr/bin/msgfmt -c --statistics --verbose -o om.gmo om.po +nqo.po: 0 translated messages, 91 untranslated messages. +nso.po: 3 translated messages, 88 untranslated messages. +oc.po: 68 translated messages, 23 untranslated messages. +rm -f or.gmo && /usr/bin/msgfmt -c --statistics --verbose -o or.gmo or.po +rm -f pa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pa.gmo pa.po +om.po: 0 translated messages, 91 untranslated messages. +rm -f pl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pl.gmo pl.po +rm -f pms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pms.gmo pms.po +rm -f ps.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ps.gmo ps.po +or.po: pa.po: 46 translated messages, 45 untranslated messages. +41 translated messages, 50 untranslated messages. +pl.po: 55 translated messages, 36 untranslated messages. +pms.po: 3 translated messages, 88 untranslated messages. +ps.po: 6 translated messages, 85 untranslated messages. +rm -f pt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt.gmo pt.po +rm -f pt_BR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt_BR.gmo pt_BR.po +rm -f ro.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ro.gmo ro.po +rm -f ru.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ru.gmo ru.po +rm -f rw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o rw.gmo rw.po +pt.po: 84 translated messages, 7 untranslated messages. +ro.po: 54 translated messages, 37 untranslated messages. +rw.po: 10 translated messages, 81 untranslated messages. +pt_BR.po: 58 translated messages, 33 untranslated messages. +rm -f sc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sc.gmo sc.po +ru.po: 89 translated messages, 2 untranslated messages. +rm -f si.gmo && /usr/bin/msgfmt -c --statistics --verbose -o si.gmo si.po +rm -f sco.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sco.gmo sco.po +sc.po: 2 translated messages, 89 untranslated messages. +rm -f sl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sl.gmo sl.po +rm -f sk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sk.gmo sk.po +si.po: 36 translated messages, 55 untranslated messages. +sco.po: 0 translated messages, 91 untranslated messages. +sk.po: 54 translated messages, 37 untranslated messagessl.po: 55 translated messages, 36 untranslated messages. +. +rm -f so.gmo && /usr/bin/msgfmt -c --statistics --verbose -o so.gmo so.po +rm -f sq.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sq.gmo sq.po +rm -f sr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr.gmo sr.po +rm -f sv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sv.gmo sv.po +rm -f sr@latin.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr@latin.gmo sr@latin.po +so.po: 0 translated messages, 91 untranslated messages. +sq.po: 52 translated messages, 39 untranslated messages. +sr.po: 91 translated messages. +sv.po: 80 translated messages, 11 untranslated messages. +sr@latin.po: 46 translated messages, 45 untranslated messages. +rm -f sw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sw.gmo sw.po +rm -f ta.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ta.gmo ta.po +rm -f te.gmo && /usr/bin/msgfmt -c --statistics --verbose -o te.gmo te.po +rm -f tg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tg.gmo tg.po +rm -f th.gmo && /usr/bin/msgfmt -c --statistics --verbose -o th.gmo th.po +sw.po: 0 translated messages, 91 untranslated messages. +te.po: 41 translated messages, 50 untranslated messages. +ta.po: 46 translated messages, 45 untranslated messages. +tg.po: 0 translated messages, 91 untranslated messages. +th.po: 45 translated messages, 46 untranslated messages. +rm -f tk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tk.gmo tk.po +rm -f tl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tl.gmo tl.po +rm -f tr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tr.gmo tr.po +rm -f ts.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ts.gmo ts.po +rm -f tt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tt.gmo tt.po +tk.po: 7 translated messages, 84 untranslated messages. +tl.po: 0 translated messages, 91 untranslated messages. +tr.po: 58 translated messages, 33 untranslated messages. +ts.po: 0 translated messages, 91 untranslated messages. +rm -f ug.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ug.gmo ug.po +tt.po:7: warning: header field 'Last-Translator' still has the initial default value +tt.po: 0 translated messages, 91 untranslated messages. +rm -f uk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uk.gmo uk.po +rm -f ur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur.gmo ur.po +rm -f ur_PK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur_PK.gmo ur_PK.po +ug.po: 6 translated messages, 85 untranslated messages. +rm -f uz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uz.gmo uz.po +ur.po: 7 translated messages, 84 untranslated messages. +ur_PK.po:7: warning: header field 'Last-Translator' still has the initial default value +ur_PK.po: 0 translated messages, 91 untranslated messages. +uk.po: 58 translated messages, 33 untranslated messages. +rm -f vi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o vi.gmo vi.po +uz.po: 26 translated messages, 65 untranslated messages. +rm -f wa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o wa.gmo wa.po +rm -f yi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yi.gmo yi.po +rm -f xh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o xh.gmo xh.po +wa.po: 9 translated messages, 82 untranslated messages. +vi.po: 52 translated messages, 39 untranslated messages. +xh.po: 8 translated messages, 83 untranslated messages. +rm -f yo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yo.gmo yo.po +yi.po:7: warning: header field 'Last-Translator' still has the initial default value +yi.po: 0 translated messagesrm -f zh_CN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_CN.gmo zh_CN.po +, 91 untranslated messages. +rm -f zh_TW.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_TW.gmo zh_TW.po +rm -f zh_HK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_HK.gmo zh_HK.po +yo.po: 5 translated messages, 86 untranslated messages. +zh_CN.po: 63 translated messages, 28 untranslated messages. +rm -f zu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zu.gmo zu.po +zh_HK.po: 47 translated messages, 44 untranslated messages. +zh_TW.po: 91 translated messages. +zu.po: 3 translated messages, 88 untranslated messages. +make[3]: Leaving directory '/rootdir/po' +touch stamp-po +make[2]: Leaving directory '/rootdir/po' +Making all in libcafekbd +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml + GEN cafekbd-indicator-marshal.h + GEN cafekbd-keyboard-drawing-marshal.h +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... +INFO: Reading ./cafekbd-indicator-marshal.list... + GEN cafekbd-keyboard-drawing-marshal.c + GEN cafekbd-indicator-marshal.c +INFO: Reading ./cafekbd-indicator-marshal.list... +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... +make all-am +make[3]: Entering directory '/rootdir/libcafekbd' + CC libcafekbd_la-cafekbd-desktop-config.lo + CC libcafekbd_la-cafekbd-keyboard-config.lo + CC libcafekbd_la-cafekbd-util.lo + CC libcafekbdui_la-cafekbd-indicator-config.lo + CC libcafekbdui_la-cafekbd-indicator.lo +cafekbd-desktop-config.c: In function 'cafekbd_desktop_config_load_from_gsettings': +cafekbd-desktop-config.c:176:38: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 176 | || config->default_group >= + | ^~ +cafekbd-indicator.c: In function 'cafekbd_indicator_extract_layout_name': +cafekbd-indicator.c:293:19: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 293 | if (group < g_strv_length (short_group_names)) { + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_prepare_drawing': +cafekbd-indicator.c:418:31: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 418 | if (group + 1 == + | ^~ +cafekbd-indicator.c: In function 'cafekbd_indicator_update_tooltips': +cafekbd-indicator.c:446:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 446 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-indicator.c:450:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 450 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-indicator.c: In function 'cafekbd_indicator_kbd_cfg_callback': +cafekbd-indicator.c:61:44: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 61 | CafekbdIndicator * gki = (CafekbdIndicator*)cur->data; + | ^~~ +cafekbd-indicator.c:561:9: note: in expansion of macro 'ForAllIndicators' + 561 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-indicator.c:539:55: note: shadowed declaration is here + 539 | cafekbd_indicator_kbd_cfg_callback (CafekbdIndicator *gki G_GNUC_UNUSED) +cafekbd-indicator.c: In function 'cafekbd_indicator_start_listen': +cafekbd-indicator.c:647:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 647 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:650:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 650 | (CdkFilterFunc) + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_stop_listen': +cafekbd-indicator.c:663:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 663 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:667:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 667 | (CdkFilterFunc) cafekbd_indicator_filter_x_evt, NULL); + | ^ +cafekbd-indicator-config.c: In function 'cafekbd_indicator_config_get_images_file': +cafekbd-indicator-config.c:152:59: warning: comparison of integer expressions of different signedness: 'guint' {aka 'unsigned int'} and 'int' [-Wsign-compare] + 152 | (g_strv_length (kbd_config->layouts_variants) > group)) { + | ^ + CC libcafekbdui_la-cafekbd-status.lo +cafekbd-status.c: In function 'cafekbd_status_render_cairo': +cafekbd-status.c:214:23: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 214 | if (group + 1 == xkl_engine_get_num_groups (globals.engine)) { + | ^~ +cafekbd-status.c: In function 'cafekbd_status_prepare_drawing': +cafekbd-status.c:376:51: warning: cast between incompatible function types from 'void (*)(void *)' to 'void (*)(guchar *, void *)' {aka 'void (*)(unsigned char *, void *)'} [-Wcast-function-type] + 376 | (GdkPixbufDestroyNotify) + | ^ +cafekbd-status.c: In function 'cafekbd_status_update_tooltips': +cafekbd-status.c:395:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 395 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-status.c:399:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 399 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-status.c: In function 'cafekbd_status_kbd_cfg_callback': +cafekbd-status.c:77:41: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 77 | CafekbdStatus * gki = (CafekbdStatus*)cur->data; + | ^~~ +cafekbd-status.c:508:9: note: in expansion of macro 'ForAllIndicators' + 508 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-status.c:484:49: note: shadowed declaration is here + 484 | cafekbd_status_kbd_cfg_callback (CafekbdStatus *gki G_GNUC_UNUSED) +cafekbd-status.c: In function 'cafekbd_status_start_listen': +cafekbd-status.c:594:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 594 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:597:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 597 | (CdkFilterFunc) cafekbd_status_filter_x_evt, + | ^ +cafekbd-status.c: In function 'cafekbd_status_stop_listen': +cafekbd-status.c:610:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 610 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:614:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 614 | (CdkFilterFunc) cafekbd_status_filter_x_evt, NULL); + | ^ + CC libcafekbdui_la-cafekbd-indicator-marshal.lo +cafekbd-indicator-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ + CC libcafekbdui_la-cafekbd-keyboard-drawing-marshal.lo +cafekbd-keyboard-drawing-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + CC libcafekbdui_la-cafekbd-keyboard-drawing.lo +cafekbd-keyboard-drawing.c: In function 'draw_polygon': +cafekbd-keyboard-drawing.c:322:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 322 | for (i = 0; i < num_points; i++) { + | ^ +cafekbd-keyboard-drawing.c: In function 'process_indicators_state_notify': +cafekbd-keyboard-drawing.c:2131:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'long unsigned int' [-Wsign-compare] + 2131 | for (i = 0; i <= drawing->xkb->indicators->phys_indicators; i++) + | ^~ +cafekbd-keyboard-drawing.c: In function 'cafekbd_keyboard_drawing_get_type': +cafekbd-keyboard-drawing.c:2394:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawingClass *)' {aka 'void (*)(struct _CafekbdKeyboardDrawingClass *)'} to 'void (*)(void *, void *)' [-Wcast-function-type] + 2394 | (GClassInitFunc) cafekbd_keyboard_drawing_class_init, + | ^ +cafekbd-keyboard-drawing.c:2399:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawing *)' {aka 'void (*)(struct _CafekbdKeyboardDrawing *)'} to 'void (*)(GTypeInstance *, void *)' {aka 'void (*)(struct _GTypeInstance *, void *)'} [-Wcast-function-type] + 2399 | (GInstanceInitFunc) cafekbd_keyboard_drawing_init, + | ^ + GEN org.cafe.peripherals-keyboard-xkb.gschema.valid + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:114:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 114 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbd.la + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspectya_6du8x/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectya_6du8x/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectya_6du8x/Cafekbd-1.0.c:239:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 239 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspectya_6du8x/Cafekbd-1.0.c:246:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 246 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspectya_6du8x/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +5 warnings generated. + GICOMP Cafekbd-1.0.gir +make[3]: Leaving directory '/rootdir/libcafekbd' +make[2]: Leaving directory '/rootdir/libcafekbd' +Making all in test +make[2]: Entering directory '/rootdir/test' + CC cafekbd_indicator_test-cafekbd-indicator-test.o + CC cafekbd_keyboard_drawing_test-cafekbd-keyboard-drawing-test.o + CC cafekbd_status_test-cafekbd-status-test.o + CCLD cafekbd-status-test + CCLD cafekbd-indicator-test +cafekbd-keyboard-drawing-test.c:187:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 187 | g_print ("kbdraw %s\n", VERSION); + | ^~~~~~~ +cafekbd-keyboard-drawing-test.c:194:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 194 | g_printerr ("--groups: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:199:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 199 | g_printerr ("--levels: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:225:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 225 | cafekbd_keyboard_drawing_set_track_modifiers + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:228:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 228 | cafekbd_keyboard_drawing_set_track_config + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:248:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 248 | names.keycodes = keycodes; + | ^~~~~~~~ +cafekbd-keyboard-drawing-test.c:256:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 256 | names.geometry = geometry; + | ^~~~~~~~ +7 warnings generated. + CCLD cafekbd-keyboard-drawing-test +make[2]: Leaving directory '/rootdir/test' +make[2]: Entering directory '/rootdir' +make[2]: Leaving directory '/rootdir' +make[1]: Leaving directory '/rootdir' +scan-build: Analysis run complete. +scan-build: 11 bugs found. +scan-build: Run 'scan-view /rootdir/html-report/2025-02-06-152034-14522-1' to examine bug reports. +Making check in po +make[1]: Entering directory '/rootdir/po' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/po' +Making check in libcafekbd +make[1]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +make check-am +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:113:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 113 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspectf2f1gymw/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectf2f1gymw/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectf2f1gymw/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +3 warnings generated. + GICOMP Cafekbd-1.0.gir +make[2]: Leaving directory '/rootdir/libcafekbd' +make[1]: Leaving directory '/rootdir/libcafekbd' +Making check in test +make[1]: Entering directory '/rootdir/test' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/test' +make[1]: Entering directory '/rootdir' +make[1]: Leaving directory '/rootdir' + Listing... 0% Listing... 0% Listing... 0% adduser/testing,now 3.137 all [installed,automatic] +advaita-icon-theme/unknown,now 3.25.0-1 all [installed,automatic] +apt/testing,now 2.9.26 amd64 [installed,automatic] +aptitude-common/testing,now 0.8.13-6.1 all [installed,automatic] +aptitude/testing,now 0.8.13-6.1 amd64 [installed] +at-spi2-common/testing,now 2.55.0.1-1 all [installed,automatic] +at-spi2-core/testing,now 2.55.0.1-1 amd64 [installed,automatic] +autoconf-archive/testing,now 20220903-3 all [installed] +autoconf/testing,now 2.72-3 all [installed,automatic] +automake/testing,now 1:1.17-3 all [installed,automatic] +autopoint/testing,now 0.23.1-1 all [installed] +autotools-dev/testing,now 20220109.1 all [installed,automatic] +base-files/testing,now 13.6 amd64 [installed,automatic] +base-passwd/testing,now 3.6.6 amd64 [installed,automatic] +bash/testing,now 5.2.37-1 amd64 [installed,automatic] +binfmt-support/testing,now 2.2.2-7 amd64 [installed,automatic] +binutils-common/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils-gold-x86-64-linux-gnu/testing,now 2.44-1 amd64 [installed,automatic] +binutils-gold/testing,now 2.44-1 amd64 [installed,automatic] +binutils-x86-64-linux-gnu/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +bsdutils/testing,now 1:2.40.4-2 amd64 [installed,automatic] +build-essential/testing,now 12.12 amd64 [installed,automatic] +bzip2-doc/testing,now 1.0.8-6 all [installed,automatic] +bzip2/testing,now 1.0.8-6 amd64 [installed,automatic] +ca-certificates/testing,now 20241223 all [installed,automatic] +clang-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools/testing,now 1:19.0-63 amd64 [installed] +clang/testing,now 1:19.0-63 amd64 [installed] +coreutils/testing,now 9.5-1+b1 amd64 [installed,automatic] +cpp-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-14/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cpp/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cppcheck/testing,now 2.16.0-1 amd64 [installed] +ctk-update-icon-cache/unknown,now 3.25.6-1 amd64 [installed,automatic] +dash/testing,now 0.5.12-12 amd64 [installed,automatic] +dbus-bin/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-daemon/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-session-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-system-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-user-session/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus/testing,now 1.16.0-1 amd64 [installed,automatic] +dconf-gsettings-backend/testing,now 0.40.0-5 amd64 [installed,automatic] +dconf-service/testing,now 0.40.0-5 amd64 [installed,automatic] +debconf/testing,now 1.5.89 all [installed,automatic] +debian-archive-keyring/testing,now 2023.4 all [installed,automatic] +debianutils/testing,now 5.21 amd64 [installed,automatic] +diffutils/testing,now 1:3.10-2 amd64 [installed,automatic] +dirmngr/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +dmsetup/testing,now 2:1.02.201-1 amd64 [installed,automatic] +dpkg-dev/testing,now 1.22.14 all [installed,automatic] +dpkg/testing,now 1.22.14 amd64 [installed,automatic] +e2fsprogs/testing,now 1.47.2-1 amd64 [installed,automatic] +expect/testing,now 5.45.4-3+b1 amd64 [installed] +fakeroot/testing,now 1.37-1 amd64 [installed,automatic] +file/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +findutils/testing,now 4.10.0-3 amd64 [installed,automatic] +fontconfig-config/testing,now 2.15.0-2 amd64 [installed,automatic] +fontconfig/testing,now 2.15.0-2 amd64 [installed,automatic] +fonts-dejavu-core/testing,now 2.37-8 all [installed,automatic] +fonts-dejavu-mono/testing,now 2.37-8 all [installed,automatic] +g++-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-14/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +g++/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc-14-base/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gettext-base/testing,now 0.23.1-1 amd64 [installed,automatic] +gettext/testing,now 0.23.1-1 amd64 [installed] +gir1.2-atk-1.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-atspi-2.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-ctk-3.0/unknown,now 3.25.6-1 amd64 [installed] +gir1.2-freedesktop-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-freedesktop/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-gdkpixbuf-2.0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +gir1.2-girepository-2.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-girepository-2.0/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-glib-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-glib-2.0/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-harfbuzz-0.0/testing,now 10.2.0-1 amd64 [installed,automatic] +gir1.2-pango-1.0/testing,now 1.56.1-1 amd64 [installed,automatic] +gir1.2-xkl-1.0/testing,now 5.4-5+b2 amd64 [installed,automatic] +girepository-tools/testing,now 2.82.4-2 amd64 [installed,automatic] +git-man/testing,now 1:2.47.2-0.1 all [installed,automatic] +git/testing,now 1:2.47.2-0.1 amd64 [installed] +gnupg-l10n/testing,now 2.2.46-1 all [installed,automatic] +gnupg-utils/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gnupg/testing,now 2.2.46-1 all [installed,automatic] +gobject-introspection-bin/testing,now 1.82.0-4 amd64 [installed,automatic] +gobject-introspection/testing,now 1.82.0-4 amd64 [installed] +gpg-agent/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg-wks-client/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgconf/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgsm/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgv/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +grep/testing,now 3.11-4 amd64 [installed,automatic] +gsettings-desktop-schemas/testing,now 47.1-1 all [installed,automatic] +gzip/testing,now 1.13-1 amd64 [installed,automatic] +hicolor-icon-theme/testing,now 0.18-2 all [installed,automatic] +hostname/testing,now 3.25 amd64 [installed,automatic] +icu-devtools/testing,now 72.1-6 amd64 [installed,automatic] +init-system-helpers/testing,now 1.68 all [installed,automatic] +krb5-locales/testing,now 1.21.3-4 all [installed,automatic] +less/testing,now 643-1 amd64 [installed,automatic] +lib32gcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +lib32stdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libacl1/testing,now 2.3.2-2+b1 amd64 [installed,automatic] +libalgorithm-diff-perl/testing,now 1.201-1 all [installed,automatic] +libalgorithm-diff-xs-perl/testing,now 0.04-8+b4 amd64 [installed,automatic] +libalgorithm-merge-perl/testing,now 0.08-5 all [installed,automatic] +libapparmor1/testing,now 3.1.7-1+b3 amd64 [installed,automatic] +libapt-pkg6.0t64/testing,now 2.9.26 amd64 [installed,automatic] +libasan8/testing,now 14.2.0-12 amd64 [installed,automatic] +libassuan9/testing,now 3.0.1-2 amd64 [installed,automatic] +libatk-bridge2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk-bridge2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatomic1/testing,now 14.2.0-12 amd64 [installed,automatic] +libatspi2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatspi2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libattr1/testing,now 1:2.5.2-2 amd64 [installed,automatic] +libaudit-common/testing,now 1:4.0.2-2 all [installed,automatic] +libaudit1/testing,now 1:4.0.2-2+b1 amd64 [installed,automatic] +libavahi-client3/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common-data/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common3/testing,now 0.8-16 amd64 [installed,automatic] +libbinutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libblkid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libblkid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libboost-iostreams1.83.0/testing,now 1.83.0-4 amd64 [installed,automatic] +libbrotli-dev/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbrotli1/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbsd0/testing,now 0.12.2-2 amd64 [installed,automatic] +libbz2-1.0/testing,now 1.0.8-6 amd64 [installed,automatic] +libbz2-dev/testing,now 1.0.8-6 amd64 [installed,automatic] +libc-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc-dev-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc6-dev/testing,now 2.40-6 amd64 [installed,automatic] +libc6-i386/testing,now 2.40-6 amd64 [installed,automatic] +libc6/testing,now 2.40-6 amd64 [installed,automatic] +libcairo-gobject2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo-script-interpreter2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2-dev/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcap-dev/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcap-ng0/testing,now 0.8.5-4 amd64 [installed,automatic] +libcap2/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcbor0.10/testing,now 0.10.2-2 amd64 [installed,automatic] +libcc1-0/testing,now 14.2.0-12 amd64 [installed,automatic] +libclang-common-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-cpp19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-rt-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang1-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libcolord2/testing,now 1.4.7-1+b2 amd64 [installed,automatic] +libcom-err2/testing,now 1.47.2-1 amd64 [installed,automatic] +libcrypt-dev/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcrypt1/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcryptsetup12/testing,now 2:2.7.5-1 amd64 [installed,automatic] +libctf-nobfd0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctf0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctk-3-0/unknown,now 3.25.6-1 amd64 [installed] +libctk-3-bin/unknown,now 3.25.6-1 amd64 [installed,automatic] +libctk-3-common/unknown,now 3.25.6-1 all [installed] +libctk-3-dev/unknown,now 3.25.6-1 amd64 [installed] +libcups2t64/testing,now 2.4.10-2+b1 amd64 [installed,automatic] +libcurl3t64-gnutls/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcurl4t64/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcwidget4/testing,now 0.5.18-6+b2 amd64 [installed,automatic] +libdatrie-dev/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdatrie1/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdav1d7/testing,now 1.5.1-1 amd64 [installed,automatic] +libdb5.3t64/testing,now 5.3.28+dfsg2-9 amd64 [installed,automatic] +libdbus-1-3/testing,now 1.16.0-1 amd64 [installed,automatic] +libdbus-1-dev/testing,now 1.16.0-1 amd64 [installed,automatic] +libdconf1/testing,now 0.40.0-5 amd64 [installed,automatic] +libdebconfclient0/testing,now 0.277 amd64 [installed,automatic] +libdeflate-dev/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdeflate0/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdevmapper1.02.1/testing,now 2:1.02.201-1 amd64 [installed,automatic] +libdpkg-perl/testing,now 1.22.14 all [installed,automatic] +libdrm-amdgpu1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-common/testing,now 2.4.123-1 all [installed,automatic] +libdrm-intel1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-radeon1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm2/testing,now 2.4.123-1 amd64 [installed,automatic] +libedit2/testing,now 3.1-20250104-1 amd64 [installed,automatic] +libegl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libegl-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1-mesa-dev/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libelf1t64/testing,now 0.192-4 amd64 [installed,automatic] +libepoxy-dev/testing,now 1.5.10-2 amd64 [installed,automatic] +libepoxy0/testing,now 1.5.10-2 amd64 [installed,automatic] +liberror-perl/testing,now 0.17029-2 all [installed,automatic] +libexpat1-dev/testing,now 2.6.4-1 amd64 [installed,automatic] +libexpat1/testing,now 2.6.4-1 amd64 [installed,automatic] +libext2fs2t64/testing,now 1.47.2-1 amd64 [installed,automatic] +libfakeroot/testing,now 1.37-1 amd64 [installed,automatic] +libffi-dev/testing,now 3.4.6-1 amd64 [installed,automatic] +libffi8/testing,now 3.4.6-1 amd64 [installed,automatic] +libfido2-1/testing,now 1.15.0-1+b1 amd64 [installed,automatic] +libfile-fcntllock-perl/testing,now 0.22-4+b4 amd64 [installed,automatic] +libfontconfig-dev/testing,now 2.15.0-2 amd64 [installed,automatic] +libfontconfig1/testing,now 2.15.0-2 amd64 [installed,automatic] +libfreetype-dev/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfreetype6/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfribidi-dev/testing,now 1.0.16-1 amd64 [installed,automatic] +libfribidi0/testing,now 1.0.16-1 amd64 [installed,automatic] +libgbm1/testing,now 24.2.8-1 amd64 [installed,automatic] +libgc1/testing,now 1:8.2.8-1 amd64 [installed,automatic] +libgcc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcrypt20/testing,now 1.11.0-7 amd64 [installed,automatic] +libgdbm-compat4t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdbm6t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-dev/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-bin/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-common/testing,now 2.42.12+dfsg-2 all [installed,automatic] +libgio-2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libgio-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository-1.0-1/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-1.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-2.0-0/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository1.0-dev/testing,now 1.82.0-4 amd64 [installed] +libgl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgl1-mesa-dri/testing,now 24.2.8-1 amd64 [installed,automatic] +libgl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglapi-mesa/testing,now 24.2.8-1 amd64 [installed,automatic] +libgles-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles2/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglib2.0-0t64/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-data/testing,now 2.82.4-2 all [installed,automatic] +libglib2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-dev/testing,now 2.82.4-2 amd64 [installed] +libglvnd-core-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libglx0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgmp10/testing,now 2:6.3.0+dfsg-3 amd64 [installed,automatic] +libgnutls30t64/testing,now 3.8.8-2 amd64 [installed,automatic] +libgomp1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgpg-error-l10n/testing,now 1.51-3 all [installed,automatic] +libgpg-error0/testing,now 1.51-3 amd64 [installed,automatic] +libgpm2/testing,now 1.20.7-11+b2 amd64 [installed,automatic] +libgprofng0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libgraphite2-3/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgraphite2-dev/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgssapi-krb5-2/testing,now 1.21.3-4 amd64 [installed,automatic] +libharfbuzz-cairo0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-dev/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-gobject0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-icu0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-subset0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz0b/testing,now 10.2.0-1 amd64 [installed,automatic] +libhogweed6t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libhwasan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libice-dev/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libice6/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libicu-dev/testing,now 72.1-6 amd64 [installed,automatic] +libicu72/testing,now 72.1-6 amd64 [installed,automatic] +libidn2-0/testing,now 2.3.7-2+b1 amd64 [installed,automatic] +libisl23/testing,now 0.27-1 amd64 [installed,automatic] +libitm1/testing,now 14.2.0-12 amd64 [installed,automatic] +libjansson4/testing,now 2.14-2+b3 amd64 [installed,automatic] +libjbig-dev/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjbig0/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjpeg-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjson-c5/testing,now 0.18+ds-1 amd64 [installed,automatic] +libk5crypto3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkeyutils1/testing,now 1.6.3-4 amd64 [installed,automatic] +libkmod2/testing,now 33+20240816-2 amd64 [installed,automatic] +libkrb5-3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkrb5support0/testing,now 1.21.3-4 amd64 [installed,automatic] +libksba8/testing,now 1.6.7-2+b1 amd64 [installed,automatic] +liblcms2-2/testing,now 2.16-2 amd64 [installed,automatic] +libldap-common/testing,now 2.6.9+dfsg-1 all [installed,automatic] +libldap2/testing,now 2.6.9+dfsg-1 amd64 [installed,automatic] +liblerc-dev/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +liblerc4/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +libllvm19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +liblocale-gettext-perl/testing,now 1.07-7+b1 amd64 [installed,automatic] +liblsan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libltdl-dev/testing,now 2.5.4-3 amd64 [installed,automatic] +libltdl7/testing,now 2.5.4-3 amd64 [installed,automatic] +liblz4-1/testing,now 1.10.0-3 amd64 [installed,automatic] +liblzma-dev/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzma5/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzo2-2/testing,now 2.10-3+b1 amd64 [installed,automatic] +libmagic-mgc/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmagic1t64/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmd0/testing,now 1.1.0-2+b1 amd64 [installed,automatic] +libmount-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libmount1/testing,now 2.40.4-2 amd64 [installed,automatic] +libmpc3/testing,now 1.3.1-1+b3 amd64 [installed,automatic] +libmpfr6/testing,now 4.2.1-1+b2 amd64 [installed,automatic] +libncurses-dev/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncurses6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncursesw6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libnettle8t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libnghttp2-14/testing,now 1.64.0-1 amd64 [installed,automatic] +libnghttp3-9/testing,now 1.6.0-2 amd64 [installed,automatic] +libngtcp2-16/testing,now 1.9.1-1 amd64 [installed,automatic] +libngtcp2-crypto-gnutls8/testing,now 1.9.1-1 amd64 [installed,automatic] +libnpth0t64/testing,now 1.8-2 amd64 [installed,automatic] +libnss-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libobjc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libobjc4/testing,now 14.2.0-12 amd64 [installed,automatic] +libopengl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libopengl0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libp11-kit0/testing,now 0.25.5-3 amd64 [installed,automatic] +libpam-modules-bin/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-modules/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-runtime/testing,now 1.7.0-2 all [installed,automatic] +libpam-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libpam0g/testing,now 1.7.0-2 amd64 [installed,automatic] +libpango-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpango1.0-dev/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangocairo-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoft2-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoxft-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpciaccess0/testing,now 0.17-3+b3 amd64 [installed,automatic] +libpcre2-16-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-32-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-8-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-dev/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-posix3/testing,now 10.44-5 amd64 [installed,automatic] +libperl5.40/testing,now 5.40.0-8 amd64 [installed,automatic] +libpfm4/testing,now 4.13.0+git83-g91970fe-1 amd64 [installed,automatic] +libpipeline1/testing,now 1.5.8-1 amd64 [installed,automatic] +libpixman-1-0/testing,now 0.44.0-3 amd64 [installed,automatic] +libpixman-1-dev/testing,now 0.44.0-3 amd64 [installed,automatic] +libpkgconf3/testing,now 1.8.1-4 amd64 [installed,automatic] +libpng-dev/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng-tools/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng16-16t64/testing,now 1.6.44-3 amd64 [installed,automatic] +libproc2-0/testing,now 2:4.0.4-7 amd64 [installed,automatic] +libpsl5t64/testing,now 0.21.2-1.1+b1 amd64 [installed,automatic] +libpython3-stdlib/testing,now 3.13.1-2 amd64 [installed,automatic] +libpython3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libpython3.13-stdlib/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libquadmath0/testing,now 14.2.0-12 amd64 [installed,automatic] +libreadline8t64/testing,now 8.2-6 amd64 [installed,automatic] +librsvg2-2/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librsvg2-common/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librtmp1/testing,now 2.4+20151223.gitfa8646d.1-2+b5 amd64 [installed,automatic] +libsasl2-2/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules-db/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libseccomp2/testing,now 2.5.5-2 amd64 [installed,automatic] +libselinux1-dev/testing,now 3.7-3.1 amd64 [installed,automatic] +libselinux1/testing,now 3.7-3.1 amd64 [installed,automatic] +libsemanage-common/testing,now 3.7-2.1 all [installed,automatic] +libsemanage2/testing,now 3.7-2.1 amd64 [installed,automatic] +libsensors-config/testing,now 1:3.6.0-10 all [installed,automatic] +libsensors5/testing,now 1:3.6.0-10+b1 amd64 [installed,automatic] +libsepol-dev/testing,now 3.7-1 amd64 [installed,automatic] +libsepol2/testing,now 3.7-1 amd64 [installed,automatic] +libsframe1/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libsharpyuv-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsharpyuv0/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsigc++-2.0-0v5/testing,now 2.12.1-3 amd64 [installed,automatic] +libsm-dev/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsm6/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsmartcols1/testing,now 2.40.4-2 amd64 [installed,automatic] +libsqlite3-0/testing,now 3.46.1-1 amd64 [installed,automatic] +libss2/testing,now 1.47.2-1 amd64 [installed,automatic] +libssh2-1t64/testing,now 1.11.1-1 amd64 [installed,automatic] +libssl3t64/testing,now 3.4.0-2 amd64 [installed,automatic] +libstdc++-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libstdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libsysprof-capture-4-dev/testing,now 47.2-1 amd64 [installed,automatic] +libsystemd-dev/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd-shared/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd0/testing,now 257.2-3 amd64 [installed,automatic] +libtasn1-6/testing,now 4.19.0-3+b3 amd64 [installed,automatic] +libtcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +libthai-data/testing,now 0.1.29-2 all [installed,automatic] +libthai-dev/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libthai0/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libtiff-dev/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiff6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiffxx6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtinfo6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libtinyxml2-10/testing,now 10.0.0+dfsg-2+b2 amd64 [installed,automatic] +libtool/testing,now 2.5.4-3 all [installed] +libtsan2/testing,now 14.2.0-12 amd64 [installed,automatic] +libubsan1/testing,now 14.2.0-12 amd64 [installed,automatic] +libudev1/testing,now 257.2-3 amd64 [installed,automatic] +libunistring5/testing,now 1.3-1 amd64 [installed,automatic] +libuuid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libvulkan1/testing,now 1.4.304.0-1 amd64 [installed,automatic] +libwayland-bin/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-client0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-cursor0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-dev/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-egl1/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-server0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwebp-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebp7/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdecoder3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdemux2/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpmux3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libx11-6/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-data/testing,now 2:1.8.10-2 all [installed,automatic] +libx11-dev/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-xcb1/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libxapian30/testing,now 1.4.25-2 amd64 [installed,automatic] +libxau-dev/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxau6/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxaw7/testing,now 2:1.0.16-1 amd64 [installed,automatic] +libxcb-dri2-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-dri3-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-glx0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-present0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-randr0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-sync1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-xfixes0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcomposite-dev/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcomposite1/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcursor-dev/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxcursor1/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxdamage-dev/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdamage1/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdmcp-dev/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxdmcp6/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxext-dev/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxext6/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxfixes-dev/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxfixes3/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxft-dev/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxft2/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxi-dev/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxi6/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxinerama-dev/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxinerama1/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxkbcommon-dev/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbcommon0/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbfile1/testing,now 1:1.1.0-1+b4 amd64 [installed,automatic] +libxklavier-dev/testing,now 5.4-5+b2 amd64 [installed] +libxklavier16/testing,now 5.4-5+b2 amd64 [installed,automatic] +libxml2-dev/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxml2-utils/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed] +libxml2/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxmu6/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxmuu1/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxpm4/testing,now 1:3.5.17-1+b3 amd64 [installed,automatic] +libxrandr-dev/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrandr2/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrender-dev/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxrender1/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxshmfence1/testing,now 1.3-1+b3 amd64 [installed,automatic] +libxt6t64/testing,now 1:1.2.1-1.2+b2 amd64 [installed,automatic] +libxtst-dev/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxtst6/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxxf86vm1/testing,now 1:1.1.4-1+b4 amd64 [installed,automatic] +libxxhash0/testing,now 0.8.2-2+b2 amd64 [installed,automatic] +libyaml-0-2/testing,now 0.2.5-2 amd64 [installed,automatic] +libz3-4/testing,now 4.13.3-1 amd64 [installed,automatic] +libz3-dev/testing,now 4.13.3-1 amd64 [installed,automatic] +libzstd-dev/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +libzstd1/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +linux-libc-dev/testing,now 6.12.11-1 all [installed,automatic] +linux-sysctl-defaults/testing,now 4.11 all [installed,automatic] +llvm-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-linker-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-runtime/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +login.defs/testing,now 1:4.16.0-7 all [installed,automatic] +login/testing,now 1:4.16.0-2+really2.40.4-2 amd64 [installed,automatic] +logsave/testing,now 1.47.2-1 amd64 [installed,automatic] +m4/testing,now 1.4.19-5 amd64 [installed,automatic] +make/testing,now 4.4.1-1 amd64 [installed] +manpages-dev/testing,now 6.9.1-1 all [installed,automatic] +manpages/testing,now 6.9.1-1 all [installed,automatic] +mawk/testing,now 1.3.4.20240905-1 amd64 [installed,automatic] +media-types/testing,now 10.1.0 all [installed,automatic] +mesa-libgallium/testing,now 24.2.8-1 amd64 [installed,automatic] +mesa-vulkan-drivers/testing,now 24.2.8-1 amd64 [installed,automatic] +mount/testing,now 2.40.4-2 amd64 [installed,automatic] +native-architecture/testing,now 0.2.5 all [installed,automatic] +ncurses-base/testing,now 6.5-2 all [installed,automatic] +ncurses-bin/testing,now 6.5-2+b1 amd64 [installed,automatic] +netbase/testing,now 6.4 all [installed,automatic] +openssh-client/testing,now 1:9.9p1-3 amd64 [installed,automatic] +openssl-provider-legacy/testing,now 3.4.0-2 amd64 [installed,automatic] +openssl/testing,now 3.4.0-2 amd64 [installed,automatic] +pango1.0-tools/testing,now 1.56.1-1 amd64 [installed,automatic] +passwd/testing,now 1:4.16.0-7 amd64 [installed,automatic] +patch/testing,now 2.7.6-7 amd64 [installed,automatic] +perl-base/testing,now 5.40.0-8 amd64 [installed,automatic] +perl-modules-5.40/testing,now 5.40.0-8 all [installed,automatic] +perl/testing,now 5.40.0-8 amd64 [installed,automatic] +pinentry-curses/testing,now 1.3.1-2 amd64 [installed,automatic] +pkgconf-bin/testing,now 1.8.1-4 amd64 [installed,automatic] +pkgconf/testing,now 1.8.1-4 amd64 [installed,automatic] +procps/testing,now 2:4.0.4-7 amd64 [installed,automatic] +psmisc/testing,now 23.7-1 amd64 [installed,automatic] +publicsuffix/testing,now 20250108.1153-0.1 all [installed,automatic] +python3-autocommand/testing,now 2.2.2-3 all [installed,automatic] +python3-inflect/testing,now 7.3.1-2 all [installed,automatic] +python3-jaraco.context/testing,now 6.0.0-1 all [installed,automatic] +python3-jaraco.functools/testing,now 4.1.0-1 all [installed,automatic] +python3-jaraco.text/testing,now 4.0.0-1 all [installed,automatic] +python3-mako/testing,now 1.3.8-2 all [installed,automatic] +python3-markdown/testing,now 3.7-2 all [installed,automatic] +python3-markupsafe/testing,now 2.1.5-1+b2 amd64 [installed,automatic] +python3-minimal/testing,now 3.13.1-2 amd64 [installed,automatic] +python3-more-itertools/testing,now 10.6.0-1 all [installed,automatic] +python3-packaging/testing,now 24.2-1 all [installed,automatic] +python3-pkg-resources/testing,now 75.6.0-1 all [installed,automatic] +python3-pygments/testing,now 2.18.0+dfsg-2 all [installed,automatic] +python3-setuptools/testing,now 75.6.0-1 all [installed,automatic] +python3-typeguard/testing,now 4.4.1-1 all [installed,automatic] +python3-typing-extensions/testing,now 4.12.2-2 all [installed,automatic] +python3-yaml/testing,now 6.0.2-1+b1 amd64 [installed,automatic] +python3-zipp/testing,now 3.21.0-1 all [installed,automatic] +python3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3.13/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3/testing,now 3.13.1-2 amd64 [installed,automatic] +readline-common/testing,now 8.2-6 all [installed,automatic] +rpcsvc-proto/testing,now 1.4.3-1 amd64 [installed,automatic] +sed/testing,now 4.9-2 amd64 [installed,automatic] +sensible-utils/testing,now 0.0.24 all [installed,automatic] +sgml-base/testing,now 1.31 all [installed,automatic] +shared-mime-info/testing,now 2.4-5+b2 amd64 [installed,automatic] +sqv/testing,now 1.2.1-5 amd64 [installed,automatic] +systemd-cryptsetup/testing,now 257.2-3 amd64 [installed,automatic] +systemd-sysv/testing,now 257.2-3 amd64 [installed,automatic] +systemd-timesyncd/testing,now 257.2-3 amd64 [installed,automatic] +systemd/testing,now 257.2-3 amd64 [installed,automatic] +sysvinit-utils/testing,now 3.13-1 amd64 [installed,automatic] +tar/testing,now 1.35+dfsg-3.1 amd64 [installed,automatic] +tcl-expect/testing,now 5.45.4-3+b1 amd64 [installed,automatic] +tcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +tzdata/testing,now 2024b-6 all [installed,automatic] +util-linux/testing,now 2.40.4-2 amd64 [installed,automatic] +uuid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +wayland-protocols/testing,now 1.39-1 all [installed,automatic] +wget/testing,now 1.24.5-2+b1 amd64 [installed] +x11-common/testing,now 1:7.7+24 all [installed,automatic] +x11-xkb-utils/testing,now 7.7+9 amd64 [installed,automatic] +x11proto-dev/testing,now 2024.1-1 all [installed,automatic] +xauth/testing,now 1:1.1.2-1.1 amd64 [installed,automatic] +xdg-user-dirs/testing,now 0.18-2 amd64 [installed,automatic] +xkb-data/testing,now 2.42-1 all [installed,automatic] +xml-core/testing,now 0.19 all [installed,automatic] +xorg-sgml-doctools/testing,now 1:1.11-1.1 all [installed,automatic] +xtrans-dev/testing,now 1.4.0-1 all [installed,automatic] +xz-utils/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +zlib1g-dev/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +zlib1g/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +Errors detected in the build 0 +Warnings detected in the logs 96 +cppcheck defects detected in the logs 28 +TOTAL warnings detected in the logs 124 diff --git a/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/stats.html b/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/stats.html new file mode 100644 index 0000000..a805ba6 --- /dev/null +++ b/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/stats.html @@ -0,0 +1,180 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+

Top 10 files for error severity, total findings: 2
+   1  libcafekbd/cafekbd-status.c
+   1  libcafekbd/cafekbd-indicator.c
+

+

Top 10 files for style severity, total findings: 20
+   13  libcafekbd/cafekbd-keyboard-drawing.c
+   6   libcafekbd/cafekbd-keyboard-config.c
+   1   test/cafekbd-status-test.c
+

+

Top 10 files for information severity, total findings: 5
+   1  test/cafekbd-keyboard-drawing-test.c
+   1  libcafekbd/cafekbd-keyboard-drawing.c
+   1  libcafekbd/cafekbd-keyboard-config.c
+   1  libcafekbd/cafekbd-indicator-config.c
+   1  libcafekbd/cafekbd-desktop-config.c
+

+ +
+ +
+ + diff --git a/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/style.css b/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/style.css new file mode 100644 index 0000000..3897bfa --- /dev/null +++ b/2025-02-06-152205-0387-cppcheck@76170f64aaf1_devel/style.css @@ -0,0 +1,177 @@ + +body { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; + font-size: 13px; + line-height: 1.5; + height: 100%; + margin: 0; +} + +#wrapper { + position: fixed; + height: 100vh; + width: 100vw; + display: grid; + grid-template-rows: fit-content(8rem) auto fit-content(8rem); + grid-template-columns: fit-content(25%) 1fr; + grid-template-areas: + "header header" + "menu content" + "footer footer"; +} + +h1 { + margin: 0 0 8px -2px; + font-size: 175%; +} + +.header { + padding: 0 0 5px 15px; + grid-area: header; + border-bottom: thin solid #aaa; +} + +.footer { + grid-area: footer; + border-top: thin solid #aaa; + font-size: 85%; + +} + +.footer > p { + margin: 4px; +} + +#menu, +#menu_index { + grid-area: menu; + text-align: left; + overflow: auto; + padding: 0 23px 15px 15px; + border-right: thin solid #aaa; + min-width: 200px; +} + +#menu > a { + display: block; + margin-left: 10px; + font-size: 12px; +} + +#content, +#content_index { + grid-area: content; + padding: 0px 5px 15px 15px; + overflow: auto; +} + +label { + white-space: nowrap; +} + +label.checkBtn.disabled { + color: #606060; + background: #e0e0e0; + font-style: italic; +} + +label.checkBtn, input[type="text"] { + border: 1px solid grey; + border-radius: 4px; + box-shadow: 1px 1px inset; + padding: 1px 5px; +} + +label.checkBtn { + white-space: nowrap; + background: #ccddff; +} + +label.unchecked { + background: #eff8ff; + box-shadow: 1px 1px 1px; +} + +label.checkBtn:hover, label.unchecked:hover{ + box-shadow: 0 0 2px; +} + +label.disabled:hover { + box-shadow: 1px 1px inset; +} + +label.checkBtn > input { + display:none; +} + +.summaryTable { + width: 100%; +} + +table.summaryTable td { padding: 0 5px 0 5px; } + +.statHeader, .severityHeader { + font-weight: bold; +} + +.warning { + background-color: #ffffa7; +} + +.error { + background-color: #ffb7b7; +} + +.error2 { + background-color: #faa; + display: inline-block; + margin-left: 4px; +} + +.inconclusive { + background-color: #b6b6b4; +} + +.inconclusive2 { + background-color: #b6b6b4; + display: inline-block; + margin-left: 4px; +} + +.verbose { + display: inline-block; + vertical-align: top; + cursor: help; +} + +.verbose .content { + display: none; + position: absolute; + padding: 10px; + margin: 4px; + max-width: 40%; + white-space: pre-wrap; + border: 1px solid #000; + background-color: #ffffcc; + cursor: auto; +} + +.highlight .hll { + padding: 1px; +} + +.highlighttable { + background-color: #fff; + position: relative; + margin: -10px; +} + +.linenos { + border-right: thin solid #aaa; + color: #d3d3d3; + padding-right: 6px; +} + +.id-filtered, .severity-filtered, .file-filtered, .tool-filtered, .text-filtered { + visibility: collapse; +} diff --git a/2025-02-06-152308-14522-1@ae3358295c1f_devel/commitmsg b/2025-02-06-152308-14522-1@ae3358295c1f_devel/commitmsg new file mode 100644 index 0000000..1dddd53 --- /dev/null +++ b/2025-02-06-152308-14522-1@ae3358295c1f_devel/commitmsg @@ -0,0 +1 @@ +po: update translations for 2.0.0 diff --git a/2025-02-06-152308-14522-1@ae3358295c1f_devel/index.html b/2025-02-06-152308-14522-1@ae3358295c1f_devel/index.html new file mode 100644 index 0000000..d41d478 --- /dev/null +++ b/2025-02-06-152308-14522-1@ae3358295c1f_devel/index.html @@ -0,0 +1,138 @@ + + +libcafekbd (clang-tools 1:19.0-63) - scan-build results + + + + + + +

libcafekbd (clang-tools 1:19.0-63) - scan-build results

+ + + + + + + +
User:root@2068acde7798
Working Directory:/rootdir
Command Line:make -j 5
Clang Version:Debian clang version 19.1.6 (1+b1) +
Date:Thu Feb 6 15:23:08 2025
+

Bug Summary

+ + + + + + + + + +
Bug TypeQuantityDisplay?
All Bugs11
Logic error
Dereference of null pointer1
Stream handling error
Invalid stream state1
Stream already in EOF1
Unused code
Unreachable code8
+ +

Filter Results by File

+ + +

Reports

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Bug GroupBug Type ▾FileFunction/MethodLinePath Length
Logic errorDereference of null pointerlibcafekbd/tmp-introspectklhm67d4/Cafekbd-1.0.cmain81232View Report
Stream handling errorInvalid stream statelibcafekbd/tmp-introspectklhm67d4/Cafekbd-1.0.cread_line8933View Report
Stream handling errorStream already in EOFlibcafekbd/tmp-introspectklhm67d4/Cafekbd-1.0.cread_line8933View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2481View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain1991View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain1941View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2281View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain1871View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2251View Report
Unused codeUnreachable codelibcafekbd/tmp-introspectklhm67d4/Cafekbd-1.0.cvalue_to_string2391View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2561View Report
+ + diff --git a/2025-02-06-152308-14522-1@ae3358295c1f_devel/output_ae3358295c1fa22b559fc9fea848e0bb4f3741f8 b/2025-02-06-152308-14522-1@ae3358295c1f_devel/output_ae3358295c1fa22b559fc9fea848e0bb4f3741f8 new file mode 100644 index 0000000..95a3935 --- /dev/null +++ b/2025-02-06-152308-14522-1@ae3358295c1f_devel/output_ae3358295c1fa22b559fc9fea848e0bb4f3741f8 @@ -0,0 +1,1866 @@ +Checking libcafekbd/cafekbd-desktop-config.c ... +libcafekbd/cafekbd-desktop-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +1/10 files checked 4% done +Checking libcafekbd/cafekbd-indicator-config.c ... +libcafekbd/cafekbd-indicator-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +2/10 files checked 10% done +Checking libcafekbd/cafekbd-indicator.c ... +libcafekbd/cafekbd-indicator.c:66:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdIndicator, cafekbd_indicator, CTK_TYPE_NOTEBOOK) +^ +3/10 files checked 24% done +Checking libcafekbd/cafekbd-keyboard-config.c ... +libcafekbd/cafekbd-keyboard-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-config.c:67:8: style: Condition '*l1' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:67:15: style: Condition '*l2' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:227:16: style: Condition 'option!=NULL' is always true [knownConditionTrueFalse] + (option != NULL) ? strchr (option, ':') : NULL; + ^ +libcafekbd/cafekbd-keyboard-config.c:282:18: style: Condition 'variant==NULL' is always false [knownConditionTrueFalse] + (variant == + ^ +libcafekbd/cafekbd-keyboard-config.c:226:10: style: Variable 'delim' can be declared as pointer to const [constVariablePointer] + char *delim = + ^ +libcafekbd/cafekbd-keyboard-config.c:609:65: style: Parameter 'kbd_config' can be declared as pointer to const [constParameterPointer] +cafekbd_keyboard_config_options_is_set (CafekbdKeyboardConfig * kbd_config, + ^ +4/10 files checked 36% done +Checking libcafekbd/cafekbd-keyboard-drawing.c ... +libcafekbd/cafekbd-keyboard-drawing.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-drawing.c:61:60: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_coord (CafekbdKeyboardDrawingRenderContext * context, gint n) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:67:61: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_double (CafekbdKeyboardDrawingRenderContext * context, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:625:51: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +set_markup (CafekbdKeyboardDrawingRenderContext * context, gchar *txt) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1026:11: style: Variable 'runp' can be declared as pointer to const [constVariablePointer] + GSList *runp; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1036:25: style: Variable 'geometry' can be declared as pointer to const [constVariablePointer] + PangoGlyphGeometry *geometry; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1202:39: style: Parameter 'outline' can be declared as pointer to const [constParameterPointer] +calc_origin_offset_x (XkbOutlineRec * outline) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1397:15: style: Variable 'shape' can be declared as pointer to const [constVariablePointer] + XkbShapeRec *shape; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: style: Parameter 'drawing' can be declared as pointer to const. However it seems that 'button_press_event' is a callback function, if 'drawing' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2343:18: note: You might need to cast the function pointer here + G_CALLBACK (button_press_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: note: Parameter 'drawing' can be declared as pointer to const + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: style: Parameter 'event' can be declared as pointer to const. However it seems that 'focus_event' is a callback function, if 'event' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2347:18: note: You might need to cast the function pointer here + G_CALLBACK (focus_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: note: Parameter 'event' can be declared as pointer to const + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: style: Parameter 'a' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'a' is declared with const you might also need to cast function pointer(s). [constParameterCallback] +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: note: Parameter 'a' can be declared as pointer to const +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: style: Parameter 'b' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'b' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: note: Parameter 'b' can be declared as pointer to const + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1863:9: style: Variable 'pind' can be declared as pointer to const [constVariablePointer] + Atom *pind = drawing->xkb->names->indicators; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2124:60: style: Parameter 'iev' can be declared as pointer to const [constParameterPointer] +process_indicators_state_notify (XkbIndicatorNotifyEvent * iev, + ^ +Checking libcafekbd/cafekbd-keyboard-drawing.c: KBDRAW_DEBUG... +5/10 files checked 77% done +Checking libcafekbd/cafekbd-status.c ... +libcafekbd/cafekbd-status.c:82:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdStatus, cafekbd_status, CTK_TYPE_STATUS_ICON) +^ +6/10 files checked 91% done +Checking libcafekbd/cafekbd-util.c ... +7/10 files checked 93% done +Checking test/cafekbd-indicator-test.c ... +8/10 files checked 94% done +Checking test/cafekbd-keyboard-drawing-test.c ... +test/cafekbd-keyboard-drawing-test.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +Checking test/cafekbd-keyboard-drawing-test.c: HAVE_CONFIG_H... +9/10 files checked 99% done +Checking test/cafekbd-status-test.c ... +test/cafekbd-status-test.c:42:17: style: Variable 'icon' can be declared as pointer to const [constVariablePointer] + CtkStatusIcon *icon; + ^ +10/10 files checked 100% done +nofile:0:0: information: Active checkers: There was critical errors (use --checkers-report= to see details) [checkersReport] + +/usr/bin/cafe-autogen +checking for autoreconf >= 2.53... + testing autoreconf... found 2.72 +checking for pkg-config >= 0.14.0... + testing pkg-config... found 1.8.1 +checking for cafe-common >= 0.0.1... + testing cafe-doc-common... found 2.0.0 +Checking for required M4 macros... +Checking for forbidden M4 macros... +Processing ./configure.ac +Running cafe-doc-common... +Running autoreconf... +autoreconf: export WARNINGS=no-portability +autoreconf: Entering directory '.' +autoreconf: running: autopoint --force +Copying file ABOUT-NLS +Copying file config.rpath +Copying file m4/codeset.m4 +Copying file m4/extern-inline.m4 +Copying file m4/fcntl-o.m4 +Copying file m4/gettext.m4 +Copying file m4/glibc2.m4 +Copying file m4/glibc21.m4 +Copying file m4/iconv.m4 +Copying file m4/intdiv0.m4 +Copying file m4/intl.m4 +Copying file m4/intldir.m4 +Copying file m4/intlmacosx.m4 +Copying file m4/intmax.m4 +Copying file m4/inttypes-pri.m4 +Copying file m4/inttypes_h.m4 +Copying file m4/lcmessage.m4 +Copying file m4/lib-ld.m4 +Copying file m4/lib-link.m4 +Copying file m4/lib-prefix.m4 +Copying file m4/lock.m4 +Copying file m4/longlong.m4 +Copying file m4/nls.m4 +Copying file m4/po.m4 +Copying file m4/printf-posix.m4 +Copying file m4/progtest.m4 +Copying file m4/size_max.m4 +Copying file m4/stdint_h.m4 +Copying file m4/threadlib.m4 +Copying file m4/uintmax_t.m4 +Copying file m4/visibility.m4 +Copying file m4/wchar_t.m4 +Copying file m4/wint_t.m4 +Copying file m4/xsize.m4 +Copying file po/Makefile.in.in +Copying file po/Makevars.template +Copying file po/Rules-quot +Copying file po/boldquot.sed +Copying file po/en@boldquot.header +Copying file po/en@quot.header +Copying file po/insert-header.sin +Copying file po/quot.sed +Copying file po/remove-potcdate.sin +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: configure.ac: tracing +autoreconf: running: libtoolize --copy --force +libtoolize: putting auxiliary files in '.'. +libtoolize: copying file './ltmain.sh' +libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. +libtoolize: copying file 'm4/libtool.m4' +libtoolize: copying file 'm4/ltoptions.m4' +libtoolize: copying file 'm4/ltsugar.m4' +libtoolize: copying file 'm4/ltversion.m4' +libtoolize: copying file 'm4/lt~obsolete.m4' +autoreconf: configure.ac: not using Intltool +autoreconf: configure.ac: not using Gtkdoc +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: running: /usr/bin/autoconf --force +autoreconf: running: /usr/bin/autoheader --force +autoreconf: running: automake --add-missing --copy --force-missing +configure.ac:31: installing './compile' +configure.ac:34: installing './config.guess' +configure.ac:34: installing './config.sub' +configure.ac:16: installing './install-sh' +configure.ac:16: installing './missing' +Makefile.am: installing './INSTALL' +libcafekbd/Makefile.am: installing './depcomp' +autoreconf: Leaving directory '.' +Skipping configure process. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +checking for a BSD-compatible install... /usr/bin/install -c +checking whether sleep supports fractional seconds... yes +checking filesystem timestamp resolution... 0.01 +checking whether build environment is sane... yes +checking for a race-free mkdir -p... /usr/bin/mkdir -p +checking for gawk... no +checking for mawk... mawk +checking whether make sets $(MAKE)... yes +checking whether make supports nested variables... yes +checking xargs -n works... yes +checking whether make supports the include directive... yes (GNU style) +checking for gcc... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the C compiler works... yes +checking for C compiler default output file name... a.out +checking for suffix of executables... +checking whether we are cross compiling... no +checking for suffix of object files... o +checking whether the compiler supports GNU C... yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... rm: cannot remove 'conftest.plist': Is a directory +yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... gcc3 +checking whether C compiler accepts -Werror=unknown-warning-option... no +checking whether C compiler accepts -Wall... yes +checking whether C compiler accepts -Wmissing-prototypes... yes +checking whether C compiler accepts -Wbad-function-cast... yes +checking whether C compiler accepts -Wcast-align... yes +checking whether C compiler accepts -Wextra... yes +checking whether C compiler accepts -Wformat-nonliteral... yes +checking whether C compiler accepts -Wmissing-declarations... yes +checking whether C compiler accepts -Wnested-externs... yes +checking whether C compiler accepts -Wpointer-arith... yes +checking whether C compiler accepts -Wredundant-decls... yes +checking whether C compiler accepts -Wshadow... yes +checking whether C compiler accepts -Wstrict-prototypes... yes +checking whether C compiler accepts -Wunused-macros... yes +checking whether C compiler accepts -Werror=format-security... yes +checking whether C compiler accepts -fstrict-aliasing... yes +checking flags to pass to the C compiler /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing +checking for gcc... (cached) /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the compiler supports GNU C... (cached) yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... (cached) yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... (cached) none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... (cached) yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... (cached) gcc3 +checking build system type... x86_64-pc-linux-gnu +checking host system type... x86_64-pc-linux-gnu +checking how to print strings... printf +checking for a sed that does not truncate output... /usr/bin/sed +checking for grep that handles long lines and -e... /usr/bin/grep +checking for egrep... /usr/bin/grep -E +checking for fgrep... /usr/bin/grep -F +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld +checking if the linker (/usr/bin/ld) is GNU ld... yes +checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B +checking the name lister (/usr/bin/nm -B) interface... rm: cannot remove 'conftest.plist': Is a directory +BSD nm +checking whether ln -s works... yes +checking the maximum length of command line arguments... 3145728 +checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop +checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop +checking for /usr/bin/ld option to reload object files... -r +checking for file... file +checking for objdump... objdump +checking how to recognize dependent libraries... pass_all +checking for dlltool... no +checking how to associate runtime and link libraries... printf %s\n +checking for ranlib... ranlib +checking for ar... ar +checking for archiver @FILE support... rm: cannot remove 'conftest.plist': Is a directory +@ +checking for strip... strip +checking command to parse /usr/bin/nm -B output from /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer object... rm: cannot remove 'conftest.plist': Is a directory +ok +checking for sysroot... no +checking for a working dd... /usr/bin/dd +checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1 +checking for mt... no +checking if : is a manifest tool... no +checking for stdio.h... yes +checking for stdlib.h... yes +checking for string.h... yes +checking for inttypes.h... yes +checking for stdint.h... yes +checking for strings.h... yes +checking for sys/stat.h... yes +checking for sys/types.h... yes +checking for unistd.h... yes +checking for dlfcn.h... yes +checking for objdir... .libs +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -fno-rtti -fno-exceptions... no +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to produce PIC... -fPIC -DPIC +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer PIC flag -fPIC -DPIC works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer static flag -static works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... (cached) yes +checking whether the /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes +checking whether -lc should be explicitly linked in... no +checking dynamic linker characteristics... GNU/Linux ld.so +checking how to hardcode library paths into programs... immediate +checking whether stripping libraries is possible... yes +checking if libtool supports shared libraries... yes +checking whether to build shared libraries... yes +checking whether to build static libraries... yes +checking whether NLS is requested... yes +checking for msgfmt... /usr/bin/msgfmt +checking for gmsgfmt... /usr/bin/msgfmt +checking for xgettext... /usr/bin/xgettext +checking for msgmerge... /usr/bin/msgmerge +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld -m elf_x86_64 +checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes +checking for shared library run path origin... done +checking how to run the C preprocessor... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer -E +checking for egrep -e... (cached) /usr/bin/grep -E +checking for CFPreferencesCopyAppValue... no +checking for CFLocaleCopyCurrent... no +checking for GNU gettext in libc... yes +checking whether to use NLS... yes +checking where the gettext function comes from... libc +checking for glib-compile-resources... /usr/bin/glib-compile-resources +checking for xmllint... /usr/bin/xmllint +checking for setlocale... yes +checking for pkg-config... /usr/bin/pkg-config +checking pkg-config is at least version 0.9.0... yes +checking for glib-2.0 >= 2.50.0... yes +checking for gmodule-2.0... yes +checking for gio-2.0 >= 2.25.0... yes +checking for cdk-3.0 >= 3.22.0... yes +checking for ctk+-3.0 >= 3.22.0 cdk-x11-3.0 >= 3.22.0... yes +checking for libxklavier >= 5.2... yes +checking for X... libraries , headers +checking for gethostbyname... yes +checking for connect... yes +checking for remove... yes +checking for shmat... yes +checking for IceConnectionNumber in -lICE... yes +checking for pkg-config... (cached) /usr/bin/pkg-config +checking pkg-config is at least version 0.16... yes +checking for library containing sqrt... -lm +checking for gobject-introspection... yes +checking that generated files are newer than configure... done +configure: creating ./config.status +config.status: creating Makefile +config.status: creating libcafekbd.pc +config.status: creating libcafekbdui.pc +config.status: creating po/Makefile.in +config.status: creating libcafekbd/Makefile +config.status: creating libcafekbd/org.cafe.peripherals-keyboard-xkb.gschema.xml +config.status: creating test/Makefile +config.status: creating config.h +config.status: executing depfiles commands +config.status: executing libtool commands +config.status: executing po-directories commands +config.status: creating po/POTFILES +config.status: creating po/Makefile + +Configuration: + + prefix: /usr + exec_prefix: ${prefix} + libdir: ${exec_prefix}/lib + bindir: ${exec_prefix}/bin + sbindir: ${exec_prefix}/sbin + sysconfdir: ${prefix}/etc + datadir: ${datarootdir} + source code location: . + compiler: /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer + cflags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + Warning flags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + +scan-build: Analysis run complete. +scan-build: Removing directory '/tmp/scan-build-2025-02-06-152258-11857-1' because it contains no reports. +scan-build: No bugs found. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +make all-recursive +make[1]: Entering directory '/rootdir' +Making all in po +make[2]: Entering directory '/rootdir/po' +make libcafekbd.pot-update +make[3]: Entering directory '/rootdir/po' +sed -e '/^#/d' remove-potcdate.sin > t-remove-potcdate.sed +mv t-remove-potcdate.sed remove-potcdate.sed +package_gnu=""; \ +test -n "$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L .. -maxdepth 1 -type f \ + -size -10000000c -exec grep 'GNU libcafekbd' \ + /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU libcafekbd' ../* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ +}; \ +if test "$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ +else \ + package_prefix=''; \ +fi; \ +if test -n '' || test 'https://github.com/cafe-desktop/libcafekbd' = '@'PACKAGE_BUGREPORT'@'; then \ + msgid_bugs_address=''; \ +else \ + msgid_bugs_address='https://github.com/cafe-desktop/libcafekbd'; \ +fi; \ +case `/usr/bin/xgettext --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ + *) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --package-name="${package_prefix}libcafekbd" \ + --package-version='1.25.0' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ +esac +test ! -f libcafekbd.po || { \ + if test -f ./libcafekbd.pot-header; then \ + sed -e '1,/^#$/d' < libcafekbd.po > libcafekbd.1po && \ + cat ./libcafekbd.pot-header libcafekbd.1po > libcafekbd.po; \ + rm -f libcafekbd.1po; \ + fi; \ + if test -f ./libcafekbd.pot; then \ + sed -f remove-potcdate.sed < ./libcafekbd.pot > libcafekbd.1po && \ + sed -f remove-potcdate.sed < libcafekbd.po > libcafekbd.2po && \ + if cmp libcafekbd.1po libcafekbd.2po >/dev/null 2>&1; then \ + rm -f libcafekbd.1po libcafekbd.2po libcafekbd.po; \ + else \ + rm -f libcafekbd.1po libcafekbd.2po ./libcafekbd.pot && \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ + else \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ +} +make[3]: Leaving directory '/rootdir/po' +test ! -f ./libcafekbd.pot || \ + test -z "af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo" || make af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo +make[3]: Entering directory '/rootdir/po' +/usr/bin/msgmerge --update --quiet --lang=af af.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=an an.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=am am.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=as as.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ar ar.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=az az.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ast ast.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=be be.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn bn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bg bg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn_IN bn_IN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca ca.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bs bs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=br br.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca@valencia ca@valencia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cmn cmn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=crh crh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cs cs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=csb csb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cv cv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cy cy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de de.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=da da.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de_CH de_CH.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=dz dz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=el el.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_AU en_AU.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_CA en_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_GB en_GB.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eo eo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es es.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_419 es_419.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_AR es_AR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CL es_CL.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CO es_CO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CR es_CR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_DO es_DO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_EC es_EC.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_ES es_ES.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_MX es_MX.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_NI es_NI.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PA es_PA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PE es_PE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PR es_PR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_SV es_SV.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_US es_US.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_UY es_UY.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_VE es_VE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eu eu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=et et.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fa fa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fi fi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fil fil.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fo fo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr fr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr_CA fr_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=frp frp.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fy fy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fur fur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ga ga.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gd gd.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gl gl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gu gu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ha ha.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=he he.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hi hi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hy hy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hr hr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hu hu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ia ia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=id id.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ie ie.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ig ig.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=is is.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=it it.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ka ka.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=jv jv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ja ja.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kk kk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kab kab.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=km km.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kn kn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ko ko.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ks ks.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku ku.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku_IQ ku_IQ.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ky ky.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=la la.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lb lb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=li li.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lo lo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lt lt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lv lv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mai mai.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mg mg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mi mi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mk mk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mn mn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ml ml.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ms ms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mr mr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=my my.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nah nah.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nb nb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ne ne.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nds nds.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nl nl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nqo nqo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nso nso.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=oc oc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nn nn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=om om.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=or or.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pa pa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pl pl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pms pms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt_BR pt_BR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ps ps.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt pt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ro ro.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ru ru.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=rw rw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sc sc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sco sco.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=si si.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sk sk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sl sl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=so so.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sq sq.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr sr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sv sv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr@latin sr@latin.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sw sw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ta ta.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=te te.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tg tg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=th th.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tl tl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tk tk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tr tr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ts ts.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tt tt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ug ug.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur ur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uk uk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uz uz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=vi vi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur_PK ur_PK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=wa wa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=xh xh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yi yi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yo yo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_CN zh_CN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_HK zh_HK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_TW zh_TW.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zu zu.po libcafekbd.pot +rm -f af.gmo && /usr/bin/msgfmt -c --statistics --verbose -o af.gmo af.po +rm -f am.gmo && /usr/bin/msgfmt -c --statistics --verbose -o am.gmo am.po +rm -f an.gmo && /usr/bin/msgfmt -c --statistics --verbose -o an.gmo an.po +rm -f ar.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ar.gmo ar.po +am.po: 54 translated messages, 37 untranslated messages. +ar.po: 50 translated messages, 41 untranslated messages. +an.po:7: warning: header field 'Last-Translator' still has the initial default value +an.po: 0 translated messages, 91 untranslated messages. +af.po: 7 translated messages, 84 untranslated messages. +rm -f as.gmo && /usr/bin/msgfmt -c --statistics --verbose -o as.gmo as.po +rm -f az.gmo && /usr/bin/msgfmt -c --statistics --verbose -o az.gmo az.po +rm -f ast.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ast.gmo ast.po +rm -f be.gmo && /usr/bin/msgfmt -c --statistics --verbose -o be.gmo be.po +az.po: 9 translated messages, 82 untranslated messages. +rm -f bg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bg.gmo bg.po +as.po: 41 translated messages, 50 untranslated messages. +ast.po: 47 translated messages, 44 untranslated messages. +be.po: 46 translated messages, 45 untranslated messages. +rm -f bn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn.gmo bn.po +rm -f bn_IN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn_IN.gmo bn_IN.po +bg.po: 54 translated messages, 37 untranslated messages. +rm -f br.gmo && /usr/bin/msgfmt -c --statistics --verbose -o br.gmo br.po +rm -f bs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bs.gmo bs.po +bn.po: 43 translated messages, 48 untranslated messages. +bn_IN.po: 41 translated messages, 50 untranslated messages. +br.po: 20 translated messages, 71 untranslated messages. +rm -f ca.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca.gmo ca.po +bs.po: 25 translated messagesrm -f ca@valencia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca@valencia.gmo ca@valencia.po +, 66 untranslated messages. +rm -f cmn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cmn.gmo cmn.po +rm -f crh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o crh.gmo crh.po +ca.po: 87 translated messages, 4 untranslated messages. +ca@valencia.po: 54 translated messages, 37 untranslated messages. +crh.po: 11 translated messages, 80 untranslated messages. +cmn.po: 46 translated messages, 45 untranslated messages. +rm -f cs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cs.gmo cs.po +rm -f cv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cv.gmo cv.po +rm -f cy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cy.gmo cy.po +rm -f csb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o csb.gmo csb.po +rm -f da.gmo && /usr/bin/msgfmt -c --statistics --verbose -o da.gmo da.po +cs.po: 81 translated messages, 10 untranslated messages. +cv.po: 0 translated messages, 91 untranslated messages. +cy.po: 26 translated messages, 65 untranslated messages. +da.po: 91 translated messages. +csb.po:7: warning: header field 'Last-Translator' still has the initial default value +csb.po: 0 translated messages, 91 untranslated messages. +rm -f de.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de.gmo de.po +rm -f de_CH.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de_CH.gmo de_CH.po +rm -f dz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o dz.gmo dz.po +rm -f el.gmo && /usr/bin/msgfmt -c --statistics --verbose -o el.gmo el.po +de_CH.po: 0 translated messages, 91 untranslated messages. +de.po: 76 translated messages, 15 untranslated messages. +rm -f en_AU.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_AU.gmo en_AU.po +dz.po: 39 translated messages, 52 untranslated messages. +el.po: 54 translated messages, 37 untranslated messages. +rm -f en_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_CA.gmo en_CA.po +rm -f en_GB.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_GB.gmo en_GB.po +rm -f eo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eo.gmo eo.po +en_AU.po: 54 translated messages, 37 untranslated messages. +rm -f es.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es.gmo es.po +en_GB.po: 54 translated messages, 37 untranslated messages. +en_CA.po: 10 translated messages, 81 untranslated messages. +eo.po: 52 translated messages, 39 untranslated messages. +rm -f es_419.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_419.gmo es_419.po +es.po: 89 translated messages, 2 untranslated messages. +rm -f es_CO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CO.gmo es_CO.po +rm -f es_AR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_AR.gmo es_AR.po +rm -f es_CL.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CL.gmo es_CL.po +es_419.po: 0 translated messages, 91 untranslated messages. +rm -f es_CR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CR.gmo es_CR.po +es_CL.po: 3 translated messages, 88 untranslated messages. +es_CO.po: 49 translated messages, 42 untranslated messages. +rm -f es_DO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_DO.gmo es_DO.po +es_AR.po: 21 translated messages, 70 untranslated messages. +es_DO.po: 1 translated message, 90 untranslated messages. +es_CR.po: 1 translated message, 90 untranslated messages. +rm -f es_ES.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_ES.gmo es_ES.po +rm -f es_EC.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_EC.gmo es_EC.po +rm -f es_MX.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_MX.gmo es_MX.po +rm -f es_PA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PA.gmo es_PA.po +rm -f es_NI.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_NI.gmo es_NI.po +es_ES.po: es_EC.po: 1 translated message, 90 untranslated messages. +1 translated message, 90 untranslated messages. +es_MX.po: 1 translated message, 90 untranslated messages. +es_PA.po: 1 translated message, 90 untranslated messages. +es_NI.po: 1 translated message, 90 untranslated messages. +rm -f es_PE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PE.gmo es_PE.po +rm -f es_SV.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_SV.gmo es_SV.po +rm -f es_PR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PR.gmo es_PR.po +rm -f es_US.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_US.gmo es_US.po +es_PE.po: 1 translated message, 90 untranslated messages. +rm -f es_UY.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_UY.gmo es_UY.po +es_PR.po: 1 translated message, 90 untranslated messages. +es_SV.po: 1 translated message, 90 untranslated messages. +rm -f es_VE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_VE.gmo es_VE.po +es_UY.po: 1 translated message, 90 untranslated messages. +es_US.po: 0 translated messages, 91 untranslated messages. +rm -f et.gmo && /usr/bin/msgfmt -c --statistics --verbose -o et.gmo et.po +rm -f eu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eu.gmo eu.po +es_VE.po: 1 translated message, 90 untranslated messages. +rm -f fa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fa.gmo fa.po +et.po: 54 translated messages, 37 untranslated messages. +rm -f fi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fi.gmo fi.po +eu.po: 54 translated messages, 37 untranslated messages. +rm -f fil.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fil.gmo fil.po +fa.po: 11 translated messages, 80 untranslated messages. +rm -f fr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr.gmo fr.po +fi.po: 48 translated messages, 43 untranslated messages. +rm -f fo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fo.gmo fo.po +rm -f fr_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr_CA.gmo fr_CA.po +fil.po: 0 translated messages, 91 untranslated messages. +fr.po: 67 translated messages, 24 untranslated messages. +rm -f frp.gmo && /usr/bin/msgfmt -c --statistics --verbose -o frp.gmo frp.po +fo.po: 0 translated messages, 91 untranslated messages. +fr_CA.po: 3 translated messages, 88 untranslated messages. +rm -f fy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fy.gmo fy.po +frp.po: 7 translated messages, 84 untranslated messages. +rm -f fur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fur.gmo fur.po +rm -f ga.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ga.gmo ga.po +rm -f gd.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gd.gmo gd.po +fy.po: 4 translated messages, 87 untranslated messages. +fur.po: 4 translated messages, 87 untranslated messages. +rm -f gl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gl.gmo gl.po +ga.po: 41 translated messages, 50 untranslated messages. +gd.po: 0 translated messages, 91 untranslated messages. +rm -f gu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gu.gmo gu.po +rm -f ha.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ha.gmo ha.po +gl.po: 89 translated messages, 2 untranslated messages. +rm -f he.gmo && /usr/bin/msgfmt -c --statistics --verbose -o he.gmo he.po +rm -f hi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hi.gmo hi.po +gu.po: 43 translated messages, 48 untranslated messagesrm -f hr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hr.gmo hr.po +. +ha.po: 5 translated messages, 86 untranslated messages. +hi.po: 45 translated messages, 46 untranslated messages. +he.po: 54 translated messages, 37 untranslated messages. +rm -f ia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ia.gmo ia.po +hr.po: 54 translated messages, 37 untranslated messages. +rm -f hu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hu.gmo hu.po +rm -f id.gmo && /usr/bin/msgfmt -c --statistics --verbose -o id.gmo id.po +rm -f hy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hy.gmo hy.po +ia.po: 3 translated messages, 88 untranslated messages. +hu.po: 54 translated messages, 37 untranslated messages. +id.po: 91 translated messages. +rm -f ie.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ie.gmo ie.po +hy.po: 54 translated messages, 37 untranslated messages. +rm -f ig.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ig.gmo ig.po +rm -f it.gmo && /usr/bin/msgfmt -c --statistics --verbose -o it.gmo it.po +rm -f is.gmo && /usr/bin/msgfmt -c --statistics --verbose -o is.gmo is.po +ie.po: 45 translated messages, 46 untranslated messages. +rm -f ja.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ja.gmo ja.po +ig.po: 5 translated messages, 86 untranslated messages. +is.po: 12 translated messages, 79 untranslated messagesrm -f jv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o jv.gmo jv.po +. +it.po: 91 translated messages. +rm -f ka.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ka.gmo ka.po +ja.po: 54 translated messages, 37 untranslated messages. +jv.po: 2 translated messages, 89 untranslated messages. +rm -f kab.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kab.gmo kab.po +rm -f kk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kk.gmo kk.po +ka.po: rm -f km.gmo && /usr/bin/msgfmt -c --statistics --verbose -o km.gmo km.po +37 translated messages, 54 untranslated messages. +kab.po: 4 translated messages, 87 untranslated messages. +rm -f kn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kn.gmo kn.po +kk.po: 24 translated messages, 67 untranslated messages. +rm -f ks.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ks.gmo ks.po +km.po:7: warning: header field 'Last-Translator' still has the initial default value +rm -f ko.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ko.gmo ko.po +km.po: 0 translated messages, 91 untranslated messages. +kn.po: 43 translated messages, 48 untranslated messages. +rm -f ku.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku.gmo ku.po +ks.po: 3 translated messages, 88 untranslated messages. +rm -f ku_IQ.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku_IQ.gmo ku_IQ.po +ku.po: 10 translated messages, 81 untranslated messages. +ko.po: 54 translated messages, 37 untranslated messages. +rm -f ky.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ky.gmo ky.po +rm -f la.gmo && /usr/bin/msgfmt -c --statistics --verbose -o la.gmo la.po +ku_IQ.po: 16 translated messages, 75 untranslated messages. +ky.po: 26 translated messages, 65 untranslated messages. +la.po: 2 translated messages, 89 untranslated messages. +rm -f lb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lb.gmo lb.po +rm -f li.gmo && /usr/bin/msgfmt -c --statistics --verbose -o li.gmo li.po +rm -f lt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lt.gmo lt.po +rm -f lo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lo.gmo lo.po +lb.po:7: warning: header field 'Last-Translator' still has the initial default value +lb.po: 0 translated messages, 91 untranslated messages. +rm -f lv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lv.gmo lv.po +li.po:7: warning: header field 'Last-Translator' still has the initial default value +li.po: 0 translated messages, 91 untranslated messages. +lt.po: 91 translated messages. +lo.po:7: warning: header field 'Last-Translator' still has the initial default value +lo.po: rm -f mai.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mai.gmo mai.po +0 translated messages, 91 untranslated messages. +rm -f mg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mg.gmo mg.po +lv.po: 49 translated messages, 42 untranslated messages. +rm -f mi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mi.gmo mi.po +rm -f mk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mk.gmo mk.po +mai.po: 18 translated messages, 73 untranslated messages. +mg.po: 10 translated messages, 81 untranslated messages. +mi.po:7: warning: header field 'Last-Translator' still has the initial default value +mi.po: 0 translated messages, 91 untranslated messages. +mk.po: 39 translated messages, 52 untranslated messages. +rm -f ml.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ml.gmo ml.po +rm -f mn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mn.gmo mn.po +rm -f mr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mr.gmo mr.po +rm -f ms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ms.gmo ms.po +rm -f my.gmo && /usr/bin/msgfmt -c --statistics --verbose -o my.gmo my.po +ml.po: 41 translated messages, 50 untranslated messages. +mn.po: 10 translated messages, 81 untranslated messages. +my.po:7: warning: ms.po: header field 'Last-Translator' still has the initial default value +91 translated messages. +my.po: 0 translated messages, 91 untranslated messages. +rm -f nah.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nah.gmo nah.po +mr.po: 47 translated messages, 44 untranslated messages. +rm -f nb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nb.gmo nb.po +rm -f nds.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nds.gmo nds.po +rm -f ne.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ne.gmo ne.po +nah.po: 0 translated messages, 91 untranslated messages. +rm -f nl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nl.gmo nl.po +nb.po: 91 translated messages. +ne.po: 13 translated messages, 78 untranslated messages. +nds.po: 12 translated messages, 79 untranslated messages. +rm -f nn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nn.gmo nn.po +rm -f nso.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nso.gmo nso.po +nl.po: 91 translated messages. +rm -f nqo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nqo.gmo nqo.po +nn.po: 40 translated messages, 51 untranslated messages. +rm -f om.gmo && /usr/bin/msgfmt -c --statistics --verbose -o om.gmo om.po +rm -f oc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o oc.gmo oc.po +nso.po: 3 translated messages, 88 untranslated messages. +nqo.po: 0 translated messages, 91 untranslated messages. +rm -f or.gmo && /usr/bin/msgfmt -c --statistics --verbose -o or.gmo or.po +om.po: 0 translated messages, 91 untranslated messages. +oc.po: 68 translated messages, 23 untranslated messages. +rm -f pa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pa.gmo pa.po +or.po: 41 translated messages, 50 untranslated messages. +rm -f pl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pl.gmo pl.po +rm -f pms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pms.gmo pms.po +rm -f ps.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ps.gmo ps.po +pa.po: 46 translated messages, 45 untranslated messages. +rm -f pt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt.gmo pt.po +ps.po: 6 translated messages, 85 untranslated messages. +pms.po: 3 translated messages, 88 untranslated messages. +pl.po: 55 translated messages, 36 untranslated messages. +rm -f ro.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ro.gmo ro.po +rm -f pt_BR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt_BR.gmo pt_BR.po +rm -f ru.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ru.gmo ru.po +rm -f rw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o rw.gmo rw.po +pt.po: 84 translated messages, 7 untranslated messages. +pt_BR.po: 58 translated messages, 33 untranslated messages. +ro.po: 54 translated messages, 37 untranslated messages. +ru.po: 89 translated messages, 2 untranslated messages. +rm -f sc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sc.gmo sc.po +rm -f sco.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sco.gmo sco.po +rm -f si.gmo && /usr/bin/msgfmt -c --statistics --verbose -o si.gmo si.po +rw.po: 10 translated messages, 81 untranslated messages. +rm -f sk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sk.gmo sk.po +sc.po: 2 translated messages, 89 untranslated messages. +sco.po: 0 translated messages, 91 untranslated messages. +rm -f sl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sl.gmo sl.po +si.po: 36 translated messages, 55 untranslated messages. +rm -f so.gmo && /usr/bin/msgfmt -c --statistics --verbose -o so.gmo so.po +sk.po: 54 translated messages, 37 untranslated messages. +rm -f sq.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sq.gmo sq.po +rm -f sr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr.gmo sr.po +sl.po: 55 translated messages, 36 untranslated messages. +sq.po: 52 translated messages, 39 untranslated messages. +rm -f sr@latin.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr@latin.gmo sr@latin.po +so.po: 0 translated messages, 91 untranslated messages. +rm -f sv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sv.gmo sv.po +sr.po: 91 translated messages. +rm -f sw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sw.gmo sw.po +rm -f ta.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ta.gmo ta.po +sv.po: 80 translated messages, 11 untranslated messages. +sr@latin.po: 46 translated messages, 45 untranslated messages. +rm -f te.gmo && /usr/bin/msgfmt -c --statistics --verbose -o te.gmo te.po +rm -f tg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tg.gmo tg.po +ta.po: 46 translated messages, 45 untranslated messages. +sw.po: 0 translated messages, 91 untranslated messages. +rm -f th.gmo && /usr/bin/msgfmt -c --statistics --verbose -o th.gmo th.po +te.po: 41 translated messages, 50 untranslated messages. +rm -f tk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tk.gmo tk.po +tg.po: 0 translated messages, 91 untranslated messages. +rm -f tl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tl.gmo tl.po +th.po: 45 translated messages, 46 untranslated messages. +rm -f tr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tr.gmo tr.po +tk.po: 7 translated messages, 84 untranslated messages. +rm -f ts.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ts.gmo ts.po +rm -f tt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tt.gmo tt.po +tl.po: 0 translated messages, 91 untranslated messages. +rm -f ug.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ug.gmo ug.po +tr.po: 58 translated messages, 33 untranslated messages. +ts.po: 0 translated messages, 91 untranslated messages. +tt.po:7: warning: header field 'Last-Translator' still has the initial default value +rm -f ur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur.gmo ur.po +tt.po: 0 translated messages, 91 untranslated messages. +ug.po: 6 translated messages, 85 untranslated messages. +rm -f uk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uk.gmo uk.po +rm -f ur_PK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur_PK.gmo ur_PK.po +ur.po: rm -f vi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o vi.gmo vi.po +7 translated messages, 84 untranslated messages. +rm -f uz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uz.gmo uz.po +uk.po: 58 translated messages, 33 untranslated messages. +ur_PK.po:7: warning: header field 'Last-Translator' still has the initial default value +ur_PK.po: 0 translated messages, 91 untranslated messages. +vi.po: 52 translated messages, 39 untranslated messages. +rm -f wa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o wa.gmo wa.po +rm -f xh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o xh.gmo xh.po +rm -f yi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yi.gmo yi.po +uz.po: 26 translated messages, 65 untranslated messages. +rm -f yo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yo.gmo yo.po +wa.po: 9 translated messages, 82 untranslated messages. +xh.po: 8 translated messages, 83 untranslated messages. +rm -f zh_CN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_CN.gmo zh_CN.po +yi.po:7: warning: header field 'Last-Translator' still has the initial default value +yi.po: 0 translated messages, 91 untranslated messages. +yo.po: 5 translated messages, 86 untranslated messages. +zh_CN.po: 63 translated messages, 28 untranslated messages. +rm -f zh_HK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_HK.gmo zh_HK.po +rm -f zh_TW.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_TW.gmo zh_TW.po +rm -f zu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zu.gmo zu.po +zh_HK.po: 47 translated messages, 44 untranslated messages. +zu.po: 3 translated messages, 88 untranslated messages. +zh_TW.po: 91 translated messages. +make[3]: Leaving directory '/rootdir/po' +touch stamp-po +make[2]: Leaving directory '/rootdir/po' +Making all in libcafekbd +make[2]: Entering directory '/rootdir/libcafekbd' + GEN cafekbd-indicator-marshal.h +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml + GEN cafekbd-keyboard-drawing-marshal.h +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... +INFO: Reading ./cafekbd-indicator-marshal.list... + GEN cafekbd-keyboard-drawing-marshal.c + GEN cafekbd-indicator-marshal.c +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... +INFO: Reading ./cafekbd-indicator-marshal.list... +make all-am +make[3]: Entering directory '/rootdir/libcafekbd' + CC libcafekbd_la-cafekbd-desktop-config.lo + CC libcafekbd_la-cafekbd-keyboard-config.lo + CC libcafekbd_la-cafekbd-util.lo + CC libcafekbdui_la-cafekbd-indicator.lo + CC libcafekbdui_la-cafekbd-indicator-config.lo +cafekbd-desktop-config.c: In function 'cafekbd_desktop_config_load_from_gsettings': +cafekbd-desktop-config.c:176:38: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 176 | || config->default_group >= + | ^~ +cafekbd-indicator.c: In function 'cafekbd_indicator_extract_layout_name': +cafekbd-indicator.c:293:19: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 293 | if (group < g_strv_length (short_group_names)) { + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_prepare_drawing': +cafekbd-indicator.c:418:31: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 418 | if (group + 1 == + | ^~ +cafekbd-indicator.c: In function 'cafekbd_indicator_update_tooltips': +cafekbd-indicator.c:446:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 446 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-indicator.c:450:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 450 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-indicator.c: In function 'cafekbd_indicator_kbd_cfg_callback': +cafekbd-indicator.c:61:44: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 61 | CafekbdIndicator * gki = (CafekbdIndicator*)cur->data; + | ^~~ +cafekbd-indicator.c:561:9: note: in expansion of macro 'ForAllIndicators' + 561 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-indicator.c:539:55: note: shadowed declaration is here + 539 | cafekbd_indicator_kbd_cfg_callback (CafekbdIndicator *gki G_GNUC_UNUSED) +cafekbd-indicator.c: In function 'cafekbd_indicator_start_listen': +cafekbd-indicator.c:647:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 647 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:650:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 650 | (CdkFilterFunc) + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_stop_listen': +cafekbd-indicator.c:663:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 663 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:667:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 667 | (CdkFilterFunc) cafekbd_indicator_filter_x_evt, NULL); + | ^ +cafekbd-indicator-config.c: In function 'cafekbd_indicator_config_get_images_file': +cafekbd-indicator-config.c:152:59: warning: comparison of integer expressions of different signedness: 'guint' {aka 'unsigned int'} and 'int' [-Wsign-compare] + 152 | (g_strv_length (kbd_config->layouts_variants) > group)) { + | ^ + CC libcafekbdui_la-cafekbd-status.lo +cafekbd-status.c: In function 'cafekbd_status_render_cairo': +cafekbd-status.c:214:23: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 214 | if (group + 1 == xkl_engine_get_num_groups (globals.engine)) { + | ^~ +cafekbd-status.c: In function 'cafekbd_status_prepare_drawing': +cafekbd-status.c:376:51: warning: cast between incompatible function types from 'void (*)(void *)' to 'void (*)(guchar *, void *)' {aka 'void (*)(unsigned char *, void *)'} [-Wcast-function-type] + 376 | (GdkPixbufDestroyNotify) + | ^ +cafekbd-status.c: In function 'cafekbd_status_update_tooltips': +cafekbd-status.c:395:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 395 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-status.c:399:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 399 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-status.c: In function 'cafekbd_status_kbd_cfg_callback': +cafekbd-status.c:77:41: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 77 | CafekbdStatus * gki = (CafekbdStatus*)cur->data; + | ^~~ +cafekbd-status.c:508:9: note: in expansion of macro 'ForAllIndicators' + 508 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-status.c:484:49: note: shadowed declaration is here + 484 | cafekbd_status_kbd_cfg_callback (CafekbdStatus *gki G_GNUC_UNUSED) +cafekbd-status.c: In function 'cafekbd_status_start_listen': +cafekbd-status.c:594:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 594 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:597:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 597 | (CdkFilterFunc) cafekbd_status_filter_x_evt, + | ^ +cafekbd-status.c: In function 'cafekbd_status_stop_listen': +cafekbd-status.c:610:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 610 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:614:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 614 | (CdkFilterFunc) cafekbd_status_filter_x_evt, NULL); + | ^ + CC libcafekbdui_la-cafekbd-indicator-marshal.lo +cafekbd-indicator-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ + CC libcafekbdui_la-cafekbd-keyboard-drawing-marshal.lo +cafekbd-keyboard-drawing-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + CC libcafekbdui_la-cafekbd-keyboard-drawing.lo +cafekbd-keyboard-drawing.c: In function 'draw_polygon': +cafekbd-keyboard-drawing.c:322:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 322 | for (i = 0; i < num_points; i++) { + | ^ +cafekbd-keyboard-drawing.c: In function 'process_indicators_state_notify': +cafekbd-keyboard-drawing.c:2131:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'long unsigned int' [-Wsign-compare] + 2131 | for (i = 0; i <= drawing->xkb->indicators->phys_indicators; i++) + | ^~ +cafekbd-keyboard-drawing.c: In function 'cafekbd_keyboard_drawing_get_type': +cafekbd-keyboard-drawing.c:2394:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawingClass *)' {aka 'void (*)(struct _CafekbdKeyboardDrawingClass *)'} to 'void (*)(void *, void *)' [-Wcast-function-type] + 2394 | (GClassInitFunc) cafekbd_keyboard_drawing_class_init, + | ^ +cafekbd-keyboard-drawing.c:2399:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawing *)' {aka 'void (*)(struct _CafekbdKeyboardDrawing *)'} to 'void (*)(GTypeInstance *, void *)' {aka 'void (*)(struct _GTypeInstance *, void *)'} [-Wcast-function-type] + 2399 | (GInstanceInitFunc) cafekbd_keyboard_drawing_init, + | ^ + GEN org.cafe.peripherals-keyboard-xkb.gschema.valid + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:114:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 114 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbd.la + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspectklhm67d4/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectklhm67d4/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectklhm67d4/Cafekbd-1.0.c:239:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 239 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspectklhm67d4/Cafekbd-1.0.c:246:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 246 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspectklhm67d4/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +5 warnings generated. + GICOMP Cafekbd-1.0.gir +make[3]: Leaving directory '/rootdir/libcafekbd' +make[2]: Leaving directory '/rootdir/libcafekbd' +Making all in test +make[2]: Entering directory '/rootdir/test' + CC cafekbd_indicator_test-cafekbd-indicator-test.o + CC cafekbd_keyboard_drawing_test-cafekbd-keyboard-drawing-test.o + CC cafekbd_status_test-cafekbd-status-test.o +cafekbd-keyboard-drawing-test.c:187:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 187 | g_print ("kbdraw %s\n", VERSION); + | ^~~~~~~ +cafekbd-keyboard-drawing-test.c:194:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 194 | g_printerr ("--groups: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:199:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 199 | g_printerr ("--levels: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:225:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 225 | cafekbd_keyboard_drawing_set_track_modifiers + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:228:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 228 | cafekbd_keyboard_drawing_set_track_config + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:248:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 248 | names.keycodes = keycodes; + | ^~~~~~~~ +cafekbd-keyboard-drawing-test.c:256:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 256 | names.geometry = geometry; + | ^~~~~~~~ +7 warnings generated. + CCLD cafekbd-keyboard-drawing-test + CCLD cafekbd-indicator-test + CCLD cafekbd-status-test +make[2]: Leaving directory '/rootdir/test' +make[2]: Entering directory '/rootdir' +make[2]: Leaving directory '/rootdir' +make[1]: Leaving directory '/rootdir' +scan-build: Analysis run complete. +scan-build: 11 bugs found. +scan-build: Run 'scan-view /rootdir/html-report/2025-02-06-152308-14522-1' to examine bug reports. +Making check in po +make[1]: Entering directory '/rootdir/po' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/po' +Making check in libcafekbd +make[1]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +make check-am +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:113:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 113 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspect_n2l_bo6/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspect_n2l_bo6/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspect_n2l_bo6/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +3 warnings generated. + GICOMP Cafekbd-1.0.gir +make[2]: Leaving directory '/rootdir/libcafekbd' +make[1]: Leaving directory '/rootdir/libcafekbd' +Making check in test +make[1]: Entering directory '/rootdir/test' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/test' +make[1]: Entering directory '/rootdir' +make[1]: Leaving directory '/rootdir' + Listing... 0% Listing... 0% Listing... 0% adduser/testing,now 3.137 all [installed,automatic] +advaita-icon-theme/unknown,now 3.25.0-1 all [installed,automatic] +apt/testing,now 2.9.26 amd64 [installed,automatic] +aptitude-common/testing,now 0.8.13-6.1 all [installed,automatic] +aptitude/testing,now 0.8.13-6.1 amd64 [installed] +at-spi2-common/testing,now 2.55.0.1-1 all [installed,automatic] +at-spi2-core/testing,now 2.55.0.1-1 amd64 [installed,automatic] +autoconf-archive/testing,now 20220903-3 all [installed] +autoconf/testing,now 2.72-3 all [installed,automatic] +automake/testing,now 1:1.17-3 all [installed,automatic] +autopoint/testing,now 0.23.1-1 all [installed] +autotools-dev/testing,now 20220109.1 all [installed,automatic] +base-files/testing,now 13.6 amd64 [installed,automatic] +base-passwd/testing,now 3.6.6 amd64 [installed,automatic] +bash/testing,now 5.2.37-1 amd64 [installed,automatic] +binfmt-support/testing,now 2.2.2-7 amd64 [installed,automatic] +binutils-common/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils-gold-x86-64-linux-gnu/testing,now 2.44-1 amd64 [installed,automatic] +binutils-gold/testing,now 2.44-1 amd64 [installed,automatic] +binutils-x86-64-linux-gnu/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +bsdutils/testing,now 1:2.40.4-2 amd64 [installed,automatic] +build-essential/testing,now 12.12 amd64 [installed,automatic] +bzip2-doc/testing,now 1.0.8-6 all [installed,automatic] +bzip2/testing,now 1.0.8-6 amd64 [installed,automatic] +ca-certificates/testing,now 20241223 all [installed,automatic] +clang-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools/testing,now 1:19.0-63 amd64 [installed] +clang/testing,now 1:19.0-63 amd64 [installed] +coreutils/testing,now 9.5-1+b1 amd64 [installed,automatic] +cpp-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-14/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cpp/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cppcheck/testing,now 2.16.0-1 amd64 [installed] +ctk-update-icon-cache/unknown,now 3.25.6-1 amd64 [installed,automatic] +dash/testing,now 0.5.12-12 amd64 [installed,automatic] +dbus-bin/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-daemon/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-session-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-system-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-user-session/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus/testing,now 1.16.0-1 amd64 [installed,automatic] +dconf-gsettings-backend/testing,now 0.40.0-5 amd64 [installed,automatic] +dconf-service/testing,now 0.40.0-5 amd64 [installed,automatic] +debconf/testing,now 1.5.89 all [installed,automatic] +debian-archive-keyring/testing,now 2023.4 all [installed,automatic] +debianutils/testing,now 5.21 amd64 [installed,automatic] +diffutils/testing,now 1:3.10-2 amd64 [installed,automatic] +dirmngr/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +dmsetup/testing,now 2:1.02.201-1 amd64 [installed,automatic] +dpkg-dev/testing,now 1.22.14 all [installed,automatic] +dpkg/testing,now 1.22.14 amd64 [installed,automatic] +e2fsprogs/testing,now 1.47.2-1 amd64 [installed,automatic] +expect/testing,now 5.45.4-3+b1 amd64 [installed] +fakeroot/testing,now 1.37-1 amd64 [installed,automatic] +file/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +findutils/testing,now 4.10.0-3 amd64 [installed,automatic] +fontconfig-config/testing,now 2.15.0-2 amd64 [installed,automatic] +fontconfig/testing,now 2.15.0-2 amd64 [installed,automatic] +fonts-dejavu-core/testing,now 2.37-8 all [installed,automatic] +fonts-dejavu-mono/testing,now 2.37-8 all [installed,automatic] +g++-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-14/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +g++/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc-14-base/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gettext-base/testing,now 0.23.1-1 amd64 [installed,automatic] +gettext/testing,now 0.23.1-1 amd64 [installed] +gir1.2-atk-1.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-atspi-2.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-ctk-3.0/unknown,now 3.25.6-1 amd64 [installed] +gir1.2-freedesktop-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-freedesktop/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-gdkpixbuf-2.0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +gir1.2-girepository-2.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-girepository-2.0/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-glib-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-glib-2.0/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-harfbuzz-0.0/testing,now 10.2.0-1 amd64 [installed,automatic] +gir1.2-pango-1.0/testing,now 1.56.1-1 amd64 [installed,automatic] +gir1.2-xkl-1.0/testing,now 5.4-5+b2 amd64 [installed,automatic] +girepository-tools/testing,now 2.82.4-2 amd64 [installed,automatic] +git-man/testing,now 1:2.47.2-0.1 all [installed,automatic] +git/testing,now 1:2.47.2-0.1 amd64 [installed] +gnupg-l10n/testing,now 2.2.46-1 all [installed,automatic] +gnupg-utils/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gnupg/testing,now 2.2.46-1 all [installed,automatic] +gobject-introspection-bin/testing,now 1.82.0-4 amd64 [installed,automatic] +gobject-introspection/testing,now 1.82.0-4 amd64 [installed] +gpg-agent/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg-wks-client/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgconf/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgsm/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgv/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +grep/testing,now 3.11-4 amd64 [installed,automatic] +gsettings-desktop-schemas/testing,now 47.1-1 all [installed,automatic] +gzip/testing,now 1.13-1 amd64 [installed,automatic] +hicolor-icon-theme/testing,now 0.18-2 all [installed,automatic] +hostname/testing,now 3.25 amd64 [installed,automatic] +icu-devtools/testing,now 72.1-6 amd64 [installed,automatic] +init-system-helpers/testing,now 1.68 all [installed,automatic] +krb5-locales/testing,now 1.21.3-4 all [installed,automatic] +less/testing,now 643-1 amd64 [installed,automatic] +lib32gcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +lib32stdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libacl1/testing,now 2.3.2-2+b1 amd64 [installed,automatic] +libalgorithm-diff-perl/testing,now 1.201-1 all [installed,automatic] +libalgorithm-diff-xs-perl/testing,now 0.04-8+b4 amd64 [installed,automatic] +libalgorithm-merge-perl/testing,now 0.08-5 all [installed,automatic] +libapparmor1/testing,now 3.1.7-1+b3 amd64 [installed,automatic] +libapt-pkg6.0t64/testing,now 2.9.26 amd64 [installed,automatic] +libasan8/testing,now 14.2.0-12 amd64 [installed,automatic] +libassuan9/testing,now 3.0.1-2 amd64 [installed,automatic] +libatk-bridge2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk-bridge2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatomic1/testing,now 14.2.0-12 amd64 [installed,automatic] +libatspi2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatspi2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libattr1/testing,now 1:2.5.2-2 amd64 [installed,automatic] +libaudit-common/testing,now 1:4.0.2-2 all [installed,automatic] +libaudit1/testing,now 1:4.0.2-2+b1 amd64 [installed,automatic] +libavahi-client3/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common-data/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common3/testing,now 0.8-16 amd64 [installed,automatic] +libbinutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libblkid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libblkid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libboost-iostreams1.83.0/testing,now 1.83.0-4 amd64 [installed,automatic] +libbrotli-dev/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbrotli1/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbsd0/testing,now 0.12.2-2 amd64 [installed,automatic] +libbz2-1.0/testing,now 1.0.8-6 amd64 [installed,automatic] +libbz2-dev/testing,now 1.0.8-6 amd64 [installed,automatic] +libc-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc-dev-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc6-dev/testing,now 2.40-6 amd64 [installed,automatic] +libc6-i386/testing,now 2.40-6 amd64 [installed,automatic] +libc6/testing,now 2.40-6 amd64 [installed,automatic] +libcairo-gobject2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo-script-interpreter2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2-dev/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcap-dev/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcap-ng0/testing,now 0.8.5-4 amd64 [installed,automatic] +libcap2/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcbor0.10/testing,now 0.10.2-2 amd64 [installed,automatic] +libcc1-0/testing,now 14.2.0-12 amd64 [installed,automatic] +libclang-common-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-cpp19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-rt-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang1-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libcolord2/testing,now 1.4.7-1+b2 amd64 [installed,automatic] +libcom-err2/testing,now 1.47.2-1 amd64 [installed,automatic] +libcrypt-dev/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcrypt1/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcryptsetup12/testing,now 2:2.7.5-1 amd64 [installed,automatic] +libctf-nobfd0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctf0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctk-3-0/unknown,now 3.25.6-1 amd64 [installed] +libctk-3-bin/unknown,now 3.25.6-1 amd64 [installed,automatic] +libctk-3-common/unknown,now 3.25.6-1 all [installed] +libctk-3-dev/unknown,now 3.25.6-1 amd64 [installed] +libcups2t64/testing,now 2.4.10-2+b1 amd64 [installed,automatic] +libcurl3t64-gnutls/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcurl4t64/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcwidget4/testing,now 0.5.18-6+b2 amd64 [installed,automatic] +libdatrie-dev/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdatrie1/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdav1d7/testing,now 1.5.1-1 amd64 [installed,automatic] +libdb5.3t64/testing,now 5.3.28+dfsg2-9 amd64 [installed,automatic] +libdbus-1-3/testing,now 1.16.0-1 amd64 [installed,automatic] +libdbus-1-dev/testing,now 1.16.0-1 amd64 [installed,automatic] +libdconf1/testing,now 0.40.0-5 amd64 [installed,automatic] +libdebconfclient0/testing,now 0.277 amd64 [installed,automatic] +libdeflate-dev/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdeflate0/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdevmapper1.02.1/testing,now 2:1.02.201-1 amd64 [installed,automatic] +libdpkg-perl/testing,now 1.22.14 all [installed,automatic] +libdrm-amdgpu1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-common/testing,now 2.4.123-1 all [installed,automatic] +libdrm-intel1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-radeon1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm2/testing,now 2.4.123-1 amd64 [installed,automatic] +libedit2/testing,now 3.1-20250104-1 amd64 [installed,automatic] +libegl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libegl-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1-mesa-dev/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libelf1t64/testing,now 0.192-4 amd64 [installed,automatic] +libepoxy-dev/testing,now 1.5.10-2 amd64 [installed,automatic] +libepoxy0/testing,now 1.5.10-2 amd64 [installed,automatic] +liberror-perl/testing,now 0.17029-2 all [installed,automatic] +libexpat1-dev/testing,now 2.6.4-1 amd64 [installed,automatic] +libexpat1/testing,now 2.6.4-1 amd64 [installed,automatic] +libext2fs2t64/testing,now 1.47.2-1 amd64 [installed,automatic] +libfakeroot/testing,now 1.37-1 amd64 [installed,automatic] +libffi-dev/testing,now 3.4.6-1 amd64 [installed,automatic] +libffi8/testing,now 3.4.6-1 amd64 [installed,automatic] +libfido2-1/testing,now 1.15.0-1+b1 amd64 [installed,automatic] +libfile-fcntllock-perl/testing,now 0.22-4+b4 amd64 [installed,automatic] +libfontconfig-dev/testing,now 2.15.0-2 amd64 [installed,automatic] +libfontconfig1/testing,now 2.15.0-2 amd64 [installed,automatic] +libfreetype-dev/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfreetype6/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfribidi-dev/testing,now 1.0.16-1 amd64 [installed,automatic] +libfribidi0/testing,now 1.0.16-1 amd64 [installed,automatic] +libgbm1/testing,now 24.2.8-1 amd64 [installed,automatic] +libgc1/testing,now 1:8.2.8-1 amd64 [installed,automatic] +libgcc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcrypt20/testing,now 1.11.0-7 amd64 [installed,automatic] +libgdbm-compat4t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdbm6t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-dev/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-bin/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-common/testing,now 2.42.12+dfsg-2 all [installed,automatic] +libgio-2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libgio-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository-1.0-1/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-1.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-2.0-0/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository1.0-dev/testing,now 1.82.0-4 amd64 [installed] +libgl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgl1-mesa-dri/testing,now 24.2.8-1 amd64 [installed,automatic] +libgl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglapi-mesa/testing,now 24.2.8-1 amd64 [installed,automatic] +libgles-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles2/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglib2.0-0t64/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-data/testing,now 2.82.4-2 all [installed,automatic] +libglib2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-dev/testing,now 2.82.4-2 amd64 [installed] +libglvnd-core-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libglx0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgmp10/testing,now 2:6.3.0+dfsg-3 amd64 [installed,automatic] +libgnutls30t64/testing,now 3.8.8-2 amd64 [installed,automatic] +libgomp1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgpg-error-l10n/testing,now 1.51-3 all [installed,automatic] +libgpg-error0/testing,now 1.51-3 amd64 [installed,automatic] +libgpm2/testing,now 1.20.7-11+b2 amd64 [installed,automatic] +libgprofng0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libgraphite2-3/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgraphite2-dev/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgssapi-krb5-2/testing,now 1.21.3-4 amd64 [installed,automatic] +libharfbuzz-cairo0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-dev/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-gobject0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-icu0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-subset0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz0b/testing,now 10.2.0-1 amd64 [installed,automatic] +libhogweed6t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libhwasan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libice-dev/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libice6/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libicu-dev/testing,now 72.1-6 amd64 [installed,automatic] +libicu72/testing,now 72.1-6 amd64 [installed,automatic] +libidn2-0/testing,now 2.3.7-2+b1 amd64 [installed,automatic] +libisl23/testing,now 0.27-1 amd64 [installed,automatic] +libitm1/testing,now 14.2.0-12 amd64 [installed,automatic] +libjansson4/testing,now 2.14-2+b3 amd64 [installed,automatic] +libjbig-dev/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjbig0/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjpeg-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjson-c5/testing,now 0.18+ds-1 amd64 [installed,automatic] +libk5crypto3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkeyutils1/testing,now 1.6.3-4 amd64 [installed,automatic] +libkmod2/testing,now 33+20240816-2 amd64 [installed,automatic] +libkrb5-3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkrb5support0/testing,now 1.21.3-4 amd64 [installed,automatic] +libksba8/testing,now 1.6.7-2+b1 amd64 [installed,automatic] +liblcms2-2/testing,now 2.16-2 amd64 [installed,automatic] +libldap-common/testing,now 2.6.9+dfsg-1 all [installed,automatic] +libldap2/testing,now 2.6.9+dfsg-1 amd64 [installed,automatic] +liblerc-dev/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +liblerc4/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +libllvm19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +liblocale-gettext-perl/testing,now 1.07-7+b1 amd64 [installed,automatic] +liblsan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libltdl-dev/testing,now 2.5.4-3 amd64 [installed,automatic] +libltdl7/testing,now 2.5.4-3 amd64 [installed,automatic] +liblz4-1/testing,now 1.10.0-3 amd64 [installed,automatic] +liblzma-dev/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzma5/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzo2-2/testing,now 2.10-3+b1 amd64 [installed,automatic] +libmagic-mgc/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmagic1t64/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmd0/testing,now 1.1.0-2+b1 amd64 [installed,automatic] +libmount-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libmount1/testing,now 2.40.4-2 amd64 [installed,automatic] +libmpc3/testing,now 1.3.1-1+b3 amd64 [installed,automatic] +libmpfr6/testing,now 4.2.1-1+b2 amd64 [installed,automatic] +libncurses-dev/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncurses6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncursesw6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libnettle8t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libnghttp2-14/testing,now 1.64.0-1 amd64 [installed,automatic] +libnghttp3-9/testing,now 1.6.0-2 amd64 [installed,automatic] +libngtcp2-16/testing,now 1.9.1-1 amd64 [installed,automatic] +libngtcp2-crypto-gnutls8/testing,now 1.9.1-1 amd64 [installed,automatic] +libnpth0t64/testing,now 1.8-2 amd64 [installed,automatic] +libnss-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libobjc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libobjc4/testing,now 14.2.0-12 amd64 [installed,automatic] +libopengl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libopengl0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libp11-kit0/testing,now 0.25.5-3 amd64 [installed,automatic] +libpam-modules-bin/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-modules/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-runtime/testing,now 1.7.0-2 all [installed,automatic] +libpam-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libpam0g/testing,now 1.7.0-2 amd64 [installed,automatic] +libpango-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpango1.0-dev/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangocairo-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoft2-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoxft-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpciaccess0/testing,now 0.17-3+b3 amd64 [installed,automatic] +libpcre2-16-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-32-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-8-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-dev/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-posix3/testing,now 10.44-5 amd64 [installed,automatic] +libperl5.40/testing,now 5.40.0-8 amd64 [installed,automatic] +libpfm4/testing,now 4.13.0+git83-g91970fe-1 amd64 [installed,automatic] +libpipeline1/testing,now 1.5.8-1 amd64 [installed,automatic] +libpixman-1-0/testing,now 0.44.0-3 amd64 [installed,automatic] +libpixman-1-dev/testing,now 0.44.0-3 amd64 [installed,automatic] +libpkgconf3/testing,now 1.8.1-4 amd64 [installed,automatic] +libpng-dev/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng-tools/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng16-16t64/testing,now 1.6.44-3 amd64 [installed,automatic] +libproc2-0/testing,now 2:4.0.4-7 amd64 [installed,automatic] +libpsl5t64/testing,now 0.21.2-1.1+b1 amd64 [installed,automatic] +libpython3-stdlib/testing,now 3.13.1-2 amd64 [installed,automatic] +libpython3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libpython3.13-stdlib/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libquadmath0/testing,now 14.2.0-12 amd64 [installed,automatic] +libreadline8t64/testing,now 8.2-6 amd64 [installed,automatic] +librsvg2-2/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librsvg2-common/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librtmp1/testing,now 2.4+20151223.gitfa8646d.1-2+b5 amd64 [installed,automatic] +libsasl2-2/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules-db/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libseccomp2/testing,now 2.5.5-2 amd64 [installed,automatic] +libselinux1-dev/testing,now 3.7-3.1 amd64 [installed,automatic] +libselinux1/testing,now 3.7-3.1 amd64 [installed,automatic] +libsemanage-common/testing,now 3.7-2.1 all [installed,automatic] +libsemanage2/testing,now 3.7-2.1 amd64 [installed,automatic] +libsensors-config/testing,now 1:3.6.0-10 all [installed,automatic] +libsensors5/testing,now 1:3.6.0-10+b1 amd64 [installed,automatic] +libsepol-dev/testing,now 3.7-1 amd64 [installed,automatic] +libsepol2/testing,now 3.7-1 amd64 [installed,automatic] +libsframe1/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libsharpyuv-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsharpyuv0/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsigc++-2.0-0v5/testing,now 2.12.1-3 amd64 [installed,automatic] +libsm-dev/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsm6/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsmartcols1/testing,now 2.40.4-2 amd64 [installed,automatic] +libsqlite3-0/testing,now 3.46.1-1 amd64 [installed,automatic] +libss2/testing,now 1.47.2-1 amd64 [installed,automatic] +libssh2-1t64/testing,now 1.11.1-1 amd64 [installed,automatic] +libssl3t64/testing,now 3.4.0-2 amd64 [installed,automatic] +libstdc++-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libstdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libsysprof-capture-4-dev/testing,now 47.2-1 amd64 [installed,automatic] +libsystemd-dev/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd-shared/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd0/testing,now 257.2-3 amd64 [installed,automatic] +libtasn1-6/testing,now 4.19.0-3+b3 amd64 [installed,automatic] +libtcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +libthai-data/testing,now 0.1.29-2 all [installed,automatic] +libthai-dev/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libthai0/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libtiff-dev/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiff6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiffxx6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtinfo6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libtinyxml2-10/testing,now 10.0.0+dfsg-2+b2 amd64 [installed,automatic] +libtool/testing,now 2.5.4-3 all [installed] +libtsan2/testing,now 14.2.0-12 amd64 [installed,automatic] +libubsan1/testing,now 14.2.0-12 amd64 [installed,automatic] +libudev1/testing,now 257.2-3 amd64 [installed,automatic] +libunistring5/testing,now 1.3-1 amd64 [installed,automatic] +libuuid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libvulkan1/testing,now 1.4.304.0-1 amd64 [installed,automatic] +libwayland-bin/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-client0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-cursor0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-dev/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-egl1/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-server0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwebp-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebp7/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdecoder3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdemux2/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpmux3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libx11-6/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-data/testing,now 2:1.8.10-2 all [installed,automatic] +libx11-dev/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-xcb1/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libxapian30/testing,now 1.4.25-2 amd64 [installed,automatic] +libxau-dev/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxau6/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxaw7/testing,now 2:1.0.16-1 amd64 [installed,automatic] +libxcb-dri2-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-dri3-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-glx0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-present0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-randr0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-sync1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-xfixes0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcomposite-dev/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcomposite1/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcursor-dev/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxcursor1/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxdamage-dev/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdamage1/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdmcp-dev/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxdmcp6/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxext-dev/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxext6/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxfixes-dev/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxfixes3/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxft-dev/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxft2/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxi-dev/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxi6/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxinerama-dev/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxinerama1/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxkbcommon-dev/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbcommon0/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbfile1/testing,now 1:1.1.0-1+b4 amd64 [installed,automatic] +libxklavier-dev/testing,now 5.4-5+b2 amd64 [installed] +libxklavier16/testing,now 5.4-5+b2 amd64 [installed,automatic] +libxml2-dev/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxml2-utils/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed] +libxml2/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxmu6/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxmuu1/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxpm4/testing,now 1:3.5.17-1+b3 amd64 [installed,automatic] +libxrandr-dev/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrandr2/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrender-dev/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxrender1/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxshmfence1/testing,now 1.3-1+b3 amd64 [installed,automatic] +libxt6t64/testing,now 1:1.2.1-1.2+b2 amd64 [installed,automatic] +libxtst-dev/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxtst6/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxxf86vm1/testing,now 1:1.1.4-1+b4 amd64 [installed,automatic] +libxxhash0/testing,now 0.8.2-2+b2 amd64 [installed,automatic] +libyaml-0-2/testing,now 0.2.5-2 amd64 [installed,automatic] +libz3-4/testing,now 4.13.3-1 amd64 [installed,automatic] +libz3-dev/testing,now 4.13.3-1 amd64 [installed,automatic] +libzstd-dev/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +libzstd1/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +linux-libc-dev/testing,now 6.12.11-1 all [installed,automatic] +linux-sysctl-defaults/testing,now 4.11 all [installed,automatic] +llvm-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-linker-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-runtime/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +login.defs/testing,now 1:4.16.0-7 all [installed,automatic] +login/testing,now 1:4.16.0-2+really2.40.4-2 amd64 [installed,automatic] +logsave/testing,now 1.47.2-1 amd64 [installed,automatic] +m4/testing,now 1.4.19-5 amd64 [installed,automatic] +make/testing,now 4.4.1-1 amd64 [installed] +manpages-dev/testing,now 6.9.1-1 all [installed,automatic] +manpages/testing,now 6.9.1-1 all [installed,automatic] +mawk/testing,now 1.3.4.20240905-1 amd64 [installed,automatic] +media-types/testing,now 10.1.0 all [installed,automatic] +mesa-libgallium/testing,now 24.2.8-1 amd64 [installed,automatic] +mesa-vulkan-drivers/testing,now 24.2.8-1 amd64 [installed,automatic] +mount/testing,now 2.40.4-2 amd64 [installed,automatic] +native-architecture/testing,now 0.2.5 all [installed,automatic] +ncurses-base/testing,now 6.5-2 all [installed,automatic] +ncurses-bin/testing,now 6.5-2+b1 amd64 [installed,automatic] +netbase/testing,now 6.4 all [installed,automatic] +openssh-client/testing,now 1:9.9p1-3 amd64 [installed,automatic] +openssl-provider-legacy/testing,now 3.4.0-2 amd64 [installed,automatic] +openssl/testing,now 3.4.0-2 amd64 [installed,automatic] +pango1.0-tools/testing,now 1.56.1-1 amd64 [installed,automatic] +passwd/testing,now 1:4.16.0-7 amd64 [installed,automatic] +patch/testing,now 2.7.6-7 amd64 [installed,automatic] +perl-base/testing,now 5.40.0-8 amd64 [installed,automatic] +perl-modules-5.40/testing,now 5.40.0-8 all [installed,automatic] +perl/testing,now 5.40.0-8 amd64 [installed,automatic] +pinentry-curses/testing,now 1.3.1-2 amd64 [installed,automatic] +pkgconf-bin/testing,now 1.8.1-4 amd64 [installed,automatic] +pkgconf/testing,now 1.8.1-4 amd64 [installed,automatic] +procps/testing,now 2:4.0.4-7 amd64 [installed,automatic] +psmisc/testing,now 23.7-1 amd64 [installed,automatic] +publicsuffix/testing,now 20250108.1153-0.1 all [installed,automatic] +python3-autocommand/testing,now 2.2.2-3 all [installed,automatic] +python3-inflect/testing,now 7.3.1-2 all [installed,automatic] +python3-jaraco.context/testing,now 6.0.0-1 all [installed,automatic] +python3-jaraco.functools/testing,now 4.1.0-1 all [installed,automatic] +python3-jaraco.text/testing,now 4.0.0-1 all [installed,automatic] +python3-mako/testing,now 1.3.8-2 all [installed,automatic] +python3-markdown/testing,now 3.7-2 all [installed,automatic] +python3-markupsafe/testing,now 2.1.5-1+b2 amd64 [installed,automatic] +python3-minimal/testing,now 3.13.1-2 amd64 [installed,automatic] +python3-more-itertools/testing,now 10.6.0-1 all [installed,automatic] +python3-packaging/testing,now 24.2-1 all [installed,automatic] +python3-pkg-resources/testing,now 75.6.0-1 all [installed,automatic] +python3-pygments/testing,now 2.18.0+dfsg-2 all [installed,automatic] +python3-setuptools/testing,now 75.6.0-1 all [installed,automatic] +python3-typeguard/testing,now 4.4.1-1 all [installed,automatic] +python3-typing-extensions/testing,now 4.12.2-2 all [installed,automatic] +python3-yaml/testing,now 6.0.2-1+b1 amd64 [installed,automatic] +python3-zipp/testing,now 3.21.0-1 all [installed,automatic] +python3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3.13/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3/testing,now 3.13.1-2 amd64 [installed,automatic] +readline-common/testing,now 8.2-6 all [installed,automatic] +rpcsvc-proto/testing,now 1.4.3-1 amd64 [installed,automatic] +sed/testing,now 4.9-2 amd64 [installed,automatic] +sensible-utils/testing,now 0.0.24 all [installed,automatic] +sgml-base/testing,now 1.31 all [installed,automatic] +shared-mime-info/testing,now 2.4-5+b2 amd64 [installed,automatic] +sqv/testing,now 1.2.1-5 amd64 [installed,automatic] +systemd-cryptsetup/testing,now 257.2-3 amd64 [installed,automatic] +systemd-sysv/testing,now 257.2-3 amd64 [installed,automatic] +systemd-timesyncd/testing,now 257.2-3 amd64 [installed,automatic] +systemd/testing,now 257.2-3 amd64 [installed,automatic] +sysvinit-utils/testing,now 3.13-1 amd64 [installed,automatic] +tar/testing,now 1.35+dfsg-3.1 amd64 [installed,automatic] +tcl-expect/testing,now 5.45.4-3+b1 amd64 [installed,automatic] +tcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +tzdata/testing,now 2024b-6 all [installed,automatic] +util-linux/testing,now 2.40.4-2 amd64 [installed,automatic] +uuid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +wayland-protocols/testing,now 1.39-1 all [installed,automatic] +wget/testing,now 1.24.5-2+b1 amd64 [installed] +x11-common/testing,now 1:7.7+24 all [installed,automatic] +x11-xkb-utils/testing,now 7.7+9 amd64 [installed,automatic] +x11proto-dev/testing,now 2024.1-1 all [installed,automatic] +xauth/testing,now 1:1.1.2-1.1 amd64 [installed,automatic] +xdg-user-dirs/testing,now 0.18-2 amd64 [installed,automatic] +xkb-data/testing,now 2.42-1 all [installed,automatic] +xml-core/testing,now 0.19 all [installed,automatic] +xorg-sgml-doctools/testing,now 1:1.11-1.1 all [installed,automatic] +xtrans-dev/testing,now 1.4.0-1 all [installed,automatic] +xz-utils/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +zlib1g-dev/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +zlib1g/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +Errors detected in the build 0 +Warnings detected in the logs 96 +cppcheck defects detected in the logs 28 +TOTAL warnings detected in the logs 124 diff --git a/2025-02-06-152308-14522-1@ae3358295c1f_devel/report-37cb39.html b/2025-02-06-152308-14522-1@ae3358295c1f_devel/report-37cb39.html new file mode 100644 index 0000000..4b0719b --- /dev/null +++ b/2025-02-06-152308-14522-1@ae3358295c1f_devel/report-37cb39.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 248, column 21
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-152308-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
This statement is never executed
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-152308-14522-1@ae3358295c1f_devel/report-523ef4.html b/2025-02-06-152308-14522-1@ae3358295c1f_devel/report-523ef4.html new file mode 100644 index 0000000..b3695b2 --- /dev/null +++ b/2025-02-06-152308-14522-1@ae3358295c1f_devel/report-523ef4.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 199, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-152308-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
This statement is never executed
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-152308-14522-1@ae3358295c1f_devel/report-5ce420.html b/2025-02-06-152308-14522-1@ae3358295c1f_devel/report-5ce420.html new file mode 100644 index 0000000..9fbe77c --- /dev/null +++ b/2025-02-06-152308-14522-1@ae3358295c1f_devel/report-5ce420.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 194, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-152308-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
This statement is never executed
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-152308-14522-1@ae3358295c1f_devel/report-5d4bc8.html b/2025-02-06-152308-14522-1@ae3358295c1f_devel/report-5d4bc8.html new file mode 100644 index 0000000..22f9fc3 --- /dev/null +++ b/2025-02-06-152308-14522-1@ae3358295c1f_devel/report-5d4bc8.html @@ -0,0 +1,1609 @@ + + + +/rootdir/libcafekbd/tmp-introspectklhm67d4/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspectklhm67d4/Cafekbd-1.0.c
Warning:line 89, column 13
File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/atk-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/cairo -I /usr/include/libpng16 -I /usr/include/freetype2 -I /usr/include/pixman-1 -I /usr/include/gio-unix-2.0 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/pango-1.0 -I /usr/include/harfbuzz -I /usr/include/fribidi -I /usr/include/ctk-3.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/libxml2 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-152308-14522-1 -x c /rootdir/libcafekbd/tmp-introspectklhm67d4/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
14
Loop condition is true. Entering loop body
28
Loop condition is true. Entering loop body
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
15
Assuming this stream operation fails
29
File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior
90 if (ret
15.1
'ret' is equal to 0
== 0)
16
Taking true branch
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out
16.1
'len_out' is not equal to NULL
!= NULL((void*)0))
17
Taking true branch
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
6
Assuming 'args' is not equal to NULL
7
Taking false branch
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
8
Assuming 'self' is non-null
9
Taking false branch
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input
9.1
'input' is not equal to NULL
== NULL((void*)0))
10
Taking false branch
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output
10.1
'output' is not equal to NULL
== NULL((void*)0))
11
Taking false branch
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
12
Loop condition is true. Entering loop body
26
Loop condition is true. Entering loop body
702 {
703 gsize len;
704 char *line = read_line (input, &len);
13
Calling 'read_line'
18
Returning from 'read_line'
27
Calling 'read_line'
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
19
Assuming 'line' is not equal to NULL
20
Assuming the condition is false
21
Taking false branch
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
22
Assuming the condition is false
23
Taking false branch
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
24
Assuming the condition is false
25
Taking false branch
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
742
743 if (quark == 0)
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
1
Assuming 'argc' is equal to 2
2
'?' condition is false
3
Assuming the condition is false
4
Taking false branch
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
5
Calling 'dump_irepository'
811 {
812 g_printerr ("%s\n", error->message);
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-152308-14522-1@ae3358295c1f_devel/report-891289.html b/2025-02-06-152308-14522-1@ae3358295c1f_devel/report-891289.html new file mode 100644 index 0000000..9147978 --- /dev/null +++ b/2025-02-06-152308-14522-1@ae3358295c1f_devel/report-891289.html @@ -0,0 +1,1603 @@ + + + +/rootdir/libcafekbd/tmp-introspectklhm67d4/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspectklhm67d4/Cafekbd-1.0.c
Warning:line 812, column 27
Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error')
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/atk-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/cairo -I /usr/include/libpng16 -I /usr/include/freetype2 -I /usr/include/pixman-1 -I /usr/include/gio-unix-2.0 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/pango-1.0 -I /usr/include/harfbuzz -I /usr/include/fribidi -I /usr/include/ctk-3.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/libxml2 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-152308-14522-1 -x c /rootdir/libcafekbd/tmp-introspectklhm67d4/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
90 if (ret == 0)
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out != NULL((void*)0))
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
21
Assuming the condition is false
22
Taking false branch
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
23
Returning without writing to '*error'
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
7
Assuming 'args' is not equal to NULL
8
Taking false branch
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
9
Assuming 'self' is non-null
10
Taking false branch
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input
10.1
'input' is not equal to NULL
== NULL((void*)0))
11
Taking false branch
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output
11.1
'output' is not equal to NULL
== NULL((void*)0))
12
Taking false branch
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
13
Loop condition is true. Entering loop body
702 {
703 gsize len;
704 char *line = read_line (input, &len);
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
14
Assuming 'line' is not equal to NULL
15
Assuming the condition is false
16
Taking false branch
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
17
Assuming the condition is false
18
Taking false branch
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
19
Taking true branch
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
20
Calling 'invoke_error_quark'
24
Returning from 'invoke_error_quark'
742
743 if (quark == 0)
25
Assuming 'quark' is equal to 0
26
Taking true branch
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
27
Returning without writing to '*error'
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
1
'error' initialized to a null pointer value
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
2
Assuming 'argc' is equal to 2
3
'?' condition is false
4
Assuming the condition is false
5
Taking false branch
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
6
Calling 'dump_irepository'
28
Returning from 'dump_irepository'
29
Taking true branch
811 {
812 g_printerr ("%s\n", error->message);
30
Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error')
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-152308-14522-1@ae3358295c1f_devel/report-9361af.html b/2025-02-06-152308-14522-1@ae3358295c1f_devel/report-9361af.html new file mode 100644 index 0000000..4265cd6 --- /dev/null +++ b/2025-02-06-152308-14522-1@ae3358295c1f_devel/report-9361af.html @@ -0,0 +1,1609 @@ + + + +/rootdir/libcafekbd/tmp-introspectklhm67d4/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspectklhm67d4/Cafekbd-1.0.c
Warning:line 89, column 13
Read function called when stream is in EOF state. Function has no effect
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/atk-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/cairo -I /usr/include/libpng16 -I /usr/include/freetype2 -I /usr/include/pixman-1 -I /usr/include/gio-unix-2.0 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/pango-1.0 -I /usr/include/harfbuzz -I /usr/include/fribidi -I /usr/include/ctk-3.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/libxml2 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-152308-14522-1 -x c /rootdir/libcafekbd/tmp-introspectklhm67d4/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
14
Loop condition is true. Entering loop body
28
Loop condition is true. Entering loop body
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
15
Assuming stream reaches end-of-file here
29
Read function called when stream is in EOF state. Function has no effect
90 if (ret
15.1
'ret' is equal to 0
== 0)
16
Taking true branch
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out
16.1
'len_out' is not equal to NULL
!= NULL((void*)0))
17
Taking true branch
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
6
Assuming 'args' is not equal to NULL
7
Taking false branch
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
8
Assuming 'self' is non-null
9
Taking false branch
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input
9.1
'input' is not equal to NULL
== NULL((void*)0))
10
Taking false branch
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output
10.1
'output' is not equal to NULL
== NULL((void*)0))
11
Taking false branch
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
12
Loop condition is true. Entering loop body
26
Loop condition is true. Entering loop body
702 {
703 gsize len;
704 char *line = read_line (input, &len);
13
Calling 'read_line'
18
Returning from 'read_line'
27
Calling 'read_line'
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
19
Assuming 'line' is not equal to NULL
20
Assuming the condition is false
21
Taking false branch
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
22
Assuming the condition is false
23
Taking false branch
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
24
Assuming the condition is false
25
Taking false branch
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
742
743 if (quark == 0)
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
1
Assuming 'argc' is equal to 2
2
'?' condition is false
3
Assuming the condition is false
4
Taking false branch
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
5
Calling 'dump_irepository'
811 {
812 g_printerr ("%s\n", error->message);
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-152308-14522-1@ae3358295c1f_devel/report-b4532a.html b/2025-02-06-152308-14522-1@ae3358295c1f_devel/report-b4532a.html new file mode 100644 index 0000000..e35a91f --- /dev/null +++ b/2025-02-06-152308-14522-1@ae3358295c1f_devel/report-b4532a.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 228, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-152308-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
This statement is never executed
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-152308-14522-1@ae3358295c1f_devel/report-c098bd.html b/2025-02-06-152308-14522-1@ae3358295c1f_devel/report-c098bd.html new file mode 100644 index 0000000..c5d0dca --- /dev/null +++ b/2025-02-06-152308-14522-1@ae3358295c1f_devel/report-c098bd.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 187, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-152308-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
This statement is never executed
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-152308-14522-1@ae3358295c1f_devel/report-e0f2de.html b/2025-02-06-152308-14522-1@ae3358295c1f_devel/report-e0f2de.html new file mode 100644 index 0000000..f04c072 --- /dev/null +++ b/2025-02-06-152308-14522-1@ae3358295c1f_devel/report-e0f2de.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 225, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-152308-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
This statement is never executed
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-152308-14522-1@ae3358295c1f_devel/report-fb6164.html b/2025-02-06-152308-14522-1@ae3358295c1f_devel/report-fb6164.html new file mode 100644 index 0000000..8ea15e3 --- /dev/null +++ b/2025-02-06-152308-14522-1@ae3358295c1f_devel/report-fb6164.html @@ -0,0 +1,1504 @@ + + + +/rootdir/libcafekbd/tmp-introspectklhm67d4/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspectklhm67d4/Cafekbd-1.0.c
Warning:line 239, column 11
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/atk-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/cairo -I /usr/include/libpng16 -I /usr/include/freetype2 -I /usr/include/pixman-1 -I /usr/include/gio-unix-2.0 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/pango-1.0 -I /usr/include/harfbuzz -I /usr/include/fribidi -I /usr/include/ctk-3.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/libxml2 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-152308-14522-1 -x c /rootdir/libcafekbd/tmp-introspectklhm67d4/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
90 if (ret == 0)
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out != NULL((void*)0))
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
This statement is never executed
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input == NULL((void*)0))
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output == NULL((void*)0))
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
702 {
703 gsize len;
704 char *line = read_line (input, &len);
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
742
743 if (quark == 0)
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
811 {
812 g_printerr ("%s\n", error->message);
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-152308-14522-1@ae3358295c1f_devel/report-ff92e7.html b/2025-02-06-152308-14522-1@ae3358295c1f_devel/report-ff92e7.html new file mode 100644 index 0000000..3ac7926 --- /dev/null +++ b/2025-02-06-152308-14522-1@ae3358295c1f_devel/report-ff92e7.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 256, column 21
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-152308-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"1.25.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
This statement is never executed
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-152308-14522-1@ae3358295c1f_devel/scanview.css b/2025-02-06-152308-14522-1@ae3358295c1f_devel/scanview.css new file mode 100644 index 0000000..cf8a5a6 --- /dev/null +++ b/2025-02-06-152308-14522-1@ae3358295c1f_devel/scanview.css @@ -0,0 +1,62 @@ +body { color:#000000; background-color:#ffffff } +body { font-family: Helvetica, sans-serif; font-size:9pt } +h1 { font-size: 14pt; } +h2 { font-size: 12pt; } +table { font-size:9pt } +table { border-spacing: 0px; border: 1px solid black } +th, table thead { + background-color:#eee; color:#666666; + font-weight: bold; cursor: default; + text-align:center; + font-weight: bold; font-family: Verdana; + white-space:nowrap; +} +.W { font-size:0px } +th, td { padding:5px; padding-left:8px; text-align:left } +td.SUMM_DESC { padding-left:12px } +td.DESC { white-space:pre } +td.Q { text-align:right } +td { text-align:left } +tbody.scrollContent { overflow:auto } + +table.form_group { + background-color: #ccc; + border: 1px solid #333; + padding: 2px; +} + +table.form_inner_group { + background-color: #ccc; + border: 1px solid #333; + padding: 0px; +} + +table.form { + background-color: #999; + border: 1px solid #333; + padding: 2px; +} + +td.form_label { + text-align: right; + vertical-align: top; +} +/* For one line entires */ +td.form_clabel { + text-align: right; + vertical-align: center; +} +td.form_value { + text-align: left; + vertical-align: top; +} +td.form_submit { + text-align: right; + vertical-align: top; +} + +h1.SubmitFail { + color: #f00; +} +h1.SubmitOk { +} diff --git a/2025-02-06-152308-14522-1@ae3358295c1f_devel/sorttable.js b/2025-02-06-152308-14522-1@ae3358295c1f_devel/sorttable.js new file mode 100644 index 0000000..e608daa --- /dev/null +++ b/2025-02-06-152308-14522-1@ae3358295c1f_devel/sorttable.js @@ -0,0 +1,512 @@ +/* + SortTable + version 2 + 7th April 2007 + Stuart Langridge, http://www.kryogenix.org/code/browser/sorttable/ + + Instructions: + Download this file + Add to your HTML + Add class="sortable" to any table you'd like to make sortable + Click on the headers to sort + + Thanks to many, many people for contributions and suggestions. + Licenced as X11: http://www.kryogenix.org/code/browser/licence.html + This basically means: do what you want with it. +*/ + + +var stIsIE = /*@cc_on!@*/false; + +sorttable = { + init: function() { + // quit if this function has already been called + if (arguments.callee.done) return; + // flag this function so we don't do the same thing twice + arguments.callee.done = true; + // kill the timer + if (_timer) clearInterval(_timer); + + if (!document.createElement || !document.getElementsByTagName) return; + + sorttable.DATE_RE = /^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/; + + forEach(document.getElementsByTagName('table'), function(table) { + if (table.className.search(/\bsortable\b/) != -1) { + sorttable.makeSortable(table); + } + }); + + }, + + makeSortable: function(table) { + if (table.getElementsByTagName('thead').length == 0) { + // table doesn't have a tHead. Since it should have, create one and + // put the first table row in it. + the = document.createElement('thead'); + the.appendChild(table.rows[0]); + table.insertBefore(the,table.firstChild); + } + // Safari doesn't support table.tHead, sigh + if (table.tHead == null) table.tHead = table.getElementsByTagName('thead')[0]; + + if (table.tHead.rows.length != 1) return; // can't cope with two header rows + + // Sorttable v1 put rows with a class of "sortbottom" at the bottom (as + // "total" rows, for example). This is B&R, since what you're supposed + // to do is put them in a tfoot. So, if there are sortbottom rows, + // for backward compatibility, move them to tfoot (creating it if needed). + sortbottomrows = []; + for (var i=0; i5' : ' ▴'; + this.appendChild(sortrevind); + return; + } + if (this.className.search(/\bsorttable_sorted_reverse\b/) != -1) { + // if we're already sorted by this column in reverse, just + // re-reverse the table, which is quicker + sorttable.reverse(this.sorttable_tbody); + this.className = this.className.replace('sorttable_sorted_reverse', + 'sorttable_sorted'); + this.removeChild(document.getElementById('sorttable_sortrevind')); + sortfwdind = document.createElement('span'); + sortfwdind.id = "sorttable_sortfwdind"; + sortfwdind.innerHTML = stIsIE ? ' 6' : ' ▾'; + this.appendChild(sortfwdind); + return; + } + + // remove sorttable_sorted classes + theadrow = this.parentNode; + forEach(theadrow.childNodes, function(cell) { + if (cell.nodeType == 1) { // an element + cell.className = cell.className.replace('sorttable_sorted_reverse',''); + cell.className = cell.className.replace('sorttable_sorted',''); + } + }); + sortfwdind = document.getElementById('sorttable_sortfwdind'); + if (sortfwdind) { sortfwdind.parentNode.removeChild(sortfwdind); } + sortrevind = document.getElementById('sorttable_sortrevind'); + if (sortrevind) { sortrevind.parentNode.removeChild(sortrevind); } + + this.className += ' sorttable_sorted'; + sortfwdind = document.createElement('span'); + sortfwdind.id = "sorttable_sortfwdind"; + sortfwdind.innerHTML = stIsIE ? ' 6' : ' ▾'; + this.appendChild(sortfwdind); + + // build an array to sort. This is a Schwartzian transform thing, + // i.e., we "decorate" each row with the actual sort key, + // sort based on the sort keys, and then put the rows back in order + // which is a lot faster because you only do getInnerText once per row + row_array = []; + col = this.sorttable_columnindex; + rows = this.sorttable_tbody.rows; + for (var j=0; j 12) { + // definitely dd/mm + return sorttable.sort_ddmm; + } else if (second > 12) { + return sorttable.sort_mmdd; + } else { + // looks like a date, but we can't tell which, so assume + // that it's dd/mm (English imperialism!) and keep looking + sortfn = sorttable.sort_ddmm; + } + } + } + } + return sortfn; + }, + + getInnerText: function(node) { + // gets the text we want to use for sorting for a cell. + // strips leading and trailing whitespace. + // this is *not* a generic getInnerText function; it's special to sorttable. + // for example, you can override the cell text with a customkey attribute. + // it also gets .value for fields. + + hasInputs = (typeof node.getElementsByTagName == 'function') && + node.getElementsByTagName('input').length; + + if (node.getAttribute("sorttable_customkey") != null) { + return node.getAttribute("sorttable_customkey"); + } + else if (typeof node.textContent != 'undefined' && !hasInputs) { + return node.textContent.replace(/^\s+|\s+$/g, ''); + } + else if (typeof node.innerText != 'undefined' && !hasInputs) { + return node.innerText.replace(/^\s+|\s+$/g, ''); + } + else if (typeof node.text != 'undefined' && !hasInputs) { + return node.text.replace(/^\s+|\s+$/g, ''); + } + else { + switch (node.nodeType) { + case 3: + if (node.nodeName.toLowerCase() == 'input') { + return node.value.replace(/^\s+|\s+$/g, ''); + } + case 4: + return node.nodeValue.replace(/^\s+|\s+$/g, ''); + break; + case 1: + case 11: + var innerText = ''; + for (var i = 0; i < node.childNodes.length; i++) { + innerText += sorttable.getInnerText(node.childNodes[i]); + } + return innerText.replace(/^\s+|\s+$/g, ''); + break; + default: + return ''; + } + } + }, + + reverse: function(tbody) { + // reverse the rows in a tbody + newrows = []; + for (var i=0; i=0; i--) { + tbody.appendChild(newrows[i]); + } + delete newrows; + }, + + /* sort functions + each sort function takes two parameters, a and b + you are comparing a[0] and b[0] */ + sort_numeric: function(a,b) { + aa = parseFloat(a[0].replace(/[^0-9.-]/g,'')); + if (isNaN(aa)) aa = 0; + bb = parseFloat(b[0].replace(/[^0-9.-]/g,'')); + if (isNaN(bb)) bb = 0; + return aa-bb; + }, + sort_alpha: function(a,b) { + if (a[0]==b[0]) return 0; + if (a[0] 0 ) { + var q = list[i]; list[i] = list[i+1]; list[i+1] = q; + swap = true; + } + } // for + t--; + + if (!swap) break; + + for(var i = t; i > b; --i) { + if ( comp_func(list[i], list[i-1]) < 0 ) { + var q = list[i]; list[i] = list[i-1]; list[i-1] = q; + swap = true; + } + } // for + b++; + + } // while(swap) + } +} + +/* ****************************************************************** + Supporting functions: bundled here to avoid depending on a library + ****************************************************************** */ + +// Dean Edwards/Matthias Miller/John Resig + +/* for Mozilla/Opera9 */ +if (document.addEventListener) { + document.addEventListener("DOMContentLoaded", sorttable.init, false); +} + +/* for Internet Explorer */ +/*@cc_on @*/ +/*@if (@_win32) + document.write(" + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <X11/keysym.h>
+
+#include <glib/gi18n-lib.h>
+#include <gio/gio.h>
+#include <cafekbd-desktop-config.h>
+#include <cafekbd-config-private.h>
+
+/**
+ * CafekbdDesktopConfig:
+ */
+#define CAFEKBD_DESKTOP_CONFIG_SCHEMA  CAFEKBD_CONFIG_SCHEMA ".general"
+
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP[] = "default-group";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW[] = "group-per-window";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS[] = "handle-indicators";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES[] = "layout-names-as-group-names";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_LOAD_EXTRA_ITEMS[] = "load-extra-items";
+
+/*
+ * static common functions
+ */
+
+static gboolean
+    cafekbd_desktop_config_get_lv_descriptions
+    (CafekbdDesktopConfig * config,
+     XklConfigRegistry * registry,
+     const gchar ** layout_ids,
+     const gchar ** variant_ids,
+     gchar *** short_layout_descriptions,
+     gchar *** long_layout_descriptions,
+     gchar *** short_variant_descriptions,
+     gchar *** long_variant_descriptions) {
+	const gchar **pl, **pv;
+	guint total_layouts;
+	gchar **sld, **lld, **svd, **lvd;
+	XklConfigItem *item = xkl_config_item_new ();
+
+	if (!
+	    (xkl_engine_get_features (config->engine) &
+	     XKLF_MULTIPLE_LAYOUTS_SUPPORTED))
+		return FALSE;
+
+	pl = layout_ids;
+	pv = variant_ids;
+	total_layouts = g_strv_length ((char **) layout_ids);
+	sld = *short_layout_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+	lld = *long_layout_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+	svd = *short_variant_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+	lvd = *long_variant_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+
+	while (pl != NULL && *pl != NULL) {
+
+		xkl_debug (100, "ids: [%s][%s]\n", *pl,
+			   pv == NULL ? NULL : *pv);
+
+		g_snprintf (item->name, sizeof item->name, "%s", *pl);
+		if (xkl_config_registry_find_layout (registry, item)) {
+			*sld = g_strdup (item->short_description);
+			*lld = g_strdup (item->description);
+		} else {
+			*sld = g_strdup ("");
+			*lld = g_strdup ("");
+		}
+
+		if (pv != NULL && *pv != NULL) {
+			g_snprintf (item->name, sizeof item->name, "%s",
+				    *pv);
+			if (xkl_config_registry_find_variant
+			    (registry, *pl, item)) {
+				*svd = g_strdup (item->short_description);
+				*lvd = g_strdup (item->description);
+			} else {
+				*svd = g_strdup ("");
+				*lvd = g_strdup ("");
+			}
+		} else {
+			*svd = g_strdup ("");
+			*lvd = g_strdup ("");
+		}
+
+		xkl_debug (100, "description: [%s][%s][%s][%s]\n",
+			   *sld, *lld, *svd, *lvd);
+		sld++;
+		lld++;
+		svd++;
+		lvd++;
+
+		pl++;
+
+		if (pv != NULL && *pv != NULL)
+			pv++;
+	}
+
+	g_object_unref (item);
+	return TRUE;
+}
+
+/*
+ * extern CafekbdDesktopConfig config functions
+ */
+void
+cafekbd_desktop_config_init (CafekbdDesktopConfig * config,
+			  XklEngine * engine)
+{
+	memset (config, 0, sizeof (*config));
+	config->settings = g_settings_new (CAFEKBD_DESKTOP_CONFIG_SCHEMA);
+	config->engine = engine;
+}
+
+void
+cafekbd_desktop_config_term (CafekbdDesktopConfig * config)
+{
+	g_object_unref (config->settings);
+	config->settings = NULL;
+}
+
+void
+cafekbd_desktop_config_load_from_gsettings (CafekbdDesktopConfig * config)
+{
+	config->group_per_app =
+	    g_settings_get_boolean (config->settings,
+				 CAFEKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW);
+	xkl_debug (150, "group_per_app: %d\n", config->group_per_app);
+
+	config->handle_indicators =
+	    g_settings_get_boolean (config->settings,
+				 CAFEKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS);
+	xkl_debug (150, "handle_indicators: %d\n",
+		   config->handle_indicators);
+
+	config->layout_names_as_group_names =
+	    g_settings_get_boolean (config->settings,
+				   CAFEKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES);
+	xkl_debug (150, "layout_names_as_group_names: %d\n",
+		   config->layout_names_as_group_names);
+
+	config->load_extra_items =
+	    g_settings_get_boolean (config->settings,
+				   CAFEKBD_DESKTOP_CONFIG_KEY_LOAD_EXTRA_ITEMS);
+	xkl_debug (150, "load_extra_items: %d\n",
+		   config->load_extra_items);
+
+	config->default_group =
+	    g_settings_get_int (config->settings,
+				  CAFEKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP);
+
+	if (config->default_group < -1
+	    || config->default_group >=
+	    xkl_engine_get_max_num_groups (config->engine))
+		config->default_group = -1;
+	xkl_debug (150, "default_group: %d\n", config->default_group);
+}
+
+void
+cafekbd_desktop_config_save_to_gsettings (CafekbdDesktopConfig * config)
+{
+	g_settings_delay (config->settings);
+
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW,
+			     config->group_per_app);
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS,
+			     config->handle_indicators);
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES,
+			     config->layout_names_as_group_names);
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_LOAD_EXTRA_ITEMS,
+			     config->load_extra_items);
+	g_settings_set_int (config->settings,
+			    CAFEKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP,
+			    config->default_group);
+
+	g_settings_apply (config->settings);
+}
+
+gboolean
+cafekbd_desktop_config_activate (CafekbdDesktopConfig * config)
+{
+	gboolean rv = TRUE;
+
+	xkl_engine_set_group_per_toplevel_window (config->engine,
+						  config->group_per_app);
+	xkl_engine_set_indicators_handling (config->engine,
+					    config->handle_indicators);
+	xkl_engine_set_default_group (config->engine,
+				      config->default_group);
+
+	return rv;
+}
+
+void
+cafekbd_desktop_config_lock_next_group (CafekbdDesktopConfig * config)
+{
+	int group = xkl_engine_get_next_group (config->engine);
+	xkl_engine_lock_group (config->engine, group);
+}
+
+void
+cafekbd_desktop_config_lock_prev_group (CafekbdDesktopConfig * config)
+{
+	int group = xkl_engine_get_prev_group (config->engine);
+	xkl_engine_lock_group (config->engine, group);
+}
+
+void
+cafekbd_desktop_config_restore_group (CafekbdDesktopConfig * config)
+{
+	int group = xkl_engine_get_current_window_group (config->engine);
+	xkl_engine_lock_group (config->engine, group);
+}
+
+/**
+ * cafekbd_desktop_config_start_listen:
+ * @func: (scope notified): a function to call when settings are changed
+ */
+void
+cafekbd_desktop_config_start_listen (CafekbdDesktopConfig * config,
+				  GCallback func,
+				  gpointer user_data)
+{
+	config->config_listener_id =
+	    g_signal_connect (config->settings, "changed", func,
+			      user_data);
+}
+
+void
+cafekbd_desktop_config_stop_listen (CafekbdDesktopConfig * config)
+{
+	g_signal_handler_disconnect (config->settings,
+				    config->config_listener_id);
+	config->config_listener_id = 0;
+}
+
+gboolean
+cafekbd_desktop_config_load_group_descriptions (CafekbdDesktopConfig
+					     * config,
+					     XklConfigRegistry *
+					     registry,
+					     const gchar **
+					     layout_ids,
+					     const gchar **
+					     variant_ids,
+					     gchar ***
+					     short_group_names,
+					     gchar *** full_group_names)
+{
+	gchar **sld, **lld, **svd, **lvd;
+	gchar **psld, **plld, **plvd;
+	gchar **psgn, **pfgn, **psvd;
+	gint total_descriptions;
+
+	if (!cafekbd_desktop_config_get_lv_descriptions
+	    (config, registry, layout_ids, variant_ids, &sld, &lld, &svd,
+	     &lvd)) {
+		return False;
+	}
+
+	total_descriptions = g_strv_length (sld);
+
+	*short_group_names = psgn =
+	    g_new0 (gchar *, total_descriptions + 1);
+	*full_group_names = pfgn =
+	    g_new0 (gchar *, total_descriptions + 1);
+
+	plld = lld;
+	psld = sld;
+	plvd = lvd;
+	psvd = svd;
+	while (plld != NULL && *plld != NULL) {
+		gchar *sd = (*psvd[0] == '\0') ? *psld : *psvd;
+		psld++, psvd++;
+		*psgn++ = g_strdup (sd);
+		*pfgn++ = g_strdup (cafekbd_keyboard_config_format_full_layout
+				    (*plld++, *plvd++));
+	}
+	g_strfreev (sld);
+	g_strfreev (lld);
+	g_strfreev (svd);
+	g_strfreev (lvd);
+
+	return True;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/1.html b/2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/1.html new file mode 100644 index 0000000..43abc15 --- /dev/null +++ b/2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/1.html @@ -0,0 +1,914 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <X11/keysym.h>
+
+#include <pango/pango.h>
+
+#include <glib/gi18n-lib.h>
+#include <cdk/cdkx.h>
+
+#include <cafekbd-keyboard-config.h>
+#include <cafekbd-indicator-config.h>
+
+#include <cafekbd-config-private.h>
+
+/**
+ * CafekbdIndicatorConfig:
+ */
+#define CAFEKBD_INDICATOR_CONFIG_SCHEMA  CAFEKBD_CONFIG_SCHEMA ".indicator"
+
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS[] = "show-flags";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_SECONDARIES[] = "secondary";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_FONT_FAMILY[] = "font-family";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_FOREGROUND_COLOR[] = "foreground-color";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_BACKGROUND_COLOR[] = "background-color";
+
+/*
+ * static applet config functions
+ */
+static void
+cafekbd_indicator_config_load_font (CafekbdIndicatorConfig * ind_config)
+{
+	ind_config->font_family =
+	    g_settings_get_string (ind_config->settings,
+				   CAFEKBD_INDICATOR_CONFIG_KEY_FONT_FAMILY);
+
+	if (ind_config->font_family == NULL ||
+	    ind_config->font_family[0] == '\0') {
+		PangoFontDescription *fd = NULL;
+		CtkWidgetPath *widget_path = ctk_widget_path_new ();
+		CtkStyleContext *context = ctk_style_context_new ();
+
+		ctk_widget_path_append_type (widget_path, CTK_TYPE_WINDOW);
+		ctk_widget_path_iter_set_name (widget_path, -1 , "PanelWidget");
+
+		ctk_style_context_set_path (context, widget_path);
+		ctk_style_context_set_screen (context, cdk_screen_get_default ());
+		ctk_style_context_set_state (context, CTK_STATE_FLAG_NORMAL);
+		ctk_style_context_add_class (context, CTK_STYLE_CLASS_DEFAULT);
+		ctk_style_context_add_class (context, "gnome-panel-menu-bar");
+		ctk_style_context_add_class (context, "cafe-panel-menu-bar");
+
+		ctk_style_context_get (context, CTK_STATE_FLAG_NORMAL,
+		                       CTK_STYLE_PROPERTY_FONT, &fd, NULL);
+
+		if (fd != NULL) {
+			ind_config->font_family =
+			    g_strdup (pango_font_description_to_string(fd));
+		}
+
+		g_object_unref (G_OBJECT (context));
+		ctk_widget_path_unref (widget_path);
+	}
+	xkl_debug (150, "font: [%s]\n", ind_config->font_family);
+
+}
+
+static void
+cafekbd_indicator_config_load_colors (CafekbdIndicatorConfig * ind_config)
+{
+	ind_config->foreground_color =
+	    g_settings_get_string (ind_config->settings,
+	                           CAFEKBD_INDICATOR_CONFIG_KEY_FOREGROUND_COLOR);
+
+	if (ind_config->foreground_color == NULL ||
+	    ind_config->foreground_color[0] == '\0') {
+		CtkWidgetPath *widget_path = ctk_widget_path_new ();
+		CtkStyleContext *context = ctk_style_context_new ();
+		CdkRGBA fg_color;
+
+		ctk_widget_path_append_type (widget_path, CTK_TYPE_WINDOW);
+		ctk_widget_path_iter_set_name (widget_path, -1 , "PanelWidget");
+
+		ctk_style_context_set_path (context, widget_path);
+		ctk_style_context_set_screen (context, cdk_screen_get_default ());
+		ctk_style_context_set_state (context, CTK_STATE_FLAG_NORMAL);
+		ctk_style_context_add_class (context, CTK_STYLE_CLASS_DEFAULT);
+		ctk_style_context_add_class (context, "gnome-panel-menu-bar");
+		ctk_style_context_add_class (context, "cafe-panel-menu-bar");
+
+		ctk_style_context_get_color (context,
+		                             CTK_STATE_FLAG_NORMAL, &fg_color);
+		ind_config->foreground_color =
+		    g_strdup_printf ("%g %g %g",
+		                     fg_color.red,
+		                     fg_color.green,
+		                     fg_color.blue);
+
+		g_object_unref (G_OBJECT (context));
+		ctk_widget_path_unref (widget_path);
+	}
+
+	ind_config->background_color =
+	    g_settings_get_string (ind_config->settings,
+				     CAFEKBD_INDICATOR_CONFIG_KEY_BACKGROUND_COLOR);
+}
+
+void
+cafekbd_indicator_config_refresh_style (CafekbdIndicatorConfig * ind_config)
+{
+	g_free (ind_config->font_family);
+	g_free (ind_config->foreground_color);
+	g_free (ind_config->background_color);
+	cafekbd_indicator_config_load_font (ind_config);
+	cafekbd_indicator_config_load_colors (ind_config);
+}
+
+gchar *
+cafekbd_indicator_config_get_images_file (CafekbdIndicatorConfig *
+				       ind_config,
+				       CafekbdKeyboardConfig *
+				       kbd_config, int group)
+{
+	char *image_file = NULL;
+	CtkIconInfo *icon_info = NULL;
+
+	if (!ind_config->show_flags)
+		return NULL;
+
+	if ((kbd_config->layouts_variants != NULL) &&
+	    (g_strv_length (kbd_config->layouts_variants) > group)) {
+		char *full_layout_name =
+		    kbd_config->layouts_variants[group];
+
+		if (full_layout_name != NULL) {
+			char *l, *v;
+			cafekbd_keyboard_config_split_items (full_layout_name,
+							  &l, &v);
+			if (l != NULL) {
+				/* probably there is something in theme? */
+				icon_info = ctk_icon_theme_lookup_icon
+				    (ind_config->icon_theme, l, 48, 0);
+
+				/* Unbelievable but happens */
+				if (icon_info != NULL &&
+				    ctk_icon_info_get_filename (icon_info) == NULL) {
+					g_object_unref (icon_info);
+					icon_info = NULL;
+				}
+			}
+		}
+	}
+	/* fallback to the default value */
+	if (icon_info == NULL) {
+		icon_info = ctk_icon_theme_lookup_icon
+		    (ind_config->icon_theme, "stock_dialog-error", 48, 0);
+	}
+	if (icon_info != NULL) {
+		image_file =
+		    g_strdup (ctk_icon_info_get_filename (icon_info));
+		g_object_unref (icon_info);
+	}
+
+	return image_file;
+}
+
+void
+cafekbd_indicator_config_load_image_filenames (CafekbdIndicatorConfig *
+					    ind_config,
+					    CafekbdKeyboardConfig *
+					    kbd_config)
+{
+	int i;
+	ind_config->image_filenames = NULL;
+
+	if (!ind_config->show_flags)
+		return;
+
+	for (i = xkl_engine_get_max_num_groups (ind_config->engine);
+	     --i >= 0;) {
+		gchar *image_file =
+		    cafekbd_indicator_config_get_images_file (ind_config,
+							   kbd_config,
+							   i);
+		ind_config->image_filenames =
+		    g_slist_prepend (ind_config->image_filenames,
+				     image_file);
+	}
+}
+
+void
+cafekbd_indicator_config_free_image_filenames (CafekbdIndicatorConfig *
+					    ind_config)
+{
+	while (ind_config->image_filenames) {
+		if (ind_config->image_filenames->data)
+			g_free (ind_config->image_filenames->data);
+		ind_config->image_filenames =
+		    g_slist_delete_link (ind_config->image_filenames,
+					 ind_config->image_filenames);
+	}
+}
+
+void
+cafekbd_indicator_config_init (CafekbdIndicatorConfig * ind_config,
+			       XklEngine * engine)
+{
+	gchar *sp;
+
+	memset (ind_config, 0, sizeof (*ind_config));
+	ind_config->settings = g_settings_new (CAFEKBD_INDICATOR_CONFIG_SCHEMA);
+	ind_config->engine = engine;
+
+	ind_config->icon_theme = ctk_icon_theme_get_default ();
+
+	ctk_icon_theme_append_search_path (ind_config->icon_theme, sp =
+					   g_build_filename (g_get_home_dir
+							     (),
+							     ".icons/flags",
+							     NULL));
+	g_free (sp);
+
+	ctk_icon_theme_append_search_path (ind_config->icon_theme,
+					   sp =
+					   g_build_filename (DATADIR,
+							     "pixmaps/flags",
+							     NULL));
+	g_free (sp);
+
+	ctk_icon_theme_append_search_path (ind_config->icon_theme,
+					   sp =
+					   g_build_filename (DATADIR,
+							     "icons/flags",
+							     NULL));
+	g_free (sp);
+}
+
+void
+cafekbd_indicator_config_term (CafekbdIndicatorConfig * ind_config)
+{
+	g_free (ind_config->font_family);
+	ind_config->font_family = NULL;
+
+	g_free (ind_config->foreground_color);
+	ind_config->foreground_color = NULL;
+
+	g_free (ind_config->background_color);
+	ind_config->background_color = NULL;
+
+	ind_config->icon_theme = NULL;
+
+	cafekbd_indicator_config_free_image_filenames (ind_config);
+
+	g_object_unref (ind_config->settings);
+	ind_config->settings = NULL;
+}
+
+void
+cafekbd_indicator_config_load_from_gsettings (CafekbdIndicatorConfig * ind_config)
+{
+	ind_config->secondary_groups_mask =
+	    g_settings_get_int (ind_config->settings,
+				CAFEKBD_INDICATOR_CONFIG_KEY_SECONDARIES);
+
+	ind_config->show_flags =
+	    g_settings_get_boolean (ind_config->settings,
+				 CAFEKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS);
+
+	cafekbd_indicator_config_load_font (ind_config);
+	cafekbd_indicator_config_load_colors (ind_config);
+
+}
+
+void
+cafekbd_indicator_config_save_to_gsettings (CafekbdIndicatorConfig * ind_config)
+{
+	g_settings_delay (ind_config->settings);
+
+	g_settings_set_int (ind_config->settings,
+				  CAFEKBD_INDICATOR_CONFIG_KEY_SECONDARIES,
+				  ind_config->secondary_groups_mask);
+	g_settings_set_boolean (ind_config->settings,
+				   CAFEKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS,
+				   ind_config->show_flags);
+
+	g_settings_apply (ind_config->settings);
+}
+
+void
+cafekbd_indicator_config_activate (CafekbdIndicatorConfig * ind_config)
+{
+	xkl_engine_set_secondary_groups_mask (ind_config->engine,
+					      ind_config->secondary_groups_mask);
+}
+
+/**
+ * cafekbd_indicator_config_start_listen:
+ * @func: (scope notified): a function to call when settings are changed
+ */
+void
+cafekbd_indicator_config_start_listen (CafekbdIndicatorConfig *
+				    ind_config,
+				    GCallback func,
+				    gpointer user_data)
+{
+	ind_config->config_listener_id =
+	    g_signal_connect (ind_config->settings, "changed", func,
+			      user_data);
+}
+
+void
+cafekbd_indicator_config_stop_listen (CafekbdIndicatorConfig * ind_config)
+{
+	g_signal_handler_disconnect (ind_config->settings,
+				     ind_config->config_listener_id);
+	ind_config->config_listener_id = 0;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/2.html b/2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/2.html new file mode 100644 index 0000000..4489934 --- /dev/null +++ b/2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/2.html @@ -0,0 +1,2100 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
+871
+872
+873
+874
+875
+876
+877
+878
+879
+880
+881
+882
+883
+884
+885
+886
+887
+888
+889
+890
+891
+892
+893
+894
+895
+896
+897
+898
+899
+900
+901
+902
+903
+904
+905
+906
+907
+908
+909
+910
+911
+912
+913
+914
+915
+916
+917
+918
+919
+920
+921
+922
+923
+924
+925
+926
+927
+928
+929
+930
+931
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+#include <config.h>
+
+#include <memory.h>
+
+#include <ctk/ctk.h>
+#include <cdk/cdkkeysyms.h>
+#include <cdk/cdkx.h>
+#include <glib/gi18n-lib.h>
+
+#include <cafekbd-indicator.h>
+#include <cafekbd-indicator-marshal.h>
+
+#include <cafekbd-desktop-config.h>
+#include <cafekbd-indicator-config.h>
+
+typedef struct _gki_globals {
+	XklEngine *engine;
+	XklConfigRegistry *registry;
+
+	CafekbdDesktopConfig cfg;
+	CafekbdIndicatorConfig ind_cfg;
+	CafekbdKeyboardConfig kbd_cfg;
+
+	const gchar *tooltips_format;
+	gchar **full_group_names;
+	gchar **short_group_names;
+	GSList *widget_instances;
+	GSList *images;
+} gki_globals;
+
+struct _CafekbdIndicatorPrivate {
+	gboolean set_parent_tooltips;
+	gdouble angle;
+};
+
+/* one instance for ALL widgets */
+static gki_globals globals;
+
+#define ForAllIndicators() \
+	{ \
+		GSList* cur; \
+		for (cur = globals.widget_instances; cur != NULL; cur = cur->next) { \
+			CafekbdIndicator * gki = (CafekbdIndicator*)cur->data;
+#define NextIndicator() \
+		} \
+	}
+
+G_DEFINE_TYPE (CafekbdIndicator, cafekbd_indicator, CTK_TYPE_NOTEBOOK)<--- There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
+
+static void
+cafekbd_indicator_global_init (void);
+static void
+cafekbd_indicator_global_term (void);
+static CtkWidget *
+cafekbd_indicator_prepare_drawing (CafekbdIndicator * gki, int group);
+static void
+cafekbd_indicator_set_current_page_for_group (CafekbdIndicator * gki, int group);
+static void
+cafekbd_indicator_set_current_page (CafekbdIndicator * gki);
+static void
+cafekbd_indicator_cleanup (CafekbdIndicator * gki);
+static void
+cafekbd_indicator_fill (CafekbdIndicator * gki);
+static void
+cafekbd_indicator_set_tooltips (CafekbdIndicator * gki, const char *str);
+
+gchar *
+cafekbd_indicator_extract_layout_name (int group, XklEngine *engine, CafekbdKeyboardConfig *kbd_cfg, gchar **short_group_names, gchar **full_group_names);
+gchar *
+cafekbd_indicator_create_label_title (int group, GHashTable **ln2cnt_map, gchar *layout_name);
+
+static void
+cafekbd_indicator_load_images (void)
+{
+	int i;
+	GSList *image_filename;
+
+	globals.images = NULL;
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	if (!globals.ind_cfg.show_flags)
+		return;
+
+	image_filename = globals.ind_cfg.image_filenames;
+
+	for (i = xkl_engine_get_max_num_groups (globals.engine);
+	     --i >= 0; image_filename = image_filename->next) {
+		GdkPixbuf *image = NULL;
+		char *image_file = (char *) image_filename->data;
+
+		if (image_file != NULL) {
+			GError *gerror = NULL;
+			image =
+			    gdk_pixbuf_new_from_file (image_file, &gerror);
+			if (image == NULL) {
+				CtkWidget *dialog =
+				    ctk_message_dialog_new (NULL,
+							    CTK_DIALOG_DESTROY_WITH_PARENT,
+							    CTK_MESSAGE_ERROR,
+							    CTK_BUTTONS_OK,
+							    _
+							    ("There was an error loading an image: %s"),
+							    gerror->
+							    message);
+				g_signal_connect (G_OBJECT (dialog),
+						  "response",
+						  G_CALLBACK
+						  (ctk_widget_destroy),
+						  NULL);
+
+				ctk_window_set_resizable (CTK_WINDOW
+							  (dialog), FALSE);
+
+				ctk_widget_show (dialog);
+				g_error_free (gerror);
+			}
+			xkl_debug (150,
+				   "Image %d[%s] loaded -> %p[%dx%d]\n",
+				   i, image_file, image,
+				   gdk_pixbuf_get_width (image),
+				   gdk_pixbuf_get_height (image));
+		}
+		/* We append the image anyway - even if it is NULL! */
+		globals.images = g_slist_append (globals.images, image);
+	}
+}
+
+static void
+cafekbd_indicator_free_images (void)
+{
+	GSList *img_node;
+
+	cafekbd_indicator_config_free_image_filenames (&globals.ind_cfg);
+
+	while ((img_node = globals.images) != NULL) {
+		GdkPixbuf *pi;
+
+		pi = GDK_PIXBUF (img_node->data);
+		/* It can be NULL - some images may be missing */
+		if (pi != NULL) {
+			g_object_unref (pi);
+		}
+		globals.images =
+		    g_slist_remove_link (globals.images, img_node);
+		g_slist_free_1 (img_node);
+	}
+}
+
+static void
+cafekbd_indicator_update_images (void)
+{
+	cafekbd_indicator_free_images ();
+	cafekbd_indicator_load_images ();
+}
+
+void
+cafekbd_indicator_set_tooltips (CafekbdIndicator * gki, const char *str)
+{
+	g_assert (str == NULL || g_utf8_validate (str, -1, NULL));
+
+	ctk_widget_set_tooltip_text (CTK_WIDGET (gki), str);
+
+	if (gki->priv->set_parent_tooltips) {
+		CtkWidget *parent =
+		    ctk_widget_get_parent (CTK_WIDGET (gki));
+		if (parent) {
+			ctk_widget_set_tooltip_text (parent, str);
+		}
+	}
+}
+
+void
+cafekbd_indicator_cleanup (CafekbdIndicator * gki)
+{
+	int i;
+	CtkNotebook *notebook = CTK_NOTEBOOK (gki);
+
+	/* Do not remove the first page! It is the default page */
+	for (i = ctk_notebook_get_n_pages (notebook); --i > 0;) {
+		ctk_notebook_remove_page (notebook, i);
+	}
+}
+
+void
+cafekbd_indicator_fill (CafekbdIndicator * gki)
+{
+	int grp;
+	int total_groups = xkl_engine_get_num_groups (globals.engine);
+	CtkNotebook *notebook = CTK_NOTEBOOK (gki);
+
+	for (grp = 0; grp < total_groups; grp++) {
+		CtkWidget *page;
+		page = cafekbd_indicator_prepare_drawing (gki, grp);
+
+		if (page == NULL)
+			page = ctk_label_new ("");
+
+		ctk_notebook_append_page (notebook, page, NULL);
+		ctk_widget_show_all (page);
+	}
+}
+
+static gboolean cafekbd_indicator_key_pressed (CtkWidget        *widget G_GNUC_UNUSED,
+					       CdkEventKey      *event,
+					       CafekbdIndicator *gki G_GNUC_UNUSED)
+{
+	switch (event->keyval)
+	{
+			case CDK_KEY_KP_Enter:
+			case CDK_KEY_ISO_Enter:
+			case CDK_KEY_3270_Enter:
+			case CDK_KEY_Return:
+			case CDK_KEY_space:
+			case CDK_KEY_KP_Space:
+			cafekbd_desktop_config_lock_next_group(&globals.cfg);
+			return TRUE;
+		default:
+			break;
+	}
+
+	return FALSE;
+}
+
+static gboolean
+cafekbd_indicator_button_pressed (CtkWidget        *widget,
+				  CdkEventButton   *event,
+				  CafekbdIndicator *gki G_GNUC_UNUSED)
+{
+	CtkWidget *img = ctk_bin_get_child (CTK_BIN (widget));
+	CtkAllocation allocation;
+	ctk_widget_get_allocation (img, &allocation);
+	xkl_debug (150, "Flag img size %d x %d\n",
+		   allocation.width, allocation.height);
+	if (event->button == 1 && event->type == CDK_BUTTON_PRESS) {
+		xkl_debug (150, "Mouse button pressed on applet\n");
+		cafekbd_desktop_config_lock_next_group (&globals.cfg);
+		return TRUE;
+	}
+	return FALSE;
+}
+
+static void
+draw_flag (CtkWidget * flag, cairo_t * cr, GdkPixbuf * image)
+{
+	/* Image width and height */
+	int iw = gdk_pixbuf_get_width (image);
+	int ih = gdk_pixbuf_get_height (image);
+	CtkAllocation allocation;
+	double xwiratio, ywiratio, wiratio;
+
+	ctk_widget_get_allocation (flag, &allocation);
+
+	/* widget-to-image scales, X and Y */
+	xwiratio = 1.0 * allocation.width / iw;
+	ywiratio = 1.0 * allocation.height / ih;
+	wiratio = xwiratio < ywiratio ? xwiratio : ywiratio;
+
+	/* transform cairo context */
+	cairo_translate (cr, allocation.width / 2.0, allocation.height / 2.0);
+	cairo_scale (cr, wiratio, wiratio);
+	cairo_translate (cr, - iw / 2.0, - ih / 2.0);
+
+	cdk_cairo_set_source_pixbuf (cr, image, 0, 0);
+	cairo_paint (cr);
+}
+
+gchar *
+cafekbd_indicator_extract_layout_name (int group, XklEngine * engine,
+				    CafekbdKeyboardConfig * kbd_cfg,
+				    gchar ** short_group_names,
+				    gchar ** full_group_names)
+{
+	char *layout_name = NULL;
+	if (group < g_strv_length (short_group_names)) {
+		if (xkl_engine_get_features (engine) &
+		    XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
+			char *full_layout_name =
+			    kbd_cfg->layouts_variants[group];
+			char *variant_name;
+			if (!cafekbd_keyboard_config_split_items
+			    (full_layout_name, &layout_name,
+			     &variant_name))
+				/* just in case */
+				layout_name = full_layout_name;
+
+			/* make it freeable */
+			layout_name = g_strdup (layout_name);
+
+			if (short_group_names != NULL) {
+				char *short_group_name =
+				    short_group_names[group];
+				if (short_group_name != NULL
+				    && *short_group_name != '\0') {
+					/* drop the long name */
+					g_free (layout_name);
+					layout_name =
+					    g_strdup (short_group_name);
+				}
+			}
+		} else {
+			layout_name = g_strdup (full_group_names[group]);
+		}
+	}
+
+	if (layout_name == NULL)
+		layout_name = g_strdup ("");
+
+	return layout_name;
+}
+
+gchar *
+cafekbd_indicator_create_label_title (int group, GHashTable ** ln2cnt_map,
+				   gchar * layout_name)
+{
+	gpointer pcounter = NULL;
+	char *prev_layout_name = NULL;
+	char *lbl_title = NULL;
+	int counter = 0;
+
+	if (group == 0) {
+		*ln2cnt_map =
+		    g_hash_table_new_full (g_str_hash, g_str_equal,
+					   g_free, NULL);
+	}
+
+	/* Process layouts with repeating description */
+	if (g_hash_table_lookup_extended
+	    (*ln2cnt_map, layout_name, (gpointer *) & prev_layout_name,
+	     &pcounter)) {
+		/* "next" same description */
+		gchar appendix[10] = "";
+		gint utf8length;
+		gunichar cidx;
+		counter = GPOINTER_TO_INT (pcounter);
+		/* Unicode subscript 2, 3, 4 */
+		cidx = 0x2081 + counter;
+		utf8length = g_unichar_to_utf8 (cidx, appendix);
+		appendix[utf8length] = '\0';
+		lbl_title = g_strconcat (layout_name, appendix, NULL);
+	} else {
+		/* "first" time this description */
+		lbl_title = g_strdup (layout_name);
+	}
+	g_hash_table_insert (*ln2cnt_map, layout_name,
+			     GINT_TO_POINTER (counter + 1));
+	return lbl_title;
+}
+
+static CtkWidget *
+cafekbd_indicator_prepare_drawing (CafekbdIndicator * gki, int group)
+{
+	gpointer pimage;
+	CtkWidget *ebox;
+
+	pimage = g_slist_nth_data (globals.images, group);
+	ebox = ctk_event_box_new ();
+	ctk_event_box_set_visible_window (CTK_EVENT_BOX (ebox), FALSE);
+	if (globals.ind_cfg.show_flags) {
+		GdkPixbuf *image;
+		CtkWidget *flag;
+
+		if (pimage == NULL)
+			return NULL;
+		image = GDK_PIXBUF (pimage);
+		flag = ctk_drawing_area_new ();
+		ctk_widget_add_events (CTK_WIDGET (flag),
+				       CDK_BUTTON_PRESS_MASK);
+		g_signal_connect (G_OBJECT (flag), "draw",
+		                  G_CALLBACK (draw_flag), image);
+		ctk_container_add (CTK_CONTAINER (ebox), flag);
+	} else {
+		char *lbl_title = NULL;
+		char *layout_name = NULL;
+		CtkWidget *label;
+		static GHashTable *ln2cnt_map = NULL;
+
+		layout_name =
+		    cafekbd_indicator_extract_layout_name (group,
+							globals.engine,
+							&globals.kbd_cfg,
+							globals.short_group_names,
+							globals.full_group_names);
+
+		lbl_title =
+		    cafekbd_indicator_create_label_title (group,
+						       &ln2cnt_map,
+						       layout_name);
+
+		label = ctk_label_new (lbl_title);
+		ctk_widget_set_halign (label, CTK_ALIGN_CENTER);
+		ctk_widget_set_valign (label, CTK_ALIGN_CENTER);
+		ctk_widget_set_margin_start (label, 2);
+		ctk_widget_set_margin_end (label, 2);
+		ctk_widget_set_margin_top (label, 2);
+		ctk_widget_set_margin_bottom (label, 2);
+		g_free (lbl_title);
+		ctk_label_set_angle (CTK_LABEL (label), gki->priv->angle);
+
+		if (group + 1 ==
+		    xkl_engine_get_num_groups (globals.engine)) {
+			g_hash_table_destroy (ln2cnt_map);
+			ln2cnt_map = NULL;
+		}
+
+		ctk_container_add (CTK_CONTAINER (ebox), label);
+	}
+
+	g_signal_connect (G_OBJECT (ebox),
+			  "button_press_event",
+			  G_CALLBACK (cafekbd_indicator_button_pressed), gki);
+
+	g_signal_connect (G_OBJECT (gki),
+			  "key_press_event",
+			  G_CALLBACK (cafekbd_indicator_key_pressed), gki);
+
+	/* We have everything prepared for that size */
+
+	return ebox;
+}
+
+static void
+cafekbd_indicator_update_tooltips (CafekbdIndicator * gki)
+{
+	XklState *state = xkl_engine_get_current_state (globals.engine);
+	gchar *buf;
+	if (state == NULL || state->group < 0
+	    || state->group >= g_strv_length (globals.full_group_names))
+		return;
+
+	buf = g_strdup_printf (globals.tooltips_format,
+			       globals.full_group_names[state->group]);
+
+	cafekbd_indicator_set_tooltips (gki, buf);
+	g_free (buf);
+}
+
+static void
+cafekbd_indicator_parent_set (CtkWidget *gki,
+			      CtkWidget *previous_parent G_GNUC_UNUSED)
+{
+	cafekbd_indicator_update_tooltips (CAFEKBD_INDICATOR (gki));
+}
+
+
+void
+cafekbd_indicator_reinit_ui (CafekbdIndicator * gki)
+{
+	cafekbd_indicator_cleanup (gki);
+	cafekbd_indicator_fill (gki);
+
+	cafekbd_indicator_set_current_page (gki);
+
+	g_signal_emit_by_name (gki, "reinit-ui");
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+			       gchar     *key G_GNUC_UNUSED,
+			       gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "General configuration changed in GSettings - reiniting...\n");
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+	ForAllIndicators () {
+		cafekbd_indicator_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_ind_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+				   gchar     *key G_GNUC_UNUSED,
+				   gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "Applet configuration changed in GSettings - reiniting...\n");
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+	cafekbd_indicator_update_images ();
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	ForAllIndicators () {
+		cafekbd_indicator_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+static void
+cafekbd_indicator_load_group_names (const gchar ** layout_ids,
+				 const gchar ** variant_ids)
+{
+	if (!cafekbd_desktop_config_load_group_descriptions
+	    (&globals.cfg, globals.registry, layout_ids, variant_ids,
+	     &globals.short_group_names, &globals.full_group_names)) {
+		/* We just populate no short names (remain NULL) -
+		 * full names are going to be used anyway */
+		gint i, total_groups =
+		    xkl_engine_get_num_groups (globals.engine);
+		globals.full_group_names =
+		    g_new0 (gchar *, total_groups + 1);
+
+		if (xkl_engine_get_features (globals.engine) &
+		    XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
+			gchar **lst = globals.kbd_cfg.layouts_variants;
+			for (i = 0; *lst; lst++, i++) {
+				globals.full_group_names[i] =
+				    g_strdup ((char *) *lst);
+			}
+		} else {
+			for (i = total_groups; --i >= 0;) {
+				globals.full_group_names[i] =
+				    g_strdup_printf ("Group %d", i);
+			}
+		}
+	}
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_kbd_cfg_callback (CafekbdIndicator *gki G_GNUC_UNUSED)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+	xkl_debug (100,
+		   "XKB configuration changed on X Server - reiniting...\n");
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+	cafekbd_indicator_update_images ();
+
+	g_strfreev (globals.full_group_names);
+	globals.full_group_names = NULL;
+
+	if (globals.short_group_names != NULL) {
+		g_strfreev (globals.short_group_names);
+		globals.short_group_names = NULL;
+	}
+
+	cafekbd_indicator_load_group_names ((const gchar **) xklrec->layouts,
+					 (const gchar **)
+					 xklrec->variants);
+
+	ForAllIndicators () {
+		cafekbd_indicator_reinit_ui (gki);
+	} NextIndicator ();
+	g_object_unref (G_OBJECT (xklrec));
+}
+
+/* Should be called once for all applets */
+static void
+cafekbd_indicator_state_callback (XklEngine           *engine G_GNUC_UNUSED,
+				  XklEngineStateChange changeType,
+				  gint                 group,
+				  gboolean             restore)
+{
+	xkl_debug (150, "group is now %d, restore: %d\n", group, restore);
+
+	if (changeType == GROUP_CHANGED) {
+		ForAllIndicators () {
+			xkl_debug (200, "do repaint\n");
+			cafekbd_indicator_set_current_page_for_group
+			    (gki, group);
+		}
+		NextIndicator ();
+	}
+}
+
+
+void
+cafekbd_indicator_set_current_page (CafekbdIndicator * gki)
+{
+	XklState *cur_state;
+	cur_state = xkl_engine_get_current_state (globals.engine);
+	if (cur_state->group >= 0)
+		cafekbd_indicator_set_current_page_for_group (gki,
+							   cur_state->
+							   group);
+}
+
+void
+cafekbd_indicator_set_current_page_for_group (CafekbdIndicator * gki, int group)
+{
+	xkl_debug (200, "Revalidating for group %d\n", group);
+
+	ctk_notebook_set_current_page (CTK_NOTEBOOK (gki), group + 1);
+
+	cafekbd_indicator_update_tooltips (gki);
+}
+
+/* Should be called once for all widgets */
+static CdkFilterReturn
+cafekbd_indicator_filter_x_evt (CdkXEvent *xev,
+				CdkEvent  *event G_GNUC_UNUSED)
+{
+	XEvent *xevent = (XEvent *) xev;
+
+	xkl_engine_filter_events (globals.engine, xevent);
+	switch (xevent->type) {
+	case ReparentNotify:
+		{
+			XReparentEvent *rne = (XReparentEvent *) xev;
+
+			ForAllIndicators () {
+				CdkWindow *w =
+				    ctk_widget_get_parent_window
+				    (CTK_WIDGET (gki));
+
+				/* compare the indicator's parent window with the even window */
+				if (w != NULL
+				    && CDK_WINDOW_XID (w) == rne->window) {
+					/* if so - make it transparent... */
+					xkl_engine_set_window_transparent
+					    (globals.engine, rne->window,
+					     TRUE);
+				}
+			}
+			NextIndicator ()
+		}
+		break;
+	}
+	return CDK_FILTER_CONTINUE;
+}
+
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_start_listen (void)
+{
+	cdk_window_add_filter (NULL, (CdkFilterFunc)
+			       cafekbd_indicator_filter_x_evt, NULL);
+	cdk_window_add_filter (cdk_get_default_root_window (),
+			       (CdkFilterFunc)
+			       cafekbd_indicator_filter_x_evt, NULL);
+
+	xkl_engine_start_listen (globals.engine,
+				 XKLL_TRACK_KEYBOARD_STATE);
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_stop_listen (void)
+{
+	xkl_engine_stop_listen (globals.engine, XKLL_TRACK_KEYBOARD_STATE);
+
+	cdk_window_remove_filter (NULL, (CdkFilterFunc)
+				  cafekbd_indicator_filter_x_evt, NULL);
+	cdk_window_remove_filter
+	    (cdk_get_default_root_window (),
+	     (CdkFilterFunc) cafekbd_indicator_filter_x_evt, NULL);
+}
+
+static gboolean
+cafekbd_indicator_scroll (CtkWidget      *gki G_GNUC_UNUSED,
+			  CdkEventScroll *event G_GNUC_UNUSED)
+{
+	/* mouse wheel events should be ignored, otherwise funny effects appear */
+	return TRUE;
+}
+
+static void cafekbd_indicator_init(CafekbdIndicator* gki)
+{
+	CtkWidget *def_drawing;
+	CtkNotebook *notebook;
+
+	if (!g_slist_length(globals.widget_instances))
+	{
+		cafekbd_indicator_global_init();
+	}
+
+	gki->priv = g_new0 (CafekbdIndicatorPrivate, 1);
+
+	notebook = CTK_NOTEBOOK (gki);
+
+	xkl_debug (100, "Initiating the widget startup process for %p\n", gki);
+
+	ctk_notebook_set_show_tabs (notebook, FALSE);
+	ctk_notebook_set_show_border (notebook, FALSE);
+
+	def_drawing =
+	    ctk_image_new_from_icon_name ("process-stop",
+				      CTK_ICON_SIZE_BUTTON);
+
+	ctk_notebook_append_page (notebook, def_drawing,
+				  ctk_label_new (""));
+
+	if (globals.engine == NULL) {
+		cafekbd_indicator_set_tooltips (gki,
+					     _
+					     ("XKB initialization error"));
+		return;
+	}
+
+	cafekbd_indicator_set_tooltips (gki, NULL);
+
+	cafekbd_indicator_fill (gki);
+	cafekbd_indicator_set_current_page (gki);
+
+	ctk_widget_add_events (CTK_WIDGET (gki), CDK_BUTTON_PRESS_MASK);
+
+	/* append AFTER all initialization work is finished */
+	globals.widget_instances =
+	    g_slist_append (globals.widget_instances, gki);
+}
+
+static void
+cafekbd_indicator_finalize (GObject * obj)
+{
+	CafekbdIndicator *gki = CAFEKBD_INDICATOR (obj);
+	xkl_debug (100,
+		   "Starting the cafe-kbd-indicator widget shutdown process for %p\n",
+		   gki);
+
+	/* remove BEFORE all termination work is finished */
+	globals.widget_instances =
+	    g_slist_remove (globals.widget_instances, gki);
+
+	cafekbd_indicator_cleanup (gki);
+
+	xkl_debug (100,
+		   "The instance of cafe-kbd-indicator successfully finalized\n");
+
+	g_free (gki->priv);
+
+	G_OBJECT_CLASS (cafekbd_indicator_parent_class)->finalize (obj);
+
+	if (!g_slist_length (globals.widget_instances))
+		cafekbd_indicator_global_term ();
+}
+
+static void
+cafekbd_indicator_global_term (void)
+{
+	xkl_debug (100, "*** Last  CafekbdIndicator instance *** \n");
+	cafekbd_indicator_stop_listen ();
+
+	cafekbd_desktop_config_stop_listen (&globals.cfg);
+	cafekbd_indicator_config_stop_listen (&globals.ind_cfg);
+
+	cafekbd_indicator_config_term (&globals.ind_cfg);
+	cafekbd_keyboard_config_term (&globals.kbd_cfg);
+	cafekbd_desktop_config_term (&globals.cfg);
+
+	g_object_unref (G_OBJECT (globals.registry));
+	globals.registry = NULL;
+	g_object_unref (G_OBJECT (globals.engine));
+	globals.engine = NULL;
+	xkl_debug (100, "*** Terminated globals *** \n");
+}
+
+static void
+cafekbd_indicator_class_init (CafekbdIndicatorClass * klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+	CtkWidgetClass *widget_class = CTK_WIDGET_CLASS (klass);
+
+	xkl_debug (100, "*** First CafekbdIndicator instance *** \n");
+
+	memset (&globals, 0, sizeof (globals));
+
+	/* Initing some global vars */
+	globals.tooltips_format = "%s";
+
+	/* Initing vtable */
+	object_class->finalize = cafekbd_indicator_finalize;
+
+	widget_class->scroll_event = cafekbd_indicator_scroll;
+	widget_class->parent_set = cafekbd_indicator_parent_set;
+
+	/* Signals */
+	g_signal_new ("reinit-ui", CAFEKBD_TYPE_INDICATOR,
+		      G_SIGNAL_RUN_LAST,
+		      G_STRUCT_OFFSET (CafekbdIndicatorClass, reinit_ui),
+		      NULL, NULL, cafekbd_indicator_VOID__VOID,
+		      G_TYPE_NONE, 0);
+}
+
+static void
+cafekbd_indicator_global_init (void)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+
+	globals.engine = xkl_engine_get_instance(CDK_DISPLAY_XDISPLAY(cdk_display_get_default()));
+
+	if (globals.engine == NULL)
+	{
+		xkl_debug (0, "Libxklavier initialization error");
+		return;
+	}
+
+	g_signal_connect (globals.engine, "X-state-changed",
+			  G_CALLBACK (cafekbd_indicator_state_callback),
+			  NULL);
+	g_signal_connect (globals.engine, "X-config-changed",
+			  G_CALLBACK (cafekbd_indicator_kbd_cfg_callback),
+			  NULL);
+
+	cafekbd_desktop_config_init (&globals.cfg, globals.engine);
+	cafekbd_keyboard_config_init (&globals.kbd_cfg, globals.engine);
+	cafekbd_indicator_config_init (&globals.ind_cfg, globals.engine);
+
+	cafekbd_desktop_config_start_listen (&globals.cfg,
+					  (GCallback)
+					  cafekbd_indicator_cfg_changed,
+					  NULL);
+	cafekbd_indicator_config_start_listen (&globals.ind_cfg,
+					    (GCallback)
+					    cafekbd_indicator_ind_cfg_changed,
+					    NULL);
+
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+
+	globals.registry =
+	    xkl_config_registry_get_instance (globals.engine);
+	xkl_config_registry_load (globals.registry,
+				  globals.cfg.load_extra_items);
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+	cafekbd_indicator_update_images ();
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	cafekbd_indicator_load_group_names ((const gchar **) xklrec->layouts,
+					 (const gchar **)
+					 xklrec->variants);
+	g_object_unref (G_OBJECT (xklrec));
+
+	cafekbd_indicator_start_listen ();
+
+	xkl_debug (100, "*** Inited globals *** \n");
+}
+
+CtkWidget *
+cafekbd_indicator_new (void)
+{
+	return
+	    CTK_WIDGET (g_object_new (cafekbd_indicator_get_type (), NULL));
+}
+
+void
+cafekbd_indicator_set_parent_tooltips (CafekbdIndicator * gki, gboolean spt)
+{
+	gki->priv->set_parent_tooltips = spt;
+	cafekbd_indicator_update_tooltips (gki);
+}
+
+void
+cafekbd_indicator_set_tooltips_format (const gchar format[])
+{
+	globals.tooltips_format = format;
+	ForAllIndicators ()
+	    cafekbd_indicator_update_tooltips (gki);
+	NextIndicator ()
+}
+
+/**
+ * cafekbd_indicator_get_xkl_engine:
+ *
+ * Returns: (transfer none): The engine shared by all CafekbdIndicator objects
+ */
+XklEngine *
+cafekbd_indicator_get_xkl_engine ()
+{
+	return globals.engine;
+}
+
+/**
+ * cafekbd_indicator_get_group_names:
+ *
+ * Returns: (transfer none) (array zero-terminated=1): List of group names
+ */
+gchar **
+cafekbd_indicator_get_group_names ()
+{
+	return globals.full_group_names;
+}
+
+gchar *
+cafekbd_indicator_get_image_filename (guint group)
+{
+	if (!globals.ind_cfg.show_flags)
+		return NULL;
+	return cafekbd_indicator_config_get_images_file (&globals.ind_cfg,
+						      &globals.kbd_cfg,
+						      group);
+}
+
+gdouble
+cafekbd_indicator_get_max_width_height_ratio (void)
+{
+	gdouble rv = 0.0;
+	GSList *ip = globals.images;
+	if (!globals.ind_cfg.show_flags)
+		return 0;
+	while (ip != NULL) {
+		GdkPixbuf *img = GDK_PIXBUF (ip->data);
+		gdouble r =
+		    1.0 * gdk_pixbuf_get_width (img) /
+		    gdk_pixbuf_get_height (img);
+		if (r > rv)
+			rv = r;
+		ip = ip->next;
+	}
+	return rv;
+}
+
+void
+cafekbd_indicator_set_angle (CafekbdIndicator * gki, gdouble angle)
+{
+	gki->priv->angle = angle;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/3.html b/2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/3.html new file mode 100644 index 0000000..2dbd2a6 --- /dev/null +++ b/2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/3.html @@ -0,0 +1,1832 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <X11/keysym.h>
+
+#include <glib/gi18n-lib.h>
+
+#include <cafekbd-keyboard-config.h>
+#include <cafekbd-config-private.h>
+#include <cafekbd-util.h>
+
+/*
+ * CafekbdKeyboardConfig
+ */
+#define CAFEKBD_KEYBOARD_CONFIG_SCHEMA CAFEKBD_CONFIG_SCHEMA ".kbd"
+
+#define GROUP_SWITCHERS_GROUP "grp"
+#define DEFAULT_GROUP_SWITCH "grp:shift_caps_toggle"
+
+const gchar CAFEKBD_KEYBOARD_CONFIG_KEY_MODEL[] = "model";
+const gchar CAFEKBD_KEYBOARD_CONFIG_KEY_LAYOUTS[] = "layouts";
+const gchar CAFEKBD_KEYBOARD_CONFIG_KEY_OPTIONS[] = "options";
+
+const gchar *CAFEKBD_KEYBOARD_CONFIG_ACTIVE[] = {
+	CAFEKBD_KEYBOARD_CONFIG_KEY_MODEL,
+	CAFEKBD_KEYBOARD_CONFIG_KEY_LAYOUTS,
+	CAFEKBD_KEYBOARD_CONFIG_KEY_OPTIONS
+};
+
+/*
+ * static common functions
+ */
+
+static gboolean
+cafekbd_strv_equal (gchar ** l1, gchar ** l2)
+{
+	if (l1 == l2)
+		return TRUE;
+	if (l1 == NULL)
+		return g_strv_length (l2) == 0;
+	if (l2 == NULL)
+		return g_strv_length (l1) == 0;
+
+	while ((*l1 != NULL) && (*l2 != NULL)) {
+		if (*l1 != *l2) {
+			if (*l1 && *l2) {<--- Condition '*l1' is always true<--- Condition '*l2' is always true
+				if (g_ascii_strcasecmp (*l1, *l2))
+					return FALSE;
+			} else
+				return FALSE;
+		}
+
+		l1++;
+		l2++;
+	}
+	return (*l1 == NULL) && (*l2 == NULL);
+}
+
+gboolean
+cafekbd_keyboard_config_get_lv_descriptions (XklConfigRegistry *
+					  config_registry,
+					  const gchar * layout_name,
+					  const gchar * variant_name,
+					  gchar ** layout_short_descr,
+					  gchar ** layout_descr,
+					  gchar ** variant_short_descr,
+					  gchar ** variant_descr)
+{
+	/* TODO make it not static */
+	static XklConfigItem *litem = NULL;
+	static XklConfigItem *vitem = NULL;
+
+	if (litem == NULL)
+		litem = xkl_config_item_new ();
+	if (vitem == NULL)
+		vitem = xkl_config_item_new ();
+
+	layout_name = g_strdup (layout_name);
+
+	g_snprintf (litem->name, sizeof litem->name, "%s", layout_name);
+	if (xkl_config_registry_find_layout (config_registry, litem)) {
+		*layout_short_descr = litem->short_description;
+		*layout_descr = litem->description;
+	} else
+		*layout_short_descr = *layout_descr = NULL;
+
+	if (variant_name != NULL) {
+		variant_name = g_strdup (variant_name);
+		g_snprintf (vitem->name, sizeof vitem->name, "%s",
+			    variant_name);
+		if (xkl_config_registry_find_variant
+		    (config_registry, layout_name, vitem)) {
+			*variant_short_descr = vitem->short_description;
+			*variant_descr = vitem->description;
+		} else
+			*variant_short_descr = *variant_descr = NULL;
+
+		g_free ((char *) variant_name);
+	} else
+		*variant_descr = NULL;
+
+	g_free ((char *) layout_name);
+	return *layout_descr != NULL;
+}
+
+/*
+ * extern common functions
+ */
+const gchar *
+cafekbd_keyboard_config_merge_items (const gchar * parent,
+				  const gchar * child)
+{
+	static gchar buffer[XKL_MAX_CI_NAME_LENGTH * 2 - 1];
+	*buffer = '\0';
+	if (parent != NULL) {
+		if (strlen (parent) >= XKL_MAX_CI_NAME_LENGTH)
+			return NULL;
+		strcat (buffer, parent);
+	}
+	if (child != NULL && *child != 0) {
+		if (strlen (child) >= XKL_MAX_CI_NAME_LENGTH)
+			return NULL;
+		strcat (buffer, "\t");
+		strcat (buffer, child);
+	}
+	return buffer;
+}
+
+gboolean
+cafekbd_keyboard_config_split_items (const gchar * merged, gchar ** parent,
+				  gchar ** child)
+{
+	static gchar pbuffer[XKL_MAX_CI_NAME_LENGTH];
+	static gchar cbuffer[XKL_MAX_CI_NAME_LENGTH];
+	int plen;
+	const gchar *pos;
+	*parent = *child = NULL;
+
+	if (merged == NULL)
+		return FALSE;
+
+	pos = strchr (merged, '\t');
+	if (pos == NULL) {
+		plen = strlen (merged);
+	} else {
+		plen = pos - merged;
+		if (strlen (pos + 1) >= XKL_MAX_CI_NAME_LENGTH)
+			return FALSE;
+		strcpy (*child = cbuffer, pos + 1);
+	}
+	if (plen >= XKL_MAX_CI_NAME_LENGTH)
+		return FALSE;
+	memcpy (*parent = pbuffer, merged, plen);
+	pbuffer[plen] = '\0';
+	return TRUE;
+}
+
+/*
+ * static CafekbdKeyboardConfig functions
+ */
+static void
+cafekbd_keyboard_config_copy_from_xkl_config (CafekbdKeyboardConfig * kbd_config,
+					   XklConfigRec * pdata)
+{
+	char **p;
+	int i;
+	cafekbd_keyboard_config_model_set (kbd_config, pdata->model);
+	xkl_debug (150, "Loaded Kbd model: [%s]\n", pdata->model);
+
+	/* Layouts */
+	g_strfreev (kbd_config->layouts_variants);
+	kbd_config->layouts_variants = NULL;
+	if (pdata->layouts != NULL) {
+		char **p1;
+
+		p = pdata->layouts;
+		p1 = pdata->variants;
+		kbd_config->layouts_variants =
+		    g_new0 (gchar *, g_strv_length (pdata->layouts) + 1);
+		i = 0;
+		while (*p != NULL) {
+			const gchar *full_layout =
+			    cafekbd_keyboard_config_merge_items (*p, *p1);
+			xkl_debug (150,
+				   "Loaded Kbd layout (with variant): [%s]\n",
+				   full_layout);
+			kbd_config->layouts_variants[i++] =
+			    g_strdup (full_layout);
+			p++;
+			p1++;
+		}
+	}
+
+	/* Options */
+	g_strfreev (kbd_config->options);
+	kbd_config->options = NULL;
+
+	if (pdata->options != NULL) {
+		p = pdata->options;
+		kbd_config->options =
+		    g_new0 (gchar *, g_strv_length (pdata->options) + 1);
+		i = 0;
+		while (*p != NULL) {
+			char *option = *p;
+			char *delim =<--- Variable 'delim' can be declared as pointer to const
+			    (option != NULL) ? strchr (option, ':') : NULL;<--- Condition 'option!=NULL' is always true
+			int len;
+			if ((delim != NULL) &&
+			    ((len =
+			      (delim - option)) <
+			     XKL_MAX_CI_NAME_LENGTH)) {
+				char group[XKL_MAX_CI_NAME_LENGTH];
+
+				strncpy (group, option, len);
+				group[len] = 0;
+				xkl_debug (150,
+					   "Loaded Kbd option: [%s][%s]\n",
+					   group, option);
+				cafekbd_keyboard_config_options_set
+				    (kbd_config, i++, group, option);
+			}
+			p++;
+		}
+	}
+}
+
+static void
+cafekbd_keyboard_config_copy_to_xkl_config (CafekbdKeyboardConfig * kbd_config,
+					 XklConfigRec * pdata)
+{
+	int i;
+	int num_layouts, num_options;
+	pdata->model =
+	    (kbd_config->model ==
+	     NULL) ? NULL : g_strdup (kbd_config->model);
+
+	num_layouts =
+	    (kbd_config->layouts_variants ==
+	     NULL) ? 0 : g_strv_length (kbd_config->layouts_variants);
+	num_options =
+	    (kbd_config->options ==
+	     NULL) ? 0 : g_strv_length (kbd_config->options);
+
+	xkl_debug (150, "Taking %d layouts\n", num_layouts);
+	if (num_layouts != 0) {
+		gchar **the_layout_variant = kbd_config->layouts_variants;
+		char **p1 = pdata->layouts =
+		    g_new0 (char *, num_layouts + 1);
+		char **p2 = pdata->variants =
+		    g_new0 (char *, num_layouts + 1);
+		for (i = num_layouts; --i >= 0;) {
+			char *layout, *variant;
+			if (cafekbd_keyboard_config_split_items
+			    (*the_layout_variant, &layout, &variant)
+			    && variant != NULL) {
+				*p1 =
+				    (layout ==
+				     NULL) ? g_strdup ("") :
+				    g_strdup (layout);
+				*p2 =
+				    (variant ==<--- Condition 'variant==NULL' is always false
+				     NULL) ? g_strdup ("") :
+				    g_strdup (variant);
+			} else {
+				*p1 =
+				    (*the_layout_variant ==
+				     NULL) ? g_strdup ("") :
+				    g_strdup (*the_layout_variant);
+				*p2 = g_strdup ("");
+			}
+			xkl_debug (150, "Adding [%s]/%p and [%s]/%p\n",
+				   *p1 ? *p1 : "(nil)", *p1,
+				   *p2 ? *p2 : "(nil)", *p2);
+			p1++;
+			p2++;
+			the_layout_variant++;
+		}
+	}
+
+	if (num_options != 0) {
+		gchar **the_option = kbd_config->options;
+		char **p = pdata->options =
+		    g_new0 (char *, num_options + 1);
+		for (i = num_options; --i >= 0;) {
+			char *group, *option;
+			if (cafekbd_keyboard_config_split_items
+			    (*the_option, &group, &option)
+			    && option != NULL)
+				*(p++) = g_strdup (option);
+			else {
+				*(p++) = g_strdup ("");
+				xkl_debug (150, "Could not split [%s]\n",
+					   *the_option);
+			}
+			the_option++;
+		}
+	}
+}
+
+static void
+cafekbd_keyboard_config_load_params (CafekbdKeyboardConfig * kbd_config,
+				  const gchar * param_names[])
+{
+	gchar *pc;
+
+	pc = g_settings_get_string (kbd_config->settings, param_names[0]);
+	if (pc == NULL) {
+		cafekbd_keyboard_config_model_set (kbd_config, NULL);
+	} else {
+		cafekbd_keyboard_config_model_set (kbd_config, pc);
+		g_free (pc);
+	}
+	xkl_debug (150, "Loaded Kbd model: [%s]\n",
+		   kbd_config->model ? kbd_config->model : "(null)");
+
+	g_strfreev (kbd_config->layouts_variants);
+
+	kbd_config->layouts_variants =
+	    g_settings_get_strv (kbd_config->settings, param_names[1]);
+
+	if (kbd_config->layouts_variants != NULL
+	    && kbd_config->layouts_variants[0] == NULL) {
+		g_strfreev (kbd_config->layouts_variants);
+		kbd_config->layouts_variants = NULL;
+	}
+
+	g_strfreev (kbd_config->options);
+
+	kbd_config->options =
+	    g_settings_get_strv (kbd_config->settings, param_names[2]);
+
+	if (kbd_config->options != NULL && kbd_config->options[0] == NULL) {
+		g_strfreev (kbd_config->options);
+		kbd_config->options = NULL;
+	}
+}
+
+static void
+cafekbd_keyboard_config_save_params (CafekbdKeyboardConfig * kbd_config,
+				  const gchar * param_names[])
+{
+	gchar **pl;
+
+	if (kbd_config->model)
+		g_settings_set_string (kbd_config->settings, param_names[0],
+				       kbd_config->model);
+	else
+		g_settings_set_string (kbd_config->settings, param_names[0],
+				       NULL);
+	xkl_debug (150, "Saved Kbd model: [%s]\n",
+		   kbd_config->model ? kbd_config->model : "(null)");
+
+	if (kbd_config->layouts_variants) {
+		pl = kbd_config->layouts_variants;
+		while (*pl != NULL) {
+			xkl_debug (150, "Saved Kbd layout: [%s]\n", *pl);
+			pl++;
+		}
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[1],
+				     (const gchar * const *)
+				     kbd_config->layouts_variants);
+	} else {
+		xkl_debug (150, "Saved Kbd layouts: []\n");
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[1], NULL);
+	}
+
+	if (kbd_config->options) {
+		pl = kbd_config->options;
+		while (*pl != NULL) {
+			xkl_debug (150, "Saved Kbd option: [%s]\n", *pl);
+			pl++;
+		}
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[2],
+				     (const gchar *
+				      const *) kbd_config->options);
+	} else {
+		xkl_debug (150, "Saved Kbd options: []\n");
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[2], NULL);
+	}
+}
+
+/*
+ * extern CafekbdKeyboardConfig config functions
+ */
+void
+cafekbd_keyboard_config_init (CafekbdKeyboardConfig * kbd_config,
+			      XklEngine * engine)
+{
+	memset (kbd_config, 0, sizeof (*kbd_config));
+	kbd_config->settings = g_settings_new (CAFEKBD_KEYBOARD_CONFIG_SCHEMA);
+	kbd_config->engine = engine;
+}
+
+void
+cafekbd_keyboard_config_term (CafekbdKeyboardConfig * kbd_config)
+{
+	cafekbd_keyboard_config_model_set (kbd_config, NULL);
+
+	g_strfreev (kbd_config->layouts_variants);
+	kbd_config->layouts_variants = NULL;
+	g_strfreev (kbd_config->options);
+	kbd_config->options = NULL;
+
+	g_object_unref (kbd_config->settings);
+	kbd_config->settings = NULL;
+}
+
+void
+cafekbd_keyboard_config_load_from_gsettings (CafekbdKeyboardConfig * kbd_config,
+				      CafekbdKeyboardConfig *
+				      kbd_config_default)
+{
+	cafekbd_keyboard_config_load_params (kbd_config,
+					  CAFEKBD_KEYBOARD_CONFIG_ACTIVE);
+
+	if (kbd_config_default != NULL) {
+
+		if (kbd_config->model == NULL)
+			kbd_config->model =
+			    g_strdup (kbd_config_default->model);
+
+		if (kbd_config->layouts_variants == NULL) {
+			kbd_config->layouts_variants =
+			    g_strdupv
+			    (kbd_config_default->layouts_variants);
+		}
+
+		if (kbd_config->options == NULL) {
+			kbd_config->options =
+			    g_strdupv (kbd_config_default->options);
+		}
+	}
+}
+
+void
+cafekbd_keyboard_config_load_from_x_current (CafekbdKeyboardConfig * kbd_config,
+					  XklConfigRec * data)
+{
+	gboolean own_data = data == NULL;
+	xkl_debug (150, "Copying config from X(current)\n");
+	if (own_data)
+		data = xkl_config_rec_new ();
+	if (xkl_config_rec_get_from_server (data, kbd_config->engine))
+		cafekbd_keyboard_config_copy_from_xkl_config (kbd_config,
+							   data);
+	else
+		xkl_debug (150,
+			   "Could not load keyboard config from server: [%s]\n",
+			   xkl_get_last_error ());
+	if (own_data)
+		g_object_unref (G_OBJECT (data));
+}
+
+void
+cafekbd_keyboard_config_load_from_x_initial (CafekbdKeyboardConfig * kbd_config,
+					  XklConfigRec * data)
+{
+	gboolean own_data = data == NULL;
+	xkl_debug (150, "Copying config from X(initial)\n");
+	if (own_data)
+		data = xkl_config_rec_new ();
+	if (xkl_config_rec_get_from_backup (data, kbd_config->engine))
+		cafekbd_keyboard_config_copy_from_xkl_config (kbd_config,
+							   data);
+	else
+		xkl_debug (150,
+			   "Could not load keyboard config from backup: [%s]\n",
+			   xkl_get_last_error ());
+	if (own_data)
+		g_object_unref (G_OBJECT (data));
+}
+
+static gboolean
+cafekbd_keyboard_config_options_equals (CafekbdKeyboardConfig * kbd_config1,
+				     CafekbdKeyboardConfig * kbd_config2)
+{
+	int num_options, num_options2;
+
+	num_options =
+	    (kbd_config1->options ==
+	     NULL) ? 0 : g_strv_length (kbd_config1->options);
+	num_options2 =
+	    (kbd_config2->options ==
+	     NULL) ? 0 : g_strv_length (kbd_config2->options);
+
+	if (num_options != num_options2)
+		return False;
+
+	if (num_options != 0) {
+		int i;
+		char *group1, *option1;
+
+		for (i = 0; i < num_options; i++) {
+			int j;
+			char *group2, *option2;
+			gboolean are_equal = FALSE;
+
+			if (!cafekbd_keyboard_config_split_items
+			    (kbd_config1->options[i], &group1, &option1))
+				continue;
+
+			option1 = g_strdup (option1);
+
+			for (j = 0; j < num_options && !are_equal; j++) {
+				if (cafekbd_keyboard_config_split_items
+				    (kbd_config2->options[j], &group2,
+				     &option2)) {
+					are_equal =
+					    strcmp (option1, option2) == 0;
+				}
+			}
+
+			g_free (option1);
+
+			if (!are_equal)
+				return False;
+		}
+	}
+
+	return True;
+}
+
+gboolean
+cafekbd_keyboard_config_equals (CafekbdKeyboardConfig * kbd_config1,
+			     CafekbdKeyboardConfig * kbd_config2)
+{
+	if (kbd_config1 == kbd_config2)
+		return True;
+	if ((kbd_config1->model != kbd_config2->model) &&
+	    (kbd_config1->model != NULL) &&
+	    (kbd_config2->model != NULL) &&
+	    g_ascii_strcasecmp (kbd_config1->model, kbd_config2->model))
+		return False;
+	if (!cafekbd_strv_equal (kbd_config1->layouts_variants,
+			   kbd_config2->layouts_variants))
+		return False;
+
+	if (!cafekbd_keyboard_config_options_equals
+	    (kbd_config1, kbd_config2))
+		return False;
+
+	return True;
+}
+
+void
+cafekbd_keyboard_config_save_to_gsettings (CafekbdKeyboardConfig * kbd_config)
+{
+	g_settings_delay (kbd_config->settings);
+
+	cafekbd_keyboard_config_save_params (kbd_config,
+					     CAFEKBD_KEYBOARD_CONFIG_ACTIVE);
+
+	g_settings_apply (kbd_config->settings);
+}
+
+void
+cafekbd_keyboard_config_model_set (CafekbdKeyboardConfig * kbd_config,
+				const gchar * model_name)
+{
+	if (kbd_config->model != NULL)
+		g_free (kbd_config->model);
+	kbd_config->model =
+	    (model_name == NULL
+	     || model_name[0] == '\0') ? NULL : g_strdup (model_name);
+}
+
+void
+cafekbd_keyboard_config_options_set (CafekbdKeyboardConfig * kbd_config,
+				  gint idx,
+				  const gchar * group_name,
+				  const gchar * option_name)
+{
+	const gchar *merged;
+	if (group_name == NULL || option_name == NULL)
+		return;
+	merged =
+	    cafekbd_keyboard_config_merge_items (group_name, option_name);
+	if (merged == NULL)
+		return;
+	kbd_config->options[idx] = g_strdup (merged);
+}
+
+gboolean
+cafekbd_keyboard_config_options_is_set (CafekbdKeyboardConfig * kbd_config,<--- Parameter 'kbd_config' can be declared as pointer to const
+				     const gchar * group_name,
+				     const gchar * option_name)
+{
+	gchar **p = kbd_config->options;
+	const gchar *merged =
+	    cafekbd_keyboard_config_merge_items (group_name, option_name);
+	if (merged == NULL)
+		return FALSE;
+
+	while (p && *p) {
+		if (!g_ascii_strcasecmp (merged, *p++))
+			return TRUE;
+	}
+	return FALSE;
+}
+
+gboolean
+cafekbd_keyboard_config_activate (CafekbdKeyboardConfig * kbd_config)
+{
+	gboolean rv;
+	XklConfigRec *data = xkl_config_rec_new ();
+
+	cafekbd_keyboard_config_copy_to_xkl_config (kbd_config, data);
+	rv = xkl_config_rec_activate (data, kbd_config->engine);
+	g_object_unref (G_OBJECT (data));
+
+	return rv;
+}
+
+/**
+ * cafekbd_keyboard_config_start_listen:
+ * @func: (scope notified): a function to call when settings are changed
+ */
+void
+cafekbd_keyboard_config_start_listen (CafekbdKeyboardConfig * kbd_config,
+				   GCallback func,
+				   gpointer user_data)
+{
+	kbd_config->config_listener_id =
+	    g_signal_connect (kbd_config->settings, "changed", func,
+			      user_data);
+}
+
+void
+cafekbd_keyboard_config_stop_listen (CafekbdKeyboardConfig * kbd_config)
+{
+	g_signal_handler_disconnect (kbd_config->settings,
+				     kbd_config->config_listener_id);
+	kbd_config->config_listener_id = 0;
+}
+
+gboolean
+cafekbd_keyboard_config_get_descriptions (XklConfigRegistry * config_registry,
+				       const gchar * name,
+				       gchar ** layout_short_descr,
+				       gchar ** layout_descr,
+				       gchar ** variant_short_descr,
+				       gchar ** variant_descr)
+{
+	char *layout_name = NULL, *variant_name = NULL;
+	if (!cafekbd_keyboard_config_split_items
+	    (name, &layout_name, &variant_name))
+		return FALSE;
+	return cafekbd_keyboard_config_get_lv_descriptions (config_registry,
+							 layout_name,
+							 variant_name,
+							 layout_short_descr,
+							 layout_descr,
+							 variant_short_descr,
+							 variant_descr);
+}
+
+const gchar *
+cafekbd_keyboard_config_format_full_layout (const gchar * layout_descr,
+					 const gchar * variant_descr)
+{
+	static gchar full_descr[XKL_MAX_CI_DESC_LENGTH * 2];
+	if (variant_descr == NULL || variant_descr[0] == 0)
+		g_snprintf (full_descr, sizeof (full_descr), "%s",
+			    layout_descr);
+	else
+		g_snprintf (full_descr, sizeof (full_descr), "%s %s",
+			    layout_descr, variant_descr);
+	return full_descr;
+}
+
+gchar *
+cafekbd_keyboard_config_to_string (const CafekbdKeyboardConfig * config)
+{
+	gchar *layouts = NULL, *options = NULL;
+	GString *buffer = g_string_new (NULL);
+
+	gchar **iter;
+	gint count;
+	gchar *result;
+
+	if (config->layouts_variants) {
+		/* g_slist_length is "expensive", so we determinate the length on the fly */
+		for (iter = config->layouts_variants, count = 0; *iter;
+		     iter++, ++count) {
+			if (buffer->len)
+				g_string_append (buffer, " ");
+
+			g_string_append (buffer, *iter);
+		}
+
+		/* Translators: The count is related to the number of options. The %s
+		 * format specifier should not be modified, left "as is". */
+		layouts =
+		    g_strdup_printf (ngettext
+				     ("layout \"%s\"", "layouts \"%s\"",
+				      count), buffer->str);
+		g_string_truncate (buffer, 0);
+	}
+	if (config->options) {
+		/* g_slist_length is "expensive", so we determinate the length on the fly */
+		for (iter = config->options, count = 0; *iter;
+		     iter++, ++count) {
+			if (buffer->len)
+				g_string_append (buffer, " ");
+
+			g_string_append (buffer, *iter);
+		}
+
+		/* Translators: The count is related to the number of options. The %s
+		 * format specifier should not be modified, left "as is". */
+		options =
+		    g_strdup_printf (ngettext
+				     ("option \"%s\"", "options \"%s\"",
+				      count), buffer->str);
+		g_string_truncate (buffer, 0);
+	}
+
+	g_string_free (buffer, TRUE);
+
+	result =
+	    g_strdup_printf (_("model \"%s\", %s and %s"), config->model,
+			     layouts ? layouts : _("no layout"),
+			     options ? options : _("no options"));
+
+	g_free (options);
+	g_free (layouts);
+
+	return result;
+}
+
+/**
+ * cafekbd_keyboard_config_add_default_switch_option_if_necessary:
+ *
+ * Returns: (transfer full) (array zero-terminated=1): List of options
+ */
+gchar **
+cafekbd_keyboard_config_add_default_switch_option_if_necessary (gchar **
+							        layouts_list,
+							        gchar **
+							        options_list,
+							        gboolean *was_appended)
+{
+	*was_appended = FALSE;
+	if (g_strv_length (layouts_list) >= 2) {
+		gboolean any_switcher = False;
+		if (*options_list != NULL) {
+			gchar **option = options_list;
+			while (*option != NULL) {
+				char *g, *o;
+				if (cafekbd_keyboard_config_split_items
+				    (*option, &g, &o)) {
+					if (!g_ascii_strcasecmp
+					    (g, GROUP_SWITCHERS_GROUP)) {
+						any_switcher = True;
+						break;
+					}
+				}
+				option++;
+			}
+		}
+		if (!any_switcher) {
+			const gchar *id =
+			    cafekbd_keyboard_config_merge_items
+			    (GROUP_SWITCHERS_GROUP,
+			     DEFAULT_GROUP_SWITCH);
+			options_list =
+			    cafekbd_strv_append (options_list, g_strdup (id));
+			*was_appended = TRUE;
+		}
+	}
+	return options_list;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/4.html b/2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/4.html new file mode 100644 index 0000000..1d97c26 --- /dev/null +++ b/2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/4.html @@ -0,0 +1,6042 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
   1
+   2
+   3
+   4
+   5
+   6
+   7
+   8
+   9
+  10
+  11
+  12
+  13
+  14
+  15
+  16
+  17
+  18
+  19
+  20
+  21
+  22
+  23
+  24
+  25
+  26
+  27
+  28
+  29
+  30
+  31
+  32
+  33
+  34
+  35
+  36
+  37
+  38
+  39
+  40
+  41
+  42
+  43
+  44
+  45
+  46
+  47
+  48
+  49
+  50
+  51
+  52
+  53
+  54
+  55
+  56
+  57
+  58
+  59
+  60
+  61
+  62
+  63
+  64
+  65
+  66
+  67
+  68
+  69
+  70
+  71
+  72
+  73
+  74
+  75
+  76
+  77
+  78
+  79
+  80
+  81
+  82
+  83
+  84
+  85
+  86
+  87
+  88
+  89
+  90
+  91
+  92
+  93
+  94
+  95
+  96
+  97
+  98
+  99
+ 100
+ 101
+ 102
+ 103
+ 104
+ 105
+ 106
+ 107
+ 108
+ 109
+ 110
+ 111
+ 112
+ 113
+ 114
+ 115
+ 116
+ 117
+ 118
+ 119
+ 120
+ 121
+ 122
+ 123
+ 124
+ 125
+ 126
+ 127
+ 128
+ 129
+ 130
+ 131
+ 132
+ 133
+ 134
+ 135
+ 136
+ 137
+ 138
+ 139
+ 140
+ 141
+ 142
+ 143
+ 144
+ 145
+ 146
+ 147
+ 148
+ 149
+ 150
+ 151
+ 152
+ 153
+ 154
+ 155
+ 156
+ 157
+ 158
+ 159
+ 160
+ 161
+ 162
+ 163
+ 164
+ 165
+ 166
+ 167
+ 168
+ 169
+ 170
+ 171
+ 172
+ 173
+ 174
+ 175
+ 176
+ 177
+ 178
+ 179
+ 180
+ 181
+ 182
+ 183
+ 184
+ 185
+ 186
+ 187
+ 188
+ 189
+ 190
+ 191
+ 192
+ 193
+ 194
+ 195
+ 196
+ 197
+ 198
+ 199
+ 200
+ 201
+ 202
+ 203
+ 204
+ 205
+ 206
+ 207
+ 208
+ 209
+ 210
+ 211
+ 212
+ 213
+ 214
+ 215
+ 216
+ 217
+ 218
+ 219
+ 220
+ 221
+ 222
+ 223
+ 224
+ 225
+ 226
+ 227
+ 228
+ 229
+ 230
+ 231
+ 232
+ 233
+ 234
+ 235
+ 236
+ 237
+ 238
+ 239
+ 240
+ 241
+ 242
+ 243
+ 244
+ 245
+ 246
+ 247
+ 248
+ 249
+ 250
+ 251
+ 252
+ 253
+ 254
+ 255
+ 256
+ 257
+ 258
+ 259
+ 260
+ 261
+ 262
+ 263
+ 264
+ 265
+ 266
+ 267
+ 268
+ 269
+ 270
+ 271
+ 272
+ 273
+ 274
+ 275
+ 276
+ 277
+ 278
+ 279
+ 280
+ 281
+ 282
+ 283
+ 284
+ 285
+ 286
+ 287
+ 288
+ 289
+ 290
+ 291
+ 292
+ 293
+ 294
+ 295
+ 296
+ 297
+ 298
+ 299
+ 300
+ 301
+ 302
+ 303
+ 304
+ 305
+ 306
+ 307
+ 308
+ 309
+ 310
+ 311
+ 312
+ 313
+ 314
+ 315
+ 316
+ 317
+ 318
+ 319
+ 320
+ 321
+ 322
+ 323
+ 324
+ 325
+ 326
+ 327
+ 328
+ 329
+ 330
+ 331
+ 332
+ 333
+ 334
+ 335
+ 336
+ 337
+ 338
+ 339
+ 340
+ 341
+ 342
+ 343
+ 344
+ 345
+ 346
+ 347
+ 348
+ 349
+ 350
+ 351
+ 352
+ 353
+ 354
+ 355
+ 356
+ 357
+ 358
+ 359
+ 360
+ 361
+ 362
+ 363
+ 364
+ 365
+ 366
+ 367
+ 368
+ 369
+ 370
+ 371
+ 372
+ 373
+ 374
+ 375
+ 376
+ 377
+ 378
+ 379
+ 380
+ 381
+ 382
+ 383
+ 384
+ 385
+ 386
+ 387
+ 388
+ 389
+ 390
+ 391
+ 392
+ 393
+ 394
+ 395
+ 396
+ 397
+ 398
+ 399
+ 400
+ 401
+ 402
+ 403
+ 404
+ 405
+ 406
+ 407
+ 408
+ 409
+ 410
+ 411
+ 412
+ 413
+ 414
+ 415
+ 416
+ 417
+ 418
+ 419
+ 420
+ 421
+ 422
+ 423
+ 424
+ 425
+ 426
+ 427
+ 428
+ 429
+ 430
+ 431
+ 432
+ 433
+ 434
+ 435
+ 436
+ 437
+ 438
+ 439
+ 440
+ 441
+ 442
+ 443
+ 444
+ 445
+ 446
+ 447
+ 448
+ 449
+ 450
+ 451
+ 452
+ 453
+ 454
+ 455
+ 456
+ 457
+ 458
+ 459
+ 460
+ 461
+ 462
+ 463
+ 464
+ 465
+ 466
+ 467
+ 468
+ 469
+ 470
+ 471
+ 472
+ 473
+ 474
+ 475
+ 476
+ 477
+ 478
+ 479
+ 480
+ 481
+ 482
+ 483
+ 484
+ 485
+ 486
+ 487
+ 488
+ 489
+ 490
+ 491
+ 492
+ 493
+ 494
+ 495
+ 496
+ 497
+ 498
+ 499
+ 500
+ 501
+ 502
+ 503
+ 504
+ 505
+ 506
+ 507
+ 508
+ 509
+ 510
+ 511
+ 512
+ 513
+ 514
+ 515
+ 516
+ 517
+ 518
+ 519
+ 520
+ 521
+ 522
+ 523
+ 524
+ 525
+ 526
+ 527
+ 528
+ 529
+ 530
+ 531
+ 532
+ 533
+ 534
+ 535
+ 536
+ 537
+ 538
+ 539
+ 540
+ 541
+ 542
+ 543
+ 544
+ 545
+ 546
+ 547
+ 548
+ 549
+ 550
+ 551
+ 552
+ 553
+ 554
+ 555
+ 556
+ 557
+ 558
+ 559
+ 560
+ 561
+ 562
+ 563
+ 564
+ 565
+ 566
+ 567
+ 568
+ 569
+ 570
+ 571
+ 572
+ 573
+ 574
+ 575
+ 576
+ 577
+ 578
+ 579
+ 580
+ 581
+ 582
+ 583
+ 584
+ 585
+ 586
+ 587
+ 588
+ 589
+ 590
+ 591
+ 592
+ 593
+ 594
+ 595
+ 596
+ 597
+ 598
+ 599
+ 600
+ 601
+ 602
+ 603
+ 604
+ 605
+ 606
+ 607
+ 608
+ 609
+ 610
+ 611
+ 612
+ 613
+ 614
+ 615
+ 616
+ 617
+ 618
+ 619
+ 620
+ 621
+ 622
+ 623
+ 624
+ 625
+ 626
+ 627
+ 628
+ 629
+ 630
+ 631
+ 632
+ 633
+ 634
+ 635
+ 636
+ 637
+ 638
+ 639
+ 640
+ 641
+ 642
+ 643
+ 644
+ 645
+ 646
+ 647
+ 648
+ 649
+ 650
+ 651
+ 652
+ 653
+ 654
+ 655
+ 656
+ 657
+ 658
+ 659
+ 660
+ 661
+ 662
+ 663
+ 664
+ 665
+ 666
+ 667
+ 668
+ 669
+ 670
+ 671
+ 672
+ 673
+ 674
+ 675
+ 676
+ 677
+ 678
+ 679
+ 680
+ 681
+ 682
+ 683
+ 684
+ 685
+ 686
+ 687
+ 688
+ 689
+ 690
+ 691
+ 692
+ 693
+ 694
+ 695
+ 696
+ 697
+ 698
+ 699
+ 700
+ 701
+ 702
+ 703
+ 704
+ 705
+ 706
+ 707
+ 708
+ 709
+ 710
+ 711
+ 712
+ 713
+ 714
+ 715
+ 716
+ 717
+ 718
+ 719
+ 720
+ 721
+ 722
+ 723
+ 724
+ 725
+ 726
+ 727
+ 728
+ 729
+ 730
+ 731
+ 732
+ 733
+ 734
+ 735
+ 736
+ 737
+ 738
+ 739
+ 740
+ 741
+ 742
+ 743
+ 744
+ 745
+ 746
+ 747
+ 748
+ 749
+ 750
+ 751
+ 752
+ 753
+ 754
+ 755
+ 756
+ 757
+ 758
+ 759
+ 760
+ 761
+ 762
+ 763
+ 764
+ 765
+ 766
+ 767
+ 768
+ 769
+ 770
+ 771
+ 772
+ 773
+ 774
+ 775
+ 776
+ 777
+ 778
+ 779
+ 780
+ 781
+ 782
+ 783
+ 784
+ 785
+ 786
+ 787
+ 788
+ 789
+ 790
+ 791
+ 792
+ 793
+ 794
+ 795
+ 796
+ 797
+ 798
+ 799
+ 800
+ 801
+ 802
+ 803
+ 804
+ 805
+ 806
+ 807
+ 808
+ 809
+ 810
+ 811
+ 812
+ 813
+ 814
+ 815
+ 816
+ 817
+ 818
+ 819
+ 820
+ 821
+ 822
+ 823
+ 824
+ 825
+ 826
+ 827
+ 828
+ 829
+ 830
+ 831
+ 832
+ 833
+ 834
+ 835
+ 836
+ 837
+ 838
+ 839
+ 840
+ 841
+ 842
+ 843
+ 844
+ 845
+ 846
+ 847
+ 848
+ 849
+ 850
+ 851
+ 852
+ 853
+ 854
+ 855
+ 856
+ 857
+ 858
+ 859
+ 860
+ 861
+ 862
+ 863
+ 864
+ 865
+ 866
+ 867
+ 868
+ 869
+ 870
+ 871
+ 872
+ 873
+ 874
+ 875
+ 876
+ 877
+ 878
+ 879
+ 880
+ 881
+ 882
+ 883
+ 884
+ 885
+ 886
+ 887
+ 888
+ 889
+ 890
+ 891
+ 892
+ 893
+ 894
+ 895
+ 896
+ 897
+ 898
+ 899
+ 900
+ 901
+ 902
+ 903
+ 904
+ 905
+ 906
+ 907
+ 908
+ 909
+ 910
+ 911
+ 912
+ 913
+ 914
+ 915
+ 916
+ 917
+ 918
+ 919
+ 920
+ 921
+ 922
+ 923
+ 924
+ 925
+ 926
+ 927
+ 928
+ 929
+ 930
+ 931
+ 932
+ 933
+ 934
+ 935
+ 936
+ 937
+ 938
+ 939
+ 940
+ 941
+ 942
+ 943
+ 944
+ 945
+ 946
+ 947
+ 948
+ 949
+ 950
+ 951
+ 952
+ 953
+ 954
+ 955
+ 956
+ 957
+ 958
+ 959
+ 960
+ 961
+ 962
+ 963
+ 964
+ 965
+ 966
+ 967
+ 968
+ 969
+ 970
+ 971
+ 972
+ 973
+ 974
+ 975
+ 976
+ 977
+ 978
+ 979
+ 980
+ 981
+ 982
+ 983
+ 984
+ 985
+ 986
+ 987
+ 988
+ 989
+ 990
+ 991
+ 992
+ 993
+ 994
+ 995
+ 996
+ 997
+ 998
+ 999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+1011
+1012
+1013
+1014
+1015
+1016
+1017
+1018
+1019
+1020
+1021
+1022
+1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
+1033
+1034
+1035
+1036
+1037
+1038
+1039
+1040
+1041
+1042
+1043
+1044
+1045
+1046
+1047
+1048
+1049
+1050
+1051
+1052
+1053
+1054
+1055
+1056
+1057
+1058
+1059
+1060
+1061
+1062
+1063
+1064
+1065
+1066
+1067
+1068
+1069
+1070
+1071
+1072
+1073
+1074
+1075
+1076
+1077
+1078
+1079
+1080
+1081
+1082
+1083
+1084
+1085
+1086
+1087
+1088
+1089
+1090
+1091
+1092
+1093
+1094
+1095
+1096
+1097
+1098
+1099
+1100
+1101
+1102
+1103
+1104
+1105
+1106
+1107
+1108
+1109
+1110
+1111
+1112
+1113
+1114
+1115
+1116
+1117
+1118
+1119
+1120
+1121
+1122
+1123
+1124
+1125
+1126
+1127
+1128
+1129
+1130
+1131
+1132
+1133
+1134
+1135
+1136
+1137
+1138
+1139
+1140
+1141
+1142
+1143
+1144
+1145
+1146
+1147
+1148
+1149
+1150
+1151
+1152
+1153
+1154
+1155
+1156
+1157
+1158
+1159
+1160
+1161
+1162
+1163
+1164
+1165
+1166
+1167
+1168
+1169
+1170
+1171
+1172
+1173
+1174
+1175
+1176
+1177
+1178
+1179
+1180
+1181
+1182
+1183
+1184
+1185
+1186
+1187
+1188
+1189
+1190
+1191
+1192
+1193
+1194
+1195
+1196
+1197
+1198
+1199
+1200
+1201
+1202
+1203
+1204
+1205
+1206
+1207
+1208
+1209
+1210
+1211
+1212
+1213
+1214
+1215
+1216
+1217
+1218
+1219
+1220
+1221
+1222
+1223
+1224
+1225
+1226
+1227
+1228
+1229
+1230
+1231
+1232
+1233
+1234
+1235
+1236
+1237
+1238
+1239
+1240
+1241
+1242
+1243
+1244
+1245
+1246
+1247
+1248
+1249
+1250
+1251
+1252
+1253
+1254
+1255
+1256
+1257
+1258
+1259
+1260
+1261
+1262
+1263
+1264
+1265
+1266
+1267
+1268
+1269
+1270
+1271
+1272
+1273
+1274
+1275
+1276
+1277
+1278
+1279
+1280
+1281
+1282
+1283
+1284
+1285
+1286
+1287
+1288
+1289
+1290
+1291
+1292
+1293
+1294
+1295
+1296
+1297
+1298
+1299
+1300
+1301
+1302
+1303
+1304
+1305
+1306
+1307
+1308
+1309
+1310
+1311
+1312
+1313
+1314
+1315
+1316
+1317
+1318
+1319
+1320
+1321
+1322
+1323
+1324
+1325
+1326
+1327
+1328
+1329
+1330
+1331
+1332
+1333
+1334
+1335
+1336
+1337
+1338
+1339
+1340
+1341
+1342
+1343
+1344
+1345
+1346
+1347
+1348
+1349
+1350
+1351
+1352
+1353
+1354
+1355
+1356
+1357
+1358
+1359
+1360
+1361
+1362
+1363
+1364
+1365
+1366
+1367
+1368
+1369
+1370
+1371
+1372
+1373
+1374
+1375
+1376
+1377
+1378
+1379
+1380
+1381
+1382
+1383
+1384
+1385
+1386
+1387
+1388
+1389
+1390
+1391
+1392
+1393
+1394
+1395
+1396
+1397
+1398
+1399
+1400
+1401
+1402
+1403
+1404
+1405
+1406
+1407
+1408
+1409
+1410
+1411
+1412
+1413
+1414
+1415
+1416
+1417
+1418
+1419
+1420
+1421
+1422
+1423
+1424
+1425
+1426
+1427
+1428
+1429
+1430
+1431
+1432
+1433
+1434
+1435
+1436
+1437
+1438
+1439
+1440
+1441
+1442
+1443
+1444
+1445
+1446
+1447
+1448
+1449
+1450
+1451
+1452
+1453
+1454
+1455
+1456
+1457
+1458
+1459
+1460
+1461
+1462
+1463
+1464
+1465
+1466
+1467
+1468
+1469
+1470
+1471
+1472
+1473
+1474
+1475
+1476
+1477
+1478
+1479
+1480
+1481
+1482
+1483
+1484
+1485
+1486
+1487
+1488
+1489
+1490
+1491
+1492
+1493
+1494
+1495
+1496
+1497
+1498
+1499
+1500
+1501
+1502
+1503
+1504
+1505
+1506
+1507
+1508
+1509
+1510
+1511
+1512
+1513
+1514
+1515
+1516
+1517
+1518
+1519
+1520
+1521
+1522
+1523
+1524
+1525
+1526
+1527
+1528
+1529
+1530
+1531
+1532
+1533
+1534
+1535
+1536
+1537
+1538
+1539
+1540
+1541
+1542
+1543
+1544
+1545
+1546
+1547
+1548
+1549
+1550
+1551
+1552
+1553
+1554
+1555
+1556
+1557
+1558
+1559
+1560
+1561
+1562
+1563
+1564
+1565
+1566
+1567
+1568
+1569
+1570
+1571
+1572
+1573
+1574
+1575
+1576
+1577
+1578
+1579
+1580
+1581
+1582
+1583
+1584
+1585
+1586
+1587
+1588
+1589
+1590
+1591
+1592
+1593
+1594
+1595
+1596
+1597
+1598
+1599
+1600
+1601
+1602
+1603
+1604
+1605
+1606
+1607
+1608
+1609
+1610
+1611
+1612
+1613
+1614
+1615
+1616
+1617
+1618
+1619
+1620
+1621
+1622
+1623
+1624
+1625
+1626
+1627
+1628
+1629
+1630
+1631
+1632
+1633
+1634
+1635
+1636
+1637
+1638
+1639
+1640
+1641
+1642
+1643
+1644
+1645
+1646
+1647
+1648
+1649
+1650
+1651
+1652
+1653
+1654
+1655
+1656
+1657
+1658
+1659
+1660
+1661
+1662
+1663
+1664
+1665
+1666
+1667
+1668
+1669
+1670
+1671
+1672
+1673
+1674
+1675
+1676
+1677
+1678
+1679
+1680
+1681
+1682
+1683
+1684
+1685
+1686
+1687
+1688
+1689
+1690
+1691
+1692
+1693
+1694
+1695
+1696
+1697
+1698
+1699
+1700
+1701
+1702
+1703
+1704
+1705
+1706
+1707
+1708
+1709
+1710
+1711
+1712
+1713
+1714
+1715
+1716
+1717
+1718
+1719
+1720
+1721
+1722
+1723
+1724
+1725
+1726
+1727
+1728
+1729
+1730
+1731
+1732
+1733
+1734
+1735
+1736
+1737
+1738
+1739
+1740
+1741
+1742
+1743
+1744
+1745
+1746
+1747
+1748
+1749
+1750
+1751
+1752
+1753
+1754
+1755
+1756
+1757
+1758
+1759
+1760
+1761
+1762
+1763
+1764
+1765
+1766
+1767
+1768
+1769
+1770
+1771
+1772
+1773
+1774
+1775
+1776
+1777
+1778
+1779
+1780
+1781
+1782
+1783
+1784
+1785
+1786
+1787
+1788
+1789
+1790
+1791
+1792
+1793
+1794
+1795
+1796
+1797
+1798
+1799
+1800
+1801
+1802
+1803
+1804
+1805
+1806
+1807
+1808
+1809
+1810
+1811
+1812
+1813
+1814
+1815
+1816
+1817
+1818
+1819
+1820
+1821
+1822
+1823
+1824
+1825
+1826
+1827
+1828
+1829
+1830
+1831
+1832
+1833
+1834
+1835
+1836
+1837
+1838
+1839
+1840
+1841
+1842
+1843
+1844
+1845
+1846
+1847
+1848
+1849
+1850
+1851
+1852
+1853
+1854
+1855
+1856
+1857
+1858
+1859
+1860
+1861
+1862
+1863
+1864
+1865
+1866
+1867
+1868
+1869
+1870
+1871
+1872
+1873
+1874
+1875
+1876
+1877
+1878
+1879
+1880
+1881
+1882
+1883
+1884
+1885
+1886
+1887
+1888
+1889
+1890
+1891
+1892
+1893
+1894
+1895
+1896
+1897
+1898
+1899
+1900
+1901
+1902
+1903
+1904
+1905
+1906
+1907
+1908
+1909
+1910
+1911
+1912
+1913
+1914
+1915
+1916
+1917
+1918
+1919
+1920
+1921
+1922
+1923
+1924
+1925
+1926
+1927
+1928
+1929
+1930
+1931
+1932
+1933
+1934
+1935
+1936
+1937
+1938
+1939
+1940
+1941
+1942
+1943
+1944
+1945
+1946
+1947
+1948
+1949
+1950
+1951
+1952
+1953
+1954
+1955
+1956
+1957
+1958
+1959
+1960
+1961
+1962
+1963
+1964
+1965
+1966
+1967
+1968
+1969
+1970
+1971
+1972
+1973
+1974
+1975
+1976
+1977
+1978
+1979
+1980
+1981
+1982
+1983
+1984
+1985
+1986
+1987
+1988
+1989
+1990
+1991
+1992
+1993
+1994
+1995
+1996
+1997
+1998
+1999
+2000
+2001
+2002
+2003
+2004
+2005
+2006
+2007
+2008
+2009
+2010
+2011
+2012
+2013
+2014
+2015
+2016
+2017
+2018
+2019
+2020
+2021
+2022
+2023
+2024
+2025
+2026
+2027
+2028
+2029
+2030
+2031
+2032
+2033
+2034
+2035
+2036
+2037
+2038
+2039
+2040
+2041
+2042
+2043
+2044
+2045
+2046
+2047
+2048
+2049
+2050
+2051
+2052
+2053
+2054
+2055
+2056
+2057
+2058
+2059
+2060
+2061
+2062
+2063
+2064
+2065
+2066
+2067
+2068
+2069
+2070
+2071
+2072
+2073
+2074
+2075
+2076
+2077
+2078
+2079
+2080
+2081
+2082
+2083
+2084
+2085
+2086
+2087
+2088
+2089
+2090
+2091
+2092
+2093
+2094
+2095
+2096
+2097
+2098
+2099
+2100
+2101
+2102
+2103
+2104
+2105
+2106
+2107
+2108
+2109
+2110
+2111
+2112
+2113
+2114
+2115
+2116
+2117
+2118
+2119
+2120
+2121
+2122
+2123
+2124
+2125
+2126
+2127
+2128
+2129
+2130
+2131
+2132
+2133
+2134
+2135
+2136
+2137
+2138
+2139
+2140
+2141
+2142
+2143
+2144
+2145
+2146
+2147
+2148
+2149
+2150
+2151
+2152
+2153
+2154
+2155
+2156
+2157
+2158
+2159
+2160
+2161
+2162
+2163
+2164
+2165
+2166
+2167
+2168
+2169
+2170
+2171
+2172
+2173
+2174
+2175
+2176
+2177
+2178
+2179
+2180
+2181
+2182
+2183
+2184
+2185
+2186
+2187
+2188
+2189
+2190
+2191
+2192
+2193
+2194
+2195
+2196
+2197
+2198
+2199
+2200
+2201
+2202
+2203
+2204
+2205
+2206
+2207
+2208
+2209
+2210
+2211
+2212
+2213
+2214
+2215
+2216
+2217
+2218
+2219
+2220
+2221
+2222
+2223
+2224
+2225
+2226
+2227
+2228
+2229
+2230
+2231
+2232
+2233
+2234
+2235
+2236
+2237
+2238
+2239
+2240
+2241
+2242
+2243
+2244
+2245
+2246
+2247
+2248
+2249
+2250
+2251
+2252
+2253
+2254
+2255
+2256
+2257
+2258
+2259
+2260
+2261
+2262
+2263
+2264
+2265
+2266
+2267
+2268
+2269
+2270
+2271
+2272
+2273
+2274
+2275
+2276
+2277
+2278
+2279
+2280
+2281
+2282
+2283
+2284
+2285
+2286
+2287
+2288
+2289
+2290
+2291
+2292
+2293
+2294
+2295
+2296
+2297
+2298
+2299
+2300
+2301
+2302
+2303
+2304
+2305
+2306
+2307
+2308
+2309
+2310
+2311
+2312
+2313
+2314
+2315
+2316
+2317
+2318
+2319
+2320
+2321
+2322
+2323
+2324
+2325
+2326
+2327
+2328
+2329
+2330
+2331
+2332
+2333
+2334
+2335
+2336
+2337
+2338
+2339
+2340
+2341
+2342
+2343
+2344
+2345
+2346
+2347
+2348
+2349
+2350
+2351
+2352
+2353
+2354
+2355
+2356
+2357
+2358
+2359
+2360
+2361
+2362
+2363
+2364
+2365
+2366
+2367
+2368
+2369
+2370
+2371
+2372
+2373
+2374
+2375
+2376
+2377
+2378
+2379
+2380
+2381
+2382
+2383
+2384
+2385
+2386
+2387
+2388
+2389
+2390
+2391
+2392
+2393
+2394
+2395
+2396
+2397
+2398
+2399
+2400
+2401
+2402
+2403
+2404
+2405
+2406
+2407
+2408
+2409
+2410
+2411
+2412
+2413
+2414
+2415
+2416
+2417
+2418
+2419
+2420
+2421
+2422
+2423
+2424
+2425
+2426
+2427
+2428
+2429
+2430
+2431
+2432
+2433
+2434
+2435
+2436
+2437
+2438
+2439
+2440
+2441
+2442
+2443
+2444
+2445
+2446
+2447
+2448
+2449
+2450
+2451
+2452
+2453
+2454
+2455
+2456
+2457
+2458
+2459
+2460
+2461
+2462
+2463
+2464
+2465
+2466
+2467
+2468
+2469
+2470
+2471
+2472
+2473
+2474
+2475
+2476
+2477
+2478
+2479
+2480
+2481
+2482
+2483
+2484
+2485
+2486
+2487
+2488
+2489
+2490
+2491
+2492
+2493
+2494
+2495
+2496
+2497
+2498
+2499
+2500
+2501
+2502
+2503
+2504
+2505
+2506
+2507
+2508
+2509
+2510
+2511
+2512
+2513
+2514
+2515
+2516
+2517
+2518
+2519
+2520
+2521
+2522
+2523
+2524
+2525
+2526
+2527
+2528
+2529
+2530
+2531
+2532
+2533
+2534
+2535
+2536
+2537
+2538
+2539
+2540
+2541
+2542
+2543
+2544
+2545
+2546
+2547
+2548
+2549
+2550
+2551
+2552
+2553
+2554
+2555
+2556
+2557
+2558
+2559
+2560
+2561
+2562
+2563
+2564
+2565
+2566
+2567
+2568
+2569
+2570
+2571
+2572
+2573
+2574
+2575
+2576
+2577
+2578
+2579
+2580
+2581
+2582
+2583
+2584
+2585
+2586
+2587
+2588
+2589
+2590
+2591
+2592
+2593
+2594
+2595
+2596
+2597
+2598
+2599
+2600
+2601
+2602
+2603
+2604
+2605
+2606
+2607
+2608
+2609
+2610
+2611
+2612
+2613
+2614
+2615
+2616
+2617
+2618
+2619
+2620
+2621
+2622
+2623
+2624
+2625
+2626
+2627
+2628
+2629
+2630
+2631
+2632
+2633
+2634
+2635
+2636
+2637
+2638
+2639
+2640
+2641
+2642
+2643
+2644
+2645
+2646
+2647
+2648
+2649
+2650
+2651
+2652
+2653
+2654
+2655
+2656
+2657
+2658
+2659
+2660
+2661
+2662
+2663
+2664
+2665
+2666
+2667
+2668
+2669
+2670
+2671
+2672
+2673
+2674
+2675
+2676
+2677
+2678
+2679
+2680
+2681
+2682
+2683
+2684
+2685
+2686
+2687
+2688
+2689
+2690
+2691
+2692
+2693
+2694
+2695
+2696
+2697
+2698
+2699
+2700
+2701
+2702
+2703
+2704
+2705
+2706
+2707
+2708
+2709
+2710
+2711
+2712
+2713
+2714
+2715
+2716
+2717
+2718
+2719
+2720
+2721
+2722
+2723
+2724
+2725
+2726
+2727
+2728
+2729
+2730
+2731
+2732
+2733
+2734
+2735
+2736
+2737
+2738
+2739
+2740
+2741
+2742
+2743
+2744
+2745
+2746
+2747
+2748
+2749
+2750
+2751
+2752
+2753
+2754
+2755
+2756
+2757
+2758
+2759
+2760
+2761
+2762
+2763
+2764
+2765
+2766
+2767
+2768
+2769
+2770
+2771
+2772
+2773
+2774
+2775
+2776
+2777
+2778
+2779
+2780
+2781
+2782
+2783
+2784
+2785
+2786
+2787
+2788
+2789
+2790
+2791
+2792
+2793
+2794
+2795
+2796
+2797
+2798
+2799
+2800
+2801
+2802
+2803
+2804
+2805
+2806
+2807
+2808
+2809
+2810
+2811
+2812
+2813
+2814
+2815
+2816
+2817
+2818
+2819
+2820
+2821
+2822
+2823
+2824
+2825
+2826
+2827
+2828
+2829
+2830
+2831
+2832
+2833
+2834
+2835
+2836
+2837
+2838
+2839
+2840
+2841
+2842
+2843
+2844
+2845
+2846
+2847
+2848
+2849
+2850
+2851
+2852
+2853
+2854
+2855
+2856
+2857
+2858
+2859
+2860
+2861
+2862
+2863
+2864
+2865
+2866
+2867
+2868
+2869
+2870
+2871
+2872
+2873
+2874
+2875
+2876
+2877
+2878
+2879
+2880
+2881
+2882
+2883
+2884
+2885
+2886
+2887
+2888
+2889
+2890
+2891
+2892
+2893
+2894
+2895
+2896
+2897
+2898
+2899
+2900
+2901
+2902
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+#include <ctk/ctk.h>
+#include <cdk/cdkx.h>
+#include <cdk/cdkkeysyms.h>
+#include <X11/XKBlib.h>
+#include <X11/extensions/XKBgeom.h>
+#include <stdlib.h>
+#include <memory.h>
+#include <math.h>
+#include <glib/gi18n-lib.h>
+#include <libxklavier/xklavier.h>
+
+#include <cafekbd-keyboard-drawing.h>
+#include <cafekbd-keyboard-drawing-marshal.h>
+#include <cafekbd-util.h>
+
+#define INVALID_KEYCODE ((guint)(-1))
+
+#define CTK_RESPONSE_PRINT 2
+
+#define KEY_FONT_SIZE 12
+
+enum {
+	BAD_KEYCODE = 0,
+	NUM_SIGNALS
+};
+
+static guint cafekbd_keyboard_drawing_signals[NUM_SIGNALS] = { 0 };
+
+static void cafekbd_keyboard_drawing_set_mods (CafekbdKeyboardDrawing * drawing,
+					    guint mods);
+
+extern gboolean xkl_xkb_config_native_prepare (XklEngine * engine,
+					      const XklConfigRec * data,
+					      gpointer component_names);
+
+extern void xkl_xkb_config_native_cleanup (XklEngine * engine,
+					  gpointer component_names);
+
+
+static gint
+xkb_to_pixmap_coord (CafekbdKeyboardDrawingRenderContext * context, gint n)<--- Parameter 'context' can be declared as pointer to const
+{
+	return n * context->scale_numerator / context->scale_denominator;
+}
+
+static gdouble
+xkb_to_pixmap_double (CafekbdKeyboardDrawingRenderContext * context,<--- Parameter 'context' can be declared as pointer to const
+		      gdouble d)
+{
+	return d * context->scale_numerator / context->scale_denominator;
+}
+
+
+/* angle is in tenths of a degree; coordinates can be anything as (xkb,
+ * pixels, pango) as long as they are all the same */
+static void
+rotate_coordinate (gint origin_x,
+		   gint origin_y,
+		   gint x,
+		   gint y, gint angle, gint * rotated_x, gint * rotated_y)
+{
+	*rotated_x =
+	    origin_x + (x - origin_x) * cos (M_PI * angle / 1800.0) - (y -
+								       origin_y)
+	    * sin (M_PI * angle / 1800.0);
+	*rotated_y =
+	    origin_y + (x - origin_x) * sin (M_PI * angle / 1800.0) + (y -
+								       origin_y)
+	    * cos (M_PI * angle / 1800.0);
+}
+
+static gdouble
+length (gdouble x, gdouble y)
+{
+	return sqrt (x * x + y * y);
+}
+
+static gdouble
+point_line_distance (gdouble ax, gdouble ay, gdouble nx, gdouble ny)
+{
+	return ax * nx + ay * ny;
+}
+
+static void
+normal_form (gdouble ax, gdouble ay,
+	     gdouble bx, gdouble by,
+	     gdouble * nx, gdouble * ny, gdouble * d)
+{
+	gdouble l;
+
+	*nx = by - ay;
+	*ny = ax - bx;
+
+	l = length (*nx, *ny);
+
+	*nx /= l;
+	*ny /= l;
+
+	*d = point_line_distance (ax, ay, *nx, *ny);
+}
+
+static void
+inverse (gdouble a, gdouble b, gdouble c, gdouble d,
+	 gdouble * e, gdouble * f, gdouble * g, gdouble * h)
+{
+	gdouble det;
+
+	det = a * d - b * c;
+
+	*e = d / det;
+	*f = -b / det;
+	*g = -c / det;
+	*h = a / det;
+}
+
+static void
+multiply (gdouble a, gdouble b, gdouble c, gdouble d,
+	  gdouble e, gdouble f, gdouble * x, gdouble * y)
+{
+	*x = a * e + b * f;
+	*y = c * e + d * f;
+}
+
+static void
+intersect (gdouble n1x, gdouble n1y, gdouble d1,
+	   gdouble n2x, gdouble n2y, gdouble d2, gdouble * x, gdouble * y)
+{
+	gdouble e, f, g, h;
+
+	inverse (n1x, n1y, n2x, n2y, &e, &f, &g, &h);
+	multiply (e, f, g, h, d1, d2, x, y);
+}
+
+
+/* draw an angle from the current point to b and then to c,
+ * with a rounded corner of the given radius.
+ */
+static void
+rounded_corner (cairo_t * cr,
+		gdouble bx, gdouble by,
+		gdouble cx, gdouble cy, gdouble radius)
+{
+	gdouble ax, ay;
+	gdouble n1x, n1y, d1;
+	gdouble n2x, n2y, d2;
+	gdouble pd1, pd2;
+	gdouble ix, iy;
+	gdouble dist1, dist2;
+	gdouble nx, ny, d;
+	gdouble a1x, a1y, c1x, c1y;
+	gdouble phi1, phi2;
+
+	cairo_get_current_point (cr, &ax, &ay);
+#ifdef KBDRAW_DEBUG
+	printf ("        current point: (%f, %f), radius %f:\n", ax, ay,
+		radius);
+#endif
+
+	/* make sure radius is not too large */
+	dist1 = length (bx - ax, by - ay);
+	dist2 = length (cx - bx, cy - by);
+
+	radius = MIN (radius, MIN (dist1, dist2));
+
+	/* construct normal forms of the lines */
+	normal_form (ax, ay, bx, by, &n1x, &n1y, &d1);
+	normal_form (bx, by, cx, cy, &n2x, &n2y, &d2);
+
+	/* find which side of the line a,b the point c is on */
+	if (point_line_distance (cx, cy, n1x, n1y) < d1)
+		pd1 = d1 - radius;
+	else
+		pd1 = d1 + radius;
+
+	/* find which side of the line b,c the point a is on */
+	if (point_line_distance (ax, ay, n2x, n2y) < d2)
+		pd2 = d2 - radius;
+	else
+		pd2 = d2 + radius;
+
+	/* intersect the parallels to find the center of the arc */
+	intersect (n1x, n1y, pd1, n2x, n2y, pd2, &ix, &iy);
+
+	nx = (bx - ax) / dist1;
+	ny = (by - ay) / dist1;
+	d = point_line_distance (ix, iy, nx, ny);
+
+	/* a1 is the point on the line a-b where the arc starts */
+	intersect (n1x, n1y, d1, nx, ny, d, &a1x, &a1y);
+
+	nx = (cx - bx) / dist2;
+	ny = (cy - by) / dist2;
+	d = point_line_distance (ix, iy, nx, ny);
+
+	/* c1 is the point on the line b-c where the arc ends */
+	intersect (n2x, n2y, d2, nx, ny, d, &c1x, &c1y);
+
+	/* determine the first angle */
+	if (a1x - ix == 0)
+		phi1 = (a1y - iy > 0) ? M_PI_2 : 3 * M_PI_2;
+	else if (a1x - ix > 0)
+		phi1 = atan ((a1y - iy) / (a1x - ix));
+	else
+		phi1 = M_PI + atan ((a1y - iy) / (a1x - ix));
+
+	/* determine the second angle */
+	if (c1x - ix == 0)
+		phi2 = (c1y - iy > 0) ? M_PI_2 : 3 * M_PI_2;
+	else if (c1x - ix > 0)
+		phi2 = atan ((c1y - iy) / (c1x - ix));
+	else
+		phi2 = M_PI + atan ((c1y - iy) / (c1x - ix));
+
+	/* compute the difference between phi2 and phi1 mod 2pi */
+	d = phi2 - phi1;
+	while (d < 0)
+		d += 2 * M_PI;
+	while (d > 2 * M_PI)
+		d -= 2 * M_PI;
+
+#ifdef KBDRAW_DEBUG
+	printf ("        line 1 to: (%f, %f):\n", a1x, a1y);
+#endif
+	if (!(isnan (a1x) || isnan (a1y)))
+		cairo_line_to (cr, a1x, a1y);
+
+	/* pick the short arc from phi1 to phi2 */
+	if (d < M_PI)
+		cairo_arc (cr, ix, iy, radius, phi1, phi2);
+	else
+		cairo_arc_negative (cr, ix, iy, radius, phi1, phi2);
+
+#ifdef KBDRAW_DEBUG
+	printf ("        line 2 to: (%f, %f):\n", cx, cy);
+#endif
+	cairo_line_to (cr, cx, cy);
+}
+
+static void
+rounded_polygon (cairo_t * cr,
+		 gboolean filled,
+		 gdouble radius, CdkPoint * points, gint num_points)
+{
+	gint i, j;
+
+	cairo_move_to (cr,
+		       (gdouble) (points[num_points - 1].x +
+				  points[0].x) / 2,
+		       (gdouble) (points[num_points - 1].y +
+				  points[0].y) / 2);
+
+
+#ifdef KBDRAW_DEBUG
+	printf ("    rounded polygon of radius %f:\n", radius);
+#endif
+	for (i = 0; i < num_points; i++) {
+		j = (i + 1) % num_points;
+		rounded_corner (cr, (gdouble) points[i].x,
+				(gdouble) points[i].y,
+				(gdouble) (points[i].x + points[j].x) / 2,
+				(gdouble) (points[i].y + points[j].y) / 2,
+				radius);
+#ifdef KBDRAW_DEBUG
+		printf ("      corner (%d, %d) -> (%d, %d):\n",
+			points[i].x, points[i].y, points[j].x,
+			points[j].y);
+#endif
+	};
+	cairo_close_path (cr);
+
+	if (filled)
+		cairo_fill (cr);
+	else
+		cairo_stroke (cr);
+}
+
+static void
+draw_polygon (CafekbdKeyboardDrawingRenderContext * context,
+	      CdkRGBA * fill_color,
+	      gint xkb_x,
+	      gint xkb_y, XkbPointRec * xkb_points, guint num_points,
+	      gdouble radius)
+{
+	CdkPoint *points;
+	gboolean filled;
+	gint i;
+
+	if (fill_color) {
+		filled = TRUE;
+	} else {
+		fill_color = &context->dark_color;
+		filled = FALSE;
+	}
+
+	cdk_cairo_set_source_rgba (context->cr, fill_color);
+
+	points = g_new (CdkPoint, num_points);
+
+#ifdef KBDRAW_DEBUG
+	printf ("    Polygon points:\n");
+#endif
+	for (i = 0; i < num_points; i++) {
+		points[i].x =
+		    xkb_to_pixmap_coord (context, xkb_x + xkb_points[i].x);
+		points[i].y =
+		    xkb_to_pixmap_coord (context, xkb_y + xkb_points[i].y);
+#ifdef KBDRAW_DEBUG
+		printf ("      %d, %d\n", points[i].x, points[i].y);
+#endif
+	}
+
+	rounded_polygon (context->cr, filled,
+			 xkb_to_pixmap_double (context, radius),
+			 points, num_points);
+
+	g_free (points);
+}
+
+static void
+curve_rectangle (cairo_t * cr,
+		 gdouble x0,
+		 gdouble y0, gdouble width, gdouble height, gdouble radius)
+{
+	gdouble x1, y1;
+
+	if (!width || !height)
+		return;
+
+	x1 = x0 + width;
+	y1 = y0 + height;
+
+	radius = MIN (radius, MIN (width / 2, height / 2));
+
+	cairo_move_to (cr, x0, y0 + radius);
+	cairo_arc (cr, x0 + radius, y0 + radius, radius, M_PI,
+		   3 * M_PI / 2);
+	cairo_line_to (cr, x1 - radius, y0);
+	cairo_arc (cr, x1 - radius, y0 + radius, radius, 3 * M_PI / 2,
+		   2 * M_PI);
+	cairo_line_to (cr, x1, y1 - radius);
+	cairo_arc (cr, x1 - radius, y1 - radius, radius, 0, M_PI / 2);
+	cairo_line_to (cr, x0 + radius, y1);
+	cairo_arc (cr, x0 + radius, y1 - radius, radius, M_PI / 2, M_PI);
+
+	cairo_close_path (cr);
+}
+
+static void
+draw_curve_rectangle (cairo_t * cr,
+		      gboolean filled,
+		      CdkRGBA * fill_color,
+		      gint x, gint y, gint width, gint height, gint radius)
+{
+	curve_rectangle (cr, x, y, width, height, radius);
+
+	cdk_cairo_set_source_rgba (cr, fill_color);
+
+	if (filled)
+		cairo_fill (cr);
+	else
+		cairo_stroke (cr);
+}
+
+/* x, y, width, height are in the xkb coordinate system */
+static void
+draw_rectangle (CafekbdKeyboardDrawingRenderContext * context,
+		CdkRGBA * fill_color,
+		gint angle,
+		gint xkb_x, gint xkb_y, gint xkb_width, gint xkb_height,
+		gint radius)
+{
+	if (angle == 0) {
+		gint x, y, width, height;
+		gboolean filled;
+
+		if (fill_color) {
+			filled = TRUE;
+		} else {
+			fill_color = &context->dark_color;
+			filled = FALSE;
+		}
+
+		x = xkb_to_pixmap_coord (context, xkb_x);
+		y = xkb_to_pixmap_coord (context, xkb_y);
+		width =
+		    xkb_to_pixmap_coord (context, xkb_x + xkb_width) - x;
+		height =
+		    xkb_to_pixmap_coord (context, xkb_y + xkb_height) - y;
+
+		draw_curve_rectangle (context->cr, filled, fill_color,
+				      x, y, width, height,
+				      xkb_to_pixmap_double (context,
+							    radius));
+	} else {
+		XkbPointRec points[4];
+		gint x, y;
+
+		points[0].x = xkb_x;
+		points[0].y = xkb_y;
+		rotate_coordinate (xkb_x, xkb_y, xkb_x + xkb_width, xkb_y,
+				   angle, &x, &y);
+		points[1].x = x;
+		points[1].y = y;
+		rotate_coordinate (xkb_x, xkb_y, xkb_x + xkb_width,
+				   xkb_y + xkb_height, angle, &x, &y);
+		points[2].x = x;
+		points[2].y = y;
+		rotate_coordinate (xkb_x, xkb_y, xkb_x, xkb_y + xkb_height,
+				   angle, &x, &y);
+		points[3].x = x;
+		points[3].y = y;
+
+		/* the points we've calculated are relative to 0,0 */
+		draw_polygon (context, fill_color, 0, 0, points, 4,
+			      radius);
+	}
+}
+
+static void
+draw_outline (CafekbdKeyboardDrawingRenderContext * context,
+	      XkbOutlineRec * outline,
+	      CdkRGBA * color,
+	      gint angle, gint origin_x, gint origin_y)
+{
+#ifdef KBDRAW_DEBUG
+	printf (" num_points in %p: %d\n", outline, outline->num_points);
+#endif
+
+	if (outline->num_points == 1) {
+		if (color)
+			draw_rectangle (context, color, angle, origin_x,
+					origin_y, outline->points[0].x,
+					outline->points[0].y,
+					outline->corner_radius);
+
+#ifdef KBDRAW_DEBUG
+		printf ("pointsxy:%d %d %d\n", outline->points[0].x,
+			outline->points[0].y, outline->corner_radius);
+#endif
+
+		draw_rectangle (context, NULL, angle, origin_x, origin_y,
+				outline->points[0].x,
+				outline->points[0].y,
+				outline->corner_radius);
+	} else if (outline->num_points == 2) {
+		gint rotated_x0, rotated_y0;
+
+		rotate_coordinate (origin_x, origin_y,
+				   origin_x + outline->points[0].x,
+				   origin_y + outline->points[0].y,
+				   angle, &rotated_x0, &rotated_y0);
+		if (color)
+			draw_rectangle (context, color, angle, rotated_x0,
+					rotated_y0, outline->points[1].x,
+					outline->points[1].y,
+					outline->corner_radius);
+
+		draw_rectangle (context, NULL, angle, rotated_x0,
+				rotated_y0, outline->points[1].x,
+				outline->points[1].y,
+				outline->corner_radius);
+	} else {
+		if (color)
+			draw_polygon (context, color, origin_x, origin_y,
+				      outline->points,
+				      outline->num_points,
+				      outline->corner_radius);
+
+		draw_polygon (context, NULL, origin_x, origin_y,
+			      outline->points, outline->num_points,
+			      outline->corner_radius);
+	}
+}
+
+/* see PSColorDef in xkbprint */
+static gboolean
+parse_xkb_color_spec (gchar * colorspec, CdkRGBA * color)
+{
+	glong level;
+
+	color->alpha = 1.0;
+
+	if (g_ascii_strcasecmp (colorspec, "black") == 0) {
+		color->red = 0;
+		color->green = 0;
+		color->blue = 0;
+	} else if (g_ascii_strcasecmp (colorspec, "white") == 0) {
+		color->red = 1.0;
+		color->green = 1.0;
+		color->blue = 1.0;
+	} else if (g_ascii_strncasecmp (colorspec, "grey", 4) == 0 ||
+		   g_ascii_strncasecmp (colorspec, "gray", 4) == 0) {
+		level = strtol (colorspec + 4, NULL, 10);
+
+		color->red = 1.0 - 1.0 * level / 100.0;
+		color->green = 1.0 - 1.0 * level / 100.0;
+		color->blue = 1.0 - 1.0 * level / 100.0;
+	} else if (g_ascii_strcasecmp (colorspec, "red") == 0) {
+		color->red = 1.0;
+		color->green = 0;
+		color->blue = 0;
+	} else if (g_ascii_strcasecmp (colorspec, "green") == 0) {
+		color->red = 0;
+		color->green = 1.0;
+		color->blue = 0;
+	} else if (g_ascii_strcasecmp (colorspec, "blue") == 0) {
+		color->red = 0;
+		color->green = 0;
+		color->blue = 1.0;
+	} else if (g_ascii_strncasecmp (colorspec, "red", 3) == 0) {
+		level = strtol (colorspec + 3, NULL, 10);
+
+		color->red = 1.0 * level / 100.0;
+		color->green = 0;
+		color->blue = 0;
+	} else if (g_ascii_strncasecmp (colorspec, "green", 5) == 0) {
+		level = strtol (colorspec + 5, NULL, 10);
+
+		color->red = 0;
+		color->green = 1.0 * level / 100.0;
+		color->blue = 0;
+	} else if (g_ascii_strncasecmp (colorspec, "blue", 4) == 0) {
+		level = strtol (colorspec + 4, NULL, 10);
+
+		color->red = 0;
+		color->green = 0;
+		color->blue = 1.0 * level / 100.0;
+	} else
+		return FALSE;
+
+	return TRUE;
+}
+
+
+static guint
+find_keycode (CafekbdKeyboardDrawing * drawing, gchar * key_name)
+{
+#define KEYSYM_NAME_MAX_LENGTH 4
+	guint keycode;
+	gint i, j;
+	XkbKeyNamePtr pkey;
+	XkbKeyAliasPtr palias;
+	guint is_name_matched;
+	gchar *src, *dst;
+
+	if (!drawing->xkb)
+		return INVALID_KEYCODE;
+
+#ifdef KBDRAW_DEBUG
+	printf ("    looking for keycode for (%c%c%c%c)\n",
+		key_name[0], key_name[1], key_name[2], key_name[3]);
+#endif
+
+	pkey = drawing->xkb->names->keys + drawing->xkb->min_key_code;
+	for (keycode = drawing->xkb->min_key_code;
+	     keycode <= drawing->xkb->max_key_code; keycode++) {
+		is_name_matched = 1;
+		src = key_name;
+		dst = pkey->name;
+		for (i = KEYSYM_NAME_MAX_LENGTH; --i >= 0;) {
+			if ('\0' == *src)
+				break;
+			if (*src++ != *dst++) {
+				is_name_matched = 0;
+				break;
+			}
+		}
+		if (is_name_matched) {
+#ifdef KBDRAW_DEBUG
+			printf ("      found keycode %u\n", keycode);
+#endif
+			return keycode;
+		}
+		pkey++;
+	}
+
+	palias = drawing->xkb->names->key_aliases;
+	for (j = drawing->xkb->names->num_key_aliases; --j >= 0;) {
+		is_name_matched = 1;
+		src = key_name;
+		dst = palias->alias;
+		for (i = KEYSYM_NAME_MAX_LENGTH; --i >= 0;) {
+			if ('\0' == *src)
+				break;
+			if (*src++ != *dst++) {
+				is_name_matched = 0;
+				break;
+			}
+		}
+
+		if (is_name_matched) {
+			keycode = find_keycode (drawing, palias->real);
+#ifdef KBDRAW_DEBUG
+			printf ("found alias keycode %u\n", keycode);
+#endif
+			return keycode;
+		}
+		palias++;
+	}
+
+	return INVALID_KEYCODE;
+}
+
+static void
+set_markup (CafekbdKeyboardDrawingRenderContext * context, gchar *txt)<--- Parameter 'context' can be declared as pointer to const
+{
+	PangoLayout *layout = context->layout;
+	txt = strcmp ("<", txt) ? txt : "&lt;";
+	txt = strcmp ("&", txt) ? txt : "&amp;";
+	if (g_utf8_strlen (txt, -1) > 1) {
+		gchar* buf =
+		    g_strdup_printf ("<span size=\"xx-small\">%s</span>", txt);
+		pango_layout_set_markup (layout, buf, -1);
+		g_free (buf);
+	} else {
+		pango_layout_set_markup (layout, txt, -1);
+	}
+}
+
+static void
+set_key_label_in_layout (CafekbdKeyboardDrawingRenderContext * context,
+			 guint keyval)
+{
+	gchar buf[5];
+	gunichar uc;
+
+	switch (keyval) {
+	case CDK_KEY_Scroll_Lock:
+		set_markup (context, _("Scroll\nLock"));
+		break;
+
+	case CDK_KEY_space:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_Sys_Req:
+		set_markup (context, _("Sys Rq"));
+		break;
+
+	case CDK_KEY_Page_Up:
+		set_markup (context, _("Page\nUp"));
+		break;
+
+	case CDK_KEY_Page_Down:
+		set_markup (context, _("Page\nDown"));
+		break;
+
+	case CDK_KEY_Num_Lock:
+		set_markup (context, _("Num\nLock"));
+		break;
+
+	case CDK_KEY_KP_Page_Up:
+		set_markup (context, _("Pg Up"));
+		break;
+
+	case CDK_KEY_KP_Page_Down:
+		set_markup (context, _("Pg Dn"));
+		break;
+
+	case CDK_KEY_KP_Home:
+		set_markup (context, _("Home"));
+		break;
+
+	case CDK_KEY_KP_Left:
+		set_markup (context, _("Left"));
+		break;
+
+	case CDK_KEY_KP_End:
+		set_markup (context, _("End"));
+		break;
+
+	case CDK_KEY_KP_Up:
+		set_markup (context, _("Up"));
+		break;
+
+	case CDK_KEY_KP_Begin:
+		set_markup (context, _("Begin"));
+		break;
+
+	case CDK_KEY_KP_Right:
+		set_markup (context, _("Right"));
+		break;
+
+	case CDK_KEY_KP_Enter:
+		set_markup (context, _("Enter"));
+		break;
+
+	case CDK_KEY_KP_Down:
+		set_markup (context, _("Down"));
+		break;
+
+	case CDK_KEY_KP_Insert:
+		set_markup (context, _("Ins"));
+		break;
+
+	case CDK_KEY_KP_Delete:
+		set_markup (context, _("Del"));
+		break;
+
+	/* 0xfe03 */
+	case CDK_KEY_ISO_Level3_Shift:
+		set_markup (context, _("ISO_Level3_Shift"));
+		break;
+
+	/* 0xfe20 */
+	case CDK_KEY_ISO_Left_Tab:
+		set_markup (context, _("Tab"));
+		break;
+
+	/* 0xff08 */
+	case CDK_KEY_BackSpace:
+		set_markup (context, _("BackSpace"));
+		break;
+
+	/* 0xff09 */
+	case CDK_KEY_Tab:
+		set_markup (context, _("Tab"));
+		break;
+
+	/* 0xff0d */
+	case CDK_KEY_Return:
+		set_markup (context, _("Return"));
+		break;
+
+	/* 0xff13 */
+	case CDK_KEY_Pause:
+		set_markup (context, _("Pause"));
+		break;
+
+	/* 0xff1b */
+	case CDK_KEY_Escape:
+		set_markup (context, _("Esc"));
+		break;
+
+	/* 0xff50 */
+	case CDK_KEY_Home:
+		set_markup (context, _("Home"));
+		break;
+
+	/* 0xff51 */
+	case CDK_KEY_Left:
+		set_markup (context, _("Left"));
+		break;
+
+	/* 0xff52 */
+	case CDK_KEY_Up:
+		set_markup (context, _("Up"));
+		break;
+
+	/* 0xff53 */
+	case CDK_KEY_Right:
+		set_markup (context, _("Right"));
+		break;
+
+	/* 0xff54 */
+	case CDK_KEY_Down:
+		set_markup (context, _("Down"));
+		break;
+
+	/* 0xff57 */
+	case CDK_KEY_End:
+		set_markup (context, _("End"));
+		break;
+
+	/* 0xff61 */
+	case CDK_KEY_Print:
+		set_markup (context, _("Print"));
+		break;
+
+	/* 0xff63 */
+	case CDK_KEY_Insert:
+		set_markup (context, _("Insert"));
+		break;
+
+	/* 0xff67 */
+	case CDK_KEY_Menu:
+		set_markup (context, _("Menu"));
+		break;
+
+	/* 0xffbe */
+	case CDK_KEY_F1:
+		set_markup (context, _("F1"));
+		break;
+
+	/* 0xffbf */
+	case CDK_KEY_F2:
+		set_markup (context, _("F2"));
+		break;
+
+	/* 0xffc0 */
+	case CDK_KEY_F3:
+		set_markup (context, _("F3"));
+		break;
+
+	/* 0xffc1 */
+	case CDK_KEY_F4:
+		set_markup (context, _("F4"));
+		break;
+
+	/* 0xffc2 */
+	case CDK_KEY_F5:
+		set_markup (context, _("F5"));
+		break;
+
+	/* 0xffc3 */
+	case CDK_KEY_F6:
+		set_markup (context, _("F6"));
+		break;
+
+	/* 0xffc4 */
+	case CDK_KEY_F7:
+		set_markup (context, _("F7"));
+		break;
+
+	/* 0xffc5 */
+	case CDK_KEY_F8:
+		set_markup (context, _("F8"));
+		break;
+
+	/* 0xffc6 */
+	case CDK_KEY_F9:
+		set_markup (context, _("F9"));
+		break;
+
+	/* 0xffc7 */
+	case CDK_KEY_F10:
+		set_markup (context, _("F10"));
+		break;
+
+	/* 0xffc8 */
+	case CDK_KEY_F11:
+		set_markup (context, _("F11"));
+		break;
+
+	/* 0xffc9 */
+	case CDK_KEY_F12:
+		set_markup (context, _("F12"));
+		break;
+
+	/* 0xffe1 */
+	case CDK_KEY_Shift_L:
+		set_markup (context, _("Shift"));
+		break;
+
+	/* 0xffe2 */
+	case CDK_KEY_Shift_R:
+		set_markup (context, _("Shift"));
+		break;
+
+	/* 0xffe3 */
+	case CDK_KEY_Control_L:
+		set_markup (context, _("Control"));
+		break;
+
+	/* 0xffe4 */
+	case CDK_KEY_Control_R:
+		set_markup (context, _("Control"));
+		break;
+
+	/* 0xffe5 */
+	case CDK_KEY_Caps_Lock:
+		set_markup (context, _("Caps\nLock"));
+		break;
+
+	/* 0xffe7 */
+	case CDK_KEY_Meta_L:
+		set_markup (context, _("Meta"));
+		break;
+
+	/* 0xffe9 */
+	case CDK_KEY_Alt_L:
+		set_markup (context, _("Alt"));
+		break;
+
+	/* 0xffeb */
+	case CDK_KEY_Super_L:
+		set_markup (context, _("Super"));
+		break;
+
+	/* 0xffec */
+	case CDK_KEY_Super_R:
+		set_markup (context, _("Super"));
+		break;
+
+	/* 0xffff */
+	case CDK_KEY_VoidSymbol:
+		set_markup (context, _("Delete"));
+		break;
+
+	case CDK_KEY_dead_grave:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_acute:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_circumflex:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_tilde:
+		set_markup (context, "~");
+		break;
+
+	case CDK_KEY_dead_macron:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_breve:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_abovedot:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_diaeresis:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_abovering:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_doubleacute:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_caron:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_cedilla:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_ogonek:
+		set_markup (context, "");
+		break;
+
+		/* case CDK_KEY_dead_iota:
+		 * case CDK_KEY_dead_voiced_sound:
+		 * case CDK_KEY_dead_semivoiced_sound: */
+
+	case CDK_KEY_dead_belowdot:
+		set_markup (context, " ");
+		break;
+
+	case CDK_KEY_horizconnector:
+		set_markup (context, _("horiz\nconn"));
+		break;
+
+	case CDK_KEY_Mode_switch:
+		set_markup (context, _("AltGr"));
+		break;
+
+	case CDK_KEY_Multi_key:
+		set_markup (context, _("Compose"));
+		break;
+
+	default:
+		uc = cdk_keyval_to_unicode (keyval);
+		if (uc != 0 && g_unichar_isgraph (uc)) {
+			buf[g_unichar_to_utf8 (uc, buf)] = '\0';
+			set_markup (context, buf);
+		} else {
+			gchar *name = cdk_keyval_name (keyval);
+			if (name) {
+				set_markup (context, name);
+			} else
+				set_markup (context, "");
+		}
+	}
+}
+
+
+static void
+draw_pango_layout (CafekbdKeyboardDrawingRenderContext * context,
+		   CafekbdKeyboardDrawing * drawing,
+		   gint angle, gint x, gint y)
+{
+	PangoLayout *layout = context->layout;
+	CdkRGBA *color;
+	PangoLayoutLine *line;
+	gint x_off, y_off;
+	gint i;
+
+	color =
+	    drawing->colors + (drawing->xkb->geom->label_color -
+			       drawing->xkb->geom->colors);
+
+	if (angle != context->angle) {
+		PangoMatrix matrix = PANGO_MATRIX_INIT;
+		pango_matrix_rotate (&matrix, -angle / 10.0);
+		pango_context_set_matrix (pango_layout_get_context
+					  (layout), &matrix);
+		pango_layout_context_changed (layout);
+		context->angle = angle;
+	}
+
+	i = 0;
+	y_off = 0;
+	for (line = pango_layout_get_line (layout, i);
+	     line != NULL; line = pango_layout_get_line (layout, ++i)) {
+		GSList *runp;<--- Variable 'runp' can be declared as pointer to const
+		PangoRectangle line_extents;
+
+		x_off = 0;
+
+		for (runp = line->runs; runp != NULL; runp = runp->next) {
+			PangoGlyphItem *run = runp->data;
+			gint j;
+
+			for (j = 0; j < run->glyphs->num_glyphs; j++) {
+				PangoGlyphGeometry *geometry;<--- Variable 'geometry' can be declared as pointer to const
+
+				geometry =
+				    &run->glyphs->glyphs[j].geometry;
+
+				x_off += geometry->width;
+			}
+		}
+
+		pango_layout_line_get_extents (line, NULL, &line_extents);
+		y_off +=
+		    line_extents.height +
+		    pango_layout_get_spacing (layout);
+	}
+
+	cairo_move_to (context->cr, x, y);
+	cdk_cairo_set_source_rgba (context->cr, color);
+	pango_cairo_show_layout (context->cr, layout);
+}
+
+static void
+draw_key_label_helper (CafekbdKeyboardDrawingRenderContext * context,
+		       CafekbdKeyboardDrawing * drawing,
+		       KeySym keysym,
+		       gint angle,
+		       CafekbdKeyboardDrawingGroupLevelPosition glp,
+		       gint x,
+		       gint y, gint width, gint height, gint padding)
+{
+	gint label_x, label_y, label_max_width, ycell;
+
+	if (keysym == 0)
+		return;
+#ifdef KBDRAW_DEBUG
+	printf ("keysym: %04X(%c) at glp: %d\n",
+		(unsigned) keysym, (char) keysym, (int) glp);
+#endif
+
+	switch (glp) {
+	case CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT:
+	case CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT:
+		{
+			ycell =
+			    glp == CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT;
+
+			rotate_coordinate (x, y, x + padding,
+					   y + padding + (height -
+							  2 * padding) *
+					   ycell * 4 / 7, angle, &label_x,
+					   &label_y);
+			label_max_width =
+			    PANGO_SCALE * (width - 2 * padding);
+			break;
+		}
+	case CAFEKBD_KEYBOARD_DRAWING_POS_TOPRIGHT:
+	case CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT:
+		{
+			ycell =
+			    glp == CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT;
+
+			rotate_coordinate (x, y,
+					   x + padding + (width -
+							  2 * padding) *
+					   4 / 7,
+					   y + padding + (height -
+							  2 * padding) *
+					   ycell * 4 / 7, angle, &label_x,
+					   &label_y);
+			label_max_width =
+			    PANGO_SCALE * ((width - 2 * padding) -
+					   (width - 2 * padding) * 4 / 7);
+			break;
+		}
+	default:
+		return;
+	}
+	set_key_label_in_layout (context, keysym);
+	pango_layout_set_width (context->layout, label_max_width);
+	label_y -= (pango_layout_get_line_count (context->layout) - 1) *
+	    (pango_font_description_get_size (context->font_desc) /
+	     PANGO_SCALE);
+	cairo_save (context->cr);
+	cairo_rectangle (context->cr, x + padding / 2, y + padding / 2,
+			 width - padding, height - padding);
+	cairo_clip (context->cr);
+	draw_pango_layout (context, drawing, angle, label_x, label_y);
+	cairo_restore (context->cr);
+}
+
+static void
+draw_key_label (CafekbdKeyboardDrawingRenderContext * context,
+		CafekbdKeyboardDrawing * drawing,
+		guint keycode,
+		gint angle,
+		gint xkb_origin_x,
+		gint xkb_origin_y, gint xkb_width, gint xkb_height)
+{
+	gint x, y, width, height;
+	gint padding;
+	gint g, l, glp;
+
+	if (!drawing->xkb)
+		return;
+
+	padding = 23 * context->scale_numerator / context->scale_denominator;	/* 2.3mm */
+
+	x = xkb_to_pixmap_coord (context, xkb_origin_x);
+	y = xkb_to_pixmap_coord (context, xkb_origin_y);
+	width =
+	    xkb_to_pixmap_coord (context, xkb_origin_x + xkb_width) - x;
+	height =
+	    xkb_to_pixmap_coord (context, xkb_origin_y + xkb_height) - y;
+
+	for (glp = CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT;
+	     glp < CAFEKBD_KEYBOARD_DRAWING_POS_TOTAL; glp++) {
+		if (drawing->groupLevels[glp] == NULL)
+			continue;
+		g = drawing->groupLevels[glp]->group;
+		l = drawing->groupLevels[glp]->level;
+
+		if (g < 0 || g >= XkbKeyNumGroups (drawing->xkb, keycode))
+			continue;
+		if (l < 0
+		    || l >= XkbKeyGroupWidth (drawing->xkb, keycode, g))
+			continue;
+
+		/* Skip "exotic" levels like the "Ctrl" level in PC_SYSREQ */
+		if (l > 0) {
+			guint mods = XkbKeyKeyType (drawing->xkb, keycode,
+						    g)->mods.mask;
+			if ((mods & (ShiftMask | drawing->l3mod)) == 0)
+				continue;
+		}
+
+		if (drawing->track_modifiers) {
+			guint mods_rtrn;
+			KeySym keysym;
+
+			if (XkbTranslateKeyCode (drawing->xkb, keycode,
+						 XkbBuildCoreState
+						 (drawing->mods, g),
+						 &mods_rtrn, &keysym)) {
+				draw_key_label_helper (context, drawing,
+						       keysym, angle, glp,
+						       x, y, width, height,
+						       padding);
+				/* reverse y order */
+			}
+		} else {
+			KeySym keysym;
+
+			keysym =
+			    XkbKeySymEntry (drawing->xkb, keycode, l, g);
+
+			draw_key_label_helper (context, drawing, keysym,
+					       angle, glp, x, y, width,
+					       height, padding);
+			/* reverse y order */
+		}
+	}
+}
+
+/*
+ * The x offset is calculated for complex shapes. It is the rightmost of the vertical lines in the outline
+ */
+static gint
+calc_origin_offset_x (XkbOutlineRec * outline)<--- Parameter 'outline' can be declared as pointer to const
+{
+	gint rv = 0;
+	gint i;
+	XkbPointPtr point = outline->points;
+	if (outline->num_points < 3)
+		return 0;
+	for (i = outline->num_points; --i > 0;) {
+		gint x1 = point->x;
+		gint y1 = point++->y;
+		gint x2 = point->x;
+		gint y2 = point->y;
+
+		/*vertical, bottom to top (clock-wise), on the left */
+		if ((x1 == x2) && (y1 > y2) && (x1 > rv)) {
+			rv = x1;
+		}
+	}
+	return rv;
+}
+
+/* groups are from 0-3 */
+static void
+draw_key (CafekbdKeyboardDrawingRenderContext * context,
+	  CafekbdKeyboardDrawing * drawing, CafekbdKeyboardDrawingKey * key)
+{
+	XkbShapeRec *shape;
+	CtkStyleContext *style_context;
+	CdkRGBA color;
+	XkbOutlineRec *outline;
+	int origin_offset_x;
+	/* gint i; */
+
+	if (!drawing->xkb)
+		return;
+
+#ifdef KBDRAW_DEBUG
+	printf ("shape: %p (base %p, index %d)\n",
+		drawing->xkb->geom->shapes + key->xkbkey->shape_ndx,
+		drawing->xkb->geom->shapes, key->xkbkey->shape_ndx);
+#endif
+
+	shape = drawing->xkb->geom->shapes + key->xkbkey->shape_ndx;
+
+	if (key->pressed) {
+		style_context = ctk_widget_get_style_context (CTK_WIDGET (drawing));
+		ctk_style_context_save (style_context);
+		ctk_style_context_add_class (style_context, CTK_STYLE_CLASS_VIEW);
+		ctk_style_context_get_background_color (style_context,
+		                                        CTK_STATE_FLAG_SELECTED,
+		                                        &color);
+		ctk_style_context_restore (style_context);
+	 } else
+		color = *(drawing->colors + key->xkbkey->color_ndx);
+
+#ifdef KBDRAW_DEBUG
+	printf
+	    (" outlines base in the shape: %p (total: %d), origin: (%d, %d), angle %d\n",
+	     shape->outlines, shape->num_outlines, key->origin_x,
+	     key->origin_y, key->angle);
+#endif
+
+	/* draw the primary outline */
+	outline = shape->primary ? shape->primary : shape->outlines;
+	draw_outline (context, outline, &color, key->angle, key->origin_x,
+		      key->origin_y);
+#if 0
+	/* don't draw other outlines for now, since
+	 * the text placement does not take them into account
+	 */
+	for (i = 0; i < shape->num_outlines; i++) {
+		if (shape->outlines + i == shape->approx ||
+		    shape->outlines + i == shape->primary)
+			continue;
+		draw_outline (context, shape->outlines + i, NULL,
+			      key->angle, key->origin_x, key->origin_y);
+	}
+#endif
+
+	origin_offset_x = calc_origin_offset_x (outline);
+	draw_key_label (context, drawing, key->keycode, key->angle,
+			key->origin_x + origin_offset_x, key->origin_y,
+			shape->bounds.x2, shape->bounds.y2);
+}
+
+static void
+invalidate_region (CafekbdKeyboardDrawing * drawing,
+		   gdouble angle,
+		   gint origin_x, gint origin_y, XkbShapeRec * shape)
+{
+	CdkPoint points[4];
+	gint x_min, x_max, y_min, y_max;
+	gint x, y, width, height;
+	gint xx, yy;
+
+	rotate_coordinate (0, 0, 0, 0, angle, &xx, &yy);
+	points[0].x = xx;
+	points[0].y = yy;
+	rotate_coordinate (0, 0, shape->bounds.x2, 0, angle, &xx, &yy);
+	points[1].x = xx;
+	points[1].y = yy;
+	rotate_coordinate (0, 0, shape->bounds.x2, shape->bounds.y2, angle,
+			   &xx, &yy);
+	points[2].x = xx;
+	points[2].y = yy;
+	rotate_coordinate (0, 0, 0, shape->bounds.y2, angle, &xx, &yy);
+	points[3].x = xx;
+	points[3].y = yy;
+
+	x_min =
+	    MIN (MIN (points[0].x, points[1].x),
+		 MIN (points[2].x, points[3].x));
+	x_max =
+	    MAX (MAX (points[0].x, points[1].x),
+		 MAX (points[2].x, points[3].x));
+	y_min =
+	    MIN (MIN (points[0].y, points[1].y),
+		 MIN (points[2].y, points[3].y));
+	y_max =
+	    MAX (MAX (points[0].y, points[1].y),
+		 MAX (points[2].y, points[3].y));
+
+	x = xkb_to_pixmap_coord (drawing->renderContext,
+				 origin_x + x_min) - 6;
+	y = xkb_to_pixmap_coord (drawing->renderContext,
+				 origin_y + y_min) - 6;
+	width =
+	    xkb_to_pixmap_coord (drawing->renderContext,
+				 x_max - x_min) + 12;
+	height =
+	    xkb_to_pixmap_coord (drawing->renderContext,
+				 y_max - y_min) + 12;
+
+	ctk_widget_queue_draw_area (CTK_WIDGET (drawing), x, y, width,
+				    height);
+}
+
+static void
+invalidate_indicator_doodad_region (CafekbdKeyboardDrawing * drawing,
+				    CafekbdKeyboardDrawingDoodad * doodad)
+{
+	if (!drawing->xkb)
+		return;
+
+	invalidate_region (drawing,
+			   doodad->angle,
+			   doodad->origin_x +
+			   doodad->doodad->indicator.left,
+			   doodad->origin_y +
+			   doodad->doodad->indicator.top,
+			   &drawing->xkb->geom->shapes[doodad->
+						       doodad->indicator.shape_ndx]);
+}
+
+static void
+invalidate_key_region (CafekbdKeyboardDrawing * drawing,
+		       CafekbdKeyboardDrawingKey * key)
+{
+	if (!drawing->xkb)
+		return;
+
+	invalidate_region (drawing,
+			   key->angle,
+			   key->origin_x,
+			   key->origin_y,
+			   &drawing->xkb->geom->shapes[key->
+						       xkbkey->shape_ndx]);
+}
+
+static void
+draw_text_doodad (CafekbdKeyboardDrawingRenderContext * context,
+		  CafekbdKeyboardDrawing * drawing,
+		  CafekbdKeyboardDrawingDoodad * doodad,
+		  XkbTextDoodadRec * text_doodad)
+{
+	gint x, y;
+	if (!drawing->xkb)
+		return;
+
+	x = xkb_to_pixmap_coord (context,
+				 doodad->origin_x + text_doodad->left);
+	y = xkb_to_pixmap_coord (context,
+				 doodad->origin_y + text_doodad->top);
+
+	set_markup (context, text_doodad->text);
+	draw_pango_layout (context, drawing, doodad->angle, x, y);
+}
+
+static void
+draw_indicator_doodad (CafekbdKeyboardDrawingRenderContext * context,
+		       CafekbdKeyboardDrawing * drawing,
+		       CafekbdKeyboardDrawingDoodad * doodad,
+		       XkbIndicatorDoodadRec * indicator_doodad)
+{
+	CdkRGBA *color;
+	XkbShapeRec *shape;<--- Variable 'shape' can be declared as pointer to const
+	gint i;
+
+	if (!drawing->xkb)
+		return;
+
+	shape = drawing->xkb->geom->shapes + indicator_doodad->shape_ndx;
+
+	color = drawing->colors + (doodad->on ?
+				   indicator_doodad->on_color_ndx :
+				   indicator_doodad->off_color_ndx);
+
+	for (i = 0; i < 1; i++)
+		draw_outline (context, shape->outlines + i, color,
+			      doodad->angle,
+			      doodad->origin_x + indicator_doodad->left,
+			      doodad->origin_y + indicator_doodad->top);
+}
+
+static void
+draw_shape_doodad (CafekbdKeyboardDrawingRenderContext * context,
+		   CafekbdKeyboardDrawing * drawing,
+		   CafekbdKeyboardDrawingDoodad * doodad,
+		   XkbShapeDoodadRec * shape_doodad)
+{
+	XkbShapeRec *shape;
+	CdkRGBA *color;
+	gint i;
+
+	if (!drawing->xkb)
+		return;
+
+	shape = drawing->xkb->geom->shapes + shape_doodad->shape_ndx;
+	color = drawing->colors + shape_doodad->color_ndx;
+
+	/* draw the primary outline filled */
+	draw_outline (context,
+		      shape->primary ? shape->primary : shape->outlines,
+		      color, doodad->angle,
+		      doodad->origin_x + shape_doodad->left,
+		      doodad->origin_y + shape_doodad->top);
+
+	/* stroke the other outlines */
+	for (i = 0; i < shape->num_outlines; i++) {
+		if (shape->outlines + i == shape->approx ||
+		    shape->outlines + i == shape->primary)
+			continue;
+		draw_outline (context, shape->outlines + i, NULL,
+			      doodad->angle,
+			      doodad->origin_x + shape_doodad->left,
+			      doodad->origin_y + shape_doodad->top);
+	}
+}
+
+static void
+draw_doodad (CafekbdKeyboardDrawingRenderContext * context,
+	     CafekbdKeyboardDrawing * drawing,
+	     CafekbdKeyboardDrawingDoodad * doodad)
+{
+	switch (doodad->doodad->any.type) {
+	case XkbOutlineDoodad:
+	case XkbSolidDoodad:
+		draw_shape_doodad (context, drawing, doodad,
+				   &doodad->doodad->shape);
+		break;
+
+	case XkbTextDoodad:
+		draw_text_doodad (context, drawing, doodad,
+				  &doodad->doodad->text);
+		break;
+
+	case XkbIndicatorDoodad:
+		draw_indicator_doodad (context, drawing, doodad,
+				       &doodad->doodad->indicator);
+		break;
+
+	case XkbLogoDoodad:
+		/* g_print ("draw_doodad: logo: %s\n", doodad->doodad->logo.logo_name); */
+		/* XkbLogoDoodadRec is essentially a subclass of XkbShapeDoodadRec */
+		draw_shape_doodad (context, drawing, doodad,
+				   &doodad->doodad->shape);
+		break;
+	}
+}
+
+typedef struct {
+	CafekbdKeyboardDrawing *drawing;
+	CafekbdKeyboardDrawingRenderContext *context;
+} DrawKeyboardItemData;
+
+static void
+redraw_overlapping_doodads (CafekbdKeyboardDrawingRenderContext * context,
+			    CafekbdKeyboardDrawing * drawing,
+			    const CafekbdKeyboardDrawingKey * key)
+{
+	GList *list;
+	gboolean do_draw = FALSE;
+
+	for (list = drawing->keyboard_items; list; list = list->next) {
+		CafekbdKeyboardDrawingItem *item = list->data;
+
+		if (do_draw
+		    && item->type ==
+		    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD)
+			draw_doodad (context, drawing,
+				     (CafekbdKeyboardDrawingDoodad *) item);
+
+		if (list->data == key)
+			do_draw = TRUE;
+	}
+}
+
+static void
+draw_keyboard_item (CafekbdKeyboardDrawingItem * item,
+		    DrawKeyboardItemData * data)
+{
+	CafekbdKeyboardDrawing *drawing = data->drawing;
+	CafekbdKeyboardDrawingRenderContext *context = data->context;
+
+	if (!drawing->xkb)
+		return;
+
+	switch (item->type) {
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_INVALID:
+		break;
+
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY:
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA:
+		draw_key (context, drawing,
+			  (CafekbdKeyboardDrawingKey *) item);
+		break;
+
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD:
+		draw_doodad (context, drawing,
+			     (CafekbdKeyboardDrawingDoodad *) item);
+		break;
+	}
+}
+
+static void
+draw_keyboard_to_context (CafekbdKeyboardDrawingRenderContext * context,
+			  CafekbdKeyboardDrawing * drawing)
+{
+	DrawKeyboardItemData data = { drawing, context };
+#ifdef KBDRAW_DEBUG
+	printf ("mods: %d\n", drawing->mods);
+#endif
+	g_list_foreach (drawing->keyboard_items,
+			(GFunc) draw_keyboard_item, &data);
+}
+
+static gboolean
+create_cairo (CafekbdKeyboardDrawing * drawing)
+{
+	CtkStyleContext *style_context = NULL;
+	CtkStateFlags state;
+	CdkRGBA dark_color;
+
+	if (drawing == NULL)
+		return FALSE;
+	if (drawing->surface == NULL)
+		return FALSE;
+
+	drawing->renderContext->cr =
+	    cairo_create (drawing->surface);
+
+	style_context = ctk_widget_get_style_context (CTK_WIDGET (drawing));
+	state = ctk_style_context_get_state (style_context);
+
+	ctk_style_context_get_background_color (style_context, state,
+	                                        &dark_color);
+	/* make dark background by making regular background darker */
+	dark_color.red *= 0.7;
+	dark_color.green *= 0.7;
+	dark_color.blue *= 0.7;
+
+	drawing->renderContext->dark_color = dark_color;
+
+	return TRUE;
+}
+
+static void
+destroy_cairo (CafekbdKeyboardDrawing * drawing)
+{
+	cairo_destroy (drawing->renderContext->cr);
+	drawing->renderContext->cr = NULL;
+}
+
+static void
+draw_keyboard (CafekbdKeyboardDrawing * drawing)
+{
+        CtkStyleContext *context =
+	    ctk_widget_get_style_context (CTK_WIDGET (drawing));
+	CtkStateFlags state = ctk_style_context_get_state (context);
+	CdkRGBA color;
+	CtkAllocation allocation;
+
+	if (!drawing->xkb)
+		return;
+
+	ctk_widget_get_allocation (CTK_WIDGET (drawing), &allocation);
+
+	drawing->surface =
+	    cdk_window_create_similar_surface (ctk_widget_get_window
+					       (CTK_WIDGET (drawing)),
+					       CAIRO_CONTENT_COLOR,
+					       allocation.width,
+					       allocation.height);
+
+	if (create_cairo (drawing)) {
+		/* blank background */
+		ctk_style_context_save (context);
+		ctk_style_context_add_class (context, CTK_STYLE_CLASS_VIEW);
+		ctk_style_context_get_background_color (context, state, &color);
+		ctk_style_context_restore (context);
+		cdk_cairo_set_source_rgba (drawing->renderContext->cr, &color);
+		cairo_paint (drawing->renderContext->cr);
+
+		draw_keyboard_to_context (drawing->renderContext, drawing);
+		destroy_cairo (drawing);
+	}
+}
+
+static void
+alloc_render_context (CafekbdKeyboardDrawing * drawing)
+{
+	CafekbdKeyboardDrawingRenderContext *context =
+	    drawing->renderContext =
+	    g_new0 (CafekbdKeyboardDrawingRenderContext, 1);
+
+	PangoContext *pangoContext =
+	    ctk_widget_get_pango_context (CTK_WIDGET (drawing));
+
+	CtkStyleContext *style_context =
+	    ctk_widget_get_style_context (CTK_WIDGET (drawing));
+	PangoFontDescription *fd = NULL;
+
+	ctk_style_context_get (style_context,
+	                       ctk_style_context_get_state (style_context),
+	                       CTK_STYLE_PROPERTY_FONT, &fd, NULL);
+
+	context->layout = pango_layout_new (pangoContext);
+	pango_layout_set_ellipsize (context->layout, PANGO_ELLIPSIZE_END);
+
+	context->font_desc = pango_font_description_copy (fd);
+	context->angle = 0;
+	context->scale_numerator = 1;
+	context->scale_denominator = 1;
+}
+
+static void
+free_render_context (CafekbdKeyboardDrawing * drawing)
+{
+	CafekbdKeyboardDrawingRenderContext *context = drawing->renderContext;
+	g_object_unref (G_OBJECT (context->layout));
+	pango_font_description_free (context->font_desc);
+
+	g_free (drawing->renderContext);
+	drawing->renderContext = NULL;
+}
+
+static gboolean
+draw (CtkWidget              *widget G_GNUC_UNUSED,
+      cairo_t                *cr,
+      CafekbdKeyboardDrawing *drawing)
+{
+	if (!drawing->xkb)
+		return FALSE;
+
+	if (drawing->surface == NULL)
+		return FALSE;
+
+	cairo_set_source_surface (cr, drawing->surface, 0, 0);
+	cairo_paint (cr);
+
+	return FALSE;
+}
+
+static gboolean
+idle_redraw (gpointer user_data)
+{
+	CafekbdKeyboardDrawing *drawing = user_data;
+
+	drawing->idle_redraw = 0;
+	draw_keyboard (drawing);
+	ctk_widget_queue_draw (CTK_WIDGET (drawing));
+	return FALSE;
+}
+
+static gboolean
+context_setup_scaling (CafekbdKeyboardDrawingRenderContext * context,
+		       CafekbdKeyboardDrawing * drawing,
+		       gdouble width, gdouble height,
+		       gdouble dpi_x, gdouble dpi_y)
+{
+	if (!drawing->xkb)
+		return FALSE;
+
+	if (drawing->xkb->geom->width_mm <= 0
+	    || drawing->xkb->geom->height_mm <= 0) {
+		g_critical
+		    ("keyboard geometry reports width or height as zero!");
+		return FALSE;
+	}
+
+	if (width * drawing->xkb->geom->height_mm <
+	    height * drawing->xkb->geom->width_mm) {
+		context->scale_numerator = width;
+		context->scale_denominator = drawing->xkb->geom->width_mm;
+	} else {
+		context->scale_numerator = height;
+		context->scale_denominator = drawing->xkb->geom->height_mm;
+	}
+
+	pango_font_description_set_size (context->font_desc,
+					 72 * KEY_FONT_SIZE * dpi_x *
+					 context->scale_numerator /
+					 context->scale_denominator);
+	pango_layout_set_spacing (context->layout,
+				  -160 * dpi_y * context->scale_numerator /
+				  context->scale_denominator);
+	pango_layout_set_font_description (context->layout,
+					   context->font_desc);
+
+	return TRUE;
+}
+
+static void
+size_allocate (CtkWidget              *widget G_GNUC_UNUSED,
+	       CtkAllocation          *allocation,
+	       CafekbdKeyboardDrawing *drawing)
+{
+	CafekbdKeyboardDrawingRenderContext *context = drawing->renderContext;
+
+	if (drawing->surface) {
+		cairo_surface_destroy (drawing->surface);
+		drawing->surface = NULL;
+	}
+
+	if (!context_setup_scaling (context, drawing,
+				    allocation->width, allocation->height,
+				    50, 50))
+		return;
+
+	if (!drawing->idle_redraw)
+		drawing->idle_redraw = g_idle_add (idle_redraw, drawing);
+}
+
+static gint
+key_event (CtkWidget              *widget G_GNUC_UNUSED,
+	   CdkEventKey            *event,
+	   CafekbdKeyboardDrawing *drawing)
+{
+	CafekbdKeyboardDrawingKey *key;
+	if (!drawing->xkb)
+		return FALSE;
+
+	key = drawing->keys + event->hardware_keycode;
+
+	if (event->hardware_keycode > drawing->xkb->max_key_code ||
+	    event->hardware_keycode < drawing->xkb->min_key_code ||
+	    key->xkbkey == NULL) {
+		g_signal_emit (drawing,
+			       cafekbd_keyboard_drawing_signals[BAD_KEYCODE],
+			       0, event->hardware_keycode);
+		return TRUE;
+	}
+
+	if ((event->type == CDK_KEY_PRESS && key->pressed) ||
+	    (event->type == CDK_KEY_RELEASE && !key->pressed))
+		return TRUE;
+	/* otherwise this event changes the state we believed we had before */
+
+	key->pressed = (event->type == CDK_KEY_PRESS);
+
+	if (create_cairo (drawing)) {
+		draw_key (drawing->renderContext, drawing, key);
+		redraw_overlapping_doodads (drawing->renderContext,
+					    drawing, key);
+		destroy_cairo (drawing);
+	}
+
+	invalidate_key_region (drawing, key);
+	return TRUE;
+}
+
+static gint
+button_press_event (CtkWidget              *widget,
+		    CdkEventButton         *event G_GNUC_UNUSED,
+		    CafekbdKeyboardDrawing *drawing)<--- Parameter 'drawing' can be declared as pointer to const
+{
+	if (!drawing->xkb)
+		return FALSE;
+
+	ctk_widget_grab_focus (widget);
+	return FALSE;
+}
+
+static gboolean
+unpress_keys (CafekbdKeyboardDrawing * drawing)
+{
+	gint i;
+
+	drawing->timeout = 0;
+
+	if (!drawing->xkb)
+		return FALSE;
+
+	if (create_cairo (drawing)) {
+		for (i = drawing->xkb->min_key_code;
+		     i <= drawing->xkb->max_key_code; i++)
+			if (drawing->keys[i].pressed) {
+				drawing->keys[i].pressed = FALSE;
+				draw_key (drawing->renderContext, drawing,
+					  drawing->keys + i);
+				invalidate_key_region (drawing,
+						       drawing->keys + i);
+			}
+		destroy_cairo (drawing);
+	}
+
+	return FALSE;
+}
+
+static gint
+focus_event (CtkWidget              *widget G_GNUC_UNUSED,
+	     CdkEventFocus          *event,<--- Parameter 'event' can be declared as pointer to const
+	     CafekbdKeyboardDrawing *drawing)
+{
+	if (event->in && drawing->timeout > 0) {
+		g_source_remove (drawing->timeout);
+		drawing->timeout = 0;
+	} else if (drawing->timeout == 0)
+		drawing->timeout =
+		    g_timeout_add (120, (GSourceFunc) unpress_keys,
+				   drawing);
+
+	return FALSE;
+}
+
+static gint
+compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a,<--- Parameter 'a' can be declared as pointer to const
+				  CafekbdKeyboardDrawingItem * b)<--- Parameter 'b' can be declared as pointer to const
+{
+	if (a->priority > b->priority)
+		return 1;
+	else if (a->priority < b->priority)
+		return -1;
+	else
+		return 0;
+}
+
+static void
+init_indicator_doodad (CafekbdKeyboardDrawing * drawing,
+		       XkbDoodadRec * xkbdoodad,
+		       CafekbdKeyboardDrawingDoodad * doodad)
+{
+	if (!drawing->xkb)
+		return;
+
+	if (xkbdoodad->any.type == XkbIndicatorDoodad) {
+		gint index;
+		Atom iname = 0;
+		Atom sname = xkbdoodad->indicator.name;
+		unsigned long phys_indicators =
+		    drawing->xkb->indicators->phys_indicators;
+		Atom *pind = drawing->xkb->names->indicators;<--- Variable 'pind' can be declared as pointer to const
+
+#ifdef KBDRAW_DEBUG
+		printf ("Looking for %d[%s]\n",
+			(int) sname, XGetAtomName (drawing->display,
+						   sname));
+#endif
+
+		for (index = 0; index < XkbNumIndicators; index++) {
+			iname = *pind++;
+			/* name matches and it is real */
+			if (iname == sname
+			    && (phys_indicators & (1 << index)))
+				break;
+			if (iname == 0)
+				break;
+		}
+		if (iname == 0)
+			g_warning ("Could not find indicator %d [%s]\n",
+				   (int) sname,
+				   XGetAtomName (drawing->display, sname));
+		else {
+#ifdef KBDRAW_DEBUG
+			printf ("Found in xkbdesc as %d\n", index);
+#endif
+			drawing->physical_indicators[index] = doodad;
+			/* Trying to obtain the real state, but if fail - just assume OFF */
+			if (!XkbGetNamedIndicator
+			    (drawing->display, sname, NULL, &doodad->on,
+			     NULL, NULL))
+				doodad->on = 0;
+		}
+	}
+}
+
+static void
+init_keys_and_doodads (CafekbdKeyboardDrawing * drawing)
+{
+	gint i, j, k;
+	gint x, y;
+
+	if (!drawing->xkb)
+		return;
+
+	for (i = 0; i < drawing->xkb->geom->num_doodads; i++) {
+		XkbDoodadRec *xkbdoodad = drawing->xkb->geom->doodads + i;
+		CafekbdKeyboardDrawingDoodad *doodad =
+		    g_new (CafekbdKeyboardDrawingDoodad, 1);
+
+		doodad->type = CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD;
+		doodad->origin_x = 0;
+		doodad->origin_y = 0;
+		doodad->angle = 0;
+		doodad->priority = xkbdoodad->any.priority * 256 * 256;
+		doodad->doodad = xkbdoodad;
+
+		init_indicator_doodad (drawing, xkbdoodad, doodad);
+
+		drawing->keyboard_items =
+		    g_list_append (drawing->keyboard_items, doodad);
+	}
+
+	for (i = 0; i < drawing->xkb->geom->num_sections; i++) {
+		XkbSectionRec *section = drawing->xkb->geom->sections + i;
+		guint priority;
+
+#ifdef KBDRAW_DEBUG
+		printf ("initing section %d containing %d rows\n", i,
+			section->num_rows);
+#endif
+		x = section->left;
+		y = section->top;
+		priority = section->priority * 256 * 256;
+
+		for (j = 0; j < section->num_rows; j++) {
+			XkbRowRec *row = section->rows + j;
+
+#ifdef KBDRAW_DEBUG
+			printf ("  initing row %d\n", j);
+#endif
+			x = section->left + row->left;
+			y = section->top + row->top;
+
+			for (k = 0; k < row->num_keys; k++) {
+				XkbKeyRec *xkbkey = row->keys + k;
+				CafekbdKeyboardDrawingKey *key;
+				XkbShapeRec *shape =
+				    drawing->xkb->geom->shapes +
+				    xkbkey->shape_ndx;
+				guint keycode = find_keycode (drawing,
+							      xkbkey->
+							      name.name);
+
+				if (keycode == INVALID_KEYCODE)
+					continue;
+#ifdef KBDRAW_DEBUG
+				printf
+				    ("    initing key %d, shape: %p(%p + %d), code: %u\n",
+				     k, shape, drawing->xkb->geom->shapes,
+				     xkbkey->shape_ndx, keycode);
+#endif
+				if (row->vertical)
+					y += xkbkey->gap;
+				else
+					x += xkbkey->gap;
+
+				if (keycode >= drawing->xkb->min_key_code
+				    && keycode <=
+				    drawing->xkb->max_key_code) {
+					key = drawing->keys + keycode;
+					if (key->type ==
+					    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_INVALID)
+					{
+						key->type =
+						    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY;
+					} else {
+						/* duplicate key for the same keycode,
+						   already defined as CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY */
+						key =
+						    g_new0
+						    (CafekbdKeyboardDrawingKey,
+						     1);
+						key->type =
+						    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA;
+					}
+				} else {
+					g_warning
+					    ("key %4.4s: keycode = %u; not in range %d..%d\n",
+					     xkbkey->name.name, keycode,
+					     drawing->xkb->min_key_code,
+					     drawing->xkb->max_key_code);
+
+					key =
+					    g_new0 (CafekbdKeyboardDrawingKey,
+						    1);
+					key->type =
+					    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA;
+				}
+
+				key->xkbkey = xkbkey;
+				key->angle = section->angle;
+				rotate_coordinate (section->left,
+						   section->top, x, y,
+						   section->angle,
+						   &key->origin_x,
+						   &key->origin_y);
+				key->priority = priority;
+				key->keycode = keycode;
+
+				drawing->keyboard_items =
+				    g_list_append (drawing->keyboard_items,
+						   key);
+
+				if (row->vertical)
+					y += shape->bounds.y2;
+				else
+					x += shape->bounds.x2;
+
+				priority++;
+			}
+		}
+
+		for (j = 0; j < section->num_doodads; j++) {
+			XkbDoodadRec *xkbdoodad = section->doodads + j;
+			CafekbdKeyboardDrawingDoodad *doodad =
+			    g_new (CafekbdKeyboardDrawingDoodad, 1);
+
+			doodad->type =
+			    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD;
+			doodad->origin_x = x;
+			doodad->origin_y = y;
+			doodad->angle = section->angle;
+			doodad->priority =
+			    priority + xkbdoodad->any.priority;
+			doodad->doodad = xkbdoodad;
+
+			init_indicator_doodad (drawing, xkbdoodad, doodad);
+
+			drawing->keyboard_items =
+			    g_list_append (drawing->keyboard_items,
+					   doodad);
+		}
+	}
+
+	drawing->keyboard_items = g_list_sort (drawing->keyboard_items,
+					       (GCompareFunc)
+					       compare_keyboard_item_priorities);<--- You might need to cast the function pointer here<--- You might need to cast the function pointer here
+}
+
+static void
+init_colors (CafekbdKeyboardDrawing * drawing)
+{
+	gboolean result;
+	gint i;
+
+	if (!drawing->xkb)
+		return;
+
+	drawing->colors = g_new (CdkRGBA, drawing->xkb->geom->num_colors);
+
+	for (i = 0; i < drawing->xkb->geom->num_colors; i++) {
+		result =
+		    parse_xkb_color_spec (drawing->xkb->geom->
+					  colors[i].spec,
+					  drawing->colors + i);
+
+		if (!result)
+			g_warning
+			    ("init_colors: unable to parse color %s\n",
+			     drawing->xkb->geom->colors[i].spec);
+	}
+}
+
+static void
+free_cdik (			/*colors doodads indicators keys */
+		  CafekbdKeyboardDrawing * drawing)
+{
+	GList *itemp;
+
+	if (!drawing->xkb)
+		return;
+
+	for (itemp = drawing->keyboard_items; itemp; itemp = itemp->next) {
+		CafekbdKeyboardDrawingItem *item = itemp->data;
+
+		switch (item->type) {
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_INVALID:
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY:
+			break;
+
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA:
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD:
+			g_free (item);
+			break;
+		}
+	}
+
+	g_list_free (drawing->keyboard_items);
+	drawing->keyboard_items = NULL;
+
+	g_free (drawing->keys);
+	g_free (drawing->colors);
+}
+
+static void
+alloc_cdik (CafekbdKeyboardDrawing * drawing)
+{
+	if (!drawing->xkb)
+		return;
+
+	drawing->physical_indicators_size =
+	    drawing->xkb->indicators->phys_indicators + 1;
+	drawing->physical_indicators =
+	    g_new0 (CafekbdKeyboardDrawingDoodad *,
+		    drawing->physical_indicators_size);
+	drawing->keys =
+	    g_new0 (CafekbdKeyboardDrawingKey,
+		    drawing->xkb->max_key_code + 1);
+}
+
+static void
+process_indicators_state_notify (XkbIndicatorNotifyEvent * iev,<--- Parameter 'iev' can be declared as pointer to const
+				 CafekbdKeyboardDrawing * drawing)
+{
+	/* Good question: should we track indicators when the keyboard is
+	   NOT really taken from the screen */
+	gint i;
+
+	for (i = 0; i <= drawing->xkb->indicators->phys_indicators; i++)
+		if (drawing->physical_indicators[i] != NULL
+		    && (iev->changed & 1 << i)) {
+			gint state = (iev->state & 1 << i) != FALSE;
+
+			if ((state && !drawing->physical_indicators[i]->on)
+			    || (!state
+				&& drawing->physical_indicators[i]->on)) {
+				drawing->physical_indicators[i]->on =
+				    state;
+				if (create_cairo (drawing)) {
+					draw_doodad
+					    (drawing->renderContext,
+					     drawing,
+					     drawing->physical_indicators
+					     [i]);
+					destroy_cairo (drawing);
+				}
+				invalidate_indicator_doodad_region
+				    (drawing,
+				     drawing->physical_indicators[i]);
+			}
+		}
+}
+
+static CdkFilterReturn
+xkb_state_notify_event_filter (CdkXEvent              *cdkxev,
+			       CdkEvent               *event G_GNUC_UNUSED,
+			       CafekbdKeyboardDrawing *drawing)
+{
+#define modifier_change_mask (XkbModifierStateMask | XkbModifierBaseMask | XkbModifierLatchMask | XkbModifierLockMask)
+
+	if (!drawing->xkb)
+		return CDK_FILTER_CONTINUE;
+
+	if (((XEvent *) cdkxev)->type == drawing->xkb_event_type) {
+		XkbEvent *kev = (XkbEvent *) cdkxev;
+		CtkAllocation allocation;
+		switch (kev->any.xkb_type) {
+		case XkbStateNotify:
+			if (((kev->state.changed & modifier_change_mask) &&
+			     drawing->track_modifiers)) {
+				free_cdik (drawing);
+				if (drawing->track_modifiers)
+					cafekbd_keyboard_drawing_set_mods
+					    (drawing,
+					     kev->state.compat_state);
+				drawing->keys =
+				    g_new0 (CafekbdKeyboardDrawingKey,
+					    drawing->xkb->max_key_code +
+					    1);
+
+				ctk_widget_get_allocation (CTK_WIDGET
+							   (drawing),
+							   &allocation);
+				size_allocate (CTK_WIDGET (drawing),
+					       &allocation, drawing);
+
+				init_keys_and_doodads (drawing);
+				init_colors (drawing);
+			}
+			break;
+
+		case XkbIndicatorStateNotify:
+			{
+				process_indicators_state_notify (&
+								 ((XkbEvent
+								   *)
+								  cdkxev)->indicators,
+drawing);
+			}
+			break;
+
+		case XkbIndicatorMapNotify:
+		case XkbControlsNotify:
+		case XkbNamesNotify:
+		case XkbNewKeyboardNotify:
+			{
+				XkbStateRec state;
+				memset (&state, 0, sizeof (state));
+				XkbGetState (drawing->display,
+					     XkbUseCoreKbd, &state);
+				if (drawing->track_modifiers)
+					cafekbd_keyboard_drawing_set_mods
+					    (drawing, state.compat_state);
+				if (drawing->track_config)
+					cafekbd_keyboard_drawing_set_keyboard
+					    (drawing, NULL);
+			}
+			break;
+		}
+	}
+
+	return CDK_FILTER_CONTINUE;
+}
+
+static void
+destroy (CafekbdKeyboardDrawing * drawing)
+{
+	free_render_context (drawing);
+	cdk_window_remove_filter (NULL, (CdkFilterFunc)
+				  xkb_state_notify_event_filter, drawing);
+	if (drawing->timeout > 0) {
+		g_source_remove (drawing->timeout);
+		drawing->timeout = 0;
+	}
+	if (drawing->idle_redraw > 0) {
+		g_source_remove (drawing->idle_redraw);
+		drawing->idle_redraw = 0;
+	}
+
+	if (drawing->surface != NULL) {
+		cairo_surface_destroy (drawing->surface);
+	}
+}
+
+static void
+style_changed (CafekbdKeyboardDrawing * drawing)
+{
+	pango_layout_context_changed (drawing->renderContext->layout);
+}
+
+static void
+cafekbd_keyboard_drawing_init (CafekbdKeyboardDrawing * drawing)
+{
+	gint opcode = 0, error = 0, major = 1, minor = 0;
+	gint mask;
+
+	drawing->display = CDK_DISPLAY_XDISPLAY(cdk_display_get_default());
+
+	printf ("dpy: %p\n", (void *) drawing->display);
+
+	if (!XkbQueryExtension
+	    (drawing->display, &opcode, &drawing->xkb_event_type, &error,
+	     &major, &minor))
+		g_critical
+		    ("XkbQueryExtension failed! Stuff probably won't work.");
+
+	printf ("evt/error/major/minor: %d/%d/%d/%d\n",
+		drawing->xkb_event_type, error, major, minor);
+
+	/* XXX: this stuff probably doesn't matter.. also, cdk_screen_get_default can fail */
+	if (ctk_widget_has_screen (CTK_WIDGET (drawing)))
+		drawing->screen_num =
+		    cdk_x11_screen_get_screen_number (ctk_widget_get_screen
+					   (CTK_WIDGET (drawing)));
+	else
+		drawing->screen_num =
+		    cdk_x11_screen_get_screen_number (cdk_screen_get_default ());
+
+	drawing->surface = NULL;
+	alloc_render_context (drawing);
+
+	drawing->keyboard_items = NULL;
+	drawing->colors = NULL;
+
+	drawing->track_modifiers = 0;
+	drawing->track_config = 0;
+
+	/* XXX: XkbClientMapMask | XkbIndicatorMapMask | XkbNamesMask | XkbGeometryMask */
+	drawing->xkb = XkbGetKeyboard (drawing->display,
+				       XkbGBN_GeometryMask |
+				       XkbGBN_KeyNamesMask |
+				       XkbGBN_OtherNamesMask |
+				       XkbGBN_SymbolsMask |
+				       XkbGBN_IndicatorMapMask,
+				       XkbUseCoreKbd);
+	if (drawing->xkb) {
+		XkbGetNames (drawing->display, XkbAllNamesMask, drawing->xkb);
+		XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+				       XkbIndicatorStateNotify,
+				       drawing->xkb->indicators->phys_indicators,
+				       drawing->xkb->indicators->phys_indicators);
+	}
+
+	drawing->l3mod = XkbKeysymToModifiers (drawing->display,
+					       CDK_KEY_ISO_Level3_Shift);
+
+	drawing->xkbOnDisplay = TRUE;
+
+	alloc_cdik (drawing);
+
+	mask =
+	    (XkbStateNotifyMask | XkbNamesNotifyMask |
+	     XkbControlsNotifyMask | XkbIndicatorMapNotifyMask |
+	     XkbNewKeyboardNotifyMask);
+	XkbSelectEvents (drawing->display, XkbUseCoreKbd, mask, mask);
+
+	mask = XkbGroupStateMask | XkbModifierStateMask;
+	XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+			       XkbStateNotify, mask, mask);
+
+	mask = (XkbGroupNamesMask | XkbIndicatorNamesMask);
+	XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+			       XkbNamesNotify, mask, mask);
+	init_keys_and_doodads (drawing);
+	init_colors (drawing);
+
+	/* required to get key events */
+	ctk_widget_set_can_focus (CTK_WIDGET (drawing), TRUE);
+
+	ctk_widget_set_events (CTK_WIDGET (drawing),
+			       CDK_EXPOSURE_MASK | CDK_KEY_PRESS_MASK |
+			       CDK_KEY_RELEASE_MASK | CDK_BUTTON_PRESS_MASK
+			       | CDK_FOCUS_CHANGE_MASK);
+	g_signal_connect (G_OBJECT (drawing), "draw",
+			  G_CALLBACK (draw), drawing);
+	g_signal_connect_after (G_OBJECT (drawing), "key-press-event",
+				G_CALLBACK (key_event), drawing);
+	g_signal_connect_after (G_OBJECT (drawing), "key-release-event",
+				G_CALLBACK (key_event), drawing);
+	g_signal_connect (G_OBJECT (drawing), "button-press-event",
+			  G_CALLBACK (button_press_event), drawing);<--- You might need to cast the function pointer here
+	g_signal_connect (G_OBJECT (drawing), "focus-out-event",
+			  G_CALLBACK (focus_event), drawing);
+	g_signal_connect (G_OBJECT (drawing), "focus-in-event",
+			  G_CALLBACK (focus_event), drawing);<--- You might need to cast the function pointer here
+	g_signal_connect (G_OBJECT (drawing), "size-allocate",
+			  G_CALLBACK (size_allocate), drawing);
+	g_signal_connect (G_OBJECT (drawing), "destroy",
+			  G_CALLBACK (destroy), drawing);
+	g_signal_connect (G_OBJECT (drawing), "style-set",
+			  G_CALLBACK (style_changed), drawing);
+
+	cdk_window_add_filter (NULL, (CdkFilterFunc)
+			       xkb_state_notify_event_filter, drawing);
+}
+
+CtkWidget *
+cafekbd_keyboard_drawing_new (void)
+{
+	return
+	    CTK_WIDGET (g_object_new
+			(cafekbd_keyboard_drawing_get_type (), NULL));
+}
+
+static void
+cafekbd_keyboard_drawing_class_init (CafekbdKeyboardDrawingClass * klass)
+{
+	CtkWidgetClass *widget_class = CTK_WIDGET_CLASS (klass);
+	ctk_widget_class_set_css_name (widget_class, "cafekbd-keyboard-drawing");
+
+	klass->bad_keycode = NULL;
+
+	cafekbd_keyboard_drawing_signals[BAD_KEYCODE] =
+	    g_signal_new ("bad-keycode", cafekbd_keyboard_drawing_get_type (),
+			  G_SIGNAL_RUN_FIRST,
+			  G_STRUCT_OFFSET (CafekbdKeyboardDrawingClass,
+					   bad_keycode), NULL, NULL,
+			  cafekbd_keyboard_drawing_VOID__UINT, G_TYPE_NONE, 1,
+			  G_TYPE_UINT);
+}
+
+GType
+cafekbd_keyboard_drawing_get_type (void)
+{
+	static GType cafekbd_keyboard_drawing_type = 0;
+
+	if (!cafekbd_keyboard_drawing_type) {
+		static const GTypeInfo cafekbd_keyboard_drawing_info = {
+			sizeof (CafekbdKeyboardDrawingClass),
+			NULL,	/* base_init */
+			NULL,	/* base_finalize */
+			(GClassInitFunc) cafekbd_keyboard_drawing_class_init,
+			NULL,	/* class_finalize */
+			NULL,	/* class_data */
+			sizeof (CafekbdKeyboardDrawing),
+			0,	/* n_preallocs */
+			(GInstanceInitFunc) cafekbd_keyboard_drawing_init,
+			NULL	/* *value_table */
+		};
+
+		cafekbd_keyboard_drawing_type =
+		    g_type_register_static (CTK_TYPE_DRAWING_AREA,
+					    "CafekbdKeyboardDrawing",
+					    &cafekbd_keyboard_drawing_info,
+					    0);
+	}
+
+	return cafekbd_keyboard_drawing_type;
+}
+
+void
+cafekbd_keyboard_drawing_set_mods (CafekbdKeyboardDrawing * drawing, guint mods)
+{
+#ifdef KBDRAW_DEBUG
+	printf ("set_mods: %d\n", mods);
+#endif
+	if (mods != drawing->mods) {
+		drawing->mods = mods;
+		ctk_widget_queue_draw (CTK_WIDGET (drawing));
+	}
+}
+
+/**
+ * cafekbd_keyboard_drawing_render:
+ * @kbdrawing: keyboard layout to render
+ * @cr:        Cairo context to render to
+ * @layout:    Pango layout to use to render text
+ * @x:         left coordinate (pixels) of region to render in
+ * @y:         top coordinate (pixels) of region to render in
+ * @width:     width (pixels) of region to render in
+ * @height:    height (pixels) of region to render in
+ *
+ * Renders a keyboard layout to a cairo_t context.  @cr and @layout can be got
+ * from e.g. a CtkWidget or a CtkPrintContext.  @cr and @layout may be modified
+ * by the function but will not be unreffed.
+ *
+ * Returns: %TRUE on success, %FALSE on failure
+ */
+gboolean
+cafekbd_keyboard_drawing_render (CafekbdKeyboardDrawing * kbdrawing,
+			      cairo_t * cr,
+			      PangoLayout * layout,
+			      double x, double y,
+			      double width, double height,
+			      double dpi_x, double dpi_y)
+{
+	CtkStyleContext *style_context =
+	    ctk_widget_get_style_context (CTK_WIDGET (kbdrawing));
+	CdkRGBA dark_color;
+	PangoFontDescription *fd = NULL;
+
+	ctk_style_context_get_background_color (style_context,
+	                                        ctk_style_context_get_state (style_context),
+	                                        &dark_color);
+	/* make dark background by making regular background darker */
+	dark_color.red *= 0.7;
+	dark_color.green *= 0.7;
+	dark_color.blue *= 0.7;
+
+	ctk_style_context_get (style_context,
+	                       ctk_style_context_get_state (style_context),
+	                       CTK_STYLE_PROPERTY_FONT, &fd, NULL);
+	fd = pango_font_description_copy (fd);
+
+	CafekbdKeyboardDrawingRenderContext context = {
+		cr,
+		kbdrawing->renderContext->angle,
+		layout,
+		pango_font_description_copy (fd),
+		1, 1,
+		dark_color
+	};
+
+	if (!context_setup_scaling (&context, kbdrawing, width, height,
+	                            dpi_x, dpi_y))
+		return FALSE;
+	cairo_translate (cr, x, y);
+
+	draw_keyboard_to_context (&context, kbdrawing);
+
+	pango_font_description_free (fd);
+
+	return TRUE;
+}
+
+/**
+ * cafekbd_keyboard_drawing_set_keyboard: (skip)
+ */
+gboolean
+cafekbd_keyboard_drawing_set_keyboard (CafekbdKeyboardDrawing * drawing,
+				    XkbComponentNamesRec * names)
+{
+	CtkAllocation allocation;
+
+	free_cdik (drawing);
+	if (drawing->xkb)
+		XkbFreeKeyboard (drawing->xkb, 0, TRUE);	/* free_all = TRUE */
+	drawing->xkb = NULL;
+
+	if (names) {
+		drawing->xkb =
+		    XkbGetKeyboardByName (drawing->display, XkbUseCoreKbd,
+					  names, 0,
+					  XkbGBN_GeometryMask |
+					  XkbGBN_KeyNamesMask |
+					  XkbGBN_OtherNamesMask |
+					  XkbGBN_ClientSymbolsMask |
+					  XkbGBN_IndicatorMapMask, FALSE);
+		drawing->xkbOnDisplay = FALSE;
+	} else {
+		drawing->xkb = XkbGetKeyboard (drawing->display,
+					       XkbGBN_GeometryMask |
+					       XkbGBN_KeyNamesMask |
+					       XkbGBN_OtherNamesMask |
+					       XkbGBN_SymbolsMask |
+					       XkbGBN_IndicatorMapMask,
+					       XkbUseCoreKbd);
+		XkbGetNames (drawing->display, XkbAllNamesMask,
+			     drawing->xkb);
+		drawing->xkbOnDisplay = TRUE;
+	}
+
+	if (drawing->xkb) {
+		XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+				       XkbIndicatorStateNotify,
+				       drawing->xkb->indicators->phys_indicators,
+				       drawing->xkb->indicators->phys_indicators);
+	}
+
+	alloc_cdik (drawing);
+
+	init_keys_and_doodads (drawing);
+	init_colors (drawing);
+
+	ctk_widget_get_allocation (CTK_WIDGET (drawing), &allocation);
+	size_allocate (CTK_WIDGET (drawing), &allocation, drawing);
+	ctk_widget_queue_draw (CTK_WIDGET (drawing));
+
+	return TRUE;
+}
+
+const gchar* cafekbd_keyboard_drawing_get_keycodes(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->keycodes <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->keycodes);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_geometry(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->geometry <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->geometry);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_symbols(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->symbols <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->symbols);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_types(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->types <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->types);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_compat(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->compat <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->compat);
+	}
+}
+
+void
+cafekbd_keyboard_drawing_set_track_modifiers (CafekbdKeyboardDrawing * drawing,
+					   gboolean enable)
+{
+	if (enable) {
+		XkbStateRec state;
+		drawing->track_modifiers = 1;
+		memset (&state, 0, sizeof (state));
+		XkbGetState (drawing->display, XkbUseCoreKbd, &state);
+		cafekbd_keyboard_drawing_set_mods (drawing,
+						state.compat_state);
+	} else
+		drawing->track_modifiers = 0;
+}
+
+void
+cafekbd_keyboard_drawing_set_track_config (CafekbdKeyboardDrawing * drawing,
+					gboolean enable)
+{
+	if (enable)
+		drawing->track_config = 1;
+	else
+		drawing->track_config = 0;
+}
+
+void
+cafekbd_keyboard_drawing_set_groups_levels (CafekbdKeyboardDrawing * drawing,
+					 CafekbdKeyboardDrawingGroupLevel *
+					 groupLevels[])
+{
+#ifdef KBDRAW_DEBUG
+	printf ("set_group_levels [topLeft]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT]->level);
+	printf ("set_group_levels [topRight]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPRIGHT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPRIGHT]->level);
+	printf ("set_group_levels [bottomLeft]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT]->level);
+	printf ("set_group_levels [bottomRight]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT]->level);
+#endif
+	drawing->groupLevels = groupLevels;
+
+	ctk_widget_queue_draw (CTK_WIDGET (drawing));
+}
+
+typedef struct {
+	CafekbdKeyboardDrawing *drawing;
+	const gchar *description;
+} XkbLayoutPreviewPrintData;
+
+static void
+cafekbd_keyboard_drawing_begin_print (CtkPrintOperation         *operation,
+				      CtkPrintContext           *context G_GNUC_UNUSED,
+				      XkbLayoutPreviewPrintData *data G_GNUC_UNUSED)
+{
+	/* We always print single-page documents */
+	CtkPrintSettings *settings =
+	    ctk_print_operation_get_print_settings (operation);
+	ctk_print_operation_set_n_pages (operation, 1);
+	if (!ctk_print_settings_has_key
+	    (settings, CTK_PRINT_SETTINGS_ORIENTATION))
+		ctk_print_settings_set_orientation (settings,
+						    CTK_PAGE_ORIENTATION_LANDSCAPE);
+}
+
+static void
+cafekbd_keyboard_drawing_draw_page (CtkPrintOperation         *operation,
+				    CtkPrintContext           *context,
+				    gint                       page_nr G_GNUC_UNUSED,
+				    XkbLayoutPreviewPrintData *data)
+{
+	cairo_t *cr = ctk_print_context_get_cairo_context (context);
+	PangoLayout *layout =
+	    ctk_print_context_create_pango_layout (context);
+	PangoFontDescription *desc =
+	    pango_font_description_from_string ("sans 8");
+	gdouble width = ctk_print_context_get_width (context);
+	gdouble height = ctk_print_context_get_height (context);
+	gdouble dpi_x = ctk_print_context_get_dpi_x (context);
+	gdouble dpi_y = ctk_print_context_get_dpi_y (context);
+	gchar *header;
+
+	ctk_print_operation_set_unit (operation, CTK_UNIT_PIXEL);
+
+	header = g_strdup_printf
+	    (_("Keyboard layout \"%s\"\n"
+	       "Copyright &#169; X.Org Foundation and "
+	       "XKeyboardConfig contributors\n"
+	       "For licensing see package metadata"), data->description);
+	pango_layout_set_markup (layout, header, -1);
+	pango_layout_set_font_description (layout, desc);
+	pango_font_description_free (desc);
+	pango_layout_set_width (layout, pango_units_from_double (width));
+	pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER);
+	cairo_set_source_rgb (cr, 0, 0, 0);
+	cairo_move_to (cr, 0, 0);
+	pango_cairo_show_layout (cr, layout);
+
+	cafekbd_keyboard_drawing_render (CAFEKBD_KEYBOARD_DRAWING
+				      (data->drawing), cr, layout, 0.0,
+				      0.0, width, height, dpi_x, dpi_y);
+
+	g_object_unref (layout);
+}
+
+void
+cafekbd_keyboard_drawing_print (CafekbdKeyboardDrawing * drawing,
+			     CtkWindow * parent_window,
+			     const gchar * description)
+{
+	CtkPrintOperation *print;
+	CtkPrintOperationResult res;
+	static CtkPrintSettings *settings = NULL;
+	XkbLayoutPreviewPrintData data = { drawing, description };
+
+	print = ctk_print_operation_new ();
+
+	if (settings != NULL)
+		ctk_print_operation_set_print_settings (print, settings);
+
+	g_signal_connect (print, "begin_print",
+			  G_CALLBACK (cafekbd_keyboard_drawing_begin_print),
+			  &data);
+	g_signal_connect (print, "draw_page",
+			  G_CALLBACK (cafekbd_keyboard_drawing_draw_page),
+			  &data);
+
+	res = ctk_print_operation_run (print,
+				       CTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
+				       parent_window, NULL);
+
+	if (res == CTK_PRINT_OPERATION_RESULT_APPLY) {
+		if (settings != NULL)
+			g_object_unref (settings);
+		settings = ctk_print_operation_get_print_settings (print);
+		g_object_ref (settings);
+	}
+
+	g_object_unref (print);
+}
+
+static void
+show_layout_response (CtkWidget * dialog, gint resp)
+{
+	CdkRectangle rect;
+	CtkWidget *kbdraw;
+	const gchar *groupName;
+
+	switch (resp) {
+	case CTK_RESPONSE_CLOSE:
+		ctk_window_get_position (CTK_WINDOW (dialog), &rect.x,
+					 &rect.y);
+		ctk_window_get_size (CTK_WINDOW (dialog), &rect.width,
+				     &rect.height);
+		cafekbd_preview_save_position (&rect);
+		ctk_widget_destroy (dialog);
+		break;
+	case CTK_RESPONSE_PRINT:
+		kbdraw =
+		    CTK_WIDGET (g_object_get_data
+				(G_OBJECT (dialog), "kbdraw"));
+		groupName =
+		    (const gchar *) g_object_get_data (G_OBJECT (dialog),
+						       "groupName");
+		cafekbd_keyboard_drawing_print (CAFEKBD_KEYBOARD_DRAWING
+					     (kbdraw), CTK_WINDOW (dialog),
+					     groupName ? groupName :
+					     _("Unknown"));
+	}
+}
+
+CtkWidget *
+cafekbd_keyboard_drawing_new_dialog (gint group, gchar * group_name)
+{
+	static CafekbdKeyboardDrawingGroupLevel groupsLevels[] = { {
+								 0, 1}, {
+									 0,
+									 3},
+	{
+	 0, 0}, {
+		 0, 2}
+	};
+	static CafekbdKeyboardDrawingGroupLevel *pGroupsLevels[] = {
+		groupsLevels, groupsLevels + 1, groupsLevels + 2,
+		groupsLevels + 3
+	};
+
+	CtkBuilder *builder;
+	CtkWidget *dialog, *kbdraw;
+	XkbComponentNamesRec component_names;
+	XklConfigRec *xkl_data;
+	CdkRectangle *rect;
+	GError *error = NULL;
+	char title[128] = "";
+	XklEngine* engine = xkl_engine_get_instance(CDK_DISPLAY_XDISPLAY(cdk_display_get_default()));
+
+	builder = ctk_builder_new ();
+	ctk_builder_add_from_resource (builder,
+	                               "/org/cafe/peripherals/keyboard/show-layout.ui",
+	                               &error);
+
+	if (error) {
+		g_error ("Could not load UI: %s", error->message);
+		g_clear_error (&error);
+	}
+
+
+	dialog =
+	    CTK_WIDGET (ctk_builder_get_object
+			(builder, "gswitchit_layout_view"));
+	kbdraw = cafekbd_keyboard_drawing_new ();
+	ctk_widget_set_vexpand (kbdraw, TRUE);
+
+	snprintf (title, sizeof (title), _("Keyboard Layout \"%s\""),
+		  group_name);
+	ctk_window_set_title (CTK_WINDOW (dialog), title);
+	g_object_set_data_full (G_OBJECT (dialog), "group_name",
+				g_strdup (group_name), g_free);
+
+	cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING
+						 (kbdraw), pGroupsLevels);
+
+	xkl_data = xkl_config_rec_new ();
+	if (xkl_config_rec_get_from_server (xkl_data, engine)) {
+		int num_layouts = g_strv_length (xkl_data->layouts);
+		int num_variants = g_strv_length (xkl_data->variants);
+		if (group >= 0 && group < num_layouts
+		    && group < num_variants) {
+			char *l = g_strdup (xkl_data->layouts[group]);
+			char *v = g_strdup (xkl_data->variants[group]);
+			char **p;
+			int i;
+
+			if ((p = xkl_data->layouts) != NULL)
+				for (i = num_layouts; --i >= 0;)
+					g_free (*p++);
+
+			if ((p = xkl_data->variants) != NULL)
+				for (i = num_variants; --i >= 0;)
+					g_free (*p++);
+
+			xkl_data->layouts =
+			    g_realloc (xkl_data->layouts,
+				       sizeof (char *) * 2);
+			xkl_data->variants =
+			    g_realloc (xkl_data->variants,
+				       sizeof (char *) * 2);
+			xkl_data->layouts[0] = l;
+			xkl_data->variants[0] = v;
+			xkl_data->layouts[1] = xkl_data->variants[1] =
+			    NULL;
+		}
+
+		if (xkl_xkb_config_native_prepare(engine, xkl_data, &component_names))
+		{
+			cafekbd_keyboard_drawing_set_keyboard
+			    (CAFEKBD_KEYBOARD_DRAWING (kbdraw),
+			     &component_names);
+			xkl_xkb_config_native_cleanup (engine,
+						       &component_names);
+		}
+	}
+
+	g_object_unref (G_OBJECT (xkl_data));
+
+	g_object_set_data (G_OBJECT (dialog), "builderData", builder);
+	g_signal_connect (G_OBJECT (dialog), "response", G_CALLBACK (show_layout_response), NULL);
+
+	rect = cafekbd_preview_load_position ();
+
+	if (rect != NULL)
+	{
+		ctk_window_move (CTK_WINDOW (dialog), rect->x, rect->y);
+		ctk_window_resize (CTK_WINDOW (dialog), rect->width, rect->height);
+		g_free (rect);
+	}
+	else
+	{
+		ctk_window_resize (CTK_WINDOW (dialog), 700, 400);
+	}
+
+	ctk_window_set_resizable (CTK_WINDOW (dialog), TRUE);
+
+	ctk_container_add (CTK_CONTAINER
+			   (ctk_builder_get_object
+			    (builder, "preview_vbox")), kbdraw);
+
+	g_object_set_data (G_OBJECT (dialog), "kbdraw", kbdraw);
+
+		g_signal_connect_swapped(dialog, "destroy", G_CALLBACK(g_object_unref),  g_object_get_data(G_OBJECT(dialog), "builderData"));
+
+	ctk_widget_show_all(dialog);
+
+	return dialog;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/5.html b/2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/5.html new file mode 100644 index 0000000..a0afe30 --- /dev/null +++ b/2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/5.html @@ -0,0 +1,1978 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+#include <config.h>
+
+#include <memory.h>
+
+#include <cairo.h>
+
+#include <cdk/cdkkeysyms.h>
+#include <cdk/cdkx.h>
+#include <glib/gi18n-lib.h>
+#include <glib/gprintf.h>
+
+#include <cafekbd-status.h>
+
+#include <cafekbd-desktop-config.h>
+#include <cafekbd-indicator-config.h>
+
+typedef struct _gki_globals {
+	XklEngine *engine;
+	XklConfigRegistry *registry;
+
+	CafekbdDesktopConfig cfg;
+	CafekbdIndicatorConfig ind_cfg;
+	CafekbdKeyboardConfig kbd_cfg;
+
+	const gchar *tooltips_format;
+	gchar **full_group_names;
+	gchar **short_group_names;
+
+	gint current_width;
+	gint current_height;
+	int real_width;
+
+	GSList *icons;		/* list of GdkPixbuf */
+	GSList *widget_instances;	/* list of CafekbdStatus */
+	gulong state_changed_handler;
+	gulong config_changed_handler;
+} gki_globals;
+
+static gchar *settings_signal_names[] = {
+	"notify::ctk-theme-name",
+	"notify::ctk-key-theme-name",
+	"notify::ctk-font-name",
+	"notify::font-options",
+};
+
+struct _CafekbdStatusPrivate {
+	gdouble angle;
+	gulong settings_signal_handlers[sizeof (settings_signal_names) /
+					sizeof (settings_signal_names[0])];
+};
+
+/* one instance for ALL widgets */
+static gki_globals globals;
+
+#define ForAllIndicators() \
+	{ \
+		GSList* cur; \
+		for (cur = globals.widget_instances; cur != NULL; cur = cur->next) { \
+			CafekbdStatus * gki = (CafekbdStatus*)cur->data;
+#define NextIndicator() \
+		} \
+	}
+
+G_DEFINE_TYPE (CafekbdStatus, cafekbd_status, CTK_TYPE_STATUS_ICON)<--- There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
+static void
+cafekbd_status_global_init (void);
+static void
+cafekbd_status_global_term (void);
+static GdkPixbuf *
+cafekbd_status_prepare_drawing (CafekbdStatus * gki, int group);
+static void
+cafekbd_status_set_current_page_for_group (CafekbdStatus * gki, int group);
+static void
+cafekbd_status_set_current_page (CafekbdStatus * gki);
+static void
+cafekbd_status_global_cleanup (CafekbdStatus * gki);
+static void
+cafekbd_status_global_fill (CafekbdStatus * gki);
+static void
+cafekbd_status_set_tooltips (CafekbdStatus * gki, const char *str);
+
+void
+cafekbd_status_set_tooltips (CafekbdStatus * gki, const char *str)
+{
+	g_assert (str == NULL || g_utf8_validate (str, -1, NULL));
+
+	ctk_status_icon_set_tooltip_text (CTK_STATUS_ICON (gki), str);
+}
+
+void
+cafekbd_status_global_cleanup (CafekbdStatus *gki G_GNUC_UNUSED)
+{
+	while (globals.icons) {
+		if (globals.icons->data)
+			g_object_unref (G_OBJECT (globals.icons->data));
+		globals.icons =
+		    g_slist_delete_link (globals.icons, globals.icons);
+	}
+}
+
+void
+cafekbd_status_global_fill (CafekbdStatus * gki)
+{
+	int grp;
+	int total_groups = xkl_engine_get_num_groups (globals.engine);
+
+	for (grp = 0; grp < total_groups; grp++) {
+		GdkPixbuf *page = cafekbd_status_prepare_drawing (gki, grp);
+		globals.icons = g_slist_append (globals.icons, page);
+	}
+}
+
+static void
+cafekbd_status_activate (CafekbdStatus *gki G_GNUC_UNUSED)
+{
+	xkl_debug (150, "Mouse button pressed on applet\n");
+	cafekbd_desktop_config_lock_next_group (&globals.cfg);
+}
+
+/* hackish xref */
+extern gchar *cafekbd_indicator_extract_layout_name (int group,
+						  XklEngine * engine,
+						  CafekbdKeyboardConfig *
+						  kbd_cfg,
+						  gchar **
+						  short_group_names,
+						  gchar **
+						  full_group_names);
+
+extern gchar *cafekbd_indicator_create_label_title (int group,
+						 GHashTable **
+						 ln2cnt_map,
+						 gchar * layout_name);
+
+static void
+cafekbd_status_render_cairo (cairo_t * cr, int group)
+{
+	double r, g, b;
+	PangoFontDescription *pfd;
+	PangoContext *pcc;
+	PangoLayout *pl;
+	int lwidth, lheight;
+	gchar *layout_name, *lbl_title;
+	double screen_res;
+	cairo_font_options_t *fo;
+	static GHashTable *ln2cnt_map = NULL;
+
+	xkl_debug (160, "Rendering cairo for group %d\n", group);
+	if (globals.ind_cfg.background_color != NULL &&
+	    globals.ind_cfg.background_color[0] != 0) {
+		if (sscanf
+		    (globals.ind_cfg.background_color, "%lg %lg %lg", &r,
+		     &g, &b) == 3) {
+			cairo_set_source_rgb (cr, r, g, b);
+			cairo_rectangle (cr, 0, 0, globals.current_width,
+					 globals.current_height);
+			cairo_fill (cr);
+		}
+	}
+
+	if (globals.ind_cfg.foreground_color != NULL &&
+	    globals.ind_cfg.foreground_color[0] != 0) {
+		if (sscanf
+		    (globals.ind_cfg.foreground_color, "%lg %lg %lg", &r,
+		     &g, &b) == 3) {
+			cairo_set_source_rgb (cr, r, g, b);
+		}
+	}
+
+	pcc = pango_cairo_create_context (cr);
+
+	screen_res = cdk_screen_get_resolution (cdk_screen_get_default ());
+	if (screen_res > 0)
+		pango_cairo_context_set_resolution (pcc, screen_res);
+
+	fo = cairo_font_options_copy (cdk_screen_get_font_options
+				      (cdk_screen_get_default ()));
+	/* SUBPIXEL antialiasing gives bad results on in-memory images */
+	if (cairo_font_options_get_antialias (fo) ==
+	    CAIRO_ANTIALIAS_SUBPIXEL)
+		cairo_font_options_set_antialias (fo,
+						  CAIRO_ANTIALIAS_GRAY);
+	pango_cairo_context_set_font_options (pcc, fo);
+
+	pl = pango_layout_new (pcc);
+
+	layout_name = cafekbd_indicator_extract_layout_name (group,
+							  globals.engine,
+							  &globals.kbd_cfg,
+							  globals.short_group_names,
+							  globals.full_group_names);
+	lbl_title =
+	    cafekbd_indicator_create_label_title (group, &ln2cnt_map,
+					       layout_name);
+
+	if (group + 1 == xkl_engine_get_num_groups (globals.engine)) {
+		g_hash_table_destroy (ln2cnt_map);
+		ln2cnt_map = NULL;
+	}
+
+	pango_layout_set_text (pl, lbl_title, -1);
+
+	g_free (lbl_title);
+
+	pfd = pango_font_description_from_string (globals.ind_cfg.font_family);
+
+	pango_layout_set_font_description (pl, pfd);
+	pango_layout_get_size (pl, &lwidth, &lheight);
+
+	cairo_move_to (cr,
+		       (globals.current_width - lwidth / PANGO_SCALE) / 2,
+		       (globals.current_height -
+			lheight / PANGO_SCALE) / 2);
+
+	pango_cairo_show_layout (cr, pl);
+
+	pango_font_description_free (pfd);
+	g_object_unref (pl);
+	g_object_unref (pcc);
+	cairo_font_options_destroy (fo);
+	cairo_destroy (cr);
+
+	globals.real_width = (lwidth / PANGO_SCALE) + 4;
+	if (globals.real_width > globals.current_width)
+		globals.real_width = globals.current_width;
+	if (globals.real_width < globals.current_height)
+		globals.real_width = globals.current_height;
+}
+
+static inline guint8
+convert_color_channel (guint8 src, guint8 alpha)
+{
+	return alpha ? ((((guint) src) << 8) - src) / alpha : 0;
+}
+
+static void
+convert_bgra_to_rgba (guint8 const *src, guint8 * dst, int width,
+		      int height, int new_width)
+{
+	int xoffset = width - new_width;
+
+	/* *4 */
+	int ptr_step = xoffset << 2;
+
+	int x, y;
+
+	/* / 2 * 4 */
+	src = src + ((xoffset >> 1) << 2);
+
+	for (y = height; --y >= 0; src += ptr_step) {
+		for (x = new_width; --x >= 0;) {
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+			dst[0] = convert_color_channel (src[2], src[3]);
+			dst[1] = convert_color_channel (src[1], src[3]);
+			dst[2] = convert_color_channel (src[0], src[3]);
+			dst[3] = src[3];
+#else
+			dst[0] = convert_color_channel (src[1], src[0]);
+			dst[1] = convert_color_channel (src[2], src[0]);
+			dst[2] = convert_color_channel (src[3], src[0]);
+			dst[3] = src[0];
+#endif
+			dst += 4;
+			src += 4;
+		}
+	}
+}
+
+static GdkPixbuf *
+cafekbd_status_prepare_drawing (CafekbdStatus *gki G_GNUC_UNUSED,
+				int            group)
+{
+	GError *gerror = NULL;
+	char *image_filename;
+	GdkPixbuf *image;
+
+	if (globals.current_width == 0)
+		return NULL;
+
+	if (globals.ind_cfg.show_flags) {
+
+		image_filename =
+		    (char *) g_slist_nth_data (globals.
+					       ind_cfg.image_filenames,
+					       group);
+
+		image = gdk_pixbuf_new_from_file_at_size (image_filename,
+							  globals.current_width,
+							  globals.current_height,
+							  &gerror);
+
+		if (image == NULL) {
+			CtkWidget *dialog = ctk_message_dialog_new (NULL,
+								    CTK_DIALOG_DESTROY_WITH_PARENT,
+								    CTK_MESSAGE_ERROR,
+								    CTK_BUTTONS_OK,
+								    _
+								    ("There was an error loading an image: %s"),
+								    gerror
+								    ==
+								    NULL ?
+								    "Unknown"
+								    :
+								    gerror->message);
+			g_signal_connect (G_OBJECT (dialog), "response",
+					  G_CALLBACK (ctk_widget_destroy),
+					  NULL);
+
+			ctk_window_set_resizable (CTK_WINDOW (dialog),
+						  FALSE);
+
+			ctk_widget_show (dialog);
+			g_error_free (gerror);
+
+			return NULL;
+		}
+		xkl_debug (150,
+			   "Image %d[%s] loaded -> %p[%dx%d], alpha: %d\n",
+			   group, image_filename, image,
+			   gdk_pixbuf_get_width (image),
+			   gdk_pixbuf_get_height (image),
+			   gdk_pixbuf_get_has_alpha (image));
+
+		return image;
+	} else {
+		cairo_surface_t *cs =
+		    cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
+						globals.current_width,
+						globals.current_height);
+		unsigned char *cairo_data;
+		guchar *pixbuf_data;
+		cafekbd_status_render_cairo (cairo_create (cs), group);
+		cairo_data = cairo_image_surface_get_data (cs);
+#if 0
+		char pngfilename[20];
+		g_sprintf (pngfilename, "label%d.png", group);
+		cairo_surface_write_to_png (cs, pngfilename);
+#endif
+		pixbuf_data =
+		    g_new0 (guchar,
+			    4 * globals.real_width *
+			    globals.current_height);
+		convert_bgra_to_rgba (cairo_data, pixbuf_data,
+				      globals.current_width,
+				      globals.current_height,
+				      globals.real_width);
+
+		cairo_surface_destroy (cs);
+
+		image = gdk_pixbuf_new_from_data (pixbuf_data,
+						  GDK_COLORSPACE_RGB,
+						  TRUE,
+						  8,
+						  globals.real_width,
+						  globals.current_height,
+						  globals.real_width *
+						  4,
+						  (GdkPixbufDestroyNotify)
+						  g_free, NULL);
+		xkl_debug (150,
+			   "Image %d created -> %p[%dx%d], alpha: %d\n",
+			   group, image, gdk_pixbuf_get_width (image),
+			   gdk_pixbuf_get_height (image),
+			   gdk_pixbuf_get_has_alpha (image));
+
+		return image;
+	}
+	return NULL;
+}
+
+static void
+cafekbd_status_update_tooltips (CafekbdStatus * gki)
+{
+	XklState *state = xkl_engine_get_current_state (globals.engine);
+	gchar *buf;
+	if (state == NULL || state->group < 0
+	    || state->group >= g_strv_length (globals.full_group_names))
+		return;
+
+	buf = g_strdup_printf (globals.tooltips_format,
+			       globals.full_group_names[state->group]);
+
+	cafekbd_status_set_tooltips (gki, buf);
+	g_free (buf);
+}
+
+void
+cafekbd_status_reinit_ui (CafekbdStatus * gki)
+{
+	cafekbd_status_global_cleanup (gki);
+	cafekbd_status_global_fill (gki);
+
+	cafekbd_status_set_current_page (gki);
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+			    gchar     *key G_GNUC_UNUSED,
+			    gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "General configuration changed in settings - reiniting...\n");
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+	ForAllIndicators () {
+		cafekbd_status_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_ind_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+				gchar     *key G_GNUC_UNUSED,
+				gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "Applet configuration changed in settings - reiniting...\n");
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+
+	cafekbd_indicator_config_free_image_filenames (&globals.ind_cfg);
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	ForAllIndicators () {
+		cafekbd_status_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+static void
+cafekbd_status_load_group_names (const gchar ** layout_ids,
+			      const gchar ** variant_ids)
+{
+	if (!cafekbd_desktop_config_load_group_descriptions
+	    (&globals.cfg, globals.registry, layout_ids, variant_ids,
+	     &globals.short_group_names, &globals.full_group_names)) {
+		/* We just populate no short names (remain NULL) -
+		 * full names are going to be used anyway */
+		gint i, total_groups =
+		    xkl_engine_get_num_groups (globals.engine);
+		xkl_debug (150, "group descriptions loaded: %d!\n",
+			   total_groups);
+		globals.full_group_names =
+		    g_new0 (char *, total_groups + 1);
+
+		if (xkl_engine_get_features (globals.engine) &
+		    XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
+			gchar **lst = globals.kbd_cfg.layouts_variants;
+			for (i = 0; *lst; lst++, i++) {
+				globals.full_group_names[i] =
+				    g_strdup ((char *) *lst);
+			}
+		} else {
+			for (i = total_groups; --i >= 0;) {
+				globals.full_group_names[i] =
+				    g_strdup_printf ("Group %d", i);
+			}
+		}
+	}
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_kbd_cfg_callback (CafekbdStatus *gki G_GNUC_UNUSED)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+	xkl_debug (100,
+		   "XKB configuration changed on X Server - reiniting...\n");
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+
+	cafekbd_indicator_config_free_image_filenames (&globals.ind_cfg);
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	g_strfreev (globals.full_group_names);
+	globals.full_group_names = NULL;
+
+	if (globals.short_group_names != NULL) {
+		g_strfreev (globals.short_group_names);
+		globals.short_group_names = NULL;
+	}
+
+	cafekbd_status_load_group_names ((const gchar **) xklrec->layouts,
+				      (const gchar **) xklrec->variants);
+
+	ForAllIndicators () {
+		cafekbd_status_reinit_ui (gki);
+	} NextIndicator ();
+	g_object_unref (G_OBJECT (xklrec));
+}
+
+/* Should be called once for all applets */
+static void
+cafekbd_status_state_callback (XklEngine           *engine G_GNUC_UNUSED,
+			       XklEngineStateChange changeType,
+			       gint                 group,
+			       gboolean             restore)
+{
+	xkl_debug (150, "group is now %d, restore: %d\n", group, restore);
+
+	if (changeType == GROUP_CHANGED) {
+		ForAllIndicators () {
+			xkl_debug (200, "do repaint\n");
+			cafekbd_status_set_current_page_for_group (gki,
+								group);
+		}
+		NextIndicator ();
+	}
+}
+
+
+void
+cafekbd_status_set_current_page (CafekbdStatus * gki)
+{
+	XklState *cur_state;
+	cur_state = xkl_engine_get_current_state (globals.engine);
+	if (cur_state->group >= 0)
+		cafekbd_status_set_current_page_for_group (gki,
+							cur_state->group);
+}
+
+void
+cafekbd_status_set_current_page_for_group (CafekbdStatus * gki, int group)
+{
+	xkl_debug (200, "Revalidating for group %d\n", group);
+
+	ctk_status_icon_set_from_pixbuf (CTK_STATUS_ICON (gki),
+					 GDK_PIXBUF (g_slist_nth_data
+						     (globals.icons,
+						      group)));
+
+	cafekbd_status_update_tooltips (gki);
+}
+
+/* Should be called once for all widgets */
+static CdkFilterReturn
+cafekbd_status_filter_x_evt (CdkXEvent *xev,
+			     CdkEvent  *event G_GNUC_UNUSED)
+{
+	XEvent *xevent = (XEvent *) xev;
+
+	xkl_engine_filter_events (globals.engine, xevent);
+	switch (xevent->type) {
+	case ReparentNotify:
+		{
+			XReparentEvent *rne = (XReparentEvent *) xev;
+
+			ForAllIndicators () {
+				guint32 xid =
+				    ctk_status_icon_get_x11_window_id
+				    (CTK_STATUS_ICON (gki));
+
+				/* compare the indicator's parent window with the even window */
+				if (xid == rne->window) {
+					/* if so - make it transparent... */
+					xkl_engine_set_window_transparent
+					    (globals.engine, rne->window,
+					     TRUE);
+				}
+			}
+		NextIndicator ()}
+		break;
+	}
+	return CDK_FILTER_CONTINUE;
+}
+
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_start_listen (void)
+{
+	cdk_window_add_filter (NULL, (CdkFilterFunc)
+			       cafekbd_status_filter_x_evt, NULL);
+	cdk_window_add_filter (cdk_get_default_root_window (),
+			       (CdkFilterFunc) cafekbd_status_filter_x_evt,
+			       NULL);
+
+	xkl_engine_start_listen (globals.engine,
+				 XKLL_TRACK_KEYBOARD_STATE);
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_stop_listen (void)
+{
+	xkl_engine_stop_listen (globals.engine, XKLL_TRACK_KEYBOARD_STATE);
+
+	cdk_window_remove_filter (NULL, (CdkFilterFunc)
+				  cafekbd_status_filter_x_evt, NULL);
+	cdk_window_remove_filter
+	    (cdk_get_default_root_window (),
+	     (CdkFilterFunc) cafekbd_status_filter_x_evt, NULL);
+}
+
+static void
+cafekbd_status_size_changed (CafekbdStatus * gki, gint size)
+{
+	if (globals.current_height != size) {
+		globals.current_height = size;
+		globals.current_width = size * 3 / 2;
+		cafekbd_status_reinit_ui (gki);
+	}
+}
+
+static void
+cafekbd_status_theme_changed (CtkSettings   *settings G_GNUC_UNUSED,
+			      GParamSpec    *pspec G_GNUC_UNUSED,
+			      CafekbdStatus *gki)
+{
+	cafekbd_indicator_config_refresh_style (&globals.ind_cfg);
+	cafekbd_status_reinit_ui (gki);
+}
+
+static void
+cafekbd_status_init (CafekbdStatus * gki)
+{
+	int i;
+
+	if (!g_slist_length (globals.widget_instances))
+		cafekbd_status_global_init ();
+
+	gki->priv = g_new0 (CafekbdStatusPrivate, 1);
+
+	/* This should give NA a hint about the order */
+	/* commenting out fixes a Cdk-critical warning */
+/*	ctk_status_icon_set_name (CTK_STATUS_ICON (gki), "keyboard"); */
+
+	xkl_debug (100, "Initiating the widget startup process for %p\n",
+		   gki);
+
+	if (globals.engine == NULL) {
+		cafekbd_status_set_tooltips (gki,
+					  _("XKB initialization error"));
+		return;
+	}
+
+	cafekbd_status_set_tooltips (gki, NULL);
+
+	cafekbd_status_global_fill (gki);
+	cafekbd_status_set_current_page (gki);
+
+	/* append AFTER all initialization work is finished */
+	globals.widget_instances =
+	    g_slist_append (globals.widget_instances, gki);
+
+	g_signal_connect (gki, "size-changed",
+			  G_CALLBACK (cafekbd_status_size_changed), NULL);
+	g_signal_connect (gki, "activate",
+			  G_CALLBACK (cafekbd_status_activate), NULL);
+
+	for (i = sizeof (settings_signal_names) /
+	     sizeof (settings_signal_names[0]); --i >= 0;)
+		gki->priv->settings_signal_handlers[i] =
+		    g_signal_connect_after (ctk_settings_get_default (),
+					    settings_signal_names[i],
+					    G_CALLBACK
+					    (cafekbd_status_theme_changed),
+					    gki);
+}
+
+static void
+cafekbd_status_finalize (GObject * obj)
+{
+	int i;
+	CafekbdStatus *gki = CAFEKBD_STATUS (obj);
+	xkl_debug (100,
+		   "Starting the cafe-kbd-status widget shutdown process for %p\n",
+		   gki);
+
+	for (i = sizeof (settings_signal_names) /
+	     sizeof (settings_signal_names[0]); --i >= 0;)
+		g_signal_handler_disconnect (ctk_settings_get_default (),
+					     gki->
+					     priv->settings_signal_handlers
+					     [i]);
+
+	/* remove BEFORE all termination work is finished */
+	globals.widget_instances =
+	    g_slist_remove (globals.widget_instances, gki);
+
+	cafekbd_status_global_cleanup (gki);
+
+	xkl_debug (100,
+		   "The instance of cafe-kbd-status successfully finalized\n");
+
+	g_free (gki->priv);
+
+	G_OBJECT_CLASS (cafekbd_status_parent_class)->finalize (obj);
+
+	if (!g_slist_length (globals.widget_instances))
+		cafekbd_status_global_term ();
+}
+
+static void
+cafekbd_status_global_term (void)
+{
+	xkl_debug (100, "*** Last  CafekbdStatus instance *** \n");
+	cafekbd_status_stop_listen ();
+
+	cafekbd_desktop_config_stop_listen (&globals.cfg);
+	cafekbd_indicator_config_stop_listen (&globals.ind_cfg);
+
+	cafekbd_indicator_config_term (&globals.ind_cfg);
+	cafekbd_keyboard_config_term (&globals.kbd_cfg);
+	cafekbd_desktop_config_term (&globals.cfg);
+
+	if (g_signal_handler_is_connected
+	    (globals.engine, globals.state_changed_handler)) {
+		g_signal_handler_disconnect (globals.engine,
+					     globals.state_changed_handler);
+		globals.state_changed_handler = 0;
+	}
+	if (g_signal_handler_is_connected
+	    (globals.engine, globals.config_changed_handler)) {
+		g_signal_handler_disconnect (globals.engine,
+					     globals.config_changed_handler);
+		globals.config_changed_handler = 0;
+	}
+
+	g_object_unref (G_OBJECT (globals.registry));
+	globals.registry = NULL;
+	g_object_unref (G_OBJECT (globals.engine));
+	globals.engine = NULL;
+	xkl_debug (100, "*** Terminated globals *** \n");
+}
+
+static void
+cafekbd_status_class_init (CafekbdStatusClass * klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+	xkl_debug (100, "*** First CafekbdStatus instance *** \n");
+
+	memset (&globals, 0, sizeof (globals));
+
+	/* Initing some global vars */
+	globals.tooltips_format = "%s";
+
+	/* Initing vtable */
+	object_class->finalize = cafekbd_status_finalize;
+
+	/* Signals */
+}
+
+static void
+cafekbd_status_global_init (void)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+
+	globals.engine = xkl_engine_get_instance(CDK_DISPLAY_XDISPLAY(cdk_display_get_default()));
+
+	if (globals.engine == NULL) {
+		xkl_debug (0, "Libxklavier initialization error");
+		return;
+	}
+
+	globals.state_changed_handler =
+	    g_signal_connect (globals.engine, "X-state-changed",
+			      G_CALLBACK (cafekbd_status_state_callback),
+			      NULL);
+	globals.config_changed_handler =
+	    g_signal_connect (globals.engine, "X-config-changed",
+			      G_CALLBACK (cafekbd_status_kbd_cfg_callback),
+			      NULL);
+
+	cafekbd_desktop_config_init (&globals.cfg, globals.engine);
+	cafekbd_keyboard_config_init (&globals.kbd_cfg, globals.engine);
+	cafekbd_indicator_config_init (&globals.ind_cfg, globals.engine);
+
+	cafekbd_desktop_config_start_listen (&globals.cfg,
+					  (GCallback)
+					  cafekbd_status_cfg_changed, NULL);
+	cafekbd_indicator_config_start_listen (&globals.ind_cfg,
+					    (GCallback)
+					    cafekbd_status_ind_cfg_changed,
+					    NULL);
+
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+
+	globals.registry =
+	    xkl_config_registry_get_instance (globals.engine);
+	xkl_config_registry_load (globals.registry,
+				  globals.cfg.load_extra_items);
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	cafekbd_status_load_group_names ((const gchar **) xklrec->layouts,
+				      (const gchar **) xklrec->variants);
+	g_object_unref (G_OBJECT (xklrec));
+
+	cafekbd_status_start_listen ();
+
+	xkl_debug (100, "*** Inited globals *** \n");
+}
+
+CtkStatusIcon *
+cafekbd_status_new (void)
+{
+	return
+	    CTK_STATUS_ICON (g_object_new (cafekbd_status_get_type (), NULL));
+}
+
+/**
+ * cafekbd_status_get_xkl_engine:
+ *
+ * Returns: (transfer none): The engine shared by all CafekbdStatus objects
+ */
+XklEngine *
+cafekbd_status_get_xkl_engine ()
+{
+	return globals.engine;
+}
+
+/**
+ * cafekbd_status_get_group_names:
+ *
+ * Returns: (transfer none) (array zero-terminated=1): List of group names
+ */
+gchar **
+cafekbd_status_get_group_names ()
+{
+	return globals.full_group_names;
+}
+
+gchar *
+cafekbd_status_get_image_filename (guint group)
+{
+	if (!globals.ind_cfg.show_flags)
+		return NULL;
+	return cafekbd_indicator_config_get_images_file (&globals.ind_cfg,
+						      &globals.kbd_cfg,
+						      group);
+}
+
+void
+cafekbd_status_set_angle (CafekbdStatus * gki, gdouble angle)
+{
+	gki->priv->angle = angle;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/6.html b/2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/6.html new file mode 100644 index 0000000..5ed6ace --- /dev/null +++ b/2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/6.html @@ -0,0 +1,806 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctk/ctk.h>
+#include <stdlib.h>
+#include <string.h>
+#include <glib.h>
+#include "libcafekbd/cafekbd-keyboard-drawing.h"
+
+
+static gchar *groups = NULL;
+static gchar *levels = NULL;
+static gchar *symbols = NULL;
+static gchar *keycodes = NULL;
+static gchar *geometry = NULL;
+
+static gboolean track_config = FALSE;
+static gboolean track_modifiers = FALSE;
+static gboolean program_version = FALSE;
+
+static const GOptionEntry options[] = {
+	{"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
+	 "Keyboard groups to display, from 1-4. Up to four groups only may be "
+	 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
+	 "group1[,group2[,group3[,group4]]]"},
+	{"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
+	 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
+	 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
+	 "level1[,level2[,level3[,level4]]]"},
+	{"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
+	 "Symbols component of the keyboard. If you omit this option, it is "
+	 "obtained from the X server; that is, the keyboard that is currently "
+	 "configured is drawn. Examples: --symbols=us or "
+	 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL},
+	{"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
+	 "Keycodes component of the keyboard. If you omit this option, it is "
+	 "obtained from the X server; that is, the keyboard that is currently"
+	 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
+	 NULL},
+	{"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
+	 "Geometry xkb component. If you omit this option, it is obtained from the"
+	 " X server; that is, the keyboard that is currently configured is drawn. "
+	 "Example: --geometry=kinesis", NULL},
+	{"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
+	 "Track the current modifiers", NULL},
+	{"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
+	 "Track the server XKB configuration", NULL},
+	{"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
+	 "Show current version", NULL},
+	{NULL},
+};
+
+static gboolean
+set_groups (gchar * groups_option,
+	    CafekbdKeyboardDrawingGroupLevel * groupLevels)
+{
+	CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
+	gint cntr, g;
+
+	groupLevels[0].group =
+	    groupLevels[1].group =
+	    groupLevels[2].group = groupLevels[3].group = -1;
+
+	if (groups_option == NULL)
+		return TRUE;
+
+	for (cntr = 4; --cntr >= 0;) {
+		if (*groups_option == '\0')
+			return FALSE;
+
+		g = *groups_option - '1';
+		if (g < 0 || g >= 4)
+			return FALSE;
+
+		pgl->group = g;
+		/* printf ("group %d\n", pgl->group); */
+
+		groups_option++;
+		if (*groups_option == '\0')
+			return TRUE;
+		if (*groups_option != ',')
+			return FALSE;
+
+		groups_option++;
+		pgl++;
+	}
+
+	return TRUE;
+}
+
+static gboolean
+set_levels (gchar * levels_option,
+	    CafekbdKeyboardDrawingGroupLevel * groupLevels)
+{
+	CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
+	gint cntr, l;
+	gchar *p;
+
+	groupLevels[0].level =
+	    groupLevels[1].level =
+	    groupLevels[2].level = groupLevels[3].level = -1;
+
+	if (levels_option == NULL)
+		return TRUE;
+
+	for (cntr = 4; --cntr >= 0;) {
+		if (*levels_option == '\0')
+			return FALSE;
+
+		l = (gint) strtol (levels_option, &p, 10) - 1;
+		if (l < 0 || l >= 64)
+			return FALSE;
+
+		pgl->level = l;
+		/* printf ("level %d\n", pgl->level); */
+
+		levels_option = p;
+		if (*levels_option == '\0')
+			return TRUE;
+		if (*levels_option != ',')
+			return FALSE;
+
+		levels_option++;
+		pgl++;
+	}
+
+	return TRUE;
+}
+
+static void
+bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED,
+	     guint                   keycode)
+{
+	g_warning
+	    ("got keycode %u, which is not on your keyboard according to your configuration",
+	     keycode);
+}
+
+gint
+main (gint argc, gchar ** argv)
+{
+	CtkWidget *window;
+	CtkWidget *cafekbd_keyboard_drawing;
+	CdkScreen *screen;
+	CdkMonitor *monitor;
+	CdkRectangle rect;
+	GOptionContext *context;
+	GError *error = NULL;
+
+	CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
+	    { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
+	CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
+	    { &groupLevels[0], &groupLevels[1], &groupLevels[2],
+		&groupLevels[3]
+	};
+
+	context = g_option_context_new ("kbdraw");
+	g_option_context_add_main_entries (context, options, NULL);
+	if (!g_option_context_parse (context, &argc, &argv, &error)) {
+		g_message ("option parsing failed: %s", error->message);
+		g_option_context_free (context);
+		exit (EXIT_FAILURE);
+	}
+	g_option_context_free (context);
+
+	if (program_version) {
+		g_print ("kbdraw %s\n", VERSION);
+		exit (0);
+	}
+
+	ctk_init (&argc, &argv);
+
+	if (!set_groups (groups, groupLevels)) {
+		g_printerr ("--groups: invalid argument\n");
+		exit (1);
+	}
+
+	if (!set_levels (levels, groupLevels)) {
+		g_printerr ("--levels: invalid argument\n");
+		exit (1);
+	}
+
+	window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
+	g_signal_connect (G_OBJECT (window), "destroy",
+			  G_CALLBACK (ctk_main_quit), NULL);
+
+	screen = ctk_window_get_screen (CTK_WINDOW (window));
+	monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
+	cdk_monitor_get_geometry (monitor, &rect);
+	ctk_window_set_default_size (CTK_WINDOW (window),
+				     rect.width * 4 / 5,
+				     rect.height * 1 / 2);
+
+	ctk_widget_show (window);
+
+	cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
+	ctk_widget_show (cafekbd_keyboard_drawing);
+	ctk_container_add (CTK_CONTAINER (window), cafekbd_keyboard_drawing);
+
+	cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING
+						 (cafekbd_keyboard_drawing),
+						 pgroupLevels);
+
+	if (track_modifiers)
+		cafekbd_keyboard_drawing_set_track_modifiers
+		    (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing), TRUE);
+	if (track_config)
+		cafekbd_keyboard_drawing_set_track_config
+		    (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing), TRUE);
+	g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",
+			  G_CALLBACK (bad_keycode), NULL);
+
+	if (symbols || geometry || keycodes) {
+		XkbComponentNamesRec names;
+		gint success;
+
+		memset (&names, '\0', sizeof (names));
+
+		if (symbols)
+			names.symbols = symbols;
+		else
+			names.symbols = (gchar *)
+			    cafekbd_keyboard_drawing_get_symbols
+			    (CAFEKBD_KEYBOARD_DRAWING
+			     (cafekbd_keyboard_drawing));
+
+		if (keycodes)
+			names.keycodes = keycodes;
+		else
+			names.keycodes = (gchar *)
+			    cafekbd_keyboard_drawing_get_keycodes
+			    (CAFEKBD_KEYBOARD_DRAWING
+			     (cafekbd_keyboard_drawing));
+
+		if (geometry)
+			names.geometry = geometry;
+		else
+			names.geometry = (gchar *)
+			    cafekbd_keyboard_drawing_get_geometry
+			    (CAFEKBD_KEYBOARD_DRAWING
+			     (cafekbd_keyboard_drawing));
+
+		success =
+		    cafekbd_keyboard_drawing_set_keyboard
+		    (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing),
+		     &names);
+		if (!success) {
+			g_printerr
+			    ("\nError loading new keyboard description with components:\n\n"
+			     "  keycodes:  %s\n" "  types:     %s\n"
+			     "  compat:    %s\n" "  symbols:   %s\n"
+			     "  geometry:  %s\n\n", names.keycodes,
+			     names.types, names.compat, names.symbols,
+			     names.geometry);
+			exit (1);
+		}
+	}
+
+	ctk_widget_grab_focus (cafekbd_keyboard_drawing);
+
+	ctk_main ();
+
+	return 0;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/7.html b/2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/7.html new file mode 100644 index 0000000..8122587 --- /dev/null +++ b/2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/7.html @@ -0,0 +1,358 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+
+#include "libxklavier/xklavier.h"
+#include "libcafekbd/cafekbd-status.h"
+
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include <cdk/cdk.h>
+#include <cdk/cdkx.h>
+#include <glib/gi18n.h>
+#include <ctk/ctk.h>
+
+#include "X11/XKBlib.h"
+
+int
+main (int argc, char **argv)
+{
+	CtkStatusIcon *icon;<--- Variable 'icon' can be declared as pointer to const
+
+	bindtextdomain (GETTEXT_PACKAGE, CAFELOCALEDIR);
+	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+	textdomain (GETTEXT_PACKAGE);
+
+	ctk_init (&argc, &argv);
+
+	icon = cafekbd_status_new ();
+
+        if (icon == NULL)
+	{
+		return 1;
+	}
+
+	ctk_main ();
+
+	return 0;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/commitmsg b/2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/commitmsg new file mode 100644 index 0000000..1dddd53 --- /dev/null +++ b/2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/commitmsg @@ -0,0 +1 @@ +po: update translations for 2.0.0 diff --git a/2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/index.html b/2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/index.html new file mode 100644 index 0000000..1040930 --- /dev/null +++ b/2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/index.html @@ -0,0 +1,242 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LineIdCWESeverityMessage
checkersReportinformationActive checkers: There was critical errors (use --checkers-report=<filename> to see details)
libcafekbd/cafekbd-desktop-config.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
libcafekbd/cafekbd-indicator-config.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
libcafekbd/cafekbd-indicator.c
66unknownMacroerrorThere is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
libcafekbd/cafekbd-keyboard-config.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
67knownConditionTrueFalse571styleCondition '*l1' is always true
67knownConditionTrueFalse571styleCondition '*l2' is always true
226constVariablePointer398styleVariable 'delim' can be declared as pointer to const
227knownConditionTrueFalse571styleCondition 'option!=NULL' is always true
282knownConditionTrueFalse570styleCondition 'variant==NULL' is always false
609constParameterPointer398styleParameter 'kbd_config' can be declared as pointer to const
libcafekbd/cafekbd-keyboard-drawing.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
61constParameterPointer398styleParameter 'context' can be declared as pointer to const
67constParameterPointer398styleParameter 'context' can be declared as pointer to const
625constParameterPointer398styleParameter 'context' can be declared as pointer to const
1026constVariablePointer398styleVariable 'runp' can be declared as pointer to const
1036constVariablePointer398styleVariable 'geometry' can be declared as pointer to const
1202constParameterPointer398styleParameter 'outline' can be declared as pointer to const
1397constVariablePointer398styleVariable 'shape' can be declared as pointer to const
1786constParameterCallback398styleParameter 'drawing' can be declared as pointer to const. However it seems that 'button_press_event' is a callback function, if 'drawing' is declared with const you might also need to cast function pointer(s).
1823constParameterCallback398styleParameter 'event' can be declared as pointer to const. However it seems that 'focus_event' is a callback function, if 'event' is declared with const you might also need to cast function pointer(s).
1838constParameterCallback398styleParameter 'a' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'a' is declared with const you might also need to cast function pointer(s).
1839constParameterCallback398styleParameter 'b' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'b' is declared with const you might also need to cast function pointer(s).
1863constVariablePointer398styleVariable 'pind' can be declared as pointer to const
2124constParameterPointer398styleParameter 'iev' can be declared as pointer to const
libcafekbd/cafekbd-status.c
82unknownMacroerrorThere is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
test/cafekbd-keyboard-drawing-test.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
test/cafekbd-status-test.c
42constVariablePointer398styleVariable 'icon' can be declared as pointer to const
+
+ +
+ + diff --git a/2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/output_ae3358295c1fa22b559fc9fea848e0bb4f3741f8 b/2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/output_ae3358295c1fa22b559fc9fea848e0bb4f3741f8 new file mode 100644 index 0000000..95a3935 --- /dev/null +++ b/2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/output_ae3358295c1fa22b559fc9fea848e0bb4f3741f8 @@ -0,0 +1,1866 @@ +Checking libcafekbd/cafekbd-desktop-config.c ... +libcafekbd/cafekbd-desktop-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +1/10 files checked 4% done +Checking libcafekbd/cafekbd-indicator-config.c ... +libcafekbd/cafekbd-indicator-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +2/10 files checked 10% done +Checking libcafekbd/cafekbd-indicator.c ... +libcafekbd/cafekbd-indicator.c:66:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdIndicator, cafekbd_indicator, CTK_TYPE_NOTEBOOK) +^ +3/10 files checked 24% done +Checking libcafekbd/cafekbd-keyboard-config.c ... +libcafekbd/cafekbd-keyboard-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-config.c:67:8: style: Condition '*l1' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:67:15: style: Condition '*l2' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:227:16: style: Condition 'option!=NULL' is always true [knownConditionTrueFalse] + (option != NULL) ? strchr (option, ':') : NULL; + ^ +libcafekbd/cafekbd-keyboard-config.c:282:18: style: Condition 'variant==NULL' is always false [knownConditionTrueFalse] + (variant == + ^ +libcafekbd/cafekbd-keyboard-config.c:226:10: style: Variable 'delim' can be declared as pointer to const [constVariablePointer] + char *delim = + ^ +libcafekbd/cafekbd-keyboard-config.c:609:65: style: Parameter 'kbd_config' can be declared as pointer to const [constParameterPointer] +cafekbd_keyboard_config_options_is_set (CafekbdKeyboardConfig * kbd_config, + ^ +4/10 files checked 36% done +Checking libcafekbd/cafekbd-keyboard-drawing.c ... +libcafekbd/cafekbd-keyboard-drawing.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-drawing.c:61:60: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_coord (CafekbdKeyboardDrawingRenderContext * context, gint n) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:67:61: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_double (CafekbdKeyboardDrawingRenderContext * context, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:625:51: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +set_markup (CafekbdKeyboardDrawingRenderContext * context, gchar *txt) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1026:11: style: Variable 'runp' can be declared as pointer to const [constVariablePointer] + GSList *runp; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1036:25: style: Variable 'geometry' can be declared as pointer to const [constVariablePointer] + PangoGlyphGeometry *geometry; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1202:39: style: Parameter 'outline' can be declared as pointer to const [constParameterPointer] +calc_origin_offset_x (XkbOutlineRec * outline) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1397:15: style: Variable 'shape' can be declared as pointer to const [constVariablePointer] + XkbShapeRec *shape; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: style: Parameter 'drawing' can be declared as pointer to const. However it seems that 'button_press_event' is a callback function, if 'drawing' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2343:18: note: You might need to cast the function pointer here + G_CALLBACK (button_press_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: note: Parameter 'drawing' can be declared as pointer to const + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: style: Parameter 'event' can be declared as pointer to const. However it seems that 'focus_event' is a callback function, if 'event' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2347:18: note: You might need to cast the function pointer here + G_CALLBACK (focus_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: note: Parameter 'event' can be declared as pointer to const + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: style: Parameter 'a' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'a' is declared with const you might also need to cast function pointer(s). [constParameterCallback] +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: note: Parameter 'a' can be declared as pointer to const +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: style: Parameter 'b' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'b' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: note: Parameter 'b' can be declared as pointer to const + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1863:9: style: Variable 'pind' can be declared as pointer to const [constVariablePointer] + Atom *pind = drawing->xkb->names->indicators; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2124:60: style: Parameter 'iev' can be declared as pointer to const [constParameterPointer] +process_indicators_state_notify (XkbIndicatorNotifyEvent * iev, + ^ +Checking libcafekbd/cafekbd-keyboard-drawing.c: KBDRAW_DEBUG... +5/10 files checked 77% done +Checking libcafekbd/cafekbd-status.c ... +libcafekbd/cafekbd-status.c:82:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdStatus, cafekbd_status, CTK_TYPE_STATUS_ICON) +^ +6/10 files checked 91% done +Checking libcafekbd/cafekbd-util.c ... +7/10 files checked 93% done +Checking test/cafekbd-indicator-test.c ... +8/10 files checked 94% done +Checking test/cafekbd-keyboard-drawing-test.c ... +test/cafekbd-keyboard-drawing-test.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +Checking test/cafekbd-keyboard-drawing-test.c: HAVE_CONFIG_H... +9/10 files checked 99% done +Checking test/cafekbd-status-test.c ... +test/cafekbd-status-test.c:42:17: style: Variable 'icon' can be declared as pointer to const [constVariablePointer] + CtkStatusIcon *icon; + ^ +10/10 files checked 100% done +nofile:0:0: information: Active checkers: There was critical errors (use --checkers-report= to see details) [checkersReport] + +/usr/bin/cafe-autogen +checking for autoreconf >= 2.53... + testing autoreconf... found 2.72 +checking for pkg-config >= 0.14.0... + testing pkg-config... found 1.8.1 +checking for cafe-common >= 0.0.1... + testing cafe-doc-common... found 2.0.0 +Checking for required M4 macros... +Checking for forbidden M4 macros... +Processing ./configure.ac +Running cafe-doc-common... +Running autoreconf... +autoreconf: export WARNINGS=no-portability +autoreconf: Entering directory '.' +autoreconf: running: autopoint --force +Copying file ABOUT-NLS +Copying file config.rpath +Copying file m4/codeset.m4 +Copying file m4/extern-inline.m4 +Copying file m4/fcntl-o.m4 +Copying file m4/gettext.m4 +Copying file m4/glibc2.m4 +Copying file m4/glibc21.m4 +Copying file m4/iconv.m4 +Copying file m4/intdiv0.m4 +Copying file m4/intl.m4 +Copying file m4/intldir.m4 +Copying file m4/intlmacosx.m4 +Copying file m4/intmax.m4 +Copying file m4/inttypes-pri.m4 +Copying file m4/inttypes_h.m4 +Copying file m4/lcmessage.m4 +Copying file m4/lib-ld.m4 +Copying file m4/lib-link.m4 +Copying file m4/lib-prefix.m4 +Copying file m4/lock.m4 +Copying file m4/longlong.m4 +Copying file m4/nls.m4 +Copying file m4/po.m4 +Copying file m4/printf-posix.m4 +Copying file m4/progtest.m4 +Copying file m4/size_max.m4 +Copying file m4/stdint_h.m4 +Copying file m4/threadlib.m4 +Copying file m4/uintmax_t.m4 +Copying file m4/visibility.m4 +Copying file m4/wchar_t.m4 +Copying file m4/wint_t.m4 +Copying file m4/xsize.m4 +Copying file po/Makefile.in.in +Copying file po/Makevars.template +Copying file po/Rules-quot +Copying file po/boldquot.sed +Copying file po/en@boldquot.header +Copying file po/en@quot.header +Copying file po/insert-header.sin +Copying file po/quot.sed +Copying file po/remove-potcdate.sin +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: configure.ac: tracing +autoreconf: running: libtoolize --copy --force +libtoolize: putting auxiliary files in '.'. +libtoolize: copying file './ltmain.sh' +libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. +libtoolize: copying file 'm4/libtool.m4' +libtoolize: copying file 'm4/ltoptions.m4' +libtoolize: copying file 'm4/ltsugar.m4' +libtoolize: copying file 'm4/ltversion.m4' +libtoolize: copying file 'm4/lt~obsolete.m4' +autoreconf: configure.ac: not using Intltool +autoreconf: configure.ac: not using Gtkdoc +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: running: /usr/bin/autoconf --force +autoreconf: running: /usr/bin/autoheader --force +autoreconf: running: automake --add-missing --copy --force-missing +configure.ac:31: installing './compile' +configure.ac:34: installing './config.guess' +configure.ac:34: installing './config.sub' +configure.ac:16: installing './install-sh' +configure.ac:16: installing './missing' +Makefile.am: installing './INSTALL' +libcafekbd/Makefile.am: installing './depcomp' +autoreconf: Leaving directory '.' +Skipping configure process. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +checking for a BSD-compatible install... /usr/bin/install -c +checking whether sleep supports fractional seconds... yes +checking filesystem timestamp resolution... 0.01 +checking whether build environment is sane... yes +checking for a race-free mkdir -p... /usr/bin/mkdir -p +checking for gawk... no +checking for mawk... mawk +checking whether make sets $(MAKE)... yes +checking whether make supports nested variables... yes +checking xargs -n works... yes +checking whether make supports the include directive... yes (GNU style) +checking for gcc... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the C compiler works... yes +checking for C compiler default output file name... a.out +checking for suffix of executables... +checking whether we are cross compiling... no +checking for suffix of object files... o +checking whether the compiler supports GNU C... yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... rm: cannot remove 'conftest.plist': Is a directory +yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... gcc3 +checking whether C compiler accepts -Werror=unknown-warning-option... no +checking whether C compiler accepts -Wall... yes +checking whether C compiler accepts -Wmissing-prototypes... yes +checking whether C compiler accepts -Wbad-function-cast... yes +checking whether C compiler accepts -Wcast-align... yes +checking whether C compiler accepts -Wextra... yes +checking whether C compiler accepts -Wformat-nonliteral... yes +checking whether C compiler accepts -Wmissing-declarations... yes +checking whether C compiler accepts -Wnested-externs... yes +checking whether C compiler accepts -Wpointer-arith... yes +checking whether C compiler accepts -Wredundant-decls... yes +checking whether C compiler accepts -Wshadow... yes +checking whether C compiler accepts -Wstrict-prototypes... yes +checking whether C compiler accepts -Wunused-macros... yes +checking whether C compiler accepts -Werror=format-security... yes +checking whether C compiler accepts -fstrict-aliasing... yes +checking flags to pass to the C compiler /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing +checking for gcc... (cached) /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the compiler supports GNU C... (cached) yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... (cached) yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... (cached) none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... (cached) yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... (cached) gcc3 +checking build system type... x86_64-pc-linux-gnu +checking host system type... x86_64-pc-linux-gnu +checking how to print strings... printf +checking for a sed that does not truncate output... /usr/bin/sed +checking for grep that handles long lines and -e... /usr/bin/grep +checking for egrep... /usr/bin/grep -E +checking for fgrep... /usr/bin/grep -F +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld +checking if the linker (/usr/bin/ld) is GNU ld... yes +checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B +checking the name lister (/usr/bin/nm -B) interface... rm: cannot remove 'conftest.plist': Is a directory +BSD nm +checking whether ln -s works... yes +checking the maximum length of command line arguments... 3145728 +checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop +checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop +checking for /usr/bin/ld option to reload object files... -r +checking for file... file +checking for objdump... objdump +checking how to recognize dependent libraries... pass_all +checking for dlltool... no +checking how to associate runtime and link libraries... printf %s\n +checking for ranlib... ranlib +checking for ar... ar +checking for archiver @FILE support... rm: cannot remove 'conftest.plist': Is a directory +@ +checking for strip... strip +checking command to parse /usr/bin/nm -B output from /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer object... rm: cannot remove 'conftest.plist': Is a directory +ok +checking for sysroot... no +checking for a working dd... /usr/bin/dd +checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1 +checking for mt... no +checking if : is a manifest tool... no +checking for stdio.h... yes +checking for stdlib.h... yes +checking for string.h... yes +checking for inttypes.h... yes +checking for stdint.h... yes +checking for strings.h... yes +checking for sys/stat.h... yes +checking for sys/types.h... yes +checking for unistd.h... yes +checking for dlfcn.h... yes +checking for objdir... .libs +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -fno-rtti -fno-exceptions... no +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to produce PIC... -fPIC -DPIC +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer PIC flag -fPIC -DPIC works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer static flag -static works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... (cached) yes +checking whether the /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes +checking whether -lc should be explicitly linked in... no +checking dynamic linker characteristics... GNU/Linux ld.so +checking how to hardcode library paths into programs... immediate +checking whether stripping libraries is possible... yes +checking if libtool supports shared libraries... yes +checking whether to build shared libraries... yes +checking whether to build static libraries... yes +checking whether NLS is requested... yes +checking for msgfmt... /usr/bin/msgfmt +checking for gmsgfmt... /usr/bin/msgfmt +checking for xgettext... /usr/bin/xgettext +checking for msgmerge... /usr/bin/msgmerge +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld -m elf_x86_64 +checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes +checking for shared library run path origin... done +checking how to run the C preprocessor... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer -E +checking for egrep -e... (cached) /usr/bin/grep -E +checking for CFPreferencesCopyAppValue... no +checking for CFLocaleCopyCurrent... no +checking for GNU gettext in libc... yes +checking whether to use NLS... yes +checking where the gettext function comes from... libc +checking for glib-compile-resources... /usr/bin/glib-compile-resources +checking for xmllint... /usr/bin/xmllint +checking for setlocale... yes +checking for pkg-config... /usr/bin/pkg-config +checking pkg-config is at least version 0.9.0... yes +checking for glib-2.0 >= 2.50.0... yes +checking for gmodule-2.0... yes +checking for gio-2.0 >= 2.25.0... yes +checking for cdk-3.0 >= 3.22.0... yes +checking for ctk+-3.0 >= 3.22.0 cdk-x11-3.0 >= 3.22.0... yes +checking for libxklavier >= 5.2... yes +checking for X... libraries , headers +checking for gethostbyname... yes +checking for connect... yes +checking for remove... yes +checking for shmat... yes +checking for IceConnectionNumber in -lICE... yes +checking for pkg-config... (cached) /usr/bin/pkg-config +checking pkg-config is at least version 0.16... yes +checking for library containing sqrt... -lm +checking for gobject-introspection... yes +checking that generated files are newer than configure... done +configure: creating ./config.status +config.status: creating Makefile +config.status: creating libcafekbd.pc +config.status: creating libcafekbdui.pc +config.status: creating po/Makefile.in +config.status: creating libcafekbd/Makefile +config.status: creating libcafekbd/org.cafe.peripherals-keyboard-xkb.gschema.xml +config.status: creating test/Makefile +config.status: creating config.h +config.status: executing depfiles commands +config.status: executing libtool commands +config.status: executing po-directories commands +config.status: creating po/POTFILES +config.status: creating po/Makefile + +Configuration: + + prefix: /usr + exec_prefix: ${prefix} + libdir: ${exec_prefix}/lib + bindir: ${exec_prefix}/bin + sbindir: ${exec_prefix}/sbin + sysconfdir: ${prefix}/etc + datadir: ${datarootdir} + source code location: . + compiler: /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer + cflags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + Warning flags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + +scan-build: Analysis run complete. +scan-build: Removing directory '/tmp/scan-build-2025-02-06-152258-11857-1' because it contains no reports. +scan-build: No bugs found. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +make all-recursive +make[1]: Entering directory '/rootdir' +Making all in po +make[2]: Entering directory '/rootdir/po' +make libcafekbd.pot-update +make[3]: Entering directory '/rootdir/po' +sed -e '/^#/d' remove-potcdate.sin > t-remove-potcdate.sed +mv t-remove-potcdate.sed remove-potcdate.sed +package_gnu=""; \ +test -n "$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L .. -maxdepth 1 -type f \ + -size -10000000c -exec grep 'GNU libcafekbd' \ + /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU libcafekbd' ../* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ +}; \ +if test "$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ +else \ + package_prefix=''; \ +fi; \ +if test -n '' || test 'https://github.com/cafe-desktop/libcafekbd' = '@'PACKAGE_BUGREPORT'@'; then \ + msgid_bugs_address=''; \ +else \ + msgid_bugs_address='https://github.com/cafe-desktop/libcafekbd'; \ +fi; \ +case `/usr/bin/xgettext --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ + *) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --package-name="${package_prefix}libcafekbd" \ + --package-version='1.25.0' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ +esac +test ! -f libcafekbd.po || { \ + if test -f ./libcafekbd.pot-header; then \ + sed -e '1,/^#$/d' < libcafekbd.po > libcafekbd.1po && \ + cat ./libcafekbd.pot-header libcafekbd.1po > libcafekbd.po; \ + rm -f libcafekbd.1po; \ + fi; \ + if test -f ./libcafekbd.pot; then \ + sed -f remove-potcdate.sed < ./libcafekbd.pot > libcafekbd.1po && \ + sed -f remove-potcdate.sed < libcafekbd.po > libcafekbd.2po && \ + if cmp libcafekbd.1po libcafekbd.2po >/dev/null 2>&1; then \ + rm -f libcafekbd.1po libcafekbd.2po libcafekbd.po; \ + else \ + rm -f libcafekbd.1po libcafekbd.2po ./libcafekbd.pot && \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ + else \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ +} +make[3]: Leaving directory '/rootdir/po' +test ! -f ./libcafekbd.pot || \ + test -z "af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo" || make af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo +make[3]: Entering directory '/rootdir/po' +/usr/bin/msgmerge --update --quiet --lang=af af.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=an an.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=am am.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=as as.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ar ar.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=az az.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ast ast.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=be be.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn bn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bg bg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn_IN bn_IN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca ca.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bs bs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=br br.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca@valencia ca@valencia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cmn cmn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=crh crh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cs cs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=csb csb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cv cv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cy cy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de de.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=da da.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de_CH de_CH.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=dz dz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=el el.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_AU en_AU.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_CA en_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_GB en_GB.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eo eo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es es.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_419 es_419.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_AR es_AR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CL es_CL.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CO es_CO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CR es_CR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_DO es_DO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_EC es_EC.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_ES es_ES.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_MX es_MX.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_NI es_NI.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PA es_PA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PE es_PE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PR es_PR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_SV es_SV.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_US es_US.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_UY es_UY.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_VE es_VE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eu eu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=et et.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fa fa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fi fi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fil fil.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fo fo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr fr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr_CA fr_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=frp frp.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fy fy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fur fur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ga ga.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gd gd.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gl gl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gu gu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ha ha.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=he he.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hi hi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hy hy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hr hr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hu hu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ia ia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=id id.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ie ie.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ig ig.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=is is.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=it it.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ka ka.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=jv jv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ja ja.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kk kk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kab kab.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=km km.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kn kn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ko ko.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ks ks.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku ku.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku_IQ ku_IQ.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ky ky.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=la la.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lb lb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=li li.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lo lo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lt lt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lv lv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mai mai.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mg mg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mi mi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mk mk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mn mn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ml ml.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ms ms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mr mr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=my my.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nah nah.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nb nb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ne ne.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nds nds.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nl nl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nqo nqo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nso nso.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=oc oc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nn nn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=om om.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=or or.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pa pa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pl pl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pms pms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt_BR pt_BR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ps ps.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt pt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ro ro.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ru ru.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=rw rw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sc sc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sco sco.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=si si.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sk sk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sl sl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=so so.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sq sq.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr sr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sv sv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr@latin sr@latin.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sw sw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ta ta.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=te te.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tg tg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=th th.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tl tl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tk tk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tr tr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ts ts.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tt tt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ug ug.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur ur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uk uk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uz uz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=vi vi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur_PK ur_PK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=wa wa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=xh xh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yi yi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yo yo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_CN zh_CN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_HK zh_HK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_TW zh_TW.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zu zu.po libcafekbd.pot +rm -f af.gmo && /usr/bin/msgfmt -c --statistics --verbose -o af.gmo af.po +rm -f am.gmo && /usr/bin/msgfmt -c --statistics --verbose -o am.gmo am.po +rm -f an.gmo && /usr/bin/msgfmt -c --statistics --verbose -o an.gmo an.po +rm -f ar.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ar.gmo ar.po +am.po: 54 translated messages, 37 untranslated messages. +ar.po: 50 translated messages, 41 untranslated messages. +an.po:7: warning: header field 'Last-Translator' still has the initial default value +an.po: 0 translated messages, 91 untranslated messages. +af.po: 7 translated messages, 84 untranslated messages. +rm -f as.gmo && /usr/bin/msgfmt -c --statistics --verbose -o as.gmo as.po +rm -f az.gmo && /usr/bin/msgfmt -c --statistics --verbose -o az.gmo az.po +rm -f ast.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ast.gmo ast.po +rm -f be.gmo && /usr/bin/msgfmt -c --statistics --verbose -o be.gmo be.po +az.po: 9 translated messages, 82 untranslated messages. +rm -f bg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bg.gmo bg.po +as.po: 41 translated messages, 50 untranslated messages. +ast.po: 47 translated messages, 44 untranslated messages. +be.po: 46 translated messages, 45 untranslated messages. +rm -f bn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn.gmo bn.po +rm -f bn_IN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn_IN.gmo bn_IN.po +bg.po: 54 translated messages, 37 untranslated messages. +rm -f br.gmo && /usr/bin/msgfmt -c --statistics --verbose -o br.gmo br.po +rm -f bs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bs.gmo bs.po +bn.po: 43 translated messages, 48 untranslated messages. +bn_IN.po: 41 translated messages, 50 untranslated messages. +br.po: 20 translated messages, 71 untranslated messages. +rm -f ca.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca.gmo ca.po +bs.po: 25 translated messagesrm -f ca@valencia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca@valencia.gmo ca@valencia.po +, 66 untranslated messages. +rm -f cmn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cmn.gmo cmn.po +rm -f crh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o crh.gmo crh.po +ca.po: 87 translated messages, 4 untranslated messages. +ca@valencia.po: 54 translated messages, 37 untranslated messages. +crh.po: 11 translated messages, 80 untranslated messages. +cmn.po: 46 translated messages, 45 untranslated messages. +rm -f cs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cs.gmo cs.po +rm -f cv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cv.gmo cv.po +rm -f cy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cy.gmo cy.po +rm -f csb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o csb.gmo csb.po +rm -f da.gmo && /usr/bin/msgfmt -c --statistics --verbose -o da.gmo da.po +cs.po: 81 translated messages, 10 untranslated messages. +cv.po: 0 translated messages, 91 untranslated messages. +cy.po: 26 translated messages, 65 untranslated messages. +da.po: 91 translated messages. +csb.po:7: warning: header field 'Last-Translator' still has the initial default value +csb.po: 0 translated messages, 91 untranslated messages. +rm -f de.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de.gmo de.po +rm -f de_CH.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de_CH.gmo de_CH.po +rm -f dz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o dz.gmo dz.po +rm -f el.gmo && /usr/bin/msgfmt -c --statistics --verbose -o el.gmo el.po +de_CH.po: 0 translated messages, 91 untranslated messages. +de.po: 76 translated messages, 15 untranslated messages. +rm -f en_AU.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_AU.gmo en_AU.po +dz.po: 39 translated messages, 52 untranslated messages. +el.po: 54 translated messages, 37 untranslated messages. +rm -f en_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_CA.gmo en_CA.po +rm -f en_GB.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_GB.gmo en_GB.po +rm -f eo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eo.gmo eo.po +en_AU.po: 54 translated messages, 37 untranslated messages. +rm -f es.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es.gmo es.po +en_GB.po: 54 translated messages, 37 untranslated messages. +en_CA.po: 10 translated messages, 81 untranslated messages. +eo.po: 52 translated messages, 39 untranslated messages. +rm -f es_419.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_419.gmo es_419.po +es.po: 89 translated messages, 2 untranslated messages. +rm -f es_CO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CO.gmo es_CO.po +rm -f es_AR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_AR.gmo es_AR.po +rm -f es_CL.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CL.gmo es_CL.po +es_419.po: 0 translated messages, 91 untranslated messages. +rm -f es_CR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CR.gmo es_CR.po +es_CL.po: 3 translated messages, 88 untranslated messages. +es_CO.po: 49 translated messages, 42 untranslated messages. +rm -f es_DO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_DO.gmo es_DO.po +es_AR.po: 21 translated messages, 70 untranslated messages. +es_DO.po: 1 translated message, 90 untranslated messages. +es_CR.po: 1 translated message, 90 untranslated messages. +rm -f es_ES.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_ES.gmo es_ES.po +rm -f es_EC.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_EC.gmo es_EC.po +rm -f es_MX.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_MX.gmo es_MX.po +rm -f es_PA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PA.gmo es_PA.po +rm -f es_NI.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_NI.gmo es_NI.po +es_ES.po: es_EC.po: 1 translated message, 90 untranslated messages. +1 translated message, 90 untranslated messages. +es_MX.po: 1 translated message, 90 untranslated messages. +es_PA.po: 1 translated message, 90 untranslated messages. +es_NI.po: 1 translated message, 90 untranslated messages. +rm -f es_PE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PE.gmo es_PE.po +rm -f es_SV.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_SV.gmo es_SV.po +rm -f es_PR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PR.gmo es_PR.po +rm -f es_US.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_US.gmo es_US.po +es_PE.po: 1 translated message, 90 untranslated messages. +rm -f es_UY.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_UY.gmo es_UY.po +es_PR.po: 1 translated message, 90 untranslated messages. +es_SV.po: 1 translated message, 90 untranslated messages. +rm -f es_VE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_VE.gmo es_VE.po +es_UY.po: 1 translated message, 90 untranslated messages. +es_US.po: 0 translated messages, 91 untranslated messages. +rm -f et.gmo && /usr/bin/msgfmt -c --statistics --verbose -o et.gmo et.po +rm -f eu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eu.gmo eu.po +es_VE.po: 1 translated message, 90 untranslated messages. +rm -f fa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fa.gmo fa.po +et.po: 54 translated messages, 37 untranslated messages. +rm -f fi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fi.gmo fi.po +eu.po: 54 translated messages, 37 untranslated messages. +rm -f fil.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fil.gmo fil.po +fa.po: 11 translated messages, 80 untranslated messages. +rm -f fr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr.gmo fr.po +fi.po: 48 translated messages, 43 untranslated messages. +rm -f fo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fo.gmo fo.po +rm -f fr_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr_CA.gmo fr_CA.po +fil.po: 0 translated messages, 91 untranslated messages. +fr.po: 67 translated messages, 24 untranslated messages. +rm -f frp.gmo && /usr/bin/msgfmt -c --statistics --verbose -o frp.gmo frp.po +fo.po: 0 translated messages, 91 untranslated messages. +fr_CA.po: 3 translated messages, 88 untranslated messages. +rm -f fy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fy.gmo fy.po +frp.po: 7 translated messages, 84 untranslated messages. +rm -f fur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fur.gmo fur.po +rm -f ga.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ga.gmo ga.po +rm -f gd.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gd.gmo gd.po +fy.po: 4 translated messages, 87 untranslated messages. +fur.po: 4 translated messages, 87 untranslated messages. +rm -f gl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gl.gmo gl.po +ga.po: 41 translated messages, 50 untranslated messages. +gd.po: 0 translated messages, 91 untranslated messages. +rm -f gu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gu.gmo gu.po +rm -f ha.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ha.gmo ha.po +gl.po: 89 translated messages, 2 untranslated messages. +rm -f he.gmo && /usr/bin/msgfmt -c --statistics --verbose -o he.gmo he.po +rm -f hi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hi.gmo hi.po +gu.po: 43 translated messages, 48 untranslated messagesrm -f hr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hr.gmo hr.po +. +ha.po: 5 translated messages, 86 untranslated messages. +hi.po: 45 translated messages, 46 untranslated messages. +he.po: 54 translated messages, 37 untranslated messages. +rm -f ia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ia.gmo ia.po +hr.po: 54 translated messages, 37 untranslated messages. +rm -f hu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hu.gmo hu.po +rm -f id.gmo && /usr/bin/msgfmt -c --statistics --verbose -o id.gmo id.po +rm -f hy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hy.gmo hy.po +ia.po: 3 translated messages, 88 untranslated messages. +hu.po: 54 translated messages, 37 untranslated messages. +id.po: 91 translated messages. +rm -f ie.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ie.gmo ie.po +hy.po: 54 translated messages, 37 untranslated messages. +rm -f ig.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ig.gmo ig.po +rm -f it.gmo && /usr/bin/msgfmt -c --statistics --verbose -o it.gmo it.po +rm -f is.gmo && /usr/bin/msgfmt -c --statistics --verbose -o is.gmo is.po +ie.po: 45 translated messages, 46 untranslated messages. +rm -f ja.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ja.gmo ja.po +ig.po: 5 translated messages, 86 untranslated messages. +is.po: 12 translated messages, 79 untranslated messagesrm -f jv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o jv.gmo jv.po +. +it.po: 91 translated messages. +rm -f ka.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ka.gmo ka.po +ja.po: 54 translated messages, 37 untranslated messages. +jv.po: 2 translated messages, 89 untranslated messages. +rm -f kab.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kab.gmo kab.po +rm -f kk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kk.gmo kk.po +ka.po: rm -f km.gmo && /usr/bin/msgfmt -c --statistics --verbose -o km.gmo km.po +37 translated messages, 54 untranslated messages. +kab.po: 4 translated messages, 87 untranslated messages. +rm -f kn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kn.gmo kn.po +kk.po: 24 translated messages, 67 untranslated messages. +rm -f ks.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ks.gmo ks.po +km.po:7: warning: header field 'Last-Translator' still has the initial default value +rm -f ko.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ko.gmo ko.po +km.po: 0 translated messages, 91 untranslated messages. +kn.po: 43 translated messages, 48 untranslated messages. +rm -f ku.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku.gmo ku.po +ks.po: 3 translated messages, 88 untranslated messages. +rm -f ku_IQ.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku_IQ.gmo ku_IQ.po +ku.po: 10 translated messages, 81 untranslated messages. +ko.po: 54 translated messages, 37 untranslated messages. +rm -f ky.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ky.gmo ky.po +rm -f la.gmo && /usr/bin/msgfmt -c --statistics --verbose -o la.gmo la.po +ku_IQ.po: 16 translated messages, 75 untranslated messages. +ky.po: 26 translated messages, 65 untranslated messages. +la.po: 2 translated messages, 89 untranslated messages. +rm -f lb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lb.gmo lb.po +rm -f li.gmo && /usr/bin/msgfmt -c --statistics --verbose -o li.gmo li.po +rm -f lt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lt.gmo lt.po +rm -f lo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lo.gmo lo.po +lb.po:7: warning: header field 'Last-Translator' still has the initial default value +lb.po: 0 translated messages, 91 untranslated messages. +rm -f lv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lv.gmo lv.po +li.po:7: warning: header field 'Last-Translator' still has the initial default value +li.po: 0 translated messages, 91 untranslated messages. +lt.po: 91 translated messages. +lo.po:7: warning: header field 'Last-Translator' still has the initial default value +lo.po: rm -f mai.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mai.gmo mai.po +0 translated messages, 91 untranslated messages. +rm -f mg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mg.gmo mg.po +lv.po: 49 translated messages, 42 untranslated messages. +rm -f mi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mi.gmo mi.po +rm -f mk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mk.gmo mk.po +mai.po: 18 translated messages, 73 untranslated messages. +mg.po: 10 translated messages, 81 untranslated messages. +mi.po:7: warning: header field 'Last-Translator' still has the initial default value +mi.po: 0 translated messages, 91 untranslated messages. +mk.po: 39 translated messages, 52 untranslated messages. +rm -f ml.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ml.gmo ml.po +rm -f mn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mn.gmo mn.po +rm -f mr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mr.gmo mr.po +rm -f ms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ms.gmo ms.po +rm -f my.gmo && /usr/bin/msgfmt -c --statistics --verbose -o my.gmo my.po +ml.po: 41 translated messages, 50 untranslated messages. +mn.po: 10 translated messages, 81 untranslated messages. +my.po:7: warning: ms.po: header field 'Last-Translator' still has the initial default value +91 translated messages. +my.po: 0 translated messages, 91 untranslated messages. +rm -f nah.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nah.gmo nah.po +mr.po: 47 translated messages, 44 untranslated messages. +rm -f nb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nb.gmo nb.po +rm -f nds.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nds.gmo nds.po +rm -f ne.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ne.gmo ne.po +nah.po: 0 translated messages, 91 untranslated messages. +rm -f nl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nl.gmo nl.po +nb.po: 91 translated messages. +ne.po: 13 translated messages, 78 untranslated messages. +nds.po: 12 translated messages, 79 untranslated messages. +rm -f nn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nn.gmo nn.po +rm -f nso.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nso.gmo nso.po +nl.po: 91 translated messages. +rm -f nqo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nqo.gmo nqo.po +nn.po: 40 translated messages, 51 untranslated messages. +rm -f om.gmo && /usr/bin/msgfmt -c --statistics --verbose -o om.gmo om.po +rm -f oc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o oc.gmo oc.po +nso.po: 3 translated messages, 88 untranslated messages. +nqo.po: 0 translated messages, 91 untranslated messages. +rm -f or.gmo && /usr/bin/msgfmt -c --statistics --verbose -o or.gmo or.po +om.po: 0 translated messages, 91 untranslated messages. +oc.po: 68 translated messages, 23 untranslated messages. +rm -f pa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pa.gmo pa.po +or.po: 41 translated messages, 50 untranslated messages. +rm -f pl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pl.gmo pl.po +rm -f pms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pms.gmo pms.po +rm -f ps.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ps.gmo ps.po +pa.po: 46 translated messages, 45 untranslated messages. +rm -f pt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt.gmo pt.po +ps.po: 6 translated messages, 85 untranslated messages. +pms.po: 3 translated messages, 88 untranslated messages. +pl.po: 55 translated messages, 36 untranslated messages. +rm -f ro.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ro.gmo ro.po +rm -f pt_BR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt_BR.gmo pt_BR.po +rm -f ru.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ru.gmo ru.po +rm -f rw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o rw.gmo rw.po +pt.po: 84 translated messages, 7 untranslated messages. +pt_BR.po: 58 translated messages, 33 untranslated messages. +ro.po: 54 translated messages, 37 untranslated messages. +ru.po: 89 translated messages, 2 untranslated messages. +rm -f sc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sc.gmo sc.po +rm -f sco.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sco.gmo sco.po +rm -f si.gmo && /usr/bin/msgfmt -c --statistics --verbose -o si.gmo si.po +rw.po: 10 translated messages, 81 untranslated messages. +rm -f sk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sk.gmo sk.po +sc.po: 2 translated messages, 89 untranslated messages. +sco.po: 0 translated messages, 91 untranslated messages. +rm -f sl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sl.gmo sl.po +si.po: 36 translated messages, 55 untranslated messages. +rm -f so.gmo && /usr/bin/msgfmt -c --statistics --verbose -o so.gmo so.po +sk.po: 54 translated messages, 37 untranslated messages. +rm -f sq.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sq.gmo sq.po +rm -f sr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr.gmo sr.po +sl.po: 55 translated messages, 36 untranslated messages. +sq.po: 52 translated messages, 39 untranslated messages. +rm -f sr@latin.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr@latin.gmo sr@latin.po +so.po: 0 translated messages, 91 untranslated messages. +rm -f sv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sv.gmo sv.po +sr.po: 91 translated messages. +rm -f sw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sw.gmo sw.po +rm -f ta.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ta.gmo ta.po +sv.po: 80 translated messages, 11 untranslated messages. +sr@latin.po: 46 translated messages, 45 untranslated messages. +rm -f te.gmo && /usr/bin/msgfmt -c --statistics --verbose -o te.gmo te.po +rm -f tg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tg.gmo tg.po +ta.po: 46 translated messages, 45 untranslated messages. +sw.po: 0 translated messages, 91 untranslated messages. +rm -f th.gmo && /usr/bin/msgfmt -c --statistics --verbose -o th.gmo th.po +te.po: 41 translated messages, 50 untranslated messages. +rm -f tk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tk.gmo tk.po +tg.po: 0 translated messages, 91 untranslated messages. +rm -f tl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tl.gmo tl.po +th.po: 45 translated messages, 46 untranslated messages. +rm -f tr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tr.gmo tr.po +tk.po: 7 translated messages, 84 untranslated messages. +rm -f ts.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ts.gmo ts.po +rm -f tt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tt.gmo tt.po +tl.po: 0 translated messages, 91 untranslated messages. +rm -f ug.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ug.gmo ug.po +tr.po: 58 translated messages, 33 untranslated messages. +ts.po: 0 translated messages, 91 untranslated messages. +tt.po:7: warning: header field 'Last-Translator' still has the initial default value +rm -f ur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur.gmo ur.po +tt.po: 0 translated messages, 91 untranslated messages. +ug.po: 6 translated messages, 85 untranslated messages. +rm -f uk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uk.gmo uk.po +rm -f ur_PK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur_PK.gmo ur_PK.po +ur.po: rm -f vi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o vi.gmo vi.po +7 translated messages, 84 untranslated messages. +rm -f uz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uz.gmo uz.po +uk.po: 58 translated messages, 33 untranslated messages. +ur_PK.po:7: warning: header field 'Last-Translator' still has the initial default value +ur_PK.po: 0 translated messages, 91 untranslated messages. +vi.po: 52 translated messages, 39 untranslated messages. +rm -f wa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o wa.gmo wa.po +rm -f xh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o xh.gmo xh.po +rm -f yi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yi.gmo yi.po +uz.po: 26 translated messages, 65 untranslated messages. +rm -f yo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yo.gmo yo.po +wa.po: 9 translated messages, 82 untranslated messages. +xh.po: 8 translated messages, 83 untranslated messages. +rm -f zh_CN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_CN.gmo zh_CN.po +yi.po:7: warning: header field 'Last-Translator' still has the initial default value +yi.po: 0 translated messages, 91 untranslated messages. +yo.po: 5 translated messages, 86 untranslated messages. +zh_CN.po: 63 translated messages, 28 untranslated messages. +rm -f zh_HK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_HK.gmo zh_HK.po +rm -f zh_TW.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_TW.gmo zh_TW.po +rm -f zu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zu.gmo zu.po +zh_HK.po: 47 translated messages, 44 untranslated messages. +zu.po: 3 translated messages, 88 untranslated messages. +zh_TW.po: 91 translated messages. +make[3]: Leaving directory '/rootdir/po' +touch stamp-po +make[2]: Leaving directory '/rootdir/po' +Making all in libcafekbd +make[2]: Entering directory '/rootdir/libcafekbd' + GEN cafekbd-indicator-marshal.h +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml + GEN cafekbd-keyboard-drawing-marshal.h +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... +INFO: Reading ./cafekbd-indicator-marshal.list... + GEN cafekbd-keyboard-drawing-marshal.c + GEN cafekbd-indicator-marshal.c +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... +INFO: Reading ./cafekbd-indicator-marshal.list... +make all-am +make[3]: Entering directory '/rootdir/libcafekbd' + CC libcafekbd_la-cafekbd-desktop-config.lo + CC libcafekbd_la-cafekbd-keyboard-config.lo + CC libcafekbd_la-cafekbd-util.lo + CC libcafekbdui_la-cafekbd-indicator.lo + CC libcafekbdui_la-cafekbd-indicator-config.lo +cafekbd-desktop-config.c: In function 'cafekbd_desktop_config_load_from_gsettings': +cafekbd-desktop-config.c:176:38: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 176 | || config->default_group >= + | ^~ +cafekbd-indicator.c: In function 'cafekbd_indicator_extract_layout_name': +cafekbd-indicator.c:293:19: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 293 | if (group < g_strv_length (short_group_names)) { + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_prepare_drawing': +cafekbd-indicator.c:418:31: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 418 | if (group + 1 == + | ^~ +cafekbd-indicator.c: In function 'cafekbd_indicator_update_tooltips': +cafekbd-indicator.c:446:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 446 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-indicator.c:450:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 450 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-indicator.c: In function 'cafekbd_indicator_kbd_cfg_callback': +cafekbd-indicator.c:61:44: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 61 | CafekbdIndicator * gki = (CafekbdIndicator*)cur->data; + | ^~~ +cafekbd-indicator.c:561:9: note: in expansion of macro 'ForAllIndicators' + 561 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-indicator.c:539:55: note: shadowed declaration is here + 539 | cafekbd_indicator_kbd_cfg_callback (CafekbdIndicator *gki G_GNUC_UNUSED) +cafekbd-indicator.c: In function 'cafekbd_indicator_start_listen': +cafekbd-indicator.c:647:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 647 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:650:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 650 | (CdkFilterFunc) + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_stop_listen': +cafekbd-indicator.c:663:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 663 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:667:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 667 | (CdkFilterFunc) cafekbd_indicator_filter_x_evt, NULL); + | ^ +cafekbd-indicator-config.c: In function 'cafekbd_indicator_config_get_images_file': +cafekbd-indicator-config.c:152:59: warning: comparison of integer expressions of different signedness: 'guint' {aka 'unsigned int'} and 'int' [-Wsign-compare] + 152 | (g_strv_length (kbd_config->layouts_variants) > group)) { + | ^ + CC libcafekbdui_la-cafekbd-status.lo +cafekbd-status.c: In function 'cafekbd_status_render_cairo': +cafekbd-status.c:214:23: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 214 | if (group + 1 == xkl_engine_get_num_groups (globals.engine)) { + | ^~ +cafekbd-status.c: In function 'cafekbd_status_prepare_drawing': +cafekbd-status.c:376:51: warning: cast between incompatible function types from 'void (*)(void *)' to 'void (*)(guchar *, void *)' {aka 'void (*)(unsigned char *, void *)'} [-Wcast-function-type] + 376 | (GdkPixbufDestroyNotify) + | ^ +cafekbd-status.c: In function 'cafekbd_status_update_tooltips': +cafekbd-status.c:395:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 395 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-status.c:399:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 399 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-status.c: In function 'cafekbd_status_kbd_cfg_callback': +cafekbd-status.c:77:41: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 77 | CafekbdStatus * gki = (CafekbdStatus*)cur->data; + | ^~~ +cafekbd-status.c:508:9: note: in expansion of macro 'ForAllIndicators' + 508 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-status.c:484:49: note: shadowed declaration is here + 484 | cafekbd_status_kbd_cfg_callback (CafekbdStatus *gki G_GNUC_UNUSED) +cafekbd-status.c: In function 'cafekbd_status_start_listen': +cafekbd-status.c:594:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 594 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:597:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 597 | (CdkFilterFunc) cafekbd_status_filter_x_evt, + | ^ +cafekbd-status.c: In function 'cafekbd_status_stop_listen': +cafekbd-status.c:610:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 610 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:614:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 614 | (CdkFilterFunc) cafekbd_status_filter_x_evt, NULL); + | ^ + CC libcafekbdui_la-cafekbd-indicator-marshal.lo +cafekbd-indicator-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ + CC libcafekbdui_la-cafekbd-keyboard-drawing-marshal.lo +cafekbd-keyboard-drawing-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + CC libcafekbdui_la-cafekbd-keyboard-drawing.lo +cafekbd-keyboard-drawing.c: In function 'draw_polygon': +cafekbd-keyboard-drawing.c:322:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 322 | for (i = 0; i < num_points; i++) { + | ^ +cafekbd-keyboard-drawing.c: In function 'process_indicators_state_notify': +cafekbd-keyboard-drawing.c:2131:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'long unsigned int' [-Wsign-compare] + 2131 | for (i = 0; i <= drawing->xkb->indicators->phys_indicators; i++) + | ^~ +cafekbd-keyboard-drawing.c: In function 'cafekbd_keyboard_drawing_get_type': +cafekbd-keyboard-drawing.c:2394:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawingClass *)' {aka 'void (*)(struct _CafekbdKeyboardDrawingClass *)'} to 'void (*)(void *, void *)' [-Wcast-function-type] + 2394 | (GClassInitFunc) cafekbd_keyboard_drawing_class_init, + | ^ +cafekbd-keyboard-drawing.c:2399:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawing *)' {aka 'void (*)(struct _CafekbdKeyboardDrawing *)'} to 'void (*)(GTypeInstance *, void *)' {aka 'void (*)(struct _GTypeInstance *, void *)'} [-Wcast-function-type] + 2399 | (GInstanceInitFunc) cafekbd_keyboard_drawing_init, + | ^ + GEN org.cafe.peripherals-keyboard-xkb.gschema.valid + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:114:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 114 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbd.la + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspectklhm67d4/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectklhm67d4/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectklhm67d4/Cafekbd-1.0.c:239:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 239 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspectklhm67d4/Cafekbd-1.0.c:246:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 246 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspectklhm67d4/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +5 warnings generated. + GICOMP Cafekbd-1.0.gir +make[3]: Leaving directory '/rootdir/libcafekbd' +make[2]: Leaving directory '/rootdir/libcafekbd' +Making all in test +make[2]: Entering directory '/rootdir/test' + CC cafekbd_indicator_test-cafekbd-indicator-test.o + CC cafekbd_keyboard_drawing_test-cafekbd-keyboard-drawing-test.o + CC cafekbd_status_test-cafekbd-status-test.o +cafekbd-keyboard-drawing-test.c:187:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 187 | g_print ("kbdraw %s\n", VERSION); + | ^~~~~~~ +cafekbd-keyboard-drawing-test.c:194:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 194 | g_printerr ("--groups: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:199:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 199 | g_printerr ("--levels: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:225:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 225 | cafekbd_keyboard_drawing_set_track_modifiers + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:228:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 228 | cafekbd_keyboard_drawing_set_track_config + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:248:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 248 | names.keycodes = keycodes; + | ^~~~~~~~ +cafekbd-keyboard-drawing-test.c:256:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 256 | names.geometry = geometry; + | ^~~~~~~~ +7 warnings generated. + CCLD cafekbd-keyboard-drawing-test + CCLD cafekbd-indicator-test + CCLD cafekbd-status-test +make[2]: Leaving directory '/rootdir/test' +make[2]: Entering directory '/rootdir' +make[2]: Leaving directory '/rootdir' +make[1]: Leaving directory '/rootdir' +scan-build: Analysis run complete. +scan-build: 11 bugs found. +scan-build: Run 'scan-view /rootdir/html-report/2025-02-06-152308-14522-1' to examine bug reports. +Making check in po +make[1]: Entering directory '/rootdir/po' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/po' +Making check in libcafekbd +make[1]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +make check-am +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:113:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 113 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspect_n2l_bo6/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspect_n2l_bo6/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspect_n2l_bo6/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +3 warnings generated. + GICOMP Cafekbd-1.0.gir +make[2]: Leaving directory '/rootdir/libcafekbd' +make[1]: Leaving directory '/rootdir/libcafekbd' +Making check in test +make[1]: Entering directory '/rootdir/test' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/test' +make[1]: Entering directory '/rootdir' +make[1]: Leaving directory '/rootdir' + Listing... 0% Listing... 0% Listing... 0% adduser/testing,now 3.137 all [installed,automatic] +advaita-icon-theme/unknown,now 3.25.0-1 all [installed,automatic] +apt/testing,now 2.9.26 amd64 [installed,automatic] +aptitude-common/testing,now 0.8.13-6.1 all [installed,automatic] +aptitude/testing,now 0.8.13-6.1 amd64 [installed] +at-spi2-common/testing,now 2.55.0.1-1 all [installed,automatic] +at-spi2-core/testing,now 2.55.0.1-1 amd64 [installed,automatic] +autoconf-archive/testing,now 20220903-3 all [installed] +autoconf/testing,now 2.72-3 all [installed,automatic] +automake/testing,now 1:1.17-3 all [installed,automatic] +autopoint/testing,now 0.23.1-1 all [installed] +autotools-dev/testing,now 20220109.1 all [installed,automatic] +base-files/testing,now 13.6 amd64 [installed,automatic] +base-passwd/testing,now 3.6.6 amd64 [installed,automatic] +bash/testing,now 5.2.37-1 amd64 [installed,automatic] +binfmt-support/testing,now 2.2.2-7 amd64 [installed,automatic] +binutils-common/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils-gold-x86-64-linux-gnu/testing,now 2.44-1 amd64 [installed,automatic] +binutils-gold/testing,now 2.44-1 amd64 [installed,automatic] +binutils-x86-64-linux-gnu/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +bsdutils/testing,now 1:2.40.4-2 amd64 [installed,automatic] +build-essential/testing,now 12.12 amd64 [installed,automatic] +bzip2-doc/testing,now 1.0.8-6 all [installed,automatic] +bzip2/testing,now 1.0.8-6 amd64 [installed,automatic] +ca-certificates/testing,now 20241223 all [installed,automatic] +clang-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools/testing,now 1:19.0-63 amd64 [installed] +clang/testing,now 1:19.0-63 amd64 [installed] +coreutils/testing,now 9.5-1+b1 amd64 [installed,automatic] +cpp-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-14/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cpp/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cppcheck/testing,now 2.16.0-1 amd64 [installed] +ctk-update-icon-cache/unknown,now 3.25.6-1 amd64 [installed,automatic] +dash/testing,now 0.5.12-12 amd64 [installed,automatic] +dbus-bin/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-daemon/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-session-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-system-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-user-session/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus/testing,now 1.16.0-1 amd64 [installed,automatic] +dconf-gsettings-backend/testing,now 0.40.0-5 amd64 [installed,automatic] +dconf-service/testing,now 0.40.0-5 amd64 [installed,automatic] +debconf/testing,now 1.5.89 all [installed,automatic] +debian-archive-keyring/testing,now 2023.4 all [installed,automatic] +debianutils/testing,now 5.21 amd64 [installed,automatic] +diffutils/testing,now 1:3.10-2 amd64 [installed,automatic] +dirmngr/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +dmsetup/testing,now 2:1.02.201-1 amd64 [installed,automatic] +dpkg-dev/testing,now 1.22.14 all [installed,automatic] +dpkg/testing,now 1.22.14 amd64 [installed,automatic] +e2fsprogs/testing,now 1.47.2-1 amd64 [installed,automatic] +expect/testing,now 5.45.4-3+b1 amd64 [installed] +fakeroot/testing,now 1.37-1 amd64 [installed,automatic] +file/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +findutils/testing,now 4.10.0-3 amd64 [installed,automatic] +fontconfig-config/testing,now 2.15.0-2 amd64 [installed,automatic] +fontconfig/testing,now 2.15.0-2 amd64 [installed,automatic] +fonts-dejavu-core/testing,now 2.37-8 all [installed,automatic] +fonts-dejavu-mono/testing,now 2.37-8 all [installed,automatic] +g++-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-14/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +g++/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc-14-base/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gettext-base/testing,now 0.23.1-1 amd64 [installed,automatic] +gettext/testing,now 0.23.1-1 amd64 [installed] +gir1.2-atk-1.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-atspi-2.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-ctk-3.0/unknown,now 3.25.6-1 amd64 [installed] +gir1.2-freedesktop-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-freedesktop/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-gdkpixbuf-2.0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +gir1.2-girepository-2.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-girepository-2.0/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-glib-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-glib-2.0/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-harfbuzz-0.0/testing,now 10.2.0-1 amd64 [installed,automatic] +gir1.2-pango-1.0/testing,now 1.56.1-1 amd64 [installed,automatic] +gir1.2-xkl-1.0/testing,now 5.4-5+b2 amd64 [installed,automatic] +girepository-tools/testing,now 2.82.4-2 amd64 [installed,automatic] +git-man/testing,now 1:2.47.2-0.1 all [installed,automatic] +git/testing,now 1:2.47.2-0.1 amd64 [installed] +gnupg-l10n/testing,now 2.2.46-1 all [installed,automatic] +gnupg-utils/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gnupg/testing,now 2.2.46-1 all [installed,automatic] +gobject-introspection-bin/testing,now 1.82.0-4 amd64 [installed,automatic] +gobject-introspection/testing,now 1.82.0-4 amd64 [installed] +gpg-agent/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg-wks-client/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgconf/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgsm/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgv/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +grep/testing,now 3.11-4 amd64 [installed,automatic] +gsettings-desktop-schemas/testing,now 47.1-1 all [installed,automatic] +gzip/testing,now 1.13-1 amd64 [installed,automatic] +hicolor-icon-theme/testing,now 0.18-2 all [installed,automatic] +hostname/testing,now 3.25 amd64 [installed,automatic] +icu-devtools/testing,now 72.1-6 amd64 [installed,automatic] +init-system-helpers/testing,now 1.68 all [installed,automatic] +krb5-locales/testing,now 1.21.3-4 all [installed,automatic] +less/testing,now 643-1 amd64 [installed,automatic] +lib32gcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +lib32stdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libacl1/testing,now 2.3.2-2+b1 amd64 [installed,automatic] +libalgorithm-diff-perl/testing,now 1.201-1 all [installed,automatic] +libalgorithm-diff-xs-perl/testing,now 0.04-8+b4 amd64 [installed,automatic] +libalgorithm-merge-perl/testing,now 0.08-5 all [installed,automatic] +libapparmor1/testing,now 3.1.7-1+b3 amd64 [installed,automatic] +libapt-pkg6.0t64/testing,now 2.9.26 amd64 [installed,automatic] +libasan8/testing,now 14.2.0-12 amd64 [installed,automatic] +libassuan9/testing,now 3.0.1-2 amd64 [installed,automatic] +libatk-bridge2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk-bridge2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatomic1/testing,now 14.2.0-12 amd64 [installed,automatic] +libatspi2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatspi2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libattr1/testing,now 1:2.5.2-2 amd64 [installed,automatic] +libaudit-common/testing,now 1:4.0.2-2 all [installed,automatic] +libaudit1/testing,now 1:4.0.2-2+b1 amd64 [installed,automatic] +libavahi-client3/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common-data/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common3/testing,now 0.8-16 amd64 [installed,automatic] +libbinutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libblkid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libblkid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libboost-iostreams1.83.0/testing,now 1.83.0-4 amd64 [installed,automatic] +libbrotli-dev/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbrotli1/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbsd0/testing,now 0.12.2-2 amd64 [installed,automatic] +libbz2-1.0/testing,now 1.0.8-6 amd64 [installed,automatic] +libbz2-dev/testing,now 1.0.8-6 amd64 [installed,automatic] +libc-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc-dev-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc6-dev/testing,now 2.40-6 amd64 [installed,automatic] +libc6-i386/testing,now 2.40-6 amd64 [installed,automatic] +libc6/testing,now 2.40-6 amd64 [installed,automatic] +libcairo-gobject2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo-script-interpreter2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2-dev/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcap-dev/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcap-ng0/testing,now 0.8.5-4 amd64 [installed,automatic] +libcap2/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcbor0.10/testing,now 0.10.2-2 amd64 [installed,automatic] +libcc1-0/testing,now 14.2.0-12 amd64 [installed,automatic] +libclang-common-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-cpp19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-rt-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang1-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libcolord2/testing,now 1.4.7-1+b2 amd64 [installed,automatic] +libcom-err2/testing,now 1.47.2-1 amd64 [installed,automatic] +libcrypt-dev/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcrypt1/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcryptsetup12/testing,now 2:2.7.5-1 amd64 [installed,automatic] +libctf-nobfd0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctf0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctk-3-0/unknown,now 3.25.6-1 amd64 [installed] +libctk-3-bin/unknown,now 3.25.6-1 amd64 [installed,automatic] +libctk-3-common/unknown,now 3.25.6-1 all [installed] +libctk-3-dev/unknown,now 3.25.6-1 amd64 [installed] +libcups2t64/testing,now 2.4.10-2+b1 amd64 [installed,automatic] +libcurl3t64-gnutls/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcurl4t64/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcwidget4/testing,now 0.5.18-6+b2 amd64 [installed,automatic] +libdatrie-dev/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdatrie1/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdav1d7/testing,now 1.5.1-1 amd64 [installed,automatic] +libdb5.3t64/testing,now 5.3.28+dfsg2-9 amd64 [installed,automatic] +libdbus-1-3/testing,now 1.16.0-1 amd64 [installed,automatic] +libdbus-1-dev/testing,now 1.16.0-1 amd64 [installed,automatic] +libdconf1/testing,now 0.40.0-5 amd64 [installed,automatic] +libdebconfclient0/testing,now 0.277 amd64 [installed,automatic] +libdeflate-dev/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdeflate0/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdevmapper1.02.1/testing,now 2:1.02.201-1 amd64 [installed,automatic] +libdpkg-perl/testing,now 1.22.14 all [installed,automatic] +libdrm-amdgpu1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-common/testing,now 2.4.123-1 all [installed,automatic] +libdrm-intel1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-radeon1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm2/testing,now 2.4.123-1 amd64 [installed,automatic] +libedit2/testing,now 3.1-20250104-1 amd64 [installed,automatic] +libegl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libegl-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1-mesa-dev/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libelf1t64/testing,now 0.192-4 amd64 [installed,automatic] +libepoxy-dev/testing,now 1.5.10-2 amd64 [installed,automatic] +libepoxy0/testing,now 1.5.10-2 amd64 [installed,automatic] +liberror-perl/testing,now 0.17029-2 all [installed,automatic] +libexpat1-dev/testing,now 2.6.4-1 amd64 [installed,automatic] +libexpat1/testing,now 2.6.4-1 amd64 [installed,automatic] +libext2fs2t64/testing,now 1.47.2-1 amd64 [installed,automatic] +libfakeroot/testing,now 1.37-1 amd64 [installed,automatic] +libffi-dev/testing,now 3.4.6-1 amd64 [installed,automatic] +libffi8/testing,now 3.4.6-1 amd64 [installed,automatic] +libfido2-1/testing,now 1.15.0-1+b1 amd64 [installed,automatic] +libfile-fcntllock-perl/testing,now 0.22-4+b4 amd64 [installed,automatic] +libfontconfig-dev/testing,now 2.15.0-2 amd64 [installed,automatic] +libfontconfig1/testing,now 2.15.0-2 amd64 [installed,automatic] +libfreetype-dev/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfreetype6/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfribidi-dev/testing,now 1.0.16-1 amd64 [installed,automatic] +libfribidi0/testing,now 1.0.16-1 amd64 [installed,automatic] +libgbm1/testing,now 24.2.8-1 amd64 [installed,automatic] +libgc1/testing,now 1:8.2.8-1 amd64 [installed,automatic] +libgcc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcrypt20/testing,now 1.11.0-7 amd64 [installed,automatic] +libgdbm-compat4t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdbm6t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-dev/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-bin/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-common/testing,now 2.42.12+dfsg-2 all [installed,automatic] +libgio-2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libgio-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository-1.0-1/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-1.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-2.0-0/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository1.0-dev/testing,now 1.82.0-4 amd64 [installed] +libgl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgl1-mesa-dri/testing,now 24.2.8-1 amd64 [installed,automatic] +libgl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglapi-mesa/testing,now 24.2.8-1 amd64 [installed,automatic] +libgles-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles2/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglib2.0-0t64/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-data/testing,now 2.82.4-2 all [installed,automatic] +libglib2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-dev/testing,now 2.82.4-2 amd64 [installed] +libglvnd-core-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libglx0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgmp10/testing,now 2:6.3.0+dfsg-3 amd64 [installed,automatic] +libgnutls30t64/testing,now 3.8.8-2 amd64 [installed,automatic] +libgomp1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgpg-error-l10n/testing,now 1.51-3 all [installed,automatic] +libgpg-error0/testing,now 1.51-3 amd64 [installed,automatic] +libgpm2/testing,now 1.20.7-11+b2 amd64 [installed,automatic] +libgprofng0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libgraphite2-3/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgraphite2-dev/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgssapi-krb5-2/testing,now 1.21.3-4 amd64 [installed,automatic] +libharfbuzz-cairo0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-dev/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-gobject0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-icu0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-subset0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz0b/testing,now 10.2.0-1 amd64 [installed,automatic] +libhogweed6t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libhwasan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libice-dev/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libice6/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libicu-dev/testing,now 72.1-6 amd64 [installed,automatic] +libicu72/testing,now 72.1-6 amd64 [installed,automatic] +libidn2-0/testing,now 2.3.7-2+b1 amd64 [installed,automatic] +libisl23/testing,now 0.27-1 amd64 [installed,automatic] +libitm1/testing,now 14.2.0-12 amd64 [installed,automatic] +libjansson4/testing,now 2.14-2+b3 amd64 [installed,automatic] +libjbig-dev/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjbig0/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjpeg-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjson-c5/testing,now 0.18+ds-1 amd64 [installed,automatic] +libk5crypto3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkeyutils1/testing,now 1.6.3-4 amd64 [installed,automatic] +libkmod2/testing,now 33+20240816-2 amd64 [installed,automatic] +libkrb5-3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkrb5support0/testing,now 1.21.3-4 amd64 [installed,automatic] +libksba8/testing,now 1.6.7-2+b1 amd64 [installed,automatic] +liblcms2-2/testing,now 2.16-2 amd64 [installed,automatic] +libldap-common/testing,now 2.6.9+dfsg-1 all [installed,automatic] +libldap2/testing,now 2.6.9+dfsg-1 amd64 [installed,automatic] +liblerc-dev/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +liblerc4/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +libllvm19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +liblocale-gettext-perl/testing,now 1.07-7+b1 amd64 [installed,automatic] +liblsan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libltdl-dev/testing,now 2.5.4-3 amd64 [installed,automatic] +libltdl7/testing,now 2.5.4-3 amd64 [installed,automatic] +liblz4-1/testing,now 1.10.0-3 amd64 [installed,automatic] +liblzma-dev/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzma5/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzo2-2/testing,now 2.10-3+b1 amd64 [installed,automatic] +libmagic-mgc/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmagic1t64/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmd0/testing,now 1.1.0-2+b1 amd64 [installed,automatic] +libmount-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libmount1/testing,now 2.40.4-2 amd64 [installed,automatic] +libmpc3/testing,now 1.3.1-1+b3 amd64 [installed,automatic] +libmpfr6/testing,now 4.2.1-1+b2 amd64 [installed,automatic] +libncurses-dev/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncurses6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncursesw6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libnettle8t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libnghttp2-14/testing,now 1.64.0-1 amd64 [installed,automatic] +libnghttp3-9/testing,now 1.6.0-2 amd64 [installed,automatic] +libngtcp2-16/testing,now 1.9.1-1 amd64 [installed,automatic] +libngtcp2-crypto-gnutls8/testing,now 1.9.1-1 amd64 [installed,automatic] +libnpth0t64/testing,now 1.8-2 amd64 [installed,automatic] +libnss-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libobjc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libobjc4/testing,now 14.2.0-12 amd64 [installed,automatic] +libopengl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libopengl0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libp11-kit0/testing,now 0.25.5-3 amd64 [installed,automatic] +libpam-modules-bin/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-modules/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-runtime/testing,now 1.7.0-2 all [installed,automatic] +libpam-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libpam0g/testing,now 1.7.0-2 amd64 [installed,automatic] +libpango-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpango1.0-dev/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangocairo-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoft2-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoxft-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpciaccess0/testing,now 0.17-3+b3 amd64 [installed,automatic] +libpcre2-16-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-32-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-8-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-dev/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-posix3/testing,now 10.44-5 amd64 [installed,automatic] +libperl5.40/testing,now 5.40.0-8 amd64 [installed,automatic] +libpfm4/testing,now 4.13.0+git83-g91970fe-1 amd64 [installed,automatic] +libpipeline1/testing,now 1.5.8-1 amd64 [installed,automatic] +libpixman-1-0/testing,now 0.44.0-3 amd64 [installed,automatic] +libpixman-1-dev/testing,now 0.44.0-3 amd64 [installed,automatic] +libpkgconf3/testing,now 1.8.1-4 amd64 [installed,automatic] +libpng-dev/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng-tools/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng16-16t64/testing,now 1.6.44-3 amd64 [installed,automatic] +libproc2-0/testing,now 2:4.0.4-7 amd64 [installed,automatic] +libpsl5t64/testing,now 0.21.2-1.1+b1 amd64 [installed,automatic] +libpython3-stdlib/testing,now 3.13.1-2 amd64 [installed,automatic] +libpython3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libpython3.13-stdlib/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libquadmath0/testing,now 14.2.0-12 amd64 [installed,automatic] +libreadline8t64/testing,now 8.2-6 amd64 [installed,automatic] +librsvg2-2/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librsvg2-common/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librtmp1/testing,now 2.4+20151223.gitfa8646d.1-2+b5 amd64 [installed,automatic] +libsasl2-2/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules-db/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libseccomp2/testing,now 2.5.5-2 amd64 [installed,automatic] +libselinux1-dev/testing,now 3.7-3.1 amd64 [installed,automatic] +libselinux1/testing,now 3.7-3.1 amd64 [installed,automatic] +libsemanage-common/testing,now 3.7-2.1 all [installed,automatic] +libsemanage2/testing,now 3.7-2.1 amd64 [installed,automatic] +libsensors-config/testing,now 1:3.6.0-10 all [installed,automatic] +libsensors5/testing,now 1:3.6.0-10+b1 amd64 [installed,automatic] +libsepol-dev/testing,now 3.7-1 amd64 [installed,automatic] +libsepol2/testing,now 3.7-1 amd64 [installed,automatic] +libsframe1/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libsharpyuv-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsharpyuv0/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsigc++-2.0-0v5/testing,now 2.12.1-3 amd64 [installed,automatic] +libsm-dev/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsm6/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsmartcols1/testing,now 2.40.4-2 amd64 [installed,automatic] +libsqlite3-0/testing,now 3.46.1-1 amd64 [installed,automatic] +libss2/testing,now 1.47.2-1 amd64 [installed,automatic] +libssh2-1t64/testing,now 1.11.1-1 amd64 [installed,automatic] +libssl3t64/testing,now 3.4.0-2 amd64 [installed,automatic] +libstdc++-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libstdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libsysprof-capture-4-dev/testing,now 47.2-1 amd64 [installed,automatic] +libsystemd-dev/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd-shared/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd0/testing,now 257.2-3 amd64 [installed,automatic] +libtasn1-6/testing,now 4.19.0-3+b3 amd64 [installed,automatic] +libtcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +libthai-data/testing,now 0.1.29-2 all [installed,automatic] +libthai-dev/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libthai0/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libtiff-dev/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiff6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiffxx6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtinfo6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libtinyxml2-10/testing,now 10.0.0+dfsg-2+b2 amd64 [installed,automatic] +libtool/testing,now 2.5.4-3 all [installed] +libtsan2/testing,now 14.2.0-12 amd64 [installed,automatic] +libubsan1/testing,now 14.2.0-12 amd64 [installed,automatic] +libudev1/testing,now 257.2-3 amd64 [installed,automatic] +libunistring5/testing,now 1.3-1 amd64 [installed,automatic] +libuuid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libvulkan1/testing,now 1.4.304.0-1 amd64 [installed,automatic] +libwayland-bin/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-client0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-cursor0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-dev/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-egl1/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-server0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwebp-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebp7/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdecoder3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdemux2/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpmux3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libx11-6/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-data/testing,now 2:1.8.10-2 all [installed,automatic] +libx11-dev/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-xcb1/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libxapian30/testing,now 1.4.25-2 amd64 [installed,automatic] +libxau-dev/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxau6/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxaw7/testing,now 2:1.0.16-1 amd64 [installed,automatic] +libxcb-dri2-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-dri3-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-glx0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-present0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-randr0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-sync1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-xfixes0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcomposite-dev/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcomposite1/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcursor-dev/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxcursor1/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxdamage-dev/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdamage1/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdmcp-dev/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxdmcp6/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxext-dev/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxext6/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxfixes-dev/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxfixes3/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxft-dev/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxft2/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxi-dev/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxi6/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxinerama-dev/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxinerama1/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxkbcommon-dev/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbcommon0/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbfile1/testing,now 1:1.1.0-1+b4 amd64 [installed,automatic] +libxklavier-dev/testing,now 5.4-5+b2 amd64 [installed] +libxklavier16/testing,now 5.4-5+b2 amd64 [installed,automatic] +libxml2-dev/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxml2-utils/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed] +libxml2/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxmu6/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxmuu1/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxpm4/testing,now 1:3.5.17-1+b3 amd64 [installed,automatic] +libxrandr-dev/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrandr2/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrender-dev/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxrender1/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxshmfence1/testing,now 1.3-1+b3 amd64 [installed,automatic] +libxt6t64/testing,now 1:1.2.1-1.2+b2 amd64 [installed,automatic] +libxtst-dev/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxtst6/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxxf86vm1/testing,now 1:1.1.4-1+b4 amd64 [installed,automatic] +libxxhash0/testing,now 0.8.2-2+b2 amd64 [installed,automatic] +libyaml-0-2/testing,now 0.2.5-2 amd64 [installed,automatic] +libz3-4/testing,now 4.13.3-1 amd64 [installed,automatic] +libz3-dev/testing,now 4.13.3-1 amd64 [installed,automatic] +libzstd-dev/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +libzstd1/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +linux-libc-dev/testing,now 6.12.11-1 all [installed,automatic] +linux-sysctl-defaults/testing,now 4.11 all [installed,automatic] +llvm-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-linker-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-runtime/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +login.defs/testing,now 1:4.16.0-7 all [installed,automatic] +login/testing,now 1:4.16.0-2+really2.40.4-2 amd64 [installed,automatic] +logsave/testing,now 1.47.2-1 amd64 [installed,automatic] +m4/testing,now 1.4.19-5 amd64 [installed,automatic] +make/testing,now 4.4.1-1 amd64 [installed] +manpages-dev/testing,now 6.9.1-1 all [installed,automatic] +manpages/testing,now 6.9.1-1 all [installed,automatic] +mawk/testing,now 1.3.4.20240905-1 amd64 [installed,automatic] +media-types/testing,now 10.1.0 all [installed,automatic] +mesa-libgallium/testing,now 24.2.8-1 amd64 [installed,automatic] +mesa-vulkan-drivers/testing,now 24.2.8-1 amd64 [installed,automatic] +mount/testing,now 2.40.4-2 amd64 [installed,automatic] +native-architecture/testing,now 0.2.5 all [installed,automatic] +ncurses-base/testing,now 6.5-2 all [installed,automatic] +ncurses-bin/testing,now 6.5-2+b1 amd64 [installed,automatic] +netbase/testing,now 6.4 all [installed,automatic] +openssh-client/testing,now 1:9.9p1-3 amd64 [installed,automatic] +openssl-provider-legacy/testing,now 3.4.0-2 amd64 [installed,automatic] +openssl/testing,now 3.4.0-2 amd64 [installed,automatic] +pango1.0-tools/testing,now 1.56.1-1 amd64 [installed,automatic] +passwd/testing,now 1:4.16.0-7 amd64 [installed,automatic] +patch/testing,now 2.7.6-7 amd64 [installed,automatic] +perl-base/testing,now 5.40.0-8 amd64 [installed,automatic] +perl-modules-5.40/testing,now 5.40.0-8 all [installed,automatic] +perl/testing,now 5.40.0-8 amd64 [installed,automatic] +pinentry-curses/testing,now 1.3.1-2 amd64 [installed,automatic] +pkgconf-bin/testing,now 1.8.1-4 amd64 [installed,automatic] +pkgconf/testing,now 1.8.1-4 amd64 [installed,automatic] +procps/testing,now 2:4.0.4-7 amd64 [installed,automatic] +psmisc/testing,now 23.7-1 amd64 [installed,automatic] +publicsuffix/testing,now 20250108.1153-0.1 all [installed,automatic] +python3-autocommand/testing,now 2.2.2-3 all [installed,automatic] +python3-inflect/testing,now 7.3.1-2 all [installed,automatic] +python3-jaraco.context/testing,now 6.0.0-1 all [installed,automatic] +python3-jaraco.functools/testing,now 4.1.0-1 all [installed,automatic] +python3-jaraco.text/testing,now 4.0.0-1 all [installed,automatic] +python3-mako/testing,now 1.3.8-2 all [installed,automatic] +python3-markdown/testing,now 3.7-2 all [installed,automatic] +python3-markupsafe/testing,now 2.1.5-1+b2 amd64 [installed,automatic] +python3-minimal/testing,now 3.13.1-2 amd64 [installed,automatic] +python3-more-itertools/testing,now 10.6.0-1 all [installed,automatic] +python3-packaging/testing,now 24.2-1 all [installed,automatic] +python3-pkg-resources/testing,now 75.6.0-1 all [installed,automatic] +python3-pygments/testing,now 2.18.0+dfsg-2 all [installed,automatic] +python3-setuptools/testing,now 75.6.0-1 all [installed,automatic] +python3-typeguard/testing,now 4.4.1-1 all [installed,automatic] +python3-typing-extensions/testing,now 4.12.2-2 all [installed,automatic] +python3-yaml/testing,now 6.0.2-1+b1 amd64 [installed,automatic] +python3-zipp/testing,now 3.21.0-1 all [installed,automatic] +python3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3.13/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3/testing,now 3.13.1-2 amd64 [installed,automatic] +readline-common/testing,now 8.2-6 all [installed,automatic] +rpcsvc-proto/testing,now 1.4.3-1 amd64 [installed,automatic] +sed/testing,now 4.9-2 amd64 [installed,automatic] +sensible-utils/testing,now 0.0.24 all [installed,automatic] +sgml-base/testing,now 1.31 all [installed,automatic] +shared-mime-info/testing,now 2.4-5+b2 amd64 [installed,automatic] +sqv/testing,now 1.2.1-5 amd64 [installed,automatic] +systemd-cryptsetup/testing,now 257.2-3 amd64 [installed,automatic] +systemd-sysv/testing,now 257.2-3 amd64 [installed,automatic] +systemd-timesyncd/testing,now 257.2-3 amd64 [installed,automatic] +systemd/testing,now 257.2-3 amd64 [installed,automatic] +sysvinit-utils/testing,now 3.13-1 amd64 [installed,automatic] +tar/testing,now 1.35+dfsg-3.1 amd64 [installed,automatic] +tcl-expect/testing,now 5.45.4-3+b1 amd64 [installed,automatic] +tcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +tzdata/testing,now 2024b-6 all [installed,automatic] +util-linux/testing,now 2.40.4-2 amd64 [installed,automatic] +uuid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +wayland-protocols/testing,now 1.39-1 all [installed,automatic] +wget/testing,now 1.24.5-2+b1 amd64 [installed] +x11-common/testing,now 1:7.7+24 all [installed,automatic] +x11-xkb-utils/testing,now 7.7+9 amd64 [installed,automatic] +x11proto-dev/testing,now 2024.1-1 all [installed,automatic] +xauth/testing,now 1:1.1.2-1.1 amd64 [installed,automatic] +xdg-user-dirs/testing,now 0.18-2 amd64 [installed,automatic] +xkb-data/testing,now 2.42-1 all [installed,automatic] +xml-core/testing,now 0.19 all [installed,automatic] +xorg-sgml-doctools/testing,now 1:1.11-1.1 all [installed,automatic] +xtrans-dev/testing,now 1.4.0-1 all [installed,automatic] +xz-utils/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +zlib1g-dev/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +zlib1g/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +Errors detected in the build 0 +Warnings detected in the logs 96 +cppcheck defects detected in the logs 28 +TOTAL warnings detected in the logs 124 diff --git a/2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/stats.html b/2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/stats.html new file mode 100644 index 0000000..a805ba6 --- /dev/null +++ b/2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/stats.html @@ -0,0 +1,180 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+

Top 10 files for error severity, total findings: 2
+   1  libcafekbd/cafekbd-status.c
+   1  libcafekbd/cafekbd-indicator.c
+

+

Top 10 files for style severity, total findings: 20
+   13  libcafekbd/cafekbd-keyboard-drawing.c
+   6   libcafekbd/cafekbd-keyboard-config.c
+   1   test/cafekbd-status-test.c
+

+

Top 10 files for information severity, total findings: 5
+   1  test/cafekbd-keyboard-drawing-test.c
+   1  libcafekbd/cafekbd-keyboard-drawing.c
+   1  libcafekbd/cafekbd-keyboard-config.c
+   1  libcafekbd/cafekbd-indicator-config.c
+   1  libcafekbd/cafekbd-desktop-config.c
+

+ +
+ +
+ + diff --git a/2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/style.css b/2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/style.css new file mode 100644 index 0000000..3897bfa --- /dev/null +++ b/2025-02-06-152437-6417-cppcheck@ae3358295c1f_devel/style.css @@ -0,0 +1,177 @@ + +body { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; + font-size: 13px; + line-height: 1.5; + height: 100%; + margin: 0; +} + +#wrapper { + position: fixed; + height: 100vh; + width: 100vw; + display: grid; + grid-template-rows: fit-content(8rem) auto fit-content(8rem); + grid-template-columns: fit-content(25%) 1fr; + grid-template-areas: + "header header" + "menu content" + "footer footer"; +} + +h1 { + margin: 0 0 8px -2px; + font-size: 175%; +} + +.header { + padding: 0 0 5px 15px; + grid-area: header; + border-bottom: thin solid #aaa; +} + +.footer { + grid-area: footer; + border-top: thin solid #aaa; + font-size: 85%; + +} + +.footer > p { + margin: 4px; +} + +#menu, +#menu_index { + grid-area: menu; + text-align: left; + overflow: auto; + padding: 0 23px 15px 15px; + border-right: thin solid #aaa; + min-width: 200px; +} + +#menu > a { + display: block; + margin-left: 10px; + font-size: 12px; +} + +#content, +#content_index { + grid-area: content; + padding: 0px 5px 15px 15px; + overflow: auto; +} + +label { + white-space: nowrap; +} + +label.checkBtn.disabled { + color: #606060; + background: #e0e0e0; + font-style: italic; +} + +label.checkBtn, input[type="text"] { + border: 1px solid grey; + border-radius: 4px; + box-shadow: 1px 1px inset; + padding: 1px 5px; +} + +label.checkBtn { + white-space: nowrap; + background: #ccddff; +} + +label.unchecked { + background: #eff8ff; + box-shadow: 1px 1px 1px; +} + +label.checkBtn:hover, label.unchecked:hover{ + box-shadow: 0 0 2px; +} + +label.disabled:hover { + box-shadow: 1px 1px inset; +} + +label.checkBtn > input { + display:none; +} + +.summaryTable { + width: 100%; +} + +table.summaryTable td { padding: 0 5px 0 5px; } + +.statHeader, .severityHeader { + font-weight: bold; +} + +.warning { + background-color: #ffffa7; +} + +.error { + background-color: #ffb7b7; +} + +.error2 { + background-color: #faa; + display: inline-block; + margin-left: 4px; +} + +.inconclusive { + background-color: #b6b6b4; +} + +.inconclusive2 { + background-color: #b6b6b4; + display: inline-block; + margin-left: 4px; +} + +.verbose { + display: inline-block; + vertical-align: top; + cursor: help; +} + +.verbose .content { + display: none; + position: absolute; + padding: 10px; + margin: 4px; + max-width: 40%; + white-space: pre-wrap; + border: 1px solid #000; + background-color: #ffffcc; + cursor: auto; +} + +.highlight .hll { + padding: 1px; +} + +.highlighttable { + background-color: #fff; + position: relative; + margin: -10px; +} + +.linenos { + border-right: thin solid #aaa; + color: #d3d3d3; + padding-right: 6px; +} + +.id-filtered, .severity-filtered, .file-filtered, .tool-filtered, .text-filtered { + visibility: collapse; +} diff --git a/2025-02-06-153413-14522-1@1eab72938451_devel/commitmsg b/2025-02-06-153413-14522-1@1eab72938451_devel/commitmsg new file mode 100644 index 0000000..891e4bf --- /dev/null +++ b/2025-02-06-153413-14522-1@1eab72938451_devel/commitmsg @@ -0,0 +1 @@ +Release 2.0.0 diff --git a/2025-02-06-153413-14522-1@1eab72938451_devel/index.html b/2025-02-06-153413-14522-1@1eab72938451_devel/index.html new file mode 100644 index 0000000..31dc3be --- /dev/null +++ b/2025-02-06-153413-14522-1@1eab72938451_devel/index.html @@ -0,0 +1,138 @@ + + +libcafekbd (clang-tools 1:19.0-63) - scan-build results + + + + + + +

libcafekbd (clang-tools 1:19.0-63) - scan-build results

+ + + + + + + +
User:root@542946beee50
Working Directory:/rootdir
Command Line:make -j 5
Clang Version:Debian clang version 19.1.6 (1+b1) +
Date:Thu Feb 6 15:34:13 2025
+

Bug Summary

+ + + + + + + + + +
Bug TypeQuantityDisplay?
All Bugs11
Logic error
Dereference of null pointer1
Stream handling error
Invalid stream state1
Stream already in EOF1
Unused code
Unreachable code8
+ +

Filter Results by File

+ + +

Reports

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Bug GroupBug Type ▾FileFunction/MethodLinePath Length
Logic errorDereference of null pointerlibcafekbd/tmp-introspect4wvde_v4/Cafekbd-1.0.cmain81232View Report
Stream handling errorInvalid stream statelibcafekbd/tmp-introspect4wvde_v4/Cafekbd-1.0.cread_line8933View Report
Stream handling errorStream already in EOFlibcafekbd/tmp-introspect4wvde_v4/Cafekbd-1.0.cread_line8933View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2481View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain1991View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain1941View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2281View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain1871View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2251View Report
Unused codeUnreachable codelibcafekbd/tmp-introspect4wvde_v4/Cafekbd-1.0.cvalue_to_string2391View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2561View Report
+ + diff --git a/2025-02-06-153413-14522-1@1eab72938451_devel/output_1eab72938451cf1abc040f3d639aae6d9cbfd748 b/2025-02-06-153413-14522-1@1eab72938451_devel/output_1eab72938451cf1abc040f3d639aae6d9cbfd748 new file mode 100644 index 0000000..5270f17 --- /dev/null +++ b/2025-02-06-153413-14522-1@1eab72938451_devel/output_1eab72938451cf1abc040f3d639aae6d9cbfd748 @@ -0,0 +1,1866 @@ +Checking libcafekbd/cafekbd-desktop-config.c ... +libcafekbd/cafekbd-desktop-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +1/10 files checked 4% done +Checking libcafekbd/cafekbd-indicator-config.c ... +libcafekbd/cafekbd-indicator-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +2/10 files checked 10% done +Checking libcafekbd/cafekbd-indicator.c ... +libcafekbd/cafekbd-indicator.c:66:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdIndicator, cafekbd_indicator, CTK_TYPE_NOTEBOOK) +^ +3/10 files checked 24% done +Checking libcafekbd/cafekbd-keyboard-config.c ... +libcafekbd/cafekbd-keyboard-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-config.c:67:8: style: Condition '*l1' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:67:15: style: Condition '*l2' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:227:16: style: Condition 'option!=NULL' is always true [knownConditionTrueFalse] + (option != NULL) ? strchr (option, ':') : NULL; + ^ +libcafekbd/cafekbd-keyboard-config.c:282:18: style: Condition 'variant==NULL' is always false [knownConditionTrueFalse] + (variant == + ^ +libcafekbd/cafekbd-keyboard-config.c:226:10: style: Variable 'delim' can be declared as pointer to const [constVariablePointer] + char *delim = + ^ +libcafekbd/cafekbd-keyboard-config.c:609:65: style: Parameter 'kbd_config' can be declared as pointer to const [constParameterPointer] +cafekbd_keyboard_config_options_is_set (CafekbdKeyboardConfig * kbd_config, + ^ +4/10 files checked 36% done +Checking libcafekbd/cafekbd-keyboard-drawing.c ... +libcafekbd/cafekbd-keyboard-drawing.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-drawing.c:61:60: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_coord (CafekbdKeyboardDrawingRenderContext * context, gint n) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:67:61: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_double (CafekbdKeyboardDrawingRenderContext * context, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:625:51: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +set_markup (CafekbdKeyboardDrawingRenderContext * context, gchar *txt) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1026:11: style: Variable 'runp' can be declared as pointer to const [constVariablePointer] + GSList *runp; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1036:25: style: Variable 'geometry' can be declared as pointer to const [constVariablePointer] + PangoGlyphGeometry *geometry; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1202:39: style: Parameter 'outline' can be declared as pointer to const [constParameterPointer] +calc_origin_offset_x (XkbOutlineRec * outline) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1397:15: style: Variable 'shape' can be declared as pointer to const [constVariablePointer] + XkbShapeRec *shape; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: style: Parameter 'drawing' can be declared as pointer to const. However it seems that 'button_press_event' is a callback function, if 'drawing' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2343:18: note: You might need to cast the function pointer here + G_CALLBACK (button_press_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: note: Parameter 'drawing' can be declared as pointer to const + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: style: Parameter 'event' can be declared as pointer to const. However it seems that 'focus_event' is a callback function, if 'event' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2347:18: note: You might need to cast the function pointer here + G_CALLBACK (focus_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: note: Parameter 'event' can be declared as pointer to const + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: style: Parameter 'a' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'a' is declared with const you might also need to cast function pointer(s). [constParameterCallback] +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: note: Parameter 'a' can be declared as pointer to const +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: style: Parameter 'b' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'b' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: note: Parameter 'b' can be declared as pointer to const + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1863:9: style: Variable 'pind' can be declared as pointer to const [constVariablePointer] + Atom *pind = drawing->xkb->names->indicators; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2124:60: style: Parameter 'iev' can be declared as pointer to const [constParameterPointer] +process_indicators_state_notify (XkbIndicatorNotifyEvent * iev, + ^ +Checking libcafekbd/cafekbd-keyboard-drawing.c: KBDRAW_DEBUG... +5/10 files checked 77% done +Checking libcafekbd/cafekbd-status.c ... +libcafekbd/cafekbd-status.c:82:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdStatus, cafekbd_status, CTK_TYPE_STATUS_ICON) +^ +6/10 files checked 91% done +Checking libcafekbd/cafekbd-util.c ... +7/10 files checked 93% done +Checking test/cafekbd-indicator-test.c ... +8/10 files checked 94% done +Checking test/cafekbd-keyboard-drawing-test.c ... +test/cafekbd-keyboard-drawing-test.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +Checking test/cafekbd-keyboard-drawing-test.c: HAVE_CONFIG_H... +9/10 files checked 99% done +Checking test/cafekbd-status-test.c ... +test/cafekbd-status-test.c:42:17: style: Variable 'icon' can be declared as pointer to const [constVariablePointer] + CtkStatusIcon *icon; + ^ +10/10 files checked 100% done +nofile:0:0: information: Active checkers: There was critical errors (use --checkers-report= to see details) [checkersReport] + +/usr/bin/cafe-autogen +checking for autoreconf >= 2.53... + testing autoreconf... found 2.72 +checking for pkg-config >= 0.14.0... + testing pkg-config... found 1.8.1 +checking for cafe-common >= 0.0.1... + testing cafe-doc-common... found 2.0.0 +Checking for required M4 macros... +Checking for forbidden M4 macros... +Processing ./configure.ac +Running cafe-doc-common... +Running autoreconf... +autoreconf: export WARNINGS=no-portability +autoreconf: Entering directory '.' +autoreconf: running: autopoint --force +Copying file ABOUT-NLS +Copying file config.rpath +Copying file m4/codeset.m4 +Copying file m4/extern-inline.m4 +Copying file m4/fcntl-o.m4 +Copying file m4/gettext.m4 +Copying file m4/glibc2.m4 +Copying file m4/glibc21.m4 +Copying file m4/iconv.m4 +Copying file m4/intdiv0.m4 +Copying file m4/intl.m4 +Copying file m4/intldir.m4 +Copying file m4/intlmacosx.m4 +Copying file m4/intmax.m4 +Copying file m4/inttypes-pri.m4 +Copying file m4/inttypes_h.m4 +Copying file m4/lcmessage.m4 +Copying file m4/lib-ld.m4 +Copying file m4/lib-link.m4 +Copying file m4/lib-prefix.m4 +Copying file m4/lock.m4 +Copying file m4/longlong.m4 +Copying file m4/nls.m4 +Copying file m4/po.m4 +Copying file m4/printf-posix.m4 +Copying file m4/progtest.m4 +Copying file m4/size_max.m4 +Copying file m4/stdint_h.m4 +Copying file m4/threadlib.m4 +Copying file m4/uintmax_t.m4 +Copying file m4/visibility.m4 +Copying file m4/wchar_t.m4 +Copying file m4/wint_t.m4 +Copying file m4/xsize.m4 +Copying file po/Makefile.in.in +Copying file po/Makevars.template +Copying file po/Rules-quot +Copying file po/boldquot.sed +Copying file po/en@boldquot.header +Copying file po/en@quot.header +Copying file po/insert-header.sin +Copying file po/quot.sed +Copying file po/remove-potcdate.sin +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: configure.ac: tracing +autoreconf: running: libtoolize --copy --force +libtoolize: putting auxiliary files in '.'. +libtoolize: copying file './ltmain.sh' +libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. +libtoolize: copying file 'm4/libtool.m4' +libtoolize: copying file 'm4/ltoptions.m4' +libtoolize: copying file 'm4/ltsugar.m4' +libtoolize: copying file 'm4/ltversion.m4' +libtoolize: copying file 'm4/lt~obsolete.m4' +autoreconf: configure.ac: not using Intltool +autoreconf: configure.ac: not using Gtkdoc +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: running: /usr/bin/autoconf --force +autoreconf: running: /usr/bin/autoheader --force +autoreconf: running: automake --add-missing --copy --force-missing +configure.ac:31: installing './compile' +configure.ac:34: installing './config.guess' +configure.ac:34: installing './config.sub' +configure.ac:16: installing './install-sh' +configure.ac:16: installing './missing' +Makefile.am: installing './INSTALL' +libcafekbd/Makefile.am: installing './depcomp' +autoreconf: Leaving directory '.' +Skipping configure process. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +checking for a BSD-compatible install... /usr/bin/install -c +checking whether sleep supports fractional seconds... yes +checking filesystem timestamp resolution... 0.01 +checking whether build environment is sane... yes +checking for a race-free mkdir -p... /usr/bin/mkdir -p +checking for gawk... no +checking for mawk... mawk +checking whether make sets $(MAKE)... yes +checking whether make supports nested variables... yes +checking xargs -n works... yes +checking whether make supports the include directive... yes (GNU style) +checking for gcc... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the C compiler works... yes +checking for C compiler default output file name... a.out +checking for suffix of executables... +checking whether we are cross compiling... no +checking for suffix of object files... o +checking whether the compiler supports GNU C... yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... rm: cannot remove 'conftest.plist': Is a directory +yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... gcc3 +checking whether C compiler accepts -Werror=unknown-warning-option... no +checking whether C compiler accepts -Wall... yes +checking whether C compiler accepts -Wmissing-prototypes... yes +checking whether C compiler accepts -Wbad-function-cast... yes +checking whether C compiler accepts -Wcast-align... yes +checking whether C compiler accepts -Wextra... yes +checking whether C compiler accepts -Wformat-nonliteral... yes +checking whether C compiler accepts -Wmissing-declarations... yes +checking whether C compiler accepts -Wnested-externs... yes +checking whether C compiler accepts -Wpointer-arith... yes +checking whether C compiler accepts -Wredundant-decls... yes +checking whether C compiler accepts -Wshadow... yes +checking whether C compiler accepts -Wstrict-prototypes... yes +checking whether C compiler accepts -Wunused-macros... yes +checking whether C compiler accepts -Werror=format-security... yes +checking whether C compiler accepts -fstrict-aliasing... yes +checking flags to pass to the C compiler /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing +checking for gcc... (cached) /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the compiler supports GNU C... (cached) yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... (cached) yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... (cached) none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... (cached) yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... (cached) gcc3 +checking build system type... x86_64-pc-linux-gnu +checking host system type... x86_64-pc-linux-gnu +checking how to print strings... printf +checking for a sed that does not truncate output... /usr/bin/sed +checking for grep that handles long lines and -e... /usr/bin/grep +checking for egrep... /usr/bin/grep -E +checking for fgrep... /usr/bin/grep -F +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld +checking if the linker (/usr/bin/ld) is GNU ld... yes +checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B +checking the name lister (/usr/bin/nm -B) interface... rm: cannot remove 'conftest.plist': Is a directory +BSD nm +checking whether ln -s works... yes +checking the maximum length of command line arguments... 3145728 +checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop +checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop +checking for /usr/bin/ld option to reload object files... -r +checking for file... file +checking for objdump... objdump +checking how to recognize dependent libraries... pass_all +checking for dlltool... no +checking how to associate runtime and link libraries... printf %s\n +checking for ranlib... ranlib +checking for ar... ar +checking for archiver @FILE support... rm: cannot remove 'conftest.plist': Is a directory +@ +checking for strip... strip +checking command to parse /usr/bin/nm -B output from /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer object... rm: cannot remove 'conftest.plist': Is a directory +ok +checking for sysroot... no +checking for a working dd... /usr/bin/dd +checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1 +checking for mt... no +checking if : is a manifest tool... no +checking for stdio.h... yes +checking for stdlib.h... yes +checking for string.h... yes +checking for inttypes.h... yes +checking for stdint.h... yes +checking for strings.h... yes +checking for sys/stat.h... yes +checking for sys/types.h... yes +checking for unistd.h... yes +checking for dlfcn.h... yes +checking for objdir... .libs +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -fno-rtti -fno-exceptions... no +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to produce PIC... -fPIC -DPIC +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer PIC flag -fPIC -DPIC works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer static flag -static works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... (cached) yes +checking whether the /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes +checking whether -lc should be explicitly linked in... no +checking dynamic linker characteristics... GNU/Linux ld.so +checking how to hardcode library paths into programs... immediate +checking whether stripping libraries is possible... yes +checking if libtool supports shared libraries... yes +checking whether to build shared libraries... yes +checking whether to build static libraries... yes +checking whether NLS is requested... yes +checking for msgfmt... /usr/bin/msgfmt +checking for gmsgfmt... /usr/bin/msgfmt +checking for xgettext... /usr/bin/xgettext +checking for msgmerge... /usr/bin/msgmerge +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld -m elf_x86_64 +checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes +checking for shared library run path origin... done +checking how to run the C preprocessor... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer -E +checking for egrep -e... (cached) /usr/bin/grep -E +checking for CFPreferencesCopyAppValue... no +checking for CFLocaleCopyCurrent... no +checking for GNU gettext in libc... yes +checking whether to use NLS... yes +checking where the gettext function comes from... libc +checking for glib-compile-resources... /usr/bin/glib-compile-resources +checking for xmllint... /usr/bin/xmllint +checking for setlocale... yes +checking for pkg-config... /usr/bin/pkg-config +checking pkg-config is at least version 0.9.0... yes +checking for glib-2.0 >= 2.50.0... yes +checking for gmodule-2.0... yes +checking for gio-2.0 >= 2.25.0... yes +checking for cdk-3.0 >= 3.22.0... yes +checking for ctk+-3.0 >= 3.22.0 cdk-x11-3.0 >= 3.22.0... yes +checking for libxklavier >= 5.2... yes +checking for X... libraries , headers +checking for gethostbyname... yes +checking for connect... yes +checking for remove... yes +checking for shmat... yes +checking for IceConnectionNumber in -lICE... yes +checking for pkg-config... (cached) /usr/bin/pkg-config +checking pkg-config is at least version 0.16... yes +checking for library containing sqrt... -lm +checking for gobject-introspection... yes +checking that generated files are newer than configure... done +configure: creating ./config.status +config.status: creating Makefile +config.status: creating libcafekbd.pc +config.status: creating libcafekbdui.pc +config.status: creating po/Makefile.in +config.status: creating libcafekbd/Makefile +config.status: creating libcafekbd/org.cafe.peripherals-keyboard-xkb.gschema.xml +config.status: creating test/Makefile +config.status: creating config.h +config.status: executing depfiles commands +config.status: executing libtool commands +config.status: executing po-directories commands +config.status: creating po/POTFILES +config.status: creating po/Makefile + +Configuration: + + prefix: /usr + exec_prefix: ${prefix} + libdir: ${exec_prefix}/lib + bindir: ${exec_prefix}/bin + sbindir: ${exec_prefix}/sbin + sysconfdir: ${prefix}/etc + datadir: ${datarootdir} + source code location: . + compiler: /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer + cflags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + Warning flags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + +scan-build: Analysis run complete. +scan-build: Removing directory '/tmp/scan-build-2025-02-06-153404-11857-1' because it contains no reports. +scan-build: No bugs found. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +make all-recursive +make[1]: Entering directory '/rootdir' +Making all in po +make[2]: Entering directory '/rootdir/po' +make libcafekbd.pot-update +make[3]: Entering directory '/rootdir/po' +sed -e '/^#/d' remove-potcdate.sin > t-remove-potcdate.sed +mv t-remove-potcdate.sed remove-potcdate.sed +package_gnu=""; \ +test -n "$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L .. -maxdepth 1 -type f \ + -size -10000000c -exec grep 'GNU libcafekbd' \ + /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU libcafekbd' ../* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ +}; \ +if test "$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ +else \ + package_prefix=''; \ +fi; \ +if test -n '' || test 'https://github.com/cafe-desktop/libcafekbd' = '@'PACKAGE_BUGREPORT'@'; then \ + msgid_bugs_address=''; \ +else \ + msgid_bugs_address='https://github.com/cafe-desktop/libcafekbd'; \ +fi; \ +case `/usr/bin/xgettext --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ + *) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --package-name="${package_prefix}libcafekbd" \ + --package-version='2.0.0' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ +esac +test ! -f libcafekbd.po || { \ + if test -f ./libcafekbd.pot-header; then \ + sed -e '1,/^#$/d' < libcafekbd.po > libcafekbd.1po && \ + cat ./libcafekbd.pot-header libcafekbd.1po > libcafekbd.po; \ + rm -f libcafekbd.1po; \ + fi; \ + if test -f ./libcafekbd.pot; then \ + sed -f remove-potcdate.sed < ./libcafekbd.pot > libcafekbd.1po && \ + sed -f remove-potcdate.sed < libcafekbd.po > libcafekbd.2po && \ + if cmp libcafekbd.1po libcafekbd.2po >/dev/null 2>&1; then \ + rm -f libcafekbd.1po libcafekbd.2po libcafekbd.po; \ + else \ + rm -f libcafekbd.1po libcafekbd.2po ./libcafekbd.pot && \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ + else \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ +} +make[3]: Leaving directory '/rootdir/po' +test ! -f ./libcafekbd.pot || \ + test -z "af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo" || make af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo +make[3]: Entering directory '/rootdir/po' +/usr/bin/msgmerge --update --quiet --lang=af af.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=am am.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ar ar.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=an an.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=as as.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=be be.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ast ast.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=az az.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bg bg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn bn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=br br.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn_IN bn_IN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bs bs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca ca.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca@valencia ca@valencia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cmn cmn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cs cs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=crh crh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=csb csb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cv cv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cy cy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=da da.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de de.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de_CH de_CH.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=dz dz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=el el.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_AU en_AU.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_CA en_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_GB en_GB.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eo eo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es es.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_419 es_419.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_AR es_AR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CL es_CL.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CO es_CO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CR es_CR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_DO es_DO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_EC es_EC.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_ES es_ES.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_MX es_MX.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_NI es_NI.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PA es_PA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PR es_PR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PE es_PE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_SV es_SV.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_US es_US.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_UY es_UY.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_VE es_VE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=et et.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eu eu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fa fa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fi fi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fil fil.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fo fo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr fr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr_CA fr_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=frp frp.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fur fur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fy fy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ga ga.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gd gd.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gu gu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gl gl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ha ha.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=he he.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hi hi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hr hr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hu hu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hy hy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ia ia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=id id.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ie ie.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ig ig.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=is is.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=it it.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ja ja.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=jv jv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kab kab.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ka ka.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kk kk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=km km.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kn kn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ko ko.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku ku.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ks ks.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=la la.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku_IQ ku_IQ.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lb lb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ky ky.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=li li.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lo lo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lt lt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lv lv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mai mai.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mi mi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mg mg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ml ml.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mk mk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mn mn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mr mr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ms ms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=my my.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nah nah.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nb nb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nds nds.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ne ne.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nn nn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nl nl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nqo nqo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nso nso.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=oc oc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=om om.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pa pa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=or or.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pl pl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pms pms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ps ps.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt pt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt_BR pt_BR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ro ro.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ru ru.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=rw rw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sco sco.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sc sc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=si si.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sl sl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=so so.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sk sk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sq sq.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr@latin sr@latin.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr sr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sv sv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sw sw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ta ta.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tg tg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=te te.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tk tk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=th th.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tl tl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tr tr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ts ts.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tt tt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ug ug.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uk uk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur ur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur_PK ur_PK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uz uz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=vi vi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=wa wa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=xh xh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yi yi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yo yo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_HK zh_HK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_CN zh_CN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_TW zh_TW.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zu zu.po libcafekbd.pot +rm -f am.gmo && /usr/bin/msgfmt -c --statistics --verbose -o am.gmo am.po +rm -f af.gmo && /usr/bin/msgfmt -c --statistics --verbose -o af.gmo af.po +rm -f an.gmo && /usr/bin/msgfmt -c --statistics --verbose -o an.gmo an.po +am.po: 54 translated messages, 37 untranslated messages. +an.po:7: warning: header field 'Last-Translator' still has the initial default value +an.po: 0 translated messages, 91 untranslated messages. +rm -f ar.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ar.gmo ar.po +af.po: 7 translated messages, 84 untranslated messages. +rm -f ast.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ast.gmo ast.po +rm -f az.gmo && /usr/bin/msgfmt -c --statistics --verbose -o az.gmo az.po +rm -f as.gmo && /usr/bin/msgfmt -c --statistics --verbose -o as.gmo as.po +ar.po: 50 translated messages, 41 untranslated messages. +rm -f be.gmo && /usr/bin/msgfmt -c --statistics --verbose -o be.gmo be.po +ast.po: 47 translated messagesas.po: , 44 untranslated messages. +41 translated messages, 50 untranslated messages. +rm -f bg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bg.gmo bg.po +az.po: 9 translated messages, 82 untranslated messages. +be.po: 46 translated messages, 45 untranslated messages. +rm -f bn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn.gmo bn.po +bg.po: 54 translated messages, 37 untranslated messages. +rm -f br.gmo && /usr/bin/msgfmt -c --statistics --verbose -o br.gmo br.po +rm -f bn_IN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn_IN.gmo bn_IN.po +rm -f bs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bs.gmo bs.po +rm -f ca.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca.gmo ca.po +bn.po: 43 translated messages, 48 untranslated messages. +bn_IN.po: 41 translated messages, 50 untranslated messages. +rm -f ca@valencia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca@valencia.gmo ca@valencia.po +br.po: 20 translated messages, 71 untranslated messages. +bs.po: 25 translated messages, 66 untranslated messages. +ca.po: 87 translated messages, 4 untranslated messages. +rm -f cmn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cmn.gmo cmn.po +rm -f crh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o crh.gmo crh.po +ca@valencia.po: 54 translated messages, 37 untranslated messages. +rm -f cs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cs.gmo cs.po +cmn.po: 46 translated messages, 45 untranslated messages. +rm -f csb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o csb.gmo csb.po +rm -f cv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cv.gmo cv.po +rm -f cy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cy.gmo cy.po +crh.po: 11 translated messages, 80 untranslated messages. +cs.po: 81 translated messages, 10 untranslated messages. +cv.po: 0 translated messages, 91 untranslated messages. +cy.po: 26 translated messages, 65 untranslated messages. +rm -f da.gmo && /usr/bin/msgfmt -c --statistics --verbose -o da.gmo da.po +csb.po:7: warning: header field 'Last-Translator' still has the initial default value +csb.po: 0 translated messages, 91 untranslated messages. +rm -f de.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de.gmo de.po +rm -f de_CH.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de_CH.gmo de_CH.po +rm -f dz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o dz.gmo dz.po +rm -f el.gmo && /usr/bin/msgfmt -c --statistics --verbose -o el.gmo el.po +da.po: 91 translated messages. +de.po: de_CH.po: 0 translated messages, 91 untranslated messages. +76 translated messages, 15 untranslated messages. +el.po: 54 translated messages, 37 untranslated messages. +dz.po: 39 translated messages, 52 untranslated messages. +rm -f en_AU.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_AU.gmo en_AU.po +rm -f en_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_CA.gmo en_CA.po +rm -f en_GB.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_GB.gmo en_GB.po +rm -f eo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eo.gmo eo.po +en_AU.po: 54 translated messages, 37 untranslated messages. +rm -f es.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es.gmo es.po +en_CA.po: 10 translated messages, 81 untranslated messages. +eo.po: 52 translated messages, 39 untranslated messages. +en_GB.po: rm -f es_419.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_419.gmo es_419.po +54 translated messages, 37 untranslated messages. +es.po: 89 translated messages, 2 untranslated messages. +rm -f es_CL.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CL.gmo es_CL.po +rm -f es_AR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_AR.gmo es_AR.po +rm -f es_CO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CO.gmo es_CO.po +es_419.po: 0 translated messages, 91 untranslated messages. +rm -f es_CR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CR.gmo es_CR.po +es_CL.po: 3 translated messages, 88 untranslated messages. +es_AR.po: 21 translated messages, 70 untranslated messages. +es_CO.po: 49 translated messages, 42 untranslated messages. +rm -f es_DO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_DO.gmo es_DO.po +es_CR.po: 1 translated message, 90 untranslated messages. +rm -f es_EC.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_EC.gmo es_EC.po +rm -f es_ES.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_ES.gmo es_ES.po +rm -f es_MX.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_MX.gmo es_MX.po +es_DO.po: 1 translated message, 90 untranslated messages. +rm -f es_NI.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_NI.gmo es_NI.po +es_ES.po: 1 translated message, 90 untranslated messages. +es_MX.po: 1 translated message, 90 untranslated messages. +es_EC.po: 1 translated message, 90 untranslated messages. +rm -f es_PA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PA.gmo es_PA.po +es_NI.po: 1 translated message, 90 untranslated messages. +rm -f es_PR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PR.gmo es_PR.po +rm -f es_PE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PE.gmo es_PE.po +es_PA.po: 1 translated message, 90 untranslated messages. +rm -f es_SV.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_SV.gmo es_SV.po +rm -f es_US.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_US.gmo es_US.po +es_PR.po: 1 translated message, 90 untranslated messages. +es_PE.po: 1 translated message, 90 untranslated messages. +rm -f es_UY.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_UY.gmo es_UY.po +es_SV.po: 1 translated message, 90 untranslated messagesrm -f es_VE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_VE.gmo es_VE.po +. +rm -f et.gmo && /usr/bin/msgfmt -c --statistics --verbose -o et.gmo et.po +es_US.po: 0 translated messages, 91 untranslated messages. +rm -f eu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eu.gmo eu.po +es_UY.po: 1 translated message, 90 untranslated messages. +es_VE.po: 1 translated message, 90 untranslated messages. +et.po: 54 translated messages, 37 untranslated messages. +rm -f fa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fa.gmo fa.po +rm -f fi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fi.gmo fi.po +rm -f fil.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fil.gmo fil.po +rm -f fo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fo.gmo fo.po +eu.po: 54 translated messages, 37 untranslated messages. +fa.po: 11 translated messages, 80 untranslated messages. +fi.po: 48 translated messages, 43 untranslated messages. +rm -f fr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr.gmo fr.po +fo.po: 0 translated messages, 91 untranslated messages. +fil.po: 0 translated messages, 91 untranslated messages. +rm -f fr_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr_CA.gmo fr_CA.po +rm -f frp.gmo && /usr/bin/msgfmt -c --statistics --verbose -o frp.gmo frp.po +fr.po: 67 translated messages, 24 untranslated messages. +rm -f fur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fur.gmo fur.po +fr_CA.po: rm -f fy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fy.gmo fy.po +3 translated messages, 88 untranslated messages. +frp.po: 7 translated messages, 84 untranslated messages. +fur.po: 4 translated messages, 87 untranslated messages. +rm -f gd.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gd.gmo gd.po +rm -f ga.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ga.gmo ga.po +fy.po: 4 translated messages, 87 untranslated messages. +rm -f gu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gu.gmo gu.po +rm -f gl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gl.gmo gl.po +ga.po: 41 translated messages, 50 untranslated messages. +gu.po: 43 translated messages, 48 untranslated messages. +rm -f ha.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ha.gmo ha.po +gd.po: 0 translated messages, 91 untranslated messages. +gl.po: 89 translated messages, 2 untranslated messages. +ha.po: 5 translated messages, 86 untranslated messages. +rm -f he.gmo && /usr/bin/msgfmt -c --statistics --verbose -o he.gmo he.po +rm -f hi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hi.gmo hi.po +rm -f hr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hr.gmo hr.po +rm -f hu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hu.gmo hu.po +hr.po: 54 translated messages, 37 untranslated messages. +he.po: 54 translated messages, 37 untranslated messages. +rm -f hy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hy.gmo hy.po +hi.po: 45 translated messages, 46 untranslated messages. +hu.po: 54 translated messages, 37 untranslated messages. +rm -f id.gmo && /usr/bin/msgfmt -c --statistics --verbose -o id.gmo id.po +rm -f ie.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ie.gmo ie.po +rm -f ia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ia.gmo ia.po +hy.po: rm -f ig.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ig.gmo ig.po +54 translated messages, 37 untranslated messages. +id.po: 91 translated messages. +ie.po: 45 translated messages, 46 untranslated messages. +ia.po: 3 translated messages, 88 untranslated messages. +rm -f it.gmo && /usr/bin/msgfmt -c --statistics --verbose -o it.gmo it.po +rm -f is.gmo && /usr/bin/msgfmt -c --statistics --verbose -o is.gmo is.po +ig.po: 5 translated messages, 86 untranslated messages. +rm -f ja.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ja.gmo ja.po +rm -f jv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o jv.gmo jv.po +it.po: rm -f ka.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ka.gmo ka.po +91 translated messages. +is.po: 12 translated messages, 79 untranslated messages. +ja.po: 54 translated messages, 37 untranslated messages. +rm -f kk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kk.gmo kk.po +jv.po: 2 translated messages, 89 untranslated messages. +rm -f kab.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kab.gmo kab.po +ka.po: 37 translated messages, 54 untranslated messages. +rm -f km.gmo && /usr/bin/msgfmt -c --statistics --verbose -o km.gmo km.po +kk.po: 24 translated messages, 67 untranslated messages. +rm -f kn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kn.gmo kn.po +kab.po: 4 translated messages, 87 untranslated messages. +rm -f ko.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ko.gmo ko.po +km.po:7: warning: header field 'Last-Translator' still has the initial default value +km.po: 0 translated messages, 91 untranslated messages. +rm -f ks.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ks.gmo ks.po +kn.po: 43 translated messages, 48 untranslated messages. +rm -f ku.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku.gmo ku.po +rm -f ku_IQ.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku_IQ.gmo ku_IQ.po +ks.po: 3 translated messages, 88 untranslated messagesrm -f ky.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ky.gmo ky.po +ko.po: 54 translated messages, 37 untranslated messages. +. +ku.po: 10 translated messages, 81 untranslated messages. +ku_IQ.po: rm -f la.gmo && /usr/bin/msgfmt -c --statistics --verbose -o la.gmo la.po +16 translated messages, 75 untranslated messages. +rm -f lb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lb.gmo lb.po +rm -f li.gmo && /usr/bin/msgfmt -c --statistics --verbose -o li.gmo li.po +ky.po: 26 translated messages, 65 untranslated messages. +la.po: 2 translated messages, 89 untranslated messages. +rm -f lt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lt.gmo lt.po +lb.po:7: warning: header field 'Last-Translator' still has the initial default value +lb.po: 0 translated messages, 91 untranslated messages. +rm -f lo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lo.gmo lo.po +li.po:7: warning: header field 'Last-Translator' still has the initial default value +li.po: 0 translated messages, 91 untranslated messages. +lo.po:7: warning: header field 'Last-Translator' still has the initial default value +lt.po: 91 translated messages. +rm -f lv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lv.gmo lv.po +lo.po: 0 translated messages, 91 untranslated messages. +rm -f mai.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mai.gmo mai.po +rm -f mg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mg.gmo mg.po +rm -f mi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mi.gmo mi.po +rm -f mk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mk.gmo mk.po +lv.po: 49 translated messages, 42 untranslated messages. +mg.po: 10 translated messages, 81 untranslated messages. +mai.po: 18 translated messages, 73 untranslated messages. +mk.po: 39 translated messages, 52 untranslated messages. +mi.po:7: warning: header field 'Last-Translator' still has the initial default value +mi.po: 0 translated messages, 91 untranslated messages. +rm -f ml.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ml.gmo ml.po +rm -f mn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mn.gmo mn.po +rm -f mr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mr.gmo mr.po +rm -f ms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ms.gmo ms.po +rm -f my.gmo && /usr/bin/msgfmt -c --statistics --verbose -o my.gmo my.po +mn.po: 10 translated messages, 81 untranslated messages. +ml.po: 41 translated messages, 50 untranslated messages. +mr.po: 47 translated messages, 44 untranslated messages. +ms.po: 91 translated messages. +rm -f nb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nb.gmo nb.po +rm -f nah.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nah.gmo nah.po +my.po:7: warning: header field 'Last-Translator' still has the initial default value +my.po: 0 translated messages, 91 untranslated messages. +rm -f nds.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nds.gmo nds.po +nb.po: 91 translated messages. +rm -f nl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nl.gmo nl.po +nds.po: 12 translated messages, 79 untranslated messages. +nah.po: 0 translated messages, 91 untranslated messages. +rm -f ne.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ne.gmo ne.po +rm -f nn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nn.gmo nn.po +rm -f nqo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nqo.gmo nqo.po +rm -f nso.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nso.gmo nso.po +nl.po: 91 translated messages. +ne.po: 13 translated messages, 78 untranslated messages. +nqo.po: 0 translated messages, 91 untranslated messages. +nso.po: nn.po: 40 translated messages, 51 untranslated messages. +3 translated messages, 88 untranslated messages. +rm -f oc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o oc.gmo oc.po +rm -f om.gmo && /usr/bin/msgfmt -c --statistics --verbose -o om.gmo om.po +rm -f or.gmo && /usr/bin/msgfmt -c --statistics --verbose -o or.gmo or.po +rm -f pa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pa.gmo pa.po +oc.po: 68 translated messages, 23 untranslated messages. +rm -f pl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pl.gmo pl.po +or.po: 41 translated messages, 50 untranslated messages. +pa.po: 46 translated messages, 45 untranslated messages. +om.po: 0 translated messages, 91 untranslated messages. +rm -f pms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pms.gmo pms.po +rm -f ps.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ps.gmo ps.po +rm -f pt_BR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt_BR.gmo pt_BR.po +rm -f pt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt.gmo pt.po +pl.po: 55 translated messagespms.po: 3 translated messages, 88 untranslated messages. +, 36 untranslated messages. +pt_BR.po: 58 translated messages, 33 untranslated messages. +ps.po: 6 translated messages, 85 untranslated messages. +rm -f ro.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ro.gmo ro.po +pt.po: 84 translated messages, 7 untranslated messages. +rm -f ru.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ru.gmo ru.po +rm -f rw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o rw.gmo rw.po +rm -f sc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sc.gmo sc.po +ro.po: 54 translated messages, 37 untranslated messages. +ru.po: 89 translated messages, 2 untranslated messages. +rw.po: 10 translated messages, 81 untranslated messages. +rm -f sco.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sco.gmo sco.po +sc.po: 2 translated messages, 89 untranslated messages. +rm -f si.gmo && /usr/bin/msgfmt -c --statistics --verbose -o si.gmo si.po +rm -f sk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sk.gmo sk.po +rm -f sl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sl.gmo sl.po +sco.po: 0 translated messages, 91 untranslated messages. +si.po: 36 translated messages, 55 untranslated messages. +rm -f so.gmo && /usr/bin/msgfmt -c --statistics --verbose -o so.gmo so.po +sk.po: 54 translated messages, 37 untranslated messages. +sl.po: 55 translated messages, 36 untranslated messages. +rm -f sq.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sq.gmo sq.po +rm -f sr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr.gmo sr.po +so.po: 0 translated messages, 91 untranslated messages. +rm -f sr@latin.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr@latin.gmo sr@latin.po +rm -f sv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sv.gmo sv.po +sq.po: 52 translated messages, 39 untranslated messages. +sr.po: 91 translated messages. +rm -f sw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sw.gmo sw.po +sv.po: 80 translated messages, 11 untranslated messages. +rm -f ta.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ta.gmo ta.po +sr@latin.po: 46 translated messages, 45 untranslated messages. +rm -f te.gmo && /usr/bin/msgfmt -c --statistics --verbose -o te.gmo te.po +sw.po: 0 translated messages, 91 untranslated messages. +ta.po: 46 translated messages, 45 untranslated messages. +te.po: 41 translated messages, 50 untranslated messages. +rm -f th.gmo && /usr/bin/msgfmt -c --statistics --verbose -o th.gmo th.po +rm -f tg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tg.gmo tg.po +rm -f tk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tk.gmo tk.po +rm -f tl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tl.gmo tl.po +th.po: 45 translated messages, 46 untranslated messages. +rm -f tr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tr.gmo tr.po +tg.po: 0 translated messages, 91 untranslated messages. +rm -f ts.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ts.gmo ts.po +tk.po: 7 translated messages, 84 untranslated messages. +tr.po: 58 translated messages, 33 untranslated messages. +tl.po: 0 translated messages, 91 untranslated messages. +rm -f tt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tt.gmo tt.po +rm -f ug.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ug.gmo ug.po +ts.po: 0 translated messages, 91 untranslated messages. +rm -f uk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uk.gmo uk.po +tt.po:7: warning: header field 'Last-Translator' still has the initial default value +tt.po: 0 translated messages, 91 untranslated messages. +rm -f ur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur.gmo ur.po +ug.po: 6 translated messages, 85 untranslated messages. +rm -f ur_PK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur_PK.gmo ur_PK.po +uk.po: 58 translated messages, 33 untranslated messages. +rm -f uz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uz.gmo uz.po +ur.po: 7 translated messages, 84 untranslated messages. +rm -f vi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o vi.gmo vi.po +ur_PK.po:7: warning: header field 'Last-Translator' still has the initial default value +rm -f wa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o wa.gmo wa.po +ur_PK.po: 0 translated messages, 91 untranslated messages. +rm -f xh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o xh.gmo xh.po +uz.po: 26 translated messages, 65 untranslated messages. +vi.po: 52 translated messages, 39 untranslated messages. +rm -f yi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yi.gmo yi.po +wa.po: 9 translated messages, 82 untranslated messages. +xh.po: 8 translated messages, 83 untranslated messages. +yi.po:7: warning: rm -f yo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yo.gmo yo.po +rm -f zh_CN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_CN.gmo zh_CN.po +header field 'Last-Translator' still has the initial default value +yi.po: 0 translated messages, 91 untranslated messages. +rm -f zh_HK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_HK.gmo zh_HK.po +rm -f zh_TW.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_TW.gmo zh_TW.po +zh_CN.po: 63 translated messages, 28 untranslated messages. +zh_HK.po: 47 translated messages, 44 untranslated messages. +zh_TW.po: 91 translated messages. +yo.po: 5 translated messages, 86 untranslated messages. +rm -f zu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zu.gmo zu.po +zu.po: 3 translated messages, 88 untranslated messages. +make[3]: Leaving directory '/rootdir/po' +touch stamp-po +make[2]: Leaving directory '/rootdir/po' +Making all in libcafekbd +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml + GEN cafekbd-indicator-marshal.h + GEN cafekbd-keyboard-drawing-marshal.h +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +INFO: Reading ./cafekbd-indicator-marshal.list... +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... + GEN cafekbd-indicator-marshal.c + GEN cafekbd-keyboard-drawing-marshal.c +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... +INFO: Reading ./cafekbd-indicator-marshal.list... +make all-am +make[3]: Entering directory '/rootdir/libcafekbd' + CC libcafekbd_la-cafekbd-desktop-config.lo + CC libcafekbd_la-cafekbd-keyboard-config.lo + CC libcafekbd_la-cafekbd-util.lo + CC libcafekbdui_la-cafekbd-indicator-config.lo + CC libcafekbdui_la-cafekbd-indicator.lo +cafekbd-desktop-config.c: In function 'cafekbd_desktop_config_load_from_gsettings': +cafekbd-desktop-config.c:176:38: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 176 | || config->default_group >= + | ^~ +cafekbd-indicator-config.c: In function 'cafekbd_indicator_config_get_images_file': +cafekbd-indicator-config.c:152:59: warning: comparison of integer expressions of different signedness: 'guint' {aka 'unsigned int'} and 'int' [-Wsign-compare] + 152 | (g_strv_length (kbd_config->layouts_variants) > group)) { + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_extract_layout_name': +cafekbd-indicator.c:293:19: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 293 | if (group < g_strv_length (short_group_names)) { + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_prepare_drawing': +cafekbd-indicator.c:418:31: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 418 | if (group + 1 == + | ^~ +cafekbd-indicator.c: In function 'cafekbd_indicator_update_tooltips': +cafekbd-indicator.c:446:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 446 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-indicator.c:450:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 450 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-indicator.c: In function 'cafekbd_indicator_kbd_cfg_callback': +cafekbd-indicator.c:61:44: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 61 | CafekbdIndicator * gki = (CafekbdIndicator*)cur->data; + | ^~~ +cafekbd-indicator.c:561:9: note: in expansion of macro 'ForAllIndicators' + 561 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-indicator.c:539:55: note: shadowed declaration is here + 539 | cafekbd_indicator_kbd_cfg_callback (CafekbdIndicator *gki G_GNUC_UNUSED) +cafekbd-indicator.c: In function 'cafekbd_indicator_start_listen': +cafekbd-indicator.c:647:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 647 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:650:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 650 | (CdkFilterFunc) + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_stop_listen': +cafekbd-indicator.c:663:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 663 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:667:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 667 | (CdkFilterFunc) cafekbd_indicator_filter_x_evt, NULL); + | ^ + CC libcafekbdui_la-cafekbd-status.lo +cafekbd-status.c: In function 'cafekbd_status_render_cairo': +cafekbd-status.c:214:23: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 214 | if (group + 1 == xkl_engine_get_num_groups (globals.engine)) { + | ^~ +cafekbd-status.c: In function 'cafekbd_status_prepare_drawing': +cafekbd-status.c:376:51: warning: cast between incompatible function types from 'void (*)(void *)' to 'void (*)(guchar *, void *)' {aka 'void (*)(unsigned char *, void *)'} [-Wcast-function-type] + 376 | (GdkPixbufDestroyNotify) + | ^ +cafekbd-status.c: In function 'cafekbd_status_update_tooltips': +cafekbd-status.c:395:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 395 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-status.c:399:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 399 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-status.c: In function 'cafekbd_status_kbd_cfg_callback': +cafekbd-status.c:77:41: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 77 | CafekbdStatus * gki = (CafekbdStatus*)cur->data; + | ^~~ +cafekbd-status.c:508:9: note: in expansion of macro 'ForAllIndicators' + 508 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-status.c:484:49: note: shadowed declaration is here + 484 | cafekbd_status_kbd_cfg_callback (CafekbdStatus *gki G_GNUC_UNUSED) +cafekbd-status.c: In function 'cafekbd_status_start_listen': +cafekbd-status.c:594:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 594 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:597:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 597 | (CdkFilterFunc) cafekbd_status_filter_x_evt, + | ^ +cafekbd-status.c: In function 'cafekbd_status_stop_listen': +cafekbd-status.c:610:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 610 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:614:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 614 | (CdkFilterFunc) cafekbd_status_filter_x_evt, NULL); + | ^ + CC libcafekbdui_la-cafekbd-indicator-marshal.lo +cafekbd-indicator-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ + CC libcafekbdui_la-cafekbd-keyboard-drawing-marshal.lo +cafekbd-keyboard-drawing-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + CC libcafekbdui_la-cafekbd-keyboard-drawing.lo +cafekbd-keyboard-drawing.c: In function 'draw_polygon': +cafekbd-keyboard-drawing.c:322:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 322 | for (i = 0; i < num_points; i++) { + | ^ +cafekbd-keyboard-drawing.c: In function 'process_indicators_state_notify': +cafekbd-keyboard-drawing.c:2131:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'long unsigned int' [-Wsign-compare] + 2131 | for (i = 0; i <= drawing->xkb->indicators->phys_indicators; i++) + | ^~ +cafekbd-keyboard-drawing.c: In function 'cafekbd_keyboard_drawing_get_type': +cafekbd-keyboard-drawing.c:2394:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawingClass *)' {aka 'void (*)(struct _CafekbdKeyboardDrawingClass *)'} to 'void (*)(void *, void *)' [-Wcast-function-type] + 2394 | (GClassInitFunc) cafekbd_keyboard_drawing_class_init, + | ^ +cafekbd-keyboard-drawing.c:2399:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawing *)' {aka 'void (*)(struct _CafekbdKeyboardDrawing *)'} to 'void (*)(GTypeInstance *, void *)' {aka 'void (*)(struct _GTypeInstance *, void *)'} [-Wcast-function-type] + 2399 | (GInstanceInitFunc) cafekbd_keyboard_drawing_init, + | ^ + GEN org.cafe.peripherals-keyboard-xkb.gschema.valid + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:114:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 114 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbd.la + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspect4wvde_v4/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspect4wvde_v4/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspect4wvde_v4/Cafekbd-1.0.c:239:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 239 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspect4wvde_v4/Cafekbd-1.0.c:246:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 246 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspect4wvde_v4/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +5 warnings generated. + GICOMP Cafekbd-1.0.gir +make[3]: Leaving directory '/rootdir/libcafekbd' +make[2]: Leaving directory '/rootdir/libcafekbd' +Making all in test +make[2]: Entering directory '/rootdir/test' + CC cafekbd_indicator_test-cafekbd-indicator-test.o + CC cafekbd_keyboard_drawing_test-cafekbd-keyboard-drawing-test.o + CC cafekbd_status_test-cafekbd-status-test.o + CCLD cafekbd-status-test + CCLD cafekbd-indicator-test +cafekbd-keyboard-drawing-test.c:187:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 187 | g_print ("kbdraw %s\n", VERSION); + | ^~~~~~~ +cafekbd-keyboard-drawing-test.c:194:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 194 | g_printerr ("--groups: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:199:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 199 | g_printerr ("--levels: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:225:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 225 | cafekbd_keyboard_drawing_set_track_modifiers + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:228:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 228 | cafekbd_keyboard_drawing_set_track_config + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:248:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 248 | names.keycodes = keycodes; + | ^~~~~~~~ +cafekbd-keyboard-drawing-test.c:256:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 256 | names.geometry = geometry; + | ^~~~~~~~ +7 warnings generated. + CCLD cafekbd-keyboard-drawing-test +make[2]: Leaving directory '/rootdir/test' +make[2]: Entering directory '/rootdir' +make[2]: Leaving directory '/rootdir' +make[1]: Leaving directory '/rootdir' +scan-build: Analysis run complete. +scan-build: 11 bugs found. +scan-build: Run 'scan-view /rootdir/html-report/2025-02-06-153413-14522-1' to examine bug reports. +Making check in po +make[1]: Entering directory '/rootdir/po' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/po' +Making check in libcafekbd +make[1]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +make check-am +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:113:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 113 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspectnnxo8s9_/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectnnxo8s9_/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectnnxo8s9_/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +3 warnings generated. + GICOMP Cafekbd-1.0.gir +make[2]: Leaving directory '/rootdir/libcafekbd' +make[1]: Leaving directory '/rootdir/libcafekbd' +Making check in test +make[1]: Entering directory '/rootdir/test' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/test' +make[1]: Entering directory '/rootdir' +make[1]: Leaving directory '/rootdir' + Listing... 0% Listing... 0% Listing... 0% adduser/testing,now 3.137 all [installed,automatic] +advaita-icon-theme/unknown,now 3.25.0-1 all [installed,automatic] +apt/testing,now 2.9.26 amd64 [installed,automatic] +aptitude-common/testing,now 0.8.13-6.1 all [installed,automatic] +aptitude/testing,now 0.8.13-6.1 amd64 [installed] +at-spi2-common/testing,now 2.55.0.1-1 all [installed,automatic] +at-spi2-core/testing,now 2.55.0.1-1 amd64 [installed,automatic] +autoconf-archive/testing,now 20220903-3 all [installed] +autoconf/testing,now 2.72-3 all [installed,automatic] +automake/testing,now 1:1.17-3 all [installed,automatic] +autopoint/testing,now 0.23.1-1 all [installed] +autotools-dev/testing,now 20220109.1 all [installed,automatic] +base-files/testing,now 13.6 amd64 [installed,automatic] +base-passwd/testing,now 3.6.6 amd64 [installed,automatic] +bash/testing,now 5.2.37-1 amd64 [installed,automatic] +binfmt-support/testing,now 2.2.2-7 amd64 [installed,automatic] +binutils-common/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils-gold-x86-64-linux-gnu/testing,now 2.44-1 amd64 [installed,automatic] +binutils-gold/testing,now 2.44-1 amd64 [installed,automatic] +binutils-x86-64-linux-gnu/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +bsdutils/testing,now 1:2.40.4-2 amd64 [installed,automatic] +build-essential/testing,now 12.12 amd64 [installed,automatic] +bzip2-doc/testing,now 1.0.8-6 all [installed,automatic] +bzip2/testing,now 1.0.8-6 amd64 [installed,automatic] +ca-certificates/testing,now 20241223 all [installed,automatic] +clang-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools/testing,now 1:19.0-63 amd64 [installed] +clang/testing,now 1:19.0-63 amd64 [installed] +coreutils/testing,now 9.5-1+b1 amd64 [installed,automatic] +cpp-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-14/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cpp/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cppcheck/testing,now 2.16.0-1 amd64 [installed] +ctk-update-icon-cache/unknown,now 3.25.6-1 amd64 [installed,automatic] +dash/testing,now 0.5.12-12 amd64 [installed,automatic] +dbus-bin/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-daemon/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-session-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-system-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-user-session/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus/testing,now 1.16.0-1 amd64 [installed,automatic] +dconf-gsettings-backend/testing,now 0.40.0-5 amd64 [installed,automatic] +dconf-service/testing,now 0.40.0-5 amd64 [installed,automatic] +debconf/testing,now 1.5.89 all [installed,automatic] +debian-archive-keyring/testing,now 2023.4 all [installed,automatic] +debianutils/testing,now 5.21 amd64 [installed,automatic] +diffutils/testing,now 1:3.10-2 amd64 [installed,automatic] +dirmngr/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +dmsetup/testing,now 2:1.02.201-1 amd64 [installed,automatic] +dpkg-dev/testing,now 1.22.14 all [installed,automatic] +dpkg/testing,now 1.22.14 amd64 [installed,automatic] +e2fsprogs/testing,now 1.47.2-1 amd64 [installed,automatic] +expect/testing,now 5.45.4-3+b1 amd64 [installed] +fakeroot/testing,now 1.37-1 amd64 [installed,automatic] +file/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +findutils/testing,now 4.10.0-3 amd64 [installed,automatic] +fontconfig-config/testing,now 2.15.0-2 amd64 [installed,automatic] +fontconfig/testing,now 2.15.0-2 amd64 [installed,automatic] +fonts-dejavu-core/testing,now 2.37-8 all [installed,automatic] +fonts-dejavu-mono/testing,now 2.37-8 all [installed,automatic] +g++-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-14/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +g++/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc-14-base/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gettext-base/testing,now 0.23.1-1 amd64 [installed,automatic] +gettext/testing,now 0.23.1-1 amd64 [installed] +gir1.2-atk-1.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-atspi-2.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-ctk-3.0/unknown,now 3.25.6-1 amd64 [installed] +gir1.2-freedesktop-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-freedesktop/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-gdkpixbuf-2.0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +gir1.2-girepository-2.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-girepository-2.0/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-glib-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-glib-2.0/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-harfbuzz-0.0/testing,now 10.2.0-1 amd64 [installed,automatic] +gir1.2-pango-1.0/testing,now 1.56.1-1 amd64 [installed,automatic] +gir1.2-xkl-1.0/testing,now 5.4-5+b2 amd64 [installed,automatic] +girepository-tools/testing,now 2.82.4-2 amd64 [installed,automatic] +git-man/testing,now 1:2.47.2-0.1 all [installed,automatic] +git/testing,now 1:2.47.2-0.1 amd64 [installed] +gnupg-l10n/testing,now 2.2.46-1 all [installed,automatic] +gnupg-utils/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gnupg/testing,now 2.2.46-1 all [installed,automatic] +gobject-introspection-bin/testing,now 1.82.0-4 amd64 [installed,automatic] +gobject-introspection/testing,now 1.82.0-4 amd64 [installed] +gpg-agent/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg-wks-client/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgconf/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgsm/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgv/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +grep/testing,now 3.11-4 amd64 [installed,automatic] +gsettings-desktop-schemas/testing,now 47.1-1 all [installed,automatic] +gzip/testing,now 1.13-1 amd64 [installed,automatic] +hicolor-icon-theme/testing,now 0.18-2 all [installed,automatic] +hostname/testing,now 3.25 amd64 [installed,automatic] +icu-devtools/testing,now 72.1-6 amd64 [installed,automatic] +init-system-helpers/testing,now 1.68 all [installed,automatic] +krb5-locales/testing,now 1.21.3-4 all [installed,automatic] +less/testing,now 643-1 amd64 [installed,automatic] +lib32gcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +lib32stdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libacl1/testing,now 2.3.2-2+b1 amd64 [installed,automatic] +libalgorithm-diff-perl/testing,now 1.201-1 all [installed,automatic] +libalgorithm-diff-xs-perl/testing,now 0.04-8+b4 amd64 [installed,automatic] +libalgorithm-merge-perl/testing,now 0.08-5 all [installed,automatic] +libapparmor1/testing,now 3.1.7-1+b3 amd64 [installed,automatic] +libapt-pkg6.0t64/testing,now 2.9.26 amd64 [installed,automatic] +libasan8/testing,now 14.2.0-12 amd64 [installed,automatic] +libassuan9/testing,now 3.0.1-2 amd64 [installed,automatic] +libatk-bridge2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk-bridge2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatomic1/testing,now 14.2.0-12 amd64 [installed,automatic] +libatspi2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatspi2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libattr1/testing,now 1:2.5.2-2 amd64 [installed,automatic] +libaudit-common/testing,now 1:4.0.2-2 all [installed,automatic] +libaudit1/testing,now 1:4.0.2-2+b1 amd64 [installed,automatic] +libavahi-client3/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common-data/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common3/testing,now 0.8-16 amd64 [installed,automatic] +libbinutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libblkid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libblkid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libboost-iostreams1.83.0/testing,now 1.83.0-4 amd64 [installed,automatic] +libbrotli-dev/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbrotli1/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbsd0/testing,now 0.12.2-2 amd64 [installed,automatic] +libbz2-1.0/testing,now 1.0.8-6 amd64 [installed,automatic] +libbz2-dev/testing,now 1.0.8-6 amd64 [installed,automatic] +libc-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc-dev-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc6-dev/testing,now 2.40-6 amd64 [installed,automatic] +libc6-i386/testing,now 2.40-6 amd64 [installed,automatic] +libc6/testing,now 2.40-6 amd64 [installed,automatic] +libcairo-gobject2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo-script-interpreter2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2-dev/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcap-dev/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcap-ng0/testing,now 0.8.5-4 amd64 [installed,automatic] +libcap2/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcbor0.10/testing,now 0.10.2-2 amd64 [installed,automatic] +libcc1-0/testing,now 14.2.0-12 amd64 [installed,automatic] +libclang-common-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-cpp19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-rt-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang1-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libcolord2/testing,now 1.4.7-1+b2 amd64 [installed,automatic] +libcom-err2/testing,now 1.47.2-1 amd64 [installed,automatic] +libcrypt-dev/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcrypt1/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcryptsetup12/testing,now 2:2.7.5-1 amd64 [installed,automatic] +libctf-nobfd0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctf0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctk-3-0/unknown,now 3.25.6-1 amd64 [installed] +libctk-3-bin/unknown,now 3.25.6-1 amd64 [installed,automatic] +libctk-3-common/unknown,now 3.25.6-1 all [installed] +libctk-3-dev/unknown,now 3.25.6-1 amd64 [installed] +libcups2t64/testing,now 2.4.10-2+b1 amd64 [installed,automatic] +libcurl3t64-gnutls/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcurl4t64/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcwidget4/testing,now 0.5.18-6+b2 amd64 [installed,automatic] +libdatrie-dev/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdatrie1/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdav1d7/testing,now 1.5.1-1 amd64 [installed,automatic] +libdb5.3t64/testing,now 5.3.28+dfsg2-9 amd64 [installed,automatic] +libdbus-1-3/testing,now 1.16.0-1 amd64 [installed,automatic] +libdbus-1-dev/testing,now 1.16.0-1 amd64 [installed,automatic] +libdconf1/testing,now 0.40.0-5 amd64 [installed,automatic] +libdebconfclient0/testing,now 0.277 amd64 [installed,automatic] +libdeflate-dev/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdeflate0/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdevmapper1.02.1/testing,now 2:1.02.201-1 amd64 [installed,automatic] +libdpkg-perl/testing,now 1.22.14 all [installed,automatic] +libdrm-amdgpu1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-common/testing,now 2.4.123-1 all [installed,automatic] +libdrm-intel1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-radeon1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm2/testing,now 2.4.123-1 amd64 [installed,automatic] +libedit2/testing,now 3.1-20250104-1 amd64 [installed,automatic] +libegl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libegl-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1-mesa-dev/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libelf1t64/testing,now 0.192-4 amd64 [installed,automatic] +libepoxy-dev/testing,now 1.5.10-2 amd64 [installed,automatic] +libepoxy0/testing,now 1.5.10-2 amd64 [installed,automatic] +liberror-perl/testing,now 0.17029-2 all [installed,automatic] +libexpat1-dev/testing,now 2.6.4-1 amd64 [installed,automatic] +libexpat1/testing,now 2.6.4-1 amd64 [installed,automatic] +libext2fs2t64/testing,now 1.47.2-1 amd64 [installed,automatic] +libfakeroot/testing,now 1.37-1 amd64 [installed,automatic] +libffi-dev/testing,now 3.4.6-1 amd64 [installed,automatic] +libffi8/testing,now 3.4.6-1 amd64 [installed,automatic] +libfido2-1/testing,now 1.15.0-1+b1 amd64 [installed,automatic] +libfile-fcntllock-perl/testing,now 0.22-4+b4 amd64 [installed,automatic] +libfontconfig-dev/testing,now 2.15.0-2 amd64 [installed,automatic] +libfontconfig1/testing,now 2.15.0-2 amd64 [installed,automatic] +libfreetype-dev/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfreetype6/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfribidi-dev/testing,now 1.0.16-1 amd64 [installed,automatic] +libfribidi0/testing,now 1.0.16-1 amd64 [installed,automatic] +libgbm1/testing,now 24.2.8-1 amd64 [installed,automatic] +libgc1/testing,now 1:8.2.8-1 amd64 [installed,automatic] +libgcc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcrypt20/testing,now 1.11.0-7 amd64 [installed,automatic] +libgdbm-compat4t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdbm6t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-dev/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-bin/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-common/testing,now 2.42.12+dfsg-2 all [installed,automatic] +libgio-2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libgio-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository-1.0-1/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-1.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-2.0-0/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository1.0-dev/testing,now 1.82.0-4 amd64 [installed] +libgl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgl1-mesa-dri/testing,now 24.2.8-1 amd64 [installed,automatic] +libgl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglapi-mesa/testing,now 24.2.8-1 amd64 [installed,automatic] +libgles-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles2/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglib2.0-0t64/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-data/testing,now 2.82.4-2 all [installed,automatic] +libglib2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-dev/testing,now 2.82.4-2 amd64 [installed] +libglvnd-core-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libglx0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgmp10/testing,now 2:6.3.0+dfsg-3 amd64 [installed,automatic] +libgnutls30t64/testing,now 3.8.8-2 amd64 [installed,automatic] +libgomp1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgpg-error-l10n/testing,now 1.51-3 all [installed,automatic] +libgpg-error0/testing,now 1.51-3 amd64 [installed,automatic] +libgpm2/testing,now 1.20.7-11+b2 amd64 [installed,automatic] +libgprofng0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libgraphite2-3/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgraphite2-dev/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgssapi-krb5-2/testing,now 1.21.3-4 amd64 [installed,automatic] +libharfbuzz-cairo0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-dev/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-gobject0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-icu0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-subset0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz0b/testing,now 10.2.0-1 amd64 [installed,automatic] +libhogweed6t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libhwasan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libice-dev/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libice6/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libicu-dev/testing,now 72.1-6 amd64 [installed,automatic] +libicu72/testing,now 72.1-6 amd64 [installed,automatic] +libidn2-0/testing,now 2.3.7-2+b1 amd64 [installed,automatic] +libisl23/testing,now 0.27-1 amd64 [installed,automatic] +libitm1/testing,now 14.2.0-12 amd64 [installed,automatic] +libjansson4/testing,now 2.14-2+b3 amd64 [installed,automatic] +libjbig-dev/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjbig0/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjpeg-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjson-c5/testing,now 0.18+ds-1 amd64 [installed,automatic] +libk5crypto3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkeyutils1/testing,now 1.6.3-4 amd64 [installed,automatic] +libkmod2/testing,now 33+20240816-2 amd64 [installed,automatic] +libkrb5-3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkrb5support0/testing,now 1.21.3-4 amd64 [installed,automatic] +libksba8/testing,now 1.6.7-2+b1 amd64 [installed,automatic] +liblcms2-2/testing,now 2.16-2 amd64 [installed,automatic] +libldap-common/testing,now 2.6.9+dfsg-1 all [installed,automatic] +libldap2/testing,now 2.6.9+dfsg-1 amd64 [installed,automatic] +liblerc-dev/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +liblerc4/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +libllvm19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +liblocale-gettext-perl/testing,now 1.07-7+b1 amd64 [installed,automatic] +liblsan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libltdl-dev/testing,now 2.5.4-3 amd64 [installed,automatic] +libltdl7/testing,now 2.5.4-3 amd64 [installed,automatic] +liblz4-1/testing,now 1.10.0-3 amd64 [installed,automatic] +liblzma-dev/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzma5/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzo2-2/testing,now 2.10-3+b1 amd64 [installed,automatic] +libmagic-mgc/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmagic1t64/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmd0/testing,now 1.1.0-2+b1 amd64 [installed,automatic] +libmount-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libmount1/testing,now 2.40.4-2 amd64 [installed,automatic] +libmpc3/testing,now 1.3.1-1+b3 amd64 [installed,automatic] +libmpfr6/testing,now 4.2.1-1+b2 amd64 [installed,automatic] +libncurses-dev/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncurses6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncursesw6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libnettle8t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libnghttp2-14/testing,now 1.64.0-1 amd64 [installed,automatic] +libnghttp3-9/testing,now 1.6.0-2 amd64 [installed,automatic] +libngtcp2-16/testing,now 1.9.1-1 amd64 [installed,automatic] +libngtcp2-crypto-gnutls8/testing,now 1.9.1-1 amd64 [installed,automatic] +libnpth0t64/testing,now 1.8-2 amd64 [installed,automatic] +libnss-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libobjc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libobjc4/testing,now 14.2.0-12 amd64 [installed,automatic] +libopengl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libopengl0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libp11-kit0/testing,now 0.25.5-3 amd64 [installed,automatic] +libpam-modules-bin/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-modules/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-runtime/testing,now 1.7.0-2 all [installed,automatic] +libpam-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libpam0g/testing,now 1.7.0-2 amd64 [installed,automatic] +libpango-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpango1.0-dev/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangocairo-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoft2-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoxft-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpciaccess0/testing,now 0.17-3+b3 amd64 [installed,automatic] +libpcre2-16-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-32-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-8-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-dev/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-posix3/testing,now 10.44-5 amd64 [installed,automatic] +libperl5.40/testing,now 5.40.0-8 amd64 [installed,automatic] +libpfm4/testing,now 4.13.0+git83-g91970fe-1 amd64 [installed,automatic] +libpipeline1/testing,now 1.5.8-1 amd64 [installed,automatic] +libpixman-1-0/testing,now 0.44.0-3 amd64 [installed,automatic] +libpixman-1-dev/testing,now 0.44.0-3 amd64 [installed,automatic] +libpkgconf3/testing,now 1.8.1-4 amd64 [installed,automatic] +libpng-dev/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng-tools/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng16-16t64/testing,now 1.6.44-3 amd64 [installed,automatic] +libproc2-0/testing,now 2:4.0.4-7 amd64 [installed,automatic] +libpsl5t64/testing,now 0.21.2-1.1+b1 amd64 [installed,automatic] +libpython3-stdlib/testing,now 3.13.1-2 amd64 [installed,automatic] +libpython3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libpython3.13-stdlib/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libquadmath0/testing,now 14.2.0-12 amd64 [installed,automatic] +libreadline8t64/testing,now 8.2-6 amd64 [installed,automatic] +librsvg2-2/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librsvg2-common/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librtmp1/testing,now 2.4+20151223.gitfa8646d.1-2+b5 amd64 [installed,automatic] +libsasl2-2/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules-db/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libseccomp2/testing,now 2.5.5-2 amd64 [installed,automatic] +libselinux1-dev/testing,now 3.7-3.1 amd64 [installed,automatic] +libselinux1/testing,now 3.7-3.1 amd64 [installed,automatic] +libsemanage-common/testing,now 3.7-2.1 all [installed,automatic] +libsemanage2/testing,now 3.7-2.1 amd64 [installed,automatic] +libsensors-config/testing,now 1:3.6.0-10 all [installed,automatic] +libsensors5/testing,now 1:3.6.0-10+b1 amd64 [installed,automatic] +libsepol-dev/testing,now 3.7-1 amd64 [installed,automatic] +libsepol2/testing,now 3.7-1 amd64 [installed,automatic] +libsframe1/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libsharpyuv-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsharpyuv0/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsigc++-2.0-0v5/testing,now 2.12.1-3 amd64 [installed,automatic] +libsm-dev/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsm6/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsmartcols1/testing,now 2.40.4-2 amd64 [installed,automatic] +libsqlite3-0/testing,now 3.46.1-1 amd64 [installed,automatic] +libss2/testing,now 1.47.2-1 amd64 [installed,automatic] +libssh2-1t64/testing,now 1.11.1-1 amd64 [installed,automatic] +libssl3t64/testing,now 3.4.0-2 amd64 [installed,automatic] +libstdc++-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libstdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libsysprof-capture-4-dev/testing,now 47.2-1 amd64 [installed,automatic] +libsystemd-dev/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd-shared/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd0/testing,now 257.2-3 amd64 [installed,automatic] +libtasn1-6/testing,now 4.19.0-3+b3 amd64 [installed,automatic] +libtcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +libthai-data/testing,now 0.1.29-2 all [installed,automatic] +libthai-dev/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libthai0/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libtiff-dev/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiff6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiffxx6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtinfo6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libtinyxml2-10/testing,now 10.0.0+dfsg-2+b2 amd64 [installed,automatic] +libtool/testing,now 2.5.4-3 all [installed] +libtsan2/testing,now 14.2.0-12 amd64 [installed,automatic] +libubsan1/testing,now 14.2.0-12 amd64 [installed,automatic] +libudev1/testing,now 257.2-3 amd64 [installed,automatic] +libunistring5/testing,now 1.3-1 amd64 [installed,automatic] +libuuid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libvulkan1/testing,now 1.4.304.0-1 amd64 [installed,automatic] +libwayland-bin/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-client0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-cursor0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-dev/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-egl1/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-server0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwebp-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebp7/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdecoder3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdemux2/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpmux3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libx11-6/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-data/testing,now 2:1.8.10-2 all [installed,automatic] +libx11-dev/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-xcb1/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libxapian30/testing,now 1.4.25-2 amd64 [installed,automatic] +libxau-dev/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxau6/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxaw7/testing,now 2:1.0.16-1 amd64 [installed,automatic] +libxcb-dri2-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-dri3-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-glx0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-present0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-randr0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-sync1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-xfixes0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcomposite-dev/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcomposite1/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcursor-dev/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxcursor1/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxdamage-dev/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdamage1/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdmcp-dev/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxdmcp6/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxext-dev/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxext6/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxfixes-dev/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxfixes3/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxft-dev/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxft2/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxi-dev/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxi6/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxinerama-dev/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxinerama1/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxkbcommon-dev/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbcommon0/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbfile1/testing,now 1:1.1.0-1+b4 amd64 [installed,automatic] +libxklavier-dev/testing,now 5.4-5+b2 amd64 [installed] +libxklavier16/testing,now 5.4-5+b2 amd64 [installed,automatic] +libxml2-dev/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxml2-utils/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed] +libxml2/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxmu6/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxmuu1/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxpm4/testing,now 1:3.5.17-1+b3 amd64 [installed,automatic] +libxrandr-dev/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrandr2/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrender-dev/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxrender1/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxshmfence1/testing,now 1.3-1+b3 amd64 [installed,automatic] +libxt6t64/testing,now 1:1.2.1-1.2+b2 amd64 [installed,automatic] +libxtst-dev/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxtst6/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxxf86vm1/testing,now 1:1.1.4-1+b4 amd64 [installed,automatic] +libxxhash0/testing,now 0.8.2-2+b2 amd64 [installed,automatic] +libyaml-0-2/testing,now 0.2.5-2 amd64 [installed,automatic] +libz3-4/testing,now 4.13.3-1 amd64 [installed,automatic] +libz3-dev/testing,now 4.13.3-1 amd64 [installed,automatic] +libzstd-dev/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +libzstd1/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +linux-libc-dev/testing,now 6.12.11-1 all [installed,automatic] +linux-sysctl-defaults/testing,now 4.11 all [installed,automatic] +llvm-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-linker-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-runtime/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +login.defs/testing,now 1:4.16.0-7 all [installed,automatic] +login/testing,now 1:4.16.0-2+really2.40.4-2 amd64 [installed,automatic] +logsave/testing,now 1.47.2-1 amd64 [installed,automatic] +m4/testing,now 1.4.19-5 amd64 [installed,automatic] +make/testing,now 4.4.1-1 amd64 [installed] +manpages-dev/testing,now 6.9.1-1 all [installed,automatic] +manpages/testing,now 6.9.1-1 all [installed,automatic] +mawk/testing,now 1.3.4.20240905-1 amd64 [installed,automatic] +media-types/testing,now 10.1.0 all [installed,automatic] +mesa-libgallium/testing,now 24.2.8-1 amd64 [installed,automatic] +mesa-vulkan-drivers/testing,now 24.2.8-1 amd64 [installed,automatic] +mount/testing,now 2.40.4-2 amd64 [installed,automatic] +native-architecture/testing,now 0.2.5 all [installed,automatic] +ncurses-base/testing,now 6.5-2 all [installed,automatic] +ncurses-bin/testing,now 6.5-2+b1 amd64 [installed,automatic] +netbase/testing,now 6.4 all [installed,automatic] +openssh-client/testing,now 1:9.9p1-3 amd64 [installed,automatic] +openssl-provider-legacy/testing,now 3.4.0-2 amd64 [installed,automatic] +openssl/testing,now 3.4.0-2 amd64 [installed,automatic] +pango1.0-tools/testing,now 1.56.1-1 amd64 [installed,automatic] +passwd/testing,now 1:4.16.0-7 amd64 [installed,automatic] +patch/testing,now 2.7.6-7 amd64 [installed,automatic] +perl-base/testing,now 5.40.0-8 amd64 [installed,automatic] +perl-modules-5.40/testing,now 5.40.0-8 all [installed,automatic] +perl/testing,now 5.40.0-8 amd64 [installed,automatic] +pinentry-curses/testing,now 1.3.1-2 amd64 [installed,automatic] +pkgconf-bin/testing,now 1.8.1-4 amd64 [installed,automatic] +pkgconf/testing,now 1.8.1-4 amd64 [installed,automatic] +procps/testing,now 2:4.0.4-7 amd64 [installed,automatic] +psmisc/testing,now 23.7-1 amd64 [installed,automatic] +publicsuffix/testing,now 20250108.1153-0.1 all [installed,automatic] +python3-autocommand/testing,now 2.2.2-3 all [installed,automatic] +python3-inflect/testing,now 7.3.1-2 all [installed,automatic] +python3-jaraco.context/testing,now 6.0.0-1 all [installed,automatic] +python3-jaraco.functools/testing,now 4.1.0-1 all [installed,automatic] +python3-jaraco.text/testing,now 4.0.0-1 all [installed,automatic] +python3-mako/testing,now 1.3.8-2 all [installed,automatic] +python3-markdown/testing,now 3.7-2 all [installed,automatic] +python3-markupsafe/testing,now 2.1.5-1+b2 amd64 [installed,automatic] +python3-minimal/testing,now 3.13.1-2 amd64 [installed,automatic] +python3-more-itertools/testing,now 10.6.0-1 all [installed,automatic] +python3-packaging/testing,now 24.2-1 all [installed,automatic] +python3-pkg-resources/testing,now 75.6.0-1 all [installed,automatic] +python3-pygments/testing,now 2.18.0+dfsg-2 all [installed,automatic] +python3-setuptools/testing,now 75.6.0-1 all [installed,automatic] +python3-typeguard/testing,now 4.4.1-1 all [installed,automatic] +python3-typing-extensions/testing,now 4.12.2-2 all [installed,automatic] +python3-yaml/testing,now 6.0.2-1+b1 amd64 [installed,automatic] +python3-zipp/testing,now 3.21.0-1 all [installed,automatic] +python3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3.13/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3/testing,now 3.13.1-2 amd64 [installed,automatic] +readline-common/testing,now 8.2-6 all [installed,automatic] +rpcsvc-proto/testing,now 1.4.3-1 amd64 [installed,automatic] +sed/testing,now 4.9-2 amd64 [installed,automatic] +sensible-utils/testing,now 0.0.24 all [installed,automatic] +sgml-base/testing,now 1.31 all [installed,automatic] +shared-mime-info/testing,now 2.4-5+b2 amd64 [installed,automatic] +sqv/testing,now 1.2.1-5 amd64 [installed,automatic] +systemd-cryptsetup/testing,now 257.2-3 amd64 [installed,automatic] +systemd-sysv/testing,now 257.2-3 amd64 [installed,automatic] +systemd-timesyncd/testing,now 257.2-3 amd64 [installed,automatic] +systemd/testing,now 257.2-3 amd64 [installed,automatic] +sysvinit-utils/testing,now 3.13-1 amd64 [installed,automatic] +tar/testing,now 1.35+dfsg-3.1 amd64 [installed,automatic] +tcl-expect/testing,now 5.45.4-3+b1 amd64 [installed,automatic] +tcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +tzdata/testing,now 2024b-6 all [installed,automatic] +util-linux/testing,now 2.40.4-2 amd64 [installed,automatic] +uuid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +wayland-protocols/testing,now 1.39-1 all [installed,automatic] +wget/testing,now 1.24.5-2+b1 amd64 [installed] +x11-common/testing,now 1:7.7+24 all [installed,automatic] +x11-xkb-utils/testing,now 7.7+9 amd64 [installed,automatic] +x11proto-dev/testing,now 2024.1-1 all [installed,automatic] +xauth/testing,now 1:1.1.2-1.1 amd64 [installed,automatic] +xdg-user-dirs/testing,now 0.18-2 amd64 [installed,automatic] +xkb-data/testing,now 2.42-1 all [installed,automatic] +xml-core/testing,now 0.19 all [installed,automatic] +xorg-sgml-doctools/testing,now 1:1.11-1.1 all [installed,automatic] +xtrans-dev/testing,now 1.4.0-1 all [installed,automatic] +xz-utils/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +zlib1g-dev/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +zlib1g/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +Errors detected in the build 0 +Warnings detected in the logs 96 +cppcheck defects detected in the logs 28 +TOTAL warnings detected in the logs 124 diff --git a/2025-02-06-153413-14522-1@1eab72938451_devel/report-37cb39.html b/2025-02-06-153413-14522-1@1eab72938451_devel/report-37cb39.html new file mode 100644 index 0000000..a009b20 --- /dev/null +++ b/2025-02-06-153413-14522-1@1eab72938451_devel/report-37cb39.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 248, column 21
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-153413-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"2.0.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
This statement is never executed
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-153413-14522-1@1eab72938451_devel/report-523ef4.html b/2025-02-06-153413-14522-1@1eab72938451_devel/report-523ef4.html new file mode 100644 index 0000000..e5f0877 --- /dev/null +++ b/2025-02-06-153413-14522-1@1eab72938451_devel/report-523ef4.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 199, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-153413-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"2.0.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
This statement is never executed
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-153413-14522-1@1eab72938451_devel/report-5ce420.html b/2025-02-06-153413-14522-1@1eab72938451_devel/report-5ce420.html new file mode 100644 index 0000000..a12b423 --- /dev/null +++ b/2025-02-06-153413-14522-1@1eab72938451_devel/report-5ce420.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 194, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-153413-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"2.0.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
This statement is never executed
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-153413-14522-1@1eab72938451_devel/report-5d4bc8.html b/2025-02-06-153413-14522-1@1eab72938451_devel/report-5d4bc8.html new file mode 100644 index 0000000..d65d853 --- /dev/null +++ b/2025-02-06-153413-14522-1@1eab72938451_devel/report-5d4bc8.html @@ -0,0 +1,1609 @@ + + + +/rootdir/libcafekbd/tmp-introspect4wvde_v4/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspect4wvde_v4/Cafekbd-1.0.c
Warning:line 89, column 13
File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/pango-1.0 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/ctk-3.0 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/libxml2 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-153413-14522-1 -x c /rootdir/libcafekbd/tmp-introspect4wvde_v4/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
14
Loop condition is true. Entering loop body
28
Loop condition is true. Entering loop body
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
15
Assuming this stream operation fails
29
File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior
90 if (ret
15.1
'ret' is equal to 0
== 0)
16
Taking true branch
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out
16.1
'len_out' is not equal to NULL
!= NULL((void*)0))
17
Taking true branch
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
6
Assuming 'args' is not equal to NULL
7
Taking false branch
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
8
Assuming 'self' is non-null
9
Taking false branch
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input
9.1
'input' is not equal to NULL
== NULL((void*)0))
10
Taking false branch
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output
10.1
'output' is not equal to NULL
== NULL((void*)0))
11
Taking false branch
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
12
Loop condition is true. Entering loop body
26
Loop condition is true. Entering loop body
702 {
703 gsize len;
704 char *line = read_line (input, &len);
13
Calling 'read_line'
18
Returning from 'read_line'
27
Calling 'read_line'
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
19
Assuming 'line' is not equal to NULL
20
Assuming the condition is false
21
Taking false branch
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
22
Assuming the condition is false
23
Taking false branch
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
24
Assuming the condition is false
25
Taking false branch
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
742
743 if (quark == 0)
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
1
Assuming 'argc' is equal to 2
2
'?' condition is false
3
Assuming the condition is false
4
Taking false branch
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
5
Calling 'dump_irepository'
811 {
812 g_printerr ("%s\n", error->message);
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-153413-14522-1@1eab72938451_devel/report-891289.html b/2025-02-06-153413-14522-1@1eab72938451_devel/report-891289.html new file mode 100644 index 0000000..606df17 --- /dev/null +++ b/2025-02-06-153413-14522-1@1eab72938451_devel/report-891289.html @@ -0,0 +1,1603 @@ + + + +/rootdir/libcafekbd/tmp-introspect4wvde_v4/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspect4wvde_v4/Cafekbd-1.0.c
Warning:line 812, column 27
Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error')
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/pango-1.0 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/ctk-3.0 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/libxml2 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-153413-14522-1 -x c /rootdir/libcafekbd/tmp-introspect4wvde_v4/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
90 if (ret == 0)
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out != NULL((void*)0))
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
21
Assuming the condition is false
22
Taking false branch
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
23
Returning without writing to '*error'
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
7
Assuming 'args' is not equal to NULL
8
Taking false branch
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
9
Assuming 'self' is non-null
10
Taking false branch
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input
10.1
'input' is not equal to NULL
== NULL((void*)0))
11
Taking false branch
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output
11.1
'output' is not equal to NULL
== NULL((void*)0))
12
Taking false branch
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
13
Loop condition is true. Entering loop body
702 {
703 gsize len;
704 char *line = read_line (input, &len);
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
14
Assuming 'line' is not equal to NULL
15
Assuming the condition is false
16
Taking false branch
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
17
Assuming the condition is false
18
Taking false branch
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
19
Taking true branch
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
20
Calling 'invoke_error_quark'
24
Returning from 'invoke_error_quark'
742
743 if (quark == 0)
25
Assuming 'quark' is equal to 0
26
Taking true branch
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
27
Returning without writing to '*error'
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
1
'error' initialized to a null pointer value
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
2
Assuming 'argc' is equal to 2
3
'?' condition is false
4
Assuming the condition is false
5
Taking false branch
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
6
Calling 'dump_irepository'
28
Returning from 'dump_irepository'
29
Taking true branch
811 {
812 g_printerr ("%s\n", error->message);
30
Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error')
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-153413-14522-1@1eab72938451_devel/report-9361af.html b/2025-02-06-153413-14522-1@1eab72938451_devel/report-9361af.html new file mode 100644 index 0000000..6fa67e5 --- /dev/null +++ b/2025-02-06-153413-14522-1@1eab72938451_devel/report-9361af.html @@ -0,0 +1,1609 @@ + + + +/rootdir/libcafekbd/tmp-introspect4wvde_v4/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspect4wvde_v4/Cafekbd-1.0.c
Warning:line 89, column 13
Read function called when stream is in EOF state. Function has no effect
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/pango-1.0 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/ctk-3.0 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/libxml2 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-153413-14522-1 -x c /rootdir/libcafekbd/tmp-introspect4wvde_v4/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
14
Loop condition is true. Entering loop body
28
Loop condition is true. Entering loop body
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
15
Assuming stream reaches end-of-file here
29
Read function called when stream is in EOF state. Function has no effect
90 if (ret
15.1
'ret' is equal to 0
== 0)
16
Taking true branch
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out
16.1
'len_out' is not equal to NULL
!= NULL((void*)0))
17
Taking true branch
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
6
Assuming 'args' is not equal to NULL
7
Taking false branch
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
8
Assuming 'self' is non-null
9
Taking false branch
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input
9.1
'input' is not equal to NULL
== NULL((void*)0))
10
Taking false branch
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output
10.1
'output' is not equal to NULL
== NULL((void*)0))
11
Taking false branch
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
12
Loop condition is true. Entering loop body
26
Loop condition is true. Entering loop body
702 {
703 gsize len;
704 char *line = read_line (input, &len);
13
Calling 'read_line'
18
Returning from 'read_line'
27
Calling 'read_line'
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
19
Assuming 'line' is not equal to NULL
20
Assuming the condition is false
21
Taking false branch
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
22
Assuming the condition is false
23
Taking false branch
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
24
Assuming the condition is false
25
Taking false branch
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
742
743 if (quark == 0)
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
1
Assuming 'argc' is equal to 2
2
'?' condition is false
3
Assuming the condition is false
4
Taking false branch
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
5
Calling 'dump_irepository'
811 {
812 g_printerr ("%s\n", error->message);
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-153413-14522-1@1eab72938451_devel/report-b4532a.html b/2025-02-06-153413-14522-1@1eab72938451_devel/report-b4532a.html new file mode 100644 index 0000000..f4d5975 --- /dev/null +++ b/2025-02-06-153413-14522-1@1eab72938451_devel/report-b4532a.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 228, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-153413-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"2.0.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
This statement is never executed
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-153413-14522-1@1eab72938451_devel/report-c098bd.html b/2025-02-06-153413-14522-1@1eab72938451_devel/report-c098bd.html new file mode 100644 index 0000000..58ed958 --- /dev/null +++ b/2025-02-06-153413-14522-1@1eab72938451_devel/report-c098bd.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 187, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-153413-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"2.0.0");
This statement is never executed
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-153413-14522-1@1eab72938451_devel/report-e0f2de.html b/2025-02-06-153413-14522-1@1eab72938451_devel/report-e0f2de.html new file mode 100644 index 0000000..4777a7d --- /dev/null +++ b/2025-02-06-153413-14522-1@1eab72938451_devel/report-e0f2de.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 225, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-153413-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"2.0.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
This statement is never executed
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-153413-14522-1@1eab72938451_devel/report-fb6164.html b/2025-02-06-153413-14522-1@1eab72938451_devel/report-fb6164.html new file mode 100644 index 0000000..7838d30 --- /dev/null +++ b/2025-02-06-153413-14522-1@1eab72938451_devel/report-fb6164.html @@ -0,0 +1,1504 @@ + + + +/rootdir/libcafekbd/tmp-introspect4wvde_v4/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspect4wvde_v4/Cafekbd-1.0.c
Warning:line 239, column 11
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/pango-1.0 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/ctk-3.0 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/libxml2 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-153413-14522-1 -x c /rootdir/libcafekbd/tmp-introspect4wvde_v4/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
90 if (ret == 0)
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out != NULL((void*)0))
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
This statement is never executed
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input == NULL((void*)0))
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output == NULL((void*)0))
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
702 {
703 gsize len;
704 char *line = read_line (input, &len);
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
742
743 if (quark == 0)
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
811 {
812 g_printerr ("%s\n", error->message);
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-153413-14522-1@1eab72938451_devel/report-ff92e7.html b/2025-02-06-153413-14522-1@1eab72938451_devel/report-ff92e7.html new file mode 100644 index 0000000..61c2c55 --- /dev/null +++ b/2025-02-06-153413-14522-1@1eab72938451_devel/report-ff92e7.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 256, column 21
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-153413-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"2.0.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
This statement is never executed
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-153413-14522-1@1eab72938451_devel/scanview.css b/2025-02-06-153413-14522-1@1eab72938451_devel/scanview.css new file mode 100644 index 0000000..cf8a5a6 --- /dev/null +++ b/2025-02-06-153413-14522-1@1eab72938451_devel/scanview.css @@ -0,0 +1,62 @@ +body { color:#000000; background-color:#ffffff } +body { font-family: Helvetica, sans-serif; font-size:9pt } +h1 { font-size: 14pt; } +h2 { font-size: 12pt; } +table { font-size:9pt } +table { border-spacing: 0px; border: 1px solid black } +th, table thead { + background-color:#eee; color:#666666; + font-weight: bold; cursor: default; + text-align:center; + font-weight: bold; font-family: Verdana; + white-space:nowrap; +} +.W { font-size:0px } +th, td { padding:5px; padding-left:8px; text-align:left } +td.SUMM_DESC { padding-left:12px } +td.DESC { white-space:pre } +td.Q { text-align:right } +td { text-align:left } +tbody.scrollContent { overflow:auto } + +table.form_group { + background-color: #ccc; + border: 1px solid #333; + padding: 2px; +} + +table.form_inner_group { + background-color: #ccc; + border: 1px solid #333; + padding: 0px; +} + +table.form { + background-color: #999; + border: 1px solid #333; + padding: 2px; +} + +td.form_label { + text-align: right; + vertical-align: top; +} +/* For one line entires */ +td.form_clabel { + text-align: right; + vertical-align: center; +} +td.form_value { + text-align: left; + vertical-align: top; +} +td.form_submit { + text-align: right; + vertical-align: top; +} + +h1.SubmitFail { + color: #f00; +} +h1.SubmitOk { +} diff --git a/2025-02-06-153413-14522-1@1eab72938451_devel/sorttable.js b/2025-02-06-153413-14522-1@1eab72938451_devel/sorttable.js new file mode 100644 index 0000000..e608daa --- /dev/null +++ b/2025-02-06-153413-14522-1@1eab72938451_devel/sorttable.js @@ -0,0 +1,512 @@ +/* + SortTable + version 2 + 7th April 2007 + Stuart Langridge, http://www.kryogenix.org/code/browser/sorttable/ + + Instructions: + Download this file + Add to your HTML + Add class="sortable" to any table you'd like to make sortable + Click on the headers to sort + + Thanks to many, many people for contributions and suggestions. + Licenced as X11: http://www.kryogenix.org/code/browser/licence.html + This basically means: do what you want with it. +*/ + + +var stIsIE = /*@cc_on!@*/false; + +sorttable = { + init: function() { + // quit if this function has already been called + if (arguments.callee.done) return; + // flag this function so we don't do the same thing twice + arguments.callee.done = true; + // kill the timer + if (_timer) clearInterval(_timer); + + if (!document.createElement || !document.getElementsByTagName) return; + + sorttable.DATE_RE = /^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/; + + forEach(document.getElementsByTagName('table'), function(table) { + if (table.className.search(/\bsortable\b/) != -1) { + sorttable.makeSortable(table); + } + }); + + }, + + makeSortable: function(table) { + if (table.getElementsByTagName('thead').length == 0) { + // table doesn't have a tHead. Since it should have, create one and + // put the first table row in it. + the = document.createElement('thead'); + the.appendChild(table.rows[0]); + table.insertBefore(the,table.firstChild); + } + // Safari doesn't support table.tHead, sigh + if (table.tHead == null) table.tHead = table.getElementsByTagName('thead')[0]; + + if (table.tHead.rows.length != 1) return; // can't cope with two header rows + + // Sorttable v1 put rows with a class of "sortbottom" at the bottom (as + // "total" rows, for example). This is B&R, since what you're supposed + // to do is put them in a tfoot. So, if there are sortbottom rows, + // for backward compatibility, move them to tfoot (creating it if needed). + sortbottomrows = []; + for (var i=0; i5' : ' ▴'; + this.appendChild(sortrevind); + return; + } + if (this.className.search(/\bsorttable_sorted_reverse\b/) != -1) { + // if we're already sorted by this column in reverse, just + // re-reverse the table, which is quicker + sorttable.reverse(this.sorttable_tbody); + this.className = this.className.replace('sorttable_sorted_reverse', + 'sorttable_sorted'); + this.removeChild(document.getElementById('sorttable_sortrevind')); + sortfwdind = document.createElement('span'); + sortfwdind.id = "sorttable_sortfwdind"; + sortfwdind.innerHTML = stIsIE ? ' 6' : ' ▾'; + this.appendChild(sortfwdind); + return; + } + + // remove sorttable_sorted classes + theadrow = this.parentNode; + forEach(theadrow.childNodes, function(cell) { + if (cell.nodeType == 1) { // an element + cell.className = cell.className.replace('sorttable_sorted_reverse',''); + cell.className = cell.className.replace('sorttable_sorted',''); + } + }); + sortfwdind = document.getElementById('sorttable_sortfwdind'); + if (sortfwdind) { sortfwdind.parentNode.removeChild(sortfwdind); } + sortrevind = document.getElementById('sorttable_sortrevind'); + if (sortrevind) { sortrevind.parentNode.removeChild(sortrevind); } + + this.className += ' sorttable_sorted'; + sortfwdind = document.createElement('span'); + sortfwdind.id = "sorttable_sortfwdind"; + sortfwdind.innerHTML = stIsIE ? ' 6' : ' ▾'; + this.appendChild(sortfwdind); + + // build an array to sort. This is a Schwartzian transform thing, + // i.e., we "decorate" each row with the actual sort key, + // sort based on the sort keys, and then put the rows back in order + // which is a lot faster because you only do getInnerText once per row + row_array = []; + col = this.sorttable_columnindex; + rows = this.sorttable_tbody.rows; + for (var j=0; j 12) { + // definitely dd/mm + return sorttable.sort_ddmm; + } else if (second > 12) { + return sorttable.sort_mmdd; + } else { + // looks like a date, but we can't tell which, so assume + // that it's dd/mm (English imperialism!) and keep looking + sortfn = sorttable.sort_ddmm; + } + } + } + } + return sortfn; + }, + + getInnerText: function(node) { + // gets the text we want to use for sorting for a cell. + // strips leading and trailing whitespace. + // this is *not* a generic getInnerText function; it's special to sorttable. + // for example, you can override the cell text with a customkey attribute. + // it also gets .value for fields. + + hasInputs = (typeof node.getElementsByTagName == 'function') && + node.getElementsByTagName('input').length; + + if (node.getAttribute("sorttable_customkey") != null) { + return node.getAttribute("sorttable_customkey"); + } + else if (typeof node.textContent != 'undefined' && !hasInputs) { + return node.textContent.replace(/^\s+|\s+$/g, ''); + } + else if (typeof node.innerText != 'undefined' && !hasInputs) { + return node.innerText.replace(/^\s+|\s+$/g, ''); + } + else if (typeof node.text != 'undefined' && !hasInputs) { + return node.text.replace(/^\s+|\s+$/g, ''); + } + else { + switch (node.nodeType) { + case 3: + if (node.nodeName.toLowerCase() == 'input') { + return node.value.replace(/^\s+|\s+$/g, ''); + } + case 4: + return node.nodeValue.replace(/^\s+|\s+$/g, ''); + break; + case 1: + case 11: + var innerText = ''; + for (var i = 0; i < node.childNodes.length; i++) { + innerText += sorttable.getInnerText(node.childNodes[i]); + } + return innerText.replace(/^\s+|\s+$/g, ''); + break; + default: + return ''; + } + } + }, + + reverse: function(tbody) { + // reverse the rows in a tbody + newrows = []; + for (var i=0; i=0; i--) { + tbody.appendChild(newrows[i]); + } + delete newrows; + }, + + /* sort functions + each sort function takes two parameters, a and b + you are comparing a[0] and b[0] */ + sort_numeric: function(a,b) { + aa = parseFloat(a[0].replace(/[^0-9.-]/g,'')); + if (isNaN(aa)) aa = 0; + bb = parseFloat(b[0].replace(/[^0-9.-]/g,'')); + if (isNaN(bb)) bb = 0; + return aa-bb; + }, + sort_alpha: function(a,b) { + if (a[0]==b[0]) return 0; + if (a[0] 0 ) { + var q = list[i]; list[i] = list[i+1]; list[i+1] = q; + swap = true; + } + } // for + t--; + + if (!swap) break; + + for(var i = t; i > b; --i) { + if ( comp_func(list[i], list[i-1]) < 0 ) { + var q = list[i]; list[i] = list[i-1]; list[i-1] = q; + swap = true; + } + } // for + b++; + + } // while(swap) + } +} + +/* ****************************************************************** + Supporting functions: bundled here to avoid depending on a library + ****************************************************************** */ + +// Dean Edwards/Matthias Miller/John Resig + +/* for Mozilla/Opera9 */ +if (document.addEventListener) { + document.addEventListener("DOMContentLoaded", sorttable.init, false); +} + +/* for Internet Explorer */ +/*@cc_on @*/ +/*@if (@_win32) + document.write(" + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <X11/keysym.h>
+
+#include <glib/gi18n-lib.h>
+#include <gio/gio.h>
+#include <cafekbd-desktop-config.h>
+#include <cafekbd-config-private.h>
+
+/**
+ * CafekbdDesktopConfig:
+ */
+#define CAFEKBD_DESKTOP_CONFIG_SCHEMA  CAFEKBD_CONFIG_SCHEMA ".general"
+
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP[] = "default-group";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW[] = "group-per-window";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS[] = "handle-indicators";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES[] = "layout-names-as-group-names";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_LOAD_EXTRA_ITEMS[] = "load-extra-items";
+
+/*
+ * static common functions
+ */
+
+static gboolean
+    cafekbd_desktop_config_get_lv_descriptions
+    (CafekbdDesktopConfig * config,
+     XklConfigRegistry * registry,
+     const gchar ** layout_ids,
+     const gchar ** variant_ids,
+     gchar *** short_layout_descriptions,
+     gchar *** long_layout_descriptions,
+     gchar *** short_variant_descriptions,
+     gchar *** long_variant_descriptions) {
+	const gchar **pl, **pv;
+	guint total_layouts;
+	gchar **sld, **lld, **svd, **lvd;
+	XklConfigItem *item = xkl_config_item_new ();
+
+	if (!
+	    (xkl_engine_get_features (config->engine) &
+	     XKLF_MULTIPLE_LAYOUTS_SUPPORTED))
+		return FALSE;
+
+	pl = layout_ids;
+	pv = variant_ids;
+	total_layouts = g_strv_length ((char **) layout_ids);
+	sld = *short_layout_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+	lld = *long_layout_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+	svd = *short_variant_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+	lvd = *long_variant_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+
+	while (pl != NULL && *pl != NULL) {
+
+		xkl_debug (100, "ids: [%s][%s]\n", *pl,
+			   pv == NULL ? NULL : *pv);
+
+		g_snprintf (item->name, sizeof item->name, "%s", *pl);
+		if (xkl_config_registry_find_layout (registry, item)) {
+			*sld = g_strdup (item->short_description);
+			*lld = g_strdup (item->description);
+		} else {
+			*sld = g_strdup ("");
+			*lld = g_strdup ("");
+		}
+
+		if (pv != NULL && *pv != NULL) {
+			g_snprintf (item->name, sizeof item->name, "%s",
+				    *pv);
+			if (xkl_config_registry_find_variant
+			    (registry, *pl, item)) {
+				*svd = g_strdup (item->short_description);
+				*lvd = g_strdup (item->description);
+			} else {
+				*svd = g_strdup ("");
+				*lvd = g_strdup ("");
+			}
+		} else {
+			*svd = g_strdup ("");
+			*lvd = g_strdup ("");
+		}
+
+		xkl_debug (100, "description: [%s][%s][%s][%s]\n",
+			   *sld, *lld, *svd, *lvd);
+		sld++;
+		lld++;
+		svd++;
+		lvd++;
+
+		pl++;
+
+		if (pv != NULL && *pv != NULL)
+			pv++;
+	}
+
+	g_object_unref (item);
+	return TRUE;
+}
+
+/*
+ * extern CafekbdDesktopConfig config functions
+ */
+void
+cafekbd_desktop_config_init (CafekbdDesktopConfig * config,
+			  XklEngine * engine)
+{
+	memset (config, 0, sizeof (*config));
+	config->settings = g_settings_new (CAFEKBD_DESKTOP_CONFIG_SCHEMA);
+	config->engine = engine;
+}
+
+void
+cafekbd_desktop_config_term (CafekbdDesktopConfig * config)
+{
+	g_object_unref (config->settings);
+	config->settings = NULL;
+}
+
+void
+cafekbd_desktop_config_load_from_gsettings (CafekbdDesktopConfig * config)
+{
+	config->group_per_app =
+	    g_settings_get_boolean (config->settings,
+				 CAFEKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW);
+	xkl_debug (150, "group_per_app: %d\n", config->group_per_app);
+
+	config->handle_indicators =
+	    g_settings_get_boolean (config->settings,
+				 CAFEKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS);
+	xkl_debug (150, "handle_indicators: %d\n",
+		   config->handle_indicators);
+
+	config->layout_names_as_group_names =
+	    g_settings_get_boolean (config->settings,
+				   CAFEKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES);
+	xkl_debug (150, "layout_names_as_group_names: %d\n",
+		   config->layout_names_as_group_names);
+
+	config->load_extra_items =
+	    g_settings_get_boolean (config->settings,
+				   CAFEKBD_DESKTOP_CONFIG_KEY_LOAD_EXTRA_ITEMS);
+	xkl_debug (150, "load_extra_items: %d\n",
+		   config->load_extra_items);
+
+	config->default_group =
+	    g_settings_get_int (config->settings,
+				  CAFEKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP);
+
+	if (config->default_group < -1
+	    || config->default_group >=
+	    xkl_engine_get_max_num_groups (config->engine))
+		config->default_group = -1;
+	xkl_debug (150, "default_group: %d\n", config->default_group);
+}
+
+void
+cafekbd_desktop_config_save_to_gsettings (CafekbdDesktopConfig * config)
+{
+	g_settings_delay (config->settings);
+
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW,
+			     config->group_per_app);
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS,
+			     config->handle_indicators);
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES,
+			     config->layout_names_as_group_names);
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_LOAD_EXTRA_ITEMS,
+			     config->load_extra_items);
+	g_settings_set_int (config->settings,
+			    CAFEKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP,
+			    config->default_group);
+
+	g_settings_apply (config->settings);
+}
+
+gboolean
+cafekbd_desktop_config_activate (CafekbdDesktopConfig * config)
+{
+	gboolean rv = TRUE;
+
+	xkl_engine_set_group_per_toplevel_window (config->engine,
+						  config->group_per_app);
+	xkl_engine_set_indicators_handling (config->engine,
+					    config->handle_indicators);
+	xkl_engine_set_default_group (config->engine,
+				      config->default_group);
+
+	return rv;
+}
+
+void
+cafekbd_desktop_config_lock_next_group (CafekbdDesktopConfig * config)
+{
+	int group = xkl_engine_get_next_group (config->engine);
+	xkl_engine_lock_group (config->engine, group);
+}
+
+void
+cafekbd_desktop_config_lock_prev_group (CafekbdDesktopConfig * config)
+{
+	int group = xkl_engine_get_prev_group (config->engine);
+	xkl_engine_lock_group (config->engine, group);
+}
+
+void
+cafekbd_desktop_config_restore_group (CafekbdDesktopConfig * config)
+{
+	int group = xkl_engine_get_current_window_group (config->engine);
+	xkl_engine_lock_group (config->engine, group);
+}
+
+/**
+ * cafekbd_desktop_config_start_listen:
+ * @func: (scope notified): a function to call when settings are changed
+ */
+void
+cafekbd_desktop_config_start_listen (CafekbdDesktopConfig * config,
+				  GCallback func,
+				  gpointer user_data)
+{
+	config->config_listener_id =
+	    g_signal_connect (config->settings, "changed", func,
+			      user_data);
+}
+
+void
+cafekbd_desktop_config_stop_listen (CafekbdDesktopConfig * config)
+{
+	g_signal_handler_disconnect (config->settings,
+				    config->config_listener_id);
+	config->config_listener_id = 0;
+}
+
+gboolean
+cafekbd_desktop_config_load_group_descriptions (CafekbdDesktopConfig
+					     * config,
+					     XklConfigRegistry *
+					     registry,
+					     const gchar **
+					     layout_ids,
+					     const gchar **
+					     variant_ids,
+					     gchar ***
+					     short_group_names,
+					     gchar *** full_group_names)
+{
+	gchar **sld, **lld, **svd, **lvd;
+	gchar **psld, **plld, **plvd;
+	gchar **psgn, **pfgn, **psvd;
+	gint total_descriptions;
+
+	if (!cafekbd_desktop_config_get_lv_descriptions
+	    (config, registry, layout_ids, variant_ids, &sld, &lld, &svd,
+	     &lvd)) {
+		return False;
+	}
+
+	total_descriptions = g_strv_length (sld);
+
+	*short_group_names = psgn =
+	    g_new0 (gchar *, total_descriptions + 1);
+	*full_group_names = pfgn =
+	    g_new0 (gchar *, total_descriptions + 1);
+
+	plld = lld;
+	psld = sld;
+	plvd = lvd;
+	psvd = svd;
+	while (plld != NULL && *plld != NULL) {
+		gchar *sd = (*psvd[0] == '\0') ? *psld : *psvd;
+		psld++, psvd++;
+		*psgn++ = g_strdup (sd);
+		*pfgn++ = g_strdup (cafekbd_keyboard_config_format_full_layout
+				    (*plld++, *plvd++));
+	}
+	g_strfreev (sld);
+	g_strfreev (lld);
+	g_strfreev (svd);
+	g_strfreev (lvd);
+
+	return True;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-153544-5624-cppcheck@1eab72938451_devel/1.html b/2025-02-06-153544-5624-cppcheck@1eab72938451_devel/1.html new file mode 100644 index 0000000..43abc15 --- /dev/null +++ b/2025-02-06-153544-5624-cppcheck@1eab72938451_devel/1.html @@ -0,0 +1,914 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <X11/keysym.h>
+
+#include <pango/pango.h>
+
+#include <glib/gi18n-lib.h>
+#include <cdk/cdkx.h>
+
+#include <cafekbd-keyboard-config.h>
+#include <cafekbd-indicator-config.h>
+
+#include <cafekbd-config-private.h>
+
+/**
+ * CafekbdIndicatorConfig:
+ */
+#define CAFEKBD_INDICATOR_CONFIG_SCHEMA  CAFEKBD_CONFIG_SCHEMA ".indicator"
+
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS[] = "show-flags";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_SECONDARIES[] = "secondary";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_FONT_FAMILY[] = "font-family";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_FOREGROUND_COLOR[] = "foreground-color";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_BACKGROUND_COLOR[] = "background-color";
+
+/*
+ * static applet config functions
+ */
+static void
+cafekbd_indicator_config_load_font (CafekbdIndicatorConfig * ind_config)
+{
+	ind_config->font_family =
+	    g_settings_get_string (ind_config->settings,
+				   CAFEKBD_INDICATOR_CONFIG_KEY_FONT_FAMILY);
+
+	if (ind_config->font_family == NULL ||
+	    ind_config->font_family[0] == '\0') {
+		PangoFontDescription *fd = NULL;
+		CtkWidgetPath *widget_path = ctk_widget_path_new ();
+		CtkStyleContext *context = ctk_style_context_new ();
+
+		ctk_widget_path_append_type (widget_path, CTK_TYPE_WINDOW);
+		ctk_widget_path_iter_set_name (widget_path, -1 , "PanelWidget");
+
+		ctk_style_context_set_path (context, widget_path);
+		ctk_style_context_set_screen (context, cdk_screen_get_default ());
+		ctk_style_context_set_state (context, CTK_STATE_FLAG_NORMAL);
+		ctk_style_context_add_class (context, CTK_STYLE_CLASS_DEFAULT);
+		ctk_style_context_add_class (context, "gnome-panel-menu-bar");
+		ctk_style_context_add_class (context, "cafe-panel-menu-bar");
+
+		ctk_style_context_get (context, CTK_STATE_FLAG_NORMAL,
+		                       CTK_STYLE_PROPERTY_FONT, &fd, NULL);
+
+		if (fd != NULL) {
+			ind_config->font_family =
+			    g_strdup (pango_font_description_to_string(fd));
+		}
+
+		g_object_unref (G_OBJECT (context));
+		ctk_widget_path_unref (widget_path);
+	}
+	xkl_debug (150, "font: [%s]\n", ind_config->font_family);
+
+}
+
+static void
+cafekbd_indicator_config_load_colors (CafekbdIndicatorConfig * ind_config)
+{
+	ind_config->foreground_color =
+	    g_settings_get_string (ind_config->settings,
+	                           CAFEKBD_INDICATOR_CONFIG_KEY_FOREGROUND_COLOR);
+
+	if (ind_config->foreground_color == NULL ||
+	    ind_config->foreground_color[0] == '\0') {
+		CtkWidgetPath *widget_path = ctk_widget_path_new ();
+		CtkStyleContext *context = ctk_style_context_new ();
+		CdkRGBA fg_color;
+
+		ctk_widget_path_append_type (widget_path, CTK_TYPE_WINDOW);
+		ctk_widget_path_iter_set_name (widget_path, -1 , "PanelWidget");
+
+		ctk_style_context_set_path (context, widget_path);
+		ctk_style_context_set_screen (context, cdk_screen_get_default ());
+		ctk_style_context_set_state (context, CTK_STATE_FLAG_NORMAL);
+		ctk_style_context_add_class (context, CTK_STYLE_CLASS_DEFAULT);
+		ctk_style_context_add_class (context, "gnome-panel-menu-bar");
+		ctk_style_context_add_class (context, "cafe-panel-menu-bar");
+
+		ctk_style_context_get_color (context,
+		                             CTK_STATE_FLAG_NORMAL, &fg_color);
+		ind_config->foreground_color =
+		    g_strdup_printf ("%g %g %g",
+		                     fg_color.red,
+		                     fg_color.green,
+		                     fg_color.blue);
+
+		g_object_unref (G_OBJECT (context));
+		ctk_widget_path_unref (widget_path);
+	}
+
+	ind_config->background_color =
+	    g_settings_get_string (ind_config->settings,
+				     CAFEKBD_INDICATOR_CONFIG_KEY_BACKGROUND_COLOR);
+}
+
+void
+cafekbd_indicator_config_refresh_style (CafekbdIndicatorConfig * ind_config)
+{
+	g_free (ind_config->font_family);
+	g_free (ind_config->foreground_color);
+	g_free (ind_config->background_color);
+	cafekbd_indicator_config_load_font (ind_config);
+	cafekbd_indicator_config_load_colors (ind_config);
+}
+
+gchar *
+cafekbd_indicator_config_get_images_file (CafekbdIndicatorConfig *
+				       ind_config,
+				       CafekbdKeyboardConfig *
+				       kbd_config, int group)
+{
+	char *image_file = NULL;
+	CtkIconInfo *icon_info = NULL;
+
+	if (!ind_config->show_flags)
+		return NULL;
+
+	if ((kbd_config->layouts_variants != NULL) &&
+	    (g_strv_length (kbd_config->layouts_variants) > group)) {
+		char *full_layout_name =
+		    kbd_config->layouts_variants[group];
+
+		if (full_layout_name != NULL) {
+			char *l, *v;
+			cafekbd_keyboard_config_split_items (full_layout_name,
+							  &l, &v);
+			if (l != NULL) {
+				/* probably there is something in theme? */
+				icon_info = ctk_icon_theme_lookup_icon
+				    (ind_config->icon_theme, l, 48, 0);
+
+				/* Unbelievable but happens */
+				if (icon_info != NULL &&
+				    ctk_icon_info_get_filename (icon_info) == NULL) {
+					g_object_unref (icon_info);
+					icon_info = NULL;
+				}
+			}
+		}
+	}
+	/* fallback to the default value */
+	if (icon_info == NULL) {
+		icon_info = ctk_icon_theme_lookup_icon
+		    (ind_config->icon_theme, "stock_dialog-error", 48, 0);
+	}
+	if (icon_info != NULL) {
+		image_file =
+		    g_strdup (ctk_icon_info_get_filename (icon_info));
+		g_object_unref (icon_info);
+	}
+
+	return image_file;
+}
+
+void
+cafekbd_indicator_config_load_image_filenames (CafekbdIndicatorConfig *
+					    ind_config,
+					    CafekbdKeyboardConfig *
+					    kbd_config)
+{
+	int i;
+	ind_config->image_filenames = NULL;
+
+	if (!ind_config->show_flags)
+		return;
+
+	for (i = xkl_engine_get_max_num_groups (ind_config->engine);
+	     --i >= 0;) {
+		gchar *image_file =
+		    cafekbd_indicator_config_get_images_file (ind_config,
+							   kbd_config,
+							   i);
+		ind_config->image_filenames =
+		    g_slist_prepend (ind_config->image_filenames,
+				     image_file);
+	}
+}
+
+void
+cafekbd_indicator_config_free_image_filenames (CafekbdIndicatorConfig *
+					    ind_config)
+{
+	while (ind_config->image_filenames) {
+		if (ind_config->image_filenames->data)
+			g_free (ind_config->image_filenames->data);
+		ind_config->image_filenames =
+		    g_slist_delete_link (ind_config->image_filenames,
+					 ind_config->image_filenames);
+	}
+}
+
+void
+cafekbd_indicator_config_init (CafekbdIndicatorConfig * ind_config,
+			       XklEngine * engine)
+{
+	gchar *sp;
+
+	memset (ind_config, 0, sizeof (*ind_config));
+	ind_config->settings = g_settings_new (CAFEKBD_INDICATOR_CONFIG_SCHEMA);
+	ind_config->engine = engine;
+
+	ind_config->icon_theme = ctk_icon_theme_get_default ();
+
+	ctk_icon_theme_append_search_path (ind_config->icon_theme, sp =
+					   g_build_filename (g_get_home_dir
+							     (),
+							     ".icons/flags",
+							     NULL));
+	g_free (sp);
+
+	ctk_icon_theme_append_search_path (ind_config->icon_theme,
+					   sp =
+					   g_build_filename (DATADIR,
+							     "pixmaps/flags",
+							     NULL));
+	g_free (sp);
+
+	ctk_icon_theme_append_search_path (ind_config->icon_theme,
+					   sp =
+					   g_build_filename (DATADIR,
+							     "icons/flags",
+							     NULL));
+	g_free (sp);
+}
+
+void
+cafekbd_indicator_config_term (CafekbdIndicatorConfig * ind_config)
+{
+	g_free (ind_config->font_family);
+	ind_config->font_family = NULL;
+
+	g_free (ind_config->foreground_color);
+	ind_config->foreground_color = NULL;
+
+	g_free (ind_config->background_color);
+	ind_config->background_color = NULL;
+
+	ind_config->icon_theme = NULL;
+
+	cafekbd_indicator_config_free_image_filenames (ind_config);
+
+	g_object_unref (ind_config->settings);
+	ind_config->settings = NULL;
+}
+
+void
+cafekbd_indicator_config_load_from_gsettings (CafekbdIndicatorConfig * ind_config)
+{
+	ind_config->secondary_groups_mask =
+	    g_settings_get_int (ind_config->settings,
+				CAFEKBD_INDICATOR_CONFIG_KEY_SECONDARIES);
+
+	ind_config->show_flags =
+	    g_settings_get_boolean (ind_config->settings,
+				 CAFEKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS);
+
+	cafekbd_indicator_config_load_font (ind_config);
+	cafekbd_indicator_config_load_colors (ind_config);
+
+}
+
+void
+cafekbd_indicator_config_save_to_gsettings (CafekbdIndicatorConfig * ind_config)
+{
+	g_settings_delay (ind_config->settings);
+
+	g_settings_set_int (ind_config->settings,
+				  CAFEKBD_INDICATOR_CONFIG_KEY_SECONDARIES,
+				  ind_config->secondary_groups_mask);
+	g_settings_set_boolean (ind_config->settings,
+				   CAFEKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS,
+				   ind_config->show_flags);
+
+	g_settings_apply (ind_config->settings);
+}
+
+void
+cafekbd_indicator_config_activate (CafekbdIndicatorConfig * ind_config)
+{
+	xkl_engine_set_secondary_groups_mask (ind_config->engine,
+					      ind_config->secondary_groups_mask);
+}
+
+/**
+ * cafekbd_indicator_config_start_listen:
+ * @func: (scope notified): a function to call when settings are changed
+ */
+void
+cafekbd_indicator_config_start_listen (CafekbdIndicatorConfig *
+				    ind_config,
+				    GCallback func,
+				    gpointer user_data)
+{
+	ind_config->config_listener_id =
+	    g_signal_connect (ind_config->settings, "changed", func,
+			      user_data);
+}
+
+void
+cafekbd_indicator_config_stop_listen (CafekbdIndicatorConfig * ind_config)
+{
+	g_signal_handler_disconnect (ind_config->settings,
+				     ind_config->config_listener_id);
+	ind_config->config_listener_id = 0;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-153544-5624-cppcheck@1eab72938451_devel/2.html b/2025-02-06-153544-5624-cppcheck@1eab72938451_devel/2.html new file mode 100644 index 0000000..4489934 --- /dev/null +++ b/2025-02-06-153544-5624-cppcheck@1eab72938451_devel/2.html @@ -0,0 +1,2100 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
+871
+872
+873
+874
+875
+876
+877
+878
+879
+880
+881
+882
+883
+884
+885
+886
+887
+888
+889
+890
+891
+892
+893
+894
+895
+896
+897
+898
+899
+900
+901
+902
+903
+904
+905
+906
+907
+908
+909
+910
+911
+912
+913
+914
+915
+916
+917
+918
+919
+920
+921
+922
+923
+924
+925
+926
+927
+928
+929
+930
+931
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+#include <config.h>
+
+#include <memory.h>
+
+#include <ctk/ctk.h>
+#include <cdk/cdkkeysyms.h>
+#include <cdk/cdkx.h>
+#include <glib/gi18n-lib.h>
+
+#include <cafekbd-indicator.h>
+#include <cafekbd-indicator-marshal.h>
+
+#include <cafekbd-desktop-config.h>
+#include <cafekbd-indicator-config.h>
+
+typedef struct _gki_globals {
+	XklEngine *engine;
+	XklConfigRegistry *registry;
+
+	CafekbdDesktopConfig cfg;
+	CafekbdIndicatorConfig ind_cfg;
+	CafekbdKeyboardConfig kbd_cfg;
+
+	const gchar *tooltips_format;
+	gchar **full_group_names;
+	gchar **short_group_names;
+	GSList *widget_instances;
+	GSList *images;
+} gki_globals;
+
+struct _CafekbdIndicatorPrivate {
+	gboolean set_parent_tooltips;
+	gdouble angle;
+};
+
+/* one instance for ALL widgets */
+static gki_globals globals;
+
+#define ForAllIndicators() \
+	{ \
+		GSList* cur; \
+		for (cur = globals.widget_instances; cur != NULL; cur = cur->next) { \
+			CafekbdIndicator * gki = (CafekbdIndicator*)cur->data;
+#define NextIndicator() \
+		} \
+	}
+
+G_DEFINE_TYPE (CafekbdIndicator, cafekbd_indicator, CTK_TYPE_NOTEBOOK)<--- There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
+
+static void
+cafekbd_indicator_global_init (void);
+static void
+cafekbd_indicator_global_term (void);
+static CtkWidget *
+cafekbd_indicator_prepare_drawing (CafekbdIndicator * gki, int group);
+static void
+cafekbd_indicator_set_current_page_for_group (CafekbdIndicator * gki, int group);
+static void
+cafekbd_indicator_set_current_page (CafekbdIndicator * gki);
+static void
+cafekbd_indicator_cleanup (CafekbdIndicator * gki);
+static void
+cafekbd_indicator_fill (CafekbdIndicator * gki);
+static void
+cafekbd_indicator_set_tooltips (CafekbdIndicator * gki, const char *str);
+
+gchar *
+cafekbd_indicator_extract_layout_name (int group, XklEngine *engine, CafekbdKeyboardConfig *kbd_cfg, gchar **short_group_names, gchar **full_group_names);
+gchar *
+cafekbd_indicator_create_label_title (int group, GHashTable **ln2cnt_map, gchar *layout_name);
+
+static void
+cafekbd_indicator_load_images (void)
+{
+	int i;
+	GSList *image_filename;
+
+	globals.images = NULL;
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	if (!globals.ind_cfg.show_flags)
+		return;
+
+	image_filename = globals.ind_cfg.image_filenames;
+
+	for (i = xkl_engine_get_max_num_groups (globals.engine);
+	     --i >= 0; image_filename = image_filename->next) {
+		GdkPixbuf *image = NULL;
+		char *image_file = (char *) image_filename->data;
+
+		if (image_file != NULL) {
+			GError *gerror = NULL;
+			image =
+			    gdk_pixbuf_new_from_file (image_file, &gerror);
+			if (image == NULL) {
+				CtkWidget *dialog =
+				    ctk_message_dialog_new (NULL,
+							    CTK_DIALOG_DESTROY_WITH_PARENT,
+							    CTK_MESSAGE_ERROR,
+							    CTK_BUTTONS_OK,
+							    _
+							    ("There was an error loading an image: %s"),
+							    gerror->
+							    message);
+				g_signal_connect (G_OBJECT (dialog),
+						  "response",
+						  G_CALLBACK
+						  (ctk_widget_destroy),
+						  NULL);
+
+				ctk_window_set_resizable (CTK_WINDOW
+							  (dialog), FALSE);
+
+				ctk_widget_show (dialog);
+				g_error_free (gerror);
+			}
+			xkl_debug (150,
+				   "Image %d[%s] loaded -> %p[%dx%d]\n",
+				   i, image_file, image,
+				   gdk_pixbuf_get_width (image),
+				   gdk_pixbuf_get_height (image));
+		}
+		/* We append the image anyway - even if it is NULL! */
+		globals.images = g_slist_append (globals.images, image);
+	}
+}
+
+static void
+cafekbd_indicator_free_images (void)
+{
+	GSList *img_node;
+
+	cafekbd_indicator_config_free_image_filenames (&globals.ind_cfg);
+
+	while ((img_node = globals.images) != NULL) {
+		GdkPixbuf *pi;
+
+		pi = GDK_PIXBUF (img_node->data);
+		/* It can be NULL - some images may be missing */
+		if (pi != NULL) {
+			g_object_unref (pi);
+		}
+		globals.images =
+		    g_slist_remove_link (globals.images, img_node);
+		g_slist_free_1 (img_node);
+	}
+}
+
+static void
+cafekbd_indicator_update_images (void)
+{
+	cafekbd_indicator_free_images ();
+	cafekbd_indicator_load_images ();
+}
+
+void
+cafekbd_indicator_set_tooltips (CafekbdIndicator * gki, const char *str)
+{
+	g_assert (str == NULL || g_utf8_validate (str, -1, NULL));
+
+	ctk_widget_set_tooltip_text (CTK_WIDGET (gki), str);
+
+	if (gki->priv->set_parent_tooltips) {
+		CtkWidget *parent =
+		    ctk_widget_get_parent (CTK_WIDGET (gki));
+		if (parent) {
+			ctk_widget_set_tooltip_text (parent, str);
+		}
+	}
+}
+
+void
+cafekbd_indicator_cleanup (CafekbdIndicator * gki)
+{
+	int i;
+	CtkNotebook *notebook = CTK_NOTEBOOK (gki);
+
+	/* Do not remove the first page! It is the default page */
+	for (i = ctk_notebook_get_n_pages (notebook); --i > 0;) {
+		ctk_notebook_remove_page (notebook, i);
+	}
+}
+
+void
+cafekbd_indicator_fill (CafekbdIndicator * gki)
+{
+	int grp;
+	int total_groups = xkl_engine_get_num_groups (globals.engine);
+	CtkNotebook *notebook = CTK_NOTEBOOK (gki);
+
+	for (grp = 0; grp < total_groups; grp++) {
+		CtkWidget *page;
+		page = cafekbd_indicator_prepare_drawing (gki, grp);
+
+		if (page == NULL)
+			page = ctk_label_new ("");
+
+		ctk_notebook_append_page (notebook, page, NULL);
+		ctk_widget_show_all (page);
+	}
+}
+
+static gboolean cafekbd_indicator_key_pressed (CtkWidget        *widget G_GNUC_UNUSED,
+					       CdkEventKey      *event,
+					       CafekbdIndicator *gki G_GNUC_UNUSED)
+{
+	switch (event->keyval)
+	{
+			case CDK_KEY_KP_Enter:
+			case CDK_KEY_ISO_Enter:
+			case CDK_KEY_3270_Enter:
+			case CDK_KEY_Return:
+			case CDK_KEY_space:
+			case CDK_KEY_KP_Space:
+			cafekbd_desktop_config_lock_next_group(&globals.cfg);
+			return TRUE;
+		default:
+			break;
+	}
+
+	return FALSE;
+}
+
+static gboolean
+cafekbd_indicator_button_pressed (CtkWidget        *widget,
+				  CdkEventButton   *event,
+				  CafekbdIndicator *gki G_GNUC_UNUSED)
+{
+	CtkWidget *img = ctk_bin_get_child (CTK_BIN (widget));
+	CtkAllocation allocation;
+	ctk_widget_get_allocation (img, &allocation);
+	xkl_debug (150, "Flag img size %d x %d\n",
+		   allocation.width, allocation.height);
+	if (event->button == 1 && event->type == CDK_BUTTON_PRESS) {
+		xkl_debug (150, "Mouse button pressed on applet\n");
+		cafekbd_desktop_config_lock_next_group (&globals.cfg);
+		return TRUE;
+	}
+	return FALSE;
+}
+
+static void
+draw_flag (CtkWidget * flag, cairo_t * cr, GdkPixbuf * image)
+{
+	/* Image width and height */
+	int iw = gdk_pixbuf_get_width (image);
+	int ih = gdk_pixbuf_get_height (image);
+	CtkAllocation allocation;
+	double xwiratio, ywiratio, wiratio;
+
+	ctk_widget_get_allocation (flag, &allocation);
+
+	/* widget-to-image scales, X and Y */
+	xwiratio = 1.0 * allocation.width / iw;
+	ywiratio = 1.0 * allocation.height / ih;
+	wiratio = xwiratio < ywiratio ? xwiratio : ywiratio;
+
+	/* transform cairo context */
+	cairo_translate (cr, allocation.width / 2.0, allocation.height / 2.0);
+	cairo_scale (cr, wiratio, wiratio);
+	cairo_translate (cr, - iw / 2.0, - ih / 2.0);
+
+	cdk_cairo_set_source_pixbuf (cr, image, 0, 0);
+	cairo_paint (cr);
+}
+
+gchar *
+cafekbd_indicator_extract_layout_name (int group, XklEngine * engine,
+				    CafekbdKeyboardConfig * kbd_cfg,
+				    gchar ** short_group_names,
+				    gchar ** full_group_names)
+{
+	char *layout_name = NULL;
+	if (group < g_strv_length (short_group_names)) {
+		if (xkl_engine_get_features (engine) &
+		    XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
+			char *full_layout_name =
+			    kbd_cfg->layouts_variants[group];
+			char *variant_name;
+			if (!cafekbd_keyboard_config_split_items
+			    (full_layout_name, &layout_name,
+			     &variant_name))
+				/* just in case */
+				layout_name = full_layout_name;
+
+			/* make it freeable */
+			layout_name = g_strdup (layout_name);
+
+			if (short_group_names != NULL) {
+				char *short_group_name =
+				    short_group_names[group];
+				if (short_group_name != NULL
+				    && *short_group_name != '\0') {
+					/* drop the long name */
+					g_free (layout_name);
+					layout_name =
+					    g_strdup (short_group_name);
+				}
+			}
+		} else {
+			layout_name = g_strdup (full_group_names[group]);
+		}
+	}
+
+	if (layout_name == NULL)
+		layout_name = g_strdup ("");
+
+	return layout_name;
+}
+
+gchar *
+cafekbd_indicator_create_label_title (int group, GHashTable ** ln2cnt_map,
+				   gchar * layout_name)
+{
+	gpointer pcounter = NULL;
+	char *prev_layout_name = NULL;
+	char *lbl_title = NULL;
+	int counter = 0;
+
+	if (group == 0) {
+		*ln2cnt_map =
+		    g_hash_table_new_full (g_str_hash, g_str_equal,
+					   g_free, NULL);
+	}
+
+	/* Process layouts with repeating description */
+	if (g_hash_table_lookup_extended
+	    (*ln2cnt_map, layout_name, (gpointer *) & prev_layout_name,
+	     &pcounter)) {
+		/* "next" same description */
+		gchar appendix[10] = "";
+		gint utf8length;
+		gunichar cidx;
+		counter = GPOINTER_TO_INT (pcounter);
+		/* Unicode subscript 2, 3, 4 */
+		cidx = 0x2081 + counter;
+		utf8length = g_unichar_to_utf8 (cidx, appendix);
+		appendix[utf8length] = '\0';
+		lbl_title = g_strconcat (layout_name, appendix, NULL);
+	} else {
+		/* "first" time this description */
+		lbl_title = g_strdup (layout_name);
+	}
+	g_hash_table_insert (*ln2cnt_map, layout_name,
+			     GINT_TO_POINTER (counter + 1));
+	return lbl_title;
+}
+
+static CtkWidget *
+cafekbd_indicator_prepare_drawing (CafekbdIndicator * gki, int group)
+{
+	gpointer pimage;
+	CtkWidget *ebox;
+
+	pimage = g_slist_nth_data (globals.images, group);
+	ebox = ctk_event_box_new ();
+	ctk_event_box_set_visible_window (CTK_EVENT_BOX (ebox), FALSE);
+	if (globals.ind_cfg.show_flags) {
+		GdkPixbuf *image;
+		CtkWidget *flag;
+
+		if (pimage == NULL)
+			return NULL;
+		image = GDK_PIXBUF (pimage);
+		flag = ctk_drawing_area_new ();
+		ctk_widget_add_events (CTK_WIDGET (flag),
+				       CDK_BUTTON_PRESS_MASK);
+		g_signal_connect (G_OBJECT (flag), "draw",
+		                  G_CALLBACK (draw_flag), image);
+		ctk_container_add (CTK_CONTAINER (ebox), flag);
+	} else {
+		char *lbl_title = NULL;
+		char *layout_name = NULL;
+		CtkWidget *label;
+		static GHashTable *ln2cnt_map = NULL;
+
+		layout_name =
+		    cafekbd_indicator_extract_layout_name (group,
+							globals.engine,
+							&globals.kbd_cfg,
+							globals.short_group_names,
+							globals.full_group_names);
+
+		lbl_title =
+		    cafekbd_indicator_create_label_title (group,
+						       &ln2cnt_map,
+						       layout_name);
+
+		label = ctk_label_new (lbl_title);
+		ctk_widget_set_halign (label, CTK_ALIGN_CENTER);
+		ctk_widget_set_valign (label, CTK_ALIGN_CENTER);
+		ctk_widget_set_margin_start (label, 2);
+		ctk_widget_set_margin_end (label, 2);
+		ctk_widget_set_margin_top (label, 2);
+		ctk_widget_set_margin_bottom (label, 2);
+		g_free (lbl_title);
+		ctk_label_set_angle (CTK_LABEL (label), gki->priv->angle);
+
+		if (group + 1 ==
+		    xkl_engine_get_num_groups (globals.engine)) {
+			g_hash_table_destroy (ln2cnt_map);
+			ln2cnt_map = NULL;
+		}
+
+		ctk_container_add (CTK_CONTAINER (ebox), label);
+	}
+
+	g_signal_connect (G_OBJECT (ebox),
+			  "button_press_event",
+			  G_CALLBACK (cafekbd_indicator_button_pressed), gki);
+
+	g_signal_connect (G_OBJECT (gki),
+			  "key_press_event",
+			  G_CALLBACK (cafekbd_indicator_key_pressed), gki);
+
+	/* We have everything prepared for that size */
+
+	return ebox;
+}
+
+static void
+cafekbd_indicator_update_tooltips (CafekbdIndicator * gki)
+{
+	XklState *state = xkl_engine_get_current_state (globals.engine);
+	gchar *buf;
+	if (state == NULL || state->group < 0
+	    || state->group >= g_strv_length (globals.full_group_names))
+		return;
+
+	buf = g_strdup_printf (globals.tooltips_format,
+			       globals.full_group_names[state->group]);
+
+	cafekbd_indicator_set_tooltips (gki, buf);
+	g_free (buf);
+}
+
+static void
+cafekbd_indicator_parent_set (CtkWidget *gki,
+			      CtkWidget *previous_parent G_GNUC_UNUSED)
+{
+	cafekbd_indicator_update_tooltips (CAFEKBD_INDICATOR (gki));
+}
+
+
+void
+cafekbd_indicator_reinit_ui (CafekbdIndicator * gki)
+{
+	cafekbd_indicator_cleanup (gki);
+	cafekbd_indicator_fill (gki);
+
+	cafekbd_indicator_set_current_page (gki);
+
+	g_signal_emit_by_name (gki, "reinit-ui");
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+			       gchar     *key G_GNUC_UNUSED,
+			       gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "General configuration changed in GSettings - reiniting...\n");
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+	ForAllIndicators () {
+		cafekbd_indicator_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_ind_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+				   gchar     *key G_GNUC_UNUSED,
+				   gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "Applet configuration changed in GSettings - reiniting...\n");
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+	cafekbd_indicator_update_images ();
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	ForAllIndicators () {
+		cafekbd_indicator_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+static void
+cafekbd_indicator_load_group_names (const gchar ** layout_ids,
+				 const gchar ** variant_ids)
+{
+	if (!cafekbd_desktop_config_load_group_descriptions
+	    (&globals.cfg, globals.registry, layout_ids, variant_ids,
+	     &globals.short_group_names, &globals.full_group_names)) {
+		/* We just populate no short names (remain NULL) -
+		 * full names are going to be used anyway */
+		gint i, total_groups =
+		    xkl_engine_get_num_groups (globals.engine);
+		globals.full_group_names =
+		    g_new0 (gchar *, total_groups + 1);
+
+		if (xkl_engine_get_features (globals.engine) &
+		    XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
+			gchar **lst = globals.kbd_cfg.layouts_variants;
+			for (i = 0; *lst; lst++, i++) {
+				globals.full_group_names[i] =
+				    g_strdup ((char *) *lst);
+			}
+		} else {
+			for (i = total_groups; --i >= 0;) {
+				globals.full_group_names[i] =
+				    g_strdup_printf ("Group %d", i);
+			}
+		}
+	}
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_kbd_cfg_callback (CafekbdIndicator *gki G_GNUC_UNUSED)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+	xkl_debug (100,
+		   "XKB configuration changed on X Server - reiniting...\n");
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+	cafekbd_indicator_update_images ();
+
+	g_strfreev (globals.full_group_names);
+	globals.full_group_names = NULL;
+
+	if (globals.short_group_names != NULL) {
+		g_strfreev (globals.short_group_names);
+		globals.short_group_names = NULL;
+	}
+
+	cafekbd_indicator_load_group_names ((const gchar **) xklrec->layouts,
+					 (const gchar **)
+					 xklrec->variants);
+
+	ForAllIndicators () {
+		cafekbd_indicator_reinit_ui (gki);
+	} NextIndicator ();
+	g_object_unref (G_OBJECT (xklrec));
+}
+
+/* Should be called once for all applets */
+static void
+cafekbd_indicator_state_callback (XklEngine           *engine G_GNUC_UNUSED,
+				  XklEngineStateChange changeType,
+				  gint                 group,
+				  gboolean             restore)
+{
+	xkl_debug (150, "group is now %d, restore: %d\n", group, restore);
+
+	if (changeType == GROUP_CHANGED) {
+		ForAllIndicators () {
+			xkl_debug (200, "do repaint\n");
+			cafekbd_indicator_set_current_page_for_group
+			    (gki, group);
+		}
+		NextIndicator ();
+	}
+}
+
+
+void
+cafekbd_indicator_set_current_page (CafekbdIndicator * gki)
+{
+	XklState *cur_state;
+	cur_state = xkl_engine_get_current_state (globals.engine);
+	if (cur_state->group >= 0)
+		cafekbd_indicator_set_current_page_for_group (gki,
+							   cur_state->
+							   group);
+}
+
+void
+cafekbd_indicator_set_current_page_for_group (CafekbdIndicator * gki, int group)
+{
+	xkl_debug (200, "Revalidating for group %d\n", group);
+
+	ctk_notebook_set_current_page (CTK_NOTEBOOK (gki), group + 1);
+
+	cafekbd_indicator_update_tooltips (gki);
+}
+
+/* Should be called once for all widgets */
+static CdkFilterReturn
+cafekbd_indicator_filter_x_evt (CdkXEvent *xev,
+				CdkEvent  *event G_GNUC_UNUSED)
+{
+	XEvent *xevent = (XEvent *) xev;
+
+	xkl_engine_filter_events (globals.engine, xevent);
+	switch (xevent->type) {
+	case ReparentNotify:
+		{
+			XReparentEvent *rne = (XReparentEvent *) xev;
+
+			ForAllIndicators () {
+				CdkWindow *w =
+				    ctk_widget_get_parent_window
+				    (CTK_WIDGET (gki));
+
+				/* compare the indicator's parent window with the even window */
+				if (w != NULL
+				    && CDK_WINDOW_XID (w) == rne->window) {
+					/* if so - make it transparent... */
+					xkl_engine_set_window_transparent
+					    (globals.engine, rne->window,
+					     TRUE);
+				}
+			}
+			NextIndicator ()
+		}
+		break;
+	}
+	return CDK_FILTER_CONTINUE;
+}
+
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_start_listen (void)
+{
+	cdk_window_add_filter (NULL, (CdkFilterFunc)
+			       cafekbd_indicator_filter_x_evt, NULL);
+	cdk_window_add_filter (cdk_get_default_root_window (),
+			       (CdkFilterFunc)
+			       cafekbd_indicator_filter_x_evt, NULL);
+
+	xkl_engine_start_listen (globals.engine,
+				 XKLL_TRACK_KEYBOARD_STATE);
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_stop_listen (void)
+{
+	xkl_engine_stop_listen (globals.engine, XKLL_TRACK_KEYBOARD_STATE);
+
+	cdk_window_remove_filter (NULL, (CdkFilterFunc)
+				  cafekbd_indicator_filter_x_evt, NULL);
+	cdk_window_remove_filter
+	    (cdk_get_default_root_window (),
+	     (CdkFilterFunc) cafekbd_indicator_filter_x_evt, NULL);
+}
+
+static gboolean
+cafekbd_indicator_scroll (CtkWidget      *gki G_GNUC_UNUSED,
+			  CdkEventScroll *event G_GNUC_UNUSED)
+{
+	/* mouse wheel events should be ignored, otherwise funny effects appear */
+	return TRUE;
+}
+
+static void cafekbd_indicator_init(CafekbdIndicator* gki)
+{
+	CtkWidget *def_drawing;
+	CtkNotebook *notebook;
+
+	if (!g_slist_length(globals.widget_instances))
+	{
+		cafekbd_indicator_global_init();
+	}
+
+	gki->priv = g_new0 (CafekbdIndicatorPrivate, 1);
+
+	notebook = CTK_NOTEBOOK (gki);
+
+	xkl_debug (100, "Initiating the widget startup process for %p\n", gki);
+
+	ctk_notebook_set_show_tabs (notebook, FALSE);
+	ctk_notebook_set_show_border (notebook, FALSE);
+
+	def_drawing =
+	    ctk_image_new_from_icon_name ("process-stop",
+				      CTK_ICON_SIZE_BUTTON);
+
+	ctk_notebook_append_page (notebook, def_drawing,
+				  ctk_label_new (""));
+
+	if (globals.engine == NULL) {
+		cafekbd_indicator_set_tooltips (gki,
+					     _
+					     ("XKB initialization error"));
+		return;
+	}
+
+	cafekbd_indicator_set_tooltips (gki, NULL);
+
+	cafekbd_indicator_fill (gki);
+	cafekbd_indicator_set_current_page (gki);
+
+	ctk_widget_add_events (CTK_WIDGET (gki), CDK_BUTTON_PRESS_MASK);
+
+	/* append AFTER all initialization work is finished */
+	globals.widget_instances =
+	    g_slist_append (globals.widget_instances, gki);
+}
+
+static void
+cafekbd_indicator_finalize (GObject * obj)
+{
+	CafekbdIndicator *gki = CAFEKBD_INDICATOR (obj);
+	xkl_debug (100,
+		   "Starting the cafe-kbd-indicator widget shutdown process for %p\n",
+		   gki);
+
+	/* remove BEFORE all termination work is finished */
+	globals.widget_instances =
+	    g_slist_remove (globals.widget_instances, gki);
+
+	cafekbd_indicator_cleanup (gki);
+
+	xkl_debug (100,
+		   "The instance of cafe-kbd-indicator successfully finalized\n");
+
+	g_free (gki->priv);
+
+	G_OBJECT_CLASS (cafekbd_indicator_parent_class)->finalize (obj);
+
+	if (!g_slist_length (globals.widget_instances))
+		cafekbd_indicator_global_term ();
+}
+
+static void
+cafekbd_indicator_global_term (void)
+{
+	xkl_debug (100, "*** Last  CafekbdIndicator instance *** \n");
+	cafekbd_indicator_stop_listen ();
+
+	cafekbd_desktop_config_stop_listen (&globals.cfg);
+	cafekbd_indicator_config_stop_listen (&globals.ind_cfg);
+
+	cafekbd_indicator_config_term (&globals.ind_cfg);
+	cafekbd_keyboard_config_term (&globals.kbd_cfg);
+	cafekbd_desktop_config_term (&globals.cfg);
+
+	g_object_unref (G_OBJECT (globals.registry));
+	globals.registry = NULL;
+	g_object_unref (G_OBJECT (globals.engine));
+	globals.engine = NULL;
+	xkl_debug (100, "*** Terminated globals *** \n");
+}
+
+static void
+cafekbd_indicator_class_init (CafekbdIndicatorClass * klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+	CtkWidgetClass *widget_class = CTK_WIDGET_CLASS (klass);
+
+	xkl_debug (100, "*** First CafekbdIndicator instance *** \n");
+
+	memset (&globals, 0, sizeof (globals));
+
+	/* Initing some global vars */
+	globals.tooltips_format = "%s";
+
+	/* Initing vtable */
+	object_class->finalize = cafekbd_indicator_finalize;
+
+	widget_class->scroll_event = cafekbd_indicator_scroll;
+	widget_class->parent_set = cafekbd_indicator_parent_set;
+
+	/* Signals */
+	g_signal_new ("reinit-ui", CAFEKBD_TYPE_INDICATOR,
+		      G_SIGNAL_RUN_LAST,
+		      G_STRUCT_OFFSET (CafekbdIndicatorClass, reinit_ui),
+		      NULL, NULL, cafekbd_indicator_VOID__VOID,
+		      G_TYPE_NONE, 0);
+}
+
+static void
+cafekbd_indicator_global_init (void)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+
+	globals.engine = xkl_engine_get_instance(CDK_DISPLAY_XDISPLAY(cdk_display_get_default()));
+
+	if (globals.engine == NULL)
+	{
+		xkl_debug (0, "Libxklavier initialization error");
+		return;
+	}
+
+	g_signal_connect (globals.engine, "X-state-changed",
+			  G_CALLBACK (cafekbd_indicator_state_callback),
+			  NULL);
+	g_signal_connect (globals.engine, "X-config-changed",
+			  G_CALLBACK (cafekbd_indicator_kbd_cfg_callback),
+			  NULL);
+
+	cafekbd_desktop_config_init (&globals.cfg, globals.engine);
+	cafekbd_keyboard_config_init (&globals.kbd_cfg, globals.engine);
+	cafekbd_indicator_config_init (&globals.ind_cfg, globals.engine);
+
+	cafekbd_desktop_config_start_listen (&globals.cfg,
+					  (GCallback)
+					  cafekbd_indicator_cfg_changed,
+					  NULL);
+	cafekbd_indicator_config_start_listen (&globals.ind_cfg,
+					    (GCallback)
+					    cafekbd_indicator_ind_cfg_changed,
+					    NULL);
+
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+
+	globals.registry =
+	    xkl_config_registry_get_instance (globals.engine);
+	xkl_config_registry_load (globals.registry,
+				  globals.cfg.load_extra_items);
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+	cafekbd_indicator_update_images ();
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	cafekbd_indicator_load_group_names ((const gchar **) xklrec->layouts,
+					 (const gchar **)
+					 xklrec->variants);
+	g_object_unref (G_OBJECT (xklrec));
+
+	cafekbd_indicator_start_listen ();
+
+	xkl_debug (100, "*** Inited globals *** \n");
+}
+
+CtkWidget *
+cafekbd_indicator_new (void)
+{
+	return
+	    CTK_WIDGET (g_object_new (cafekbd_indicator_get_type (), NULL));
+}
+
+void
+cafekbd_indicator_set_parent_tooltips (CafekbdIndicator * gki, gboolean spt)
+{
+	gki->priv->set_parent_tooltips = spt;
+	cafekbd_indicator_update_tooltips (gki);
+}
+
+void
+cafekbd_indicator_set_tooltips_format (const gchar format[])
+{
+	globals.tooltips_format = format;
+	ForAllIndicators ()
+	    cafekbd_indicator_update_tooltips (gki);
+	NextIndicator ()
+}
+
+/**
+ * cafekbd_indicator_get_xkl_engine:
+ *
+ * Returns: (transfer none): The engine shared by all CafekbdIndicator objects
+ */
+XklEngine *
+cafekbd_indicator_get_xkl_engine ()
+{
+	return globals.engine;
+}
+
+/**
+ * cafekbd_indicator_get_group_names:
+ *
+ * Returns: (transfer none) (array zero-terminated=1): List of group names
+ */
+gchar **
+cafekbd_indicator_get_group_names ()
+{
+	return globals.full_group_names;
+}
+
+gchar *
+cafekbd_indicator_get_image_filename (guint group)
+{
+	if (!globals.ind_cfg.show_flags)
+		return NULL;
+	return cafekbd_indicator_config_get_images_file (&globals.ind_cfg,
+						      &globals.kbd_cfg,
+						      group);
+}
+
+gdouble
+cafekbd_indicator_get_max_width_height_ratio (void)
+{
+	gdouble rv = 0.0;
+	GSList *ip = globals.images;
+	if (!globals.ind_cfg.show_flags)
+		return 0;
+	while (ip != NULL) {
+		GdkPixbuf *img = GDK_PIXBUF (ip->data);
+		gdouble r =
+		    1.0 * gdk_pixbuf_get_width (img) /
+		    gdk_pixbuf_get_height (img);
+		if (r > rv)
+			rv = r;
+		ip = ip->next;
+	}
+	return rv;
+}
+
+void
+cafekbd_indicator_set_angle (CafekbdIndicator * gki, gdouble angle)
+{
+	gki->priv->angle = angle;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-153544-5624-cppcheck@1eab72938451_devel/3.html b/2025-02-06-153544-5624-cppcheck@1eab72938451_devel/3.html new file mode 100644 index 0000000..2dbd2a6 --- /dev/null +++ b/2025-02-06-153544-5624-cppcheck@1eab72938451_devel/3.html @@ -0,0 +1,1832 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <X11/keysym.h>
+
+#include <glib/gi18n-lib.h>
+
+#include <cafekbd-keyboard-config.h>
+#include <cafekbd-config-private.h>
+#include <cafekbd-util.h>
+
+/*
+ * CafekbdKeyboardConfig
+ */
+#define CAFEKBD_KEYBOARD_CONFIG_SCHEMA CAFEKBD_CONFIG_SCHEMA ".kbd"
+
+#define GROUP_SWITCHERS_GROUP "grp"
+#define DEFAULT_GROUP_SWITCH "grp:shift_caps_toggle"
+
+const gchar CAFEKBD_KEYBOARD_CONFIG_KEY_MODEL[] = "model";
+const gchar CAFEKBD_KEYBOARD_CONFIG_KEY_LAYOUTS[] = "layouts";
+const gchar CAFEKBD_KEYBOARD_CONFIG_KEY_OPTIONS[] = "options";
+
+const gchar *CAFEKBD_KEYBOARD_CONFIG_ACTIVE[] = {
+	CAFEKBD_KEYBOARD_CONFIG_KEY_MODEL,
+	CAFEKBD_KEYBOARD_CONFIG_KEY_LAYOUTS,
+	CAFEKBD_KEYBOARD_CONFIG_KEY_OPTIONS
+};
+
+/*
+ * static common functions
+ */
+
+static gboolean
+cafekbd_strv_equal (gchar ** l1, gchar ** l2)
+{
+	if (l1 == l2)
+		return TRUE;
+	if (l1 == NULL)
+		return g_strv_length (l2) == 0;
+	if (l2 == NULL)
+		return g_strv_length (l1) == 0;
+
+	while ((*l1 != NULL) && (*l2 != NULL)) {
+		if (*l1 != *l2) {
+			if (*l1 && *l2) {<--- Condition '*l1' is always true<--- Condition '*l2' is always true
+				if (g_ascii_strcasecmp (*l1, *l2))
+					return FALSE;
+			} else
+				return FALSE;
+		}
+
+		l1++;
+		l2++;
+	}
+	return (*l1 == NULL) && (*l2 == NULL);
+}
+
+gboolean
+cafekbd_keyboard_config_get_lv_descriptions (XklConfigRegistry *
+					  config_registry,
+					  const gchar * layout_name,
+					  const gchar * variant_name,
+					  gchar ** layout_short_descr,
+					  gchar ** layout_descr,
+					  gchar ** variant_short_descr,
+					  gchar ** variant_descr)
+{
+	/* TODO make it not static */
+	static XklConfigItem *litem = NULL;
+	static XklConfigItem *vitem = NULL;
+
+	if (litem == NULL)
+		litem = xkl_config_item_new ();
+	if (vitem == NULL)
+		vitem = xkl_config_item_new ();
+
+	layout_name = g_strdup (layout_name);
+
+	g_snprintf (litem->name, sizeof litem->name, "%s", layout_name);
+	if (xkl_config_registry_find_layout (config_registry, litem)) {
+		*layout_short_descr = litem->short_description;
+		*layout_descr = litem->description;
+	} else
+		*layout_short_descr = *layout_descr = NULL;
+
+	if (variant_name != NULL) {
+		variant_name = g_strdup (variant_name);
+		g_snprintf (vitem->name, sizeof vitem->name, "%s",
+			    variant_name);
+		if (xkl_config_registry_find_variant
+		    (config_registry, layout_name, vitem)) {
+			*variant_short_descr = vitem->short_description;
+			*variant_descr = vitem->description;
+		} else
+			*variant_short_descr = *variant_descr = NULL;
+
+		g_free ((char *) variant_name);
+	} else
+		*variant_descr = NULL;
+
+	g_free ((char *) layout_name);
+	return *layout_descr != NULL;
+}
+
+/*
+ * extern common functions
+ */
+const gchar *
+cafekbd_keyboard_config_merge_items (const gchar * parent,
+				  const gchar * child)
+{
+	static gchar buffer[XKL_MAX_CI_NAME_LENGTH * 2 - 1];
+	*buffer = '\0';
+	if (parent != NULL) {
+		if (strlen (parent) >= XKL_MAX_CI_NAME_LENGTH)
+			return NULL;
+		strcat (buffer, parent);
+	}
+	if (child != NULL && *child != 0) {
+		if (strlen (child) >= XKL_MAX_CI_NAME_LENGTH)
+			return NULL;
+		strcat (buffer, "\t");
+		strcat (buffer, child);
+	}
+	return buffer;
+}
+
+gboolean
+cafekbd_keyboard_config_split_items (const gchar * merged, gchar ** parent,
+				  gchar ** child)
+{
+	static gchar pbuffer[XKL_MAX_CI_NAME_LENGTH];
+	static gchar cbuffer[XKL_MAX_CI_NAME_LENGTH];
+	int plen;
+	const gchar *pos;
+	*parent = *child = NULL;
+
+	if (merged == NULL)
+		return FALSE;
+
+	pos = strchr (merged, '\t');
+	if (pos == NULL) {
+		plen = strlen (merged);
+	} else {
+		plen = pos - merged;
+		if (strlen (pos + 1) >= XKL_MAX_CI_NAME_LENGTH)
+			return FALSE;
+		strcpy (*child = cbuffer, pos + 1);
+	}
+	if (plen >= XKL_MAX_CI_NAME_LENGTH)
+		return FALSE;
+	memcpy (*parent = pbuffer, merged, plen);
+	pbuffer[plen] = '\0';
+	return TRUE;
+}
+
+/*
+ * static CafekbdKeyboardConfig functions
+ */
+static void
+cafekbd_keyboard_config_copy_from_xkl_config (CafekbdKeyboardConfig * kbd_config,
+					   XklConfigRec * pdata)
+{
+	char **p;
+	int i;
+	cafekbd_keyboard_config_model_set (kbd_config, pdata->model);
+	xkl_debug (150, "Loaded Kbd model: [%s]\n", pdata->model);
+
+	/* Layouts */
+	g_strfreev (kbd_config->layouts_variants);
+	kbd_config->layouts_variants = NULL;
+	if (pdata->layouts != NULL) {
+		char **p1;
+
+		p = pdata->layouts;
+		p1 = pdata->variants;
+		kbd_config->layouts_variants =
+		    g_new0 (gchar *, g_strv_length (pdata->layouts) + 1);
+		i = 0;
+		while (*p != NULL) {
+			const gchar *full_layout =
+			    cafekbd_keyboard_config_merge_items (*p, *p1);
+			xkl_debug (150,
+				   "Loaded Kbd layout (with variant): [%s]\n",
+				   full_layout);
+			kbd_config->layouts_variants[i++] =
+			    g_strdup (full_layout);
+			p++;
+			p1++;
+		}
+	}
+
+	/* Options */
+	g_strfreev (kbd_config->options);
+	kbd_config->options = NULL;
+
+	if (pdata->options != NULL) {
+		p = pdata->options;
+		kbd_config->options =
+		    g_new0 (gchar *, g_strv_length (pdata->options) + 1);
+		i = 0;
+		while (*p != NULL) {
+			char *option = *p;
+			char *delim =<--- Variable 'delim' can be declared as pointer to const
+			    (option != NULL) ? strchr (option, ':') : NULL;<--- Condition 'option!=NULL' is always true
+			int len;
+			if ((delim != NULL) &&
+			    ((len =
+			      (delim - option)) <
+			     XKL_MAX_CI_NAME_LENGTH)) {
+				char group[XKL_MAX_CI_NAME_LENGTH];
+
+				strncpy (group, option, len);
+				group[len] = 0;
+				xkl_debug (150,
+					   "Loaded Kbd option: [%s][%s]\n",
+					   group, option);
+				cafekbd_keyboard_config_options_set
+				    (kbd_config, i++, group, option);
+			}
+			p++;
+		}
+	}
+}
+
+static void
+cafekbd_keyboard_config_copy_to_xkl_config (CafekbdKeyboardConfig * kbd_config,
+					 XklConfigRec * pdata)
+{
+	int i;
+	int num_layouts, num_options;
+	pdata->model =
+	    (kbd_config->model ==
+	     NULL) ? NULL : g_strdup (kbd_config->model);
+
+	num_layouts =
+	    (kbd_config->layouts_variants ==
+	     NULL) ? 0 : g_strv_length (kbd_config->layouts_variants);
+	num_options =
+	    (kbd_config->options ==
+	     NULL) ? 0 : g_strv_length (kbd_config->options);
+
+	xkl_debug (150, "Taking %d layouts\n", num_layouts);
+	if (num_layouts != 0) {
+		gchar **the_layout_variant = kbd_config->layouts_variants;
+		char **p1 = pdata->layouts =
+		    g_new0 (char *, num_layouts + 1);
+		char **p2 = pdata->variants =
+		    g_new0 (char *, num_layouts + 1);
+		for (i = num_layouts; --i >= 0;) {
+			char *layout, *variant;
+			if (cafekbd_keyboard_config_split_items
+			    (*the_layout_variant, &layout, &variant)
+			    && variant != NULL) {
+				*p1 =
+				    (layout ==
+				     NULL) ? g_strdup ("") :
+				    g_strdup (layout);
+				*p2 =
+				    (variant ==<--- Condition 'variant==NULL' is always false
+				     NULL) ? g_strdup ("") :
+				    g_strdup (variant);
+			} else {
+				*p1 =
+				    (*the_layout_variant ==
+				     NULL) ? g_strdup ("") :
+				    g_strdup (*the_layout_variant);
+				*p2 = g_strdup ("");
+			}
+			xkl_debug (150, "Adding [%s]/%p and [%s]/%p\n",
+				   *p1 ? *p1 : "(nil)", *p1,
+				   *p2 ? *p2 : "(nil)", *p2);
+			p1++;
+			p2++;
+			the_layout_variant++;
+		}
+	}
+
+	if (num_options != 0) {
+		gchar **the_option = kbd_config->options;
+		char **p = pdata->options =
+		    g_new0 (char *, num_options + 1);
+		for (i = num_options; --i >= 0;) {
+			char *group, *option;
+			if (cafekbd_keyboard_config_split_items
+			    (*the_option, &group, &option)
+			    && option != NULL)
+				*(p++) = g_strdup (option);
+			else {
+				*(p++) = g_strdup ("");
+				xkl_debug (150, "Could not split [%s]\n",
+					   *the_option);
+			}
+			the_option++;
+		}
+	}
+}
+
+static void
+cafekbd_keyboard_config_load_params (CafekbdKeyboardConfig * kbd_config,
+				  const gchar * param_names[])
+{
+	gchar *pc;
+
+	pc = g_settings_get_string (kbd_config->settings, param_names[0]);
+	if (pc == NULL) {
+		cafekbd_keyboard_config_model_set (kbd_config, NULL);
+	} else {
+		cafekbd_keyboard_config_model_set (kbd_config, pc);
+		g_free (pc);
+	}
+	xkl_debug (150, "Loaded Kbd model: [%s]\n",
+		   kbd_config->model ? kbd_config->model : "(null)");
+
+	g_strfreev (kbd_config->layouts_variants);
+
+	kbd_config->layouts_variants =
+	    g_settings_get_strv (kbd_config->settings, param_names[1]);
+
+	if (kbd_config->layouts_variants != NULL
+	    && kbd_config->layouts_variants[0] == NULL) {
+		g_strfreev (kbd_config->layouts_variants);
+		kbd_config->layouts_variants = NULL;
+	}
+
+	g_strfreev (kbd_config->options);
+
+	kbd_config->options =
+	    g_settings_get_strv (kbd_config->settings, param_names[2]);
+
+	if (kbd_config->options != NULL && kbd_config->options[0] == NULL) {
+		g_strfreev (kbd_config->options);
+		kbd_config->options = NULL;
+	}
+}
+
+static void
+cafekbd_keyboard_config_save_params (CafekbdKeyboardConfig * kbd_config,
+				  const gchar * param_names[])
+{
+	gchar **pl;
+
+	if (kbd_config->model)
+		g_settings_set_string (kbd_config->settings, param_names[0],
+				       kbd_config->model);
+	else
+		g_settings_set_string (kbd_config->settings, param_names[0],
+				       NULL);
+	xkl_debug (150, "Saved Kbd model: [%s]\n",
+		   kbd_config->model ? kbd_config->model : "(null)");
+
+	if (kbd_config->layouts_variants) {
+		pl = kbd_config->layouts_variants;
+		while (*pl != NULL) {
+			xkl_debug (150, "Saved Kbd layout: [%s]\n", *pl);
+			pl++;
+		}
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[1],
+				     (const gchar * const *)
+				     kbd_config->layouts_variants);
+	} else {
+		xkl_debug (150, "Saved Kbd layouts: []\n");
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[1], NULL);
+	}
+
+	if (kbd_config->options) {
+		pl = kbd_config->options;
+		while (*pl != NULL) {
+			xkl_debug (150, "Saved Kbd option: [%s]\n", *pl);
+			pl++;
+		}
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[2],
+				     (const gchar *
+				      const *) kbd_config->options);
+	} else {
+		xkl_debug (150, "Saved Kbd options: []\n");
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[2], NULL);
+	}
+}
+
+/*
+ * extern CafekbdKeyboardConfig config functions
+ */
+void
+cafekbd_keyboard_config_init (CafekbdKeyboardConfig * kbd_config,
+			      XklEngine * engine)
+{
+	memset (kbd_config, 0, sizeof (*kbd_config));
+	kbd_config->settings = g_settings_new (CAFEKBD_KEYBOARD_CONFIG_SCHEMA);
+	kbd_config->engine = engine;
+}
+
+void
+cafekbd_keyboard_config_term (CafekbdKeyboardConfig * kbd_config)
+{
+	cafekbd_keyboard_config_model_set (kbd_config, NULL);
+
+	g_strfreev (kbd_config->layouts_variants);
+	kbd_config->layouts_variants = NULL;
+	g_strfreev (kbd_config->options);
+	kbd_config->options = NULL;
+
+	g_object_unref (kbd_config->settings);
+	kbd_config->settings = NULL;
+}
+
+void
+cafekbd_keyboard_config_load_from_gsettings (CafekbdKeyboardConfig * kbd_config,
+				      CafekbdKeyboardConfig *
+				      kbd_config_default)
+{
+	cafekbd_keyboard_config_load_params (kbd_config,
+					  CAFEKBD_KEYBOARD_CONFIG_ACTIVE);
+
+	if (kbd_config_default != NULL) {
+
+		if (kbd_config->model == NULL)
+			kbd_config->model =
+			    g_strdup (kbd_config_default->model);
+
+		if (kbd_config->layouts_variants == NULL) {
+			kbd_config->layouts_variants =
+			    g_strdupv
+			    (kbd_config_default->layouts_variants);
+		}
+
+		if (kbd_config->options == NULL) {
+			kbd_config->options =
+			    g_strdupv (kbd_config_default->options);
+		}
+	}
+}
+
+void
+cafekbd_keyboard_config_load_from_x_current (CafekbdKeyboardConfig * kbd_config,
+					  XklConfigRec * data)
+{
+	gboolean own_data = data == NULL;
+	xkl_debug (150, "Copying config from X(current)\n");
+	if (own_data)
+		data = xkl_config_rec_new ();
+	if (xkl_config_rec_get_from_server (data, kbd_config->engine))
+		cafekbd_keyboard_config_copy_from_xkl_config (kbd_config,
+							   data);
+	else
+		xkl_debug (150,
+			   "Could not load keyboard config from server: [%s]\n",
+			   xkl_get_last_error ());
+	if (own_data)
+		g_object_unref (G_OBJECT (data));
+}
+
+void
+cafekbd_keyboard_config_load_from_x_initial (CafekbdKeyboardConfig * kbd_config,
+					  XklConfigRec * data)
+{
+	gboolean own_data = data == NULL;
+	xkl_debug (150, "Copying config from X(initial)\n");
+	if (own_data)
+		data = xkl_config_rec_new ();
+	if (xkl_config_rec_get_from_backup (data, kbd_config->engine))
+		cafekbd_keyboard_config_copy_from_xkl_config (kbd_config,
+							   data);
+	else
+		xkl_debug (150,
+			   "Could not load keyboard config from backup: [%s]\n",
+			   xkl_get_last_error ());
+	if (own_data)
+		g_object_unref (G_OBJECT (data));
+}
+
+static gboolean
+cafekbd_keyboard_config_options_equals (CafekbdKeyboardConfig * kbd_config1,
+				     CafekbdKeyboardConfig * kbd_config2)
+{
+	int num_options, num_options2;
+
+	num_options =
+	    (kbd_config1->options ==
+	     NULL) ? 0 : g_strv_length (kbd_config1->options);
+	num_options2 =
+	    (kbd_config2->options ==
+	     NULL) ? 0 : g_strv_length (kbd_config2->options);
+
+	if (num_options != num_options2)
+		return False;
+
+	if (num_options != 0) {
+		int i;
+		char *group1, *option1;
+
+		for (i = 0; i < num_options; i++) {
+			int j;
+			char *group2, *option2;
+			gboolean are_equal = FALSE;
+
+			if (!cafekbd_keyboard_config_split_items
+			    (kbd_config1->options[i], &group1, &option1))
+				continue;
+
+			option1 = g_strdup (option1);
+
+			for (j = 0; j < num_options && !are_equal; j++) {
+				if (cafekbd_keyboard_config_split_items
+				    (kbd_config2->options[j], &group2,
+				     &option2)) {
+					are_equal =
+					    strcmp (option1, option2) == 0;
+				}
+			}
+
+			g_free (option1);
+
+			if (!are_equal)
+				return False;
+		}
+	}
+
+	return True;
+}
+
+gboolean
+cafekbd_keyboard_config_equals (CafekbdKeyboardConfig * kbd_config1,
+			     CafekbdKeyboardConfig * kbd_config2)
+{
+	if (kbd_config1 == kbd_config2)
+		return True;
+	if ((kbd_config1->model != kbd_config2->model) &&
+	    (kbd_config1->model != NULL) &&
+	    (kbd_config2->model != NULL) &&
+	    g_ascii_strcasecmp (kbd_config1->model, kbd_config2->model))
+		return False;
+	if (!cafekbd_strv_equal (kbd_config1->layouts_variants,
+			   kbd_config2->layouts_variants))
+		return False;
+
+	if (!cafekbd_keyboard_config_options_equals
+	    (kbd_config1, kbd_config2))
+		return False;
+
+	return True;
+}
+
+void
+cafekbd_keyboard_config_save_to_gsettings (CafekbdKeyboardConfig * kbd_config)
+{
+	g_settings_delay (kbd_config->settings);
+
+	cafekbd_keyboard_config_save_params (kbd_config,
+					     CAFEKBD_KEYBOARD_CONFIG_ACTIVE);
+
+	g_settings_apply (kbd_config->settings);
+}
+
+void
+cafekbd_keyboard_config_model_set (CafekbdKeyboardConfig * kbd_config,
+				const gchar * model_name)
+{
+	if (kbd_config->model != NULL)
+		g_free (kbd_config->model);
+	kbd_config->model =
+	    (model_name == NULL
+	     || model_name[0] == '\0') ? NULL : g_strdup (model_name);
+}
+
+void
+cafekbd_keyboard_config_options_set (CafekbdKeyboardConfig * kbd_config,
+				  gint idx,
+				  const gchar * group_name,
+				  const gchar * option_name)
+{
+	const gchar *merged;
+	if (group_name == NULL || option_name == NULL)
+		return;
+	merged =
+	    cafekbd_keyboard_config_merge_items (group_name, option_name);
+	if (merged == NULL)
+		return;
+	kbd_config->options[idx] = g_strdup (merged);
+}
+
+gboolean
+cafekbd_keyboard_config_options_is_set (CafekbdKeyboardConfig * kbd_config,<--- Parameter 'kbd_config' can be declared as pointer to const
+				     const gchar * group_name,
+				     const gchar * option_name)
+{
+	gchar **p = kbd_config->options;
+	const gchar *merged =
+	    cafekbd_keyboard_config_merge_items (group_name, option_name);
+	if (merged == NULL)
+		return FALSE;
+
+	while (p && *p) {
+		if (!g_ascii_strcasecmp (merged, *p++))
+			return TRUE;
+	}
+	return FALSE;
+}
+
+gboolean
+cafekbd_keyboard_config_activate (CafekbdKeyboardConfig * kbd_config)
+{
+	gboolean rv;
+	XklConfigRec *data = xkl_config_rec_new ();
+
+	cafekbd_keyboard_config_copy_to_xkl_config (kbd_config, data);
+	rv = xkl_config_rec_activate (data, kbd_config->engine);
+	g_object_unref (G_OBJECT (data));
+
+	return rv;
+}
+
+/**
+ * cafekbd_keyboard_config_start_listen:
+ * @func: (scope notified): a function to call when settings are changed
+ */
+void
+cafekbd_keyboard_config_start_listen (CafekbdKeyboardConfig * kbd_config,
+				   GCallback func,
+				   gpointer user_data)
+{
+	kbd_config->config_listener_id =
+	    g_signal_connect (kbd_config->settings, "changed", func,
+			      user_data);
+}
+
+void
+cafekbd_keyboard_config_stop_listen (CafekbdKeyboardConfig * kbd_config)
+{
+	g_signal_handler_disconnect (kbd_config->settings,
+				     kbd_config->config_listener_id);
+	kbd_config->config_listener_id = 0;
+}
+
+gboolean
+cafekbd_keyboard_config_get_descriptions (XklConfigRegistry * config_registry,
+				       const gchar * name,
+				       gchar ** layout_short_descr,
+				       gchar ** layout_descr,
+				       gchar ** variant_short_descr,
+				       gchar ** variant_descr)
+{
+	char *layout_name = NULL, *variant_name = NULL;
+	if (!cafekbd_keyboard_config_split_items
+	    (name, &layout_name, &variant_name))
+		return FALSE;
+	return cafekbd_keyboard_config_get_lv_descriptions (config_registry,
+							 layout_name,
+							 variant_name,
+							 layout_short_descr,
+							 layout_descr,
+							 variant_short_descr,
+							 variant_descr);
+}
+
+const gchar *
+cafekbd_keyboard_config_format_full_layout (const gchar * layout_descr,
+					 const gchar * variant_descr)
+{
+	static gchar full_descr[XKL_MAX_CI_DESC_LENGTH * 2];
+	if (variant_descr == NULL || variant_descr[0] == 0)
+		g_snprintf (full_descr, sizeof (full_descr), "%s",
+			    layout_descr);
+	else
+		g_snprintf (full_descr, sizeof (full_descr), "%s %s",
+			    layout_descr, variant_descr);
+	return full_descr;
+}
+
+gchar *
+cafekbd_keyboard_config_to_string (const CafekbdKeyboardConfig * config)
+{
+	gchar *layouts = NULL, *options = NULL;
+	GString *buffer = g_string_new (NULL);
+
+	gchar **iter;
+	gint count;
+	gchar *result;
+
+	if (config->layouts_variants) {
+		/* g_slist_length is "expensive", so we determinate the length on the fly */
+		for (iter = config->layouts_variants, count = 0; *iter;
+		     iter++, ++count) {
+			if (buffer->len)
+				g_string_append (buffer, " ");
+
+			g_string_append (buffer, *iter);
+		}
+
+		/* Translators: The count is related to the number of options. The %s
+		 * format specifier should not be modified, left "as is". */
+		layouts =
+		    g_strdup_printf (ngettext
+				     ("layout \"%s\"", "layouts \"%s\"",
+				      count), buffer->str);
+		g_string_truncate (buffer, 0);
+	}
+	if (config->options) {
+		/* g_slist_length is "expensive", so we determinate the length on the fly */
+		for (iter = config->options, count = 0; *iter;
+		     iter++, ++count) {
+			if (buffer->len)
+				g_string_append (buffer, " ");
+
+			g_string_append (buffer, *iter);
+		}
+
+		/* Translators: The count is related to the number of options. The %s
+		 * format specifier should not be modified, left "as is". */
+		options =
+		    g_strdup_printf (ngettext
+				     ("option \"%s\"", "options \"%s\"",
+				      count), buffer->str);
+		g_string_truncate (buffer, 0);
+	}
+
+	g_string_free (buffer, TRUE);
+
+	result =
+	    g_strdup_printf (_("model \"%s\", %s and %s"), config->model,
+			     layouts ? layouts : _("no layout"),
+			     options ? options : _("no options"));
+
+	g_free (options);
+	g_free (layouts);
+
+	return result;
+}
+
+/**
+ * cafekbd_keyboard_config_add_default_switch_option_if_necessary:
+ *
+ * Returns: (transfer full) (array zero-terminated=1): List of options
+ */
+gchar **
+cafekbd_keyboard_config_add_default_switch_option_if_necessary (gchar **
+							        layouts_list,
+							        gchar **
+							        options_list,
+							        gboolean *was_appended)
+{
+	*was_appended = FALSE;
+	if (g_strv_length (layouts_list) >= 2) {
+		gboolean any_switcher = False;
+		if (*options_list != NULL) {
+			gchar **option = options_list;
+			while (*option != NULL) {
+				char *g, *o;
+				if (cafekbd_keyboard_config_split_items
+				    (*option, &g, &o)) {
+					if (!g_ascii_strcasecmp
+					    (g, GROUP_SWITCHERS_GROUP)) {
+						any_switcher = True;
+						break;
+					}
+				}
+				option++;
+			}
+		}
+		if (!any_switcher) {
+			const gchar *id =
+			    cafekbd_keyboard_config_merge_items
+			    (GROUP_SWITCHERS_GROUP,
+			     DEFAULT_GROUP_SWITCH);
+			options_list =
+			    cafekbd_strv_append (options_list, g_strdup (id));
+			*was_appended = TRUE;
+		}
+	}
+	return options_list;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-153544-5624-cppcheck@1eab72938451_devel/4.html b/2025-02-06-153544-5624-cppcheck@1eab72938451_devel/4.html new file mode 100644 index 0000000..1d97c26 --- /dev/null +++ b/2025-02-06-153544-5624-cppcheck@1eab72938451_devel/4.html @@ -0,0 +1,6042 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
   1
+   2
+   3
+   4
+   5
+   6
+   7
+   8
+   9
+  10
+  11
+  12
+  13
+  14
+  15
+  16
+  17
+  18
+  19
+  20
+  21
+  22
+  23
+  24
+  25
+  26
+  27
+  28
+  29
+  30
+  31
+  32
+  33
+  34
+  35
+  36
+  37
+  38
+  39
+  40
+  41
+  42
+  43
+  44
+  45
+  46
+  47
+  48
+  49
+  50
+  51
+  52
+  53
+  54
+  55
+  56
+  57
+  58
+  59
+  60
+  61
+  62
+  63
+  64
+  65
+  66
+  67
+  68
+  69
+  70
+  71
+  72
+  73
+  74
+  75
+  76
+  77
+  78
+  79
+  80
+  81
+  82
+  83
+  84
+  85
+  86
+  87
+  88
+  89
+  90
+  91
+  92
+  93
+  94
+  95
+  96
+  97
+  98
+  99
+ 100
+ 101
+ 102
+ 103
+ 104
+ 105
+ 106
+ 107
+ 108
+ 109
+ 110
+ 111
+ 112
+ 113
+ 114
+ 115
+ 116
+ 117
+ 118
+ 119
+ 120
+ 121
+ 122
+ 123
+ 124
+ 125
+ 126
+ 127
+ 128
+ 129
+ 130
+ 131
+ 132
+ 133
+ 134
+ 135
+ 136
+ 137
+ 138
+ 139
+ 140
+ 141
+ 142
+ 143
+ 144
+ 145
+ 146
+ 147
+ 148
+ 149
+ 150
+ 151
+ 152
+ 153
+ 154
+ 155
+ 156
+ 157
+ 158
+ 159
+ 160
+ 161
+ 162
+ 163
+ 164
+ 165
+ 166
+ 167
+ 168
+ 169
+ 170
+ 171
+ 172
+ 173
+ 174
+ 175
+ 176
+ 177
+ 178
+ 179
+ 180
+ 181
+ 182
+ 183
+ 184
+ 185
+ 186
+ 187
+ 188
+ 189
+ 190
+ 191
+ 192
+ 193
+ 194
+ 195
+ 196
+ 197
+ 198
+ 199
+ 200
+ 201
+ 202
+ 203
+ 204
+ 205
+ 206
+ 207
+ 208
+ 209
+ 210
+ 211
+ 212
+ 213
+ 214
+ 215
+ 216
+ 217
+ 218
+ 219
+ 220
+ 221
+ 222
+ 223
+ 224
+ 225
+ 226
+ 227
+ 228
+ 229
+ 230
+ 231
+ 232
+ 233
+ 234
+ 235
+ 236
+ 237
+ 238
+ 239
+ 240
+ 241
+ 242
+ 243
+ 244
+ 245
+ 246
+ 247
+ 248
+ 249
+ 250
+ 251
+ 252
+ 253
+ 254
+ 255
+ 256
+ 257
+ 258
+ 259
+ 260
+ 261
+ 262
+ 263
+ 264
+ 265
+ 266
+ 267
+ 268
+ 269
+ 270
+ 271
+ 272
+ 273
+ 274
+ 275
+ 276
+ 277
+ 278
+ 279
+ 280
+ 281
+ 282
+ 283
+ 284
+ 285
+ 286
+ 287
+ 288
+ 289
+ 290
+ 291
+ 292
+ 293
+ 294
+ 295
+ 296
+ 297
+ 298
+ 299
+ 300
+ 301
+ 302
+ 303
+ 304
+ 305
+ 306
+ 307
+ 308
+ 309
+ 310
+ 311
+ 312
+ 313
+ 314
+ 315
+ 316
+ 317
+ 318
+ 319
+ 320
+ 321
+ 322
+ 323
+ 324
+ 325
+ 326
+ 327
+ 328
+ 329
+ 330
+ 331
+ 332
+ 333
+ 334
+ 335
+ 336
+ 337
+ 338
+ 339
+ 340
+ 341
+ 342
+ 343
+ 344
+ 345
+ 346
+ 347
+ 348
+ 349
+ 350
+ 351
+ 352
+ 353
+ 354
+ 355
+ 356
+ 357
+ 358
+ 359
+ 360
+ 361
+ 362
+ 363
+ 364
+ 365
+ 366
+ 367
+ 368
+ 369
+ 370
+ 371
+ 372
+ 373
+ 374
+ 375
+ 376
+ 377
+ 378
+ 379
+ 380
+ 381
+ 382
+ 383
+ 384
+ 385
+ 386
+ 387
+ 388
+ 389
+ 390
+ 391
+ 392
+ 393
+ 394
+ 395
+ 396
+ 397
+ 398
+ 399
+ 400
+ 401
+ 402
+ 403
+ 404
+ 405
+ 406
+ 407
+ 408
+ 409
+ 410
+ 411
+ 412
+ 413
+ 414
+ 415
+ 416
+ 417
+ 418
+ 419
+ 420
+ 421
+ 422
+ 423
+ 424
+ 425
+ 426
+ 427
+ 428
+ 429
+ 430
+ 431
+ 432
+ 433
+ 434
+ 435
+ 436
+ 437
+ 438
+ 439
+ 440
+ 441
+ 442
+ 443
+ 444
+ 445
+ 446
+ 447
+ 448
+ 449
+ 450
+ 451
+ 452
+ 453
+ 454
+ 455
+ 456
+ 457
+ 458
+ 459
+ 460
+ 461
+ 462
+ 463
+ 464
+ 465
+ 466
+ 467
+ 468
+ 469
+ 470
+ 471
+ 472
+ 473
+ 474
+ 475
+ 476
+ 477
+ 478
+ 479
+ 480
+ 481
+ 482
+ 483
+ 484
+ 485
+ 486
+ 487
+ 488
+ 489
+ 490
+ 491
+ 492
+ 493
+ 494
+ 495
+ 496
+ 497
+ 498
+ 499
+ 500
+ 501
+ 502
+ 503
+ 504
+ 505
+ 506
+ 507
+ 508
+ 509
+ 510
+ 511
+ 512
+ 513
+ 514
+ 515
+ 516
+ 517
+ 518
+ 519
+ 520
+ 521
+ 522
+ 523
+ 524
+ 525
+ 526
+ 527
+ 528
+ 529
+ 530
+ 531
+ 532
+ 533
+ 534
+ 535
+ 536
+ 537
+ 538
+ 539
+ 540
+ 541
+ 542
+ 543
+ 544
+ 545
+ 546
+ 547
+ 548
+ 549
+ 550
+ 551
+ 552
+ 553
+ 554
+ 555
+ 556
+ 557
+ 558
+ 559
+ 560
+ 561
+ 562
+ 563
+ 564
+ 565
+ 566
+ 567
+ 568
+ 569
+ 570
+ 571
+ 572
+ 573
+ 574
+ 575
+ 576
+ 577
+ 578
+ 579
+ 580
+ 581
+ 582
+ 583
+ 584
+ 585
+ 586
+ 587
+ 588
+ 589
+ 590
+ 591
+ 592
+ 593
+ 594
+ 595
+ 596
+ 597
+ 598
+ 599
+ 600
+ 601
+ 602
+ 603
+ 604
+ 605
+ 606
+ 607
+ 608
+ 609
+ 610
+ 611
+ 612
+ 613
+ 614
+ 615
+ 616
+ 617
+ 618
+ 619
+ 620
+ 621
+ 622
+ 623
+ 624
+ 625
+ 626
+ 627
+ 628
+ 629
+ 630
+ 631
+ 632
+ 633
+ 634
+ 635
+ 636
+ 637
+ 638
+ 639
+ 640
+ 641
+ 642
+ 643
+ 644
+ 645
+ 646
+ 647
+ 648
+ 649
+ 650
+ 651
+ 652
+ 653
+ 654
+ 655
+ 656
+ 657
+ 658
+ 659
+ 660
+ 661
+ 662
+ 663
+ 664
+ 665
+ 666
+ 667
+ 668
+ 669
+ 670
+ 671
+ 672
+ 673
+ 674
+ 675
+ 676
+ 677
+ 678
+ 679
+ 680
+ 681
+ 682
+ 683
+ 684
+ 685
+ 686
+ 687
+ 688
+ 689
+ 690
+ 691
+ 692
+ 693
+ 694
+ 695
+ 696
+ 697
+ 698
+ 699
+ 700
+ 701
+ 702
+ 703
+ 704
+ 705
+ 706
+ 707
+ 708
+ 709
+ 710
+ 711
+ 712
+ 713
+ 714
+ 715
+ 716
+ 717
+ 718
+ 719
+ 720
+ 721
+ 722
+ 723
+ 724
+ 725
+ 726
+ 727
+ 728
+ 729
+ 730
+ 731
+ 732
+ 733
+ 734
+ 735
+ 736
+ 737
+ 738
+ 739
+ 740
+ 741
+ 742
+ 743
+ 744
+ 745
+ 746
+ 747
+ 748
+ 749
+ 750
+ 751
+ 752
+ 753
+ 754
+ 755
+ 756
+ 757
+ 758
+ 759
+ 760
+ 761
+ 762
+ 763
+ 764
+ 765
+ 766
+ 767
+ 768
+ 769
+ 770
+ 771
+ 772
+ 773
+ 774
+ 775
+ 776
+ 777
+ 778
+ 779
+ 780
+ 781
+ 782
+ 783
+ 784
+ 785
+ 786
+ 787
+ 788
+ 789
+ 790
+ 791
+ 792
+ 793
+ 794
+ 795
+ 796
+ 797
+ 798
+ 799
+ 800
+ 801
+ 802
+ 803
+ 804
+ 805
+ 806
+ 807
+ 808
+ 809
+ 810
+ 811
+ 812
+ 813
+ 814
+ 815
+ 816
+ 817
+ 818
+ 819
+ 820
+ 821
+ 822
+ 823
+ 824
+ 825
+ 826
+ 827
+ 828
+ 829
+ 830
+ 831
+ 832
+ 833
+ 834
+ 835
+ 836
+ 837
+ 838
+ 839
+ 840
+ 841
+ 842
+ 843
+ 844
+ 845
+ 846
+ 847
+ 848
+ 849
+ 850
+ 851
+ 852
+ 853
+ 854
+ 855
+ 856
+ 857
+ 858
+ 859
+ 860
+ 861
+ 862
+ 863
+ 864
+ 865
+ 866
+ 867
+ 868
+ 869
+ 870
+ 871
+ 872
+ 873
+ 874
+ 875
+ 876
+ 877
+ 878
+ 879
+ 880
+ 881
+ 882
+ 883
+ 884
+ 885
+ 886
+ 887
+ 888
+ 889
+ 890
+ 891
+ 892
+ 893
+ 894
+ 895
+ 896
+ 897
+ 898
+ 899
+ 900
+ 901
+ 902
+ 903
+ 904
+ 905
+ 906
+ 907
+ 908
+ 909
+ 910
+ 911
+ 912
+ 913
+ 914
+ 915
+ 916
+ 917
+ 918
+ 919
+ 920
+ 921
+ 922
+ 923
+ 924
+ 925
+ 926
+ 927
+ 928
+ 929
+ 930
+ 931
+ 932
+ 933
+ 934
+ 935
+ 936
+ 937
+ 938
+ 939
+ 940
+ 941
+ 942
+ 943
+ 944
+ 945
+ 946
+ 947
+ 948
+ 949
+ 950
+ 951
+ 952
+ 953
+ 954
+ 955
+ 956
+ 957
+ 958
+ 959
+ 960
+ 961
+ 962
+ 963
+ 964
+ 965
+ 966
+ 967
+ 968
+ 969
+ 970
+ 971
+ 972
+ 973
+ 974
+ 975
+ 976
+ 977
+ 978
+ 979
+ 980
+ 981
+ 982
+ 983
+ 984
+ 985
+ 986
+ 987
+ 988
+ 989
+ 990
+ 991
+ 992
+ 993
+ 994
+ 995
+ 996
+ 997
+ 998
+ 999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+1011
+1012
+1013
+1014
+1015
+1016
+1017
+1018
+1019
+1020
+1021
+1022
+1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
+1033
+1034
+1035
+1036
+1037
+1038
+1039
+1040
+1041
+1042
+1043
+1044
+1045
+1046
+1047
+1048
+1049
+1050
+1051
+1052
+1053
+1054
+1055
+1056
+1057
+1058
+1059
+1060
+1061
+1062
+1063
+1064
+1065
+1066
+1067
+1068
+1069
+1070
+1071
+1072
+1073
+1074
+1075
+1076
+1077
+1078
+1079
+1080
+1081
+1082
+1083
+1084
+1085
+1086
+1087
+1088
+1089
+1090
+1091
+1092
+1093
+1094
+1095
+1096
+1097
+1098
+1099
+1100
+1101
+1102
+1103
+1104
+1105
+1106
+1107
+1108
+1109
+1110
+1111
+1112
+1113
+1114
+1115
+1116
+1117
+1118
+1119
+1120
+1121
+1122
+1123
+1124
+1125
+1126
+1127
+1128
+1129
+1130
+1131
+1132
+1133
+1134
+1135
+1136
+1137
+1138
+1139
+1140
+1141
+1142
+1143
+1144
+1145
+1146
+1147
+1148
+1149
+1150
+1151
+1152
+1153
+1154
+1155
+1156
+1157
+1158
+1159
+1160
+1161
+1162
+1163
+1164
+1165
+1166
+1167
+1168
+1169
+1170
+1171
+1172
+1173
+1174
+1175
+1176
+1177
+1178
+1179
+1180
+1181
+1182
+1183
+1184
+1185
+1186
+1187
+1188
+1189
+1190
+1191
+1192
+1193
+1194
+1195
+1196
+1197
+1198
+1199
+1200
+1201
+1202
+1203
+1204
+1205
+1206
+1207
+1208
+1209
+1210
+1211
+1212
+1213
+1214
+1215
+1216
+1217
+1218
+1219
+1220
+1221
+1222
+1223
+1224
+1225
+1226
+1227
+1228
+1229
+1230
+1231
+1232
+1233
+1234
+1235
+1236
+1237
+1238
+1239
+1240
+1241
+1242
+1243
+1244
+1245
+1246
+1247
+1248
+1249
+1250
+1251
+1252
+1253
+1254
+1255
+1256
+1257
+1258
+1259
+1260
+1261
+1262
+1263
+1264
+1265
+1266
+1267
+1268
+1269
+1270
+1271
+1272
+1273
+1274
+1275
+1276
+1277
+1278
+1279
+1280
+1281
+1282
+1283
+1284
+1285
+1286
+1287
+1288
+1289
+1290
+1291
+1292
+1293
+1294
+1295
+1296
+1297
+1298
+1299
+1300
+1301
+1302
+1303
+1304
+1305
+1306
+1307
+1308
+1309
+1310
+1311
+1312
+1313
+1314
+1315
+1316
+1317
+1318
+1319
+1320
+1321
+1322
+1323
+1324
+1325
+1326
+1327
+1328
+1329
+1330
+1331
+1332
+1333
+1334
+1335
+1336
+1337
+1338
+1339
+1340
+1341
+1342
+1343
+1344
+1345
+1346
+1347
+1348
+1349
+1350
+1351
+1352
+1353
+1354
+1355
+1356
+1357
+1358
+1359
+1360
+1361
+1362
+1363
+1364
+1365
+1366
+1367
+1368
+1369
+1370
+1371
+1372
+1373
+1374
+1375
+1376
+1377
+1378
+1379
+1380
+1381
+1382
+1383
+1384
+1385
+1386
+1387
+1388
+1389
+1390
+1391
+1392
+1393
+1394
+1395
+1396
+1397
+1398
+1399
+1400
+1401
+1402
+1403
+1404
+1405
+1406
+1407
+1408
+1409
+1410
+1411
+1412
+1413
+1414
+1415
+1416
+1417
+1418
+1419
+1420
+1421
+1422
+1423
+1424
+1425
+1426
+1427
+1428
+1429
+1430
+1431
+1432
+1433
+1434
+1435
+1436
+1437
+1438
+1439
+1440
+1441
+1442
+1443
+1444
+1445
+1446
+1447
+1448
+1449
+1450
+1451
+1452
+1453
+1454
+1455
+1456
+1457
+1458
+1459
+1460
+1461
+1462
+1463
+1464
+1465
+1466
+1467
+1468
+1469
+1470
+1471
+1472
+1473
+1474
+1475
+1476
+1477
+1478
+1479
+1480
+1481
+1482
+1483
+1484
+1485
+1486
+1487
+1488
+1489
+1490
+1491
+1492
+1493
+1494
+1495
+1496
+1497
+1498
+1499
+1500
+1501
+1502
+1503
+1504
+1505
+1506
+1507
+1508
+1509
+1510
+1511
+1512
+1513
+1514
+1515
+1516
+1517
+1518
+1519
+1520
+1521
+1522
+1523
+1524
+1525
+1526
+1527
+1528
+1529
+1530
+1531
+1532
+1533
+1534
+1535
+1536
+1537
+1538
+1539
+1540
+1541
+1542
+1543
+1544
+1545
+1546
+1547
+1548
+1549
+1550
+1551
+1552
+1553
+1554
+1555
+1556
+1557
+1558
+1559
+1560
+1561
+1562
+1563
+1564
+1565
+1566
+1567
+1568
+1569
+1570
+1571
+1572
+1573
+1574
+1575
+1576
+1577
+1578
+1579
+1580
+1581
+1582
+1583
+1584
+1585
+1586
+1587
+1588
+1589
+1590
+1591
+1592
+1593
+1594
+1595
+1596
+1597
+1598
+1599
+1600
+1601
+1602
+1603
+1604
+1605
+1606
+1607
+1608
+1609
+1610
+1611
+1612
+1613
+1614
+1615
+1616
+1617
+1618
+1619
+1620
+1621
+1622
+1623
+1624
+1625
+1626
+1627
+1628
+1629
+1630
+1631
+1632
+1633
+1634
+1635
+1636
+1637
+1638
+1639
+1640
+1641
+1642
+1643
+1644
+1645
+1646
+1647
+1648
+1649
+1650
+1651
+1652
+1653
+1654
+1655
+1656
+1657
+1658
+1659
+1660
+1661
+1662
+1663
+1664
+1665
+1666
+1667
+1668
+1669
+1670
+1671
+1672
+1673
+1674
+1675
+1676
+1677
+1678
+1679
+1680
+1681
+1682
+1683
+1684
+1685
+1686
+1687
+1688
+1689
+1690
+1691
+1692
+1693
+1694
+1695
+1696
+1697
+1698
+1699
+1700
+1701
+1702
+1703
+1704
+1705
+1706
+1707
+1708
+1709
+1710
+1711
+1712
+1713
+1714
+1715
+1716
+1717
+1718
+1719
+1720
+1721
+1722
+1723
+1724
+1725
+1726
+1727
+1728
+1729
+1730
+1731
+1732
+1733
+1734
+1735
+1736
+1737
+1738
+1739
+1740
+1741
+1742
+1743
+1744
+1745
+1746
+1747
+1748
+1749
+1750
+1751
+1752
+1753
+1754
+1755
+1756
+1757
+1758
+1759
+1760
+1761
+1762
+1763
+1764
+1765
+1766
+1767
+1768
+1769
+1770
+1771
+1772
+1773
+1774
+1775
+1776
+1777
+1778
+1779
+1780
+1781
+1782
+1783
+1784
+1785
+1786
+1787
+1788
+1789
+1790
+1791
+1792
+1793
+1794
+1795
+1796
+1797
+1798
+1799
+1800
+1801
+1802
+1803
+1804
+1805
+1806
+1807
+1808
+1809
+1810
+1811
+1812
+1813
+1814
+1815
+1816
+1817
+1818
+1819
+1820
+1821
+1822
+1823
+1824
+1825
+1826
+1827
+1828
+1829
+1830
+1831
+1832
+1833
+1834
+1835
+1836
+1837
+1838
+1839
+1840
+1841
+1842
+1843
+1844
+1845
+1846
+1847
+1848
+1849
+1850
+1851
+1852
+1853
+1854
+1855
+1856
+1857
+1858
+1859
+1860
+1861
+1862
+1863
+1864
+1865
+1866
+1867
+1868
+1869
+1870
+1871
+1872
+1873
+1874
+1875
+1876
+1877
+1878
+1879
+1880
+1881
+1882
+1883
+1884
+1885
+1886
+1887
+1888
+1889
+1890
+1891
+1892
+1893
+1894
+1895
+1896
+1897
+1898
+1899
+1900
+1901
+1902
+1903
+1904
+1905
+1906
+1907
+1908
+1909
+1910
+1911
+1912
+1913
+1914
+1915
+1916
+1917
+1918
+1919
+1920
+1921
+1922
+1923
+1924
+1925
+1926
+1927
+1928
+1929
+1930
+1931
+1932
+1933
+1934
+1935
+1936
+1937
+1938
+1939
+1940
+1941
+1942
+1943
+1944
+1945
+1946
+1947
+1948
+1949
+1950
+1951
+1952
+1953
+1954
+1955
+1956
+1957
+1958
+1959
+1960
+1961
+1962
+1963
+1964
+1965
+1966
+1967
+1968
+1969
+1970
+1971
+1972
+1973
+1974
+1975
+1976
+1977
+1978
+1979
+1980
+1981
+1982
+1983
+1984
+1985
+1986
+1987
+1988
+1989
+1990
+1991
+1992
+1993
+1994
+1995
+1996
+1997
+1998
+1999
+2000
+2001
+2002
+2003
+2004
+2005
+2006
+2007
+2008
+2009
+2010
+2011
+2012
+2013
+2014
+2015
+2016
+2017
+2018
+2019
+2020
+2021
+2022
+2023
+2024
+2025
+2026
+2027
+2028
+2029
+2030
+2031
+2032
+2033
+2034
+2035
+2036
+2037
+2038
+2039
+2040
+2041
+2042
+2043
+2044
+2045
+2046
+2047
+2048
+2049
+2050
+2051
+2052
+2053
+2054
+2055
+2056
+2057
+2058
+2059
+2060
+2061
+2062
+2063
+2064
+2065
+2066
+2067
+2068
+2069
+2070
+2071
+2072
+2073
+2074
+2075
+2076
+2077
+2078
+2079
+2080
+2081
+2082
+2083
+2084
+2085
+2086
+2087
+2088
+2089
+2090
+2091
+2092
+2093
+2094
+2095
+2096
+2097
+2098
+2099
+2100
+2101
+2102
+2103
+2104
+2105
+2106
+2107
+2108
+2109
+2110
+2111
+2112
+2113
+2114
+2115
+2116
+2117
+2118
+2119
+2120
+2121
+2122
+2123
+2124
+2125
+2126
+2127
+2128
+2129
+2130
+2131
+2132
+2133
+2134
+2135
+2136
+2137
+2138
+2139
+2140
+2141
+2142
+2143
+2144
+2145
+2146
+2147
+2148
+2149
+2150
+2151
+2152
+2153
+2154
+2155
+2156
+2157
+2158
+2159
+2160
+2161
+2162
+2163
+2164
+2165
+2166
+2167
+2168
+2169
+2170
+2171
+2172
+2173
+2174
+2175
+2176
+2177
+2178
+2179
+2180
+2181
+2182
+2183
+2184
+2185
+2186
+2187
+2188
+2189
+2190
+2191
+2192
+2193
+2194
+2195
+2196
+2197
+2198
+2199
+2200
+2201
+2202
+2203
+2204
+2205
+2206
+2207
+2208
+2209
+2210
+2211
+2212
+2213
+2214
+2215
+2216
+2217
+2218
+2219
+2220
+2221
+2222
+2223
+2224
+2225
+2226
+2227
+2228
+2229
+2230
+2231
+2232
+2233
+2234
+2235
+2236
+2237
+2238
+2239
+2240
+2241
+2242
+2243
+2244
+2245
+2246
+2247
+2248
+2249
+2250
+2251
+2252
+2253
+2254
+2255
+2256
+2257
+2258
+2259
+2260
+2261
+2262
+2263
+2264
+2265
+2266
+2267
+2268
+2269
+2270
+2271
+2272
+2273
+2274
+2275
+2276
+2277
+2278
+2279
+2280
+2281
+2282
+2283
+2284
+2285
+2286
+2287
+2288
+2289
+2290
+2291
+2292
+2293
+2294
+2295
+2296
+2297
+2298
+2299
+2300
+2301
+2302
+2303
+2304
+2305
+2306
+2307
+2308
+2309
+2310
+2311
+2312
+2313
+2314
+2315
+2316
+2317
+2318
+2319
+2320
+2321
+2322
+2323
+2324
+2325
+2326
+2327
+2328
+2329
+2330
+2331
+2332
+2333
+2334
+2335
+2336
+2337
+2338
+2339
+2340
+2341
+2342
+2343
+2344
+2345
+2346
+2347
+2348
+2349
+2350
+2351
+2352
+2353
+2354
+2355
+2356
+2357
+2358
+2359
+2360
+2361
+2362
+2363
+2364
+2365
+2366
+2367
+2368
+2369
+2370
+2371
+2372
+2373
+2374
+2375
+2376
+2377
+2378
+2379
+2380
+2381
+2382
+2383
+2384
+2385
+2386
+2387
+2388
+2389
+2390
+2391
+2392
+2393
+2394
+2395
+2396
+2397
+2398
+2399
+2400
+2401
+2402
+2403
+2404
+2405
+2406
+2407
+2408
+2409
+2410
+2411
+2412
+2413
+2414
+2415
+2416
+2417
+2418
+2419
+2420
+2421
+2422
+2423
+2424
+2425
+2426
+2427
+2428
+2429
+2430
+2431
+2432
+2433
+2434
+2435
+2436
+2437
+2438
+2439
+2440
+2441
+2442
+2443
+2444
+2445
+2446
+2447
+2448
+2449
+2450
+2451
+2452
+2453
+2454
+2455
+2456
+2457
+2458
+2459
+2460
+2461
+2462
+2463
+2464
+2465
+2466
+2467
+2468
+2469
+2470
+2471
+2472
+2473
+2474
+2475
+2476
+2477
+2478
+2479
+2480
+2481
+2482
+2483
+2484
+2485
+2486
+2487
+2488
+2489
+2490
+2491
+2492
+2493
+2494
+2495
+2496
+2497
+2498
+2499
+2500
+2501
+2502
+2503
+2504
+2505
+2506
+2507
+2508
+2509
+2510
+2511
+2512
+2513
+2514
+2515
+2516
+2517
+2518
+2519
+2520
+2521
+2522
+2523
+2524
+2525
+2526
+2527
+2528
+2529
+2530
+2531
+2532
+2533
+2534
+2535
+2536
+2537
+2538
+2539
+2540
+2541
+2542
+2543
+2544
+2545
+2546
+2547
+2548
+2549
+2550
+2551
+2552
+2553
+2554
+2555
+2556
+2557
+2558
+2559
+2560
+2561
+2562
+2563
+2564
+2565
+2566
+2567
+2568
+2569
+2570
+2571
+2572
+2573
+2574
+2575
+2576
+2577
+2578
+2579
+2580
+2581
+2582
+2583
+2584
+2585
+2586
+2587
+2588
+2589
+2590
+2591
+2592
+2593
+2594
+2595
+2596
+2597
+2598
+2599
+2600
+2601
+2602
+2603
+2604
+2605
+2606
+2607
+2608
+2609
+2610
+2611
+2612
+2613
+2614
+2615
+2616
+2617
+2618
+2619
+2620
+2621
+2622
+2623
+2624
+2625
+2626
+2627
+2628
+2629
+2630
+2631
+2632
+2633
+2634
+2635
+2636
+2637
+2638
+2639
+2640
+2641
+2642
+2643
+2644
+2645
+2646
+2647
+2648
+2649
+2650
+2651
+2652
+2653
+2654
+2655
+2656
+2657
+2658
+2659
+2660
+2661
+2662
+2663
+2664
+2665
+2666
+2667
+2668
+2669
+2670
+2671
+2672
+2673
+2674
+2675
+2676
+2677
+2678
+2679
+2680
+2681
+2682
+2683
+2684
+2685
+2686
+2687
+2688
+2689
+2690
+2691
+2692
+2693
+2694
+2695
+2696
+2697
+2698
+2699
+2700
+2701
+2702
+2703
+2704
+2705
+2706
+2707
+2708
+2709
+2710
+2711
+2712
+2713
+2714
+2715
+2716
+2717
+2718
+2719
+2720
+2721
+2722
+2723
+2724
+2725
+2726
+2727
+2728
+2729
+2730
+2731
+2732
+2733
+2734
+2735
+2736
+2737
+2738
+2739
+2740
+2741
+2742
+2743
+2744
+2745
+2746
+2747
+2748
+2749
+2750
+2751
+2752
+2753
+2754
+2755
+2756
+2757
+2758
+2759
+2760
+2761
+2762
+2763
+2764
+2765
+2766
+2767
+2768
+2769
+2770
+2771
+2772
+2773
+2774
+2775
+2776
+2777
+2778
+2779
+2780
+2781
+2782
+2783
+2784
+2785
+2786
+2787
+2788
+2789
+2790
+2791
+2792
+2793
+2794
+2795
+2796
+2797
+2798
+2799
+2800
+2801
+2802
+2803
+2804
+2805
+2806
+2807
+2808
+2809
+2810
+2811
+2812
+2813
+2814
+2815
+2816
+2817
+2818
+2819
+2820
+2821
+2822
+2823
+2824
+2825
+2826
+2827
+2828
+2829
+2830
+2831
+2832
+2833
+2834
+2835
+2836
+2837
+2838
+2839
+2840
+2841
+2842
+2843
+2844
+2845
+2846
+2847
+2848
+2849
+2850
+2851
+2852
+2853
+2854
+2855
+2856
+2857
+2858
+2859
+2860
+2861
+2862
+2863
+2864
+2865
+2866
+2867
+2868
+2869
+2870
+2871
+2872
+2873
+2874
+2875
+2876
+2877
+2878
+2879
+2880
+2881
+2882
+2883
+2884
+2885
+2886
+2887
+2888
+2889
+2890
+2891
+2892
+2893
+2894
+2895
+2896
+2897
+2898
+2899
+2900
+2901
+2902
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+#include <ctk/ctk.h>
+#include <cdk/cdkx.h>
+#include <cdk/cdkkeysyms.h>
+#include <X11/XKBlib.h>
+#include <X11/extensions/XKBgeom.h>
+#include <stdlib.h>
+#include <memory.h>
+#include <math.h>
+#include <glib/gi18n-lib.h>
+#include <libxklavier/xklavier.h>
+
+#include <cafekbd-keyboard-drawing.h>
+#include <cafekbd-keyboard-drawing-marshal.h>
+#include <cafekbd-util.h>
+
+#define INVALID_KEYCODE ((guint)(-1))
+
+#define CTK_RESPONSE_PRINT 2
+
+#define KEY_FONT_SIZE 12
+
+enum {
+	BAD_KEYCODE = 0,
+	NUM_SIGNALS
+};
+
+static guint cafekbd_keyboard_drawing_signals[NUM_SIGNALS] = { 0 };
+
+static void cafekbd_keyboard_drawing_set_mods (CafekbdKeyboardDrawing * drawing,
+					    guint mods);
+
+extern gboolean xkl_xkb_config_native_prepare (XklEngine * engine,
+					      const XklConfigRec * data,
+					      gpointer component_names);
+
+extern void xkl_xkb_config_native_cleanup (XklEngine * engine,
+					  gpointer component_names);
+
+
+static gint
+xkb_to_pixmap_coord (CafekbdKeyboardDrawingRenderContext * context, gint n)<--- Parameter 'context' can be declared as pointer to const
+{
+	return n * context->scale_numerator / context->scale_denominator;
+}
+
+static gdouble
+xkb_to_pixmap_double (CafekbdKeyboardDrawingRenderContext * context,<--- Parameter 'context' can be declared as pointer to const
+		      gdouble d)
+{
+	return d * context->scale_numerator / context->scale_denominator;
+}
+
+
+/* angle is in tenths of a degree; coordinates can be anything as (xkb,
+ * pixels, pango) as long as they are all the same */
+static void
+rotate_coordinate (gint origin_x,
+		   gint origin_y,
+		   gint x,
+		   gint y, gint angle, gint * rotated_x, gint * rotated_y)
+{
+	*rotated_x =
+	    origin_x + (x - origin_x) * cos (M_PI * angle / 1800.0) - (y -
+								       origin_y)
+	    * sin (M_PI * angle / 1800.0);
+	*rotated_y =
+	    origin_y + (x - origin_x) * sin (M_PI * angle / 1800.0) + (y -
+								       origin_y)
+	    * cos (M_PI * angle / 1800.0);
+}
+
+static gdouble
+length (gdouble x, gdouble y)
+{
+	return sqrt (x * x + y * y);
+}
+
+static gdouble
+point_line_distance (gdouble ax, gdouble ay, gdouble nx, gdouble ny)
+{
+	return ax * nx + ay * ny;
+}
+
+static void
+normal_form (gdouble ax, gdouble ay,
+	     gdouble bx, gdouble by,
+	     gdouble * nx, gdouble * ny, gdouble * d)
+{
+	gdouble l;
+
+	*nx = by - ay;
+	*ny = ax - bx;
+
+	l = length (*nx, *ny);
+
+	*nx /= l;
+	*ny /= l;
+
+	*d = point_line_distance (ax, ay, *nx, *ny);
+}
+
+static void
+inverse (gdouble a, gdouble b, gdouble c, gdouble d,
+	 gdouble * e, gdouble * f, gdouble * g, gdouble * h)
+{
+	gdouble det;
+
+	det = a * d - b * c;
+
+	*e = d / det;
+	*f = -b / det;
+	*g = -c / det;
+	*h = a / det;
+}
+
+static void
+multiply (gdouble a, gdouble b, gdouble c, gdouble d,
+	  gdouble e, gdouble f, gdouble * x, gdouble * y)
+{
+	*x = a * e + b * f;
+	*y = c * e + d * f;
+}
+
+static void
+intersect (gdouble n1x, gdouble n1y, gdouble d1,
+	   gdouble n2x, gdouble n2y, gdouble d2, gdouble * x, gdouble * y)
+{
+	gdouble e, f, g, h;
+
+	inverse (n1x, n1y, n2x, n2y, &e, &f, &g, &h);
+	multiply (e, f, g, h, d1, d2, x, y);
+}
+
+
+/* draw an angle from the current point to b and then to c,
+ * with a rounded corner of the given radius.
+ */
+static void
+rounded_corner (cairo_t * cr,
+		gdouble bx, gdouble by,
+		gdouble cx, gdouble cy, gdouble radius)
+{
+	gdouble ax, ay;
+	gdouble n1x, n1y, d1;
+	gdouble n2x, n2y, d2;
+	gdouble pd1, pd2;
+	gdouble ix, iy;
+	gdouble dist1, dist2;
+	gdouble nx, ny, d;
+	gdouble a1x, a1y, c1x, c1y;
+	gdouble phi1, phi2;
+
+	cairo_get_current_point (cr, &ax, &ay);
+#ifdef KBDRAW_DEBUG
+	printf ("        current point: (%f, %f), radius %f:\n", ax, ay,
+		radius);
+#endif
+
+	/* make sure radius is not too large */
+	dist1 = length (bx - ax, by - ay);
+	dist2 = length (cx - bx, cy - by);
+
+	radius = MIN (radius, MIN (dist1, dist2));
+
+	/* construct normal forms of the lines */
+	normal_form (ax, ay, bx, by, &n1x, &n1y, &d1);
+	normal_form (bx, by, cx, cy, &n2x, &n2y, &d2);
+
+	/* find which side of the line a,b the point c is on */
+	if (point_line_distance (cx, cy, n1x, n1y) < d1)
+		pd1 = d1 - radius;
+	else
+		pd1 = d1 + radius;
+
+	/* find which side of the line b,c the point a is on */
+	if (point_line_distance (ax, ay, n2x, n2y) < d2)
+		pd2 = d2 - radius;
+	else
+		pd2 = d2 + radius;
+
+	/* intersect the parallels to find the center of the arc */
+	intersect (n1x, n1y, pd1, n2x, n2y, pd2, &ix, &iy);
+
+	nx = (bx - ax) / dist1;
+	ny = (by - ay) / dist1;
+	d = point_line_distance (ix, iy, nx, ny);
+
+	/* a1 is the point on the line a-b where the arc starts */
+	intersect (n1x, n1y, d1, nx, ny, d, &a1x, &a1y);
+
+	nx = (cx - bx) / dist2;
+	ny = (cy - by) / dist2;
+	d = point_line_distance (ix, iy, nx, ny);
+
+	/* c1 is the point on the line b-c where the arc ends */
+	intersect (n2x, n2y, d2, nx, ny, d, &c1x, &c1y);
+
+	/* determine the first angle */
+	if (a1x - ix == 0)
+		phi1 = (a1y - iy > 0) ? M_PI_2 : 3 * M_PI_2;
+	else if (a1x - ix > 0)
+		phi1 = atan ((a1y - iy) / (a1x - ix));
+	else
+		phi1 = M_PI + atan ((a1y - iy) / (a1x - ix));
+
+	/* determine the second angle */
+	if (c1x - ix == 0)
+		phi2 = (c1y - iy > 0) ? M_PI_2 : 3 * M_PI_2;
+	else if (c1x - ix > 0)
+		phi2 = atan ((c1y - iy) / (c1x - ix));
+	else
+		phi2 = M_PI + atan ((c1y - iy) / (c1x - ix));
+
+	/* compute the difference between phi2 and phi1 mod 2pi */
+	d = phi2 - phi1;
+	while (d < 0)
+		d += 2 * M_PI;
+	while (d > 2 * M_PI)
+		d -= 2 * M_PI;
+
+#ifdef KBDRAW_DEBUG
+	printf ("        line 1 to: (%f, %f):\n", a1x, a1y);
+#endif
+	if (!(isnan (a1x) || isnan (a1y)))
+		cairo_line_to (cr, a1x, a1y);
+
+	/* pick the short arc from phi1 to phi2 */
+	if (d < M_PI)
+		cairo_arc (cr, ix, iy, radius, phi1, phi2);
+	else
+		cairo_arc_negative (cr, ix, iy, radius, phi1, phi2);
+
+#ifdef KBDRAW_DEBUG
+	printf ("        line 2 to: (%f, %f):\n", cx, cy);
+#endif
+	cairo_line_to (cr, cx, cy);
+}
+
+static void
+rounded_polygon (cairo_t * cr,
+		 gboolean filled,
+		 gdouble radius, CdkPoint * points, gint num_points)
+{
+	gint i, j;
+
+	cairo_move_to (cr,
+		       (gdouble) (points[num_points - 1].x +
+				  points[0].x) / 2,
+		       (gdouble) (points[num_points - 1].y +
+				  points[0].y) / 2);
+
+
+#ifdef KBDRAW_DEBUG
+	printf ("    rounded polygon of radius %f:\n", radius);
+#endif
+	for (i = 0; i < num_points; i++) {
+		j = (i + 1) % num_points;
+		rounded_corner (cr, (gdouble) points[i].x,
+				(gdouble) points[i].y,
+				(gdouble) (points[i].x + points[j].x) / 2,
+				(gdouble) (points[i].y + points[j].y) / 2,
+				radius);
+#ifdef KBDRAW_DEBUG
+		printf ("      corner (%d, %d) -> (%d, %d):\n",
+			points[i].x, points[i].y, points[j].x,
+			points[j].y);
+#endif
+	};
+	cairo_close_path (cr);
+
+	if (filled)
+		cairo_fill (cr);
+	else
+		cairo_stroke (cr);
+}
+
+static void
+draw_polygon (CafekbdKeyboardDrawingRenderContext * context,
+	      CdkRGBA * fill_color,
+	      gint xkb_x,
+	      gint xkb_y, XkbPointRec * xkb_points, guint num_points,
+	      gdouble radius)
+{
+	CdkPoint *points;
+	gboolean filled;
+	gint i;
+
+	if (fill_color) {
+		filled = TRUE;
+	} else {
+		fill_color = &context->dark_color;
+		filled = FALSE;
+	}
+
+	cdk_cairo_set_source_rgba (context->cr, fill_color);
+
+	points = g_new (CdkPoint, num_points);
+
+#ifdef KBDRAW_DEBUG
+	printf ("    Polygon points:\n");
+#endif
+	for (i = 0; i < num_points; i++) {
+		points[i].x =
+		    xkb_to_pixmap_coord (context, xkb_x + xkb_points[i].x);
+		points[i].y =
+		    xkb_to_pixmap_coord (context, xkb_y + xkb_points[i].y);
+#ifdef KBDRAW_DEBUG
+		printf ("      %d, %d\n", points[i].x, points[i].y);
+#endif
+	}
+
+	rounded_polygon (context->cr, filled,
+			 xkb_to_pixmap_double (context, radius),
+			 points, num_points);
+
+	g_free (points);
+}
+
+static void
+curve_rectangle (cairo_t * cr,
+		 gdouble x0,
+		 gdouble y0, gdouble width, gdouble height, gdouble radius)
+{
+	gdouble x1, y1;
+
+	if (!width || !height)
+		return;
+
+	x1 = x0 + width;
+	y1 = y0 + height;
+
+	radius = MIN (radius, MIN (width / 2, height / 2));
+
+	cairo_move_to (cr, x0, y0 + radius);
+	cairo_arc (cr, x0 + radius, y0 + radius, radius, M_PI,
+		   3 * M_PI / 2);
+	cairo_line_to (cr, x1 - radius, y0);
+	cairo_arc (cr, x1 - radius, y0 + radius, radius, 3 * M_PI / 2,
+		   2 * M_PI);
+	cairo_line_to (cr, x1, y1 - radius);
+	cairo_arc (cr, x1 - radius, y1 - radius, radius, 0, M_PI / 2);
+	cairo_line_to (cr, x0 + radius, y1);
+	cairo_arc (cr, x0 + radius, y1 - radius, radius, M_PI / 2, M_PI);
+
+	cairo_close_path (cr);
+}
+
+static void
+draw_curve_rectangle (cairo_t * cr,
+		      gboolean filled,
+		      CdkRGBA * fill_color,
+		      gint x, gint y, gint width, gint height, gint radius)
+{
+	curve_rectangle (cr, x, y, width, height, radius);
+
+	cdk_cairo_set_source_rgba (cr, fill_color);
+
+	if (filled)
+		cairo_fill (cr);
+	else
+		cairo_stroke (cr);
+}
+
+/* x, y, width, height are in the xkb coordinate system */
+static void
+draw_rectangle (CafekbdKeyboardDrawingRenderContext * context,
+		CdkRGBA * fill_color,
+		gint angle,
+		gint xkb_x, gint xkb_y, gint xkb_width, gint xkb_height,
+		gint radius)
+{
+	if (angle == 0) {
+		gint x, y, width, height;
+		gboolean filled;
+
+		if (fill_color) {
+			filled = TRUE;
+		} else {
+			fill_color = &context->dark_color;
+			filled = FALSE;
+		}
+
+		x = xkb_to_pixmap_coord (context, xkb_x);
+		y = xkb_to_pixmap_coord (context, xkb_y);
+		width =
+		    xkb_to_pixmap_coord (context, xkb_x + xkb_width) - x;
+		height =
+		    xkb_to_pixmap_coord (context, xkb_y + xkb_height) - y;
+
+		draw_curve_rectangle (context->cr, filled, fill_color,
+				      x, y, width, height,
+				      xkb_to_pixmap_double (context,
+							    radius));
+	} else {
+		XkbPointRec points[4];
+		gint x, y;
+
+		points[0].x = xkb_x;
+		points[0].y = xkb_y;
+		rotate_coordinate (xkb_x, xkb_y, xkb_x + xkb_width, xkb_y,
+				   angle, &x, &y);
+		points[1].x = x;
+		points[1].y = y;
+		rotate_coordinate (xkb_x, xkb_y, xkb_x + xkb_width,
+				   xkb_y + xkb_height, angle, &x, &y);
+		points[2].x = x;
+		points[2].y = y;
+		rotate_coordinate (xkb_x, xkb_y, xkb_x, xkb_y + xkb_height,
+				   angle, &x, &y);
+		points[3].x = x;
+		points[3].y = y;
+
+		/* the points we've calculated are relative to 0,0 */
+		draw_polygon (context, fill_color, 0, 0, points, 4,
+			      radius);
+	}
+}
+
+static void
+draw_outline (CafekbdKeyboardDrawingRenderContext * context,
+	      XkbOutlineRec * outline,
+	      CdkRGBA * color,
+	      gint angle, gint origin_x, gint origin_y)
+{
+#ifdef KBDRAW_DEBUG
+	printf (" num_points in %p: %d\n", outline, outline->num_points);
+#endif
+
+	if (outline->num_points == 1) {
+		if (color)
+			draw_rectangle (context, color, angle, origin_x,
+					origin_y, outline->points[0].x,
+					outline->points[0].y,
+					outline->corner_radius);
+
+#ifdef KBDRAW_DEBUG
+		printf ("pointsxy:%d %d %d\n", outline->points[0].x,
+			outline->points[0].y, outline->corner_radius);
+#endif
+
+		draw_rectangle (context, NULL, angle, origin_x, origin_y,
+				outline->points[0].x,
+				outline->points[0].y,
+				outline->corner_radius);
+	} else if (outline->num_points == 2) {
+		gint rotated_x0, rotated_y0;
+
+		rotate_coordinate (origin_x, origin_y,
+				   origin_x + outline->points[0].x,
+				   origin_y + outline->points[0].y,
+				   angle, &rotated_x0, &rotated_y0);
+		if (color)
+			draw_rectangle (context, color, angle, rotated_x0,
+					rotated_y0, outline->points[1].x,
+					outline->points[1].y,
+					outline->corner_radius);
+
+		draw_rectangle (context, NULL, angle, rotated_x0,
+				rotated_y0, outline->points[1].x,
+				outline->points[1].y,
+				outline->corner_radius);
+	} else {
+		if (color)
+			draw_polygon (context, color, origin_x, origin_y,
+				      outline->points,
+				      outline->num_points,
+				      outline->corner_radius);
+
+		draw_polygon (context, NULL, origin_x, origin_y,
+			      outline->points, outline->num_points,
+			      outline->corner_radius);
+	}
+}
+
+/* see PSColorDef in xkbprint */
+static gboolean
+parse_xkb_color_spec (gchar * colorspec, CdkRGBA * color)
+{
+	glong level;
+
+	color->alpha = 1.0;
+
+	if (g_ascii_strcasecmp (colorspec, "black") == 0) {
+		color->red = 0;
+		color->green = 0;
+		color->blue = 0;
+	} else if (g_ascii_strcasecmp (colorspec, "white") == 0) {
+		color->red = 1.0;
+		color->green = 1.0;
+		color->blue = 1.0;
+	} else if (g_ascii_strncasecmp (colorspec, "grey", 4) == 0 ||
+		   g_ascii_strncasecmp (colorspec, "gray", 4) == 0) {
+		level = strtol (colorspec + 4, NULL, 10);
+
+		color->red = 1.0 - 1.0 * level / 100.0;
+		color->green = 1.0 - 1.0 * level / 100.0;
+		color->blue = 1.0 - 1.0 * level / 100.0;
+	} else if (g_ascii_strcasecmp (colorspec, "red") == 0) {
+		color->red = 1.0;
+		color->green = 0;
+		color->blue = 0;
+	} else if (g_ascii_strcasecmp (colorspec, "green") == 0) {
+		color->red = 0;
+		color->green = 1.0;
+		color->blue = 0;
+	} else if (g_ascii_strcasecmp (colorspec, "blue") == 0) {
+		color->red = 0;
+		color->green = 0;
+		color->blue = 1.0;
+	} else if (g_ascii_strncasecmp (colorspec, "red", 3) == 0) {
+		level = strtol (colorspec + 3, NULL, 10);
+
+		color->red = 1.0 * level / 100.0;
+		color->green = 0;
+		color->blue = 0;
+	} else if (g_ascii_strncasecmp (colorspec, "green", 5) == 0) {
+		level = strtol (colorspec + 5, NULL, 10);
+
+		color->red = 0;
+		color->green = 1.0 * level / 100.0;
+		color->blue = 0;
+	} else if (g_ascii_strncasecmp (colorspec, "blue", 4) == 0) {
+		level = strtol (colorspec + 4, NULL, 10);
+
+		color->red = 0;
+		color->green = 0;
+		color->blue = 1.0 * level / 100.0;
+	} else
+		return FALSE;
+
+	return TRUE;
+}
+
+
+static guint
+find_keycode (CafekbdKeyboardDrawing * drawing, gchar * key_name)
+{
+#define KEYSYM_NAME_MAX_LENGTH 4
+	guint keycode;
+	gint i, j;
+	XkbKeyNamePtr pkey;
+	XkbKeyAliasPtr palias;
+	guint is_name_matched;
+	gchar *src, *dst;
+
+	if (!drawing->xkb)
+		return INVALID_KEYCODE;
+
+#ifdef KBDRAW_DEBUG
+	printf ("    looking for keycode for (%c%c%c%c)\n",
+		key_name[0], key_name[1], key_name[2], key_name[3]);
+#endif
+
+	pkey = drawing->xkb->names->keys + drawing->xkb->min_key_code;
+	for (keycode = drawing->xkb->min_key_code;
+	     keycode <= drawing->xkb->max_key_code; keycode++) {
+		is_name_matched = 1;
+		src = key_name;
+		dst = pkey->name;
+		for (i = KEYSYM_NAME_MAX_LENGTH; --i >= 0;) {
+			if ('\0' == *src)
+				break;
+			if (*src++ != *dst++) {
+				is_name_matched = 0;
+				break;
+			}
+		}
+		if (is_name_matched) {
+#ifdef KBDRAW_DEBUG
+			printf ("      found keycode %u\n", keycode);
+#endif
+			return keycode;
+		}
+		pkey++;
+	}
+
+	palias = drawing->xkb->names->key_aliases;
+	for (j = drawing->xkb->names->num_key_aliases; --j >= 0;) {
+		is_name_matched = 1;
+		src = key_name;
+		dst = palias->alias;
+		for (i = KEYSYM_NAME_MAX_LENGTH; --i >= 0;) {
+			if ('\0' == *src)
+				break;
+			if (*src++ != *dst++) {
+				is_name_matched = 0;
+				break;
+			}
+		}
+
+		if (is_name_matched) {
+			keycode = find_keycode (drawing, palias->real);
+#ifdef KBDRAW_DEBUG
+			printf ("found alias keycode %u\n", keycode);
+#endif
+			return keycode;
+		}
+		palias++;
+	}
+
+	return INVALID_KEYCODE;
+}
+
+static void
+set_markup (CafekbdKeyboardDrawingRenderContext * context, gchar *txt)<--- Parameter 'context' can be declared as pointer to const
+{
+	PangoLayout *layout = context->layout;
+	txt = strcmp ("<", txt) ? txt : "&lt;";
+	txt = strcmp ("&", txt) ? txt : "&amp;";
+	if (g_utf8_strlen (txt, -1) > 1) {
+		gchar* buf =
+		    g_strdup_printf ("<span size=\"xx-small\">%s</span>", txt);
+		pango_layout_set_markup (layout, buf, -1);
+		g_free (buf);
+	} else {
+		pango_layout_set_markup (layout, txt, -1);
+	}
+}
+
+static void
+set_key_label_in_layout (CafekbdKeyboardDrawingRenderContext * context,
+			 guint keyval)
+{
+	gchar buf[5];
+	gunichar uc;
+
+	switch (keyval) {
+	case CDK_KEY_Scroll_Lock:
+		set_markup (context, _("Scroll\nLock"));
+		break;
+
+	case CDK_KEY_space:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_Sys_Req:
+		set_markup (context, _("Sys Rq"));
+		break;
+
+	case CDK_KEY_Page_Up:
+		set_markup (context, _("Page\nUp"));
+		break;
+
+	case CDK_KEY_Page_Down:
+		set_markup (context, _("Page\nDown"));
+		break;
+
+	case CDK_KEY_Num_Lock:
+		set_markup (context, _("Num\nLock"));
+		break;
+
+	case CDK_KEY_KP_Page_Up:
+		set_markup (context, _("Pg Up"));
+		break;
+
+	case CDK_KEY_KP_Page_Down:
+		set_markup (context, _("Pg Dn"));
+		break;
+
+	case CDK_KEY_KP_Home:
+		set_markup (context, _("Home"));
+		break;
+
+	case CDK_KEY_KP_Left:
+		set_markup (context, _("Left"));
+		break;
+
+	case CDK_KEY_KP_End:
+		set_markup (context, _("End"));
+		break;
+
+	case CDK_KEY_KP_Up:
+		set_markup (context, _("Up"));
+		break;
+
+	case CDK_KEY_KP_Begin:
+		set_markup (context, _("Begin"));
+		break;
+
+	case CDK_KEY_KP_Right:
+		set_markup (context, _("Right"));
+		break;
+
+	case CDK_KEY_KP_Enter:
+		set_markup (context, _("Enter"));
+		break;
+
+	case CDK_KEY_KP_Down:
+		set_markup (context, _("Down"));
+		break;
+
+	case CDK_KEY_KP_Insert:
+		set_markup (context, _("Ins"));
+		break;
+
+	case CDK_KEY_KP_Delete:
+		set_markup (context, _("Del"));
+		break;
+
+	/* 0xfe03 */
+	case CDK_KEY_ISO_Level3_Shift:
+		set_markup (context, _("ISO_Level3_Shift"));
+		break;
+
+	/* 0xfe20 */
+	case CDK_KEY_ISO_Left_Tab:
+		set_markup (context, _("Tab"));
+		break;
+
+	/* 0xff08 */
+	case CDK_KEY_BackSpace:
+		set_markup (context, _("BackSpace"));
+		break;
+
+	/* 0xff09 */
+	case CDK_KEY_Tab:
+		set_markup (context, _("Tab"));
+		break;
+
+	/* 0xff0d */
+	case CDK_KEY_Return:
+		set_markup (context, _("Return"));
+		break;
+
+	/* 0xff13 */
+	case CDK_KEY_Pause:
+		set_markup (context, _("Pause"));
+		break;
+
+	/* 0xff1b */
+	case CDK_KEY_Escape:
+		set_markup (context, _("Esc"));
+		break;
+
+	/* 0xff50 */
+	case CDK_KEY_Home:
+		set_markup (context, _("Home"));
+		break;
+
+	/* 0xff51 */
+	case CDK_KEY_Left:
+		set_markup (context, _("Left"));
+		break;
+
+	/* 0xff52 */
+	case CDK_KEY_Up:
+		set_markup (context, _("Up"));
+		break;
+
+	/* 0xff53 */
+	case CDK_KEY_Right:
+		set_markup (context, _("Right"));
+		break;
+
+	/* 0xff54 */
+	case CDK_KEY_Down:
+		set_markup (context, _("Down"));
+		break;
+
+	/* 0xff57 */
+	case CDK_KEY_End:
+		set_markup (context, _("End"));
+		break;
+
+	/* 0xff61 */
+	case CDK_KEY_Print:
+		set_markup (context, _("Print"));
+		break;
+
+	/* 0xff63 */
+	case CDK_KEY_Insert:
+		set_markup (context, _("Insert"));
+		break;
+
+	/* 0xff67 */
+	case CDK_KEY_Menu:
+		set_markup (context, _("Menu"));
+		break;
+
+	/* 0xffbe */
+	case CDK_KEY_F1:
+		set_markup (context, _("F1"));
+		break;
+
+	/* 0xffbf */
+	case CDK_KEY_F2:
+		set_markup (context, _("F2"));
+		break;
+
+	/* 0xffc0 */
+	case CDK_KEY_F3:
+		set_markup (context, _("F3"));
+		break;
+
+	/* 0xffc1 */
+	case CDK_KEY_F4:
+		set_markup (context, _("F4"));
+		break;
+
+	/* 0xffc2 */
+	case CDK_KEY_F5:
+		set_markup (context, _("F5"));
+		break;
+
+	/* 0xffc3 */
+	case CDK_KEY_F6:
+		set_markup (context, _("F6"));
+		break;
+
+	/* 0xffc4 */
+	case CDK_KEY_F7:
+		set_markup (context, _("F7"));
+		break;
+
+	/* 0xffc5 */
+	case CDK_KEY_F8:
+		set_markup (context, _("F8"));
+		break;
+
+	/* 0xffc6 */
+	case CDK_KEY_F9:
+		set_markup (context, _("F9"));
+		break;
+
+	/* 0xffc7 */
+	case CDK_KEY_F10:
+		set_markup (context, _("F10"));
+		break;
+
+	/* 0xffc8 */
+	case CDK_KEY_F11:
+		set_markup (context, _("F11"));
+		break;
+
+	/* 0xffc9 */
+	case CDK_KEY_F12:
+		set_markup (context, _("F12"));
+		break;
+
+	/* 0xffe1 */
+	case CDK_KEY_Shift_L:
+		set_markup (context, _("Shift"));
+		break;
+
+	/* 0xffe2 */
+	case CDK_KEY_Shift_R:
+		set_markup (context, _("Shift"));
+		break;
+
+	/* 0xffe3 */
+	case CDK_KEY_Control_L:
+		set_markup (context, _("Control"));
+		break;
+
+	/* 0xffe4 */
+	case CDK_KEY_Control_R:
+		set_markup (context, _("Control"));
+		break;
+
+	/* 0xffe5 */
+	case CDK_KEY_Caps_Lock:
+		set_markup (context, _("Caps\nLock"));
+		break;
+
+	/* 0xffe7 */
+	case CDK_KEY_Meta_L:
+		set_markup (context, _("Meta"));
+		break;
+
+	/* 0xffe9 */
+	case CDK_KEY_Alt_L:
+		set_markup (context, _("Alt"));
+		break;
+
+	/* 0xffeb */
+	case CDK_KEY_Super_L:
+		set_markup (context, _("Super"));
+		break;
+
+	/* 0xffec */
+	case CDK_KEY_Super_R:
+		set_markup (context, _("Super"));
+		break;
+
+	/* 0xffff */
+	case CDK_KEY_VoidSymbol:
+		set_markup (context, _("Delete"));
+		break;
+
+	case CDK_KEY_dead_grave:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_acute:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_circumflex:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_tilde:
+		set_markup (context, "~");
+		break;
+
+	case CDK_KEY_dead_macron:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_breve:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_abovedot:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_diaeresis:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_abovering:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_doubleacute:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_caron:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_cedilla:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_ogonek:
+		set_markup (context, "");
+		break;
+
+		/* case CDK_KEY_dead_iota:
+		 * case CDK_KEY_dead_voiced_sound:
+		 * case CDK_KEY_dead_semivoiced_sound: */
+
+	case CDK_KEY_dead_belowdot:
+		set_markup (context, " ");
+		break;
+
+	case CDK_KEY_horizconnector:
+		set_markup (context, _("horiz\nconn"));
+		break;
+
+	case CDK_KEY_Mode_switch:
+		set_markup (context, _("AltGr"));
+		break;
+
+	case CDK_KEY_Multi_key:
+		set_markup (context, _("Compose"));
+		break;
+
+	default:
+		uc = cdk_keyval_to_unicode (keyval);
+		if (uc != 0 && g_unichar_isgraph (uc)) {
+			buf[g_unichar_to_utf8 (uc, buf)] = '\0';
+			set_markup (context, buf);
+		} else {
+			gchar *name = cdk_keyval_name (keyval);
+			if (name) {
+				set_markup (context, name);
+			} else
+				set_markup (context, "");
+		}
+	}
+}
+
+
+static void
+draw_pango_layout (CafekbdKeyboardDrawingRenderContext * context,
+		   CafekbdKeyboardDrawing * drawing,
+		   gint angle, gint x, gint y)
+{
+	PangoLayout *layout = context->layout;
+	CdkRGBA *color;
+	PangoLayoutLine *line;
+	gint x_off, y_off;
+	gint i;
+
+	color =
+	    drawing->colors + (drawing->xkb->geom->label_color -
+			       drawing->xkb->geom->colors);
+
+	if (angle != context->angle) {
+		PangoMatrix matrix = PANGO_MATRIX_INIT;
+		pango_matrix_rotate (&matrix, -angle / 10.0);
+		pango_context_set_matrix (pango_layout_get_context
+					  (layout), &matrix);
+		pango_layout_context_changed (layout);
+		context->angle = angle;
+	}
+
+	i = 0;
+	y_off = 0;
+	for (line = pango_layout_get_line (layout, i);
+	     line != NULL; line = pango_layout_get_line (layout, ++i)) {
+		GSList *runp;<--- Variable 'runp' can be declared as pointer to const
+		PangoRectangle line_extents;
+
+		x_off = 0;
+
+		for (runp = line->runs; runp != NULL; runp = runp->next) {
+			PangoGlyphItem *run = runp->data;
+			gint j;
+
+			for (j = 0; j < run->glyphs->num_glyphs; j++) {
+				PangoGlyphGeometry *geometry;<--- Variable 'geometry' can be declared as pointer to const
+
+				geometry =
+				    &run->glyphs->glyphs[j].geometry;
+
+				x_off += geometry->width;
+			}
+		}
+
+		pango_layout_line_get_extents (line, NULL, &line_extents);
+		y_off +=
+		    line_extents.height +
+		    pango_layout_get_spacing (layout);
+	}
+
+	cairo_move_to (context->cr, x, y);
+	cdk_cairo_set_source_rgba (context->cr, color);
+	pango_cairo_show_layout (context->cr, layout);
+}
+
+static void
+draw_key_label_helper (CafekbdKeyboardDrawingRenderContext * context,
+		       CafekbdKeyboardDrawing * drawing,
+		       KeySym keysym,
+		       gint angle,
+		       CafekbdKeyboardDrawingGroupLevelPosition glp,
+		       gint x,
+		       gint y, gint width, gint height, gint padding)
+{
+	gint label_x, label_y, label_max_width, ycell;
+
+	if (keysym == 0)
+		return;
+#ifdef KBDRAW_DEBUG
+	printf ("keysym: %04X(%c) at glp: %d\n",
+		(unsigned) keysym, (char) keysym, (int) glp);
+#endif
+
+	switch (glp) {
+	case CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT:
+	case CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT:
+		{
+			ycell =
+			    glp == CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT;
+
+			rotate_coordinate (x, y, x + padding,
+					   y + padding + (height -
+							  2 * padding) *
+					   ycell * 4 / 7, angle, &label_x,
+					   &label_y);
+			label_max_width =
+			    PANGO_SCALE * (width - 2 * padding);
+			break;
+		}
+	case CAFEKBD_KEYBOARD_DRAWING_POS_TOPRIGHT:
+	case CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT:
+		{
+			ycell =
+			    glp == CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT;
+
+			rotate_coordinate (x, y,
+					   x + padding + (width -
+							  2 * padding) *
+					   4 / 7,
+					   y + padding + (height -
+							  2 * padding) *
+					   ycell * 4 / 7, angle, &label_x,
+					   &label_y);
+			label_max_width =
+			    PANGO_SCALE * ((width - 2 * padding) -
+					   (width - 2 * padding) * 4 / 7);
+			break;
+		}
+	default:
+		return;
+	}
+	set_key_label_in_layout (context, keysym);
+	pango_layout_set_width (context->layout, label_max_width);
+	label_y -= (pango_layout_get_line_count (context->layout) - 1) *
+	    (pango_font_description_get_size (context->font_desc) /
+	     PANGO_SCALE);
+	cairo_save (context->cr);
+	cairo_rectangle (context->cr, x + padding / 2, y + padding / 2,
+			 width - padding, height - padding);
+	cairo_clip (context->cr);
+	draw_pango_layout (context, drawing, angle, label_x, label_y);
+	cairo_restore (context->cr);
+}
+
+static void
+draw_key_label (CafekbdKeyboardDrawingRenderContext * context,
+		CafekbdKeyboardDrawing * drawing,
+		guint keycode,
+		gint angle,
+		gint xkb_origin_x,
+		gint xkb_origin_y, gint xkb_width, gint xkb_height)
+{
+	gint x, y, width, height;
+	gint padding;
+	gint g, l, glp;
+
+	if (!drawing->xkb)
+		return;
+
+	padding = 23 * context->scale_numerator / context->scale_denominator;	/* 2.3mm */
+
+	x = xkb_to_pixmap_coord (context, xkb_origin_x);
+	y = xkb_to_pixmap_coord (context, xkb_origin_y);
+	width =
+	    xkb_to_pixmap_coord (context, xkb_origin_x + xkb_width) - x;
+	height =
+	    xkb_to_pixmap_coord (context, xkb_origin_y + xkb_height) - y;
+
+	for (glp = CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT;
+	     glp < CAFEKBD_KEYBOARD_DRAWING_POS_TOTAL; glp++) {
+		if (drawing->groupLevels[glp] == NULL)
+			continue;
+		g = drawing->groupLevels[glp]->group;
+		l = drawing->groupLevels[glp]->level;
+
+		if (g < 0 || g >= XkbKeyNumGroups (drawing->xkb, keycode))
+			continue;
+		if (l < 0
+		    || l >= XkbKeyGroupWidth (drawing->xkb, keycode, g))
+			continue;
+
+		/* Skip "exotic" levels like the "Ctrl" level in PC_SYSREQ */
+		if (l > 0) {
+			guint mods = XkbKeyKeyType (drawing->xkb, keycode,
+						    g)->mods.mask;
+			if ((mods & (ShiftMask | drawing->l3mod)) == 0)
+				continue;
+		}
+
+		if (drawing->track_modifiers) {
+			guint mods_rtrn;
+			KeySym keysym;
+
+			if (XkbTranslateKeyCode (drawing->xkb, keycode,
+						 XkbBuildCoreState
+						 (drawing->mods, g),
+						 &mods_rtrn, &keysym)) {
+				draw_key_label_helper (context, drawing,
+						       keysym, angle, glp,
+						       x, y, width, height,
+						       padding);
+				/* reverse y order */
+			}
+		} else {
+			KeySym keysym;
+
+			keysym =
+			    XkbKeySymEntry (drawing->xkb, keycode, l, g);
+
+			draw_key_label_helper (context, drawing, keysym,
+					       angle, glp, x, y, width,
+					       height, padding);
+			/* reverse y order */
+		}
+	}
+}
+
+/*
+ * The x offset is calculated for complex shapes. It is the rightmost of the vertical lines in the outline
+ */
+static gint
+calc_origin_offset_x (XkbOutlineRec * outline)<--- Parameter 'outline' can be declared as pointer to const
+{
+	gint rv = 0;
+	gint i;
+	XkbPointPtr point = outline->points;
+	if (outline->num_points < 3)
+		return 0;
+	for (i = outline->num_points; --i > 0;) {
+		gint x1 = point->x;
+		gint y1 = point++->y;
+		gint x2 = point->x;
+		gint y2 = point->y;
+
+		/*vertical, bottom to top (clock-wise), on the left */
+		if ((x1 == x2) && (y1 > y2) && (x1 > rv)) {
+			rv = x1;
+		}
+	}
+	return rv;
+}
+
+/* groups are from 0-3 */
+static void
+draw_key (CafekbdKeyboardDrawingRenderContext * context,
+	  CafekbdKeyboardDrawing * drawing, CafekbdKeyboardDrawingKey * key)
+{
+	XkbShapeRec *shape;
+	CtkStyleContext *style_context;
+	CdkRGBA color;
+	XkbOutlineRec *outline;
+	int origin_offset_x;
+	/* gint i; */
+
+	if (!drawing->xkb)
+		return;
+
+#ifdef KBDRAW_DEBUG
+	printf ("shape: %p (base %p, index %d)\n",
+		drawing->xkb->geom->shapes + key->xkbkey->shape_ndx,
+		drawing->xkb->geom->shapes, key->xkbkey->shape_ndx);
+#endif
+
+	shape = drawing->xkb->geom->shapes + key->xkbkey->shape_ndx;
+
+	if (key->pressed) {
+		style_context = ctk_widget_get_style_context (CTK_WIDGET (drawing));
+		ctk_style_context_save (style_context);
+		ctk_style_context_add_class (style_context, CTK_STYLE_CLASS_VIEW);
+		ctk_style_context_get_background_color (style_context,
+		                                        CTK_STATE_FLAG_SELECTED,
+		                                        &color);
+		ctk_style_context_restore (style_context);
+	 } else
+		color = *(drawing->colors + key->xkbkey->color_ndx);
+
+#ifdef KBDRAW_DEBUG
+	printf
+	    (" outlines base in the shape: %p (total: %d), origin: (%d, %d), angle %d\n",
+	     shape->outlines, shape->num_outlines, key->origin_x,
+	     key->origin_y, key->angle);
+#endif
+
+	/* draw the primary outline */
+	outline = shape->primary ? shape->primary : shape->outlines;
+	draw_outline (context, outline, &color, key->angle, key->origin_x,
+		      key->origin_y);
+#if 0
+	/* don't draw other outlines for now, since
+	 * the text placement does not take them into account
+	 */
+	for (i = 0; i < shape->num_outlines; i++) {
+		if (shape->outlines + i == shape->approx ||
+		    shape->outlines + i == shape->primary)
+			continue;
+		draw_outline (context, shape->outlines + i, NULL,
+			      key->angle, key->origin_x, key->origin_y);
+	}
+#endif
+
+	origin_offset_x = calc_origin_offset_x (outline);
+	draw_key_label (context, drawing, key->keycode, key->angle,
+			key->origin_x + origin_offset_x, key->origin_y,
+			shape->bounds.x2, shape->bounds.y2);
+}
+
+static void
+invalidate_region (CafekbdKeyboardDrawing * drawing,
+		   gdouble angle,
+		   gint origin_x, gint origin_y, XkbShapeRec * shape)
+{
+	CdkPoint points[4];
+	gint x_min, x_max, y_min, y_max;
+	gint x, y, width, height;
+	gint xx, yy;
+
+	rotate_coordinate (0, 0, 0, 0, angle, &xx, &yy);
+	points[0].x = xx;
+	points[0].y = yy;
+	rotate_coordinate (0, 0, shape->bounds.x2, 0, angle, &xx, &yy);
+	points[1].x = xx;
+	points[1].y = yy;
+	rotate_coordinate (0, 0, shape->bounds.x2, shape->bounds.y2, angle,
+			   &xx, &yy);
+	points[2].x = xx;
+	points[2].y = yy;
+	rotate_coordinate (0, 0, 0, shape->bounds.y2, angle, &xx, &yy);
+	points[3].x = xx;
+	points[3].y = yy;
+
+	x_min =
+	    MIN (MIN (points[0].x, points[1].x),
+		 MIN (points[2].x, points[3].x));
+	x_max =
+	    MAX (MAX (points[0].x, points[1].x),
+		 MAX (points[2].x, points[3].x));
+	y_min =
+	    MIN (MIN (points[0].y, points[1].y),
+		 MIN (points[2].y, points[3].y));
+	y_max =
+	    MAX (MAX (points[0].y, points[1].y),
+		 MAX (points[2].y, points[3].y));
+
+	x = xkb_to_pixmap_coord (drawing->renderContext,
+				 origin_x + x_min) - 6;
+	y = xkb_to_pixmap_coord (drawing->renderContext,
+				 origin_y + y_min) - 6;
+	width =
+	    xkb_to_pixmap_coord (drawing->renderContext,
+				 x_max - x_min) + 12;
+	height =
+	    xkb_to_pixmap_coord (drawing->renderContext,
+				 y_max - y_min) + 12;
+
+	ctk_widget_queue_draw_area (CTK_WIDGET (drawing), x, y, width,
+				    height);
+}
+
+static void
+invalidate_indicator_doodad_region (CafekbdKeyboardDrawing * drawing,
+				    CafekbdKeyboardDrawingDoodad * doodad)
+{
+	if (!drawing->xkb)
+		return;
+
+	invalidate_region (drawing,
+			   doodad->angle,
+			   doodad->origin_x +
+			   doodad->doodad->indicator.left,
+			   doodad->origin_y +
+			   doodad->doodad->indicator.top,
+			   &drawing->xkb->geom->shapes[doodad->
+						       doodad->indicator.shape_ndx]);
+}
+
+static void
+invalidate_key_region (CafekbdKeyboardDrawing * drawing,
+		       CafekbdKeyboardDrawingKey * key)
+{
+	if (!drawing->xkb)
+		return;
+
+	invalidate_region (drawing,
+			   key->angle,
+			   key->origin_x,
+			   key->origin_y,
+			   &drawing->xkb->geom->shapes[key->
+						       xkbkey->shape_ndx]);
+}
+
+static void
+draw_text_doodad (CafekbdKeyboardDrawingRenderContext * context,
+		  CafekbdKeyboardDrawing * drawing,
+		  CafekbdKeyboardDrawingDoodad * doodad,
+		  XkbTextDoodadRec * text_doodad)
+{
+	gint x, y;
+	if (!drawing->xkb)
+		return;
+
+	x = xkb_to_pixmap_coord (context,
+				 doodad->origin_x + text_doodad->left);
+	y = xkb_to_pixmap_coord (context,
+				 doodad->origin_y + text_doodad->top);
+
+	set_markup (context, text_doodad->text);
+	draw_pango_layout (context, drawing, doodad->angle, x, y);
+}
+
+static void
+draw_indicator_doodad (CafekbdKeyboardDrawingRenderContext * context,
+		       CafekbdKeyboardDrawing * drawing,
+		       CafekbdKeyboardDrawingDoodad * doodad,
+		       XkbIndicatorDoodadRec * indicator_doodad)
+{
+	CdkRGBA *color;
+	XkbShapeRec *shape;<--- Variable 'shape' can be declared as pointer to const
+	gint i;
+
+	if (!drawing->xkb)
+		return;
+
+	shape = drawing->xkb->geom->shapes + indicator_doodad->shape_ndx;
+
+	color = drawing->colors + (doodad->on ?
+				   indicator_doodad->on_color_ndx :
+				   indicator_doodad->off_color_ndx);
+
+	for (i = 0; i < 1; i++)
+		draw_outline (context, shape->outlines + i, color,
+			      doodad->angle,
+			      doodad->origin_x + indicator_doodad->left,
+			      doodad->origin_y + indicator_doodad->top);
+}
+
+static void
+draw_shape_doodad (CafekbdKeyboardDrawingRenderContext * context,
+		   CafekbdKeyboardDrawing * drawing,
+		   CafekbdKeyboardDrawingDoodad * doodad,
+		   XkbShapeDoodadRec * shape_doodad)
+{
+	XkbShapeRec *shape;
+	CdkRGBA *color;
+	gint i;
+
+	if (!drawing->xkb)
+		return;
+
+	shape = drawing->xkb->geom->shapes + shape_doodad->shape_ndx;
+	color = drawing->colors + shape_doodad->color_ndx;
+
+	/* draw the primary outline filled */
+	draw_outline (context,
+		      shape->primary ? shape->primary : shape->outlines,
+		      color, doodad->angle,
+		      doodad->origin_x + shape_doodad->left,
+		      doodad->origin_y + shape_doodad->top);
+
+	/* stroke the other outlines */
+	for (i = 0; i < shape->num_outlines; i++) {
+		if (shape->outlines + i == shape->approx ||
+		    shape->outlines + i == shape->primary)
+			continue;
+		draw_outline (context, shape->outlines + i, NULL,
+			      doodad->angle,
+			      doodad->origin_x + shape_doodad->left,
+			      doodad->origin_y + shape_doodad->top);
+	}
+}
+
+static void
+draw_doodad (CafekbdKeyboardDrawingRenderContext * context,
+	     CafekbdKeyboardDrawing * drawing,
+	     CafekbdKeyboardDrawingDoodad * doodad)
+{
+	switch (doodad->doodad->any.type) {
+	case XkbOutlineDoodad:
+	case XkbSolidDoodad:
+		draw_shape_doodad (context, drawing, doodad,
+				   &doodad->doodad->shape);
+		break;
+
+	case XkbTextDoodad:
+		draw_text_doodad (context, drawing, doodad,
+				  &doodad->doodad->text);
+		break;
+
+	case XkbIndicatorDoodad:
+		draw_indicator_doodad (context, drawing, doodad,
+				       &doodad->doodad->indicator);
+		break;
+
+	case XkbLogoDoodad:
+		/* g_print ("draw_doodad: logo: %s\n", doodad->doodad->logo.logo_name); */
+		/* XkbLogoDoodadRec is essentially a subclass of XkbShapeDoodadRec */
+		draw_shape_doodad (context, drawing, doodad,
+				   &doodad->doodad->shape);
+		break;
+	}
+}
+
+typedef struct {
+	CafekbdKeyboardDrawing *drawing;
+	CafekbdKeyboardDrawingRenderContext *context;
+} DrawKeyboardItemData;
+
+static void
+redraw_overlapping_doodads (CafekbdKeyboardDrawingRenderContext * context,
+			    CafekbdKeyboardDrawing * drawing,
+			    const CafekbdKeyboardDrawingKey * key)
+{
+	GList *list;
+	gboolean do_draw = FALSE;
+
+	for (list = drawing->keyboard_items; list; list = list->next) {
+		CafekbdKeyboardDrawingItem *item = list->data;
+
+		if (do_draw
+		    && item->type ==
+		    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD)
+			draw_doodad (context, drawing,
+				     (CafekbdKeyboardDrawingDoodad *) item);
+
+		if (list->data == key)
+			do_draw = TRUE;
+	}
+}
+
+static void
+draw_keyboard_item (CafekbdKeyboardDrawingItem * item,
+		    DrawKeyboardItemData * data)
+{
+	CafekbdKeyboardDrawing *drawing = data->drawing;
+	CafekbdKeyboardDrawingRenderContext *context = data->context;
+
+	if (!drawing->xkb)
+		return;
+
+	switch (item->type) {
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_INVALID:
+		break;
+
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY:
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA:
+		draw_key (context, drawing,
+			  (CafekbdKeyboardDrawingKey *) item);
+		break;
+
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD:
+		draw_doodad (context, drawing,
+			     (CafekbdKeyboardDrawingDoodad *) item);
+		break;
+	}
+}
+
+static void
+draw_keyboard_to_context (CafekbdKeyboardDrawingRenderContext * context,
+			  CafekbdKeyboardDrawing * drawing)
+{
+	DrawKeyboardItemData data = { drawing, context };
+#ifdef KBDRAW_DEBUG
+	printf ("mods: %d\n", drawing->mods);
+#endif
+	g_list_foreach (drawing->keyboard_items,
+			(GFunc) draw_keyboard_item, &data);
+}
+
+static gboolean
+create_cairo (CafekbdKeyboardDrawing * drawing)
+{
+	CtkStyleContext *style_context = NULL;
+	CtkStateFlags state;
+	CdkRGBA dark_color;
+
+	if (drawing == NULL)
+		return FALSE;
+	if (drawing->surface == NULL)
+		return FALSE;
+
+	drawing->renderContext->cr =
+	    cairo_create (drawing->surface);
+
+	style_context = ctk_widget_get_style_context (CTK_WIDGET (drawing));
+	state = ctk_style_context_get_state (style_context);
+
+	ctk_style_context_get_background_color (style_context, state,
+	                                        &dark_color);
+	/* make dark background by making regular background darker */
+	dark_color.red *= 0.7;
+	dark_color.green *= 0.7;
+	dark_color.blue *= 0.7;
+
+	drawing->renderContext->dark_color = dark_color;
+
+	return TRUE;
+}
+
+static void
+destroy_cairo (CafekbdKeyboardDrawing * drawing)
+{
+	cairo_destroy (drawing->renderContext->cr);
+	drawing->renderContext->cr = NULL;
+}
+
+static void
+draw_keyboard (CafekbdKeyboardDrawing * drawing)
+{
+        CtkStyleContext *context =
+	    ctk_widget_get_style_context (CTK_WIDGET (drawing));
+	CtkStateFlags state = ctk_style_context_get_state (context);
+	CdkRGBA color;
+	CtkAllocation allocation;
+
+	if (!drawing->xkb)
+		return;
+
+	ctk_widget_get_allocation (CTK_WIDGET (drawing), &allocation);
+
+	drawing->surface =
+	    cdk_window_create_similar_surface (ctk_widget_get_window
+					       (CTK_WIDGET (drawing)),
+					       CAIRO_CONTENT_COLOR,
+					       allocation.width,
+					       allocation.height);
+
+	if (create_cairo (drawing)) {
+		/* blank background */
+		ctk_style_context_save (context);
+		ctk_style_context_add_class (context, CTK_STYLE_CLASS_VIEW);
+		ctk_style_context_get_background_color (context, state, &color);
+		ctk_style_context_restore (context);
+		cdk_cairo_set_source_rgba (drawing->renderContext->cr, &color);
+		cairo_paint (drawing->renderContext->cr);
+
+		draw_keyboard_to_context (drawing->renderContext, drawing);
+		destroy_cairo (drawing);
+	}
+}
+
+static void
+alloc_render_context (CafekbdKeyboardDrawing * drawing)
+{
+	CafekbdKeyboardDrawingRenderContext *context =
+	    drawing->renderContext =
+	    g_new0 (CafekbdKeyboardDrawingRenderContext, 1);
+
+	PangoContext *pangoContext =
+	    ctk_widget_get_pango_context (CTK_WIDGET (drawing));
+
+	CtkStyleContext *style_context =
+	    ctk_widget_get_style_context (CTK_WIDGET (drawing));
+	PangoFontDescription *fd = NULL;
+
+	ctk_style_context_get (style_context,
+	                       ctk_style_context_get_state (style_context),
+	                       CTK_STYLE_PROPERTY_FONT, &fd, NULL);
+
+	context->layout = pango_layout_new (pangoContext);
+	pango_layout_set_ellipsize (context->layout, PANGO_ELLIPSIZE_END);
+
+	context->font_desc = pango_font_description_copy (fd);
+	context->angle = 0;
+	context->scale_numerator = 1;
+	context->scale_denominator = 1;
+}
+
+static void
+free_render_context (CafekbdKeyboardDrawing * drawing)
+{
+	CafekbdKeyboardDrawingRenderContext *context = drawing->renderContext;
+	g_object_unref (G_OBJECT (context->layout));
+	pango_font_description_free (context->font_desc);
+
+	g_free (drawing->renderContext);
+	drawing->renderContext = NULL;
+}
+
+static gboolean
+draw (CtkWidget              *widget G_GNUC_UNUSED,
+      cairo_t                *cr,
+      CafekbdKeyboardDrawing *drawing)
+{
+	if (!drawing->xkb)
+		return FALSE;
+
+	if (drawing->surface == NULL)
+		return FALSE;
+
+	cairo_set_source_surface (cr, drawing->surface, 0, 0);
+	cairo_paint (cr);
+
+	return FALSE;
+}
+
+static gboolean
+idle_redraw (gpointer user_data)
+{
+	CafekbdKeyboardDrawing *drawing = user_data;
+
+	drawing->idle_redraw = 0;
+	draw_keyboard (drawing);
+	ctk_widget_queue_draw (CTK_WIDGET (drawing));
+	return FALSE;
+}
+
+static gboolean
+context_setup_scaling (CafekbdKeyboardDrawingRenderContext * context,
+		       CafekbdKeyboardDrawing * drawing,
+		       gdouble width, gdouble height,
+		       gdouble dpi_x, gdouble dpi_y)
+{
+	if (!drawing->xkb)
+		return FALSE;
+
+	if (drawing->xkb->geom->width_mm <= 0
+	    || drawing->xkb->geom->height_mm <= 0) {
+		g_critical
+		    ("keyboard geometry reports width or height as zero!");
+		return FALSE;
+	}
+
+	if (width * drawing->xkb->geom->height_mm <
+	    height * drawing->xkb->geom->width_mm) {
+		context->scale_numerator = width;
+		context->scale_denominator = drawing->xkb->geom->width_mm;
+	} else {
+		context->scale_numerator = height;
+		context->scale_denominator = drawing->xkb->geom->height_mm;
+	}
+
+	pango_font_description_set_size (context->font_desc,
+					 72 * KEY_FONT_SIZE * dpi_x *
+					 context->scale_numerator /
+					 context->scale_denominator);
+	pango_layout_set_spacing (context->layout,
+				  -160 * dpi_y * context->scale_numerator /
+				  context->scale_denominator);
+	pango_layout_set_font_description (context->layout,
+					   context->font_desc);
+
+	return TRUE;
+}
+
+static void
+size_allocate (CtkWidget              *widget G_GNUC_UNUSED,
+	       CtkAllocation          *allocation,
+	       CafekbdKeyboardDrawing *drawing)
+{
+	CafekbdKeyboardDrawingRenderContext *context = drawing->renderContext;
+
+	if (drawing->surface) {
+		cairo_surface_destroy (drawing->surface);
+		drawing->surface = NULL;
+	}
+
+	if (!context_setup_scaling (context, drawing,
+				    allocation->width, allocation->height,
+				    50, 50))
+		return;
+
+	if (!drawing->idle_redraw)
+		drawing->idle_redraw = g_idle_add (idle_redraw, drawing);
+}
+
+static gint
+key_event (CtkWidget              *widget G_GNUC_UNUSED,
+	   CdkEventKey            *event,
+	   CafekbdKeyboardDrawing *drawing)
+{
+	CafekbdKeyboardDrawingKey *key;
+	if (!drawing->xkb)
+		return FALSE;
+
+	key = drawing->keys + event->hardware_keycode;
+
+	if (event->hardware_keycode > drawing->xkb->max_key_code ||
+	    event->hardware_keycode < drawing->xkb->min_key_code ||
+	    key->xkbkey == NULL) {
+		g_signal_emit (drawing,
+			       cafekbd_keyboard_drawing_signals[BAD_KEYCODE],
+			       0, event->hardware_keycode);
+		return TRUE;
+	}
+
+	if ((event->type == CDK_KEY_PRESS && key->pressed) ||
+	    (event->type == CDK_KEY_RELEASE && !key->pressed))
+		return TRUE;
+	/* otherwise this event changes the state we believed we had before */
+
+	key->pressed = (event->type == CDK_KEY_PRESS);
+
+	if (create_cairo (drawing)) {
+		draw_key (drawing->renderContext, drawing, key);
+		redraw_overlapping_doodads (drawing->renderContext,
+					    drawing, key);
+		destroy_cairo (drawing);
+	}
+
+	invalidate_key_region (drawing, key);
+	return TRUE;
+}
+
+static gint
+button_press_event (CtkWidget              *widget,
+		    CdkEventButton         *event G_GNUC_UNUSED,
+		    CafekbdKeyboardDrawing *drawing)<--- Parameter 'drawing' can be declared as pointer to const
+{
+	if (!drawing->xkb)
+		return FALSE;
+
+	ctk_widget_grab_focus (widget);
+	return FALSE;
+}
+
+static gboolean
+unpress_keys (CafekbdKeyboardDrawing * drawing)
+{
+	gint i;
+
+	drawing->timeout = 0;
+
+	if (!drawing->xkb)
+		return FALSE;
+
+	if (create_cairo (drawing)) {
+		for (i = drawing->xkb->min_key_code;
+		     i <= drawing->xkb->max_key_code; i++)
+			if (drawing->keys[i].pressed) {
+				drawing->keys[i].pressed = FALSE;
+				draw_key (drawing->renderContext, drawing,
+					  drawing->keys + i);
+				invalidate_key_region (drawing,
+						       drawing->keys + i);
+			}
+		destroy_cairo (drawing);
+	}
+
+	return FALSE;
+}
+
+static gint
+focus_event (CtkWidget              *widget G_GNUC_UNUSED,
+	     CdkEventFocus          *event,<--- Parameter 'event' can be declared as pointer to const
+	     CafekbdKeyboardDrawing *drawing)
+{
+	if (event->in && drawing->timeout > 0) {
+		g_source_remove (drawing->timeout);
+		drawing->timeout = 0;
+	} else if (drawing->timeout == 0)
+		drawing->timeout =
+		    g_timeout_add (120, (GSourceFunc) unpress_keys,
+				   drawing);
+
+	return FALSE;
+}
+
+static gint
+compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a,<--- Parameter 'a' can be declared as pointer to const
+				  CafekbdKeyboardDrawingItem * b)<--- Parameter 'b' can be declared as pointer to const
+{
+	if (a->priority > b->priority)
+		return 1;
+	else if (a->priority < b->priority)
+		return -1;
+	else
+		return 0;
+}
+
+static void
+init_indicator_doodad (CafekbdKeyboardDrawing * drawing,
+		       XkbDoodadRec * xkbdoodad,
+		       CafekbdKeyboardDrawingDoodad * doodad)
+{
+	if (!drawing->xkb)
+		return;
+
+	if (xkbdoodad->any.type == XkbIndicatorDoodad) {
+		gint index;
+		Atom iname = 0;
+		Atom sname = xkbdoodad->indicator.name;
+		unsigned long phys_indicators =
+		    drawing->xkb->indicators->phys_indicators;
+		Atom *pind = drawing->xkb->names->indicators;<--- Variable 'pind' can be declared as pointer to const
+
+#ifdef KBDRAW_DEBUG
+		printf ("Looking for %d[%s]\n",
+			(int) sname, XGetAtomName (drawing->display,
+						   sname));
+#endif
+
+		for (index = 0; index < XkbNumIndicators; index++) {
+			iname = *pind++;
+			/* name matches and it is real */
+			if (iname == sname
+			    && (phys_indicators & (1 << index)))
+				break;
+			if (iname == 0)
+				break;
+		}
+		if (iname == 0)
+			g_warning ("Could not find indicator %d [%s]\n",
+				   (int) sname,
+				   XGetAtomName (drawing->display, sname));
+		else {
+#ifdef KBDRAW_DEBUG
+			printf ("Found in xkbdesc as %d\n", index);
+#endif
+			drawing->physical_indicators[index] = doodad;
+			/* Trying to obtain the real state, but if fail - just assume OFF */
+			if (!XkbGetNamedIndicator
+			    (drawing->display, sname, NULL, &doodad->on,
+			     NULL, NULL))
+				doodad->on = 0;
+		}
+	}
+}
+
+static void
+init_keys_and_doodads (CafekbdKeyboardDrawing * drawing)
+{
+	gint i, j, k;
+	gint x, y;
+
+	if (!drawing->xkb)
+		return;
+
+	for (i = 0; i < drawing->xkb->geom->num_doodads; i++) {
+		XkbDoodadRec *xkbdoodad = drawing->xkb->geom->doodads + i;
+		CafekbdKeyboardDrawingDoodad *doodad =
+		    g_new (CafekbdKeyboardDrawingDoodad, 1);
+
+		doodad->type = CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD;
+		doodad->origin_x = 0;
+		doodad->origin_y = 0;
+		doodad->angle = 0;
+		doodad->priority = xkbdoodad->any.priority * 256 * 256;
+		doodad->doodad = xkbdoodad;
+
+		init_indicator_doodad (drawing, xkbdoodad, doodad);
+
+		drawing->keyboard_items =
+		    g_list_append (drawing->keyboard_items, doodad);
+	}
+
+	for (i = 0; i < drawing->xkb->geom->num_sections; i++) {
+		XkbSectionRec *section = drawing->xkb->geom->sections + i;
+		guint priority;
+
+#ifdef KBDRAW_DEBUG
+		printf ("initing section %d containing %d rows\n", i,
+			section->num_rows);
+#endif
+		x = section->left;
+		y = section->top;
+		priority = section->priority * 256 * 256;
+
+		for (j = 0; j < section->num_rows; j++) {
+			XkbRowRec *row = section->rows + j;
+
+#ifdef KBDRAW_DEBUG
+			printf ("  initing row %d\n", j);
+#endif
+			x = section->left + row->left;
+			y = section->top + row->top;
+
+			for (k = 0; k < row->num_keys; k++) {
+				XkbKeyRec *xkbkey = row->keys + k;
+				CafekbdKeyboardDrawingKey *key;
+				XkbShapeRec *shape =
+				    drawing->xkb->geom->shapes +
+				    xkbkey->shape_ndx;
+				guint keycode = find_keycode (drawing,
+							      xkbkey->
+							      name.name);
+
+				if (keycode == INVALID_KEYCODE)
+					continue;
+#ifdef KBDRAW_DEBUG
+				printf
+				    ("    initing key %d, shape: %p(%p + %d), code: %u\n",
+				     k, shape, drawing->xkb->geom->shapes,
+				     xkbkey->shape_ndx, keycode);
+#endif
+				if (row->vertical)
+					y += xkbkey->gap;
+				else
+					x += xkbkey->gap;
+
+				if (keycode >= drawing->xkb->min_key_code
+				    && keycode <=
+				    drawing->xkb->max_key_code) {
+					key = drawing->keys + keycode;
+					if (key->type ==
+					    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_INVALID)
+					{
+						key->type =
+						    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY;
+					} else {
+						/* duplicate key for the same keycode,
+						   already defined as CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY */
+						key =
+						    g_new0
+						    (CafekbdKeyboardDrawingKey,
+						     1);
+						key->type =
+						    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA;
+					}
+				} else {
+					g_warning
+					    ("key %4.4s: keycode = %u; not in range %d..%d\n",
+					     xkbkey->name.name, keycode,
+					     drawing->xkb->min_key_code,
+					     drawing->xkb->max_key_code);
+
+					key =
+					    g_new0 (CafekbdKeyboardDrawingKey,
+						    1);
+					key->type =
+					    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA;
+				}
+
+				key->xkbkey = xkbkey;
+				key->angle = section->angle;
+				rotate_coordinate (section->left,
+						   section->top, x, y,
+						   section->angle,
+						   &key->origin_x,
+						   &key->origin_y);
+				key->priority = priority;
+				key->keycode = keycode;
+
+				drawing->keyboard_items =
+				    g_list_append (drawing->keyboard_items,
+						   key);
+
+				if (row->vertical)
+					y += shape->bounds.y2;
+				else
+					x += shape->bounds.x2;
+
+				priority++;
+			}
+		}
+
+		for (j = 0; j < section->num_doodads; j++) {
+			XkbDoodadRec *xkbdoodad = section->doodads + j;
+			CafekbdKeyboardDrawingDoodad *doodad =
+			    g_new (CafekbdKeyboardDrawingDoodad, 1);
+
+			doodad->type =
+			    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD;
+			doodad->origin_x = x;
+			doodad->origin_y = y;
+			doodad->angle = section->angle;
+			doodad->priority =
+			    priority + xkbdoodad->any.priority;
+			doodad->doodad = xkbdoodad;
+
+			init_indicator_doodad (drawing, xkbdoodad, doodad);
+
+			drawing->keyboard_items =
+			    g_list_append (drawing->keyboard_items,
+					   doodad);
+		}
+	}
+
+	drawing->keyboard_items = g_list_sort (drawing->keyboard_items,
+					       (GCompareFunc)
+					       compare_keyboard_item_priorities);<--- You might need to cast the function pointer here<--- You might need to cast the function pointer here
+}
+
+static void
+init_colors (CafekbdKeyboardDrawing * drawing)
+{
+	gboolean result;
+	gint i;
+
+	if (!drawing->xkb)
+		return;
+
+	drawing->colors = g_new (CdkRGBA, drawing->xkb->geom->num_colors);
+
+	for (i = 0; i < drawing->xkb->geom->num_colors; i++) {
+		result =
+		    parse_xkb_color_spec (drawing->xkb->geom->
+					  colors[i].spec,
+					  drawing->colors + i);
+
+		if (!result)
+			g_warning
+			    ("init_colors: unable to parse color %s\n",
+			     drawing->xkb->geom->colors[i].spec);
+	}
+}
+
+static void
+free_cdik (			/*colors doodads indicators keys */
+		  CafekbdKeyboardDrawing * drawing)
+{
+	GList *itemp;
+
+	if (!drawing->xkb)
+		return;
+
+	for (itemp = drawing->keyboard_items; itemp; itemp = itemp->next) {
+		CafekbdKeyboardDrawingItem *item = itemp->data;
+
+		switch (item->type) {
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_INVALID:
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY:
+			break;
+
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA:
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD:
+			g_free (item);
+			break;
+		}
+	}
+
+	g_list_free (drawing->keyboard_items);
+	drawing->keyboard_items = NULL;
+
+	g_free (drawing->keys);
+	g_free (drawing->colors);
+}
+
+static void
+alloc_cdik (CafekbdKeyboardDrawing * drawing)
+{
+	if (!drawing->xkb)
+		return;
+
+	drawing->physical_indicators_size =
+	    drawing->xkb->indicators->phys_indicators + 1;
+	drawing->physical_indicators =
+	    g_new0 (CafekbdKeyboardDrawingDoodad *,
+		    drawing->physical_indicators_size);
+	drawing->keys =
+	    g_new0 (CafekbdKeyboardDrawingKey,
+		    drawing->xkb->max_key_code + 1);
+}
+
+static void
+process_indicators_state_notify (XkbIndicatorNotifyEvent * iev,<--- Parameter 'iev' can be declared as pointer to const
+				 CafekbdKeyboardDrawing * drawing)
+{
+	/* Good question: should we track indicators when the keyboard is
+	   NOT really taken from the screen */
+	gint i;
+
+	for (i = 0; i <= drawing->xkb->indicators->phys_indicators; i++)
+		if (drawing->physical_indicators[i] != NULL
+		    && (iev->changed & 1 << i)) {
+			gint state = (iev->state & 1 << i) != FALSE;
+
+			if ((state && !drawing->physical_indicators[i]->on)
+			    || (!state
+				&& drawing->physical_indicators[i]->on)) {
+				drawing->physical_indicators[i]->on =
+				    state;
+				if (create_cairo (drawing)) {
+					draw_doodad
+					    (drawing->renderContext,
+					     drawing,
+					     drawing->physical_indicators
+					     [i]);
+					destroy_cairo (drawing);
+				}
+				invalidate_indicator_doodad_region
+				    (drawing,
+				     drawing->physical_indicators[i]);
+			}
+		}
+}
+
+static CdkFilterReturn
+xkb_state_notify_event_filter (CdkXEvent              *cdkxev,
+			       CdkEvent               *event G_GNUC_UNUSED,
+			       CafekbdKeyboardDrawing *drawing)
+{
+#define modifier_change_mask (XkbModifierStateMask | XkbModifierBaseMask | XkbModifierLatchMask | XkbModifierLockMask)
+
+	if (!drawing->xkb)
+		return CDK_FILTER_CONTINUE;
+
+	if (((XEvent *) cdkxev)->type == drawing->xkb_event_type) {
+		XkbEvent *kev = (XkbEvent *) cdkxev;
+		CtkAllocation allocation;
+		switch (kev->any.xkb_type) {
+		case XkbStateNotify:
+			if (((kev->state.changed & modifier_change_mask) &&
+			     drawing->track_modifiers)) {
+				free_cdik (drawing);
+				if (drawing->track_modifiers)
+					cafekbd_keyboard_drawing_set_mods
+					    (drawing,
+					     kev->state.compat_state);
+				drawing->keys =
+				    g_new0 (CafekbdKeyboardDrawingKey,
+					    drawing->xkb->max_key_code +
+					    1);
+
+				ctk_widget_get_allocation (CTK_WIDGET
+							   (drawing),
+							   &allocation);
+				size_allocate (CTK_WIDGET (drawing),
+					       &allocation, drawing);
+
+				init_keys_and_doodads (drawing);
+				init_colors (drawing);
+			}
+			break;
+
+		case XkbIndicatorStateNotify:
+			{
+				process_indicators_state_notify (&
+								 ((XkbEvent
+								   *)
+								  cdkxev)->indicators,
+drawing);
+			}
+			break;
+
+		case XkbIndicatorMapNotify:
+		case XkbControlsNotify:
+		case XkbNamesNotify:
+		case XkbNewKeyboardNotify:
+			{
+				XkbStateRec state;
+				memset (&state, 0, sizeof (state));
+				XkbGetState (drawing->display,
+					     XkbUseCoreKbd, &state);
+				if (drawing->track_modifiers)
+					cafekbd_keyboard_drawing_set_mods
+					    (drawing, state.compat_state);
+				if (drawing->track_config)
+					cafekbd_keyboard_drawing_set_keyboard
+					    (drawing, NULL);
+			}
+			break;
+		}
+	}
+
+	return CDK_FILTER_CONTINUE;
+}
+
+static void
+destroy (CafekbdKeyboardDrawing * drawing)
+{
+	free_render_context (drawing);
+	cdk_window_remove_filter (NULL, (CdkFilterFunc)
+				  xkb_state_notify_event_filter, drawing);
+	if (drawing->timeout > 0) {
+		g_source_remove (drawing->timeout);
+		drawing->timeout = 0;
+	}
+	if (drawing->idle_redraw > 0) {
+		g_source_remove (drawing->idle_redraw);
+		drawing->idle_redraw = 0;
+	}
+
+	if (drawing->surface != NULL) {
+		cairo_surface_destroy (drawing->surface);
+	}
+}
+
+static void
+style_changed (CafekbdKeyboardDrawing * drawing)
+{
+	pango_layout_context_changed (drawing->renderContext->layout);
+}
+
+static void
+cafekbd_keyboard_drawing_init (CafekbdKeyboardDrawing * drawing)
+{
+	gint opcode = 0, error = 0, major = 1, minor = 0;
+	gint mask;
+
+	drawing->display = CDK_DISPLAY_XDISPLAY(cdk_display_get_default());
+
+	printf ("dpy: %p\n", (void *) drawing->display);
+
+	if (!XkbQueryExtension
+	    (drawing->display, &opcode, &drawing->xkb_event_type, &error,
+	     &major, &minor))
+		g_critical
+		    ("XkbQueryExtension failed! Stuff probably won't work.");
+
+	printf ("evt/error/major/minor: %d/%d/%d/%d\n",
+		drawing->xkb_event_type, error, major, minor);
+
+	/* XXX: this stuff probably doesn't matter.. also, cdk_screen_get_default can fail */
+	if (ctk_widget_has_screen (CTK_WIDGET (drawing)))
+		drawing->screen_num =
+		    cdk_x11_screen_get_screen_number (ctk_widget_get_screen
+					   (CTK_WIDGET (drawing)));
+	else
+		drawing->screen_num =
+		    cdk_x11_screen_get_screen_number (cdk_screen_get_default ());
+
+	drawing->surface = NULL;
+	alloc_render_context (drawing);
+
+	drawing->keyboard_items = NULL;
+	drawing->colors = NULL;
+
+	drawing->track_modifiers = 0;
+	drawing->track_config = 0;
+
+	/* XXX: XkbClientMapMask | XkbIndicatorMapMask | XkbNamesMask | XkbGeometryMask */
+	drawing->xkb = XkbGetKeyboard (drawing->display,
+				       XkbGBN_GeometryMask |
+				       XkbGBN_KeyNamesMask |
+				       XkbGBN_OtherNamesMask |
+				       XkbGBN_SymbolsMask |
+				       XkbGBN_IndicatorMapMask,
+				       XkbUseCoreKbd);
+	if (drawing->xkb) {
+		XkbGetNames (drawing->display, XkbAllNamesMask, drawing->xkb);
+		XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+				       XkbIndicatorStateNotify,
+				       drawing->xkb->indicators->phys_indicators,
+				       drawing->xkb->indicators->phys_indicators);
+	}
+
+	drawing->l3mod = XkbKeysymToModifiers (drawing->display,
+					       CDK_KEY_ISO_Level3_Shift);
+
+	drawing->xkbOnDisplay = TRUE;
+
+	alloc_cdik (drawing);
+
+	mask =
+	    (XkbStateNotifyMask | XkbNamesNotifyMask |
+	     XkbControlsNotifyMask | XkbIndicatorMapNotifyMask |
+	     XkbNewKeyboardNotifyMask);
+	XkbSelectEvents (drawing->display, XkbUseCoreKbd, mask, mask);
+
+	mask = XkbGroupStateMask | XkbModifierStateMask;
+	XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+			       XkbStateNotify, mask, mask);
+
+	mask = (XkbGroupNamesMask | XkbIndicatorNamesMask);
+	XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+			       XkbNamesNotify, mask, mask);
+	init_keys_and_doodads (drawing);
+	init_colors (drawing);
+
+	/* required to get key events */
+	ctk_widget_set_can_focus (CTK_WIDGET (drawing), TRUE);
+
+	ctk_widget_set_events (CTK_WIDGET (drawing),
+			       CDK_EXPOSURE_MASK | CDK_KEY_PRESS_MASK |
+			       CDK_KEY_RELEASE_MASK | CDK_BUTTON_PRESS_MASK
+			       | CDK_FOCUS_CHANGE_MASK);
+	g_signal_connect (G_OBJECT (drawing), "draw",
+			  G_CALLBACK (draw), drawing);
+	g_signal_connect_after (G_OBJECT (drawing), "key-press-event",
+				G_CALLBACK (key_event), drawing);
+	g_signal_connect_after (G_OBJECT (drawing), "key-release-event",
+				G_CALLBACK (key_event), drawing);
+	g_signal_connect (G_OBJECT (drawing), "button-press-event",
+			  G_CALLBACK (button_press_event), drawing);<--- You might need to cast the function pointer here
+	g_signal_connect (G_OBJECT (drawing), "focus-out-event",
+			  G_CALLBACK (focus_event), drawing);
+	g_signal_connect (G_OBJECT (drawing), "focus-in-event",
+			  G_CALLBACK (focus_event), drawing);<--- You might need to cast the function pointer here
+	g_signal_connect (G_OBJECT (drawing), "size-allocate",
+			  G_CALLBACK (size_allocate), drawing);
+	g_signal_connect (G_OBJECT (drawing), "destroy",
+			  G_CALLBACK (destroy), drawing);
+	g_signal_connect (G_OBJECT (drawing), "style-set",
+			  G_CALLBACK (style_changed), drawing);
+
+	cdk_window_add_filter (NULL, (CdkFilterFunc)
+			       xkb_state_notify_event_filter, drawing);
+}
+
+CtkWidget *
+cafekbd_keyboard_drawing_new (void)
+{
+	return
+	    CTK_WIDGET (g_object_new
+			(cafekbd_keyboard_drawing_get_type (), NULL));
+}
+
+static void
+cafekbd_keyboard_drawing_class_init (CafekbdKeyboardDrawingClass * klass)
+{
+	CtkWidgetClass *widget_class = CTK_WIDGET_CLASS (klass);
+	ctk_widget_class_set_css_name (widget_class, "cafekbd-keyboard-drawing");
+
+	klass->bad_keycode = NULL;
+
+	cafekbd_keyboard_drawing_signals[BAD_KEYCODE] =
+	    g_signal_new ("bad-keycode", cafekbd_keyboard_drawing_get_type (),
+			  G_SIGNAL_RUN_FIRST,
+			  G_STRUCT_OFFSET (CafekbdKeyboardDrawingClass,
+					   bad_keycode), NULL, NULL,
+			  cafekbd_keyboard_drawing_VOID__UINT, G_TYPE_NONE, 1,
+			  G_TYPE_UINT);
+}
+
+GType
+cafekbd_keyboard_drawing_get_type (void)
+{
+	static GType cafekbd_keyboard_drawing_type = 0;
+
+	if (!cafekbd_keyboard_drawing_type) {
+		static const GTypeInfo cafekbd_keyboard_drawing_info = {
+			sizeof (CafekbdKeyboardDrawingClass),
+			NULL,	/* base_init */
+			NULL,	/* base_finalize */
+			(GClassInitFunc) cafekbd_keyboard_drawing_class_init,
+			NULL,	/* class_finalize */
+			NULL,	/* class_data */
+			sizeof (CafekbdKeyboardDrawing),
+			0,	/* n_preallocs */
+			(GInstanceInitFunc) cafekbd_keyboard_drawing_init,
+			NULL	/* *value_table */
+		};
+
+		cafekbd_keyboard_drawing_type =
+		    g_type_register_static (CTK_TYPE_DRAWING_AREA,
+					    "CafekbdKeyboardDrawing",
+					    &cafekbd_keyboard_drawing_info,
+					    0);
+	}
+
+	return cafekbd_keyboard_drawing_type;
+}
+
+void
+cafekbd_keyboard_drawing_set_mods (CafekbdKeyboardDrawing * drawing, guint mods)
+{
+#ifdef KBDRAW_DEBUG
+	printf ("set_mods: %d\n", mods);
+#endif
+	if (mods != drawing->mods) {
+		drawing->mods = mods;
+		ctk_widget_queue_draw (CTK_WIDGET (drawing));
+	}
+}
+
+/**
+ * cafekbd_keyboard_drawing_render:
+ * @kbdrawing: keyboard layout to render
+ * @cr:        Cairo context to render to
+ * @layout:    Pango layout to use to render text
+ * @x:         left coordinate (pixels) of region to render in
+ * @y:         top coordinate (pixels) of region to render in
+ * @width:     width (pixels) of region to render in
+ * @height:    height (pixels) of region to render in
+ *
+ * Renders a keyboard layout to a cairo_t context.  @cr and @layout can be got
+ * from e.g. a CtkWidget or a CtkPrintContext.  @cr and @layout may be modified
+ * by the function but will not be unreffed.
+ *
+ * Returns: %TRUE on success, %FALSE on failure
+ */
+gboolean
+cafekbd_keyboard_drawing_render (CafekbdKeyboardDrawing * kbdrawing,
+			      cairo_t * cr,
+			      PangoLayout * layout,
+			      double x, double y,
+			      double width, double height,
+			      double dpi_x, double dpi_y)
+{
+	CtkStyleContext *style_context =
+	    ctk_widget_get_style_context (CTK_WIDGET (kbdrawing));
+	CdkRGBA dark_color;
+	PangoFontDescription *fd = NULL;
+
+	ctk_style_context_get_background_color (style_context,
+	                                        ctk_style_context_get_state (style_context),
+	                                        &dark_color);
+	/* make dark background by making regular background darker */
+	dark_color.red *= 0.7;
+	dark_color.green *= 0.7;
+	dark_color.blue *= 0.7;
+
+	ctk_style_context_get (style_context,
+	                       ctk_style_context_get_state (style_context),
+	                       CTK_STYLE_PROPERTY_FONT, &fd, NULL);
+	fd = pango_font_description_copy (fd);
+
+	CafekbdKeyboardDrawingRenderContext context = {
+		cr,
+		kbdrawing->renderContext->angle,
+		layout,
+		pango_font_description_copy (fd),
+		1, 1,
+		dark_color
+	};
+
+	if (!context_setup_scaling (&context, kbdrawing, width, height,
+	                            dpi_x, dpi_y))
+		return FALSE;
+	cairo_translate (cr, x, y);
+
+	draw_keyboard_to_context (&context, kbdrawing);
+
+	pango_font_description_free (fd);
+
+	return TRUE;
+}
+
+/**
+ * cafekbd_keyboard_drawing_set_keyboard: (skip)
+ */
+gboolean
+cafekbd_keyboard_drawing_set_keyboard (CafekbdKeyboardDrawing * drawing,
+				    XkbComponentNamesRec * names)
+{
+	CtkAllocation allocation;
+
+	free_cdik (drawing);
+	if (drawing->xkb)
+		XkbFreeKeyboard (drawing->xkb, 0, TRUE);	/* free_all = TRUE */
+	drawing->xkb = NULL;
+
+	if (names) {
+		drawing->xkb =
+		    XkbGetKeyboardByName (drawing->display, XkbUseCoreKbd,
+					  names, 0,
+					  XkbGBN_GeometryMask |
+					  XkbGBN_KeyNamesMask |
+					  XkbGBN_OtherNamesMask |
+					  XkbGBN_ClientSymbolsMask |
+					  XkbGBN_IndicatorMapMask, FALSE);
+		drawing->xkbOnDisplay = FALSE;
+	} else {
+		drawing->xkb = XkbGetKeyboard (drawing->display,
+					       XkbGBN_GeometryMask |
+					       XkbGBN_KeyNamesMask |
+					       XkbGBN_OtherNamesMask |
+					       XkbGBN_SymbolsMask |
+					       XkbGBN_IndicatorMapMask,
+					       XkbUseCoreKbd);
+		XkbGetNames (drawing->display, XkbAllNamesMask,
+			     drawing->xkb);
+		drawing->xkbOnDisplay = TRUE;
+	}
+
+	if (drawing->xkb) {
+		XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+				       XkbIndicatorStateNotify,
+				       drawing->xkb->indicators->phys_indicators,
+				       drawing->xkb->indicators->phys_indicators);
+	}
+
+	alloc_cdik (drawing);
+
+	init_keys_and_doodads (drawing);
+	init_colors (drawing);
+
+	ctk_widget_get_allocation (CTK_WIDGET (drawing), &allocation);
+	size_allocate (CTK_WIDGET (drawing), &allocation, drawing);
+	ctk_widget_queue_draw (CTK_WIDGET (drawing));
+
+	return TRUE;
+}
+
+const gchar* cafekbd_keyboard_drawing_get_keycodes(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->keycodes <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->keycodes);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_geometry(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->geometry <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->geometry);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_symbols(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->symbols <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->symbols);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_types(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->types <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->types);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_compat(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->compat <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->compat);
+	}
+}
+
+void
+cafekbd_keyboard_drawing_set_track_modifiers (CafekbdKeyboardDrawing * drawing,
+					   gboolean enable)
+{
+	if (enable) {
+		XkbStateRec state;
+		drawing->track_modifiers = 1;
+		memset (&state, 0, sizeof (state));
+		XkbGetState (drawing->display, XkbUseCoreKbd, &state);
+		cafekbd_keyboard_drawing_set_mods (drawing,
+						state.compat_state);
+	} else
+		drawing->track_modifiers = 0;
+}
+
+void
+cafekbd_keyboard_drawing_set_track_config (CafekbdKeyboardDrawing * drawing,
+					gboolean enable)
+{
+	if (enable)
+		drawing->track_config = 1;
+	else
+		drawing->track_config = 0;
+}
+
+void
+cafekbd_keyboard_drawing_set_groups_levels (CafekbdKeyboardDrawing * drawing,
+					 CafekbdKeyboardDrawingGroupLevel *
+					 groupLevels[])
+{
+#ifdef KBDRAW_DEBUG
+	printf ("set_group_levels [topLeft]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT]->level);
+	printf ("set_group_levels [topRight]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPRIGHT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPRIGHT]->level);
+	printf ("set_group_levels [bottomLeft]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT]->level);
+	printf ("set_group_levels [bottomRight]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT]->level);
+#endif
+	drawing->groupLevels = groupLevels;
+
+	ctk_widget_queue_draw (CTK_WIDGET (drawing));
+}
+
+typedef struct {
+	CafekbdKeyboardDrawing *drawing;
+	const gchar *description;
+} XkbLayoutPreviewPrintData;
+
+static void
+cafekbd_keyboard_drawing_begin_print (CtkPrintOperation         *operation,
+				      CtkPrintContext           *context G_GNUC_UNUSED,
+				      XkbLayoutPreviewPrintData *data G_GNUC_UNUSED)
+{
+	/* We always print single-page documents */
+	CtkPrintSettings *settings =
+	    ctk_print_operation_get_print_settings (operation);
+	ctk_print_operation_set_n_pages (operation, 1);
+	if (!ctk_print_settings_has_key
+	    (settings, CTK_PRINT_SETTINGS_ORIENTATION))
+		ctk_print_settings_set_orientation (settings,
+						    CTK_PAGE_ORIENTATION_LANDSCAPE);
+}
+
+static void
+cafekbd_keyboard_drawing_draw_page (CtkPrintOperation         *operation,
+				    CtkPrintContext           *context,
+				    gint                       page_nr G_GNUC_UNUSED,
+				    XkbLayoutPreviewPrintData *data)
+{
+	cairo_t *cr = ctk_print_context_get_cairo_context (context);
+	PangoLayout *layout =
+	    ctk_print_context_create_pango_layout (context);
+	PangoFontDescription *desc =
+	    pango_font_description_from_string ("sans 8");
+	gdouble width = ctk_print_context_get_width (context);
+	gdouble height = ctk_print_context_get_height (context);
+	gdouble dpi_x = ctk_print_context_get_dpi_x (context);
+	gdouble dpi_y = ctk_print_context_get_dpi_y (context);
+	gchar *header;
+
+	ctk_print_operation_set_unit (operation, CTK_UNIT_PIXEL);
+
+	header = g_strdup_printf
+	    (_("Keyboard layout \"%s\"\n"
+	       "Copyright &#169; X.Org Foundation and "
+	       "XKeyboardConfig contributors\n"
+	       "For licensing see package metadata"), data->description);
+	pango_layout_set_markup (layout, header, -1);
+	pango_layout_set_font_description (layout, desc);
+	pango_font_description_free (desc);
+	pango_layout_set_width (layout, pango_units_from_double (width));
+	pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER);
+	cairo_set_source_rgb (cr, 0, 0, 0);
+	cairo_move_to (cr, 0, 0);
+	pango_cairo_show_layout (cr, layout);
+
+	cafekbd_keyboard_drawing_render (CAFEKBD_KEYBOARD_DRAWING
+				      (data->drawing), cr, layout, 0.0,
+				      0.0, width, height, dpi_x, dpi_y);
+
+	g_object_unref (layout);
+}
+
+void
+cafekbd_keyboard_drawing_print (CafekbdKeyboardDrawing * drawing,
+			     CtkWindow * parent_window,
+			     const gchar * description)
+{
+	CtkPrintOperation *print;
+	CtkPrintOperationResult res;
+	static CtkPrintSettings *settings = NULL;
+	XkbLayoutPreviewPrintData data = { drawing, description };
+
+	print = ctk_print_operation_new ();
+
+	if (settings != NULL)
+		ctk_print_operation_set_print_settings (print, settings);
+
+	g_signal_connect (print, "begin_print",
+			  G_CALLBACK (cafekbd_keyboard_drawing_begin_print),
+			  &data);
+	g_signal_connect (print, "draw_page",
+			  G_CALLBACK (cafekbd_keyboard_drawing_draw_page),
+			  &data);
+
+	res = ctk_print_operation_run (print,
+				       CTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
+				       parent_window, NULL);
+
+	if (res == CTK_PRINT_OPERATION_RESULT_APPLY) {
+		if (settings != NULL)
+			g_object_unref (settings);
+		settings = ctk_print_operation_get_print_settings (print);
+		g_object_ref (settings);
+	}
+
+	g_object_unref (print);
+}
+
+static void
+show_layout_response (CtkWidget * dialog, gint resp)
+{
+	CdkRectangle rect;
+	CtkWidget *kbdraw;
+	const gchar *groupName;
+
+	switch (resp) {
+	case CTK_RESPONSE_CLOSE:
+		ctk_window_get_position (CTK_WINDOW (dialog), &rect.x,
+					 &rect.y);
+		ctk_window_get_size (CTK_WINDOW (dialog), &rect.width,
+				     &rect.height);
+		cafekbd_preview_save_position (&rect);
+		ctk_widget_destroy (dialog);
+		break;
+	case CTK_RESPONSE_PRINT:
+		kbdraw =
+		    CTK_WIDGET (g_object_get_data
+				(G_OBJECT (dialog), "kbdraw"));
+		groupName =
+		    (const gchar *) g_object_get_data (G_OBJECT (dialog),
+						       "groupName");
+		cafekbd_keyboard_drawing_print (CAFEKBD_KEYBOARD_DRAWING
+					     (kbdraw), CTK_WINDOW (dialog),
+					     groupName ? groupName :
+					     _("Unknown"));
+	}
+}
+
+CtkWidget *
+cafekbd_keyboard_drawing_new_dialog (gint group, gchar * group_name)
+{
+	static CafekbdKeyboardDrawingGroupLevel groupsLevels[] = { {
+								 0, 1}, {
+									 0,
+									 3},
+	{
+	 0, 0}, {
+		 0, 2}
+	};
+	static CafekbdKeyboardDrawingGroupLevel *pGroupsLevels[] = {
+		groupsLevels, groupsLevels + 1, groupsLevels + 2,
+		groupsLevels + 3
+	};
+
+	CtkBuilder *builder;
+	CtkWidget *dialog, *kbdraw;
+	XkbComponentNamesRec component_names;
+	XklConfigRec *xkl_data;
+	CdkRectangle *rect;
+	GError *error = NULL;
+	char title[128] = "";
+	XklEngine* engine = xkl_engine_get_instance(CDK_DISPLAY_XDISPLAY(cdk_display_get_default()));
+
+	builder = ctk_builder_new ();
+	ctk_builder_add_from_resource (builder,
+	                               "/org/cafe/peripherals/keyboard/show-layout.ui",
+	                               &error);
+
+	if (error) {
+		g_error ("Could not load UI: %s", error->message);
+		g_clear_error (&error);
+	}
+
+
+	dialog =
+	    CTK_WIDGET (ctk_builder_get_object
+			(builder, "gswitchit_layout_view"));
+	kbdraw = cafekbd_keyboard_drawing_new ();
+	ctk_widget_set_vexpand (kbdraw, TRUE);
+
+	snprintf (title, sizeof (title), _("Keyboard Layout \"%s\""),
+		  group_name);
+	ctk_window_set_title (CTK_WINDOW (dialog), title);
+	g_object_set_data_full (G_OBJECT (dialog), "group_name",
+				g_strdup (group_name), g_free);
+
+	cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING
+						 (kbdraw), pGroupsLevels);
+
+	xkl_data = xkl_config_rec_new ();
+	if (xkl_config_rec_get_from_server (xkl_data, engine)) {
+		int num_layouts = g_strv_length (xkl_data->layouts);
+		int num_variants = g_strv_length (xkl_data->variants);
+		if (group >= 0 && group < num_layouts
+		    && group < num_variants) {
+			char *l = g_strdup (xkl_data->layouts[group]);
+			char *v = g_strdup (xkl_data->variants[group]);
+			char **p;
+			int i;
+
+			if ((p = xkl_data->layouts) != NULL)
+				for (i = num_layouts; --i >= 0;)
+					g_free (*p++);
+
+			if ((p = xkl_data->variants) != NULL)
+				for (i = num_variants; --i >= 0;)
+					g_free (*p++);
+
+			xkl_data->layouts =
+			    g_realloc (xkl_data->layouts,
+				       sizeof (char *) * 2);
+			xkl_data->variants =
+			    g_realloc (xkl_data->variants,
+				       sizeof (char *) * 2);
+			xkl_data->layouts[0] = l;
+			xkl_data->variants[0] = v;
+			xkl_data->layouts[1] = xkl_data->variants[1] =
+			    NULL;
+		}
+
+		if (xkl_xkb_config_native_prepare(engine, xkl_data, &component_names))
+		{
+			cafekbd_keyboard_drawing_set_keyboard
+			    (CAFEKBD_KEYBOARD_DRAWING (kbdraw),
+			     &component_names);
+			xkl_xkb_config_native_cleanup (engine,
+						       &component_names);
+		}
+	}
+
+	g_object_unref (G_OBJECT (xkl_data));
+
+	g_object_set_data (G_OBJECT (dialog), "builderData", builder);
+	g_signal_connect (G_OBJECT (dialog), "response", G_CALLBACK (show_layout_response), NULL);
+
+	rect = cafekbd_preview_load_position ();
+
+	if (rect != NULL)
+	{
+		ctk_window_move (CTK_WINDOW (dialog), rect->x, rect->y);
+		ctk_window_resize (CTK_WINDOW (dialog), rect->width, rect->height);
+		g_free (rect);
+	}
+	else
+	{
+		ctk_window_resize (CTK_WINDOW (dialog), 700, 400);
+	}
+
+	ctk_window_set_resizable (CTK_WINDOW (dialog), TRUE);
+
+	ctk_container_add (CTK_CONTAINER
+			   (ctk_builder_get_object
+			    (builder, "preview_vbox")), kbdraw);
+
+	g_object_set_data (G_OBJECT (dialog), "kbdraw", kbdraw);
+
+		g_signal_connect_swapped(dialog, "destroy", G_CALLBACK(g_object_unref),  g_object_get_data(G_OBJECT(dialog), "builderData"));
+
+	ctk_widget_show_all(dialog);
+
+	return dialog;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-153544-5624-cppcheck@1eab72938451_devel/5.html b/2025-02-06-153544-5624-cppcheck@1eab72938451_devel/5.html new file mode 100644 index 0000000..a0afe30 --- /dev/null +++ b/2025-02-06-153544-5624-cppcheck@1eab72938451_devel/5.html @@ -0,0 +1,1978 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+#include <config.h>
+
+#include <memory.h>
+
+#include <cairo.h>
+
+#include <cdk/cdkkeysyms.h>
+#include <cdk/cdkx.h>
+#include <glib/gi18n-lib.h>
+#include <glib/gprintf.h>
+
+#include <cafekbd-status.h>
+
+#include <cafekbd-desktop-config.h>
+#include <cafekbd-indicator-config.h>
+
+typedef struct _gki_globals {
+	XklEngine *engine;
+	XklConfigRegistry *registry;
+
+	CafekbdDesktopConfig cfg;
+	CafekbdIndicatorConfig ind_cfg;
+	CafekbdKeyboardConfig kbd_cfg;
+
+	const gchar *tooltips_format;
+	gchar **full_group_names;
+	gchar **short_group_names;
+
+	gint current_width;
+	gint current_height;
+	int real_width;
+
+	GSList *icons;		/* list of GdkPixbuf */
+	GSList *widget_instances;	/* list of CafekbdStatus */
+	gulong state_changed_handler;
+	gulong config_changed_handler;
+} gki_globals;
+
+static gchar *settings_signal_names[] = {
+	"notify::ctk-theme-name",
+	"notify::ctk-key-theme-name",
+	"notify::ctk-font-name",
+	"notify::font-options",
+};
+
+struct _CafekbdStatusPrivate {
+	gdouble angle;
+	gulong settings_signal_handlers[sizeof (settings_signal_names) /
+					sizeof (settings_signal_names[0])];
+};
+
+/* one instance for ALL widgets */
+static gki_globals globals;
+
+#define ForAllIndicators() \
+	{ \
+		GSList* cur; \
+		for (cur = globals.widget_instances; cur != NULL; cur = cur->next) { \
+			CafekbdStatus * gki = (CafekbdStatus*)cur->data;
+#define NextIndicator() \
+		} \
+	}
+
+G_DEFINE_TYPE (CafekbdStatus, cafekbd_status, CTK_TYPE_STATUS_ICON)<--- There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
+static void
+cafekbd_status_global_init (void);
+static void
+cafekbd_status_global_term (void);
+static GdkPixbuf *
+cafekbd_status_prepare_drawing (CafekbdStatus * gki, int group);
+static void
+cafekbd_status_set_current_page_for_group (CafekbdStatus * gki, int group);
+static void
+cafekbd_status_set_current_page (CafekbdStatus * gki);
+static void
+cafekbd_status_global_cleanup (CafekbdStatus * gki);
+static void
+cafekbd_status_global_fill (CafekbdStatus * gki);
+static void
+cafekbd_status_set_tooltips (CafekbdStatus * gki, const char *str);
+
+void
+cafekbd_status_set_tooltips (CafekbdStatus * gki, const char *str)
+{
+	g_assert (str == NULL || g_utf8_validate (str, -1, NULL));
+
+	ctk_status_icon_set_tooltip_text (CTK_STATUS_ICON (gki), str);
+}
+
+void
+cafekbd_status_global_cleanup (CafekbdStatus *gki G_GNUC_UNUSED)
+{
+	while (globals.icons) {
+		if (globals.icons->data)
+			g_object_unref (G_OBJECT (globals.icons->data));
+		globals.icons =
+		    g_slist_delete_link (globals.icons, globals.icons);
+	}
+}
+
+void
+cafekbd_status_global_fill (CafekbdStatus * gki)
+{
+	int grp;
+	int total_groups = xkl_engine_get_num_groups (globals.engine);
+
+	for (grp = 0; grp < total_groups; grp++) {
+		GdkPixbuf *page = cafekbd_status_prepare_drawing (gki, grp);
+		globals.icons = g_slist_append (globals.icons, page);
+	}
+}
+
+static void
+cafekbd_status_activate (CafekbdStatus *gki G_GNUC_UNUSED)
+{
+	xkl_debug (150, "Mouse button pressed on applet\n");
+	cafekbd_desktop_config_lock_next_group (&globals.cfg);
+}
+
+/* hackish xref */
+extern gchar *cafekbd_indicator_extract_layout_name (int group,
+						  XklEngine * engine,
+						  CafekbdKeyboardConfig *
+						  kbd_cfg,
+						  gchar **
+						  short_group_names,
+						  gchar **
+						  full_group_names);
+
+extern gchar *cafekbd_indicator_create_label_title (int group,
+						 GHashTable **
+						 ln2cnt_map,
+						 gchar * layout_name);
+
+static void
+cafekbd_status_render_cairo (cairo_t * cr, int group)
+{
+	double r, g, b;
+	PangoFontDescription *pfd;
+	PangoContext *pcc;
+	PangoLayout *pl;
+	int lwidth, lheight;
+	gchar *layout_name, *lbl_title;
+	double screen_res;
+	cairo_font_options_t *fo;
+	static GHashTable *ln2cnt_map = NULL;
+
+	xkl_debug (160, "Rendering cairo for group %d\n", group);
+	if (globals.ind_cfg.background_color != NULL &&
+	    globals.ind_cfg.background_color[0] != 0) {
+		if (sscanf
+		    (globals.ind_cfg.background_color, "%lg %lg %lg", &r,
+		     &g, &b) == 3) {
+			cairo_set_source_rgb (cr, r, g, b);
+			cairo_rectangle (cr, 0, 0, globals.current_width,
+					 globals.current_height);
+			cairo_fill (cr);
+		}
+	}
+
+	if (globals.ind_cfg.foreground_color != NULL &&
+	    globals.ind_cfg.foreground_color[0] != 0) {
+		if (sscanf
+		    (globals.ind_cfg.foreground_color, "%lg %lg %lg", &r,
+		     &g, &b) == 3) {
+			cairo_set_source_rgb (cr, r, g, b);
+		}
+	}
+
+	pcc = pango_cairo_create_context (cr);
+
+	screen_res = cdk_screen_get_resolution (cdk_screen_get_default ());
+	if (screen_res > 0)
+		pango_cairo_context_set_resolution (pcc, screen_res);
+
+	fo = cairo_font_options_copy (cdk_screen_get_font_options
+				      (cdk_screen_get_default ()));
+	/* SUBPIXEL antialiasing gives bad results on in-memory images */
+	if (cairo_font_options_get_antialias (fo) ==
+	    CAIRO_ANTIALIAS_SUBPIXEL)
+		cairo_font_options_set_antialias (fo,
+						  CAIRO_ANTIALIAS_GRAY);
+	pango_cairo_context_set_font_options (pcc, fo);
+
+	pl = pango_layout_new (pcc);
+
+	layout_name = cafekbd_indicator_extract_layout_name (group,
+							  globals.engine,
+							  &globals.kbd_cfg,
+							  globals.short_group_names,
+							  globals.full_group_names);
+	lbl_title =
+	    cafekbd_indicator_create_label_title (group, &ln2cnt_map,
+					       layout_name);
+
+	if (group + 1 == xkl_engine_get_num_groups (globals.engine)) {
+		g_hash_table_destroy (ln2cnt_map);
+		ln2cnt_map = NULL;
+	}
+
+	pango_layout_set_text (pl, lbl_title, -1);
+
+	g_free (lbl_title);
+
+	pfd = pango_font_description_from_string (globals.ind_cfg.font_family);
+
+	pango_layout_set_font_description (pl, pfd);
+	pango_layout_get_size (pl, &lwidth, &lheight);
+
+	cairo_move_to (cr,
+		       (globals.current_width - lwidth / PANGO_SCALE) / 2,
+		       (globals.current_height -
+			lheight / PANGO_SCALE) / 2);
+
+	pango_cairo_show_layout (cr, pl);
+
+	pango_font_description_free (pfd);
+	g_object_unref (pl);
+	g_object_unref (pcc);
+	cairo_font_options_destroy (fo);
+	cairo_destroy (cr);
+
+	globals.real_width = (lwidth / PANGO_SCALE) + 4;
+	if (globals.real_width > globals.current_width)
+		globals.real_width = globals.current_width;
+	if (globals.real_width < globals.current_height)
+		globals.real_width = globals.current_height;
+}
+
+static inline guint8
+convert_color_channel (guint8 src, guint8 alpha)
+{
+	return alpha ? ((((guint) src) << 8) - src) / alpha : 0;
+}
+
+static void
+convert_bgra_to_rgba (guint8 const *src, guint8 * dst, int width,
+		      int height, int new_width)
+{
+	int xoffset = width - new_width;
+
+	/* *4 */
+	int ptr_step = xoffset << 2;
+
+	int x, y;
+
+	/* / 2 * 4 */
+	src = src + ((xoffset >> 1) << 2);
+
+	for (y = height; --y >= 0; src += ptr_step) {
+		for (x = new_width; --x >= 0;) {
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+			dst[0] = convert_color_channel (src[2], src[3]);
+			dst[1] = convert_color_channel (src[1], src[3]);
+			dst[2] = convert_color_channel (src[0], src[3]);
+			dst[3] = src[3];
+#else
+			dst[0] = convert_color_channel (src[1], src[0]);
+			dst[1] = convert_color_channel (src[2], src[0]);
+			dst[2] = convert_color_channel (src[3], src[0]);
+			dst[3] = src[0];
+#endif
+			dst += 4;
+			src += 4;
+		}
+	}
+}
+
+static GdkPixbuf *
+cafekbd_status_prepare_drawing (CafekbdStatus *gki G_GNUC_UNUSED,
+				int            group)
+{
+	GError *gerror = NULL;
+	char *image_filename;
+	GdkPixbuf *image;
+
+	if (globals.current_width == 0)
+		return NULL;
+
+	if (globals.ind_cfg.show_flags) {
+
+		image_filename =
+		    (char *) g_slist_nth_data (globals.
+					       ind_cfg.image_filenames,
+					       group);
+
+		image = gdk_pixbuf_new_from_file_at_size (image_filename,
+							  globals.current_width,
+							  globals.current_height,
+							  &gerror);
+
+		if (image == NULL) {
+			CtkWidget *dialog = ctk_message_dialog_new (NULL,
+								    CTK_DIALOG_DESTROY_WITH_PARENT,
+								    CTK_MESSAGE_ERROR,
+								    CTK_BUTTONS_OK,
+								    _
+								    ("There was an error loading an image: %s"),
+								    gerror
+								    ==
+								    NULL ?
+								    "Unknown"
+								    :
+								    gerror->message);
+			g_signal_connect (G_OBJECT (dialog), "response",
+					  G_CALLBACK (ctk_widget_destroy),
+					  NULL);
+
+			ctk_window_set_resizable (CTK_WINDOW (dialog),
+						  FALSE);
+
+			ctk_widget_show (dialog);
+			g_error_free (gerror);
+
+			return NULL;
+		}
+		xkl_debug (150,
+			   "Image %d[%s] loaded -> %p[%dx%d], alpha: %d\n",
+			   group, image_filename, image,
+			   gdk_pixbuf_get_width (image),
+			   gdk_pixbuf_get_height (image),
+			   gdk_pixbuf_get_has_alpha (image));
+
+		return image;
+	} else {
+		cairo_surface_t *cs =
+		    cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
+						globals.current_width,
+						globals.current_height);
+		unsigned char *cairo_data;
+		guchar *pixbuf_data;
+		cafekbd_status_render_cairo (cairo_create (cs), group);
+		cairo_data = cairo_image_surface_get_data (cs);
+#if 0
+		char pngfilename[20];
+		g_sprintf (pngfilename, "label%d.png", group);
+		cairo_surface_write_to_png (cs, pngfilename);
+#endif
+		pixbuf_data =
+		    g_new0 (guchar,
+			    4 * globals.real_width *
+			    globals.current_height);
+		convert_bgra_to_rgba (cairo_data, pixbuf_data,
+				      globals.current_width,
+				      globals.current_height,
+				      globals.real_width);
+
+		cairo_surface_destroy (cs);
+
+		image = gdk_pixbuf_new_from_data (pixbuf_data,
+						  GDK_COLORSPACE_RGB,
+						  TRUE,
+						  8,
+						  globals.real_width,
+						  globals.current_height,
+						  globals.real_width *
+						  4,
+						  (GdkPixbufDestroyNotify)
+						  g_free, NULL);
+		xkl_debug (150,
+			   "Image %d created -> %p[%dx%d], alpha: %d\n",
+			   group, image, gdk_pixbuf_get_width (image),
+			   gdk_pixbuf_get_height (image),
+			   gdk_pixbuf_get_has_alpha (image));
+
+		return image;
+	}
+	return NULL;
+}
+
+static void
+cafekbd_status_update_tooltips (CafekbdStatus * gki)
+{
+	XklState *state = xkl_engine_get_current_state (globals.engine);
+	gchar *buf;
+	if (state == NULL || state->group < 0
+	    || state->group >= g_strv_length (globals.full_group_names))
+		return;
+
+	buf = g_strdup_printf (globals.tooltips_format,
+			       globals.full_group_names[state->group]);
+
+	cafekbd_status_set_tooltips (gki, buf);
+	g_free (buf);
+}
+
+void
+cafekbd_status_reinit_ui (CafekbdStatus * gki)
+{
+	cafekbd_status_global_cleanup (gki);
+	cafekbd_status_global_fill (gki);
+
+	cafekbd_status_set_current_page (gki);
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+			    gchar     *key G_GNUC_UNUSED,
+			    gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "General configuration changed in settings - reiniting...\n");
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+	ForAllIndicators () {
+		cafekbd_status_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_ind_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+				gchar     *key G_GNUC_UNUSED,
+				gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "Applet configuration changed in settings - reiniting...\n");
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+
+	cafekbd_indicator_config_free_image_filenames (&globals.ind_cfg);
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	ForAllIndicators () {
+		cafekbd_status_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+static void
+cafekbd_status_load_group_names (const gchar ** layout_ids,
+			      const gchar ** variant_ids)
+{
+	if (!cafekbd_desktop_config_load_group_descriptions
+	    (&globals.cfg, globals.registry, layout_ids, variant_ids,
+	     &globals.short_group_names, &globals.full_group_names)) {
+		/* We just populate no short names (remain NULL) -
+		 * full names are going to be used anyway */
+		gint i, total_groups =
+		    xkl_engine_get_num_groups (globals.engine);
+		xkl_debug (150, "group descriptions loaded: %d!\n",
+			   total_groups);
+		globals.full_group_names =
+		    g_new0 (char *, total_groups + 1);
+
+		if (xkl_engine_get_features (globals.engine) &
+		    XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
+			gchar **lst = globals.kbd_cfg.layouts_variants;
+			for (i = 0; *lst; lst++, i++) {
+				globals.full_group_names[i] =
+				    g_strdup ((char *) *lst);
+			}
+		} else {
+			for (i = total_groups; --i >= 0;) {
+				globals.full_group_names[i] =
+				    g_strdup_printf ("Group %d", i);
+			}
+		}
+	}
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_kbd_cfg_callback (CafekbdStatus *gki G_GNUC_UNUSED)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+	xkl_debug (100,
+		   "XKB configuration changed on X Server - reiniting...\n");
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+
+	cafekbd_indicator_config_free_image_filenames (&globals.ind_cfg);
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	g_strfreev (globals.full_group_names);
+	globals.full_group_names = NULL;
+
+	if (globals.short_group_names != NULL) {
+		g_strfreev (globals.short_group_names);
+		globals.short_group_names = NULL;
+	}
+
+	cafekbd_status_load_group_names ((const gchar **) xklrec->layouts,
+				      (const gchar **) xklrec->variants);
+
+	ForAllIndicators () {
+		cafekbd_status_reinit_ui (gki);
+	} NextIndicator ();
+	g_object_unref (G_OBJECT (xklrec));
+}
+
+/* Should be called once for all applets */
+static void
+cafekbd_status_state_callback (XklEngine           *engine G_GNUC_UNUSED,
+			       XklEngineStateChange changeType,
+			       gint                 group,
+			       gboolean             restore)
+{
+	xkl_debug (150, "group is now %d, restore: %d\n", group, restore);
+
+	if (changeType == GROUP_CHANGED) {
+		ForAllIndicators () {
+			xkl_debug (200, "do repaint\n");
+			cafekbd_status_set_current_page_for_group (gki,
+								group);
+		}
+		NextIndicator ();
+	}
+}
+
+
+void
+cafekbd_status_set_current_page (CafekbdStatus * gki)
+{
+	XklState *cur_state;
+	cur_state = xkl_engine_get_current_state (globals.engine);
+	if (cur_state->group >= 0)
+		cafekbd_status_set_current_page_for_group (gki,
+							cur_state->group);
+}
+
+void
+cafekbd_status_set_current_page_for_group (CafekbdStatus * gki, int group)
+{
+	xkl_debug (200, "Revalidating for group %d\n", group);
+
+	ctk_status_icon_set_from_pixbuf (CTK_STATUS_ICON (gki),
+					 GDK_PIXBUF (g_slist_nth_data
+						     (globals.icons,
+						      group)));
+
+	cafekbd_status_update_tooltips (gki);
+}
+
+/* Should be called once for all widgets */
+static CdkFilterReturn
+cafekbd_status_filter_x_evt (CdkXEvent *xev,
+			     CdkEvent  *event G_GNUC_UNUSED)
+{
+	XEvent *xevent = (XEvent *) xev;
+
+	xkl_engine_filter_events (globals.engine, xevent);
+	switch (xevent->type) {
+	case ReparentNotify:
+		{
+			XReparentEvent *rne = (XReparentEvent *) xev;
+
+			ForAllIndicators () {
+				guint32 xid =
+				    ctk_status_icon_get_x11_window_id
+				    (CTK_STATUS_ICON (gki));
+
+				/* compare the indicator's parent window with the even window */
+				if (xid == rne->window) {
+					/* if so - make it transparent... */
+					xkl_engine_set_window_transparent
+					    (globals.engine, rne->window,
+					     TRUE);
+				}
+			}
+		NextIndicator ()}
+		break;
+	}
+	return CDK_FILTER_CONTINUE;
+}
+
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_start_listen (void)
+{
+	cdk_window_add_filter (NULL, (CdkFilterFunc)
+			       cafekbd_status_filter_x_evt, NULL);
+	cdk_window_add_filter (cdk_get_default_root_window (),
+			       (CdkFilterFunc) cafekbd_status_filter_x_evt,
+			       NULL);
+
+	xkl_engine_start_listen (globals.engine,
+				 XKLL_TRACK_KEYBOARD_STATE);
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_stop_listen (void)
+{
+	xkl_engine_stop_listen (globals.engine, XKLL_TRACK_KEYBOARD_STATE);
+
+	cdk_window_remove_filter (NULL, (CdkFilterFunc)
+				  cafekbd_status_filter_x_evt, NULL);
+	cdk_window_remove_filter
+	    (cdk_get_default_root_window (),
+	     (CdkFilterFunc) cafekbd_status_filter_x_evt, NULL);
+}
+
+static void
+cafekbd_status_size_changed (CafekbdStatus * gki, gint size)
+{
+	if (globals.current_height != size) {
+		globals.current_height = size;
+		globals.current_width = size * 3 / 2;
+		cafekbd_status_reinit_ui (gki);
+	}
+}
+
+static void
+cafekbd_status_theme_changed (CtkSettings   *settings G_GNUC_UNUSED,
+			      GParamSpec    *pspec G_GNUC_UNUSED,
+			      CafekbdStatus *gki)
+{
+	cafekbd_indicator_config_refresh_style (&globals.ind_cfg);
+	cafekbd_status_reinit_ui (gki);
+}
+
+static void
+cafekbd_status_init (CafekbdStatus * gki)
+{
+	int i;
+
+	if (!g_slist_length (globals.widget_instances))
+		cafekbd_status_global_init ();
+
+	gki->priv = g_new0 (CafekbdStatusPrivate, 1);
+
+	/* This should give NA a hint about the order */
+	/* commenting out fixes a Cdk-critical warning */
+/*	ctk_status_icon_set_name (CTK_STATUS_ICON (gki), "keyboard"); */
+
+	xkl_debug (100, "Initiating the widget startup process for %p\n",
+		   gki);
+
+	if (globals.engine == NULL) {
+		cafekbd_status_set_tooltips (gki,
+					  _("XKB initialization error"));
+		return;
+	}
+
+	cafekbd_status_set_tooltips (gki, NULL);
+
+	cafekbd_status_global_fill (gki);
+	cafekbd_status_set_current_page (gki);
+
+	/* append AFTER all initialization work is finished */
+	globals.widget_instances =
+	    g_slist_append (globals.widget_instances, gki);
+
+	g_signal_connect (gki, "size-changed",
+			  G_CALLBACK (cafekbd_status_size_changed), NULL);
+	g_signal_connect (gki, "activate",
+			  G_CALLBACK (cafekbd_status_activate), NULL);
+
+	for (i = sizeof (settings_signal_names) /
+	     sizeof (settings_signal_names[0]); --i >= 0;)
+		gki->priv->settings_signal_handlers[i] =
+		    g_signal_connect_after (ctk_settings_get_default (),
+					    settings_signal_names[i],
+					    G_CALLBACK
+					    (cafekbd_status_theme_changed),
+					    gki);
+}
+
+static void
+cafekbd_status_finalize (GObject * obj)
+{
+	int i;
+	CafekbdStatus *gki = CAFEKBD_STATUS (obj);
+	xkl_debug (100,
+		   "Starting the cafe-kbd-status widget shutdown process for %p\n",
+		   gki);
+
+	for (i = sizeof (settings_signal_names) /
+	     sizeof (settings_signal_names[0]); --i >= 0;)
+		g_signal_handler_disconnect (ctk_settings_get_default (),
+					     gki->
+					     priv->settings_signal_handlers
+					     [i]);
+
+	/* remove BEFORE all termination work is finished */
+	globals.widget_instances =
+	    g_slist_remove (globals.widget_instances, gki);
+
+	cafekbd_status_global_cleanup (gki);
+
+	xkl_debug (100,
+		   "The instance of cafe-kbd-status successfully finalized\n");
+
+	g_free (gki->priv);
+
+	G_OBJECT_CLASS (cafekbd_status_parent_class)->finalize (obj);
+
+	if (!g_slist_length (globals.widget_instances))
+		cafekbd_status_global_term ();
+}
+
+static void
+cafekbd_status_global_term (void)
+{
+	xkl_debug (100, "*** Last  CafekbdStatus instance *** \n");
+	cafekbd_status_stop_listen ();
+
+	cafekbd_desktop_config_stop_listen (&globals.cfg);
+	cafekbd_indicator_config_stop_listen (&globals.ind_cfg);
+
+	cafekbd_indicator_config_term (&globals.ind_cfg);
+	cafekbd_keyboard_config_term (&globals.kbd_cfg);
+	cafekbd_desktop_config_term (&globals.cfg);
+
+	if (g_signal_handler_is_connected
+	    (globals.engine, globals.state_changed_handler)) {
+		g_signal_handler_disconnect (globals.engine,
+					     globals.state_changed_handler);
+		globals.state_changed_handler = 0;
+	}
+	if (g_signal_handler_is_connected
+	    (globals.engine, globals.config_changed_handler)) {
+		g_signal_handler_disconnect (globals.engine,
+					     globals.config_changed_handler);
+		globals.config_changed_handler = 0;
+	}
+
+	g_object_unref (G_OBJECT (globals.registry));
+	globals.registry = NULL;
+	g_object_unref (G_OBJECT (globals.engine));
+	globals.engine = NULL;
+	xkl_debug (100, "*** Terminated globals *** \n");
+}
+
+static void
+cafekbd_status_class_init (CafekbdStatusClass * klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+	xkl_debug (100, "*** First CafekbdStatus instance *** \n");
+
+	memset (&globals, 0, sizeof (globals));
+
+	/* Initing some global vars */
+	globals.tooltips_format = "%s";
+
+	/* Initing vtable */
+	object_class->finalize = cafekbd_status_finalize;
+
+	/* Signals */
+}
+
+static void
+cafekbd_status_global_init (void)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+
+	globals.engine = xkl_engine_get_instance(CDK_DISPLAY_XDISPLAY(cdk_display_get_default()));
+
+	if (globals.engine == NULL) {
+		xkl_debug (0, "Libxklavier initialization error");
+		return;
+	}
+
+	globals.state_changed_handler =
+	    g_signal_connect (globals.engine, "X-state-changed",
+			      G_CALLBACK (cafekbd_status_state_callback),
+			      NULL);
+	globals.config_changed_handler =
+	    g_signal_connect (globals.engine, "X-config-changed",
+			      G_CALLBACK (cafekbd_status_kbd_cfg_callback),
+			      NULL);
+
+	cafekbd_desktop_config_init (&globals.cfg, globals.engine);
+	cafekbd_keyboard_config_init (&globals.kbd_cfg, globals.engine);
+	cafekbd_indicator_config_init (&globals.ind_cfg, globals.engine);
+
+	cafekbd_desktop_config_start_listen (&globals.cfg,
+					  (GCallback)
+					  cafekbd_status_cfg_changed, NULL);
+	cafekbd_indicator_config_start_listen (&globals.ind_cfg,
+					    (GCallback)
+					    cafekbd_status_ind_cfg_changed,
+					    NULL);
+
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+
+	globals.registry =
+	    xkl_config_registry_get_instance (globals.engine);
+	xkl_config_registry_load (globals.registry,
+				  globals.cfg.load_extra_items);
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	cafekbd_status_load_group_names ((const gchar **) xklrec->layouts,
+				      (const gchar **) xklrec->variants);
+	g_object_unref (G_OBJECT (xklrec));
+
+	cafekbd_status_start_listen ();
+
+	xkl_debug (100, "*** Inited globals *** \n");
+}
+
+CtkStatusIcon *
+cafekbd_status_new (void)
+{
+	return
+	    CTK_STATUS_ICON (g_object_new (cafekbd_status_get_type (), NULL));
+}
+
+/**
+ * cafekbd_status_get_xkl_engine:
+ *
+ * Returns: (transfer none): The engine shared by all CafekbdStatus objects
+ */
+XklEngine *
+cafekbd_status_get_xkl_engine ()
+{
+	return globals.engine;
+}
+
+/**
+ * cafekbd_status_get_group_names:
+ *
+ * Returns: (transfer none) (array zero-terminated=1): List of group names
+ */
+gchar **
+cafekbd_status_get_group_names ()
+{
+	return globals.full_group_names;
+}
+
+gchar *
+cafekbd_status_get_image_filename (guint group)
+{
+	if (!globals.ind_cfg.show_flags)
+		return NULL;
+	return cafekbd_indicator_config_get_images_file (&globals.ind_cfg,
+						      &globals.kbd_cfg,
+						      group);
+}
+
+void
+cafekbd_status_set_angle (CafekbdStatus * gki, gdouble angle)
+{
+	gki->priv->angle = angle;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-153544-5624-cppcheck@1eab72938451_devel/6.html b/2025-02-06-153544-5624-cppcheck@1eab72938451_devel/6.html new file mode 100644 index 0000000..5ed6ace --- /dev/null +++ b/2025-02-06-153544-5624-cppcheck@1eab72938451_devel/6.html @@ -0,0 +1,806 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctk/ctk.h>
+#include <stdlib.h>
+#include <string.h>
+#include <glib.h>
+#include "libcafekbd/cafekbd-keyboard-drawing.h"
+
+
+static gchar *groups = NULL;
+static gchar *levels = NULL;
+static gchar *symbols = NULL;
+static gchar *keycodes = NULL;
+static gchar *geometry = NULL;
+
+static gboolean track_config = FALSE;
+static gboolean track_modifiers = FALSE;
+static gboolean program_version = FALSE;
+
+static const GOptionEntry options[] = {
+	{"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
+	 "Keyboard groups to display, from 1-4. Up to four groups only may be "
+	 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
+	 "group1[,group2[,group3[,group4]]]"},
+	{"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
+	 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
+	 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
+	 "level1[,level2[,level3[,level4]]]"},
+	{"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
+	 "Symbols component of the keyboard. If you omit this option, it is "
+	 "obtained from the X server; that is, the keyboard that is currently "
+	 "configured is drawn. Examples: --symbols=us or "
+	 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL},
+	{"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
+	 "Keycodes component of the keyboard. If you omit this option, it is "
+	 "obtained from the X server; that is, the keyboard that is currently"
+	 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
+	 NULL},
+	{"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
+	 "Geometry xkb component. If you omit this option, it is obtained from the"
+	 " X server; that is, the keyboard that is currently configured is drawn. "
+	 "Example: --geometry=kinesis", NULL},
+	{"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
+	 "Track the current modifiers", NULL},
+	{"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
+	 "Track the server XKB configuration", NULL},
+	{"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
+	 "Show current version", NULL},
+	{NULL},
+};
+
+static gboolean
+set_groups (gchar * groups_option,
+	    CafekbdKeyboardDrawingGroupLevel * groupLevels)
+{
+	CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
+	gint cntr, g;
+
+	groupLevels[0].group =
+	    groupLevels[1].group =
+	    groupLevels[2].group = groupLevels[3].group = -1;
+
+	if (groups_option == NULL)
+		return TRUE;
+
+	for (cntr = 4; --cntr >= 0;) {
+		if (*groups_option == '\0')
+			return FALSE;
+
+		g = *groups_option - '1';
+		if (g < 0 || g >= 4)
+			return FALSE;
+
+		pgl->group = g;
+		/* printf ("group %d\n", pgl->group); */
+
+		groups_option++;
+		if (*groups_option == '\0')
+			return TRUE;
+		if (*groups_option != ',')
+			return FALSE;
+
+		groups_option++;
+		pgl++;
+	}
+
+	return TRUE;
+}
+
+static gboolean
+set_levels (gchar * levels_option,
+	    CafekbdKeyboardDrawingGroupLevel * groupLevels)
+{
+	CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
+	gint cntr, l;
+	gchar *p;
+
+	groupLevels[0].level =
+	    groupLevels[1].level =
+	    groupLevels[2].level = groupLevels[3].level = -1;
+
+	if (levels_option == NULL)
+		return TRUE;
+
+	for (cntr = 4; --cntr >= 0;) {
+		if (*levels_option == '\0')
+			return FALSE;
+
+		l = (gint) strtol (levels_option, &p, 10) - 1;
+		if (l < 0 || l >= 64)
+			return FALSE;
+
+		pgl->level = l;
+		/* printf ("level %d\n", pgl->level); */
+
+		levels_option = p;
+		if (*levels_option == '\0')
+			return TRUE;
+		if (*levels_option != ',')
+			return FALSE;
+
+		levels_option++;
+		pgl++;
+	}
+
+	return TRUE;
+}
+
+static void
+bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED,
+	     guint                   keycode)
+{
+	g_warning
+	    ("got keycode %u, which is not on your keyboard according to your configuration",
+	     keycode);
+}
+
+gint
+main (gint argc, gchar ** argv)
+{
+	CtkWidget *window;
+	CtkWidget *cafekbd_keyboard_drawing;
+	CdkScreen *screen;
+	CdkMonitor *monitor;
+	CdkRectangle rect;
+	GOptionContext *context;
+	GError *error = NULL;
+
+	CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
+	    { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
+	CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
+	    { &groupLevels[0], &groupLevels[1], &groupLevels[2],
+		&groupLevels[3]
+	};
+
+	context = g_option_context_new ("kbdraw");
+	g_option_context_add_main_entries (context, options, NULL);
+	if (!g_option_context_parse (context, &argc, &argv, &error)) {
+		g_message ("option parsing failed: %s", error->message);
+		g_option_context_free (context);
+		exit (EXIT_FAILURE);
+	}
+	g_option_context_free (context);
+
+	if (program_version) {
+		g_print ("kbdraw %s\n", VERSION);
+		exit (0);
+	}
+
+	ctk_init (&argc, &argv);
+
+	if (!set_groups (groups, groupLevels)) {
+		g_printerr ("--groups: invalid argument\n");
+		exit (1);
+	}
+
+	if (!set_levels (levels, groupLevels)) {
+		g_printerr ("--levels: invalid argument\n");
+		exit (1);
+	}
+
+	window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
+	g_signal_connect (G_OBJECT (window), "destroy",
+			  G_CALLBACK (ctk_main_quit), NULL);
+
+	screen = ctk_window_get_screen (CTK_WINDOW (window));
+	monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
+	cdk_monitor_get_geometry (monitor, &rect);
+	ctk_window_set_default_size (CTK_WINDOW (window),
+				     rect.width * 4 / 5,
+				     rect.height * 1 / 2);
+
+	ctk_widget_show (window);
+
+	cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
+	ctk_widget_show (cafekbd_keyboard_drawing);
+	ctk_container_add (CTK_CONTAINER (window), cafekbd_keyboard_drawing);
+
+	cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING
+						 (cafekbd_keyboard_drawing),
+						 pgroupLevels);
+
+	if (track_modifiers)
+		cafekbd_keyboard_drawing_set_track_modifiers
+		    (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing), TRUE);
+	if (track_config)
+		cafekbd_keyboard_drawing_set_track_config
+		    (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing), TRUE);
+	g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",
+			  G_CALLBACK (bad_keycode), NULL);
+
+	if (symbols || geometry || keycodes) {
+		XkbComponentNamesRec names;
+		gint success;
+
+		memset (&names, '\0', sizeof (names));
+
+		if (symbols)
+			names.symbols = symbols;
+		else
+			names.symbols = (gchar *)
+			    cafekbd_keyboard_drawing_get_symbols
+			    (CAFEKBD_KEYBOARD_DRAWING
+			     (cafekbd_keyboard_drawing));
+
+		if (keycodes)
+			names.keycodes = keycodes;
+		else
+			names.keycodes = (gchar *)
+			    cafekbd_keyboard_drawing_get_keycodes
+			    (CAFEKBD_KEYBOARD_DRAWING
+			     (cafekbd_keyboard_drawing));
+
+		if (geometry)
+			names.geometry = geometry;
+		else
+			names.geometry = (gchar *)
+			    cafekbd_keyboard_drawing_get_geometry
+			    (CAFEKBD_KEYBOARD_DRAWING
+			     (cafekbd_keyboard_drawing));
+
+		success =
+		    cafekbd_keyboard_drawing_set_keyboard
+		    (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing),
+		     &names);
+		if (!success) {
+			g_printerr
+			    ("\nError loading new keyboard description with components:\n\n"
+			     "  keycodes:  %s\n" "  types:     %s\n"
+			     "  compat:    %s\n" "  symbols:   %s\n"
+			     "  geometry:  %s\n\n", names.keycodes,
+			     names.types, names.compat, names.symbols,
+			     names.geometry);
+			exit (1);
+		}
+	}
+
+	ctk_widget_grab_focus (cafekbd_keyboard_drawing);
+
+	ctk_main ();
+
+	return 0;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-153544-5624-cppcheck@1eab72938451_devel/7.html b/2025-02-06-153544-5624-cppcheck@1eab72938451_devel/7.html new file mode 100644 index 0000000..8122587 --- /dev/null +++ b/2025-02-06-153544-5624-cppcheck@1eab72938451_devel/7.html @@ -0,0 +1,358 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+
+#include "libxklavier/xklavier.h"
+#include "libcafekbd/cafekbd-status.h"
+
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include <cdk/cdk.h>
+#include <cdk/cdkx.h>
+#include <glib/gi18n.h>
+#include <ctk/ctk.h>
+
+#include "X11/XKBlib.h"
+
+int
+main (int argc, char **argv)
+{
+	CtkStatusIcon *icon;<--- Variable 'icon' can be declared as pointer to const
+
+	bindtextdomain (GETTEXT_PACKAGE, CAFELOCALEDIR);
+	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+	textdomain (GETTEXT_PACKAGE);
+
+	ctk_init (&argc, &argv);
+
+	icon = cafekbd_status_new ();
+
+        if (icon == NULL)
+	{
+		return 1;
+	}
+
+	ctk_main ();
+
+	return 0;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-153544-5624-cppcheck@1eab72938451_devel/commitmsg b/2025-02-06-153544-5624-cppcheck@1eab72938451_devel/commitmsg new file mode 100644 index 0000000..891e4bf --- /dev/null +++ b/2025-02-06-153544-5624-cppcheck@1eab72938451_devel/commitmsg @@ -0,0 +1 @@ +Release 2.0.0 diff --git a/2025-02-06-153544-5624-cppcheck@1eab72938451_devel/index.html b/2025-02-06-153544-5624-cppcheck@1eab72938451_devel/index.html new file mode 100644 index 0000000..1040930 --- /dev/null +++ b/2025-02-06-153544-5624-cppcheck@1eab72938451_devel/index.html @@ -0,0 +1,242 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LineIdCWESeverityMessage
checkersReportinformationActive checkers: There was critical errors (use --checkers-report=<filename> to see details)
libcafekbd/cafekbd-desktop-config.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
libcafekbd/cafekbd-indicator-config.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
libcafekbd/cafekbd-indicator.c
66unknownMacroerrorThere is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
libcafekbd/cafekbd-keyboard-config.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
67knownConditionTrueFalse571styleCondition '*l1' is always true
67knownConditionTrueFalse571styleCondition '*l2' is always true
226constVariablePointer398styleVariable 'delim' can be declared as pointer to const
227knownConditionTrueFalse571styleCondition 'option!=NULL' is always true
282knownConditionTrueFalse570styleCondition 'variant==NULL' is always false
609constParameterPointer398styleParameter 'kbd_config' can be declared as pointer to const
libcafekbd/cafekbd-keyboard-drawing.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
61constParameterPointer398styleParameter 'context' can be declared as pointer to const
67constParameterPointer398styleParameter 'context' can be declared as pointer to const
625constParameterPointer398styleParameter 'context' can be declared as pointer to const
1026constVariablePointer398styleVariable 'runp' can be declared as pointer to const
1036constVariablePointer398styleVariable 'geometry' can be declared as pointer to const
1202constParameterPointer398styleParameter 'outline' can be declared as pointer to const
1397constVariablePointer398styleVariable 'shape' can be declared as pointer to const
1786constParameterCallback398styleParameter 'drawing' can be declared as pointer to const. However it seems that 'button_press_event' is a callback function, if 'drawing' is declared with const you might also need to cast function pointer(s).
1823constParameterCallback398styleParameter 'event' can be declared as pointer to const. However it seems that 'focus_event' is a callback function, if 'event' is declared with const you might also need to cast function pointer(s).
1838constParameterCallback398styleParameter 'a' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'a' is declared with const you might also need to cast function pointer(s).
1839constParameterCallback398styleParameter 'b' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'b' is declared with const you might also need to cast function pointer(s).
1863constVariablePointer398styleVariable 'pind' can be declared as pointer to const
2124constParameterPointer398styleParameter 'iev' can be declared as pointer to const
libcafekbd/cafekbd-status.c
82unknownMacroerrorThere is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
test/cafekbd-keyboard-drawing-test.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
test/cafekbd-status-test.c
42constVariablePointer398styleVariable 'icon' can be declared as pointer to const
+
+ +
+ + diff --git a/2025-02-06-153544-5624-cppcheck@1eab72938451_devel/output_1eab72938451cf1abc040f3d639aae6d9cbfd748 b/2025-02-06-153544-5624-cppcheck@1eab72938451_devel/output_1eab72938451cf1abc040f3d639aae6d9cbfd748 new file mode 100644 index 0000000..5270f17 --- /dev/null +++ b/2025-02-06-153544-5624-cppcheck@1eab72938451_devel/output_1eab72938451cf1abc040f3d639aae6d9cbfd748 @@ -0,0 +1,1866 @@ +Checking libcafekbd/cafekbd-desktop-config.c ... +libcafekbd/cafekbd-desktop-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +1/10 files checked 4% done +Checking libcafekbd/cafekbd-indicator-config.c ... +libcafekbd/cafekbd-indicator-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +2/10 files checked 10% done +Checking libcafekbd/cafekbd-indicator.c ... +libcafekbd/cafekbd-indicator.c:66:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdIndicator, cafekbd_indicator, CTK_TYPE_NOTEBOOK) +^ +3/10 files checked 24% done +Checking libcafekbd/cafekbd-keyboard-config.c ... +libcafekbd/cafekbd-keyboard-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-config.c:67:8: style: Condition '*l1' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:67:15: style: Condition '*l2' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:227:16: style: Condition 'option!=NULL' is always true [knownConditionTrueFalse] + (option != NULL) ? strchr (option, ':') : NULL; + ^ +libcafekbd/cafekbd-keyboard-config.c:282:18: style: Condition 'variant==NULL' is always false [knownConditionTrueFalse] + (variant == + ^ +libcafekbd/cafekbd-keyboard-config.c:226:10: style: Variable 'delim' can be declared as pointer to const [constVariablePointer] + char *delim = + ^ +libcafekbd/cafekbd-keyboard-config.c:609:65: style: Parameter 'kbd_config' can be declared as pointer to const [constParameterPointer] +cafekbd_keyboard_config_options_is_set (CafekbdKeyboardConfig * kbd_config, + ^ +4/10 files checked 36% done +Checking libcafekbd/cafekbd-keyboard-drawing.c ... +libcafekbd/cafekbd-keyboard-drawing.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-drawing.c:61:60: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_coord (CafekbdKeyboardDrawingRenderContext * context, gint n) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:67:61: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_double (CafekbdKeyboardDrawingRenderContext * context, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:625:51: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +set_markup (CafekbdKeyboardDrawingRenderContext * context, gchar *txt) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1026:11: style: Variable 'runp' can be declared as pointer to const [constVariablePointer] + GSList *runp; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1036:25: style: Variable 'geometry' can be declared as pointer to const [constVariablePointer] + PangoGlyphGeometry *geometry; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1202:39: style: Parameter 'outline' can be declared as pointer to const [constParameterPointer] +calc_origin_offset_x (XkbOutlineRec * outline) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1397:15: style: Variable 'shape' can be declared as pointer to const [constVariablePointer] + XkbShapeRec *shape; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: style: Parameter 'drawing' can be declared as pointer to const. However it seems that 'button_press_event' is a callback function, if 'drawing' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2343:18: note: You might need to cast the function pointer here + G_CALLBACK (button_press_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: note: Parameter 'drawing' can be declared as pointer to const + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: style: Parameter 'event' can be declared as pointer to const. However it seems that 'focus_event' is a callback function, if 'event' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2347:18: note: You might need to cast the function pointer here + G_CALLBACK (focus_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: note: Parameter 'event' can be declared as pointer to const + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: style: Parameter 'a' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'a' is declared with const you might also need to cast function pointer(s). [constParameterCallback] +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: note: Parameter 'a' can be declared as pointer to const +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: style: Parameter 'b' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'b' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: note: Parameter 'b' can be declared as pointer to const + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1863:9: style: Variable 'pind' can be declared as pointer to const [constVariablePointer] + Atom *pind = drawing->xkb->names->indicators; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2124:60: style: Parameter 'iev' can be declared as pointer to const [constParameterPointer] +process_indicators_state_notify (XkbIndicatorNotifyEvent * iev, + ^ +Checking libcafekbd/cafekbd-keyboard-drawing.c: KBDRAW_DEBUG... +5/10 files checked 77% done +Checking libcafekbd/cafekbd-status.c ... +libcafekbd/cafekbd-status.c:82:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdStatus, cafekbd_status, CTK_TYPE_STATUS_ICON) +^ +6/10 files checked 91% done +Checking libcafekbd/cafekbd-util.c ... +7/10 files checked 93% done +Checking test/cafekbd-indicator-test.c ... +8/10 files checked 94% done +Checking test/cafekbd-keyboard-drawing-test.c ... +test/cafekbd-keyboard-drawing-test.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +Checking test/cafekbd-keyboard-drawing-test.c: HAVE_CONFIG_H... +9/10 files checked 99% done +Checking test/cafekbd-status-test.c ... +test/cafekbd-status-test.c:42:17: style: Variable 'icon' can be declared as pointer to const [constVariablePointer] + CtkStatusIcon *icon; + ^ +10/10 files checked 100% done +nofile:0:0: information: Active checkers: There was critical errors (use --checkers-report= to see details) [checkersReport] + +/usr/bin/cafe-autogen +checking for autoreconf >= 2.53... + testing autoreconf... found 2.72 +checking for pkg-config >= 0.14.0... + testing pkg-config... found 1.8.1 +checking for cafe-common >= 0.0.1... + testing cafe-doc-common... found 2.0.0 +Checking for required M4 macros... +Checking for forbidden M4 macros... +Processing ./configure.ac +Running cafe-doc-common... +Running autoreconf... +autoreconf: export WARNINGS=no-portability +autoreconf: Entering directory '.' +autoreconf: running: autopoint --force +Copying file ABOUT-NLS +Copying file config.rpath +Copying file m4/codeset.m4 +Copying file m4/extern-inline.m4 +Copying file m4/fcntl-o.m4 +Copying file m4/gettext.m4 +Copying file m4/glibc2.m4 +Copying file m4/glibc21.m4 +Copying file m4/iconv.m4 +Copying file m4/intdiv0.m4 +Copying file m4/intl.m4 +Copying file m4/intldir.m4 +Copying file m4/intlmacosx.m4 +Copying file m4/intmax.m4 +Copying file m4/inttypes-pri.m4 +Copying file m4/inttypes_h.m4 +Copying file m4/lcmessage.m4 +Copying file m4/lib-ld.m4 +Copying file m4/lib-link.m4 +Copying file m4/lib-prefix.m4 +Copying file m4/lock.m4 +Copying file m4/longlong.m4 +Copying file m4/nls.m4 +Copying file m4/po.m4 +Copying file m4/printf-posix.m4 +Copying file m4/progtest.m4 +Copying file m4/size_max.m4 +Copying file m4/stdint_h.m4 +Copying file m4/threadlib.m4 +Copying file m4/uintmax_t.m4 +Copying file m4/visibility.m4 +Copying file m4/wchar_t.m4 +Copying file m4/wint_t.m4 +Copying file m4/xsize.m4 +Copying file po/Makefile.in.in +Copying file po/Makevars.template +Copying file po/Rules-quot +Copying file po/boldquot.sed +Copying file po/en@boldquot.header +Copying file po/en@quot.header +Copying file po/insert-header.sin +Copying file po/quot.sed +Copying file po/remove-potcdate.sin +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: configure.ac: tracing +autoreconf: running: libtoolize --copy --force +libtoolize: putting auxiliary files in '.'. +libtoolize: copying file './ltmain.sh' +libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. +libtoolize: copying file 'm4/libtool.m4' +libtoolize: copying file 'm4/ltoptions.m4' +libtoolize: copying file 'm4/ltsugar.m4' +libtoolize: copying file 'm4/ltversion.m4' +libtoolize: copying file 'm4/lt~obsolete.m4' +autoreconf: configure.ac: not using Intltool +autoreconf: configure.ac: not using Gtkdoc +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: running: /usr/bin/autoconf --force +autoreconf: running: /usr/bin/autoheader --force +autoreconf: running: automake --add-missing --copy --force-missing +configure.ac:31: installing './compile' +configure.ac:34: installing './config.guess' +configure.ac:34: installing './config.sub' +configure.ac:16: installing './install-sh' +configure.ac:16: installing './missing' +Makefile.am: installing './INSTALL' +libcafekbd/Makefile.am: installing './depcomp' +autoreconf: Leaving directory '.' +Skipping configure process. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +checking for a BSD-compatible install... /usr/bin/install -c +checking whether sleep supports fractional seconds... yes +checking filesystem timestamp resolution... 0.01 +checking whether build environment is sane... yes +checking for a race-free mkdir -p... /usr/bin/mkdir -p +checking for gawk... no +checking for mawk... mawk +checking whether make sets $(MAKE)... yes +checking whether make supports nested variables... yes +checking xargs -n works... yes +checking whether make supports the include directive... yes (GNU style) +checking for gcc... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the C compiler works... yes +checking for C compiler default output file name... a.out +checking for suffix of executables... +checking whether we are cross compiling... no +checking for suffix of object files... o +checking whether the compiler supports GNU C... yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... rm: cannot remove 'conftest.plist': Is a directory +yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... gcc3 +checking whether C compiler accepts -Werror=unknown-warning-option... no +checking whether C compiler accepts -Wall... yes +checking whether C compiler accepts -Wmissing-prototypes... yes +checking whether C compiler accepts -Wbad-function-cast... yes +checking whether C compiler accepts -Wcast-align... yes +checking whether C compiler accepts -Wextra... yes +checking whether C compiler accepts -Wformat-nonliteral... yes +checking whether C compiler accepts -Wmissing-declarations... yes +checking whether C compiler accepts -Wnested-externs... yes +checking whether C compiler accepts -Wpointer-arith... yes +checking whether C compiler accepts -Wredundant-decls... yes +checking whether C compiler accepts -Wshadow... yes +checking whether C compiler accepts -Wstrict-prototypes... yes +checking whether C compiler accepts -Wunused-macros... yes +checking whether C compiler accepts -Werror=format-security... yes +checking whether C compiler accepts -fstrict-aliasing... yes +checking flags to pass to the C compiler /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing +checking for gcc... (cached) /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the compiler supports GNU C... (cached) yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... (cached) yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... (cached) none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... (cached) yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... (cached) gcc3 +checking build system type... x86_64-pc-linux-gnu +checking host system type... x86_64-pc-linux-gnu +checking how to print strings... printf +checking for a sed that does not truncate output... /usr/bin/sed +checking for grep that handles long lines and -e... /usr/bin/grep +checking for egrep... /usr/bin/grep -E +checking for fgrep... /usr/bin/grep -F +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld +checking if the linker (/usr/bin/ld) is GNU ld... yes +checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B +checking the name lister (/usr/bin/nm -B) interface... rm: cannot remove 'conftest.plist': Is a directory +BSD nm +checking whether ln -s works... yes +checking the maximum length of command line arguments... 3145728 +checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop +checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop +checking for /usr/bin/ld option to reload object files... -r +checking for file... file +checking for objdump... objdump +checking how to recognize dependent libraries... pass_all +checking for dlltool... no +checking how to associate runtime and link libraries... printf %s\n +checking for ranlib... ranlib +checking for ar... ar +checking for archiver @FILE support... rm: cannot remove 'conftest.plist': Is a directory +@ +checking for strip... strip +checking command to parse /usr/bin/nm -B output from /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer object... rm: cannot remove 'conftest.plist': Is a directory +ok +checking for sysroot... no +checking for a working dd... /usr/bin/dd +checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1 +checking for mt... no +checking if : is a manifest tool... no +checking for stdio.h... yes +checking for stdlib.h... yes +checking for string.h... yes +checking for inttypes.h... yes +checking for stdint.h... yes +checking for strings.h... yes +checking for sys/stat.h... yes +checking for sys/types.h... yes +checking for unistd.h... yes +checking for dlfcn.h... yes +checking for objdir... .libs +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -fno-rtti -fno-exceptions... no +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to produce PIC... -fPIC -DPIC +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer PIC flag -fPIC -DPIC works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer static flag -static works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... (cached) yes +checking whether the /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes +checking whether -lc should be explicitly linked in... no +checking dynamic linker characteristics... GNU/Linux ld.so +checking how to hardcode library paths into programs... immediate +checking whether stripping libraries is possible... yes +checking if libtool supports shared libraries... yes +checking whether to build shared libraries... yes +checking whether to build static libraries... yes +checking whether NLS is requested... yes +checking for msgfmt... /usr/bin/msgfmt +checking for gmsgfmt... /usr/bin/msgfmt +checking for xgettext... /usr/bin/xgettext +checking for msgmerge... /usr/bin/msgmerge +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld -m elf_x86_64 +checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes +checking for shared library run path origin... done +checking how to run the C preprocessor... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer -E +checking for egrep -e... (cached) /usr/bin/grep -E +checking for CFPreferencesCopyAppValue... no +checking for CFLocaleCopyCurrent... no +checking for GNU gettext in libc... yes +checking whether to use NLS... yes +checking where the gettext function comes from... libc +checking for glib-compile-resources... /usr/bin/glib-compile-resources +checking for xmllint... /usr/bin/xmllint +checking for setlocale... yes +checking for pkg-config... /usr/bin/pkg-config +checking pkg-config is at least version 0.9.0... yes +checking for glib-2.0 >= 2.50.0... yes +checking for gmodule-2.0... yes +checking for gio-2.0 >= 2.25.0... yes +checking for cdk-3.0 >= 3.22.0... yes +checking for ctk+-3.0 >= 3.22.0 cdk-x11-3.0 >= 3.22.0... yes +checking for libxklavier >= 5.2... yes +checking for X... libraries , headers +checking for gethostbyname... yes +checking for connect... yes +checking for remove... yes +checking for shmat... yes +checking for IceConnectionNumber in -lICE... yes +checking for pkg-config... (cached) /usr/bin/pkg-config +checking pkg-config is at least version 0.16... yes +checking for library containing sqrt... -lm +checking for gobject-introspection... yes +checking that generated files are newer than configure... done +configure: creating ./config.status +config.status: creating Makefile +config.status: creating libcafekbd.pc +config.status: creating libcafekbdui.pc +config.status: creating po/Makefile.in +config.status: creating libcafekbd/Makefile +config.status: creating libcafekbd/org.cafe.peripherals-keyboard-xkb.gschema.xml +config.status: creating test/Makefile +config.status: creating config.h +config.status: executing depfiles commands +config.status: executing libtool commands +config.status: executing po-directories commands +config.status: creating po/POTFILES +config.status: creating po/Makefile + +Configuration: + + prefix: /usr + exec_prefix: ${prefix} + libdir: ${exec_prefix}/lib + bindir: ${exec_prefix}/bin + sbindir: ${exec_prefix}/sbin + sysconfdir: ${prefix}/etc + datadir: ${datarootdir} + source code location: . + compiler: /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer + cflags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + Warning flags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + +scan-build: Analysis run complete. +scan-build: Removing directory '/tmp/scan-build-2025-02-06-153404-11857-1' because it contains no reports. +scan-build: No bugs found. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +make all-recursive +make[1]: Entering directory '/rootdir' +Making all in po +make[2]: Entering directory '/rootdir/po' +make libcafekbd.pot-update +make[3]: Entering directory '/rootdir/po' +sed -e '/^#/d' remove-potcdate.sin > t-remove-potcdate.sed +mv t-remove-potcdate.sed remove-potcdate.sed +package_gnu=""; \ +test -n "$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L .. -maxdepth 1 -type f \ + -size -10000000c -exec grep 'GNU libcafekbd' \ + /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU libcafekbd' ../* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ +}; \ +if test "$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ +else \ + package_prefix=''; \ +fi; \ +if test -n '' || test 'https://github.com/cafe-desktop/libcafekbd' = '@'PACKAGE_BUGREPORT'@'; then \ + msgid_bugs_address=''; \ +else \ + msgid_bugs_address='https://github.com/cafe-desktop/libcafekbd'; \ +fi; \ +case `/usr/bin/xgettext --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ + *) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --package-name="${package_prefix}libcafekbd" \ + --package-version='2.0.0' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ +esac +test ! -f libcafekbd.po || { \ + if test -f ./libcafekbd.pot-header; then \ + sed -e '1,/^#$/d' < libcafekbd.po > libcafekbd.1po && \ + cat ./libcafekbd.pot-header libcafekbd.1po > libcafekbd.po; \ + rm -f libcafekbd.1po; \ + fi; \ + if test -f ./libcafekbd.pot; then \ + sed -f remove-potcdate.sed < ./libcafekbd.pot > libcafekbd.1po && \ + sed -f remove-potcdate.sed < libcafekbd.po > libcafekbd.2po && \ + if cmp libcafekbd.1po libcafekbd.2po >/dev/null 2>&1; then \ + rm -f libcafekbd.1po libcafekbd.2po libcafekbd.po; \ + else \ + rm -f libcafekbd.1po libcafekbd.2po ./libcafekbd.pot && \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ + else \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ +} +make[3]: Leaving directory '/rootdir/po' +test ! -f ./libcafekbd.pot || \ + test -z "af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo" || make af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo +make[3]: Entering directory '/rootdir/po' +/usr/bin/msgmerge --update --quiet --lang=af af.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=am am.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ar ar.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=an an.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=as as.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=be be.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ast ast.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=az az.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bg bg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn bn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=br br.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn_IN bn_IN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bs bs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca ca.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca@valencia ca@valencia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cmn cmn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cs cs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=crh crh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=csb csb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cv cv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cy cy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=da da.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de de.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de_CH de_CH.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=dz dz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=el el.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_AU en_AU.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_CA en_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_GB en_GB.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eo eo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es es.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_419 es_419.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_AR es_AR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CL es_CL.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CO es_CO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CR es_CR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_DO es_DO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_EC es_EC.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_ES es_ES.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_MX es_MX.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_NI es_NI.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PA es_PA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PR es_PR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PE es_PE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_SV es_SV.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_US es_US.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_UY es_UY.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_VE es_VE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=et et.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eu eu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fa fa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fi fi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fil fil.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fo fo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr fr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr_CA fr_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=frp frp.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fur fur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fy fy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ga ga.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gd gd.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gu gu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gl gl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ha ha.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=he he.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hi hi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hr hr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hu hu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hy hy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ia ia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=id id.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ie ie.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ig ig.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=is is.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=it it.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ja ja.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=jv jv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kab kab.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ka ka.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kk kk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=km km.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kn kn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ko ko.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku ku.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ks ks.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=la la.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku_IQ ku_IQ.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lb lb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ky ky.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=li li.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lo lo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lt lt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lv lv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mai mai.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mi mi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mg mg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ml ml.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mk mk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mn mn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mr mr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ms ms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=my my.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nah nah.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nb nb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nds nds.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ne ne.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nn nn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nl nl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nqo nqo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nso nso.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=oc oc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=om om.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pa pa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=or or.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pl pl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pms pms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ps ps.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt pt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt_BR pt_BR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ro ro.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ru ru.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=rw rw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sco sco.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sc sc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=si si.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sl sl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=so so.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sk sk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sq sq.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr@latin sr@latin.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr sr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sv sv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sw sw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ta ta.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tg tg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=te te.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tk tk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=th th.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tl tl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tr tr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ts ts.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tt tt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ug ug.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uk uk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur ur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur_PK ur_PK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uz uz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=vi vi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=wa wa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=xh xh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yi yi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yo yo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_HK zh_HK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_CN zh_CN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_TW zh_TW.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zu zu.po libcafekbd.pot +rm -f am.gmo && /usr/bin/msgfmt -c --statistics --verbose -o am.gmo am.po +rm -f af.gmo && /usr/bin/msgfmt -c --statistics --verbose -o af.gmo af.po +rm -f an.gmo && /usr/bin/msgfmt -c --statistics --verbose -o an.gmo an.po +am.po: 54 translated messages, 37 untranslated messages. +an.po:7: warning: header field 'Last-Translator' still has the initial default value +an.po: 0 translated messages, 91 untranslated messages. +rm -f ar.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ar.gmo ar.po +af.po: 7 translated messages, 84 untranslated messages. +rm -f ast.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ast.gmo ast.po +rm -f az.gmo && /usr/bin/msgfmt -c --statistics --verbose -o az.gmo az.po +rm -f as.gmo && /usr/bin/msgfmt -c --statistics --verbose -o as.gmo as.po +ar.po: 50 translated messages, 41 untranslated messages. +rm -f be.gmo && /usr/bin/msgfmt -c --statistics --verbose -o be.gmo be.po +ast.po: 47 translated messagesas.po: , 44 untranslated messages. +41 translated messages, 50 untranslated messages. +rm -f bg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bg.gmo bg.po +az.po: 9 translated messages, 82 untranslated messages. +be.po: 46 translated messages, 45 untranslated messages. +rm -f bn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn.gmo bn.po +bg.po: 54 translated messages, 37 untranslated messages. +rm -f br.gmo && /usr/bin/msgfmt -c --statistics --verbose -o br.gmo br.po +rm -f bn_IN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn_IN.gmo bn_IN.po +rm -f bs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bs.gmo bs.po +rm -f ca.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca.gmo ca.po +bn.po: 43 translated messages, 48 untranslated messages. +bn_IN.po: 41 translated messages, 50 untranslated messages. +rm -f ca@valencia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca@valencia.gmo ca@valencia.po +br.po: 20 translated messages, 71 untranslated messages. +bs.po: 25 translated messages, 66 untranslated messages. +ca.po: 87 translated messages, 4 untranslated messages. +rm -f cmn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cmn.gmo cmn.po +rm -f crh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o crh.gmo crh.po +ca@valencia.po: 54 translated messages, 37 untranslated messages. +rm -f cs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cs.gmo cs.po +cmn.po: 46 translated messages, 45 untranslated messages. +rm -f csb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o csb.gmo csb.po +rm -f cv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cv.gmo cv.po +rm -f cy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cy.gmo cy.po +crh.po: 11 translated messages, 80 untranslated messages. +cs.po: 81 translated messages, 10 untranslated messages. +cv.po: 0 translated messages, 91 untranslated messages. +cy.po: 26 translated messages, 65 untranslated messages. +rm -f da.gmo && /usr/bin/msgfmt -c --statistics --verbose -o da.gmo da.po +csb.po:7: warning: header field 'Last-Translator' still has the initial default value +csb.po: 0 translated messages, 91 untranslated messages. +rm -f de.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de.gmo de.po +rm -f de_CH.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de_CH.gmo de_CH.po +rm -f dz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o dz.gmo dz.po +rm -f el.gmo && /usr/bin/msgfmt -c --statistics --verbose -o el.gmo el.po +da.po: 91 translated messages. +de.po: de_CH.po: 0 translated messages, 91 untranslated messages. +76 translated messages, 15 untranslated messages. +el.po: 54 translated messages, 37 untranslated messages. +dz.po: 39 translated messages, 52 untranslated messages. +rm -f en_AU.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_AU.gmo en_AU.po +rm -f en_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_CA.gmo en_CA.po +rm -f en_GB.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_GB.gmo en_GB.po +rm -f eo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eo.gmo eo.po +en_AU.po: 54 translated messages, 37 untranslated messages. +rm -f es.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es.gmo es.po +en_CA.po: 10 translated messages, 81 untranslated messages. +eo.po: 52 translated messages, 39 untranslated messages. +en_GB.po: rm -f es_419.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_419.gmo es_419.po +54 translated messages, 37 untranslated messages. +es.po: 89 translated messages, 2 untranslated messages. +rm -f es_CL.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CL.gmo es_CL.po +rm -f es_AR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_AR.gmo es_AR.po +rm -f es_CO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CO.gmo es_CO.po +es_419.po: 0 translated messages, 91 untranslated messages. +rm -f es_CR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CR.gmo es_CR.po +es_CL.po: 3 translated messages, 88 untranslated messages. +es_AR.po: 21 translated messages, 70 untranslated messages. +es_CO.po: 49 translated messages, 42 untranslated messages. +rm -f es_DO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_DO.gmo es_DO.po +es_CR.po: 1 translated message, 90 untranslated messages. +rm -f es_EC.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_EC.gmo es_EC.po +rm -f es_ES.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_ES.gmo es_ES.po +rm -f es_MX.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_MX.gmo es_MX.po +es_DO.po: 1 translated message, 90 untranslated messages. +rm -f es_NI.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_NI.gmo es_NI.po +es_ES.po: 1 translated message, 90 untranslated messages. +es_MX.po: 1 translated message, 90 untranslated messages. +es_EC.po: 1 translated message, 90 untranslated messages. +rm -f es_PA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PA.gmo es_PA.po +es_NI.po: 1 translated message, 90 untranslated messages. +rm -f es_PR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PR.gmo es_PR.po +rm -f es_PE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PE.gmo es_PE.po +es_PA.po: 1 translated message, 90 untranslated messages. +rm -f es_SV.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_SV.gmo es_SV.po +rm -f es_US.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_US.gmo es_US.po +es_PR.po: 1 translated message, 90 untranslated messages. +es_PE.po: 1 translated message, 90 untranslated messages. +rm -f es_UY.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_UY.gmo es_UY.po +es_SV.po: 1 translated message, 90 untranslated messagesrm -f es_VE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_VE.gmo es_VE.po +. +rm -f et.gmo && /usr/bin/msgfmt -c --statistics --verbose -o et.gmo et.po +es_US.po: 0 translated messages, 91 untranslated messages. +rm -f eu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eu.gmo eu.po +es_UY.po: 1 translated message, 90 untranslated messages. +es_VE.po: 1 translated message, 90 untranslated messages. +et.po: 54 translated messages, 37 untranslated messages. +rm -f fa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fa.gmo fa.po +rm -f fi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fi.gmo fi.po +rm -f fil.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fil.gmo fil.po +rm -f fo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fo.gmo fo.po +eu.po: 54 translated messages, 37 untranslated messages. +fa.po: 11 translated messages, 80 untranslated messages. +fi.po: 48 translated messages, 43 untranslated messages. +rm -f fr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr.gmo fr.po +fo.po: 0 translated messages, 91 untranslated messages. +fil.po: 0 translated messages, 91 untranslated messages. +rm -f fr_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr_CA.gmo fr_CA.po +rm -f frp.gmo && /usr/bin/msgfmt -c --statistics --verbose -o frp.gmo frp.po +fr.po: 67 translated messages, 24 untranslated messages. +rm -f fur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fur.gmo fur.po +fr_CA.po: rm -f fy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fy.gmo fy.po +3 translated messages, 88 untranslated messages. +frp.po: 7 translated messages, 84 untranslated messages. +fur.po: 4 translated messages, 87 untranslated messages. +rm -f gd.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gd.gmo gd.po +rm -f ga.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ga.gmo ga.po +fy.po: 4 translated messages, 87 untranslated messages. +rm -f gu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gu.gmo gu.po +rm -f gl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gl.gmo gl.po +ga.po: 41 translated messages, 50 untranslated messages. +gu.po: 43 translated messages, 48 untranslated messages. +rm -f ha.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ha.gmo ha.po +gd.po: 0 translated messages, 91 untranslated messages. +gl.po: 89 translated messages, 2 untranslated messages. +ha.po: 5 translated messages, 86 untranslated messages. +rm -f he.gmo && /usr/bin/msgfmt -c --statistics --verbose -o he.gmo he.po +rm -f hi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hi.gmo hi.po +rm -f hr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hr.gmo hr.po +rm -f hu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hu.gmo hu.po +hr.po: 54 translated messages, 37 untranslated messages. +he.po: 54 translated messages, 37 untranslated messages. +rm -f hy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hy.gmo hy.po +hi.po: 45 translated messages, 46 untranslated messages. +hu.po: 54 translated messages, 37 untranslated messages. +rm -f id.gmo && /usr/bin/msgfmt -c --statistics --verbose -o id.gmo id.po +rm -f ie.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ie.gmo ie.po +rm -f ia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ia.gmo ia.po +hy.po: rm -f ig.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ig.gmo ig.po +54 translated messages, 37 untranslated messages. +id.po: 91 translated messages. +ie.po: 45 translated messages, 46 untranslated messages. +ia.po: 3 translated messages, 88 untranslated messages. +rm -f it.gmo && /usr/bin/msgfmt -c --statistics --verbose -o it.gmo it.po +rm -f is.gmo && /usr/bin/msgfmt -c --statistics --verbose -o is.gmo is.po +ig.po: 5 translated messages, 86 untranslated messages. +rm -f ja.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ja.gmo ja.po +rm -f jv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o jv.gmo jv.po +it.po: rm -f ka.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ka.gmo ka.po +91 translated messages. +is.po: 12 translated messages, 79 untranslated messages. +ja.po: 54 translated messages, 37 untranslated messages. +rm -f kk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kk.gmo kk.po +jv.po: 2 translated messages, 89 untranslated messages. +rm -f kab.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kab.gmo kab.po +ka.po: 37 translated messages, 54 untranslated messages. +rm -f km.gmo && /usr/bin/msgfmt -c --statistics --verbose -o km.gmo km.po +kk.po: 24 translated messages, 67 untranslated messages. +rm -f kn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kn.gmo kn.po +kab.po: 4 translated messages, 87 untranslated messages. +rm -f ko.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ko.gmo ko.po +km.po:7: warning: header field 'Last-Translator' still has the initial default value +km.po: 0 translated messages, 91 untranslated messages. +rm -f ks.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ks.gmo ks.po +kn.po: 43 translated messages, 48 untranslated messages. +rm -f ku.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku.gmo ku.po +rm -f ku_IQ.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku_IQ.gmo ku_IQ.po +ks.po: 3 translated messages, 88 untranslated messagesrm -f ky.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ky.gmo ky.po +ko.po: 54 translated messages, 37 untranslated messages. +. +ku.po: 10 translated messages, 81 untranslated messages. +ku_IQ.po: rm -f la.gmo && /usr/bin/msgfmt -c --statistics --verbose -o la.gmo la.po +16 translated messages, 75 untranslated messages. +rm -f lb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lb.gmo lb.po +rm -f li.gmo && /usr/bin/msgfmt -c --statistics --verbose -o li.gmo li.po +ky.po: 26 translated messages, 65 untranslated messages. +la.po: 2 translated messages, 89 untranslated messages. +rm -f lt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lt.gmo lt.po +lb.po:7: warning: header field 'Last-Translator' still has the initial default value +lb.po: 0 translated messages, 91 untranslated messages. +rm -f lo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lo.gmo lo.po +li.po:7: warning: header field 'Last-Translator' still has the initial default value +li.po: 0 translated messages, 91 untranslated messages. +lo.po:7: warning: header field 'Last-Translator' still has the initial default value +lt.po: 91 translated messages. +rm -f lv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lv.gmo lv.po +lo.po: 0 translated messages, 91 untranslated messages. +rm -f mai.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mai.gmo mai.po +rm -f mg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mg.gmo mg.po +rm -f mi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mi.gmo mi.po +rm -f mk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mk.gmo mk.po +lv.po: 49 translated messages, 42 untranslated messages. +mg.po: 10 translated messages, 81 untranslated messages. +mai.po: 18 translated messages, 73 untranslated messages. +mk.po: 39 translated messages, 52 untranslated messages. +mi.po:7: warning: header field 'Last-Translator' still has the initial default value +mi.po: 0 translated messages, 91 untranslated messages. +rm -f ml.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ml.gmo ml.po +rm -f mn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mn.gmo mn.po +rm -f mr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mr.gmo mr.po +rm -f ms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ms.gmo ms.po +rm -f my.gmo && /usr/bin/msgfmt -c --statistics --verbose -o my.gmo my.po +mn.po: 10 translated messages, 81 untranslated messages. +ml.po: 41 translated messages, 50 untranslated messages. +mr.po: 47 translated messages, 44 untranslated messages. +ms.po: 91 translated messages. +rm -f nb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nb.gmo nb.po +rm -f nah.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nah.gmo nah.po +my.po:7: warning: header field 'Last-Translator' still has the initial default value +my.po: 0 translated messages, 91 untranslated messages. +rm -f nds.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nds.gmo nds.po +nb.po: 91 translated messages. +rm -f nl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nl.gmo nl.po +nds.po: 12 translated messages, 79 untranslated messages. +nah.po: 0 translated messages, 91 untranslated messages. +rm -f ne.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ne.gmo ne.po +rm -f nn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nn.gmo nn.po +rm -f nqo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nqo.gmo nqo.po +rm -f nso.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nso.gmo nso.po +nl.po: 91 translated messages. +ne.po: 13 translated messages, 78 untranslated messages. +nqo.po: 0 translated messages, 91 untranslated messages. +nso.po: nn.po: 40 translated messages, 51 untranslated messages. +3 translated messages, 88 untranslated messages. +rm -f oc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o oc.gmo oc.po +rm -f om.gmo && /usr/bin/msgfmt -c --statistics --verbose -o om.gmo om.po +rm -f or.gmo && /usr/bin/msgfmt -c --statistics --verbose -o or.gmo or.po +rm -f pa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pa.gmo pa.po +oc.po: 68 translated messages, 23 untranslated messages. +rm -f pl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pl.gmo pl.po +or.po: 41 translated messages, 50 untranslated messages. +pa.po: 46 translated messages, 45 untranslated messages. +om.po: 0 translated messages, 91 untranslated messages. +rm -f pms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pms.gmo pms.po +rm -f ps.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ps.gmo ps.po +rm -f pt_BR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt_BR.gmo pt_BR.po +rm -f pt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt.gmo pt.po +pl.po: 55 translated messagespms.po: 3 translated messages, 88 untranslated messages. +, 36 untranslated messages. +pt_BR.po: 58 translated messages, 33 untranslated messages. +ps.po: 6 translated messages, 85 untranslated messages. +rm -f ro.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ro.gmo ro.po +pt.po: 84 translated messages, 7 untranslated messages. +rm -f ru.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ru.gmo ru.po +rm -f rw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o rw.gmo rw.po +rm -f sc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sc.gmo sc.po +ro.po: 54 translated messages, 37 untranslated messages. +ru.po: 89 translated messages, 2 untranslated messages. +rw.po: 10 translated messages, 81 untranslated messages. +rm -f sco.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sco.gmo sco.po +sc.po: 2 translated messages, 89 untranslated messages. +rm -f si.gmo && /usr/bin/msgfmt -c --statistics --verbose -o si.gmo si.po +rm -f sk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sk.gmo sk.po +rm -f sl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sl.gmo sl.po +sco.po: 0 translated messages, 91 untranslated messages. +si.po: 36 translated messages, 55 untranslated messages. +rm -f so.gmo && /usr/bin/msgfmt -c --statistics --verbose -o so.gmo so.po +sk.po: 54 translated messages, 37 untranslated messages. +sl.po: 55 translated messages, 36 untranslated messages. +rm -f sq.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sq.gmo sq.po +rm -f sr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr.gmo sr.po +so.po: 0 translated messages, 91 untranslated messages. +rm -f sr@latin.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr@latin.gmo sr@latin.po +rm -f sv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sv.gmo sv.po +sq.po: 52 translated messages, 39 untranslated messages. +sr.po: 91 translated messages. +rm -f sw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sw.gmo sw.po +sv.po: 80 translated messages, 11 untranslated messages. +rm -f ta.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ta.gmo ta.po +sr@latin.po: 46 translated messages, 45 untranslated messages. +rm -f te.gmo && /usr/bin/msgfmt -c --statistics --verbose -o te.gmo te.po +sw.po: 0 translated messages, 91 untranslated messages. +ta.po: 46 translated messages, 45 untranslated messages. +te.po: 41 translated messages, 50 untranslated messages. +rm -f th.gmo && /usr/bin/msgfmt -c --statistics --verbose -o th.gmo th.po +rm -f tg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tg.gmo tg.po +rm -f tk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tk.gmo tk.po +rm -f tl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tl.gmo tl.po +th.po: 45 translated messages, 46 untranslated messages. +rm -f tr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tr.gmo tr.po +tg.po: 0 translated messages, 91 untranslated messages. +rm -f ts.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ts.gmo ts.po +tk.po: 7 translated messages, 84 untranslated messages. +tr.po: 58 translated messages, 33 untranslated messages. +tl.po: 0 translated messages, 91 untranslated messages. +rm -f tt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tt.gmo tt.po +rm -f ug.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ug.gmo ug.po +ts.po: 0 translated messages, 91 untranslated messages. +rm -f uk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uk.gmo uk.po +tt.po:7: warning: header field 'Last-Translator' still has the initial default value +tt.po: 0 translated messages, 91 untranslated messages. +rm -f ur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur.gmo ur.po +ug.po: 6 translated messages, 85 untranslated messages. +rm -f ur_PK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur_PK.gmo ur_PK.po +uk.po: 58 translated messages, 33 untranslated messages. +rm -f uz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uz.gmo uz.po +ur.po: 7 translated messages, 84 untranslated messages. +rm -f vi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o vi.gmo vi.po +ur_PK.po:7: warning: header field 'Last-Translator' still has the initial default value +rm -f wa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o wa.gmo wa.po +ur_PK.po: 0 translated messages, 91 untranslated messages. +rm -f xh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o xh.gmo xh.po +uz.po: 26 translated messages, 65 untranslated messages. +vi.po: 52 translated messages, 39 untranslated messages. +rm -f yi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yi.gmo yi.po +wa.po: 9 translated messages, 82 untranslated messages. +xh.po: 8 translated messages, 83 untranslated messages. +yi.po:7: warning: rm -f yo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yo.gmo yo.po +rm -f zh_CN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_CN.gmo zh_CN.po +header field 'Last-Translator' still has the initial default value +yi.po: 0 translated messages, 91 untranslated messages. +rm -f zh_HK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_HK.gmo zh_HK.po +rm -f zh_TW.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_TW.gmo zh_TW.po +zh_CN.po: 63 translated messages, 28 untranslated messages. +zh_HK.po: 47 translated messages, 44 untranslated messages. +zh_TW.po: 91 translated messages. +yo.po: 5 translated messages, 86 untranslated messages. +rm -f zu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zu.gmo zu.po +zu.po: 3 translated messages, 88 untranslated messages. +make[3]: Leaving directory '/rootdir/po' +touch stamp-po +make[2]: Leaving directory '/rootdir/po' +Making all in libcafekbd +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml + GEN cafekbd-indicator-marshal.h + GEN cafekbd-keyboard-drawing-marshal.h +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +INFO: Reading ./cafekbd-indicator-marshal.list... +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... + GEN cafekbd-indicator-marshal.c + GEN cafekbd-keyboard-drawing-marshal.c +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... +INFO: Reading ./cafekbd-indicator-marshal.list... +make all-am +make[3]: Entering directory '/rootdir/libcafekbd' + CC libcafekbd_la-cafekbd-desktop-config.lo + CC libcafekbd_la-cafekbd-keyboard-config.lo + CC libcafekbd_la-cafekbd-util.lo + CC libcafekbdui_la-cafekbd-indicator-config.lo + CC libcafekbdui_la-cafekbd-indicator.lo +cafekbd-desktop-config.c: In function 'cafekbd_desktop_config_load_from_gsettings': +cafekbd-desktop-config.c:176:38: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 176 | || config->default_group >= + | ^~ +cafekbd-indicator-config.c: In function 'cafekbd_indicator_config_get_images_file': +cafekbd-indicator-config.c:152:59: warning: comparison of integer expressions of different signedness: 'guint' {aka 'unsigned int'} and 'int' [-Wsign-compare] + 152 | (g_strv_length (kbd_config->layouts_variants) > group)) { + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_extract_layout_name': +cafekbd-indicator.c:293:19: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 293 | if (group < g_strv_length (short_group_names)) { + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_prepare_drawing': +cafekbd-indicator.c:418:31: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 418 | if (group + 1 == + | ^~ +cafekbd-indicator.c: In function 'cafekbd_indicator_update_tooltips': +cafekbd-indicator.c:446:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 446 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-indicator.c:450:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 450 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-indicator.c: In function 'cafekbd_indicator_kbd_cfg_callback': +cafekbd-indicator.c:61:44: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 61 | CafekbdIndicator * gki = (CafekbdIndicator*)cur->data; + | ^~~ +cafekbd-indicator.c:561:9: note: in expansion of macro 'ForAllIndicators' + 561 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-indicator.c:539:55: note: shadowed declaration is here + 539 | cafekbd_indicator_kbd_cfg_callback (CafekbdIndicator *gki G_GNUC_UNUSED) +cafekbd-indicator.c: In function 'cafekbd_indicator_start_listen': +cafekbd-indicator.c:647:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 647 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:650:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 650 | (CdkFilterFunc) + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_stop_listen': +cafekbd-indicator.c:663:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 663 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:667:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 667 | (CdkFilterFunc) cafekbd_indicator_filter_x_evt, NULL); + | ^ + CC libcafekbdui_la-cafekbd-status.lo +cafekbd-status.c: In function 'cafekbd_status_render_cairo': +cafekbd-status.c:214:23: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 214 | if (group + 1 == xkl_engine_get_num_groups (globals.engine)) { + | ^~ +cafekbd-status.c: In function 'cafekbd_status_prepare_drawing': +cafekbd-status.c:376:51: warning: cast between incompatible function types from 'void (*)(void *)' to 'void (*)(guchar *, void *)' {aka 'void (*)(unsigned char *, void *)'} [-Wcast-function-type] + 376 | (GdkPixbufDestroyNotify) + | ^ +cafekbd-status.c: In function 'cafekbd_status_update_tooltips': +cafekbd-status.c:395:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 395 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-status.c:399:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 399 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-status.c: In function 'cafekbd_status_kbd_cfg_callback': +cafekbd-status.c:77:41: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 77 | CafekbdStatus * gki = (CafekbdStatus*)cur->data; + | ^~~ +cafekbd-status.c:508:9: note: in expansion of macro 'ForAllIndicators' + 508 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-status.c:484:49: note: shadowed declaration is here + 484 | cafekbd_status_kbd_cfg_callback (CafekbdStatus *gki G_GNUC_UNUSED) +cafekbd-status.c: In function 'cafekbd_status_start_listen': +cafekbd-status.c:594:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 594 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:597:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 597 | (CdkFilterFunc) cafekbd_status_filter_x_evt, + | ^ +cafekbd-status.c: In function 'cafekbd_status_stop_listen': +cafekbd-status.c:610:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 610 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:614:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 614 | (CdkFilterFunc) cafekbd_status_filter_x_evt, NULL); + | ^ + CC libcafekbdui_la-cafekbd-indicator-marshal.lo +cafekbd-indicator-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ + CC libcafekbdui_la-cafekbd-keyboard-drawing-marshal.lo +cafekbd-keyboard-drawing-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + CC libcafekbdui_la-cafekbd-keyboard-drawing.lo +cafekbd-keyboard-drawing.c: In function 'draw_polygon': +cafekbd-keyboard-drawing.c:322:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 322 | for (i = 0; i < num_points; i++) { + | ^ +cafekbd-keyboard-drawing.c: In function 'process_indicators_state_notify': +cafekbd-keyboard-drawing.c:2131:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'long unsigned int' [-Wsign-compare] + 2131 | for (i = 0; i <= drawing->xkb->indicators->phys_indicators; i++) + | ^~ +cafekbd-keyboard-drawing.c: In function 'cafekbd_keyboard_drawing_get_type': +cafekbd-keyboard-drawing.c:2394:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawingClass *)' {aka 'void (*)(struct _CafekbdKeyboardDrawingClass *)'} to 'void (*)(void *, void *)' [-Wcast-function-type] + 2394 | (GClassInitFunc) cafekbd_keyboard_drawing_class_init, + | ^ +cafekbd-keyboard-drawing.c:2399:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawing *)' {aka 'void (*)(struct _CafekbdKeyboardDrawing *)'} to 'void (*)(GTypeInstance *, void *)' {aka 'void (*)(struct _GTypeInstance *, void *)'} [-Wcast-function-type] + 2399 | (GInstanceInitFunc) cafekbd_keyboard_drawing_init, + | ^ + GEN org.cafe.peripherals-keyboard-xkb.gschema.valid + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:114:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 114 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbd.la + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspect4wvde_v4/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspect4wvde_v4/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspect4wvde_v4/Cafekbd-1.0.c:239:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 239 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspect4wvde_v4/Cafekbd-1.0.c:246:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 246 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspect4wvde_v4/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +5 warnings generated. + GICOMP Cafekbd-1.0.gir +make[3]: Leaving directory '/rootdir/libcafekbd' +make[2]: Leaving directory '/rootdir/libcafekbd' +Making all in test +make[2]: Entering directory '/rootdir/test' + CC cafekbd_indicator_test-cafekbd-indicator-test.o + CC cafekbd_keyboard_drawing_test-cafekbd-keyboard-drawing-test.o + CC cafekbd_status_test-cafekbd-status-test.o + CCLD cafekbd-status-test + CCLD cafekbd-indicator-test +cafekbd-keyboard-drawing-test.c:187:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 187 | g_print ("kbdraw %s\n", VERSION); + | ^~~~~~~ +cafekbd-keyboard-drawing-test.c:194:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 194 | g_printerr ("--groups: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:199:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 199 | g_printerr ("--levels: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:225:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 225 | cafekbd_keyboard_drawing_set_track_modifiers + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:228:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 228 | cafekbd_keyboard_drawing_set_track_config + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:248:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 248 | names.keycodes = keycodes; + | ^~~~~~~~ +cafekbd-keyboard-drawing-test.c:256:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 256 | names.geometry = geometry; + | ^~~~~~~~ +7 warnings generated. + CCLD cafekbd-keyboard-drawing-test +make[2]: Leaving directory '/rootdir/test' +make[2]: Entering directory '/rootdir' +make[2]: Leaving directory '/rootdir' +make[1]: Leaving directory '/rootdir' +scan-build: Analysis run complete. +scan-build: 11 bugs found. +scan-build: Run 'scan-view /rootdir/html-report/2025-02-06-153413-14522-1' to examine bug reports. +Making check in po +make[1]: Entering directory '/rootdir/po' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/po' +Making check in libcafekbd +make[1]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +make check-am +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:113:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 113 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspectnnxo8s9_/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectnnxo8s9_/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectnnxo8s9_/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +3 warnings generated. + GICOMP Cafekbd-1.0.gir +make[2]: Leaving directory '/rootdir/libcafekbd' +make[1]: Leaving directory '/rootdir/libcafekbd' +Making check in test +make[1]: Entering directory '/rootdir/test' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/test' +make[1]: Entering directory '/rootdir' +make[1]: Leaving directory '/rootdir' + Listing... 0% Listing... 0% Listing... 0% adduser/testing,now 3.137 all [installed,automatic] +advaita-icon-theme/unknown,now 3.25.0-1 all [installed,automatic] +apt/testing,now 2.9.26 amd64 [installed,automatic] +aptitude-common/testing,now 0.8.13-6.1 all [installed,automatic] +aptitude/testing,now 0.8.13-6.1 amd64 [installed] +at-spi2-common/testing,now 2.55.0.1-1 all [installed,automatic] +at-spi2-core/testing,now 2.55.0.1-1 amd64 [installed,automatic] +autoconf-archive/testing,now 20220903-3 all [installed] +autoconf/testing,now 2.72-3 all [installed,automatic] +automake/testing,now 1:1.17-3 all [installed,automatic] +autopoint/testing,now 0.23.1-1 all [installed] +autotools-dev/testing,now 20220109.1 all [installed,automatic] +base-files/testing,now 13.6 amd64 [installed,automatic] +base-passwd/testing,now 3.6.6 amd64 [installed,automatic] +bash/testing,now 5.2.37-1 amd64 [installed,automatic] +binfmt-support/testing,now 2.2.2-7 amd64 [installed,automatic] +binutils-common/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils-gold-x86-64-linux-gnu/testing,now 2.44-1 amd64 [installed,automatic] +binutils-gold/testing,now 2.44-1 amd64 [installed,automatic] +binutils-x86-64-linux-gnu/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +bsdutils/testing,now 1:2.40.4-2 amd64 [installed,automatic] +build-essential/testing,now 12.12 amd64 [installed,automatic] +bzip2-doc/testing,now 1.0.8-6 all [installed,automatic] +bzip2/testing,now 1.0.8-6 amd64 [installed,automatic] +ca-certificates/testing,now 20241223 all [installed,automatic] +clang-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools/testing,now 1:19.0-63 amd64 [installed] +clang/testing,now 1:19.0-63 amd64 [installed] +coreutils/testing,now 9.5-1+b1 amd64 [installed,automatic] +cpp-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-14/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cpp/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cppcheck/testing,now 2.16.0-1 amd64 [installed] +ctk-update-icon-cache/unknown,now 3.25.6-1 amd64 [installed,automatic] +dash/testing,now 0.5.12-12 amd64 [installed,automatic] +dbus-bin/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-daemon/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-session-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-system-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-user-session/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus/testing,now 1.16.0-1 amd64 [installed,automatic] +dconf-gsettings-backend/testing,now 0.40.0-5 amd64 [installed,automatic] +dconf-service/testing,now 0.40.0-5 amd64 [installed,automatic] +debconf/testing,now 1.5.89 all [installed,automatic] +debian-archive-keyring/testing,now 2023.4 all [installed,automatic] +debianutils/testing,now 5.21 amd64 [installed,automatic] +diffutils/testing,now 1:3.10-2 amd64 [installed,automatic] +dirmngr/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +dmsetup/testing,now 2:1.02.201-1 amd64 [installed,automatic] +dpkg-dev/testing,now 1.22.14 all [installed,automatic] +dpkg/testing,now 1.22.14 amd64 [installed,automatic] +e2fsprogs/testing,now 1.47.2-1 amd64 [installed,automatic] +expect/testing,now 5.45.4-3+b1 amd64 [installed] +fakeroot/testing,now 1.37-1 amd64 [installed,automatic] +file/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +findutils/testing,now 4.10.0-3 amd64 [installed,automatic] +fontconfig-config/testing,now 2.15.0-2 amd64 [installed,automatic] +fontconfig/testing,now 2.15.0-2 amd64 [installed,automatic] +fonts-dejavu-core/testing,now 2.37-8 all [installed,automatic] +fonts-dejavu-mono/testing,now 2.37-8 all [installed,automatic] +g++-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-14/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +g++/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc-14-base/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gettext-base/testing,now 0.23.1-1 amd64 [installed,automatic] +gettext/testing,now 0.23.1-1 amd64 [installed] +gir1.2-atk-1.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-atspi-2.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-ctk-3.0/unknown,now 3.25.6-1 amd64 [installed] +gir1.2-freedesktop-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-freedesktop/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-gdkpixbuf-2.0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +gir1.2-girepository-2.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-girepository-2.0/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-glib-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-glib-2.0/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-harfbuzz-0.0/testing,now 10.2.0-1 amd64 [installed,automatic] +gir1.2-pango-1.0/testing,now 1.56.1-1 amd64 [installed,automatic] +gir1.2-xkl-1.0/testing,now 5.4-5+b2 amd64 [installed,automatic] +girepository-tools/testing,now 2.82.4-2 amd64 [installed,automatic] +git-man/testing,now 1:2.47.2-0.1 all [installed,automatic] +git/testing,now 1:2.47.2-0.1 amd64 [installed] +gnupg-l10n/testing,now 2.2.46-1 all [installed,automatic] +gnupg-utils/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gnupg/testing,now 2.2.46-1 all [installed,automatic] +gobject-introspection-bin/testing,now 1.82.0-4 amd64 [installed,automatic] +gobject-introspection/testing,now 1.82.0-4 amd64 [installed] +gpg-agent/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg-wks-client/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgconf/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgsm/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgv/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +grep/testing,now 3.11-4 amd64 [installed,automatic] +gsettings-desktop-schemas/testing,now 47.1-1 all [installed,automatic] +gzip/testing,now 1.13-1 amd64 [installed,automatic] +hicolor-icon-theme/testing,now 0.18-2 all [installed,automatic] +hostname/testing,now 3.25 amd64 [installed,automatic] +icu-devtools/testing,now 72.1-6 amd64 [installed,automatic] +init-system-helpers/testing,now 1.68 all [installed,automatic] +krb5-locales/testing,now 1.21.3-4 all [installed,automatic] +less/testing,now 643-1 amd64 [installed,automatic] +lib32gcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +lib32stdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libacl1/testing,now 2.3.2-2+b1 amd64 [installed,automatic] +libalgorithm-diff-perl/testing,now 1.201-1 all [installed,automatic] +libalgorithm-diff-xs-perl/testing,now 0.04-8+b4 amd64 [installed,automatic] +libalgorithm-merge-perl/testing,now 0.08-5 all [installed,automatic] +libapparmor1/testing,now 3.1.7-1+b3 amd64 [installed,automatic] +libapt-pkg6.0t64/testing,now 2.9.26 amd64 [installed,automatic] +libasan8/testing,now 14.2.0-12 amd64 [installed,automatic] +libassuan9/testing,now 3.0.1-2 amd64 [installed,automatic] +libatk-bridge2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk-bridge2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatomic1/testing,now 14.2.0-12 amd64 [installed,automatic] +libatspi2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatspi2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libattr1/testing,now 1:2.5.2-2 amd64 [installed,automatic] +libaudit-common/testing,now 1:4.0.2-2 all [installed,automatic] +libaudit1/testing,now 1:4.0.2-2+b1 amd64 [installed,automatic] +libavahi-client3/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common-data/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common3/testing,now 0.8-16 amd64 [installed,automatic] +libbinutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libblkid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libblkid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libboost-iostreams1.83.0/testing,now 1.83.0-4 amd64 [installed,automatic] +libbrotli-dev/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbrotli1/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbsd0/testing,now 0.12.2-2 amd64 [installed,automatic] +libbz2-1.0/testing,now 1.0.8-6 amd64 [installed,automatic] +libbz2-dev/testing,now 1.0.8-6 amd64 [installed,automatic] +libc-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc-dev-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc6-dev/testing,now 2.40-6 amd64 [installed,automatic] +libc6-i386/testing,now 2.40-6 amd64 [installed,automatic] +libc6/testing,now 2.40-6 amd64 [installed,automatic] +libcairo-gobject2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo-script-interpreter2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2-dev/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcap-dev/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcap-ng0/testing,now 0.8.5-4 amd64 [installed,automatic] +libcap2/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcbor0.10/testing,now 0.10.2-2 amd64 [installed,automatic] +libcc1-0/testing,now 14.2.0-12 amd64 [installed,automatic] +libclang-common-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-cpp19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-rt-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang1-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libcolord2/testing,now 1.4.7-1+b2 amd64 [installed,automatic] +libcom-err2/testing,now 1.47.2-1 amd64 [installed,automatic] +libcrypt-dev/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcrypt1/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcryptsetup12/testing,now 2:2.7.5-1 amd64 [installed,automatic] +libctf-nobfd0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctf0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctk-3-0/unknown,now 3.25.6-1 amd64 [installed] +libctk-3-bin/unknown,now 3.25.6-1 amd64 [installed,automatic] +libctk-3-common/unknown,now 3.25.6-1 all [installed] +libctk-3-dev/unknown,now 3.25.6-1 amd64 [installed] +libcups2t64/testing,now 2.4.10-2+b1 amd64 [installed,automatic] +libcurl3t64-gnutls/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcurl4t64/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcwidget4/testing,now 0.5.18-6+b2 amd64 [installed,automatic] +libdatrie-dev/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdatrie1/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdav1d7/testing,now 1.5.1-1 amd64 [installed,automatic] +libdb5.3t64/testing,now 5.3.28+dfsg2-9 amd64 [installed,automatic] +libdbus-1-3/testing,now 1.16.0-1 amd64 [installed,automatic] +libdbus-1-dev/testing,now 1.16.0-1 amd64 [installed,automatic] +libdconf1/testing,now 0.40.0-5 amd64 [installed,automatic] +libdebconfclient0/testing,now 0.277 amd64 [installed,automatic] +libdeflate-dev/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdeflate0/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdevmapper1.02.1/testing,now 2:1.02.201-1 amd64 [installed,automatic] +libdpkg-perl/testing,now 1.22.14 all [installed,automatic] +libdrm-amdgpu1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-common/testing,now 2.4.123-1 all [installed,automatic] +libdrm-intel1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-radeon1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm2/testing,now 2.4.123-1 amd64 [installed,automatic] +libedit2/testing,now 3.1-20250104-1 amd64 [installed,automatic] +libegl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libegl-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1-mesa-dev/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libelf1t64/testing,now 0.192-4 amd64 [installed,automatic] +libepoxy-dev/testing,now 1.5.10-2 amd64 [installed,automatic] +libepoxy0/testing,now 1.5.10-2 amd64 [installed,automatic] +liberror-perl/testing,now 0.17029-2 all [installed,automatic] +libexpat1-dev/testing,now 2.6.4-1 amd64 [installed,automatic] +libexpat1/testing,now 2.6.4-1 amd64 [installed,automatic] +libext2fs2t64/testing,now 1.47.2-1 amd64 [installed,automatic] +libfakeroot/testing,now 1.37-1 amd64 [installed,automatic] +libffi-dev/testing,now 3.4.6-1 amd64 [installed,automatic] +libffi8/testing,now 3.4.6-1 amd64 [installed,automatic] +libfido2-1/testing,now 1.15.0-1+b1 amd64 [installed,automatic] +libfile-fcntllock-perl/testing,now 0.22-4+b4 amd64 [installed,automatic] +libfontconfig-dev/testing,now 2.15.0-2 amd64 [installed,automatic] +libfontconfig1/testing,now 2.15.0-2 amd64 [installed,automatic] +libfreetype-dev/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfreetype6/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfribidi-dev/testing,now 1.0.16-1 amd64 [installed,automatic] +libfribidi0/testing,now 1.0.16-1 amd64 [installed,automatic] +libgbm1/testing,now 24.2.8-1 amd64 [installed,automatic] +libgc1/testing,now 1:8.2.8-1 amd64 [installed,automatic] +libgcc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcrypt20/testing,now 1.11.0-7 amd64 [installed,automatic] +libgdbm-compat4t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdbm6t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-dev/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-bin/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-common/testing,now 2.42.12+dfsg-2 all [installed,automatic] +libgio-2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libgio-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository-1.0-1/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-1.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-2.0-0/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository1.0-dev/testing,now 1.82.0-4 amd64 [installed] +libgl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgl1-mesa-dri/testing,now 24.2.8-1 amd64 [installed,automatic] +libgl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglapi-mesa/testing,now 24.2.8-1 amd64 [installed,automatic] +libgles-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles2/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglib2.0-0t64/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-data/testing,now 2.82.4-2 all [installed,automatic] +libglib2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-dev/testing,now 2.82.4-2 amd64 [installed] +libglvnd-core-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libglx0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgmp10/testing,now 2:6.3.0+dfsg-3 amd64 [installed,automatic] +libgnutls30t64/testing,now 3.8.8-2 amd64 [installed,automatic] +libgomp1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgpg-error-l10n/testing,now 1.51-3 all [installed,automatic] +libgpg-error0/testing,now 1.51-3 amd64 [installed,automatic] +libgpm2/testing,now 1.20.7-11+b2 amd64 [installed,automatic] +libgprofng0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libgraphite2-3/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgraphite2-dev/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgssapi-krb5-2/testing,now 1.21.3-4 amd64 [installed,automatic] +libharfbuzz-cairo0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-dev/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-gobject0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-icu0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-subset0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz0b/testing,now 10.2.0-1 amd64 [installed,automatic] +libhogweed6t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libhwasan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libice-dev/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libice6/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libicu-dev/testing,now 72.1-6 amd64 [installed,automatic] +libicu72/testing,now 72.1-6 amd64 [installed,automatic] +libidn2-0/testing,now 2.3.7-2+b1 amd64 [installed,automatic] +libisl23/testing,now 0.27-1 amd64 [installed,automatic] +libitm1/testing,now 14.2.0-12 amd64 [installed,automatic] +libjansson4/testing,now 2.14-2+b3 amd64 [installed,automatic] +libjbig-dev/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjbig0/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjpeg-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjson-c5/testing,now 0.18+ds-1 amd64 [installed,automatic] +libk5crypto3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkeyutils1/testing,now 1.6.3-4 amd64 [installed,automatic] +libkmod2/testing,now 33+20240816-2 amd64 [installed,automatic] +libkrb5-3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkrb5support0/testing,now 1.21.3-4 amd64 [installed,automatic] +libksba8/testing,now 1.6.7-2+b1 amd64 [installed,automatic] +liblcms2-2/testing,now 2.16-2 amd64 [installed,automatic] +libldap-common/testing,now 2.6.9+dfsg-1 all [installed,automatic] +libldap2/testing,now 2.6.9+dfsg-1 amd64 [installed,automatic] +liblerc-dev/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +liblerc4/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +libllvm19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +liblocale-gettext-perl/testing,now 1.07-7+b1 amd64 [installed,automatic] +liblsan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libltdl-dev/testing,now 2.5.4-3 amd64 [installed,automatic] +libltdl7/testing,now 2.5.4-3 amd64 [installed,automatic] +liblz4-1/testing,now 1.10.0-3 amd64 [installed,automatic] +liblzma-dev/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzma5/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzo2-2/testing,now 2.10-3+b1 amd64 [installed,automatic] +libmagic-mgc/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmagic1t64/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmd0/testing,now 1.1.0-2+b1 amd64 [installed,automatic] +libmount-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libmount1/testing,now 2.40.4-2 amd64 [installed,automatic] +libmpc3/testing,now 1.3.1-1+b3 amd64 [installed,automatic] +libmpfr6/testing,now 4.2.1-1+b2 amd64 [installed,automatic] +libncurses-dev/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncurses6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncursesw6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libnettle8t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libnghttp2-14/testing,now 1.64.0-1 amd64 [installed,automatic] +libnghttp3-9/testing,now 1.6.0-2 amd64 [installed,automatic] +libngtcp2-16/testing,now 1.9.1-1 amd64 [installed,automatic] +libngtcp2-crypto-gnutls8/testing,now 1.9.1-1 amd64 [installed,automatic] +libnpth0t64/testing,now 1.8-2 amd64 [installed,automatic] +libnss-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libobjc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libobjc4/testing,now 14.2.0-12 amd64 [installed,automatic] +libopengl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libopengl0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libp11-kit0/testing,now 0.25.5-3 amd64 [installed,automatic] +libpam-modules-bin/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-modules/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-runtime/testing,now 1.7.0-2 all [installed,automatic] +libpam-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libpam0g/testing,now 1.7.0-2 amd64 [installed,automatic] +libpango-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpango1.0-dev/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangocairo-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoft2-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoxft-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpciaccess0/testing,now 0.17-3+b3 amd64 [installed,automatic] +libpcre2-16-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-32-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-8-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-dev/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-posix3/testing,now 10.44-5 amd64 [installed,automatic] +libperl5.40/testing,now 5.40.0-8 amd64 [installed,automatic] +libpfm4/testing,now 4.13.0+git83-g91970fe-1 amd64 [installed,automatic] +libpipeline1/testing,now 1.5.8-1 amd64 [installed,automatic] +libpixman-1-0/testing,now 0.44.0-3 amd64 [installed,automatic] +libpixman-1-dev/testing,now 0.44.0-3 amd64 [installed,automatic] +libpkgconf3/testing,now 1.8.1-4 amd64 [installed,automatic] +libpng-dev/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng-tools/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng16-16t64/testing,now 1.6.44-3 amd64 [installed,automatic] +libproc2-0/testing,now 2:4.0.4-7 amd64 [installed,automatic] +libpsl5t64/testing,now 0.21.2-1.1+b1 amd64 [installed,automatic] +libpython3-stdlib/testing,now 3.13.1-2 amd64 [installed,automatic] +libpython3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libpython3.13-stdlib/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libquadmath0/testing,now 14.2.0-12 amd64 [installed,automatic] +libreadline8t64/testing,now 8.2-6 amd64 [installed,automatic] +librsvg2-2/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librsvg2-common/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librtmp1/testing,now 2.4+20151223.gitfa8646d.1-2+b5 amd64 [installed,automatic] +libsasl2-2/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules-db/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libseccomp2/testing,now 2.5.5-2 amd64 [installed,automatic] +libselinux1-dev/testing,now 3.7-3.1 amd64 [installed,automatic] +libselinux1/testing,now 3.7-3.1 amd64 [installed,automatic] +libsemanage-common/testing,now 3.7-2.1 all [installed,automatic] +libsemanage2/testing,now 3.7-2.1 amd64 [installed,automatic] +libsensors-config/testing,now 1:3.6.0-10 all [installed,automatic] +libsensors5/testing,now 1:3.6.0-10+b1 amd64 [installed,automatic] +libsepol-dev/testing,now 3.7-1 amd64 [installed,automatic] +libsepol2/testing,now 3.7-1 amd64 [installed,automatic] +libsframe1/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libsharpyuv-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsharpyuv0/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsigc++-2.0-0v5/testing,now 2.12.1-3 amd64 [installed,automatic] +libsm-dev/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsm6/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsmartcols1/testing,now 2.40.4-2 amd64 [installed,automatic] +libsqlite3-0/testing,now 3.46.1-1 amd64 [installed,automatic] +libss2/testing,now 1.47.2-1 amd64 [installed,automatic] +libssh2-1t64/testing,now 1.11.1-1 amd64 [installed,automatic] +libssl3t64/testing,now 3.4.0-2 amd64 [installed,automatic] +libstdc++-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libstdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libsysprof-capture-4-dev/testing,now 47.2-1 amd64 [installed,automatic] +libsystemd-dev/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd-shared/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd0/testing,now 257.2-3 amd64 [installed,automatic] +libtasn1-6/testing,now 4.19.0-3+b3 amd64 [installed,automatic] +libtcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +libthai-data/testing,now 0.1.29-2 all [installed,automatic] +libthai-dev/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libthai0/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libtiff-dev/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiff6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiffxx6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtinfo6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libtinyxml2-10/testing,now 10.0.0+dfsg-2+b2 amd64 [installed,automatic] +libtool/testing,now 2.5.4-3 all [installed] +libtsan2/testing,now 14.2.0-12 amd64 [installed,automatic] +libubsan1/testing,now 14.2.0-12 amd64 [installed,automatic] +libudev1/testing,now 257.2-3 amd64 [installed,automatic] +libunistring5/testing,now 1.3-1 amd64 [installed,automatic] +libuuid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libvulkan1/testing,now 1.4.304.0-1 amd64 [installed,automatic] +libwayland-bin/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-client0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-cursor0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-dev/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-egl1/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-server0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwebp-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebp7/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdecoder3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdemux2/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpmux3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libx11-6/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-data/testing,now 2:1.8.10-2 all [installed,automatic] +libx11-dev/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-xcb1/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libxapian30/testing,now 1.4.25-2 amd64 [installed,automatic] +libxau-dev/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxau6/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxaw7/testing,now 2:1.0.16-1 amd64 [installed,automatic] +libxcb-dri2-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-dri3-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-glx0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-present0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-randr0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-sync1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-xfixes0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcomposite-dev/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcomposite1/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcursor-dev/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxcursor1/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxdamage-dev/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdamage1/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdmcp-dev/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxdmcp6/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxext-dev/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxext6/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxfixes-dev/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxfixes3/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxft-dev/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxft2/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxi-dev/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxi6/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxinerama-dev/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxinerama1/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxkbcommon-dev/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbcommon0/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbfile1/testing,now 1:1.1.0-1+b4 amd64 [installed,automatic] +libxklavier-dev/testing,now 5.4-5+b2 amd64 [installed] +libxklavier16/testing,now 5.4-5+b2 amd64 [installed,automatic] +libxml2-dev/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxml2-utils/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed] +libxml2/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxmu6/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxmuu1/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxpm4/testing,now 1:3.5.17-1+b3 amd64 [installed,automatic] +libxrandr-dev/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrandr2/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrender-dev/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxrender1/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxshmfence1/testing,now 1.3-1+b3 amd64 [installed,automatic] +libxt6t64/testing,now 1:1.2.1-1.2+b2 amd64 [installed,automatic] +libxtst-dev/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxtst6/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxxf86vm1/testing,now 1:1.1.4-1+b4 amd64 [installed,automatic] +libxxhash0/testing,now 0.8.2-2+b2 amd64 [installed,automatic] +libyaml-0-2/testing,now 0.2.5-2 amd64 [installed,automatic] +libz3-4/testing,now 4.13.3-1 amd64 [installed,automatic] +libz3-dev/testing,now 4.13.3-1 amd64 [installed,automatic] +libzstd-dev/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +libzstd1/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +linux-libc-dev/testing,now 6.12.11-1 all [installed,automatic] +linux-sysctl-defaults/testing,now 4.11 all [installed,automatic] +llvm-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-linker-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-runtime/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +login.defs/testing,now 1:4.16.0-7 all [installed,automatic] +login/testing,now 1:4.16.0-2+really2.40.4-2 amd64 [installed,automatic] +logsave/testing,now 1.47.2-1 amd64 [installed,automatic] +m4/testing,now 1.4.19-5 amd64 [installed,automatic] +make/testing,now 4.4.1-1 amd64 [installed] +manpages-dev/testing,now 6.9.1-1 all [installed,automatic] +manpages/testing,now 6.9.1-1 all [installed,automatic] +mawk/testing,now 1.3.4.20240905-1 amd64 [installed,automatic] +media-types/testing,now 10.1.0 all [installed,automatic] +mesa-libgallium/testing,now 24.2.8-1 amd64 [installed,automatic] +mesa-vulkan-drivers/testing,now 24.2.8-1 amd64 [installed,automatic] +mount/testing,now 2.40.4-2 amd64 [installed,automatic] +native-architecture/testing,now 0.2.5 all [installed,automatic] +ncurses-base/testing,now 6.5-2 all [installed,automatic] +ncurses-bin/testing,now 6.5-2+b1 amd64 [installed,automatic] +netbase/testing,now 6.4 all [installed,automatic] +openssh-client/testing,now 1:9.9p1-3 amd64 [installed,automatic] +openssl-provider-legacy/testing,now 3.4.0-2 amd64 [installed,automatic] +openssl/testing,now 3.4.0-2 amd64 [installed,automatic] +pango1.0-tools/testing,now 1.56.1-1 amd64 [installed,automatic] +passwd/testing,now 1:4.16.0-7 amd64 [installed,automatic] +patch/testing,now 2.7.6-7 amd64 [installed,automatic] +perl-base/testing,now 5.40.0-8 amd64 [installed,automatic] +perl-modules-5.40/testing,now 5.40.0-8 all [installed,automatic] +perl/testing,now 5.40.0-8 amd64 [installed,automatic] +pinentry-curses/testing,now 1.3.1-2 amd64 [installed,automatic] +pkgconf-bin/testing,now 1.8.1-4 amd64 [installed,automatic] +pkgconf/testing,now 1.8.1-4 amd64 [installed,automatic] +procps/testing,now 2:4.0.4-7 amd64 [installed,automatic] +psmisc/testing,now 23.7-1 amd64 [installed,automatic] +publicsuffix/testing,now 20250108.1153-0.1 all [installed,automatic] +python3-autocommand/testing,now 2.2.2-3 all [installed,automatic] +python3-inflect/testing,now 7.3.1-2 all [installed,automatic] +python3-jaraco.context/testing,now 6.0.0-1 all [installed,automatic] +python3-jaraco.functools/testing,now 4.1.0-1 all [installed,automatic] +python3-jaraco.text/testing,now 4.0.0-1 all [installed,automatic] +python3-mako/testing,now 1.3.8-2 all [installed,automatic] +python3-markdown/testing,now 3.7-2 all [installed,automatic] +python3-markupsafe/testing,now 2.1.5-1+b2 amd64 [installed,automatic] +python3-minimal/testing,now 3.13.1-2 amd64 [installed,automatic] +python3-more-itertools/testing,now 10.6.0-1 all [installed,automatic] +python3-packaging/testing,now 24.2-1 all [installed,automatic] +python3-pkg-resources/testing,now 75.6.0-1 all [installed,automatic] +python3-pygments/testing,now 2.18.0+dfsg-2 all [installed,automatic] +python3-setuptools/testing,now 75.6.0-1 all [installed,automatic] +python3-typeguard/testing,now 4.4.1-1 all [installed,automatic] +python3-typing-extensions/testing,now 4.12.2-2 all [installed,automatic] +python3-yaml/testing,now 6.0.2-1+b1 amd64 [installed,automatic] +python3-zipp/testing,now 3.21.0-1 all [installed,automatic] +python3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3.13/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3/testing,now 3.13.1-2 amd64 [installed,automatic] +readline-common/testing,now 8.2-6 all [installed,automatic] +rpcsvc-proto/testing,now 1.4.3-1 amd64 [installed,automatic] +sed/testing,now 4.9-2 amd64 [installed,automatic] +sensible-utils/testing,now 0.0.24 all [installed,automatic] +sgml-base/testing,now 1.31 all [installed,automatic] +shared-mime-info/testing,now 2.4-5+b2 amd64 [installed,automatic] +sqv/testing,now 1.2.1-5 amd64 [installed,automatic] +systemd-cryptsetup/testing,now 257.2-3 amd64 [installed,automatic] +systemd-sysv/testing,now 257.2-3 amd64 [installed,automatic] +systemd-timesyncd/testing,now 257.2-3 amd64 [installed,automatic] +systemd/testing,now 257.2-3 amd64 [installed,automatic] +sysvinit-utils/testing,now 3.13-1 amd64 [installed,automatic] +tar/testing,now 1.35+dfsg-3.1 amd64 [installed,automatic] +tcl-expect/testing,now 5.45.4-3+b1 amd64 [installed,automatic] +tcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +tzdata/testing,now 2024b-6 all [installed,automatic] +util-linux/testing,now 2.40.4-2 amd64 [installed,automatic] +uuid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +wayland-protocols/testing,now 1.39-1 all [installed,automatic] +wget/testing,now 1.24.5-2+b1 amd64 [installed] +x11-common/testing,now 1:7.7+24 all [installed,automatic] +x11-xkb-utils/testing,now 7.7+9 amd64 [installed,automatic] +x11proto-dev/testing,now 2024.1-1 all [installed,automatic] +xauth/testing,now 1:1.1.2-1.1 amd64 [installed,automatic] +xdg-user-dirs/testing,now 0.18-2 amd64 [installed,automatic] +xkb-data/testing,now 2.42-1 all [installed,automatic] +xml-core/testing,now 0.19 all [installed,automatic] +xorg-sgml-doctools/testing,now 1:1.11-1.1 all [installed,automatic] +xtrans-dev/testing,now 1.4.0-1 all [installed,automatic] +xz-utils/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +zlib1g-dev/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +zlib1g/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +Errors detected in the build 0 +Warnings detected in the logs 96 +cppcheck defects detected in the logs 28 +TOTAL warnings detected in the logs 124 diff --git a/2025-02-06-153544-5624-cppcheck@1eab72938451_devel/stats.html b/2025-02-06-153544-5624-cppcheck@1eab72938451_devel/stats.html new file mode 100644 index 0000000..a805ba6 --- /dev/null +++ b/2025-02-06-153544-5624-cppcheck@1eab72938451_devel/stats.html @@ -0,0 +1,180 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+

Top 10 files for error severity, total findings: 2
+   1  libcafekbd/cafekbd-status.c
+   1  libcafekbd/cafekbd-indicator.c
+

+

Top 10 files for style severity, total findings: 20
+   13  libcafekbd/cafekbd-keyboard-drawing.c
+   6   libcafekbd/cafekbd-keyboard-config.c
+   1   test/cafekbd-status-test.c
+

+

Top 10 files for information severity, total findings: 5
+   1  test/cafekbd-keyboard-drawing-test.c
+   1  libcafekbd/cafekbd-keyboard-drawing.c
+   1  libcafekbd/cafekbd-keyboard-config.c
+   1  libcafekbd/cafekbd-indicator-config.c
+   1  libcafekbd/cafekbd-desktop-config.c
+

+ +
+ +
+ + diff --git a/2025-02-06-153544-5624-cppcheck@1eab72938451_devel/style.css b/2025-02-06-153544-5624-cppcheck@1eab72938451_devel/style.css new file mode 100644 index 0000000..3897bfa --- /dev/null +++ b/2025-02-06-153544-5624-cppcheck@1eab72938451_devel/style.css @@ -0,0 +1,177 @@ + +body { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; + font-size: 13px; + line-height: 1.5; + height: 100%; + margin: 0; +} + +#wrapper { + position: fixed; + height: 100vh; + width: 100vw; + display: grid; + grid-template-rows: fit-content(8rem) auto fit-content(8rem); + grid-template-columns: fit-content(25%) 1fr; + grid-template-areas: + "header header" + "menu content" + "footer footer"; +} + +h1 { + margin: 0 0 8px -2px; + font-size: 175%; +} + +.header { + padding: 0 0 5px 15px; + grid-area: header; + border-bottom: thin solid #aaa; +} + +.footer { + grid-area: footer; + border-top: thin solid #aaa; + font-size: 85%; + +} + +.footer > p { + margin: 4px; +} + +#menu, +#menu_index { + grid-area: menu; + text-align: left; + overflow: auto; + padding: 0 23px 15px 15px; + border-right: thin solid #aaa; + min-width: 200px; +} + +#menu > a { + display: block; + margin-left: 10px; + font-size: 12px; +} + +#content, +#content_index { + grid-area: content; + padding: 0px 5px 15px 15px; + overflow: auto; +} + +label { + white-space: nowrap; +} + +label.checkBtn.disabled { + color: #606060; + background: #e0e0e0; + font-style: italic; +} + +label.checkBtn, input[type="text"] { + border: 1px solid grey; + border-radius: 4px; + box-shadow: 1px 1px inset; + padding: 1px 5px; +} + +label.checkBtn { + white-space: nowrap; + background: #ccddff; +} + +label.unchecked { + background: #eff8ff; + box-shadow: 1px 1px 1px; +} + +label.checkBtn:hover, label.unchecked:hover{ + box-shadow: 0 0 2px; +} + +label.disabled:hover { + box-shadow: 1px 1px inset; +} + +label.checkBtn > input { + display:none; +} + +.summaryTable { + width: 100%; +} + +table.summaryTable td { padding: 0 5px 0 5px; } + +.statHeader, .severityHeader { + font-weight: bold; +} + +.warning { + background-color: #ffffa7; +} + +.error { + background-color: #ffb7b7; +} + +.error2 { + background-color: #faa; + display: inline-block; + margin-left: 4px; +} + +.inconclusive { + background-color: #b6b6b4; +} + +.inconclusive2 { + background-color: #b6b6b4; + display: inline-block; + margin-left: 4px; +} + +.verbose { + display: inline-block; + vertical-align: top; + cursor: help; +} + +.verbose .content { + display: none; + position: absolute; + padding: 10px; + margin: 4px; + max-width: 40%; + white-space: pre-wrap; + border: 1px solid #000; + background-color: #ffffcc; + cursor: auto; +} + +.highlight .hll { + padding: 1px; +} + +.highlighttable { + background-color: #fff; + position: relative; + margin: -10px; +} + +.linenos { + border-right: thin solid #aaa; + color: #d3d3d3; + padding-right: 6px; +} + +.id-filtered, .severity-filtered, .file-filtered, .tool-filtered, .text-filtered { + visibility: collapse; +} diff --git a/2025-02-06-164253-14522-1@28c310f42d33_devel/commitmsg b/2025-02-06-164253-14522-1@28c310f42d33_devel/commitmsg new file mode 100644 index 0000000..891e4bf --- /dev/null +++ b/2025-02-06-164253-14522-1@28c310f42d33_devel/commitmsg @@ -0,0 +1 @@ +Release 2.0.0 diff --git a/2025-02-06-164253-14522-1@28c310f42d33_devel/index.html b/2025-02-06-164253-14522-1@28c310f42d33_devel/index.html new file mode 100644 index 0000000..9f62062 --- /dev/null +++ b/2025-02-06-164253-14522-1@28c310f42d33_devel/index.html @@ -0,0 +1,138 @@ + + +libcafekbd (clang-tools 1:19.0-63) - scan-build results + + + + + + +

libcafekbd (clang-tools 1:19.0-63) - scan-build results

+ + + + + + + +
User:root@7f454faae113
Working Directory:/rootdir
Command Line:make -j 5
Clang Version:Debian clang version 19.1.6 (1+b1) +
Date:Thu Feb 6 16:42:53 2025
+

Bug Summary

+ + + + + + + + + +
Bug TypeQuantityDisplay?
All Bugs11
Logic error
Dereference of null pointer1
Stream handling error
Invalid stream state1
Stream already in EOF1
Unused code
Unreachable code8
+ +

Filter Results by File

+ + +

Reports

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Bug GroupBug Type ▾FileFunction/MethodLinePath Length
Logic errorDereference of null pointerlibcafekbd/tmp-introspectqekde35i/Cafekbd-1.0.cmain81232View Report
Stream handling errorInvalid stream statelibcafekbd/tmp-introspectqekde35i/Cafekbd-1.0.cread_line8933View Report
Stream handling errorStream already in EOFlibcafekbd/tmp-introspectqekde35i/Cafekbd-1.0.cread_line8933View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2481View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain1991View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain1941View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2281View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain1871View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2251View Report
Unused codeUnreachable codelibcafekbd/tmp-introspectqekde35i/Cafekbd-1.0.cvalue_to_string2391View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2561View Report
+ + diff --git a/2025-02-06-164253-14522-1@28c310f42d33_devel/output_28c310f42d337eadca7386aeed5be91417c339a2 b/2025-02-06-164253-14522-1@28c310f42d33_devel/output_28c310f42d337eadca7386aeed5be91417c339a2 new file mode 100644 index 0000000..71bf803 --- /dev/null +++ b/2025-02-06-164253-14522-1@28c310f42d33_devel/output_28c310f42d337eadca7386aeed5be91417c339a2 @@ -0,0 +1,1866 @@ +Checking libcafekbd/cafekbd-desktop-config.c ... +libcafekbd/cafekbd-desktop-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +1/10 files checked 4% done +Checking libcafekbd/cafekbd-indicator-config.c ... +libcafekbd/cafekbd-indicator-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +2/10 files checked 10% done +Checking libcafekbd/cafekbd-indicator.c ... +libcafekbd/cafekbd-indicator.c:66:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdIndicator, cafekbd_indicator, CTK_TYPE_NOTEBOOK) +^ +3/10 files checked 24% done +Checking libcafekbd/cafekbd-keyboard-config.c ... +libcafekbd/cafekbd-keyboard-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-config.c:67:8: style: Condition '*l1' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:67:15: style: Condition '*l2' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:227:16: style: Condition 'option!=NULL' is always true [knownConditionTrueFalse] + (option != NULL) ? strchr (option, ':') : NULL; + ^ +libcafekbd/cafekbd-keyboard-config.c:282:18: style: Condition 'variant==NULL' is always false [knownConditionTrueFalse] + (variant == + ^ +libcafekbd/cafekbd-keyboard-config.c:226:10: style: Variable 'delim' can be declared as pointer to const [constVariablePointer] + char *delim = + ^ +libcafekbd/cafekbd-keyboard-config.c:609:65: style: Parameter 'kbd_config' can be declared as pointer to const [constParameterPointer] +cafekbd_keyboard_config_options_is_set (CafekbdKeyboardConfig * kbd_config, + ^ +4/10 files checked 36% done +Checking libcafekbd/cafekbd-keyboard-drawing.c ... +libcafekbd/cafekbd-keyboard-drawing.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-drawing.c:61:60: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_coord (CafekbdKeyboardDrawingRenderContext * context, gint n) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:67:61: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_double (CafekbdKeyboardDrawingRenderContext * context, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:625:51: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +set_markup (CafekbdKeyboardDrawingRenderContext * context, gchar *txt) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1026:11: style: Variable 'runp' can be declared as pointer to const [constVariablePointer] + GSList *runp; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1036:25: style: Variable 'geometry' can be declared as pointer to const [constVariablePointer] + PangoGlyphGeometry *geometry; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1202:39: style: Parameter 'outline' can be declared as pointer to const [constParameterPointer] +calc_origin_offset_x (XkbOutlineRec * outline) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1397:15: style: Variable 'shape' can be declared as pointer to const [constVariablePointer] + XkbShapeRec *shape; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: style: Parameter 'drawing' can be declared as pointer to const. However it seems that 'button_press_event' is a callback function, if 'drawing' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2343:18: note: You might need to cast the function pointer here + G_CALLBACK (button_press_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: note: Parameter 'drawing' can be declared as pointer to const + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: style: Parameter 'event' can be declared as pointer to const. However it seems that 'focus_event' is a callback function, if 'event' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2347:18: note: You might need to cast the function pointer here + G_CALLBACK (focus_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: note: Parameter 'event' can be declared as pointer to const + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: style: Parameter 'a' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'a' is declared with const you might also need to cast function pointer(s). [constParameterCallback] +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: note: Parameter 'a' can be declared as pointer to const +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: style: Parameter 'b' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'b' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: note: Parameter 'b' can be declared as pointer to const + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1863:9: style: Variable 'pind' can be declared as pointer to const [constVariablePointer] + Atom *pind = drawing->xkb->names->indicators; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2124:60: style: Parameter 'iev' can be declared as pointer to const [constParameterPointer] +process_indicators_state_notify (XkbIndicatorNotifyEvent * iev, + ^ +Checking libcafekbd/cafekbd-keyboard-drawing.c: KBDRAW_DEBUG... +5/10 files checked 77% done +Checking libcafekbd/cafekbd-status.c ... +libcafekbd/cafekbd-status.c:82:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdStatus, cafekbd_status, CTK_TYPE_STATUS_ICON) +^ +6/10 files checked 91% done +Checking libcafekbd/cafekbd-util.c ... +7/10 files checked 93% done +Checking test/cafekbd-indicator-test.c ... +8/10 files checked 94% done +Checking test/cafekbd-keyboard-drawing-test.c ... +test/cafekbd-keyboard-drawing-test.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +Checking test/cafekbd-keyboard-drawing-test.c: HAVE_CONFIG_H... +9/10 files checked 99% done +Checking test/cafekbd-status-test.c ... +test/cafekbd-status-test.c:42:17: style: Variable 'icon' can be declared as pointer to const [constVariablePointer] + CtkStatusIcon *icon; + ^ +10/10 files checked 100% done +nofile:0:0: information: Active checkers: There was critical errors (use --checkers-report= to see details) [checkersReport] + +/usr/bin/cafe-autogen +checking for autoreconf >= 2.53... + testing autoreconf... found 2.72 +checking for pkg-config >= 0.14.0... + testing pkg-config... found 1.8.1 +checking for cafe-common >= 0.0.1... + testing cafe-doc-common... found 2.0.0 +Checking for required M4 macros... +Checking for forbidden M4 macros... +Processing ./configure.ac +Running cafe-doc-common... +Running autoreconf... +autoreconf: export WARNINGS=no-portability +autoreconf: Entering directory '.' +autoreconf: running: autopoint --force +Copying file ABOUT-NLS +Copying file config.rpath +Copying file m4/codeset.m4 +Copying file m4/extern-inline.m4 +Copying file m4/fcntl-o.m4 +Copying file m4/gettext.m4 +Copying file m4/glibc2.m4 +Copying file m4/glibc21.m4 +Copying file m4/iconv.m4 +Copying file m4/intdiv0.m4 +Copying file m4/intl.m4 +Copying file m4/intldir.m4 +Copying file m4/intlmacosx.m4 +Copying file m4/intmax.m4 +Copying file m4/inttypes-pri.m4 +Copying file m4/inttypes_h.m4 +Copying file m4/lcmessage.m4 +Copying file m4/lib-ld.m4 +Copying file m4/lib-link.m4 +Copying file m4/lib-prefix.m4 +Copying file m4/lock.m4 +Copying file m4/longlong.m4 +Copying file m4/nls.m4 +Copying file m4/po.m4 +Copying file m4/printf-posix.m4 +Copying file m4/progtest.m4 +Copying file m4/size_max.m4 +Copying file m4/stdint_h.m4 +Copying file m4/threadlib.m4 +Copying file m4/uintmax_t.m4 +Copying file m4/visibility.m4 +Copying file m4/wchar_t.m4 +Copying file m4/wint_t.m4 +Copying file m4/xsize.m4 +Copying file po/Makefile.in.in +Copying file po/Makevars.template +Copying file po/Rules-quot +Copying file po/boldquot.sed +Copying file po/en@boldquot.header +Copying file po/en@quot.header +Copying file po/insert-header.sin +Copying file po/quot.sed +Copying file po/remove-potcdate.sin +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: configure.ac: tracing +autoreconf: running: libtoolize --copy --force +libtoolize: putting auxiliary files in '.'. +libtoolize: copying file './ltmain.sh' +libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. +libtoolize: copying file 'm4/libtool.m4' +libtoolize: copying file 'm4/ltoptions.m4' +libtoolize: copying file 'm4/ltsugar.m4' +libtoolize: copying file 'm4/ltversion.m4' +libtoolize: copying file 'm4/lt~obsolete.m4' +autoreconf: configure.ac: not using Intltool +autoreconf: configure.ac: not using Gtkdoc +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: running: /usr/bin/autoconf --force +autoreconf: running: /usr/bin/autoheader --force +autoreconf: running: automake --add-missing --copy --force-missing +configure.ac:31: installing './compile' +configure.ac:34: installing './config.guess' +configure.ac:34: installing './config.sub' +configure.ac:16: installing './install-sh' +configure.ac:16: installing './missing' +Makefile.am: installing './INSTALL' +libcafekbd/Makefile.am: installing './depcomp' +autoreconf: Leaving directory '.' +Skipping configure process. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +checking for a BSD-compatible install... /usr/bin/install -c +checking whether sleep supports fractional seconds... yes +checking filesystem timestamp resolution... 0.01 +checking whether build environment is sane... yes +checking for a race-free mkdir -p... /usr/bin/mkdir -p +checking for gawk... no +checking for mawk... mawk +checking whether make sets $(MAKE)... yes +checking whether make supports nested variables... yes +checking xargs -n works... yes +checking whether make supports the include directive... yes (GNU style) +checking for gcc... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the C compiler works... yes +checking for C compiler default output file name... a.out +checking for suffix of executables... +checking whether we are cross compiling... no +checking for suffix of object files... o +checking whether the compiler supports GNU C... yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... rm: cannot remove 'conftest.plist': Is a directory +yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... gcc3 +checking whether C compiler accepts -Werror=unknown-warning-option... no +checking whether C compiler accepts -Wall... yes +checking whether C compiler accepts -Wmissing-prototypes... yes +checking whether C compiler accepts -Wbad-function-cast... yes +checking whether C compiler accepts -Wcast-align... yes +checking whether C compiler accepts -Wextra... yes +checking whether C compiler accepts -Wformat-nonliteral... yes +checking whether C compiler accepts -Wmissing-declarations... yes +checking whether C compiler accepts -Wnested-externs... yes +checking whether C compiler accepts -Wpointer-arith... yes +checking whether C compiler accepts -Wredundant-decls... yes +checking whether C compiler accepts -Wshadow... yes +checking whether C compiler accepts -Wstrict-prototypes... yes +checking whether C compiler accepts -Wunused-macros... yes +checking whether C compiler accepts -Werror=format-security... yes +checking whether C compiler accepts -fstrict-aliasing... yes +checking flags to pass to the C compiler /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing +checking for gcc... (cached) /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the compiler supports GNU C... (cached) yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... (cached) yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... (cached) none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... (cached) yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... (cached) gcc3 +checking build system type... x86_64-pc-linux-gnu +checking host system type... x86_64-pc-linux-gnu +checking how to print strings... printf +checking for a sed that does not truncate output... /usr/bin/sed +checking for grep that handles long lines and -e... /usr/bin/grep +checking for egrep... /usr/bin/grep -E +checking for fgrep... /usr/bin/grep -F +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld +checking if the linker (/usr/bin/ld) is GNU ld... yes +checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B +checking the name lister (/usr/bin/nm -B) interface... rm: cannot remove 'conftest.plist': Is a directory +BSD nm +checking whether ln -s works... yes +checking the maximum length of command line arguments... 3145728 +checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop +checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop +checking for /usr/bin/ld option to reload object files... -r +checking for file... file +checking for objdump... objdump +checking how to recognize dependent libraries... pass_all +checking for dlltool... no +checking how to associate runtime and link libraries... printf %s\n +checking for ranlib... ranlib +checking for ar... ar +checking for archiver @FILE support... rm: cannot remove 'conftest.plist': Is a directory +@ +checking for strip... strip +checking command to parse /usr/bin/nm -B output from /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer object... rm: cannot remove 'conftest.plist': Is a directory +ok +checking for sysroot... no +checking for a working dd... /usr/bin/dd +checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1 +checking for mt... no +checking if : is a manifest tool... no +checking for stdio.h... yes +checking for stdlib.h... yes +checking for string.h... yes +checking for inttypes.h... yes +checking for stdint.h... yes +checking for strings.h... yes +checking for sys/stat.h... yes +checking for sys/types.h... yes +checking for unistd.h... yes +checking for dlfcn.h... yes +checking for objdir... .libs +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -fno-rtti -fno-exceptions... no +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to produce PIC... -fPIC -DPIC +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer PIC flag -fPIC -DPIC works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer static flag -static works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... (cached) yes +checking whether the /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes +checking whether -lc should be explicitly linked in... no +checking dynamic linker characteristics... GNU/Linux ld.so +checking how to hardcode library paths into programs... immediate +checking whether stripping libraries is possible... yes +checking if libtool supports shared libraries... yes +checking whether to build shared libraries... yes +checking whether to build static libraries... yes +checking whether NLS is requested... yes +checking for msgfmt... /usr/bin/msgfmt +checking for gmsgfmt... /usr/bin/msgfmt +checking for xgettext... /usr/bin/xgettext +checking for msgmerge... /usr/bin/msgmerge +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld -m elf_x86_64 +checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes +checking for shared library run path origin... done +checking how to run the C preprocessor... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer -E +checking for egrep -e... (cached) /usr/bin/grep -E +checking for CFPreferencesCopyAppValue... no +checking for CFLocaleCopyCurrent... no +checking for GNU gettext in libc... yes +checking whether to use NLS... yes +checking where the gettext function comes from... libc +checking for glib-compile-resources... /usr/bin/glib-compile-resources +checking for xmllint... /usr/bin/xmllint +checking for setlocale... yes +checking for pkg-config... /usr/bin/pkg-config +checking pkg-config is at least version 0.9.0... yes +checking for glib-2.0 >= 2.50.0... yes +checking for gmodule-2.0... yes +checking for gio-2.0 >= 2.25.0... yes +checking for cdk-3.0 >= 3.22.0... yes +checking for ctk+-3.0 >= 3.22.0 cdk-x11-3.0 >= 3.22.0... yes +checking for libxklavier >= 5.2... yes +checking for X... libraries , headers +checking for gethostbyname... yes +checking for connect... yes +checking for remove... yes +checking for shmat... yes +checking for IceConnectionNumber in -lICE... yes +checking for pkg-config... (cached) /usr/bin/pkg-config +checking pkg-config is at least version 0.16... yes +checking for library containing sqrt... -lm +checking for gobject-introspection... yes +checking that generated files are newer than configure... done +configure: creating ./config.status +config.status: creating Makefile +config.status: creating libcafekbd.pc +config.status: creating libcafekbdui.pc +config.status: creating po/Makefile.in +config.status: creating libcafekbd/Makefile +config.status: creating libcafekbd/org.cafe.peripherals-keyboard-xkb.gschema.xml +config.status: creating test/Makefile +config.status: creating config.h +config.status: executing depfiles commands +config.status: executing libtool commands +config.status: executing po-directories commands +config.status: creating po/POTFILES +config.status: creating po/Makefile + +Configuration: + + prefix: /usr + exec_prefix: ${prefix} + libdir: ${exec_prefix}/lib + bindir: ${exec_prefix}/bin + sbindir: ${exec_prefix}/sbin + sysconfdir: ${prefix}/etc + datadir: ${datarootdir} + source code location: . + compiler: /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer + cflags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + Warning flags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + +scan-build: Analysis run complete. +scan-build: Removing directory '/tmp/scan-build-2025-02-06-164243-11857-1' because it contains no reports. +scan-build: No bugs found. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +make all-recursive +make[1]: Entering directory '/rootdir' +Making all in po +make[2]: Entering directory '/rootdir/po' +make libcafekbd.pot-update +make[3]: Entering directory '/rootdir/po' +sed -e '/^#/d' remove-potcdate.sin > t-remove-potcdate.sed +mv t-remove-potcdate.sed remove-potcdate.sed +package_gnu=""; \ +test -n "$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L .. -maxdepth 1 -type f \ + -size -10000000c -exec grep 'GNU libcafekbd' \ + /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU libcafekbd' ../* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ +}; \ +if test "$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ +else \ + package_prefix=''; \ +fi; \ +if test -n '' || test 'https://github.com/cafe-desktop/libcafekbd' = '@'PACKAGE_BUGREPORT'@'; then \ + msgid_bugs_address=''; \ +else \ + msgid_bugs_address='https://github.com/cafe-desktop/libcafekbd'; \ +fi; \ +case `/usr/bin/xgettext --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ + *) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --package-name="${package_prefix}libcafekbd" \ + --package-version='2.0.0' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ +esac +test ! -f libcafekbd.po || { \ + if test -f ./libcafekbd.pot-header; then \ + sed -e '1,/^#$/d' < libcafekbd.po > libcafekbd.1po && \ + cat ./libcafekbd.pot-header libcafekbd.1po > libcafekbd.po; \ + rm -f libcafekbd.1po; \ + fi; \ + if test -f ./libcafekbd.pot; then \ + sed -f remove-potcdate.sed < ./libcafekbd.pot > libcafekbd.1po && \ + sed -f remove-potcdate.sed < libcafekbd.po > libcafekbd.2po && \ + if cmp libcafekbd.1po libcafekbd.2po >/dev/null 2>&1; then \ + rm -f libcafekbd.1po libcafekbd.2po libcafekbd.po; \ + else \ + rm -f libcafekbd.1po libcafekbd.2po ./libcafekbd.pot && \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ + else \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ +} +make[3]: Leaving directory '/rootdir/po' +test ! -f ./libcafekbd.pot || \ + test -z "af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo" || make af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo +make[3]: Entering directory '/rootdir/po' +/usr/bin/msgmerge --update --quiet --lang=af af.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=am am.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=an an.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ar ar.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=as as.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ast ast.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=az az.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=be be.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn bn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bg bg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=br br.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn_IN bn_IN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bs bs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca@valencia ca@valencia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca ca.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=crh crh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cmn cmn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cs cs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=csb csb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cv cv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cy cy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=da da.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de de.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=dz dz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de_CH de_CH.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=el el.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_AU en_AU.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_CA en_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_GB en_GB.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eo eo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es es.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_419 es_419.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_AR es_AR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CL es_CL.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CO es_CO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CR es_CR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_DO es_DO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_EC es_EC.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_ES es_ES.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_MX es_MX.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_NI es_NI.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PE es_PE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PR es_PR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PA es_PA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_SV es_SV.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_US es_US.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_UY es_UY.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=et et.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_VE es_VE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eu eu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fa fa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fi fi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fil fil.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fo fo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr fr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr_CA fr_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=frp frp.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fur fur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fy fy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ga ga.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gd gd.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gl gl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gu gu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ha ha.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=he he.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hi hi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hu hu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hr hr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hy hy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=id id.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ia ia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ig ig.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ie ie.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=is is.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=it it.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=jv jv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ja ja.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ka ka.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kab kab.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=km km.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kk kk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kn kn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ko ko.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ks ks.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku ku.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku_IQ ku_IQ.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ky ky.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=la la.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lb lb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lo lo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=li li.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lt lt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lv lv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mai mai.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mg mg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mi mi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mk mk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ml ml.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mn mn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mr mr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ms ms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=my my.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nah nah.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nb nb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nds nds.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nl nl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ne ne.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nn nn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nqo nqo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nso nso.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=oc oc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=or or.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=om om.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pa pa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pl pl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pms pms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ps ps.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt pt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt_BR pt_BR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ro ro.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ru ru.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=rw rw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sco sco.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sc sc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=si si.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sk sk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sl sl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sq sq.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=so so.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr sr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr@latin sr@latin.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sv sv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ta ta.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sw sw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=te te.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tg tg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=th th.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tk tk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tl tl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tr tr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ts ts.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tt tt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ug ug.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uk uk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur ur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur_PK ur_PK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uz uz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=vi vi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=xh xh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=wa wa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yi yi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yo yo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_CN zh_CN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_HK zh_HK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_TW zh_TW.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zu zu.po libcafekbd.pot +rm -f af.gmo && /usr/bin/msgfmt -c --statistics --verbose -o af.gmo af.po +af.po: 7 translated messages, 84 untranslated messages. +rm -f am.gmo && /usr/bin/msgfmt -c --statistics --verbose -o am.gmo am.po +rm -f an.gmo && /usr/bin/msgfmt -c --statistics --verbose -o an.gmo an.po +am.po: 54 translated messages, 37 untranslated messages. +rm -f ar.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ar.gmo ar.po +rm -f as.gmo && /usr/bin/msgfmt -c --statistics --verbose -o as.gmo as.po +an.po:7: warning: header field 'Last-Translator' still has the initial default value +an.po: 0 translated messages, 91 untranslated messages. +ar.po: 50 translated messages, 41 untranslated messages. +rm -f ast.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ast.gmo ast.po +as.po: 41 translated messages, 50 untranslated messages. +rm -f az.gmo && /usr/bin/msgfmt -c --statistics --verbose -o az.gmo az.po +rm -f be.gmo && /usr/bin/msgfmt -c --statistics --verbose -o be.gmo be.po +rm -f bg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bg.gmo bg.po +rm -f bn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn.gmo bn.po +be.po: 46 translated messages, 45 untranslated messages. +az.po: 9 translated messages, 82 untranslated messages. +bg.po: 54 translated messages, 37 untranslated messages. +bn.po: 43 translated messages, 48 untranslated messages. +ast.po: 47 translated messages, 44 untranslated messages. +rm -f bn_IN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn_IN.gmo bn_IN.po +rm -f bs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bs.gmo bs.po +rm -f br.gmo && /usr/bin/msgfmt -c --statistics --verbose -o br.gmo br.po +rm -f ca.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca.gmo ca.po +rm -f ca@valencia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca@valencia.gmo ca@valencia.po +bn_IN.po: 41 translated messages, 50 untranslated messages. +bs.po: 25 translated messages, 66 untranslated messages. +br.po: 20 translated messages, 71 untranslated messages. +ca.po: 87 translated messages, 4 untranslated messages. +ca@valencia.po: 54 translated messages, 37 untranslated messages. +rm -f cmn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cmn.gmo cmn.po +rm -f crh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o crh.gmo crh.po +rm -f cs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cs.gmo cs.po +rm -f csb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o csb.gmo csb.po +rm -f cv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cv.gmo cv.po +crh.po: 11 translated messages, 80 untranslated messages. +cmn.po: 46 translated messages, 45 untranslated messages. +csb.po:7: warning: header field 'Last-Translator' still has the initial default value +csb.po: 0 translated messages, 91 untranslated messages. +rm -f cy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cy.gmo cy.po +cs.po: 81 translated messages, 10 untranslated messages. +rm -f da.gmo && /usr/bin/msgfmt -c --statistics --verbose -o da.gmo da.po +cv.po: 0 translated messages, 91 untranslated messages. +rm -f de.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de.gmo de.po +rm -f de_CH.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de_CH.gmo de_CH.po +cy.po: 26 translated messages, 65 untranslated messages. +rm -f dz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o dz.gmo dz.po +da.po: 91 translated messages. +de.po: 76 translated messages, 15 untranslated messages. +de_CH.po: 0 translated messages, 91 untranslated messages. +rm -f el.gmo && /usr/bin/msgfmt -c --statistics --verbose -o el.gmo el.po +rm -f en_AU.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_AU.gmo en_AU.po +rm -f en_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_CA.gmo en_CA.po +dz.po: 39 translated messages, 52 untranslated messages. +el.po: 54 translated messages, 37 untranslated messages. +rm -f en_GB.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_GB.gmo en_GB.po +en_AU.po: 54 translated messages, 37 untranslated messages. +en_CA.po: 10 translated messages, 81 untranslated messages. +rm -f eo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eo.gmo eo.po +rm -f es.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es.gmo es.po +en_GB.po: 54 translated messages, 37 untranslated messages. +rm -f es_419.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_419.gmo es_419.po +es.po: 89 translated messages, 2 untranslated messages. +eo.po: 52 translated messages, 39 untranslated messages. +rm -f es_AR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_AR.gmo es_AR.po +rm -f es_CL.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CL.gmo es_CL.po +es_419.po: 0 translated messages, 91 untranslated messages. +rm -f es_CO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CO.gmo es_CO.po +rm -f es_CR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CR.gmo es_CR.po +es_CL.po: 3 translated messages, 88 untranslated messages. +es_AR.po: 21 translated messages, 70 untranslated messages. +rm -f es_DO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_DO.gmo es_DO.po +es_CR.po: 1 translated message, 90 untranslated messages. +es_CO.po: 49 translated messages, 42 untranslated messages. +rm -f es_EC.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_EC.gmo es_EC.po +rm -f es_ES.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_ES.gmo es_ES.po +rm -f es_MX.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_MX.gmo es_MX.po +es_DO.po: 1 translated message, 90 untranslated messages. +es_EC.po: 1 translated message, 90 untranslated messages. +rm -f es_NI.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_NI.gmo es_NI.po +es_ES.po: 1 translated message, 90 untranslated messages. +es_MX.po: 1 translated message, 90 untranslated messages. +rm -f es_PA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PA.gmo es_PA.po +rm -f es_PE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PE.gmo es_PE.po +es_NI.po: 1 translated message, 90 untranslated messages. +rm -f es_PR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PR.gmo es_PR.po +rm -f es_SV.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_SV.gmo es_SV.po +es_PA.po: 1 translated message, 90 untranslated messages. +es_PE.po: rm -f es_US.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_US.gmo es_US.po +1 translated message, 90 untranslated messages. +es_PR.po: 1 translated message, 90 untranslated messages. +es_SV.po: 1 translated message, 90 untranslated messages. +rm -f es_UY.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_UY.gmo es_UY.po +rm -f es_VE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_VE.gmo es_VE.po +es_US.po: 0 translated messages, 91 untranslated messages. +rm -f et.gmo && /usr/bin/msgfmt -c --statistics --verbose -o et.gmo et.po +rm -f eu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eu.gmo eu.po +es_UY.po: 1 translated message, 90 untranslated messages. +es_VE.po: 1 translated message, 90 untranslated messages. +rm -f fa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fa.gmo fa.po +et.po: 54 translated messages, 37 untranslated messages. +eu.po: rm -f fi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fi.gmo fi.po +54 translated messages, 37 untranslated messages. +fa.po: 11 translated messages, 80 untranslated messages. +rm -f fil.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fil.gmo fil.po +rm -f fo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fo.gmo fo.po +rm -f fr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr.gmo fr.po +fi.po: 48 translated messages, 43 untranslated messages. +rm -f fr_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr_CA.gmo fr_CA.po +fil.po: 0 translated messages, 91 untranslated messages. +fo.po: 0 translated messages, 91 untranslated messages. +rm -f frp.gmo && /usr/bin/msgfmt -c --statistics --verbose -o frp.gmo frp.po +fr.po: 67 translated messages, 24 untranslated messages. +fr_CA.po: 3 translated messages, 88 untranslated messages. +rm -f fy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fy.gmo fy.po +rm -f fur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fur.gmo fur.po +frp.po: 7 translated messages, 84 untranslated messages. +rm -f ga.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ga.gmo ga.po +rm -f gd.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gd.gmo gd.po +fy.po: 4 translated messages, 87 untranslated messages. +rm -f gl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gl.gmo gl.po +fur.po: 4 translated messages, 87 untranslated messages. +ga.po: 41 translated messages, 50 untranslated messages. +gd.po: 0 translated messages, 91 untranslated messages. +rm -f gu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gu.gmo gu.po +gl.po: 89 translated messages, 2 untranslated messages. +rm -f ha.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ha.gmo ha.po +rm -f hi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hi.gmo hi.po +rm -f he.gmo && /usr/bin/msgfmt -c --statistics --verbose -o he.gmo he.po +gu.po: 43 translated messages, 48 untranslated messages. +rm -f hr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hr.gmo hr.po +ha.po: 5 translated messages, 86 untranslated messages. +hi.po: 45 translated messages, 46 untranslated messages. +rm -f hu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hu.gmo hu.po +hr.po: 54 translated messages, 37 untranslated messages. +he.po: 54 translated messages, 37 untranslated messages. +rm -f hy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hy.gmo hy.po +rm -f ia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ia.gmo ia.po +rm -f ie.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ie.gmo ie.po +rm -f id.gmo && /usr/bin/msgfmt -c --statistics --verbose -o id.gmo id.po +hu.po: 54 translated messages, 37 untranslated messages. +hy.po: 54 translated messages, 37 untranslated messages. +ia.po: 3 translated messages, 88 untranslated messages. +ie.po: 45 translated messages, 46 untranslated messages. +rm -f ig.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ig.gmo ig.po +rm -f is.gmo && /usr/bin/msgfmt -c --statistics --verbose -o is.gmo is.po +id.po: 91 translated messages. +rm -f it.gmo && /usr/bin/msgfmt -c --statistics --verbose -o it.gmo it.po +rm -f ja.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ja.gmo ja.po +ig.po: 5 translated messages, 86 untranslated messages. +is.po: 12 translated messages, 79 untranslated messages. +rm -f jv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o jv.gmo jv.po +rm -f ka.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ka.gmo ka.po +ja.po: it.po: 91 translated messages. +54 translated messages, 37 untranslated messages. +rm -f kab.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kab.gmo kab.po +jv.po: 2 translated messages, 89 untranslated messages. +rm -f km.gmo && /usr/bin/msgfmt -c --statistics --verbose -o km.gmo km.po +ka.po: 37 translated messagesrm -f kk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kk.gmo kk.po +, 54 untranslated messages. +kab.po: 4 translated messages, 87 untranslated messages. +rm -f kn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kn.gmo kn.po +km.po:7: warning: header field 'Last-Translator' still has the initial default value +km.po: 0 translated messages, 91 untranslated messages. +kk.po: 24 translated messages, 67 untranslated messages. +rm -f ko.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ko.gmo ko.po +rm -f ks.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ks.gmo ks.po +kn.po: 43 translated messages, 48 untranslated messages. +rm -f ku.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku.gmo ku.po +rm -f ku_IQ.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku_IQ.gmo ku_IQ.po +ko.po: 54 translated messages, 37 untranslated messages. +rm -f ky.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ky.gmo ky.po +ks.po: 3 translated messages, 88 untranslated messages. +ku_IQ.po: 16 translated messages, 75 untranslated messages. +rm -f la.gmo && /usr/bin/msgfmt -c --statistics --verbose -o la.gmo la.po +ku.po: 10 translated messages, 81 untranslated messages. +ky.po: 26 translated messages, 65 untranslated messages. +la.po: 2 translated messages, 89 untranslated messages. +rm -f lb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lb.gmo lb.po +rm -f li.gmo && /usr/bin/msgfmt -c --statistics --verbose -o li.gmo li.po +rm -f lo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lo.gmo lo.po +rm -f lv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lv.gmo lv.po +rm -f lt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lt.gmo lt.po +lb.po:7: warning: header field 'Last-Translator' still has the initial default value +lb.po: 0 translated messages, 91 untranslated messages. +li.po:7: warning: header field 'Last-Translator' still has the initial default value +li.po: 0 translated messages, 91 untranslated messages. +lo.po:7: warning: header field 'Last-Translator' still has the initial default value +lo.po: 0 translated messages, 91 untranslated messages. +lt.po: 91 translated messages. +rm -f mai.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mai.gmo mai.po +lv.po: 49 translated messages, 42 untranslated messages. +rm -f mg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mg.gmo mg.po +rm -f mi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mi.gmo mi.po +rm -f mk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mk.gmo mk.po +mai.po: 18 translated messages, 73 untranslated messages. +rm -f ml.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ml.gmo ml.po +mg.po: 10 translated messages, 81 untranslated messages. +mi.po:7: warning: header field 'Last-Translator' still has the initial default value +mi.po: 0 translated messages, 91 untranslated messages. +mk.po: 39 translated messages, 52 untranslated messages. +rm -f mn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mn.gmo mn.po +rm -f mr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mr.gmo mr.po +ml.po: 41 translated messages, 50 untranslated messages. +rm -f ms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ms.gmo ms.po +rm -f my.gmo && /usr/bin/msgfmt -c --statistics --verbose -o my.gmo my.po +mn.po: 10 translated messages, 81 untranslated messages. +mr.po: 47 translated messages, 44 untranslated messages. +rm -f nah.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nah.gmo nah.po +ms.po: 91 translated messages. +my.po:7: warning: header field 'Last-Translator' still has the initial default value +my.po: 0 translated messages, 91 untranslated messages. +rm -f nds.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nds.gmo nds.po +rm -f nb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nb.gmo nb.po +rm -f ne.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ne.gmo ne.po +nah.po: 0 translated messages, 91 untranslated messages. +rm -f nl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nl.gmo nl.po +nds.po: 12 translated messages, 79 untranslated messages. +nb.po: 91 translated messages. +ne.po: 13 translated messages, 78 untranslated messages. +rm -f nn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nn.gmo nn.po +nl.po: rm -f nso.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nso.gmo nso.po +91 translated messages. +rm -f nqo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nqo.gmo nqo.po +rm -f oc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o oc.gmo oc.po +nn.po: 40 translated messages, 51 untranslated messages. +rm -f om.gmo && /usr/bin/msgfmt -c --statistics --verbose -o om.gmo om.po +nso.po: 3 translated messages, 88 untranslated messages. +nqo.po: 0 translated messages, 91 untranslated messages. +oc.po: 68 translated messages, 23 untranslated messages. +rm -f or.gmo && /usr/bin/msgfmt -c --statistics --verbose -o or.gmo or.po +rm -f pl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pl.gmo pl.po +rm -f pms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pms.gmo pms.po +rm -f pa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pa.gmo pa.po +om.po: 0 translated messages, 91 untranslated messages. +or.po: 41 translated messages, 50 untranslated messages. +pms.po: 3 translated messages, 88 untranslated messages. +pl.po: 55 translated messages, 36 untranslated messages. +rm -f ps.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ps.gmo ps.po +pa.po: 46 translated messages, 45 untranslated messages. +rm -f pt_BR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt_BR.gmo pt_BR.po +rm -f pt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt.gmo pt.po +rm -f ro.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ro.gmo ro.po +ps.po: 6 translated messages, 85 untranslated messages. +rm -f ru.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ru.gmo ru.po +pt_BR.po: 58 translated messages, 33 untranslated messages. +ro.po: 54 translated messages, 37 untranslated messages. +pt.po: 84 translated messages, 7 untranslated messages. +rm -f rw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o rw.gmo rw.po +ru.po: 89 translated messages, 2 untranslated messages. +rm -f sc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sc.gmo sc.po +rm -f si.gmo && /usr/bin/msgfmt -c --statistics --verbose -o si.gmo si.po +rm -f sco.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sco.gmo sco.po +rw.po: 10 translated messages, 81 untranslated messages. +sc.po: 2 translated messages, 89 untranslated messages. +rm -f sk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sk.gmo sk.po +rm -f sl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sl.gmo sl.po +sco.po: 0 translated messages, 91 untranslated messages. +si.po: 36 translated messages, 55 untranslated messages. +rm -f so.gmo && /usr/bin/msgfmt -c --statistics --verbose -o so.gmo so.po +sk.po: 54 translated messages, 37 untranslated messages. +sl.po: 55 translated messages, 36 untranslated messages. +rm -f sr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr.gmo sr.po +rm -f sq.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sq.gmo sq.po +so.po: 0 translated messages, 91 untranslated messages. +rm -f sr@latin.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr@latin.gmo sr@latin.po +sr.po: 91 translated messages. +rm -f sv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sv.gmo sv.po +sq.po: 52 translated messages, 39 untranslated messages. +rm -f sw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sw.gmo sw.po +rm -f ta.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ta.gmo ta.po +sv.po: 80 translated messages, 11 untranslated messages. +sr@latin.po: 46 translated messages, 45 untranslated messages. +sw.po: 0 translated messages, 91 untranslated messages. +rm -f te.gmo && /usr/bin/msgfmt -c --statistics --verbose -o te.gmo te.po +rm -f tg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tg.gmo tg.po +ta.po: 46 translated messages, 45 untranslated messages. +rm -f th.gmo && /usr/bin/msgfmt -c --statistics --verbose -o th.gmo th.po +rm -f tk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tk.gmo tk.po +tg.po: 0 translated messages, 91 untranslated messages. +te.po: 41 translated messages, 50 untranslated messages. +rm -f tl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tl.gmo tl.po +th.po: 45 translated messages, 46 untranslated messages. +tk.po: 7 translated messages, 84 untranslated messages. +rm -f tr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tr.gmo tr.po +rm -f ts.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ts.gmo ts.po +tl.po: 0 translated messages, 91 untranslated messages. +rm -f tt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tt.gmo tt.po +tr.po: 58 translated messages, 33 untranslated messages. +rm -f ug.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ug.gmo ug.po +ts.po: rm -f uk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uk.gmo uk.po +0 translated messages, 91 untranslated messages. +tt.po:7: warning: header field 'Last-Translator' still has the initial default value +tt.po: 0 translated messages, 91 untranslated messages. +rm -f ur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur.gmo ur.po +ug.po: 6 translated messages, 85 untranslated messages. +rm -f ur_PK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur_PK.gmo ur_PK.po +rm -f uz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uz.gmo uz.po +ur.po: 7 translated messages, 84 untranslated messages. +uk.po: 58 translated messages, 33 untranslated messages. +rm -f vi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o vi.gmo vi.po +uz.po: 26 translated messages, 65 untranslated messages. +ur_PK.po:7: warning: header field 'Last-Translator' still has the initial default value +ur_PK.po: 0 translated messages, 91 untranslated messages. +rm -f xh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o xh.gmo xh.po +rm -f wa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o wa.gmo wa.po +vi.po: 52 translated messages, 39 untranslated messages. +rm -f yi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yi.gmo yi.po +rm -f yo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yo.gmo yo.po +xh.po: 8 translated messages, 83 untranslated messages. +wa.po: 9 translated messages, 82 untranslated messages. +rm -f zh_CN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_CN.gmo zh_CN.po +yi.po:7: warning: header field 'Last-Translator' still has the initial default value +yi.po: 0 translated messages, 91 untranslated messages. +rm -f zh_HK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_HK.gmo zh_HK.po +yo.po: 5 translated messages, 86 untranslated messages. +rm -f zh_TW.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_TW.gmo zh_TW.po +zh_CN.po: 63 translated messages, 28 untranslated messages. +rm -f zu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zu.gmo zu.po +zh_HK.po: 47 translated messages, 44 untranslated messages. +zh_TW.po: 91 translated messages. +zu.po: 3 translated messages, 88 untranslated messages. +make[3]: Leaving directory '/rootdir/po' +touch stamp-po +make[2]: Leaving directory '/rootdir/po' +Making all in libcafekbd +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml + GEN cafekbd-indicator-marshal.h + GEN cafekbd-keyboard-drawing-marshal.h +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... +INFO: Reading ./cafekbd-indicator-marshal.list... + GEN cafekbd-indicator-marshal.c + GEN cafekbd-keyboard-drawing-marshal.c +INFO: Reading ./cafekbd-indicator-marshal.list... +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... +make all-am +make[3]: Entering directory '/rootdir/libcafekbd' + CC libcafekbd_la-cafekbd-desktop-config.lo + CC libcafekbd_la-cafekbd-keyboard-config.lo + CC libcafekbd_la-cafekbd-util.lo + CC libcafekbdui_la-cafekbd-indicator-config.lo + CC libcafekbdui_la-cafekbd-indicator.lo +cafekbd-desktop-config.c: In function 'cafekbd_desktop_config_load_from_gsettings': +cafekbd-desktop-config.c:176:38: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 176 | || config->default_group >= + | ^~ +cafekbd-indicator-config.c: In function 'cafekbd_indicator_config_get_images_file': +cafekbd-indicator-config.c:152:59: warning: comparison of integer expressions of different signedness: 'guint' {aka 'unsigned int'} and 'int' [-Wsign-compare] + 152 | (g_strv_length (kbd_config->layouts_variants) > group)) { + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_extract_layout_name': +cafekbd-indicator.c:293:19: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 293 | if (group < g_strv_length (short_group_names)) { + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_prepare_drawing': +cafekbd-indicator.c:418:31: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 418 | if (group + 1 == + | ^~ +cafekbd-indicator.c: In function 'cafekbd_indicator_update_tooltips': +cafekbd-indicator.c:446:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 446 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-indicator.c:450:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 450 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-indicator.c: In function 'cafekbd_indicator_kbd_cfg_callback': +cafekbd-indicator.c:61:44: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 61 | CafekbdIndicator * gki = (CafekbdIndicator*)cur->data; + | ^~~ +cafekbd-indicator.c:561:9: note: in expansion of macro 'ForAllIndicators' + 561 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-indicator.c:539:55: note: shadowed declaration is here + 539 | cafekbd_indicator_kbd_cfg_callback (CafekbdIndicator *gki G_GNUC_UNUSED) +cafekbd-indicator.c: In function 'cafekbd_indicator_start_listen': +cafekbd-indicator.c:647:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 647 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:650:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 650 | (CdkFilterFunc) + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_stop_listen': +cafekbd-indicator.c:663:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 663 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:667:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 667 | (CdkFilterFunc) cafekbd_indicator_filter_x_evt, NULL); + | ^ + CC libcafekbdui_la-cafekbd-status.lo +cafekbd-status.c: In function 'cafekbd_status_render_cairo': +cafekbd-status.c:214:23: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 214 | if (group + 1 == xkl_engine_get_num_groups (globals.engine)) { + | ^~ +cafekbd-status.c: In function 'cafekbd_status_prepare_drawing': +cafekbd-status.c:376:51: warning: cast between incompatible function types from 'void (*)(void *)' to 'void (*)(guchar *, void *)' {aka 'void (*)(unsigned char *, void *)'} [-Wcast-function-type] + 376 | (GdkPixbufDestroyNotify) + | ^ +cafekbd-status.c: In function 'cafekbd_status_update_tooltips': +cafekbd-status.c:395:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 395 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-status.c:399:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 399 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-status.c: In function 'cafekbd_status_kbd_cfg_callback': +cafekbd-status.c:77:41: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 77 | CafekbdStatus * gki = (CafekbdStatus*)cur->data; + | ^~~ +cafekbd-status.c:508:9: note: in expansion of macro 'ForAllIndicators' + 508 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-status.c:484:49: note: shadowed declaration is here + 484 | cafekbd_status_kbd_cfg_callback (CafekbdStatus *gki G_GNUC_UNUSED) +cafekbd-status.c: In function 'cafekbd_status_start_listen': +cafekbd-status.c:594:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 594 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:597:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 597 | (CdkFilterFunc) cafekbd_status_filter_x_evt, + | ^ +cafekbd-status.c: In function 'cafekbd_status_stop_listen': +cafekbd-status.c:610:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 610 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:614:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 614 | (CdkFilterFunc) cafekbd_status_filter_x_evt, NULL); + | ^ + CC libcafekbdui_la-cafekbd-indicator-marshal.lo +cafekbd-indicator-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ + CC libcafekbdui_la-cafekbd-keyboard-drawing-marshal.lo +cafekbd-keyboard-drawing-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + CC libcafekbdui_la-cafekbd-keyboard-drawing.lo +cafekbd-keyboard-drawing.c: In function 'draw_polygon': +cafekbd-keyboard-drawing.c:322:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 322 | for (i = 0; i < num_points; i++) { + | ^ +cafekbd-keyboard-drawing.c: In function 'process_indicators_state_notify': +cafekbd-keyboard-drawing.c:2131:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'long unsigned int' [-Wsign-compare] + 2131 | for (i = 0; i <= drawing->xkb->indicators->phys_indicators; i++) + | ^~ +cafekbd-keyboard-drawing.c: In function 'cafekbd_keyboard_drawing_get_type': +cafekbd-keyboard-drawing.c:2394:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawingClass *)' {aka 'void (*)(struct _CafekbdKeyboardDrawingClass *)'} to 'void (*)(void *, void *)' [-Wcast-function-type] + 2394 | (GClassInitFunc) cafekbd_keyboard_drawing_class_init, + | ^ +cafekbd-keyboard-drawing.c:2399:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawing *)' {aka 'void (*)(struct _CafekbdKeyboardDrawing *)'} to 'void (*)(GTypeInstance *, void *)' {aka 'void (*)(struct _GTypeInstance *, void *)'} [-Wcast-function-type] + 2399 | (GInstanceInitFunc) cafekbd_keyboard_drawing_init, + | ^ + GEN org.cafe.peripherals-keyboard-xkb.gschema.valid + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:114:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 114 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbd.la + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspectqekde35i/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectqekde35i/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectqekde35i/Cafekbd-1.0.c:239:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 239 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspectqekde35i/Cafekbd-1.0.c:246:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 246 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspectqekde35i/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +5 warnings generated. + GICOMP Cafekbd-1.0.gir +make[3]: Leaving directory '/rootdir/libcafekbd' +make[2]: Leaving directory '/rootdir/libcafekbd' +Making all in test +make[2]: Entering directory '/rootdir/test' + CC cafekbd_indicator_test-cafekbd-indicator-test.o + CC cafekbd_keyboard_drawing_test-cafekbd-keyboard-drawing-test.o + CC cafekbd_status_test-cafekbd-status-test.o +cafekbd-keyboard-drawing-test.c:187:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 187 | g_print ("kbdraw %s\n", VERSION); + | ^~~~~~~ +cafekbd-keyboard-drawing-test.c:194:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 194 | g_printerr ("--groups: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:199:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 199 | g_printerr ("--levels: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:225:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 225 | cafekbd_keyboard_drawing_set_track_modifiers + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:228:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 228 | cafekbd_keyboard_drawing_set_track_config + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:248:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 248 | names.keycodes = keycodes; + | ^~~~~~~~ +cafekbd-keyboard-drawing-test.c:256:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 256 | names.geometry = geometry; + | ^~~~~~~~ +7 warnings generated. + CCLD cafekbd-keyboard-drawing-test + CCLD cafekbd-status-test + CCLD cafekbd-indicator-test +make[2]: Leaving directory '/rootdir/test' +make[2]: Entering directory '/rootdir' +make[2]: Leaving directory '/rootdir' +make[1]: Leaving directory '/rootdir' +scan-build: Analysis run complete. +scan-build: 11 bugs found. +scan-build: Run 'scan-view /rootdir/html-report/2025-02-06-164253-14522-1' to examine bug reports. +Making check in po +make[1]: Entering directory '/rootdir/po' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/po' +Making check in libcafekbd +make[1]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +make check-am +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:113:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 113 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspectnxg3cfas/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectnxg3cfas/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectnxg3cfas/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +3 warnings generated. + GICOMP Cafekbd-1.0.gir +make[2]: Leaving directory '/rootdir/libcafekbd' +make[1]: Leaving directory '/rootdir/libcafekbd' +Making check in test +make[1]: Entering directory '/rootdir/test' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/test' +make[1]: Entering directory '/rootdir' +make[1]: Leaving directory '/rootdir' + Listing... 0% Listing... 0% Listing... 0% adduser/testing,now 3.137 all [installed,automatic] +advaita-icon-theme/unknown,now 3.25.0-1 all [installed,automatic] +apt/testing,now 2.9.26 amd64 [installed,automatic] +aptitude-common/testing,now 0.8.13-6.1 all [installed,automatic] +aptitude/testing,now 0.8.13-6.1 amd64 [installed] +at-spi2-common/testing,now 2.55.0.1-1 all [installed,automatic] +at-spi2-core/testing,now 2.55.0.1-1 amd64 [installed,automatic] +autoconf-archive/testing,now 20220903-3 all [installed] +autoconf/testing,now 2.72-3 all [installed,automatic] +automake/testing,now 1:1.17-3 all [installed,automatic] +autopoint/testing,now 0.23.1-1 all [installed] +autotools-dev/testing,now 20220109.1 all [installed,automatic] +base-files/testing,now 13.6 amd64 [installed,automatic] +base-passwd/testing,now 3.6.6 amd64 [installed,automatic] +bash/testing,now 5.2.37-1 amd64 [installed,automatic] +binfmt-support/testing,now 2.2.2-7 amd64 [installed,automatic] +binutils-common/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils-gold-x86-64-linux-gnu/testing,now 2.44-1 amd64 [installed,automatic] +binutils-gold/testing,now 2.44-1 amd64 [installed,automatic] +binutils-x86-64-linux-gnu/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +bsdutils/testing,now 1:2.40.4-2 amd64 [installed,automatic] +build-essential/testing,now 12.12 amd64 [installed,automatic] +bzip2-doc/testing,now 1.0.8-6 all [installed,automatic] +bzip2/testing,now 1.0.8-6 amd64 [installed,automatic] +ca-certificates/testing,now 20241223 all [installed,automatic] +clang-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools/testing,now 1:19.0-63 amd64 [installed] +clang/testing,now 1:19.0-63 amd64 [installed] +coreutils/testing,now 9.5-1+b1 amd64 [installed,automatic] +cpp-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-14/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cpp/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cppcheck/testing,now 2.16.0-1 amd64 [installed] +ctk-update-icon-cache/unknown,now 3.25.6-1 amd64 [installed,automatic] +dash/testing,now 0.5.12-12 amd64 [installed,automatic] +dbus-bin/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-daemon/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-session-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-system-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-user-session/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus/testing,now 1.16.0-1 amd64 [installed,automatic] +dconf-gsettings-backend/testing,now 0.40.0-5 amd64 [installed,automatic] +dconf-service/testing,now 0.40.0-5 amd64 [installed,automatic] +debconf/testing,now 1.5.89 all [installed,automatic] +debian-archive-keyring/testing,now 2023.4 all [installed,automatic] +debianutils/testing,now 5.21 amd64 [installed,automatic] +diffutils/testing,now 1:3.10-2 amd64 [installed,automatic] +dirmngr/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +dmsetup/testing,now 2:1.02.201-1 amd64 [installed,automatic] +dpkg-dev/testing,now 1.22.14 all [installed,automatic] +dpkg/testing,now 1.22.14 amd64 [installed,automatic] +e2fsprogs/testing,now 1.47.2-1 amd64 [installed,automatic] +expect/testing,now 5.45.4-3+b1 amd64 [installed] +fakeroot/testing,now 1.37-1 amd64 [installed,automatic] +file/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +findutils/testing,now 4.10.0-3 amd64 [installed,automatic] +fontconfig-config/testing,now 2.15.0-2 amd64 [installed,automatic] +fontconfig/testing,now 2.15.0-2 amd64 [installed,automatic] +fonts-dejavu-core/testing,now 2.37-8 all [installed,automatic] +fonts-dejavu-mono/testing,now 2.37-8 all [installed,automatic] +g++-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-14/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +g++/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc-14-base/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gettext-base/testing,now 0.23.1-1 amd64 [installed,automatic] +gettext/testing,now 0.23.1-1 amd64 [installed] +gir1.2-atk-1.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-atspi-2.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-ctk-3.0/unknown,now 3.25.6-1 amd64 [installed] +gir1.2-freedesktop-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-freedesktop/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-gdkpixbuf-2.0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +gir1.2-girepository-2.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-girepository-2.0/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-glib-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-glib-2.0/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-harfbuzz-0.0/testing,now 10.2.0-1 amd64 [installed,automatic] +gir1.2-pango-1.0/testing,now 1.56.1-1 amd64 [installed,automatic] +gir1.2-xkl-1.0/testing,now 5.4-5+b2 amd64 [installed,automatic] +girepository-tools/testing,now 2.82.4-2 amd64 [installed,automatic] +git-man/testing,now 1:2.47.2-0.1 all [installed,automatic] +git/testing,now 1:2.47.2-0.1 amd64 [installed] +gnupg-l10n/testing,now 2.2.46-1 all [installed,automatic] +gnupg-utils/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gnupg/testing,now 2.2.46-1 all [installed,automatic] +gobject-introspection-bin/testing,now 1.82.0-4 amd64 [installed,automatic] +gobject-introspection/testing,now 1.82.0-4 amd64 [installed] +gpg-agent/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg-wks-client/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgconf/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgsm/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgv/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +grep/testing,now 3.11-4 amd64 [installed,automatic] +gsettings-desktop-schemas/testing,now 47.1-1 all [installed,automatic] +gzip/testing,now 1.13-1 amd64 [installed,automatic] +hicolor-icon-theme/testing,now 0.18-2 all [installed,automatic] +hostname/testing,now 3.25 amd64 [installed,automatic] +icu-devtools/testing,now 72.1-6 amd64 [installed,automatic] +init-system-helpers/testing,now 1.68 all [installed,automatic] +krb5-locales/testing,now 1.21.3-4 all [installed,automatic] +less/testing,now 643-1 amd64 [installed,automatic] +lib32gcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +lib32stdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libacl1/testing,now 2.3.2-2+b1 amd64 [installed,automatic] +libalgorithm-diff-perl/testing,now 1.201-1 all [installed,automatic] +libalgorithm-diff-xs-perl/testing,now 0.04-8+b4 amd64 [installed,automatic] +libalgorithm-merge-perl/testing,now 0.08-5 all [installed,automatic] +libapparmor1/testing,now 3.1.7-1+b3 amd64 [installed,automatic] +libapt-pkg6.0t64/testing,now 2.9.26 amd64 [installed,automatic] +libasan8/testing,now 14.2.0-12 amd64 [installed,automatic] +libassuan9/testing,now 3.0.1-2 amd64 [installed,automatic] +libatk-bridge2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk-bridge2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatomic1/testing,now 14.2.0-12 amd64 [installed,automatic] +libatspi2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatspi2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libattr1/testing,now 1:2.5.2-2 amd64 [installed,automatic] +libaudit-common/testing,now 1:4.0.2-2 all [installed,automatic] +libaudit1/testing,now 1:4.0.2-2+b1 amd64 [installed,automatic] +libavahi-client3/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common-data/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common3/testing,now 0.8-16 amd64 [installed,automatic] +libbinutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libblkid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libblkid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libboost-iostreams1.83.0/testing,now 1.83.0-4 amd64 [installed,automatic] +libbrotli-dev/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbrotli1/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbsd0/testing,now 0.12.2-2 amd64 [installed,automatic] +libbz2-1.0/testing,now 1.0.8-6 amd64 [installed,automatic] +libbz2-dev/testing,now 1.0.8-6 amd64 [installed,automatic] +libc-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc-dev-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc6-dev/testing,now 2.40-6 amd64 [installed,automatic] +libc6-i386/testing,now 2.40-6 amd64 [installed,automatic] +libc6/testing,now 2.40-6 amd64 [installed,automatic] +libcairo-gobject2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo-script-interpreter2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2-dev/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcap-dev/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcap-ng0/testing,now 0.8.5-4 amd64 [installed,automatic] +libcap2/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcbor0.10/testing,now 0.10.2-2 amd64 [installed,automatic] +libcc1-0/testing,now 14.2.0-12 amd64 [installed,automatic] +libclang-common-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-cpp19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-rt-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang1-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libcolord2/testing,now 1.4.7-1+b2 amd64 [installed,automatic] +libcom-err2/testing,now 1.47.2-1 amd64 [installed,automatic] +libcrypt-dev/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcrypt1/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcryptsetup12/testing,now 2:2.7.5-1 amd64 [installed,automatic] +libctf-nobfd0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctf0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctk-3-0/unknown,now 3.25.6-1 amd64 [installed] +libctk-3-bin/unknown,now 3.25.6-1 amd64 [installed,automatic] +libctk-3-common/unknown,now 3.25.6-1 all [installed] +libctk-3-dev/unknown,now 3.25.6-1 amd64 [installed] +libcups2t64/testing,now 2.4.10-2+b1 amd64 [installed,automatic] +libcurl3t64-gnutls/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcurl4t64/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcwidget4/testing,now 0.5.18-6+b2 amd64 [installed,automatic] +libdatrie-dev/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdatrie1/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdav1d7/testing,now 1.5.1-1 amd64 [installed,automatic] +libdb5.3t64/testing,now 5.3.28+dfsg2-9 amd64 [installed,automatic] +libdbus-1-3/testing,now 1.16.0-1 amd64 [installed,automatic] +libdbus-1-dev/testing,now 1.16.0-1 amd64 [installed,automatic] +libdconf1/testing,now 0.40.0-5 amd64 [installed,automatic] +libdebconfclient0/testing,now 0.277 amd64 [installed,automatic] +libdeflate-dev/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdeflate0/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdevmapper1.02.1/testing,now 2:1.02.201-1 amd64 [installed,automatic] +libdpkg-perl/testing,now 1.22.14 all [installed,automatic] +libdrm-amdgpu1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-common/testing,now 2.4.123-1 all [installed,automatic] +libdrm-intel1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-radeon1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm2/testing,now 2.4.123-1 amd64 [installed,automatic] +libedit2/testing,now 3.1-20250104-1 amd64 [installed,automatic] +libegl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libegl-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1-mesa-dev/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libelf1t64/testing,now 0.192-4 amd64 [installed,automatic] +libepoxy-dev/testing,now 1.5.10-2 amd64 [installed,automatic] +libepoxy0/testing,now 1.5.10-2 amd64 [installed,automatic] +liberror-perl/testing,now 0.17029-2 all [installed,automatic] +libexpat1-dev/testing,now 2.6.4-1 amd64 [installed,automatic] +libexpat1/testing,now 2.6.4-1 amd64 [installed,automatic] +libext2fs2t64/testing,now 1.47.2-1 amd64 [installed,automatic] +libfakeroot/testing,now 1.37-1 amd64 [installed,automatic] +libffi-dev/testing,now 3.4.6-1 amd64 [installed,automatic] +libffi8/testing,now 3.4.6-1 amd64 [installed,automatic] +libfido2-1/testing,now 1.15.0-1+b1 amd64 [installed,automatic] +libfile-fcntllock-perl/testing,now 0.22-4+b4 amd64 [installed,automatic] +libfontconfig-dev/testing,now 2.15.0-2 amd64 [installed,automatic] +libfontconfig1/testing,now 2.15.0-2 amd64 [installed,automatic] +libfreetype-dev/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfreetype6/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfribidi-dev/testing,now 1.0.16-1 amd64 [installed,automatic] +libfribidi0/testing,now 1.0.16-1 amd64 [installed,automatic] +libgbm1/testing,now 24.2.8-1 amd64 [installed,automatic] +libgc1/testing,now 1:8.2.8-1 amd64 [installed,automatic] +libgcc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcrypt20/testing,now 1.11.0-7 amd64 [installed,automatic] +libgdbm-compat4t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdbm6t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-dev/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-bin/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-common/testing,now 2.42.12+dfsg-2 all [installed,automatic] +libgio-2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libgio-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository-1.0-1/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-1.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-2.0-0/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository1.0-dev/testing,now 1.82.0-4 amd64 [installed] +libgl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgl1-mesa-dri/testing,now 24.2.8-1 amd64 [installed,automatic] +libgl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglapi-mesa/testing,now 24.2.8-1 amd64 [installed,automatic] +libgles-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles2/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglib2.0-0t64/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-data/testing,now 2.82.4-2 all [installed,automatic] +libglib2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-dev/testing,now 2.82.4-2 amd64 [installed] +libglvnd-core-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libglx0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgmp10/testing,now 2:6.3.0+dfsg-3 amd64 [installed,automatic] +libgnutls30t64/testing,now 3.8.8-2 amd64 [installed,automatic] +libgomp1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgpg-error-l10n/testing,now 1.51-3 all [installed,automatic] +libgpg-error0/testing,now 1.51-3 amd64 [installed,automatic] +libgpm2/testing,now 1.20.7-11+b2 amd64 [installed,automatic] +libgprofng0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libgraphite2-3/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgraphite2-dev/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgssapi-krb5-2/testing,now 1.21.3-4 amd64 [installed,automatic] +libharfbuzz-cairo0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-dev/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-gobject0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-icu0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-subset0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz0b/testing,now 10.2.0-1 amd64 [installed,automatic] +libhogweed6t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libhwasan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libice-dev/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libice6/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libicu-dev/testing,now 72.1-6 amd64 [installed,automatic] +libicu72/testing,now 72.1-6 amd64 [installed,automatic] +libidn2-0/testing,now 2.3.7-2+b1 amd64 [installed,automatic] +libisl23/testing,now 0.27-1 amd64 [installed,automatic] +libitm1/testing,now 14.2.0-12 amd64 [installed,automatic] +libjansson4/testing,now 2.14-2+b3 amd64 [installed,automatic] +libjbig-dev/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjbig0/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjpeg-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjson-c5/testing,now 0.18+ds-1 amd64 [installed,automatic] +libk5crypto3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkeyutils1/testing,now 1.6.3-4 amd64 [installed,automatic] +libkmod2/testing,now 33+20240816-2 amd64 [installed,automatic] +libkrb5-3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkrb5support0/testing,now 1.21.3-4 amd64 [installed,automatic] +libksba8/testing,now 1.6.7-2+b1 amd64 [installed,automatic] +liblcms2-2/testing,now 2.16-2 amd64 [installed,automatic] +libldap-common/testing,now 2.6.9+dfsg-1 all [installed,automatic] +libldap2/testing,now 2.6.9+dfsg-1 amd64 [installed,automatic] +liblerc-dev/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +liblerc4/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +libllvm19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +liblocale-gettext-perl/testing,now 1.07-7+b1 amd64 [installed,automatic] +liblsan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libltdl-dev/testing,now 2.5.4-3 amd64 [installed,automatic] +libltdl7/testing,now 2.5.4-3 amd64 [installed,automatic] +liblz4-1/testing,now 1.10.0-3 amd64 [installed,automatic] +liblzma-dev/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzma5/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzo2-2/testing,now 2.10-3+b1 amd64 [installed,automatic] +libmagic-mgc/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmagic1t64/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmd0/testing,now 1.1.0-2+b1 amd64 [installed,automatic] +libmount-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libmount1/testing,now 2.40.4-2 amd64 [installed,automatic] +libmpc3/testing,now 1.3.1-1+b3 amd64 [installed,automatic] +libmpfr6/testing,now 4.2.1-1+b2 amd64 [installed,automatic] +libncurses-dev/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncurses6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncursesw6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libnettle8t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libnghttp2-14/testing,now 1.64.0-1 amd64 [installed,automatic] +libnghttp3-9/testing,now 1.6.0-2 amd64 [installed,automatic] +libngtcp2-16/testing,now 1.9.1-1 amd64 [installed,automatic] +libngtcp2-crypto-gnutls8/testing,now 1.9.1-1 amd64 [installed,automatic] +libnpth0t64/testing,now 1.8-2 amd64 [installed,automatic] +libnss-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libobjc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libobjc4/testing,now 14.2.0-12 amd64 [installed,automatic] +libopengl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libopengl0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libp11-kit0/testing,now 0.25.5-3 amd64 [installed,automatic] +libpam-modules-bin/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-modules/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-runtime/testing,now 1.7.0-2 all [installed,automatic] +libpam-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libpam0g/testing,now 1.7.0-2 amd64 [installed,automatic] +libpango-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpango1.0-dev/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangocairo-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoft2-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoxft-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpciaccess0/testing,now 0.17-3+b3 amd64 [installed,automatic] +libpcre2-16-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-32-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-8-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-dev/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-posix3/testing,now 10.44-5 amd64 [installed,automatic] +libperl5.40/testing,now 5.40.0-8 amd64 [installed,automatic] +libpfm4/testing,now 4.13.0+git83-g91970fe-1 amd64 [installed,automatic] +libpipeline1/testing,now 1.5.8-1 amd64 [installed,automatic] +libpixman-1-0/testing,now 0.44.0-3 amd64 [installed,automatic] +libpixman-1-dev/testing,now 0.44.0-3 amd64 [installed,automatic] +libpkgconf3/testing,now 1.8.1-4 amd64 [installed,automatic] +libpng-dev/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng-tools/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng16-16t64/testing,now 1.6.44-3 amd64 [installed,automatic] +libproc2-0/testing,now 2:4.0.4-7 amd64 [installed,automatic] +libpsl5t64/testing,now 0.21.2-1.1+b1 amd64 [installed,automatic] +libpython3-stdlib/testing,now 3.13.1-2 amd64 [installed,automatic] +libpython3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libpython3.13-stdlib/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libquadmath0/testing,now 14.2.0-12 amd64 [installed,automatic] +libreadline8t64/testing,now 8.2-6 amd64 [installed,automatic] +librsvg2-2/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librsvg2-common/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librtmp1/testing,now 2.4+20151223.gitfa8646d.1-2+b5 amd64 [installed,automatic] +libsasl2-2/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules-db/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libseccomp2/testing,now 2.5.5-2 amd64 [installed,automatic] +libselinux1-dev/testing,now 3.7-3.1 amd64 [installed,automatic] +libselinux1/testing,now 3.7-3.1 amd64 [installed,automatic] +libsemanage-common/testing,now 3.7-2.1 all [installed,automatic] +libsemanage2/testing,now 3.7-2.1 amd64 [installed,automatic] +libsensors-config/testing,now 1:3.6.0-10 all [installed,automatic] +libsensors5/testing,now 1:3.6.0-10+b1 amd64 [installed,automatic] +libsepol-dev/testing,now 3.7-1 amd64 [installed,automatic] +libsepol2/testing,now 3.7-1 amd64 [installed,automatic] +libsframe1/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libsharpyuv-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsharpyuv0/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsigc++-2.0-0v5/testing,now 2.12.1-3 amd64 [installed,automatic] +libsm-dev/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsm6/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsmartcols1/testing,now 2.40.4-2 amd64 [installed,automatic] +libsqlite3-0/testing,now 3.46.1-1 amd64 [installed,automatic] +libss2/testing,now 1.47.2-1 amd64 [installed,automatic] +libssh2-1t64/testing,now 1.11.1-1 amd64 [installed,automatic] +libssl3t64/testing,now 3.4.0-2 amd64 [installed,automatic] +libstdc++-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libstdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libsysprof-capture-4-dev/testing,now 47.2-1 amd64 [installed,automatic] +libsystemd-dev/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd-shared/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd0/testing,now 257.2-3 amd64 [installed,automatic] +libtasn1-6/testing,now 4.19.0-3+b3 amd64 [installed,automatic] +libtcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +libthai-data/testing,now 0.1.29-2 all [installed,automatic] +libthai-dev/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libthai0/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libtiff-dev/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiff6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiffxx6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtinfo6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libtinyxml2-10/testing,now 10.0.0+dfsg-2+b2 amd64 [installed,automatic] +libtool/testing,now 2.5.4-3 all [installed] +libtsan2/testing,now 14.2.0-12 amd64 [installed,automatic] +libubsan1/testing,now 14.2.0-12 amd64 [installed,automatic] +libudev1/testing,now 257.2-3 amd64 [installed,automatic] +libunistring5/testing,now 1.3-1 amd64 [installed,automatic] +libuuid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libvulkan1/testing,now 1.4.304.0-1 amd64 [installed,automatic] +libwayland-bin/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-client0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-cursor0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-dev/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-egl1/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-server0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwebp-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebp7/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdecoder3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdemux2/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpmux3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libx11-6/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-data/testing,now 2:1.8.10-2 all [installed,automatic] +libx11-dev/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-xcb1/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libxapian30/testing,now 1.4.25-2 amd64 [installed,automatic] +libxau-dev/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxau6/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxaw7/testing,now 2:1.0.16-1 amd64 [installed,automatic] +libxcb-dri2-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-dri3-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-glx0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-present0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-randr0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-sync1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-xfixes0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcomposite-dev/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcomposite1/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcursor-dev/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxcursor1/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxdamage-dev/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdamage1/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdmcp-dev/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxdmcp6/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxext-dev/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxext6/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxfixes-dev/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxfixes3/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxft-dev/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxft2/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxi-dev/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxi6/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxinerama-dev/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxinerama1/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxkbcommon-dev/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbcommon0/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbfile1/testing,now 1:1.1.0-1+b4 amd64 [installed,automatic] +libxklavier-dev/testing,now 5.4-5+b2 amd64 [installed] +libxklavier16/testing,now 5.4-5+b2 amd64 [installed,automatic] +libxml2-dev/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxml2-utils/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed] +libxml2/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxmu6/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxmuu1/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxpm4/testing,now 1:3.5.17-1+b3 amd64 [installed,automatic] +libxrandr-dev/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrandr2/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrender-dev/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxrender1/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxshmfence1/testing,now 1.3-1+b3 amd64 [installed,automatic] +libxt6t64/testing,now 1:1.2.1-1.2+b2 amd64 [installed,automatic] +libxtst-dev/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxtst6/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxxf86vm1/testing,now 1:1.1.4-1+b4 amd64 [installed,automatic] +libxxhash0/testing,now 0.8.2-2+b2 amd64 [installed,automatic] +libyaml-0-2/testing,now 0.2.5-2 amd64 [installed,automatic] +libz3-4/testing,now 4.13.3-1 amd64 [installed,automatic] +libz3-dev/testing,now 4.13.3-1 amd64 [installed,automatic] +libzstd-dev/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +libzstd1/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +linux-libc-dev/testing,now 6.12.11-1 all [installed,automatic] +linux-sysctl-defaults/testing,now 4.11 all [installed,automatic] +llvm-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-linker-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-runtime/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +login.defs/testing,now 1:4.16.0-7 all [installed,automatic] +login/testing,now 1:4.16.0-2+really2.40.4-2 amd64 [installed,automatic] +logsave/testing,now 1.47.2-1 amd64 [installed,automatic] +m4/testing,now 1.4.19-5 amd64 [installed,automatic] +make/testing,now 4.4.1-1 amd64 [installed] +manpages-dev/testing,now 6.9.1-1 all [installed,automatic] +manpages/testing,now 6.9.1-1 all [installed,automatic] +mawk/testing,now 1.3.4.20240905-1 amd64 [installed,automatic] +media-types/testing,now 10.1.0 all [installed,automatic] +mesa-libgallium/testing,now 24.2.8-1 amd64 [installed,automatic] +mesa-vulkan-drivers/testing,now 24.2.8-1 amd64 [installed,automatic] +mount/testing,now 2.40.4-2 amd64 [installed,automatic] +native-architecture/testing,now 0.2.5 all [installed,automatic] +ncurses-base/testing,now 6.5-2 all [installed,automatic] +ncurses-bin/testing,now 6.5-2+b1 amd64 [installed,automatic] +netbase/testing,now 6.4 all [installed,automatic] +openssh-client/testing,now 1:9.9p1-3 amd64 [installed,automatic] +openssl-provider-legacy/testing,now 3.4.0-2 amd64 [installed,automatic] +openssl/testing,now 3.4.0-2 amd64 [installed,automatic] +pango1.0-tools/testing,now 1.56.1-1 amd64 [installed,automatic] +passwd/testing,now 1:4.16.0-7 amd64 [installed,automatic] +patch/testing,now 2.7.6-7 amd64 [installed,automatic] +perl-base/testing,now 5.40.0-8 amd64 [installed,automatic] +perl-modules-5.40/testing,now 5.40.0-8 all [installed,automatic] +perl/testing,now 5.40.0-8 amd64 [installed,automatic] +pinentry-curses/testing,now 1.3.1-2 amd64 [installed,automatic] +pkgconf-bin/testing,now 1.8.1-4 amd64 [installed,automatic] +pkgconf/testing,now 1.8.1-4 amd64 [installed,automatic] +procps/testing,now 2:4.0.4-7 amd64 [installed,automatic] +psmisc/testing,now 23.7-1 amd64 [installed,automatic] +publicsuffix/testing,now 20250108.1153-0.1 all [installed,automatic] +python3-autocommand/testing,now 2.2.2-3 all [installed,automatic] +python3-inflect/testing,now 7.3.1-2 all [installed,automatic] +python3-jaraco.context/testing,now 6.0.0-1 all [installed,automatic] +python3-jaraco.functools/testing,now 4.1.0-1 all [installed,automatic] +python3-jaraco.text/testing,now 4.0.0-1 all [installed,automatic] +python3-mako/testing,now 1.3.8-2 all [installed,automatic] +python3-markdown/testing,now 3.7-2 all [installed,automatic] +python3-markupsafe/testing,now 2.1.5-1+b2 amd64 [installed,automatic] +python3-minimal/testing,now 3.13.1-2 amd64 [installed,automatic] +python3-more-itertools/testing,now 10.6.0-1 all [installed,automatic] +python3-packaging/testing,now 24.2-1 all [installed,automatic] +python3-pkg-resources/testing,now 75.6.0-1 all [installed,automatic] +python3-pygments/testing,now 2.18.0+dfsg-2 all [installed,automatic] +python3-setuptools/testing,now 75.6.0-1 all [installed,automatic] +python3-typeguard/testing,now 4.4.1-1 all [installed,automatic] +python3-typing-extensions/testing,now 4.12.2-2 all [installed,automatic] +python3-yaml/testing,now 6.0.2-1+b1 amd64 [installed,automatic] +python3-zipp/testing,now 3.21.0-1 all [installed,automatic] +python3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3.13/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3/testing,now 3.13.1-2 amd64 [installed,automatic] +readline-common/testing,now 8.2-6 all [installed,automatic] +rpcsvc-proto/testing,now 1.4.3-1 amd64 [installed,automatic] +sed/testing,now 4.9-2 amd64 [installed,automatic] +sensible-utils/testing,now 0.0.24 all [installed,automatic] +sgml-base/testing,now 1.31 all [installed,automatic] +shared-mime-info/testing,now 2.4-5+b2 amd64 [installed,automatic] +sqv/testing,now 1.2.1-5 amd64 [installed,automatic] +systemd-cryptsetup/testing,now 257.2-3 amd64 [installed,automatic] +systemd-sysv/testing,now 257.2-3 amd64 [installed,automatic] +systemd-timesyncd/testing,now 257.2-3 amd64 [installed,automatic] +systemd/testing,now 257.2-3 amd64 [installed,automatic] +sysvinit-utils/testing,now 3.13-1 amd64 [installed,automatic] +tar/testing,now 1.35+dfsg-3.1 amd64 [installed,automatic] +tcl-expect/testing,now 5.45.4-3+b1 amd64 [installed,automatic] +tcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +tzdata/testing,now 2024b-6 all [installed,automatic] +util-linux/testing,now 2.40.4-2 amd64 [installed,automatic] +uuid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +wayland-protocols/testing,now 1.39-1 all [installed,automatic] +wget/testing,now 1.24.5-2+b1 amd64 [installed] +x11-common/testing,now 1:7.7+24 all [installed,automatic] +x11-xkb-utils/testing,now 7.7+9 amd64 [installed,automatic] +x11proto-dev/testing,now 2024.1-1 all [installed,automatic] +xauth/testing,now 1:1.1.2-1.1 amd64 [installed,automatic] +xdg-user-dirs/testing,now 0.18-2 amd64 [installed,automatic] +xkb-data/testing,now 2.42-1 all [installed,automatic] +xml-core/testing,now 0.19 all [installed,automatic] +xorg-sgml-doctools/testing,now 1:1.11-1.1 all [installed,automatic] +xtrans-dev/testing,now 1.4.0-1 all [installed,automatic] +xz-utils/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +zlib1g-dev/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +zlib1g/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +Errors detected in the build 0 +Warnings detected in the logs 96 +cppcheck defects detected in the logs 28 +TOTAL warnings detected in the logs 124 diff --git a/2025-02-06-164253-14522-1@28c310f42d33_devel/report-37cb39.html b/2025-02-06-164253-14522-1@28c310f42d33_devel/report-37cb39.html new file mode 100644 index 0000000..6bb8eb0 --- /dev/null +++ b/2025-02-06-164253-14522-1@28c310f42d33_devel/report-37cb39.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 248, column 21
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-164253-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"2.0.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
This statement is never executed
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-164253-14522-1@28c310f42d33_devel/report-523ef4.html b/2025-02-06-164253-14522-1@28c310f42d33_devel/report-523ef4.html new file mode 100644 index 0000000..24d2f80 --- /dev/null +++ b/2025-02-06-164253-14522-1@28c310f42d33_devel/report-523ef4.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 199, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-164253-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"2.0.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
This statement is never executed
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-164253-14522-1@28c310f42d33_devel/report-5ce420.html b/2025-02-06-164253-14522-1@28c310f42d33_devel/report-5ce420.html new file mode 100644 index 0000000..72c67fe --- /dev/null +++ b/2025-02-06-164253-14522-1@28c310f42d33_devel/report-5ce420.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 194, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-164253-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"2.0.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
This statement is never executed
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-164253-14522-1@28c310f42d33_devel/report-5d4bc8.html b/2025-02-06-164253-14522-1@28c310f42d33_devel/report-5d4bc8.html new file mode 100644 index 0000000..4b333c1 --- /dev/null +++ b/2025-02-06-164253-14522-1@28c310f42d33_devel/report-5d4bc8.html @@ -0,0 +1,1609 @@ + + + +/rootdir/libcafekbd/tmp-introspectqekde35i/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspectqekde35i/Cafekbd-1.0.c
Warning:line 89, column 13
File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/cairo -I /usr/include/libpng16 -I /usr/include/freetype2 -I /usr/include/pixman-1 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/pango-1.0 -I /usr/include/harfbuzz -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/ctk-3.0 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/libxml2 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-164253-14522-1 -x c /rootdir/libcafekbd/tmp-introspectqekde35i/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
14
Loop condition is true. Entering loop body
28
Loop condition is true. Entering loop body
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
15
Assuming this stream operation fails
29
File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior
90 if (ret
15.1
'ret' is equal to 0
== 0)
16
Taking true branch
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out
16.1
'len_out' is not equal to NULL
!= NULL((void*)0))
17
Taking true branch
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
6
Assuming 'args' is not equal to NULL
7
Taking false branch
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
8
Assuming 'self' is non-null
9
Taking false branch
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input
9.1
'input' is not equal to NULL
== NULL((void*)0))
10
Taking false branch
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output
10.1
'output' is not equal to NULL
== NULL((void*)0))
11
Taking false branch
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
12
Loop condition is true. Entering loop body
26
Loop condition is true. Entering loop body
702 {
703 gsize len;
704 char *line = read_line (input, &len);
13
Calling 'read_line'
18
Returning from 'read_line'
27
Calling 'read_line'
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
19
Assuming 'line' is not equal to NULL
20
Assuming the condition is false
21
Taking false branch
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
22
Assuming the condition is false
23
Taking false branch
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
24
Assuming the condition is false
25
Taking false branch
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
742
743 if (quark == 0)
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
1
Assuming 'argc' is equal to 2
2
'?' condition is false
3
Assuming the condition is false
4
Taking false branch
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
5
Calling 'dump_irepository'
811 {
812 g_printerr ("%s\n", error->message);
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-164253-14522-1@28c310f42d33_devel/report-891289.html b/2025-02-06-164253-14522-1@28c310f42d33_devel/report-891289.html new file mode 100644 index 0000000..83afc92 --- /dev/null +++ b/2025-02-06-164253-14522-1@28c310f42d33_devel/report-891289.html @@ -0,0 +1,1603 @@ + + + +/rootdir/libcafekbd/tmp-introspectqekde35i/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspectqekde35i/Cafekbd-1.0.c
Warning:line 812, column 27
Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error')
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/cairo -I /usr/include/libpng16 -I /usr/include/freetype2 -I /usr/include/pixman-1 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/pango-1.0 -I /usr/include/harfbuzz -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/ctk-3.0 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/libxml2 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-164253-14522-1 -x c /rootdir/libcafekbd/tmp-introspectqekde35i/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
90 if (ret == 0)
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out != NULL((void*)0))
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
21
Assuming the condition is false
22
Taking false branch
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
23
Returning without writing to '*error'
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
7
Assuming 'args' is not equal to NULL
8
Taking false branch
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
9
Assuming 'self' is non-null
10
Taking false branch
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input
10.1
'input' is not equal to NULL
== NULL((void*)0))
11
Taking false branch
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output
11.1
'output' is not equal to NULL
== NULL((void*)0))
12
Taking false branch
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
13
Loop condition is true. Entering loop body
702 {
703 gsize len;
704 char *line = read_line (input, &len);
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
14
Assuming 'line' is not equal to NULL
15
Assuming the condition is false
16
Taking false branch
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
17
Assuming the condition is false
18
Taking false branch
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
19
Taking true branch
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
20
Calling 'invoke_error_quark'
24
Returning from 'invoke_error_quark'
742
743 if (quark == 0)
25
Assuming 'quark' is equal to 0
26
Taking true branch
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
27
Returning without writing to '*error'
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
1
'error' initialized to a null pointer value
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
2
Assuming 'argc' is equal to 2
3
'?' condition is false
4
Assuming the condition is false
5
Taking false branch
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
6
Calling 'dump_irepository'
28
Returning from 'dump_irepository'
29
Taking true branch
811 {
812 g_printerr ("%s\n", error->message);
30
Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error')
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-164253-14522-1@28c310f42d33_devel/report-9361af.html b/2025-02-06-164253-14522-1@28c310f42d33_devel/report-9361af.html new file mode 100644 index 0000000..959e13f --- /dev/null +++ b/2025-02-06-164253-14522-1@28c310f42d33_devel/report-9361af.html @@ -0,0 +1,1609 @@ + + + +/rootdir/libcafekbd/tmp-introspectqekde35i/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspectqekde35i/Cafekbd-1.0.c
Warning:line 89, column 13
Read function called when stream is in EOF state. Function has no effect
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/cairo -I /usr/include/libpng16 -I /usr/include/freetype2 -I /usr/include/pixman-1 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/pango-1.0 -I /usr/include/harfbuzz -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/ctk-3.0 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/libxml2 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-164253-14522-1 -x c /rootdir/libcafekbd/tmp-introspectqekde35i/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
14
Loop condition is true. Entering loop body
28
Loop condition is true. Entering loop body
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
15
Assuming stream reaches end-of-file here
29
Read function called when stream is in EOF state. Function has no effect
90 if (ret
15.1
'ret' is equal to 0
== 0)
16
Taking true branch
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out
16.1
'len_out' is not equal to NULL
!= NULL((void*)0))
17
Taking true branch
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
6
Assuming 'args' is not equal to NULL
7
Taking false branch
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
8
Assuming 'self' is non-null
9
Taking false branch
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input
9.1
'input' is not equal to NULL
== NULL((void*)0))
10
Taking false branch
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output
10.1
'output' is not equal to NULL
== NULL((void*)0))
11
Taking false branch
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
12
Loop condition is true. Entering loop body
26
Loop condition is true. Entering loop body
702 {
703 gsize len;
704 char *line = read_line (input, &len);
13
Calling 'read_line'
18
Returning from 'read_line'
27
Calling 'read_line'
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
19
Assuming 'line' is not equal to NULL
20
Assuming the condition is false
21
Taking false branch
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
22
Assuming the condition is false
23
Taking false branch
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
24
Assuming the condition is false
25
Taking false branch
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
742
743 if (quark == 0)
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
1
Assuming 'argc' is equal to 2
2
'?' condition is false
3
Assuming the condition is false
4
Taking false branch
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
5
Calling 'dump_irepository'
811 {
812 g_printerr ("%s\n", error->message);
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-164253-14522-1@28c310f42d33_devel/report-b4532a.html b/2025-02-06-164253-14522-1@28c310f42d33_devel/report-b4532a.html new file mode 100644 index 0000000..29026a6 --- /dev/null +++ b/2025-02-06-164253-14522-1@28c310f42d33_devel/report-b4532a.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 228, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-164253-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"2.0.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
This statement is never executed
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-164253-14522-1@28c310f42d33_devel/report-c098bd.html b/2025-02-06-164253-14522-1@28c310f42d33_devel/report-c098bd.html new file mode 100644 index 0000000..f85f8dc --- /dev/null +++ b/2025-02-06-164253-14522-1@28c310f42d33_devel/report-c098bd.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 187, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-164253-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"2.0.0");
This statement is never executed
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-164253-14522-1@28c310f42d33_devel/report-e0f2de.html b/2025-02-06-164253-14522-1@28c310f42d33_devel/report-e0f2de.html new file mode 100644 index 0000000..a48fe29 --- /dev/null +++ b/2025-02-06-164253-14522-1@28c310f42d33_devel/report-e0f2de.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 225, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-164253-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"2.0.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
This statement is never executed
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-164253-14522-1@28c310f42d33_devel/report-fb6164.html b/2025-02-06-164253-14522-1@28c310f42d33_devel/report-fb6164.html new file mode 100644 index 0000000..4d1cf28 --- /dev/null +++ b/2025-02-06-164253-14522-1@28c310f42d33_devel/report-fb6164.html @@ -0,0 +1,1504 @@ + + + +/rootdir/libcafekbd/tmp-introspectqekde35i/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspectqekde35i/Cafekbd-1.0.c
Warning:line 239, column 11
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/cairo -I /usr/include/libpng16 -I /usr/include/freetype2 -I /usr/include/pixman-1 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/pango-1.0 -I /usr/include/harfbuzz -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/ctk-3.0 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/libxml2 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-164253-14522-1 -x c /rootdir/libcafekbd/tmp-introspectqekde35i/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
90 if (ret == 0)
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out != NULL((void*)0))
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
This statement is never executed
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input == NULL((void*)0))
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output == NULL((void*)0))
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
702 {
703 gsize len;
704 char *line = read_line (input, &len);
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
742
743 if (quark == 0)
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
811 {
812 g_printerr ("%s\n", error->message);
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-164253-14522-1@28c310f42d33_devel/report-ff92e7.html b/2025-02-06-164253-14522-1@28c310f42d33_devel/report-ff92e7.html new file mode 100644 index 0000000..349a4ea --- /dev/null +++ b/2025-02-06-164253-14522-1@28c310f42d33_devel/report-ff92e7.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 256, column 21
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-164253-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"2.0.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
This statement is never executed
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-164253-14522-1@28c310f42d33_devel/scanview.css b/2025-02-06-164253-14522-1@28c310f42d33_devel/scanview.css new file mode 100644 index 0000000..cf8a5a6 --- /dev/null +++ b/2025-02-06-164253-14522-1@28c310f42d33_devel/scanview.css @@ -0,0 +1,62 @@ +body { color:#000000; background-color:#ffffff } +body { font-family: Helvetica, sans-serif; font-size:9pt } +h1 { font-size: 14pt; } +h2 { font-size: 12pt; } +table { font-size:9pt } +table { border-spacing: 0px; border: 1px solid black } +th, table thead { + background-color:#eee; color:#666666; + font-weight: bold; cursor: default; + text-align:center; + font-weight: bold; font-family: Verdana; + white-space:nowrap; +} +.W { font-size:0px } +th, td { padding:5px; padding-left:8px; text-align:left } +td.SUMM_DESC { padding-left:12px } +td.DESC { white-space:pre } +td.Q { text-align:right } +td { text-align:left } +tbody.scrollContent { overflow:auto } + +table.form_group { + background-color: #ccc; + border: 1px solid #333; + padding: 2px; +} + +table.form_inner_group { + background-color: #ccc; + border: 1px solid #333; + padding: 0px; +} + +table.form { + background-color: #999; + border: 1px solid #333; + padding: 2px; +} + +td.form_label { + text-align: right; + vertical-align: top; +} +/* For one line entires */ +td.form_clabel { + text-align: right; + vertical-align: center; +} +td.form_value { + text-align: left; + vertical-align: top; +} +td.form_submit { + text-align: right; + vertical-align: top; +} + +h1.SubmitFail { + color: #f00; +} +h1.SubmitOk { +} diff --git a/2025-02-06-164253-14522-1@28c310f42d33_devel/sorttable.js b/2025-02-06-164253-14522-1@28c310f42d33_devel/sorttable.js new file mode 100644 index 0000000..e608daa --- /dev/null +++ b/2025-02-06-164253-14522-1@28c310f42d33_devel/sorttable.js @@ -0,0 +1,512 @@ +/* + SortTable + version 2 + 7th April 2007 + Stuart Langridge, http://www.kryogenix.org/code/browser/sorttable/ + + Instructions: + Download this file + Add to your HTML + Add class="sortable" to any table you'd like to make sortable + Click on the headers to sort + + Thanks to many, many people for contributions and suggestions. + Licenced as X11: http://www.kryogenix.org/code/browser/licence.html + This basically means: do what you want with it. +*/ + + +var stIsIE = /*@cc_on!@*/false; + +sorttable = { + init: function() { + // quit if this function has already been called + if (arguments.callee.done) return; + // flag this function so we don't do the same thing twice + arguments.callee.done = true; + // kill the timer + if (_timer) clearInterval(_timer); + + if (!document.createElement || !document.getElementsByTagName) return; + + sorttable.DATE_RE = /^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/; + + forEach(document.getElementsByTagName('table'), function(table) { + if (table.className.search(/\bsortable\b/) != -1) { + sorttable.makeSortable(table); + } + }); + + }, + + makeSortable: function(table) { + if (table.getElementsByTagName('thead').length == 0) { + // table doesn't have a tHead. Since it should have, create one and + // put the first table row in it. + the = document.createElement('thead'); + the.appendChild(table.rows[0]); + table.insertBefore(the,table.firstChild); + } + // Safari doesn't support table.tHead, sigh + if (table.tHead == null) table.tHead = table.getElementsByTagName('thead')[0]; + + if (table.tHead.rows.length != 1) return; // can't cope with two header rows + + // Sorttable v1 put rows with a class of "sortbottom" at the bottom (as + // "total" rows, for example). This is B&R, since what you're supposed + // to do is put them in a tfoot. So, if there are sortbottom rows, + // for backward compatibility, move them to tfoot (creating it if needed). + sortbottomrows = []; + for (var i=0; i5' : ' ▴'; + this.appendChild(sortrevind); + return; + } + if (this.className.search(/\bsorttable_sorted_reverse\b/) != -1) { + // if we're already sorted by this column in reverse, just + // re-reverse the table, which is quicker + sorttable.reverse(this.sorttable_tbody); + this.className = this.className.replace('sorttable_sorted_reverse', + 'sorttable_sorted'); + this.removeChild(document.getElementById('sorttable_sortrevind')); + sortfwdind = document.createElement('span'); + sortfwdind.id = "sorttable_sortfwdind"; + sortfwdind.innerHTML = stIsIE ? ' 6' : ' ▾'; + this.appendChild(sortfwdind); + return; + } + + // remove sorttable_sorted classes + theadrow = this.parentNode; + forEach(theadrow.childNodes, function(cell) { + if (cell.nodeType == 1) { // an element + cell.className = cell.className.replace('sorttable_sorted_reverse',''); + cell.className = cell.className.replace('sorttable_sorted',''); + } + }); + sortfwdind = document.getElementById('sorttable_sortfwdind'); + if (sortfwdind) { sortfwdind.parentNode.removeChild(sortfwdind); } + sortrevind = document.getElementById('sorttable_sortrevind'); + if (sortrevind) { sortrevind.parentNode.removeChild(sortrevind); } + + this.className += ' sorttable_sorted'; + sortfwdind = document.createElement('span'); + sortfwdind.id = "sorttable_sortfwdind"; + sortfwdind.innerHTML = stIsIE ? ' 6' : ' ▾'; + this.appendChild(sortfwdind); + + // build an array to sort. This is a Schwartzian transform thing, + // i.e., we "decorate" each row with the actual sort key, + // sort based on the sort keys, and then put the rows back in order + // which is a lot faster because you only do getInnerText once per row + row_array = []; + col = this.sorttable_columnindex; + rows = this.sorttable_tbody.rows; + for (var j=0; j 12) { + // definitely dd/mm + return sorttable.sort_ddmm; + } else if (second > 12) { + return sorttable.sort_mmdd; + } else { + // looks like a date, but we can't tell which, so assume + // that it's dd/mm (English imperialism!) and keep looking + sortfn = sorttable.sort_ddmm; + } + } + } + } + return sortfn; + }, + + getInnerText: function(node) { + // gets the text we want to use for sorting for a cell. + // strips leading and trailing whitespace. + // this is *not* a generic getInnerText function; it's special to sorttable. + // for example, you can override the cell text with a customkey attribute. + // it also gets .value for fields. + + hasInputs = (typeof node.getElementsByTagName == 'function') && + node.getElementsByTagName('input').length; + + if (node.getAttribute("sorttable_customkey") != null) { + return node.getAttribute("sorttable_customkey"); + } + else if (typeof node.textContent != 'undefined' && !hasInputs) { + return node.textContent.replace(/^\s+|\s+$/g, ''); + } + else if (typeof node.innerText != 'undefined' && !hasInputs) { + return node.innerText.replace(/^\s+|\s+$/g, ''); + } + else if (typeof node.text != 'undefined' && !hasInputs) { + return node.text.replace(/^\s+|\s+$/g, ''); + } + else { + switch (node.nodeType) { + case 3: + if (node.nodeName.toLowerCase() == 'input') { + return node.value.replace(/^\s+|\s+$/g, ''); + } + case 4: + return node.nodeValue.replace(/^\s+|\s+$/g, ''); + break; + case 1: + case 11: + var innerText = ''; + for (var i = 0; i < node.childNodes.length; i++) { + innerText += sorttable.getInnerText(node.childNodes[i]); + } + return innerText.replace(/^\s+|\s+$/g, ''); + break; + default: + return ''; + } + } + }, + + reverse: function(tbody) { + // reverse the rows in a tbody + newrows = []; + for (var i=0; i=0; i--) { + tbody.appendChild(newrows[i]); + } + delete newrows; + }, + + /* sort functions + each sort function takes two parameters, a and b + you are comparing a[0] and b[0] */ + sort_numeric: function(a,b) { + aa = parseFloat(a[0].replace(/[^0-9.-]/g,'')); + if (isNaN(aa)) aa = 0; + bb = parseFloat(b[0].replace(/[^0-9.-]/g,'')); + if (isNaN(bb)) bb = 0; + return aa-bb; + }, + sort_alpha: function(a,b) { + if (a[0]==b[0]) return 0; + if (a[0] 0 ) { + var q = list[i]; list[i] = list[i+1]; list[i+1] = q; + swap = true; + } + } // for + t--; + + if (!swap) break; + + for(var i = t; i > b; --i) { + if ( comp_func(list[i], list[i-1]) < 0 ) { + var q = list[i]; list[i] = list[i-1]; list[i-1] = q; + swap = true; + } + } // for + b++; + + } // while(swap) + } +} + +/* ****************************************************************** + Supporting functions: bundled here to avoid depending on a library + ****************************************************************** */ + +// Dean Edwards/Matthias Miller/John Resig + +/* for Mozilla/Opera9 */ +if (document.addEventListener) { + document.addEventListener("DOMContentLoaded", sorttable.init, false); +} + +/* for Internet Explorer */ +/*@cc_on @*/ +/*@if (@_win32) + document.write(" + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <X11/keysym.h>
+
+#include <glib/gi18n-lib.h>
+#include <gio/gio.h>
+#include <cafekbd-desktop-config.h>
+#include <cafekbd-config-private.h>
+
+/**
+ * CafekbdDesktopConfig:
+ */
+#define CAFEKBD_DESKTOP_CONFIG_SCHEMA  CAFEKBD_CONFIG_SCHEMA ".general"
+
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP[] = "default-group";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW[] = "group-per-window";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS[] = "handle-indicators";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES[] = "layout-names-as-group-names";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_LOAD_EXTRA_ITEMS[] = "load-extra-items";
+
+/*
+ * static common functions
+ */
+
+static gboolean
+    cafekbd_desktop_config_get_lv_descriptions
+    (CafekbdDesktopConfig * config,
+     XklConfigRegistry * registry,
+     const gchar ** layout_ids,
+     const gchar ** variant_ids,
+     gchar *** short_layout_descriptions,
+     gchar *** long_layout_descriptions,
+     gchar *** short_variant_descriptions,
+     gchar *** long_variant_descriptions) {
+	const gchar **pl, **pv;
+	guint total_layouts;
+	gchar **sld, **lld, **svd, **lvd;
+	XklConfigItem *item = xkl_config_item_new ();
+
+	if (!
+	    (xkl_engine_get_features (config->engine) &
+	     XKLF_MULTIPLE_LAYOUTS_SUPPORTED))
+		return FALSE;
+
+	pl = layout_ids;
+	pv = variant_ids;
+	total_layouts = g_strv_length ((char **) layout_ids);
+	sld = *short_layout_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+	lld = *long_layout_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+	svd = *short_variant_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+	lvd = *long_variant_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+
+	while (pl != NULL && *pl != NULL) {
+
+		xkl_debug (100, "ids: [%s][%s]\n", *pl,
+			   pv == NULL ? NULL : *pv);
+
+		g_snprintf (item->name, sizeof item->name, "%s", *pl);
+		if (xkl_config_registry_find_layout (registry, item)) {
+			*sld = g_strdup (item->short_description);
+			*lld = g_strdup (item->description);
+		} else {
+			*sld = g_strdup ("");
+			*lld = g_strdup ("");
+		}
+
+		if (pv != NULL && *pv != NULL) {
+			g_snprintf (item->name, sizeof item->name, "%s",
+				    *pv);
+			if (xkl_config_registry_find_variant
+			    (registry, *pl, item)) {
+				*svd = g_strdup (item->short_description);
+				*lvd = g_strdup (item->description);
+			} else {
+				*svd = g_strdup ("");
+				*lvd = g_strdup ("");
+			}
+		} else {
+			*svd = g_strdup ("");
+			*lvd = g_strdup ("");
+		}
+
+		xkl_debug (100, "description: [%s][%s][%s][%s]\n",
+			   *sld, *lld, *svd, *lvd);
+		sld++;
+		lld++;
+		svd++;
+		lvd++;
+
+		pl++;
+
+		if (pv != NULL && *pv != NULL)
+			pv++;
+	}
+
+	g_object_unref (item);
+	return TRUE;
+}
+
+/*
+ * extern CafekbdDesktopConfig config functions
+ */
+void
+cafekbd_desktop_config_init (CafekbdDesktopConfig * config,
+			  XklEngine * engine)
+{
+	memset (config, 0, sizeof (*config));
+	config->settings = g_settings_new (CAFEKBD_DESKTOP_CONFIG_SCHEMA);
+	config->engine = engine;
+}
+
+void
+cafekbd_desktop_config_term (CafekbdDesktopConfig * config)
+{
+	g_object_unref (config->settings);
+	config->settings = NULL;
+}
+
+void
+cafekbd_desktop_config_load_from_gsettings (CafekbdDesktopConfig * config)
+{
+	config->group_per_app =
+	    g_settings_get_boolean (config->settings,
+				 CAFEKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW);
+	xkl_debug (150, "group_per_app: %d\n", config->group_per_app);
+
+	config->handle_indicators =
+	    g_settings_get_boolean (config->settings,
+				 CAFEKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS);
+	xkl_debug (150, "handle_indicators: %d\n",
+		   config->handle_indicators);
+
+	config->layout_names_as_group_names =
+	    g_settings_get_boolean (config->settings,
+				   CAFEKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES);
+	xkl_debug (150, "layout_names_as_group_names: %d\n",
+		   config->layout_names_as_group_names);
+
+	config->load_extra_items =
+	    g_settings_get_boolean (config->settings,
+				   CAFEKBD_DESKTOP_CONFIG_KEY_LOAD_EXTRA_ITEMS);
+	xkl_debug (150, "load_extra_items: %d\n",
+		   config->load_extra_items);
+
+	config->default_group =
+	    g_settings_get_int (config->settings,
+				  CAFEKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP);
+
+	if (config->default_group < -1
+	    || config->default_group >=
+	    xkl_engine_get_max_num_groups (config->engine))
+		config->default_group = -1;
+	xkl_debug (150, "default_group: %d\n", config->default_group);
+}
+
+void
+cafekbd_desktop_config_save_to_gsettings (CafekbdDesktopConfig * config)
+{
+	g_settings_delay (config->settings);
+
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW,
+			     config->group_per_app);
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS,
+			     config->handle_indicators);
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES,
+			     config->layout_names_as_group_names);
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_LOAD_EXTRA_ITEMS,
+			     config->load_extra_items);
+	g_settings_set_int (config->settings,
+			    CAFEKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP,
+			    config->default_group);
+
+	g_settings_apply (config->settings);
+}
+
+gboolean
+cafekbd_desktop_config_activate (CafekbdDesktopConfig * config)
+{
+	gboolean rv = TRUE;
+
+	xkl_engine_set_group_per_toplevel_window (config->engine,
+						  config->group_per_app);
+	xkl_engine_set_indicators_handling (config->engine,
+					    config->handle_indicators);
+	xkl_engine_set_default_group (config->engine,
+				      config->default_group);
+
+	return rv;
+}
+
+void
+cafekbd_desktop_config_lock_next_group (CafekbdDesktopConfig * config)
+{
+	int group = xkl_engine_get_next_group (config->engine);
+	xkl_engine_lock_group (config->engine, group);
+}
+
+void
+cafekbd_desktop_config_lock_prev_group (CafekbdDesktopConfig * config)
+{
+	int group = xkl_engine_get_prev_group (config->engine);
+	xkl_engine_lock_group (config->engine, group);
+}
+
+void
+cafekbd_desktop_config_restore_group (CafekbdDesktopConfig * config)
+{
+	int group = xkl_engine_get_current_window_group (config->engine);
+	xkl_engine_lock_group (config->engine, group);
+}
+
+/**
+ * cafekbd_desktop_config_start_listen:
+ * @func: (scope notified): a function to call when settings are changed
+ */
+void
+cafekbd_desktop_config_start_listen (CafekbdDesktopConfig * config,
+				  GCallback func,
+				  gpointer user_data)
+{
+	config->config_listener_id =
+	    g_signal_connect (config->settings, "changed", func,
+			      user_data);
+}
+
+void
+cafekbd_desktop_config_stop_listen (CafekbdDesktopConfig * config)
+{
+	g_signal_handler_disconnect (config->settings,
+				    config->config_listener_id);
+	config->config_listener_id = 0;
+}
+
+gboolean
+cafekbd_desktop_config_load_group_descriptions (CafekbdDesktopConfig
+					     * config,
+					     XklConfigRegistry *
+					     registry,
+					     const gchar **
+					     layout_ids,
+					     const gchar **
+					     variant_ids,
+					     gchar ***
+					     short_group_names,
+					     gchar *** full_group_names)
+{
+	gchar **sld, **lld, **svd, **lvd;
+	gchar **psld, **plld, **plvd;
+	gchar **psgn, **pfgn, **psvd;
+	gint total_descriptions;
+
+	if (!cafekbd_desktop_config_get_lv_descriptions
+	    (config, registry, layout_ids, variant_ids, &sld, &lld, &svd,
+	     &lvd)) {
+		return False;
+	}
+
+	total_descriptions = g_strv_length (sld);
+
+	*short_group_names = psgn =
+	    g_new0 (gchar *, total_descriptions + 1);
+	*full_group_names = pfgn =
+	    g_new0 (gchar *, total_descriptions + 1);
+
+	plld = lld;
+	psld = sld;
+	plvd = lvd;
+	psvd = svd;
+	while (plld != NULL && *plld != NULL) {
+		gchar *sd = (*psvd[0] == '\0') ? *psld : *psvd;
+		psld++, psvd++;
+		*psgn++ = g_strdup (sd);
+		*pfgn++ = g_strdup (cafekbd_keyboard_config_format_full_layout
+				    (*plld++, *plvd++));
+	}
+	g_strfreev (sld);
+	g_strfreev (lld);
+	g_strfreev (svd);
+	g_strfreev (lvd);
+
+	return True;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/1.html b/2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/1.html new file mode 100644 index 0000000..43abc15 --- /dev/null +++ b/2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/1.html @@ -0,0 +1,914 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <X11/keysym.h>
+
+#include <pango/pango.h>
+
+#include <glib/gi18n-lib.h>
+#include <cdk/cdkx.h>
+
+#include <cafekbd-keyboard-config.h>
+#include <cafekbd-indicator-config.h>
+
+#include <cafekbd-config-private.h>
+
+/**
+ * CafekbdIndicatorConfig:
+ */
+#define CAFEKBD_INDICATOR_CONFIG_SCHEMA  CAFEKBD_CONFIG_SCHEMA ".indicator"
+
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS[] = "show-flags";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_SECONDARIES[] = "secondary";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_FONT_FAMILY[] = "font-family";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_FOREGROUND_COLOR[] = "foreground-color";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_BACKGROUND_COLOR[] = "background-color";
+
+/*
+ * static applet config functions
+ */
+static void
+cafekbd_indicator_config_load_font (CafekbdIndicatorConfig * ind_config)
+{
+	ind_config->font_family =
+	    g_settings_get_string (ind_config->settings,
+				   CAFEKBD_INDICATOR_CONFIG_KEY_FONT_FAMILY);
+
+	if (ind_config->font_family == NULL ||
+	    ind_config->font_family[0] == '\0') {
+		PangoFontDescription *fd = NULL;
+		CtkWidgetPath *widget_path = ctk_widget_path_new ();
+		CtkStyleContext *context = ctk_style_context_new ();
+
+		ctk_widget_path_append_type (widget_path, CTK_TYPE_WINDOW);
+		ctk_widget_path_iter_set_name (widget_path, -1 , "PanelWidget");
+
+		ctk_style_context_set_path (context, widget_path);
+		ctk_style_context_set_screen (context, cdk_screen_get_default ());
+		ctk_style_context_set_state (context, CTK_STATE_FLAG_NORMAL);
+		ctk_style_context_add_class (context, CTK_STYLE_CLASS_DEFAULT);
+		ctk_style_context_add_class (context, "gnome-panel-menu-bar");
+		ctk_style_context_add_class (context, "cafe-panel-menu-bar");
+
+		ctk_style_context_get (context, CTK_STATE_FLAG_NORMAL,
+		                       CTK_STYLE_PROPERTY_FONT, &fd, NULL);
+
+		if (fd != NULL) {
+			ind_config->font_family =
+			    g_strdup (pango_font_description_to_string(fd));
+		}
+
+		g_object_unref (G_OBJECT (context));
+		ctk_widget_path_unref (widget_path);
+	}
+	xkl_debug (150, "font: [%s]\n", ind_config->font_family);
+
+}
+
+static void
+cafekbd_indicator_config_load_colors (CafekbdIndicatorConfig * ind_config)
+{
+	ind_config->foreground_color =
+	    g_settings_get_string (ind_config->settings,
+	                           CAFEKBD_INDICATOR_CONFIG_KEY_FOREGROUND_COLOR);
+
+	if (ind_config->foreground_color == NULL ||
+	    ind_config->foreground_color[0] == '\0') {
+		CtkWidgetPath *widget_path = ctk_widget_path_new ();
+		CtkStyleContext *context = ctk_style_context_new ();
+		CdkRGBA fg_color;
+
+		ctk_widget_path_append_type (widget_path, CTK_TYPE_WINDOW);
+		ctk_widget_path_iter_set_name (widget_path, -1 , "PanelWidget");
+
+		ctk_style_context_set_path (context, widget_path);
+		ctk_style_context_set_screen (context, cdk_screen_get_default ());
+		ctk_style_context_set_state (context, CTK_STATE_FLAG_NORMAL);
+		ctk_style_context_add_class (context, CTK_STYLE_CLASS_DEFAULT);
+		ctk_style_context_add_class (context, "gnome-panel-menu-bar");
+		ctk_style_context_add_class (context, "cafe-panel-menu-bar");
+
+		ctk_style_context_get_color (context,
+		                             CTK_STATE_FLAG_NORMAL, &fg_color);
+		ind_config->foreground_color =
+		    g_strdup_printf ("%g %g %g",
+		                     fg_color.red,
+		                     fg_color.green,
+		                     fg_color.blue);
+
+		g_object_unref (G_OBJECT (context));
+		ctk_widget_path_unref (widget_path);
+	}
+
+	ind_config->background_color =
+	    g_settings_get_string (ind_config->settings,
+				     CAFEKBD_INDICATOR_CONFIG_KEY_BACKGROUND_COLOR);
+}
+
+void
+cafekbd_indicator_config_refresh_style (CafekbdIndicatorConfig * ind_config)
+{
+	g_free (ind_config->font_family);
+	g_free (ind_config->foreground_color);
+	g_free (ind_config->background_color);
+	cafekbd_indicator_config_load_font (ind_config);
+	cafekbd_indicator_config_load_colors (ind_config);
+}
+
+gchar *
+cafekbd_indicator_config_get_images_file (CafekbdIndicatorConfig *
+				       ind_config,
+				       CafekbdKeyboardConfig *
+				       kbd_config, int group)
+{
+	char *image_file = NULL;
+	CtkIconInfo *icon_info = NULL;
+
+	if (!ind_config->show_flags)
+		return NULL;
+
+	if ((kbd_config->layouts_variants != NULL) &&
+	    (g_strv_length (kbd_config->layouts_variants) > group)) {
+		char *full_layout_name =
+		    kbd_config->layouts_variants[group];
+
+		if (full_layout_name != NULL) {
+			char *l, *v;
+			cafekbd_keyboard_config_split_items (full_layout_name,
+							  &l, &v);
+			if (l != NULL) {
+				/* probably there is something in theme? */
+				icon_info = ctk_icon_theme_lookup_icon
+				    (ind_config->icon_theme, l, 48, 0);
+
+				/* Unbelievable but happens */
+				if (icon_info != NULL &&
+				    ctk_icon_info_get_filename (icon_info) == NULL) {
+					g_object_unref (icon_info);
+					icon_info = NULL;
+				}
+			}
+		}
+	}
+	/* fallback to the default value */
+	if (icon_info == NULL) {
+		icon_info = ctk_icon_theme_lookup_icon
+		    (ind_config->icon_theme, "stock_dialog-error", 48, 0);
+	}
+	if (icon_info != NULL) {
+		image_file =
+		    g_strdup (ctk_icon_info_get_filename (icon_info));
+		g_object_unref (icon_info);
+	}
+
+	return image_file;
+}
+
+void
+cafekbd_indicator_config_load_image_filenames (CafekbdIndicatorConfig *
+					    ind_config,
+					    CafekbdKeyboardConfig *
+					    kbd_config)
+{
+	int i;
+	ind_config->image_filenames = NULL;
+
+	if (!ind_config->show_flags)
+		return;
+
+	for (i = xkl_engine_get_max_num_groups (ind_config->engine);
+	     --i >= 0;) {
+		gchar *image_file =
+		    cafekbd_indicator_config_get_images_file (ind_config,
+							   kbd_config,
+							   i);
+		ind_config->image_filenames =
+		    g_slist_prepend (ind_config->image_filenames,
+				     image_file);
+	}
+}
+
+void
+cafekbd_indicator_config_free_image_filenames (CafekbdIndicatorConfig *
+					    ind_config)
+{
+	while (ind_config->image_filenames) {
+		if (ind_config->image_filenames->data)
+			g_free (ind_config->image_filenames->data);
+		ind_config->image_filenames =
+		    g_slist_delete_link (ind_config->image_filenames,
+					 ind_config->image_filenames);
+	}
+}
+
+void
+cafekbd_indicator_config_init (CafekbdIndicatorConfig * ind_config,
+			       XklEngine * engine)
+{
+	gchar *sp;
+
+	memset (ind_config, 0, sizeof (*ind_config));
+	ind_config->settings = g_settings_new (CAFEKBD_INDICATOR_CONFIG_SCHEMA);
+	ind_config->engine = engine;
+
+	ind_config->icon_theme = ctk_icon_theme_get_default ();
+
+	ctk_icon_theme_append_search_path (ind_config->icon_theme, sp =
+					   g_build_filename (g_get_home_dir
+							     (),
+							     ".icons/flags",
+							     NULL));
+	g_free (sp);
+
+	ctk_icon_theme_append_search_path (ind_config->icon_theme,
+					   sp =
+					   g_build_filename (DATADIR,
+							     "pixmaps/flags",
+							     NULL));
+	g_free (sp);
+
+	ctk_icon_theme_append_search_path (ind_config->icon_theme,
+					   sp =
+					   g_build_filename (DATADIR,
+							     "icons/flags",
+							     NULL));
+	g_free (sp);
+}
+
+void
+cafekbd_indicator_config_term (CafekbdIndicatorConfig * ind_config)
+{
+	g_free (ind_config->font_family);
+	ind_config->font_family = NULL;
+
+	g_free (ind_config->foreground_color);
+	ind_config->foreground_color = NULL;
+
+	g_free (ind_config->background_color);
+	ind_config->background_color = NULL;
+
+	ind_config->icon_theme = NULL;
+
+	cafekbd_indicator_config_free_image_filenames (ind_config);
+
+	g_object_unref (ind_config->settings);
+	ind_config->settings = NULL;
+}
+
+void
+cafekbd_indicator_config_load_from_gsettings (CafekbdIndicatorConfig * ind_config)
+{
+	ind_config->secondary_groups_mask =
+	    g_settings_get_int (ind_config->settings,
+				CAFEKBD_INDICATOR_CONFIG_KEY_SECONDARIES);
+
+	ind_config->show_flags =
+	    g_settings_get_boolean (ind_config->settings,
+				 CAFEKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS);
+
+	cafekbd_indicator_config_load_font (ind_config);
+	cafekbd_indicator_config_load_colors (ind_config);
+
+}
+
+void
+cafekbd_indicator_config_save_to_gsettings (CafekbdIndicatorConfig * ind_config)
+{
+	g_settings_delay (ind_config->settings);
+
+	g_settings_set_int (ind_config->settings,
+				  CAFEKBD_INDICATOR_CONFIG_KEY_SECONDARIES,
+				  ind_config->secondary_groups_mask);
+	g_settings_set_boolean (ind_config->settings,
+				   CAFEKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS,
+				   ind_config->show_flags);
+
+	g_settings_apply (ind_config->settings);
+}
+
+void
+cafekbd_indicator_config_activate (CafekbdIndicatorConfig * ind_config)
+{
+	xkl_engine_set_secondary_groups_mask (ind_config->engine,
+					      ind_config->secondary_groups_mask);
+}
+
+/**
+ * cafekbd_indicator_config_start_listen:
+ * @func: (scope notified): a function to call when settings are changed
+ */
+void
+cafekbd_indicator_config_start_listen (CafekbdIndicatorConfig *
+				    ind_config,
+				    GCallback func,
+				    gpointer user_data)
+{
+	ind_config->config_listener_id =
+	    g_signal_connect (ind_config->settings, "changed", func,
+			      user_data);
+}
+
+void
+cafekbd_indicator_config_stop_listen (CafekbdIndicatorConfig * ind_config)
+{
+	g_signal_handler_disconnect (ind_config->settings,
+				     ind_config->config_listener_id);
+	ind_config->config_listener_id = 0;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/2.html b/2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/2.html new file mode 100644 index 0000000..4489934 --- /dev/null +++ b/2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/2.html @@ -0,0 +1,2100 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
+871
+872
+873
+874
+875
+876
+877
+878
+879
+880
+881
+882
+883
+884
+885
+886
+887
+888
+889
+890
+891
+892
+893
+894
+895
+896
+897
+898
+899
+900
+901
+902
+903
+904
+905
+906
+907
+908
+909
+910
+911
+912
+913
+914
+915
+916
+917
+918
+919
+920
+921
+922
+923
+924
+925
+926
+927
+928
+929
+930
+931
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+#include <config.h>
+
+#include <memory.h>
+
+#include <ctk/ctk.h>
+#include <cdk/cdkkeysyms.h>
+#include <cdk/cdkx.h>
+#include <glib/gi18n-lib.h>
+
+#include <cafekbd-indicator.h>
+#include <cafekbd-indicator-marshal.h>
+
+#include <cafekbd-desktop-config.h>
+#include <cafekbd-indicator-config.h>
+
+typedef struct _gki_globals {
+	XklEngine *engine;
+	XklConfigRegistry *registry;
+
+	CafekbdDesktopConfig cfg;
+	CafekbdIndicatorConfig ind_cfg;
+	CafekbdKeyboardConfig kbd_cfg;
+
+	const gchar *tooltips_format;
+	gchar **full_group_names;
+	gchar **short_group_names;
+	GSList *widget_instances;
+	GSList *images;
+} gki_globals;
+
+struct _CafekbdIndicatorPrivate {
+	gboolean set_parent_tooltips;
+	gdouble angle;
+};
+
+/* one instance for ALL widgets */
+static gki_globals globals;
+
+#define ForAllIndicators() \
+	{ \
+		GSList* cur; \
+		for (cur = globals.widget_instances; cur != NULL; cur = cur->next) { \
+			CafekbdIndicator * gki = (CafekbdIndicator*)cur->data;
+#define NextIndicator() \
+		} \
+	}
+
+G_DEFINE_TYPE (CafekbdIndicator, cafekbd_indicator, CTK_TYPE_NOTEBOOK)<--- There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
+
+static void
+cafekbd_indicator_global_init (void);
+static void
+cafekbd_indicator_global_term (void);
+static CtkWidget *
+cafekbd_indicator_prepare_drawing (CafekbdIndicator * gki, int group);
+static void
+cafekbd_indicator_set_current_page_for_group (CafekbdIndicator * gki, int group);
+static void
+cafekbd_indicator_set_current_page (CafekbdIndicator * gki);
+static void
+cafekbd_indicator_cleanup (CafekbdIndicator * gki);
+static void
+cafekbd_indicator_fill (CafekbdIndicator * gki);
+static void
+cafekbd_indicator_set_tooltips (CafekbdIndicator * gki, const char *str);
+
+gchar *
+cafekbd_indicator_extract_layout_name (int group, XklEngine *engine, CafekbdKeyboardConfig *kbd_cfg, gchar **short_group_names, gchar **full_group_names);
+gchar *
+cafekbd_indicator_create_label_title (int group, GHashTable **ln2cnt_map, gchar *layout_name);
+
+static void
+cafekbd_indicator_load_images (void)
+{
+	int i;
+	GSList *image_filename;
+
+	globals.images = NULL;
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	if (!globals.ind_cfg.show_flags)
+		return;
+
+	image_filename = globals.ind_cfg.image_filenames;
+
+	for (i = xkl_engine_get_max_num_groups (globals.engine);
+	     --i >= 0; image_filename = image_filename->next) {
+		GdkPixbuf *image = NULL;
+		char *image_file = (char *) image_filename->data;
+
+		if (image_file != NULL) {
+			GError *gerror = NULL;
+			image =
+			    gdk_pixbuf_new_from_file (image_file, &gerror);
+			if (image == NULL) {
+				CtkWidget *dialog =
+				    ctk_message_dialog_new (NULL,
+							    CTK_DIALOG_DESTROY_WITH_PARENT,
+							    CTK_MESSAGE_ERROR,
+							    CTK_BUTTONS_OK,
+							    _
+							    ("There was an error loading an image: %s"),
+							    gerror->
+							    message);
+				g_signal_connect (G_OBJECT (dialog),
+						  "response",
+						  G_CALLBACK
+						  (ctk_widget_destroy),
+						  NULL);
+
+				ctk_window_set_resizable (CTK_WINDOW
+							  (dialog), FALSE);
+
+				ctk_widget_show (dialog);
+				g_error_free (gerror);
+			}
+			xkl_debug (150,
+				   "Image %d[%s] loaded -> %p[%dx%d]\n",
+				   i, image_file, image,
+				   gdk_pixbuf_get_width (image),
+				   gdk_pixbuf_get_height (image));
+		}
+		/* We append the image anyway - even if it is NULL! */
+		globals.images = g_slist_append (globals.images, image);
+	}
+}
+
+static void
+cafekbd_indicator_free_images (void)
+{
+	GSList *img_node;
+
+	cafekbd_indicator_config_free_image_filenames (&globals.ind_cfg);
+
+	while ((img_node = globals.images) != NULL) {
+		GdkPixbuf *pi;
+
+		pi = GDK_PIXBUF (img_node->data);
+		/* It can be NULL - some images may be missing */
+		if (pi != NULL) {
+			g_object_unref (pi);
+		}
+		globals.images =
+		    g_slist_remove_link (globals.images, img_node);
+		g_slist_free_1 (img_node);
+	}
+}
+
+static void
+cafekbd_indicator_update_images (void)
+{
+	cafekbd_indicator_free_images ();
+	cafekbd_indicator_load_images ();
+}
+
+void
+cafekbd_indicator_set_tooltips (CafekbdIndicator * gki, const char *str)
+{
+	g_assert (str == NULL || g_utf8_validate (str, -1, NULL));
+
+	ctk_widget_set_tooltip_text (CTK_WIDGET (gki), str);
+
+	if (gki->priv->set_parent_tooltips) {
+		CtkWidget *parent =
+		    ctk_widget_get_parent (CTK_WIDGET (gki));
+		if (parent) {
+			ctk_widget_set_tooltip_text (parent, str);
+		}
+	}
+}
+
+void
+cafekbd_indicator_cleanup (CafekbdIndicator * gki)
+{
+	int i;
+	CtkNotebook *notebook = CTK_NOTEBOOK (gki);
+
+	/* Do not remove the first page! It is the default page */
+	for (i = ctk_notebook_get_n_pages (notebook); --i > 0;) {
+		ctk_notebook_remove_page (notebook, i);
+	}
+}
+
+void
+cafekbd_indicator_fill (CafekbdIndicator * gki)
+{
+	int grp;
+	int total_groups = xkl_engine_get_num_groups (globals.engine);
+	CtkNotebook *notebook = CTK_NOTEBOOK (gki);
+
+	for (grp = 0; grp < total_groups; grp++) {
+		CtkWidget *page;
+		page = cafekbd_indicator_prepare_drawing (gki, grp);
+
+		if (page == NULL)
+			page = ctk_label_new ("");
+
+		ctk_notebook_append_page (notebook, page, NULL);
+		ctk_widget_show_all (page);
+	}
+}
+
+static gboolean cafekbd_indicator_key_pressed (CtkWidget        *widget G_GNUC_UNUSED,
+					       CdkEventKey      *event,
+					       CafekbdIndicator *gki G_GNUC_UNUSED)
+{
+	switch (event->keyval)
+	{
+			case CDK_KEY_KP_Enter:
+			case CDK_KEY_ISO_Enter:
+			case CDK_KEY_3270_Enter:
+			case CDK_KEY_Return:
+			case CDK_KEY_space:
+			case CDK_KEY_KP_Space:
+			cafekbd_desktop_config_lock_next_group(&globals.cfg);
+			return TRUE;
+		default:
+			break;
+	}
+
+	return FALSE;
+}
+
+static gboolean
+cafekbd_indicator_button_pressed (CtkWidget        *widget,
+				  CdkEventButton   *event,
+				  CafekbdIndicator *gki G_GNUC_UNUSED)
+{
+	CtkWidget *img = ctk_bin_get_child (CTK_BIN (widget));
+	CtkAllocation allocation;
+	ctk_widget_get_allocation (img, &allocation);
+	xkl_debug (150, "Flag img size %d x %d\n",
+		   allocation.width, allocation.height);
+	if (event->button == 1 && event->type == CDK_BUTTON_PRESS) {
+		xkl_debug (150, "Mouse button pressed on applet\n");
+		cafekbd_desktop_config_lock_next_group (&globals.cfg);
+		return TRUE;
+	}
+	return FALSE;
+}
+
+static void
+draw_flag (CtkWidget * flag, cairo_t * cr, GdkPixbuf * image)
+{
+	/* Image width and height */
+	int iw = gdk_pixbuf_get_width (image);
+	int ih = gdk_pixbuf_get_height (image);
+	CtkAllocation allocation;
+	double xwiratio, ywiratio, wiratio;
+
+	ctk_widget_get_allocation (flag, &allocation);
+
+	/* widget-to-image scales, X and Y */
+	xwiratio = 1.0 * allocation.width / iw;
+	ywiratio = 1.0 * allocation.height / ih;
+	wiratio = xwiratio < ywiratio ? xwiratio : ywiratio;
+
+	/* transform cairo context */
+	cairo_translate (cr, allocation.width / 2.0, allocation.height / 2.0);
+	cairo_scale (cr, wiratio, wiratio);
+	cairo_translate (cr, - iw / 2.0, - ih / 2.0);
+
+	cdk_cairo_set_source_pixbuf (cr, image, 0, 0);
+	cairo_paint (cr);
+}
+
+gchar *
+cafekbd_indicator_extract_layout_name (int group, XklEngine * engine,
+				    CafekbdKeyboardConfig * kbd_cfg,
+				    gchar ** short_group_names,
+				    gchar ** full_group_names)
+{
+	char *layout_name = NULL;
+	if (group < g_strv_length (short_group_names)) {
+		if (xkl_engine_get_features (engine) &
+		    XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
+			char *full_layout_name =
+			    kbd_cfg->layouts_variants[group];
+			char *variant_name;
+			if (!cafekbd_keyboard_config_split_items
+			    (full_layout_name, &layout_name,
+			     &variant_name))
+				/* just in case */
+				layout_name = full_layout_name;
+
+			/* make it freeable */
+			layout_name = g_strdup (layout_name);
+
+			if (short_group_names != NULL) {
+				char *short_group_name =
+				    short_group_names[group];
+				if (short_group_name != NULL
+				    && *short_group_name != '\0') {
+					/* drop the long name */
+					g_free (layout_name);
+					layout_name =
+					    g_strdup (short_group_name);
+				}
+			}
+		} else {
+			layout_name = g_strdup (full_group_names[group]);
+		}
+	}
+
+	if (layout_name == NULL)
+		layout_name = g_strdup ("");
+
+	return layout_name;
+}
+
+gchar *
+cafekbd_indicator_create_label_title (int group, GHashTable ** ln2cnt_map,
+				   gchar * layout_name)
+{
+	gpointer pcounter = NULL;
+	char *prev_layout_name = NULL;
+	char *lbl_title = NULL;
+	int counter = 0;
+
+	if (group == 0) {
+		*ln2cnt_map =
+		    g_hash_table_new_full (g_str_hash, g_str_equal,
+					   g_free, NULL);
+	}
+
+	/* Process layouts with repeating description */
+	if (g_hash_table_lookup_extended
+	    (*ln2cnt_map, layout_name, (gpointer *) & prev_layout_name,
+	     &pcounter)) {
+		/* "next" same description */
+		gchar appendix[10] = "";
+		gint utf8length;
+		gunichar cidx;
+		counter = GPOINTER_TO_INT (pcounter);
+		/* Unicode subscript 2, 3, 4 */
+		cidx = 0x2081 + counter;
+		utf8length = g_unichar_to_utf8 (cidx, appendix);
+		appendix[utf8length] = '\0';
+		lbl_title = g_strconcat (layout_name, appendix, NULL);
+	} else {
+		/* "first" time this description */
+		lbl_title = g_strdup (layout_name);
+	}
+	g_hash_table_insert (*ln2cnt_map, layout_name,
+			     GINT_TO_POINTER (counter + 1));
+	return lbl_title;
+}
+
+static CtkWidget *
+cafekbd_indicator_prepare_drawing (CafekbdIndicator * gki, int group)
+{
+	gpointer pimage;
+	CtkWidget *ebox;
+
+	pimage = g_slist_nth_data (globals.images, group);
+	ebox = ctk_event_box_new ();
+	ctk_event_box_set_visible_window (CTK_EVENT_BOX (ebox), FALSE);
+	if (globals.ind_cfg.show_flags) {
+		GdkPixbuf *image;
+		CtkWidget *flag;
+
+		if (pimage == NULL)
+			return NULL;
+		image = GDK_PIXBUF (pimage);
+		flag = ctk_drawing_area_new ();
+		ctk_widget_add_events (CTK_WIDGET (flag),
+				       CDK_BUTTON_PRESS_MASK);
+		g_signal_connect (G_OBJECT (flag), "draw",
+		                  G_CALLBACK (draw_flag), image);
+		ctk_container_add (CTK_CONTAINER (ebox), flag);
+	} else {
+		char *lbl_title = NULL;
+		char *layout_name = NULL;
+		CtkWidget *label;
+		static GHashTable *ln2cnt_map = NULL;
+
+		layout_name =
+		    cafekbd_indicator_extract_layout_name (group,
+							globals.engine,
+							&globals.kbd_cfg,
+							globals.short_group_names,
+							globals.full_group_names);
+
+		lbl_title =
+		    cafekbd_indicator_create_label_title (group,
+						       &ln2cnt_map,
+						       layout_name);
+
+		label = ctk_label_new (lbl_title);
+		ctk_widget_set_halign (label, CTK_ALIGN_CENTER);
+		ctk_widget_set_valign (label, CTK_ALIGN_CENTER);
+		ctk_widget_set_margin_start (label, 2);
+		ctk_widget_set_margin_end (label, 2);
+		ctk_widget_set_margin_top (label, 2);
+		ctk_widget_set_margin_bottom (label, 2);
+		g_free (lbl_title);
+		ctk_label_set_angle (CTK_LABEL (label), gki->priv->angle);
+
+		if (group + 1 ==
+		    xkl_engine_get_num_groups (globals.engine)) {
+			g_hash_table_destroy (ln2cnt_map);
+			ln2cnt_map = NULL;
+		}
+
+		ctk_container_add (CTK_CONTAINER (ebox), label);
+	}
+
+	g_signal_connect (G_OBJECT (ebox),
+			  "button_press_event",
+			  G_CALLBACK (cafekbd_indicator_button_pressed), gki);
+
+	g_signal_connect (G_OBJECT (gki),
+			  "key_press_event",
+			  G_CALLBACK (cafekbd_indicator_key_pressed), gki);
+
+	/* We have everything prepared for that size */
+
+	return ebox;
+}
+
+static void
+cafekbd_indicator_update_tooltips (CafekbdIndicator * gki)
+{
+	XklState *state = xkl_engine_get_current_state (globals.engine);
+	gchar *buf;
+	if (state == NULL || state->group < 0
+	    || state->group >= g_strv_length (globals.full_group_names))
+		return;
+
+	buf = g_strdup_printf (globals.tooltips_format,
+			       globals.full_group_names[state->group]);
+
+	cafekbd_indicator_set_tooltips (gki, buf);
+	g_free (buf);
+}
+
+static void
+cafekbd_indicator_parent_set (CtkWidget *gki,
+			      CtkWidget *previous_parent G_GNUC_UNUSED)
+{
+	cafekbd_indicator_update_tooltips (CAFEKBD_INDICATOR (gki));
+}
+
+
+void
+cafekbd_indicator_reinit_ui (CafekbdIndicator * gki)
+{
+	cafekbd_indicator_cleanup (gki);
+	cafekbd_indicator_fill (gki);
+
+	cafekbd_indicator_set_current_page (gki);
+
+	g_signal_emit_by_name (gki, "reinit-ui");
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+			       gchar     *key G_GNUC_UNUSED,
+			       gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "General configuration changed in GSettings - reiniting...\n");
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+	ForAllIndicators () {
+		cafekbd_indicator_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_ind_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+				   gchar     *key G_GNUC_UNUSED,
+				   gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "Applet configuration changed in GSettings - reiniting...\n");
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+	cafekbd_indicator_update_images ();
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	ForAllIndicators () {
+		cafekbd_indicator_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+static void
+cafekbd_indicator_load_group_names (const gchar ** layout_ids,
+				 const gchar ** variant_ids)
+{
+	if (!cafekbd_desktop_config_load_group_descriptions
+	    (&globals.cfg, globals.registry, layout_ids, variant_ids,
+	     &globals.short_group_names, &globals.full_group_names)) {
+		/* We just populate no short names (remain NULL) -
+		 * full names are going to be used anyway */
+		gint i, total_groups =
+		    xkl_engine_get_num_groups (globals.engine);
+		globals.full_group_names =
+		    g_new0 (gchar *, total_groups + 1);
+
+		if (xkl_engine_get_features (globals.engine) &
+		    XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
+			gchar **lst = globals.kbd_cfg.layouts_variants;
+			for (i = 0; *lst; lst++, i++) {
+				globals.full_group_names[i] =
+				    g_strdup ((char *) *lst);
+			}
+		} else {
+			for (i = total_groups; --i >= 0;) {
+				globals.full_group_names[i] =
+				    g_strdup_printf ("Group %d", i);
+			}
+		}
+	}
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_kbd_cfg_callback (CafekbdIndicator *gki G_GNUC_UNUSED)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+	xkl_debug (100,
+		   "XKB configuration changed on X Server - reiniting...\n");
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+	cafekbd_indicator_update_images ();
+
+	g_strfreev (globals.full_group_names);
+	globals.full_group_names = NULL;
+
+	if (globals.short_group_names != NULL) {
+		g_strfreev (globals.short_group_names);
+		globals.short_group_names = NULL;
+	}
+
+	cafekbd_indicator_load_group_names ((const gchar **) xklrec->layouts,
+					 (const gchar **)
+					 xklrec->variants);
+
+	ForAllIndicators () {
+		cafekbd_indicator_reinit_ui (gki);
+	} NextIndicator ();
+	g_object_unref (G_OBJECT (xklrec));
+}
+
+/* Should be called once for all applets */
+static void
+cafekbd_indicator_state_callback (XklEngine           *engine G_GNUC_UNUSED,
+				  XklEngineStateChange changeType,
+				  gint                 group,
+				  gboolean             restore)
+{
+	xkl_debug (150, "group is now %d, restore: %d\n", group, restore);
+
+	if (changeType == GROUP_CHANGED) {
+		ForAllIndicators () {
+			xkl_debug (200, "do repaint\n");
+			cafekbd_indicator_set_current_page_for_group
+			    (gki, group);
+		}
+		NextIndicator ();
+	}
+}
+
+
+void
+cafekbd_indicator_set_current_page (CafekbdIndicator * gki)
+{
+	XklState *cur_state;
+	cur_state = xkl_engine_get_current_state (globals.engine);
+	if (cur_state->group >= 0)
+		cafekbd_indicator_set_current_page_for_group (gki,
+							   cur_state->
+							   group);
+}
+
+void
+cafekbd_indicator_set_current_page_for_group (CafekbdIndicator * gki, int group)
+{
+	xkl_debug (200, "Revalidating for group %d\n", group);
+
+	ctk_notebook_set_current_page (CTK_NOTEBOOK (gki), group + 1);
+
+	cafekbd_indicator_update_tooltips (gki);
+}
+
+/* Should be called once for all widgets */
+static CdkFilterReturn
+cafekbd_indicator_filter_x_evt (CdkXEvent *xev,
+				CdkEvent  *event G_GNUC_UNUSED)
+{
+	XEvent *xevent = (XEvent *) xev;
+
+	xkl_engine_filter_events (globals.engine, xevent);
+	switch (xevent->type) {
+	case ReparentNotify:
+		{
+			XReparentEvent *rne = (XReparentEvent *) xev;
+
+			ForAllIndicators () {
+				CdkWindow *w =
+				    ctk_widget_get_parent_window
+				    (CTK_WIDGET (gki));
+
+				/* compare the indicator's parent window with the even window */
+				if (w != NULL
+				    && CDK_WINDOW_XID (w) == rne->window) {
+					/* if so - make it transparent... */
+					xkl_engine_set_window_transparent
+					    (globals.engine, rne->window,
+					     TRUE);
+				}
+			}
+			NextIndicator ()
+		}
+		break;
+	}
+	return CDK_FILTER_CONTINUE;
+}
+
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_start_listen (void)
+{
+	cdk_window_add_filter (NULL, (CdkFilterFunc)
+			       cafekbd_indicator_filter_x_evt, NULL);
+	cdk_window_add_filter (cdk_get_default_root_window (),
+			       (CdkFilterFunc)
+			       cafekbd_indicator_filter_x_evt, NULL);
+
+	xkl_engine_start_listen (globals.engine,
+				 XKLL_TRACK_KEYBOARD_STATE);
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_stop_listen (void)
+{
+	xkl_engine_stop_listen (globals.engine, XKLL_TRACK_KEYBOARD_STATE);
+
+	cdk_window_remove_filter (NULL, (CdkFilterFunc)
+				  cafekbd_indicator_filter_x_evt, NULL);
+	cdk_window_remove_filter
+	    (cdk_get_default_root_window (),
+	     (CdkFilterFunc) cafekbd_indicator_filter_x_evt, NULL);
+}
+
+static gboolean
+cafekbd_indicator_scroll (CtkWidget      *gki G_GNUC_UNUSED,
+			  CdkEventScroll *event G_GNUC_UNUSED)
+{
+	/* mouse wheel events should be ignored, otherwise funny effects appear */
+	return TRUE;
+}
+
+static void cafekbd_indicator_init(CafekbdIndicator* gki)
+{
+	CtkWidget *def_drawing;
+	CtkNotebook *notebook;
+
+	if (!g_slist_length(globals.widget_instances))
+	{
+		cafekbd_indicator_global_init();
+	}
+
+	gki->priv = g_new0 (CafekbdIndicatorPrivate, 1);
+
+	notebook = CTK_NOTEBOOK (gki);
+
+	xkl_debug (100, "Initiating the widget startup process for %p\n", gki);
+
+	ctk_notebook_set_show_tabs (notebook, FALSE);
+	ctk_notebook_set_show_border (notebook, FALSE);
+
+	def_drawing =
+	    ctk_image_new_from_icon_name ("process-stop",
+				      CTK_ICON_SIZE_BUTTON);
+
+	ctk_notebook_append_page (notebook, def_drawing,
+				  ctk_label_new (""));
+
+	if (globals.engine == NULL) {
+		cafekbd_indicator_set_tooltips (gki,
+					     _
+					     ("XKB initialization error"));
+		return;
+	}
+
+	cafekbd_indicator_set_tooltips (gki, NULL);
+
+	cafekbd_indicator_fill (gki);
+	cafekbd_indicator_set_current_page (gki);
+
+	ctk_widget_add_events (CTK_WIDGET (gki), CDK_BUTTON_PRESS_MASK);
+
+	/* append AFTER all initialization work is finished */
+	globals.widget_instances =
+	    g_slist_append (globals.widget_instances, gki);
+}
+
+static void
+cafekbd_indicator_finalize (GObject * obj)
+{
+	CafekbdIndicator *gki = CAFEKBD_INDICATOR (obj);
+	xkl_debug (100,
+		   "Starting the cafe-kbd-indicator widget shutdown process for %p\n",
+		   gki);
+
+	/* remove BEFORE all termination work is finished */
+	globals.widget_instances =
+	    g_slist_remove (globals.widget_instances, gki);
+
+	cafekbd_indicator_cleanup (gki);
+
+	xkl_debug (100,
+		   "The instance of cafe-kbd-indicator successfully finalized\n");
+
+	g_free (gki->priv);
+
+	G_OBJECT_CLASS (cafekbd_indicator_parent_class)->finalize (obj);
+
+	if (!g_slist_length (globals.widget_instances))
+		cafekbd_indicator_global_term ();
+}
+
+static void
+cafekbd_indicator_global_term (void)
+{
+	xkl_debug (100, "*** Last  CafekbdIndicator instance *** \n");
+	cafekbd_indicator_stop_listen ();
+
+	cafekbd_desktop_config_stop_listen (&globals.cfg);
+	cafekbd_indicator_config_stop_listen (&globals.ind_cfg);
+
+	cafekbd_indicator_config_term (&globals.ind_cfg);
+	cafekbd_keyboard_config_term (&globals.kbd_cfg);
+	cafekbd_desktop_config_term (&globals.cfg);
+
+	g_object_unref (G_OBJECT (globals.registry));
+	globals.registry = NULL;
+	g_object_unref (G_OBJECT (globals.engine));
+	globals.engine = NULL;
+	xkl_debug (100, "*** Terminated globals *** \n");
+}
+
+static void
+cafekbd_indicator_class_init (CafekbdIndicatorClass * klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+	CtkWidgetClass *widget_class = CTK_WIDGET_CLASS (klass);
+
+	xkl_debug (100, "*** First CafekbdIndicator instance *** \n");
+
+	memset (&globals, 0, sizeof (globals));
+
+	/* Initing some global vars */
+	globals.tooltips_format = "%s";
+
+	/* Initing vtable */
+	object_class->finalize = cafekbd_indicator_finalize;
+
+	widget_class->scroll_event = cafekbd_indicator_scroll;
+	widget_class->parent_set = cafekbd_indicator_parent_set;
+
+	/* Signals */
+	g_signal_new ("reinit-ui", CAFEKBD_TYPE_INDICATOR,
+		      G_SIGNAL_RUN_LAST,
+		      G_STRUCT_OFFSET (CafekbdIndicatorClass, reinit_ui),
+		      NULL, NULL, cafekbd_indicator_VOID__VOID,
+		      G_TYPE_NONE, 0);
+}
+
+static void
+cafekbd_indicator_global_init (void)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+
+	globals.engine = xkl_engine_get_instance(CDK_DISPLAY_XDISPLAY(cdk_display_get_default()));
+
+	if (globals.engine == NULL)
+	{
+		xkl_debug (0, "Libxklavier initialization error");
+		return;
+	}
+
+	g_signal_connect (globals.engine, "X-state-changed",
+			  G_CALLBACK (cafekbd_indicator_state_callback),
+			  NULL);
+	g_signal_connect (globals.engine, "X-config-changed",
+			  G_CALLBACK (cafekbd_indicator_kbd_cfg_callback),
+			  NULL);
+
+	cafekbd_desktop_config_init (&globals.cfg, globals.engine);
+	cafekbd_keyboard_config_init (&globals.kbd_cfg, globals.engine);
+	cafekbd_indicator_config_init (&globals.ind_cfg, globals.engine);
+
+	cafekbd_desktop_config_start_listen (&globals.cfg,
+					  (GCallback)
+					  cafekbd_indicator_cfg_changed,
+					  NULL);
+	cafekbd_indicator_config_start_listen (&globals.ind_cfg,
+					    (GCallback)
+					    cafekbd_indicator_ind_cfg_changed,
+					    NULL);
+
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+
+	globals.registry =
+	    xkl_config_registry_get_instance (globals.engine);
+	xkl_config_registry_load (globals.registry,
+				  globals.cfg.load_extra_items);
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+	cafekbd_indicator_update_images ();
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	cafekbd_indicator_load_group_names ((const gchar **) xklrec->layouts,
+					 (const gchar **)
+					 xklrec->variants);
+	g_object_unref (G_OBJECT (xklrec));
+
+	cafekbd_indicator_start_listen ();
+
+	xkl_debug (100, "*** Inited globals *** \n");
+}
+
+CtkWidget *
+cafekbd_indicator_new (void)
+{
+	return
+	    CTK_WIDGET (g_object_new (cafekbd_indicator_get_type (), NULL));
+}
+
+void
+cafekbd_indicator_set_parent_tooltips (CafekbdIndicator * gki, gboolean spt)
+{
+	gki->priv->set_parent_tooltips = spt;
+	cafekbd_indicator_update_tooltips (gki);
+}
+
+void
+cafekbd_indicator_set_tooltips_format (const gchar format[])
+{
+	globals.tooltips_format = format;
+	ForAllIndicators ()
+	    cafekbd_indicator_update_tooltips (gki);
+	NextIndicator ()
+}
+
+/**
+ * cafekbd_indicator_get_xkl_engine:
+ *
+ * Returns: (transfer none): The engine shared by all CafekbdIndicator objects
+ */
+XklEngine *
+cafekbd_indicator_get_xkl_engine ()
+{
+	return globals.engine;
+}
+
+/**
+ * cafekbd_indicator_get_group_names:
+ *
+ * Returns: (transfer none) (array zero-terminated=1): List of group names
+ */
+gchar **
+cafekbd_indicator_get_group_names ()
+{
+	return globals.full_group_names;
+}
+
+gchar *
+cafekbd_indicator_get_image_filename (guint group)
+{
+	if (!globals.ind_cfg.show_flags)
+		return NULL;
+	return cafekbd_indicator_config_get_images_file (&globals.ind_cfg,
+						      &globals.kbd_cfg,
+						      group);
+}
+
+gdouble
+cafekbd_indicator_get_max_width_height_ratio (void)
+{
+	gdouble rv = 0.0;
+	GSList *ip = globals.images;
+	if (!globals.ind_cfg.show_flags)
+		return 0;
+	while (ip != NULL) {
+		GdkPixbuf *img = GDK_PIXBUF (ip->data);
+		gdouble r =
+		    1.0 * gdk_pixbuf_get_width (img) /
+		    gdk_pixbuf_get_height (img);
+		if (r > rv)
+			rv = r;
+		ip = ip->next;
+	}
+	return rv;
+}
+
+void
+cafekbd_indicator_set_angle (CafekbdIndicator * gki, gdouble angle)
+{
+	gki->priv->angle = angle;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/3.html b/2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/3.html new file mode 100644 index 0000000..2dbd2a6 --- /dev/null +++ b/2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/3.html @@ -0,0 +1,1832 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <X11/keysym.h>
+
+#include <glib/gi18n-lib.h>
+
+#include <cafekbd-keyboard-config.h>
+#include <cafekbd-config-private.h>
+#include <cafekbd-util.h>
+
+/*
+ * CafekbdKeyboardConfig
+ */
+#define CAFEKBD_KEYBOARD_CONFIG_SCHEMA CAFEKBD_CONFIG_SCHEMA ".kbd"
+
+#define GROUP_SWITCHERS_GROUP "grp"
+#define DEFAULT_GROUP_SWITCH "grp:shift_caps_toggle"
+
+const gchar CAFEKBD_KEYBOARD_CONFIG_KEY_MODEL[] = "model";
+const gchar CAFEKBD_KEYBOARD_CONFIG_KEY_LAYOUTS[] = "layouts";
+const gchar CAFEKBD_KEYBOARD_CONFIG_KEY_OPTIONS[] = "options";
+
+const gchar *CAFEKBD_KEYBOARD_CONFIG_ACTIVE[] = {
+	CAFEKBD_KEYBOARD_CONFIG_KEY_MODEL,
+	CAFEKBD_KEYBOARD_CONFIG_KEY_LAYOUTS,
+	CAFEKBD_KEYBOARD_CONFIG_KEY_OPTIONS
+};
+
+/*
+ * static common functions
+ */
+
+static gboolean
+cafekbd_strv_equal (gchar ** l1, gchar ** l2)
+{
+	if (l1 == l2)
+		return TRUE;
+	if (l1 == NULL)
+		return g_strv_length (l2) == 0;
+	if (l2 == NULL)
+		return g_strv_length (l1) == 0;
+
+	while ((*l1 != NULL) && (*l2 != NULL)) {
+		if (*l1 != *l2) {
+			if (*l1 && *l2) {<--- Condition '*l1' is always true<--- Condition '*l2' is always true
+				if (g_ascii_strcasecmp (*l1, *l2))
+					return FALSE;
+			} else
+				return FALSE;
+		}
+
+		l1++;
+		l2++;
+	}
+	return (*l1 == NULL) && (*l2 == NULL);
+}
+
+gboolean
+cafekbd_keyboard_config_get_lv_descriptions (XklConfigRegistry *
+					  config_registry,
+					  const gchar * layout_name,
+					  const gchar * variant_name,
+					  gchar ** layout_short_descr,
+					  gchar ** layout_descr,
+					  gchar ** variant_short_descr,
+					  gchar ** variant_descr)
+{
+	/* TODO make it not static */
+	static XklConfigItem *litem = NULL;
+	static XklConfigItem *vitem = NULL;
+
+	if (litem == NULL)
+		litem = xkl_config_item_new ();
+	if (vitem == NULL)
+		vitem = xkl_config_item_new ();
+
+	layout_name = g_strdup (layout_name);
+
+	g_snprintf (litem->name, sizeof litem->name, "%s", layout_name);
+	if (xkl_config_registry_find_layout (config_registry, litem)) {
+		*layout_short_descr = litem->short_description;
+		*layout_descr = litem->description;
+	} else
+		*layout_short_descr = *layout_descr = NULL;
+
+	if (variant_name != NULL) {
+		variant_name = g_strdup (variant_name);
+		g_snprintf (vitem->name, sizeof vitem->name, "%s",
+			    variant_name);
+		if (xkl_config_registry_find_variant
+		    (config_registry, layout_name, vitem)) {
+			*variant_short_descr = vitem->short_description;
+			*variant_descr = vitem->description;
+		} else
+			*variant_short_descr = *variant_descr = NULL;
+
+		g_free ((char *) variant_name);
+	} else
+		*variant_descr = NULL;
+
+	g_free ((char *) layout_name);
+	return *layout_descr != NULL;
+}
+
+/*
+ * extern common functions
+ */
+const gchar *
+cafekbd_keyboard_config_merge_items (const gchar * parent,
+				  const gchar * child)
+{
+	static gchar buffer[XKL_MAX_CI_NAME_LENGTH * 2 - 1];
+	*buffer = '\0';
+	if (parent != NULL) {
+		if (strlen (parent) >= XKL_MAX_CI_NAME_LENGTH)
+			return NULL;
+		strcat (buffer, parent);
+	}
+	if (child != NULL && *child != 0) {
+		if (strlen (child) >= XKL_MAX_CI_NAME_LENGTH)
+			return NULL;
+		strcat (buffer, "\t");
+		strcat (buffer, child);
+	}
+	return buffer;
+}
+
+gboolean
+cafekbd_keyboard_config_split_items (const gchar * merged, gchar ** parent,
+				  gchar ** child)
+{
+	static gchar pbuffer[XKL_MAX_CI_NAME_LENGTH];
+	static gchar cbuffer[XKL_MAX_CI_NAME_LENGTH];
+	int plen;
+	const gchar *pos;
+	*parent = *child = NULL;
+
+	if (merged == NULL)
+		return FALSE;
+
+	pos = strchr (merged, '\t');
+	if (pos == NULL) {
+		plen = strlen (merged);
+	} else {
+		plen = pos - merged;
+		if (strlen (pos + 1) >= XKL_MAX_CI_NAME_LENGTH)
+			return FALSE;
+		strcpy (*child = cbuffer, pos + 1);
+	}
+	if (plen >= XKL_MAX_CI_NAME_LENGTH)
+		return FALSE;
+	memcpy (*parent = pbuffer, merged, plen);
+	pbuffer[plen] = '\0';
+	return TRUE;
+}
+
+/*
+ * static CafekbdKeyboardConfig functions
+ */
+static void
+cafekbd_keyboard_config_copy_from_xkl_config (CafekbdKeyboardConfig * kbd_config,
+					   XklConfigRec * pdata)
+{
+	char **p;
+	int i;
+	cafekbd_keyboard_config_model_set (kbd_config, pdata->model);
+	xkl_debug (150, "Loaded Kbd model: [%s]\n", pdata->model);
+
+	/* Layouts */
+	g_strfreev (kbd_config->layouts_variants);
+	kbd_config->layouts_variants = NULL;
+	if (pdata->layouts != NULL) {
+		char **p1;
+
+		p = pdata->layouts;
+		p1 = pdata->variants;
+		kbd_config->layouts_variants =
+		    g_new0 (gchar *, g_strv_length (pdata->layouts) + 1);
+		i = 0;
+		while (*p != NULL) {
+			const gchar *full_layout =
+			    cafekbd_keyboard_config_merge_items (*p, *p1);
+			xkl_debug (150,
+				   "Loaded Kbd layout (with variant): [%s]\n",
+				   full_layout);
+			kbd_config->layouts_variants[i++] =
+			    g_strdup (full_layout);
+			p++;
+			p1++;
+		}
+	}
+
+	/* Options */
+	g_strfreev (kbd_config->options);
+	kbd_config->options = NULL;
+
+	if (pdata->options != NULL) {
+		p = pdata->options;
+		kbd_config->options =
+		    g_new0 (gchar *, g_strv_length (pdata->options) + 1);
+		i = 0;
+		while (*p != NULL) {
+			char *option = *p;
+			char *delim =<--- Variable 'delim' can be declared as pointer to const
+			    (option != NULL) ? strchr (option, ':') : NULL;<--- Condition 'option!=NULL' is always true
+			int len;
+			if ((delim != NULL) &&
+			    ((len =
+			      (delim - option)) <
+			     XKL_MAX_CI_NAME_LENGTH)) {
+				char group[XKL_MAX_CI_NAME_LENGTH];
+
+				strncpy (group, option, len);
+				group[len] = 0;
+				xkl_debug (150,
+					   "Loaded Kbd option: [%s][%s]\n",
+					   group, option);
+				cafekbd_keyboard_config_options_set
+				    (kbd_config, i++, group, option);
+			}
+			p++;
+		}
+	}
+}
+
+static void
+cafekbd_keyboard_config_copy_to_xkl_config (CafekbdKeyboardConfig * kbd_config,
+					 XklConfigRec * pdata)
+{
+	int i;
+	int num_layouts, num_options;
+	pdata->model =
+	    (kbd_config->model ==
+	     NULL) ? NULL : g_strdup (kbd_config->model);
+
+	num_layouts =
+	    (kbd_config->layouts_variants ==
+	     NULL) ? 0 : g_strv_length (kbd_config->layouts_variants);
+	num_options =
+	    (kbd_config->options ==
+	     NULL) ? 0 : g_strv_length (kbd_config->options);
+
+	xkl_debug (150, "Taking %d layouts\n", num_layouts);
+	if (num_layouts != 0) {
+		gchar **the_layout_variant = kbd_config->layouts_variants;
+		char **p1 = pdata->layouts =
+		    g_new0 (char *, num_layouts + 1);
+		char **p2 = pdata->variants =
+		    g_new0 (char *, num_layouts + 1);
+		for (i = num_layouts; --i >= 0;) {
+			char *layout, *variant;
+			if (cafekbd_keyboard_config_split_items
+			    (*the_layout_variant, &layout, &variant)
+			    && variant != NULL) {
+				*p1 =
+				    (layout ==
+				     NULL) ? g_strdup ("") :
+				    g_strdup (layout);
+				*p2 =
+				    (variant ==<--- Condition 'variant==NULL' is always false
+				     NULL) ? g_strdup ("") :
+				    g_strdup (variant);
+			} else {
+				*p1 =
+				    (*the_layout_variant ==
+				     NULL) ? g_strdup ("") :
+				    g_strdup (*the_layout_variant);
+				*p2 = g_strdup ("");
+			}
+			xkl_debug (150, "Adding [%s]/%p and [%s]/%p\n",
+				   *p1 ? *p1 : "(nil)", *p1,
+				   *p2 ? *p2 : "(nil)", *p2);
+			p1++;
+			p2++;
+			the_layout_variant++;
+		}
+	}
+
+	if (num_options != 0) {
+		gchar **the_option = kbd_config->options;
+		char **p = pdata->options =
+		    g_new0 (char *, num_options + 1);
+		for (i = num_options; --i >= 0;) {
+			char *group, *option;
+			if (cafekbd_keyboard_config_split_items
+			    (*the_option, &group, &option)
+			    && option != NULL)
+				*(p++) = g_strdup (option);
+			else {
+				*(p++) = g_strdup ("");
+				xkl_debug (150, "Could not split [%s]\n",
+					   *the_option);
+			}
+			the_option++;
+		}
+	}
+}
+
+static void
+cafekbd_keyboard_config_load_params (CafekbdKeyboardConfig * kbd_config,
+				  const gchar * param_names[])
+{
+	gchar *pc;
+
+	pc = g_settings_get_string (kbd_config->settings, param_names[0]);
+	if (pc == NULL) {
+		cafekbd_keyboard_config_model_set (kbd_config, NULL);
+	} else {
+		cafekbd_keyboard_config_model_set (kbd_config, pc);
+		g_free (pc);
+	}
+	xkl_debug (150, "Loaded Kbd model: [%s]\n",
+		   kbd_config->model ? kbd_config->model : "(null)");
+
+	g_strfreev (kbd_config->layouts_variants);
+
+	kbd_config->layouts_variants =
+	    g_settings_get_strv (kbd_config->settings, param_names[1]);
+
+	if (kbd_config->layouts_variants != NULL
+	    && kbd_config->layouts_variants[0] == NULL) {
+		g_strfreev (kbd_config->layouts_variants);
+		kbd_config->layouts_variants = NULL;
+	}
+
+	g_strfreev (kbd_config->options);
+
+	kbd_config->options =
+	    g_settings_get_strv (kbd_config->settings, param_names[2]);
+
+	if (kbd_config->options != NULL && kbd_config->options[0] == NULL) {
+		g_strfreev (kbd_config->options);
+		kbd_config->options = NULL;
+	}
+}
+
+static void
+cafekbd_keyboard_config_save_params (CafekbdKeyboardConfig * kbd_config,
+				  const gchar * param_names[])
+{
+	gchar **pl;
+
+	if (kbd_config->model)
+		g_settings_set_string (kbd_config->settings, param_names[0],
+				       kbd_config->model);
+	else
+		g_settings_set_string (kbd_config->settings, param_names[0],
+				       NULL);
+	xkl_debug (150, "Saved Kbd model: [%s]\n",
+		   kbd_config->model ? kbd_config->model : "(null)");
+
+	if (kbd_config->layouts_variants) {
+		pl = kbd_config->layouts_variants;
+		while (*pl != NULL) {
+			xkl_debug (150, "Saved Kbd layout: [%s]\n", *pl);
+			pl++;
+		}
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[1],
+				     (const gchar * const *)
+				     kbd_config->layouts_variants);
+	} else {
+		xkl_debug (150, "Saved Kbd layouts: []\n");
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[1], NULL);
+	}
+
+	if (kbd_config->options) {
+		pl = kbd_config->options;
+		while (*pl != NULL) {
+			xkl_debug (150, "Saved Kbd option: [%s]\n", *pl);
+			pl++;
+		}
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[2],
+				     (const gchar *
+				      const *) kbd_config->options);
+	} else {
+		xkl_debug (150, "Saved Kbd options: []\n");
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[2], NULL);
+	}
+}
+
+/*
+ * extern CafekbdKeyboardConfig config functions
+ */
+void
+cafekbd_keyboard_config_init (CafekbdKeyboardConfig * kbd_config,
+			      XklEngine * engine)
+{
+	memset (kbd_config, 0, sizeof (*kbd_config));
+	kbd_config->settings = g_settings_new (CAFEKBD_KEYBOARD_CONFIG_SCHEMA);
+	kbd_config->engine = engine;
+}
+
+void
+cafekbd_keyboard_config_term (CafekbdKeyboardConfig * kbd_config)
+{
+	cafekbd_keyboard_config_model_set (kbd_config, NULL);
+
+	g_strfreev (kbd_config->layouts_variants);
+	kbd_config->layouts_variants = NULL;
+	g_strfreev (kbd_config->options);
+	kbd_config->options = NULL;
+
+	g_object_unref (kbd_config->settings);
+	kbd_config->settings = NULL;
+}
+
+void
+cafekbd_keyboard_config_load_from_gsettings (CafekbdKeyboardConfig * kbd_config,
+				      CafekbdKeyboardConfig *
+				      kbd_config_default)
+{
+	cafekbd_keyboard_config_load_params (kbd_config,
+					  CAFEKBD_KEYBOARD_CONFIG_ACTIVE);
+
+	if (kbd_config_default != NULL) {
+
+		if (kbd_config->model == NULL)
+			kbd_config->model =
+			    g_strdup (kbd_config_default->model);
+
+		if (kbd_config->layouts_variants == NULL) {
+			kbd_config->layouts_variants =
+			    g_strdupv
+			    (kbd_config_default->layouts_variants);
+		}
+
+		if (kbd_config->options == NULL) {
+			kbd_config->options =
+			    g_strdupv (kbd_config_default->options);
+		}
+	}
+}
+
+void
+cafekbd_keyboard_config_load_from_x_current (CafekbdKeyboardConfig * kbd_config,
+					  XklConfigRec * data)
+{
+	gboolean own_data = data == NULL;
+	xkl_debug (150, "Copying config from X(current)\n");
+	if (own_data)
+		data = xkl_config_rec_new ();
+	if (xkl_config_rec_get_from_server (data, kbd_config->engine))
+		cafekbd_keyboard_config_copy_from_xkl_config (kbd_config,
+							   data);
+	else
+		xkl_debug (150,
+			   "Could not load keyboard config from server: [%s]\n",
+			   xkl_get_last_error ());
+	if (own_data)
+		g_object_unref (G_OBJECT (data));
+}
+
+void
+cafekbd_keyboard_config_load_from_x_initial (CafekbdKeyboardConfig * kbd_config,
+					  XklConfigRec * data)
+{
+	gboolean own_data = data == NULL;
+	xkl_debug (150, "Copying config from X(initial)\n");
+	if (own_data)
+		data = xkl_config_rec_new ();
+	if (xkl_config_rec_get_from_backup (data, kbd_config->engine))
+		cafekbd_keyboard_config_copy_from_xkl_config (kbd_config,
+							   data);
+	else
+		xkl_debug (150,
+			   "Could not load keyboard config from backup: [%s]\n",
+			   xkl_get_last_error ());
+	if (own_data)
+		g_object_unref (G_OBJECT (data));
+}
+
+static gboolean
+cafekbd_keyboard_config_options_equals (CafekbdKeyboardConfig * kbd_config1,
+				     CafekbdKeyboardConfig * kbd_config2)
+{
+	int num_options, num_options2;
+
+	num_options =
+	    (kbd_config1->options ==
+	     NULL) ? 0 : g_strv_length (kbd_config1->options);
+	num_options2 =
+	    (kbd_config2->options ==
+	     NULL) ? 0 : g_strv_length (kbd_config2->options);
+
+	if (num_options != num_options2)
+		return False;
+
+	if (num_options != 0) {
+		int i;
+		char *group1, *option1;
+
+		for (i = 0; i < num_options; i++) {
+			int j;
+			char *group2, *option2;
+			gboolean are_equal = FALSE;
+
+			if (!cafekbd_keyboard_config_split_items
+			    (kbd_config1->options[i], &group1, &option1))
+				continue;
+
+			option1 = g_strdup (option1);
+
+			for (j = 0; j < num_options && !are_equal; j++) {
+				if (cafekbd_keyboard_config_split_items
+				    (kbd_config2->options[j], &group2,
+				     &option2)) {
+					are_equal =
+					    strcmp (option1, option2) == 0;
+				}
+			}
+
+			g_free (option1);
+
+			if (!are_equal)
+				return False;
+		}
+	}
+
+	return True;
+}
+
+gboolean
+cafekbd_keyboard_config_equals (CafekbdKeyboardConfig * kbd_config1,
+			     CafekbdKeyboardConfig * kbd_config2)
+{
+	if (kbd_config1 == kbd_config2)
+		return True;
+	if ((kbd_config1->model != kbd_config2->model) &&
+	    (kbd_config1->model != NULL) &&
+	    (kbd_config2->model != NULL) &&
+	    g_ascii_strcasecmp (kbd_config1->model, kbd_config2->model))
+		return False;
+	if (!cafekbd_strv_equal (kbd_config1->layouts_variants,
+			   kbd_config2->layouts_variants))
+		return False;
+
+	if (!cafekbd_keyboard_config_options_equals
+	    (kbd_config1, kbd_config2))
+		return False;
+
+	return True;
+}
+
+void
+cafekbd_keyboard_config_save_to_gsettings (CafekbdKeyboardConfig * kbd_config)
+{
+	g_settings_delay (kbd_config->settings);
+
+	cafekbd_keyboard_config_save_params (kbd_config,
+					     CAFEKBD_KEYBOARD_CONFIG_ACTIVE);
+
+	g_settings_apply (kbd_config->settings);
+}
+
+void
+cafekbd_keyboard_config_model_set (CafekbdKeyboardConfig * kbd_config,
+				const gchar * model_name)
+{
+	if (kbd_config->model != NULL)
+		g_free (kbd_config->model);
+	kbd_config->model =
+	    (model_name == NULL
+	     || model_name[0] == '\0') ? NULL : g_strdup (model_name);
+}
+
+void
+cafekbd_keyboard_config_options_set (CafekbdKeyboardConfig * kbd_config,
+				  gint idx,
+				  const gchar * group_name,
+				  const gchar * option_name)
+{
+	const gchar *merged;
+	if (group_name == NULL || option_name == NULL)
+		return;
+	merged =
+	    cafekbd_keyboard_config_merge_items (group_name, option_name);
+	if (merged == NULL)
+		return;
+	kbd_config->options[idx] = g_strdup (merged);
+}
+
+gboolean
+cafekbd_keyboard_config_options_is_set (CafekbdKeyboardConfig * kbd_config,<--- Parameter 'kbd_config' can be declared as pointer to const
+				     const gchar * group_name,
+				     const gchar * option_name)
+{
+	gchar **p = kbd_config->options;
+	const gchar *merged =
+	    cafekbd_keyboard_config_merge_items (group_name, option_name);
+	if (merged == NULL)
+		return FALSE;
+
+	while (p && *p) {
+		if (!g_ascii_strcasecmp (merged, *p++))
+			return TRUE;
+	}
+	return FALSE;
+}
+
+gboolean
+cafekbd_keyboard_config_activate (CafekbdKeyboardConfig * kbd_config)
+{
+	gboolean rv;
+	XklConfigRec *data = xkl_config_rec_new ();
+
+	cafekbd_keyboard_config_copy_to_xkl_config (kbd_config, data);
+	rv = xkl_config_rec_activate (data, kbd_config->engine);
+	g_object_unref (G_OBJECT (data));
+
+	return rv;
+}
+
+/**
+ * cafekbd_keyboard_config_start_listen:
+ * @func: (scope notified): a function to call when settings are changed
+ */
+void
+cafekbd_keyboard_config_start_listen (CafekbdKeyboardConfig * kbd_config,
+				   GCallback func,
+				   gpointer user_data)
+{
+	kbd_config->config_listener_id =
+	    g_signal_connect (kbd_config->settings, "changed", func,
+			      user_data);
+}
+
+void
+cafekbd_keyboard_config_stop_listen (CafekbdKeyboardConfig * kbd_config)
+{
+	g_signal_handler_disconnect (kbd_config->settings,
+				     kbd_config->config_listener_id);
+	kbd_config->config_listener_id = 0;
+}
+
+gboolean
+cafekbd_keyboard_config_get_descriptions (XklConfigRegistry * config_registry,
+				       const gchar * name,
+				       gchar ** layout_short_descr,
+				       gchar ** layout_descr,
+				       gchar ** variant_short_descr,
+				       gchar ** variant_descr)
+{
+	char *layout_name = NULL, *variant_name = NULL;
+	if (!cafekbd_keyboard_config_split_items
+	    (name, &layout_name, &variant_name))
+		return FALSE;
+	return cafekbd_keyboard_config_get_lv_descriptions (config_registry,
+							 layout_name,
+							 variant_name,
+							 layout_short_descr,
+							 layout_descr,
+							 variant_short_descr,
+							 variant_descr);
+}
+
+const gchar *
+cafekbd_keyboard_config_format_full_layout (const gchar * layout_descr,
+					 const gchar * variant_descr)
+{
+	static gchar full_descr[XKL_MAX_CI_DESC_LENGTH * 2];
+	if (variant_descr == NULL || variant_descr[0] == 0)
+		g_snprintf (full_descr, sizeof (full_descr), "%s",
+			    layout_descr);
+	else
+		g_snprintf (full_descr, sizeof (full_descr), "%s %s",
+			    layout_descr, variant_descr);
+	return full_descr;
+}
+
+gchar *
+cafekbd_keyboard_config_to_string (const CafekbdKeyboardConfig * config)
+{
+	gchar *layouts = NULL, *options = NULL;
+	GString *buffer = g_string_new (NULL);
+
+	gchar **iter;
+	gint count;
+	gchar *result;
+
+	if (config->layouts_variants) {
+		/* g_slist_length is "expensive", so we determinate the length on the fly */
+		for (iter = config->layouts_variants, count = 0; *iter;
+		     iter++, ++count) {
+			if (buffer->len)
+				g_string_append (buffer, " ");
+
+			g_string_append (buffer, *iter);
+		}
+
+		/* Translators: The count is related to the number of options. The %s
+		 * format specifier should not be modified, left "as is". */
+		layouts =
+		    g_strdup_printf (ngettext
+				     ("layout \"%s\"", "layouts \"%s\"",
+				      count), buffer->str);
+		g_string_truncate (buffer, 0);
+	}
+	if (config->options) {
+		/* g_slist_length is "expensive", so we determinate the length on the fly */
+		for (iter = config->options, count = 0; *iter;
+		     iter++, ++count) {
+			if (buffer->len)
+				g_string_append (buffer, " ");
+
+			g_string_append (buffer, *iter);
+		}
+
+		/* Translators: The count is related to the number of options. The %s
+		 * format specifier should not be modified, left "as is". */
+		options =
+		    g_strdup_printf (ngettext
+				     ("option \"%s\"", "options \"%s\"",
+				      count), buffer->str);
+		g_string_truncate (buffer, 0);
+	}
+
+	g_string_free (buffer, TRUE);
+
+	result =
+	    g_strdup_printf (_("model \"%s\", %s and %s"), config->model,
+			     layouts ? layouts : _("no layout"),
+			     options ? options : _("no options"));
+
+	g_free (options);
+	g_free (layouts);
+
+	return result;
+}
+
+/**
+ * cafekbd_keyboard_config_add_default_switch_option_if_necessary:
+ *
+ * Returns: (transfer full) (array zero-terminated=1): List of options
+ */
+gchar **
+cafekbd_keyboard_config_add_default_switch_option_if_necessary (gchar **
+							        layouts_list,
+							        gchar **
+							        options_list,
+							        gboolean *was_appended)
+{
+	*was_appended = FALSE;
+	if (g_strv_length (layouts_list) >= 2) {
+		gboolean any_switcher = False;
+		if (*options_list != NULL) {
+			gchar **option = options_list;
+			while (*option != NULL) {
+				char *g, *o;
+				if (cafekbd_keyboard_config_split_items
+				    (*option, &g, &o)) {
+					if (!g_ascii_strcasecmp
+					    (g, GROUP_SWITCHERS_GROUP)) {
+						any_switcher = True;
+						break;
+					}
+				}
+				option++;
+			}
+		}
+		if (!any_switcher) {
+			const gchar *id =
+			    cafekbd_keyboard_config_merge_items
+			    (GROUP_SWITCHERS_GROUP,
+			     DEFAULT_GROUP_SWITCH);
+			options_list =
+			    cafekbd_strv_append (options_list, g_strdup (id));
+			*was_appended = TRUE;
+		}
+	}
+	return options_list;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/4.html b/2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/4.html new file mode 100644 index 0000000..1d97c26 --- /dev/null +++ b/2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/4.html @@ -0,0 +1,6042 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
   1
+   2
+   3
+   4
+   5
+   6
+   7
+   8
+   9
+  10
+  11
+  12
+  13
+  14
+  15
+  16
+  17
+  18
+  19
+  20
+  21
+  22
+  23
+  24
+  25
+  26
+  27
+  28
+  29
+  30
+  31
+  32
+  33
+  34
+  35
+  36
+  37
+  38
+  39
+  40
+  41
+  42
+  43
+  44
+  45
+  46
+  47
+  48
+  49
+  50
+  51
+  52
+  53
+  54
+  55
+  56
+  57
+  58
+  59
+  60
+  61
+  62
+  63
+  64
+  65
+  66
+  67
+  68
+  69
+  70
+  71
+  72
+  73
+  74
+  75
+  76
+  77
+  78
+  79
+  80
+  81
+  82
+  83
+  84
+  85
+  86
+  87
+  88
+  89
+  90
+  91
+  92
+  93
+  94
+  95
+  96
+  97
+  98
+  99
+ 100
+ 101
+ 102
+ 103
+ 104
+ 105
+ 106
+ 107
+ 108
+ 109
+ 110
+ 111
+ 112
+ 113
+ 114
+ 115
+ 116
+ 117
+ 118
+ 119
+ 120
+ 121
+ 122
+ 123
+ 124
+ 125
+ 126
+ 127
+ 128
+ 129
+ 130
+ 131
+ 132
+ 133
+ 134
+ 135
+ 136
+ 137
+ 138
+ 139
+ 140
+ 141
+ 142
+ 143
+ 144
+ 145
+ 146
+ 147
+ 148
+ 149
+ 150
+ 151
+ 152
+ 153
+ 154
+ 155
+ 156
+ 157
+ 158
+ 159
+ 160
+ 161
+ 162
+ 163
+ 164
+ 165
+ 166
+ 167
+ 168
+ 169
+ 170
+ 171
+ 172
+ 173
+ 174
+ 175
+ 176
+ 177
+ 178
+ 179
+ 180
+ 181
+ 182
+ 183
+ 184
+ 185
+ 186
+ 187
+ 188
+ 189
+ 190
+ 191
+ 192
+ 193
+ 194
+ 195
+ 196
+ 197
+ 198
+ 199
+ 200
+ 201
+ 202
+ 203
+ 204
+ 205
+ 206
+ 207
+ 208
+ 209
+ 210
+ 211
+ 212
+ 213
+ 214
+ 215
+ 216
+ 217
+ 218
+ 219
+ 220
+ 221
+ 222
+ 223
+ 224
+ 225
+ 226
+ 227
+ 228
+ 229
+ 230
+ 231
+ 232
+ 233
+ 234
+ 235
+ 236
+ 237
+ 238
+ 239
+ 240
+ 241
+ 242
+ 243
+ 244
+ 245
+ 246
+ 247
+ 248
+ 249
+ 250
+ 251
+ 252
+ 253
+ 254
+ 255
+ 256
+ 257
+ 258
+ 259
+ 260
+ 261
+ 262
+ 263
+ 264
+ 265
+ 266
+ 267
+ 268
+ 269
+ 270
+ 271
+ 272
+ 273
+ 274
+ 275
+ 276
+ 277
+ 278
+ 279
+ 280
+ 281
+ 282
+ 283
+ 284
+ 285
+ 286
+ 287
+ 288
+ 289
+ 290
+ 291
+ 292
+ 293
+ 294
+ 295
+ 296
+ 297
+ 298
+ 299
+ 300
+ 301
+ 302
+ 303
+ 304
+ 305
+ 306
+ 307
+ 308
+ 309
+ 310
+ 311
+ 312
+ 313
+ 314
+ 315
+ 316
+ 317
+ 318
+ 319
+ 320
+ 321
+ 322
+ 323
+ 324
+ 325
+ 326
+ 327
+ 328
+ 329
+ 330
+ 331
+ 332
+ 333
+ 334
+ 335
+ 336
+ 337
+ 338
+ 339
+ 340
+ 341
+ 342
+ 343
+ 344
+ 345
+ 346
+ 347
+ 348
+ 349
+ 350
+ 351
+ 352
+ 353
+ 354
+ 355
+ 356
+ 357
+ 358
+ 359
+ 360
+ 361
+ 362
+ 363
+ 364
+ 365
+ 366
+ 367
+ 368
+ 369
+ 370
+ 371
+ 372
+ 373
+ 374
+ 375
+ 376
+ 377
+ 378
+ 379
+ 380
+ 381
+ 382
+ 383
+ 384
+ 385
+ 386
+ 387
+ 388
+ 389
+ 390
+ 391
+ 392
+ 393
+ 394
+ 395
+ 396
+ 397
+ 398
+ 399
+ 400
+ 401
+ 402
+ 403
+ 404
+ 405
+ 406
+ 407
+ 408
+ 409
+ 410
+ 411
+ 412
+ 413
+ 414
+ 415
+ 416
+ 417
+ 418
+ 419
+ 420
+ 421
+ 422
+ 423
+ 424
+ 425
+ 426
+ 427
+ 428
+ 429
+ 430
+ 431
+ 432
+ 433
+ 434
+ 435
+ 436
+ 437
+ 438
+ 439
+ 440
+ 441
+ 442
+ 443
+ 444
+ 445
+ 446
+ 447
+ 448
+ 449
+ 450
+ 451
+ 452
+ 453
+ 454
+ 455
+ 456
+ 457
+ 458
+ 459
+ 460
+ 461
+ 462
+ 463
+ 464
+ 465
+ 466
+ 467
+ 468
+ 469
+ 470
+ 471
+ 472
+ 473
+ 474
+ 475
+ 476
+ 477
+ 478
+ 479
+ 480
+ 481
+ 482
+ 483
+ 484
+ 485
+ 486
+ 487
+ 488
+ 489
+ 490
+ 491
+ 492
+ 493
+ 494
+ 495
+ 496
+ 497
+ 498
+ 499
+ 500
+ 501
+ 502
+ 503
+ 504
+ 505
+ 506
+ 507
+ 508
+ 509
+ 510
+ 511
+ 512
+ 513
+ 514
+ 515
+ 516
+ 517
+ 518
+ 519
+ 520
+ 521
+ 522
+ 523
+ 524
+ 525
+ 526
+ 527
+ 528
+ 529
+ 530
+ 531
+ 532
+ 533
+ 534
+ 535
+ 536
+ 537
+ 538
+ 539
+ 540
+ 541
+ 542
+ 543
+ 544
+ 545
+ 546
+ 547
+ 548
+ 549
+ 550
+ 551
+ 552
+ 553
+ 554
+ 555
+ 556
+ 557
+ 558
+ 559
+ 560
+ 561
+ 562
+ 563
+ 564
+ 565
+ 566
+ 567
+ 568
+ 569
+ 570
+ 571
+ 572
+ 573
+ 574
+ 575
+ 576
+ 577
+ 578
+ 579
+ 580
+ 581
+ 582
+ 583
+ 584
+ 585
+ 586
+ 587
+ 588
+ 589
+ 590
+ 591
+ 592
+ 593
+ 594
+ 595
+ 596
+ 597
+ 598
+ 599
+ 600
+ 601
+ 602
+ 603
+ 604
+ 605
+ 606
+ 607
+ 608
+ 609
+ 610
+ 611
+ 612
+ 613
+ 614
+ 615
+ 616
+ 617
+ 618
+ 619
+ 620
+ 621
+ 622
+ 623
+ 624
+ 625
+ 626
+ 627
+ 628
+ 629
+ 630
+ 631
+ 632
+ 633
+ 634
+ 635
+ 636
+ 637
+ 638
+ 639
+ 640
+ 641
+ 642
+ 643
+ 644
+ 645
+ 646
+ 647
+ 648
+ 649
+ 650
+ 651
+ 652
+ 653
+ 654
+ 655
+ 656
+ 657
+ 658
+ 659
+ 660
+ 661
+ 662
+ 663
+ 664
+ 665
+ 666
+ 667
+ 668
+ 669
+ 670
+ 671
+ 672
+ 673
+ 674
+ 675
+ 676
+ 677
+ 678
+ 679
+ 680
+ 681
+ 682
+ 683
+ 684
+ 685
+ 686
+ 687
+ 688
+ 689
+ 690
+ 691
+ 692
+ 693
+ 694
+ 695
+ 696
+ 697
+ 698
+ 699
+ 700
+ 701
+ 702
+ 703
+ 704
+ 705
+ 706
+ 707
+ 708
+ 709
+ 710
+ 711
+ 712
+ 713
+ 714
+ 715
+ 716
+ 717
+ 718
+ 719
+ 720
+ 721
+ 722
+ 723
+ 724
+ 725
+ 726
+ 727
+ 728
+ 729
+ 730
+ 731
+ 732
+ 733
+ 734
+ 735
+ 736
+ 737
+ 738
+ 739
+ 740
+ 741
+ 742
+ 743
+ 744
+ 745
+ 746
+ 747
+ 748
+ 749
+ 750
+ 751
+ 752
+ 753
+ 754
+ 755
+ 756
+ 757
+ 758
+ 759
+ 760
+ 761
+ 762
+ 763
+ 764
+ 765
+ 766
+ 767
+ 768
+ 769
+ 770
+ 771
+ 772
+ 773
+ 774
+ 775
+ 776
+ 777
+ 778
+ 779
+ 780
+ 781
+ 782
+ 783
+ 784
+ 785
+ 786
+ 787
+ 788
+ 789
+ 790
+ 791
+ 792
+ 793
+ 794
+ 795
+ 796
+ 797
+ 798
+ 799
+ 800
+ 801
+ 802
+ 803
+ 804
+ 805
+ 806
+ 807
+ 808
+ 809
+ 810
+ 811
+ 812
+ 813
+ 814
+ 815
+ 816
+ 817
+ 818
+ 819
+ 820
+ 821
+ 822
+ 823
+ 824
+ 825
+ 826
+ 827
+ 828
+ 829
+ 830
+ 831
+ 832
+ 833
+ 834
+ 835
+ 836
+ 837
+ 838
+ 839
+ 840
+ 841
+ 842
+ 843
+ 844
+ 845
+ 846
+ 847
+ 848
+ 849
+ 850
+ 851
+ 852
+ 853
+ 854
+ 855
+ 856
+ 857
+ 858
+ 859
+ 860
+ 861
+ 862
+ 863
+ 864
+ 865
+ 866
+ 867
+ 868
+ 869
+ 870
+ 871
+ 872
+ 873
+ 874
+ 875
+ 876
+ 877
+ 878
+ 879
+ 880
+ 881
+ 882
+ 883
+ 884
+ 885
+ 886
+ 887
+ 888
+ 889
+ 890
+ 891
+ 892
+ 893
+ 894
+ 895
+ 896
+ 897
+ 898
+ 899
+ 900
+ 901
+ 902
+ 903
+ 904
+ 905
+ 906
+ 907
+ 908
+ 909
+ 910
+ 911
+ 912
+ 913
+ 914
+ 915
+ 916
+ 917
+ 918
+ 919
+ 920
+ 921
+ 922
+ 923
+ 924
+ 925
+ 926
+ 927
+ 928
+ 929
+ 930
+ 931
+ 932
+ 933
+ 934
+ 935
+ 936
+ 937
+ 938
+ 939
+ 940
+ 941
+ 942
+ 943
+ 944
+ 945
+ 946
+ 947
+ 948
+ 949
+ 950
+ 951
+ 952
+ 953
+ 954
+ 955
+ 956
+ 957
+ 958
+ 959
+ 960
+ 961
+ 962
+ 963
+ 964
+ 965
+ 966
+ 967
+ 968
+ 969
+ 970
+ 971
+ 972
+ 973
+ 974
+ 975
+ 976
+ 977
+ 978
+ 979
+ 980
+ 981
+ 982
+ 983
+ 984
+ 985
+ 986
+ 987
+ 988
+ 989
+ 990
+ 991
+ 992
+ 993
+ 994
+ 995
+ 996
+ 997
+ 998
+ 999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+1011
+1012
+1013
+1014
+1015
+1016
+1017
+1018
+1019
+1020
+1021
+1022
+1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
+1033
+1034
+1035
+1036
+1037
+1038
+1039
+1040
+1041
+1042
+1043
+1044
+1045
+1046
+1047
+1048
+1049
+1050
+1051
+1052
+1053
+1054
+1055
+1056
+1057
+1058
+1059
+1060
+1061
+1062
+1063
+1064
+1065
+1066
+1067
+1068
+1069
+1070
+1071
+1072
+1073
+1074
+1075
+1076
+1077
+1078
+1079
+1080
+1081
+1082
+1083
+1084
+1085
+1086
+1087
+1088
+1089
+1090
+1091
+1092
+1093
+1094
+1095
+1096
+1097
+1098
+1099
+1100
+1101
+1102
+1103
+1104
+1105
+1106
+1107
+1108
+1109
+1110
+1111
+1112
+1113
+1114
+1115
+1116
+1117
+1118
+1119
+1120
+1121
+1122
+1123
+1124
+1125
+1126
+1127
+1128
+1129
+1130
+1131
+1132
+1133
+1134
+1135
+1136
+1137
+1138
+1139
+1140
+1141
+1142
+1143
+1144
+1145
+1146
+1147
+1148
+1149
+1150
+1151
+1152
+1153
+1154
+1155
+1156
+1157
+1158
+1159
+1160
+1161
+1162
+1163
+1164
+1165
+1166
+1167
+1168
+1169
+1170
+1171
+1172
+1173
+1174
+1175
+1176
+1177
+1178
+1179
+1180
+1181
+1182
+1183
+1184
+1185
+1186
+1187
+1188
+1189
+1190
+1191
+1192
+1193
+1194
+1195
+1196
+1197
+1198
+1199
+1200
+1201
+1202
+1203
+1204
+1205
+1206
+1207
+1208
+1209
+1210
+1211
+1212
+1213
+1214
+1215
+1216
+1217
+1218
+1219
+1220
+1221
+1222
+1223
+1224
+1225
+1226
+1227
+1228
+1229
+1230
+1231
+1232
+1233
+1234
+1235
+1236
+1237
+1238
+1239
+1240
+1241
+1242
+1243
+1244
+1245
+1246
+1247
+1248
+1249
+1250
+1251
+1252
+1253
+1254
+1255
+1256
+1257
+1258
+1259
+1260
+1261
+1262
+1263
+1264
+1265
+1266
+1267
+1268
+1269
+1270
+1271
+1272
+1273
+1274
+1275
+1276
+1277
+1278
+1279
+1280
+1281
+1282
+1283
+1284
+1285
+1286
+1287
+1288
+1289
+1290
+1291
+1292
+1293
+1294
+1295
+1296
+1297
+1298
+1299
+1300
+1301
+1302
+1303
+1304
+1305
+1306
+1307
+1308
+1309
+1310
+1311
+1312
+1313
+1314
+1315
+1316
+1317
+1318
+1319
+1320
+1321
+1322
+1323
+1324
+1325
+1326
+1327
+1328
+1329
+1330
+1331
+1332
+1333
+1334
+1335
+1336
+1337
+1338
+1339
+1340
+1341
+1342
+1343
+1344
+1345
+1346
+1347
+1348
+1349
+1350
+1351
+1352
+1353
+1354
+1355
+1356
+1357
+1358
+1359
+1360
+1361
+1362
+1363
+1364
+1365
+1366
+1367
+1368
+1369
+1370
+1371
+1372
+1373
+1374
+1375
+1376
+1377
+1378
+1379
+1380
+1381
+1382
+1383
+1384
+1385
+1386
+1387
+1388
+1389
+1390
+1391
+1392
+1393
+1394
+1395
+1396
+1397
+1398
+1399
+1400
+1401
+1402
+1403
+1404
+1405
+1406
+1407
+1408
+1409
+1410
+1411
+1412
+1413
+1414
+1415
+1416
+1417
+1418
+1419
+1420
+1421
+1422
+1423
+1424
+1425
+1426
+1427
+1428
+1429
+1430
+1431
+1432
+1433
+1434
+1435
+1436
+1437
+1438
+1439
+1440
+1441
+1442
+1443
+1444
+1445
+1446
+1447
+1448
+1449
+1450
+1451
+1452
+1453
+1454
+1455
+1456
+1457
+1458
+1459
+1460
+1461
+1462
+1463
+1464
+1465
+1466
+1467
+1468
+1469
+1470
+1471
+1472
+1473
+1474
+1475
+1476
+1477
+1478
+1479
+1480
+1481
+1482
+1483
+1484
+1485
+1486
+1487
+1488
+1489
+1490
+1491
+1492
+1493
+1494
+1495
+1496
+1497
+1498
+1499
+1500
+1501
+1502
+1503
+1504
+1505
+1506
+1507
+1508
+1509
+1510
+1511
+1512
+1513
+1514
+1515
+1516
+1517
+1518
+1519
+1520
+1521
+1522
+1523
+1524
+1525
+1526
+1527
+1528
+1529
+1530
+1531
+1532
+1533
+1534
+1535
+1536
+1537
+1538
+1539
+1540
+1541
+1542
+1543
+1544
+1545
+1546
+1547
+1548
+1549
+1550
+1551
+1552
+1553
+1554
+1555
+1556
+1557
+1558
+1559
+1560
+1561
+1562
+1563
+1564
+1565
+1566
+1567
+1568
+1569
+1570
+1571
+1572
+1573
+1574
+1575
+1576
+1577
+1578
+1579
+1580
+1581
+1582
+1583
+1584
+1585
+1586
+1587
+1588
+1589
+1590
+1591
+1592
+1593
+1594
+1595
+1596
+1597
+1598
+1599
+1600
+1601
+1602
+1603
+1604
+1605
+1606
+1607
+1608
+1609
+1610
+1611
+1612
+1613
+1614
+1615
+1616
+1617
+1618
+1619
+1620
+1621
+1622
+1623
+1624
+1625
+1626
+1627
+1628
+1629
+1630
+1631
+1632
+1633
+1634
+1635
+1636
+1637
+1638
+1639
+1640
+1641
+1642
+1643
+1644
+1645
+1646
+1647
+1648
+1649
+1650
+1651
+1652
+1653
+1654
+1655
+1656
+1657
+1658
+1659
+1660
+1661
+1662
+1663
+1664
+1665
+1666
+1667
+1668
+1669
+1670
+1671
+1672
+1673
+1674
+1675
+1676
+1677
+1678
+1679
+1680
+1681
+1682
+1683
+1684
+1685
+1686
+1687
+1688
+1689
+1690
+1691
+1692
+1693
+1694
+1695
+1696
+1697
+1698
+1699
+1700
+1701
+1702
+1703
+1704
+1705
+1706
+1707
+1708
+1709
+1710
+1711
+1712
+1713
+1714
+1715
+1716
+1717
+1718
+1719
+1720
+1721
+1722
+1723
+1724
+1725
+1726
+1727
+1728
+1729
+1730
+1731
+1732
+1733
+1734
+1735
+1736
+1737
+1738
+1739
+1740
+1741
+1742
+1743
+1744
+1745
+1746
+1747
+1748
+1749
+1750
+1751
+1752
+1753
+1754
+1755
+1756
+1757
+1758
+1759
+1760
+1761
+1762
+1763
+1764
+1765
+1766
+1767
+1768
+1769
+1770
+1771
+1772
+1773
+1774
+1775
+1776
+1777
+1778
+1779
+1780
+1781
+1782
+1783
+1784
+1785
+1786
+1787
+1788
+1789
+1790
+1791
+1792
+1793
+1794
+1795
+1796
+1797
+1798
+1799
+1800
+1801
+1802
+1803
+1804
+1805
+1806
+1807
+1808
+1809
+1810
+1811
+1812
+1813
+1814
+1815
+1816
+1817
+1818
+1819
+1820
+1821
+1822
+1823
+1824
+1825
+1826
+1827
+1828
+1829
+1830
+1831
+1832
+1833
+1834
+1835
+1836
+1837
+1838
+1839
+1840
+1841
+1842
+1843
+1844
+1845
+1846
+1847
+1848
+1849
+1850
+1851
+1852
+1853
+1854
+1855
+1856
+1857
+1858
+1859
+1860
+1861
+1862
+1863
+1864
+1865
+1866
+1867
+1868
+1869
+1870
+1871
+1872
+1873
+1874
+1875
+1876
+1877
+1878
+1879
+1880
+1881
+1882
+1883
+1884
+1885
+1886
+1887
+1888
+1889
+1890
+1891
+1892
+1893
+1894
+1895
+1896
+1897
+1898
+1899
+1900
+1901
+1902
+1903
+1904
+1905
+1906
+1907
+1908
+1909
+1910
+1911
+1912
+1913
+1914
+1915
+1916
+1917
+1918
+1919
+1920
+1921
+1922
+1923
+1924
+1925
+1926
+1927
+1928
+1929
+1930
+1931
+1932
+1933
+1934
+1935
+1936
+1937
+1938
+1939
+1940
+1941
+1942
+1943
+1944
+1945
+1946
+1947
+1948
+1949
+1950
+1951
+1952
+1953
+1954
+1955
+1956
+1957
+1958
+1959
+1960
+1961
+1962
+1963
+1964
+1965
+1966
+1967
+1968
+1969
+1970
+1971
+1972
+1973
+1974
+1975
+1976
+1977
+1978
+1979
+1980
+1981
+1982
+1983
+1984
+1985
+1986
+1987
+1988
+1989
+1990
+1991
+1992
+1993
+1994
+1995
+1996
+1997
+1998
+1999
+2000
+2001
+2002
+2003
+2004
+2005
+2006
+2007
+2008
+2009
+2010
+2011
+2012
+2013
+2014
+2015
+2016
+2017
+2018
+2019
+2020
+2021
+2022
+2023
+2024
+2025
+2026
+2027
+2028
+2029
+2030
+2031
+2032
+2033
+2034
+2035
+2036
+2037
+2038
+2039
+2040
+2041
+2042
+2043
+2044
+2045
+2046
+2047
+2048
+2049
+2050
+2051
+2052
+2053
+2054
+2055
+2056
+2057
+2058
+2059
+2060
+2061
+2062
+2063
+2064
+2065
+2066
+2067
+2068
+2069
+2070
+2071
+2072
+2073
+2074
+2075
+2076
+2077
+2078
+2079
+2080
+2081
+2082
+2083
+2084
+2085
+2086
+2087
+2088
+2089
+2090
+2091
+2092
+2093
+2094
+2095
+2096
+2097
+2098
+2099
+2100
+2101
+2102
+2103
+2104
+2105
+2106
+2107
+2108
+2109
+2110
+2111
+2112
+2113
+2114
+2115
+2116
+2117
+2118
+2119
+2120
+2121
+2122
+2123
+2124
+2125
+2126
+2127
+2128
+2129
+2130
+2131
+2132
+2133
+2134
+2135
+2136
+2137
+2138
+2139
+2140
+2141
+2142
+2143
+2144
+2145
+2146
+2147
+2148
+2149
+2150
+2151
+2152
+2153
+2154
+2155
+2156
+2157
+2158
+2159
+2160
+2161
+2162
+2163
+2164
+2165
+2166
+2167
+2168
+2169
+2170
+2171
+2172
+2173
+2174
+2175
+2176
+2177
+2178
+2179
+2180
+2181
+2182
+2183
+2184
+2185
+2186
+2187
+2188
+2189
+2190
+2191
+2192
+2193
+2194
+2195
+2196
+2197
+2198
+2199
+2200
+2201
+2202
+2203
+2204
+2205
+2206
+2207
+2208
+2209
+2210
+2211
+2212
+2213
+2214
+2215
+2216
+2217
+2218
+2219
+2220
+2221
+2222
+2223
+2224
+2225
+2226
+2227
+2228
+2229
+2230
+2231
+2232
+2233
+2234
+2235
+2236
+2237
+2238
+2239
+2240
+2241
+2242
+2243
+2244
+2245
+2246
+2247
+2248
+2249
+2250
+2251
+2252
+2253
+2254
+2255
+2256
+2257
+2258
+2259
+2260
+2261
+2262
+2263
+2264
+2265
+2266
+2267
+2268
+2269
+2270
+2271
+2272
+2273
+2274
+2275
+2276
+2277
+2278
+2279
+2280
+2281
+2282
+2283
+2284
+2285
+2286
+2287
+2288
+2289
+2290
+2291
+2292
+2293
+2294
+2295
+2296
+2297
+2298
+2299
+2300
+2301
+2302
+2303
+2304
+2305
+2306
+2307
+2308
+2309
+2310
+2311
+2312
+2313
+2314
+2315
+2316
+2317
+2318
+2319
+2320
+2321
+2322
+2323
+2324
+2325
+2326
+2327
+2328
+2329
+2330
+2331
+2332
+2333
+2334
+2335
+2336
+2337
+2338
+2339
+2340
+2341
+2342
+2343
+2344
+2345
+2346
+2347
+2348
+2349
+2350
+2351
+2352
+2353
+2354
+2355
+2356
+2357
+2358
+2359
+2360
+2361
+2362
+2363
+2364
+2365
+2366
+2367
+2368
+2369
+2370
+2371
+2372
+2373
+2374
+2375
+2376
+2377
+2378
+2379
+2380
+2381
+2382
+2383
+2384
+2385
+2386
+2387
+2388
+2389
+2390
+2391
+2392
+2393
+2394
+2395
+2396
+2397
+2398
+2399
+2400
+2401
+2402
+2403
+2404
+2405
+2406
+2407
+2408
+2409
+2410
+2411
+2412
+2413
+2414
+2415
+2416
+2417
+2418
+2419
+2420
+2421
+2422
+2423
+2424
+2425
+2426
+2427
+2428
+2429
+2430
+2431
+2432
+2433
+2434
+2435
+2436
+2437
+2438
+2439
+2440
+2441
+2442
+2443
+2444
+2445
+2446
+2447
+2448
+2449
+2450
+2451
+2452
+2453
+2454
+2455
+2456
+2457
+2458
+2459
+2460
+2461
+2462
+2463
+2464
+2465
+2466
+2467
+2468
+2469
+2470
+2471
+2472
+2473
+2474
+2475
+2476
+2477
+2478
+2479
+2480
+2481
+2482
+2483
+2484
+2485
+2486
+2487
+2488
+2489
+2490
+2491
+2492
+2493
+2494
+2495
+2496
+2497
+2498
+2499
+2500
+2501
+2502
+2503
+2504
+2505
+2506
+2507
+2508
+2509
+2510
+2511
+2512
+2513
+2514
+2515
+2516
+2517
+2518
+2519
+2520
+2521
+2522
+2523
+2524
+2525
+2526
+2527
+2528
+2529
+2530
+2531
+2532
+2533
+2534
+2535
+2536
+2537
+2538
+2539
+2540
+2541
+2542
+2543
+2544
+2545
+2546
+2547
+2548
+2549
+2550
+2551
+2552
+2553
+2554
+2555
+2556
+2557
+2558
+2559
+2560
+2561
+2562
+2563
+2564
+2565
+2566
+2567
+2568
+2569
+2570
+2571
+2572
+2573
+2574
+2575
+2576
+2577
+2578
+2579
+2580
+2581
+2582
+2583
+2584
+2585
+2586
+2587
+2588
+2589
+2590
+2591
+2592
+2593
+2594
+2595
+2596
+2597
+2598
+2599
+2600
+2601
+2602
+2603
+2604
+2605
+2606
+2607
+2608
+2609
+2610
+2611
+2612
+2613
+2614
+2615
+2616
+2617
+2618
+2619
+2620
+2621
+2622
+2623
+2624
+2625
+2626
+2627
+2628
+2629
+2630
+2631
+2632
+2633
+2634
+2635
+2636
+2637
+2638
+2639
+2640
+2641
+2642
+2643
+2644
+2645
+2646
+2647
+2648
+2649
+2650
+2651
+2652
+2653
+2654
+2655
+2656
+2657
+2658
+2659
+2660
+2661
+2662
+2663
+2664
+2665
+2666
+2667
+2668
+2669
+2670
+2671
+2672
+2673
+2674
+2675
+2676
+2677
+2678
+2679
+2680
+2681
+2682
+2683
+2684
+2685
+2686
+2687
+2688
+2689
+2690
+2691
+2692
+2693
+2694
+2695
+2696
+2697
+2698
+2699
+2700
+2701
+2702
+2703
+2704
+2705
+2706
+2707
+2708
+2709
+2710
+2711
+2712
+2713
+2714
+2715
+2716
+2717
+2718
+2719
+2720
+2721
+2722
+2723
+2724
+2725
+2726
+2727
+2728
+2729
+2730
+2731
+2732
+2733
+2734
+2735
+2736
+2737
+2738
+2739
+2740
+2741
+2742
+2743
+2744
+2745
+2746
+2747
+2748
+2749
+2750
+2751
+2752
+2753
+2754
+2755
+2756
+2757
+2758
+2759
+2760
+2761
+2762
+2763
+2764
+2765
+2766
+2767
+2768
+2769
+2770
+2771
+2772
+2773
+2774
+2775
+2776
+2777
+2778
+2779
+2780
+2781
+2782
+2783
+2784
+2785
+2786
+2787
+2788
+2789
+2790
+2791
+2792
+2793
+2794
+2795
+2796
+2797
+2798
+2799
+2800
+2801
+2802
+2803
+2804
+2805
+2806
+2807
+2808
+2809
+2810
+2811
+2812
+2813
+2814
+2815
+2816
+2817
+2818
+2819
+2820
+2821
+2822
+2823
+2824
+2825
+2826
+2827
+2828
+2829
+2830
+2831
+2832
+2833
+2834
+2835
+2836
+2837
+2838
+2839
+2840
+2841
+2842
+2843
+2844
+2845
+2846
+2847
+2848
+2849
+2850
+2851
+2852
+2853
+2854
+2855
+2856
+2857
+2858
+2859
+2860
+2861
+2862
+2863
+2864
+2865
+2866
+2867
+2868
+2869
+2870
+2871
+2872
+2873
+2874
+2875
+2876
+2877
+2878
+2879
+2880
+2881
+2882
+2883
+2884
+2885
+2886
+2887
+2888
+2889
+2890
+2891
+2892
+2893
+2894
+2895
+2896
+2897
+2898
+2899
+2900
+2901
+2902
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+#include <ctk/ctk.h>
+#include <cdk/cdkx.h>
+#include <cdk/cdkkeysyms.h>
+#include <X11/XKBlib.h>
+#include <X11/extensions/XKBgeom.h>
+#include <stdlib.h>
+#include <memory.h>
+#include <math.h>
+#include <glib/gi18n-lib.h>
+#include <libxklavier/xklavier.h>
+
+#include <cafekbd-keyboard-drawing.h>
+#include <cafekbd-keyboard-drawing-marshal.h>
+#include <cafekbd-util.h>
+
+#define INVALID_KEYCODE ((guint)(-1))
+
+#define CTK_RESPONSE_PRINT 2
+
+#define KEY_FONT_SIZE 12
+
+enum {
+	BAD_KEYCODE = 0,
+	NUM_SIGNALS
+};
+
+static guint cafekbd_keyboard_drawing_signals[NUM_SIGNALS] = { 0 };
+
+static void cafekbd_keyboard_drawing_set_mods (CafekbdKeyboardDrawing * drawing,
+					    guint mods);
+
+extern gboolean xkl_xkb_config_native_prepare (XklEngine * engine,
+					      const XklConfigRec * data,
+					      gpointer component_names);
+
+extern void xkl_xkb_config_native_cleanup (XklEngine * engine,
+					  gpointer component_names);
+
+
+static gint
+xkb_to_pixmap_coord (CafekbdKeyboardDrawingRenderContext * context, gint n)<--- Parameter 'context' can be declared as pointer to const
+{
+	return n * context->scale_numerator / context->scale_denominator;
+}
+
+static gdouble
+xkb_to_pixmap_double (CafekbdKeyboardDrawingRenderContext * context,<--- Parameter 'context' can be declared as pointer to const
+		      gdouble d)
+{
+	return d * context->scale_numerator / context->scale_denominator;
+}
+
+
+/* angle is in tenths of a degree; coordinates can be anything as (xkb,
+ * pixels, pango) as long as they are all the same */
+static void
+rotate_coordinate (gint origin_x,
+		   gint origin_y,
+		   gint x,
+		   gint y, gint angle, gint * rotated_x, gint * rotated_y)
+{
+	*rotated_x =
+	    origin_x + (x - origin_x) * cos (M_PI * angle / 1800.0) - (y -
+								       origin_y)
+	    * sin (M_PI * angle / 1800.0);
+	*rotated_y =
+	    origin_y + (x - origin_x) * sin (M_PI * angle / 1800.0) + (y -
+								       origin_y)
+	    * cos (M_PI * angle / 1800.0);
+}
+
+static gdouble
+length (gdouble x, gdouble y)
+{
+	return sqrt (x * x + y * y);
+}
+
+static gdouble
+point_line_distance (gdouble ax, gdouble ay, gdouble nx, gdouble ny)
+{
+	return ax * nx + ay * ny;
+}
+
+static void
+normal_form (gdouble ax, gdouble ay,
+	     gdouble bx, gdouble by,
+	     gdouble * nx, gdouble * ny, gdouble * d)
+{
+	gdouble l;
+
+	*nx = by - ay;
+	*ny = ax - bx;
+
+	l = length (*nx, *ny);
+
+	*nx /= l;
+	*ny /= l;
+
+	*d = point_line_distance (ax, ay, *nx, *ny);
+}
+
+static void
+inverse (gdouble a, gdouble b, gdouble c, gdouble d,
+	 gdouble * e, gdouble * f, gdouble * g, gdouble * h)
+{
+	gdouble det;
+
+	det = a * d - b * c;
+
+	*e = d / det;
+	*f = -b / det;
+	*g = -c / det;
+	*h = a / det;
+}
+
+static void
+multiply (gdouble a, gdouble b, gdouble c, gdouble d,
+	  gdouble e, gdouble f, gdouble * x, gdouble * y)
+{
+	*x = a * e + b * f;
+	*y = c * e + d * f;
+}
+
+static void
+intersect (gdouble n1x, gdouble n1y, gdouble d1,
+	   gdouble n2x, gdouble n2y, gdouble d2, gdouble * x, gdouble * y)
+{
+	gdouble e, f, g, h;
+
+	inverse (n1x, n1y, n2x, n2y, &e, &f, &g, &h);
+	multiply (e, f, g, h, d1, d2, x, y);
+}
+
+
+/* draw an angle from the current point to b and then to c,
+ * with a rounded corner of the given radius.
+ */
+static void
+rounded_corner (cairo_t * cr,
+		gdouble bx, gdouble by,
+		gdouble cx, gdouble cy, gdouble radius)
+{
+	gdouble ax, ay;
+	gdouble n1x, n1y, d1;
+	gdouble n2x, n2y, d2;
+	gdouble pd1, pd2;
+	gdouble ix, iy;
+	gdouble dist1, dist2;
+	gdouble nx, ny, d;
+	gdouble a1x, a1y, c1x, c1y;
+	gdouble phi1, phi2;
+
+	cairo_get_current_point (cr, &ax, &ay);
+#ifdef KBDRAW_DEBUG
+	printf ("        current point: (%f, %f), radius %f:\n", ax, ay,
+		radius);
+#endif
+
+	/* make sure radius is not too large */
+	dist1 = length (bx - ax, by - ay);
+	dist2 = length (cx - bx, cy - by);
+
+	radius = MIN (radius, MIN (dist1, dist2));
+
+	/* construct normal forms of the lines */
+	normal_form (ax, ay, bx, by, &n1x, &n1y, &d1);
+	normal_form (bx, by, cx, cy, &n2x, &n2y, &d2);
+
+	/* find which side of the line a,b the point c is on */
+	if (point_line_distance (cx, cy, n1x, n1y) < d1)
+		pd1 = d1 - radius;
+	else
+		pd1 = d1 + radius;
+
+	/* find which side of the line b,c the point a is on */
+	if (point_line_distance (ax, ay, n2x, n2y) < d2)
+		pd2 = d2 - radius;
+	else
+		pd2 = d2 + radius;
+
+	/* intersect the parallels to find the center of the arc */
+	intersect (n1x, n1y, pd1, n2x, n2y, pd2, &ix, &iy);
+
+	nx = (bx - ax) / dist1;
+	ny = (by - ay) / dist1;
+	d = point_line_distance (ix, iy, nx, ny);
+
+	/* a1 is the point on the line a-b where the arc starts */
+	intersect (n1x, n1y, d1, nx, ny, d, &a1x, &a1y);
+
+	nx = (cx - bx) / dist2;
+	ny = (cy - by) / dist2;
+	d = point_line_distance (ix, iy, nx, ny);
+
+	/* c1 is the point on the line b-c where the arc ends */
+	intersect (n2x, n2y, d2, nx, ny, d, &c1x, &c1y);
+
+	/* determine the first angle */
+	if (a1x - ix == 0)
+		phi1 = (a1y - iy > 0) ? M_PI_2 : 3 * M_PI_2;
+	else if (a1x - ix > 0)
+		phi1 = atan ((a1y - iy) / (a1x - ix));
+	else
+		phi1 = M_PI + atan ((a1y - iy) / (a1x - ix));
+
+	/* determine the second angle */
+	if (c1x - ix == 0)
+		phi2 = (c1y - iy > 0) ? M_PI_2 : 3 * M_PI_2;
+	else if (c1x - ix > 0)
+		phi2 = atan ((c1y - iy) / (c1x - ix));
+	else
+		phi2 = M_PI + atan ((c1y - iy) / (c1x - ix));
+
+	/* compute the difference between phi2 and phi1 mod 2pi */
+	d = phi2 - phi1;
+	while (d < 0)
+		d += 2 * M_PI;
+	while (d > 2 * M_PI)
+		d -= 2 * M_PI;
+
+#ifdef KBDRAW_DEBUG
+	printf ("        line 1 to: (%f, %f):\n", a1x, a1y);
+#endif
+	if (!(isnan (a1x) || isnan (a1y)))
+		cairo_line_to (cr, a1x, a1y);
+
+	/* pick the short arc from phi1 to phi2 */
+	if (d < M_PI)
+		cairo_arc (cr, ix, iy, radius, phi1, phi2);
+	else
+		cairo_arc_negative (cr, ix, iy, radius, phi1, phi2);
+
+#ifdef KBDRAW_DEBUG
+	printf ("        line 2 to: (%f, %f):\n", cx, cy);
+#endif
+	cairo_line_to (cr, cx, cy);
+}
+
+static void
+rounded_polygon (cairo_t * cr,
+		 gboolean filled,
+		 gdouble radius, CdkPoint * points, gint num_points)
+{
+	gint i, j;
+
+	cairo_move_to (cr,
+		       (gdouble) (points[num_points - 1].x +
+				  points[0].x) / 2,
+		       (gdouble) (points[num_points - 1].y +
+				  points[0].y) / 2);
+
+
+#ifdef KBDRAW_DEBUG
+	printf ("    rounded polygon of radius %f:\n", radius);
+#endif
+	for (i = 0; i < num_points; i++) {
+		j = (i + 1) % num_points;
+		rounded_corner (cr, (gdouble) points[i].x,
+				(gdouble) points[i].y,
+				(gdouble) (points[i].x + points[j].x) / 2,
+				(gdouble) (points[i].y + points[j].y) / 2,
+				radius);
+#ifdef KBDRAW_DEBUG
+		printf ("      corner (%d, %d) -> (%d, %d):\n",
+			points[i].x, points[i].y, points[j].x,
+			points[j].y);
+#endif
+	};
+	cairo_close_path (cr);
+
+	if (filled)
+		cairo_fill (cr);
+	else
+		cairo_stroke (cr);
+}
+
+static void
+draw_polygon (CafekbdKeyboardDrawingRenderContext * context,
+	      CdkRGBA * fill_color,
+	      gint xkb_x,
+	      gint xkb_y, XkbPointRec * xkb_points, guint num_points,
+	      gdouble radius)
+{
+	CdkPoint *points;
+	gboolean filled;
+	gint i;
+
+	if (fill_color) {
+		filled = TRUE;
+	} else {
+		fill_color = &context->dark_color;
+		filled = FALSE;
+	}
+
+	cdk_cairo_set_source_rgba (context->cr, fill_color);
+
+	points = g_new (CdkPoint, num_points);
+
+#ifdef KBDRAW_DEBUG
+	printf ("    Polygon points:\n");
+#endif
+	for (i = 0; i < num_points; i++) {
+		points[i].x =
+		    xkb_to_pixmap_coord (context, xkb_x + xkb_points[i].x);
+		points[i].y =
+		    xkb_to_pixmap_coord (context, xkb_y + xkb_points[i].y);
+#ifdef KBDRAW_DEBUG
+		printf ("      %d, %d\n", points[i].x, points[i].y);
+#endif
+	}
+
+	rounded_polygon (context->cr, filled,
+			 xkb_to_pixmap_double (context, radius),
+			 points, num_points);
+
+	g_free (points);
+}
+
+static void
+curve_rectangle (cairo_t * cr,
+		 gdouble x0,
+		 gdouble y0, gdouble width, gdouble height, gdouble radius)
+{
+	gdouble x1, y1;
+
+	if (!width || !height)
+		return;
+
+	x1 = x0 + width;
+	y1 = y0 + height;
+
+	radius = MIN (radius, MIN (width / 2, height / 2));
+
+	cairo_move_to (cr, x0, y0 + radius);
+	cairo_arc (cr, x0 + radius, y0 + radius, radius, M_PI,
+		   3 * M_PI / 2);
+	cairo_line_to (cr, x1 - radius, y0);
+	cairo_arc (cr, x1 - radius, y0 + radius, radius, 3 * M_PI / 2,
+		   2 * M_PI);
+	cairo_line_to (cr, x1, y1 - radius);
+	cairo_arc (cr, x1 - radius, y1 - radius, radius, 0, M_PI / 2);
+	cairo_line_to (cr, x0 + radius, y1);
+	cairo_arc (cr, x0 + radius, y1 - radius, radius, M_PI / 2, M_PI);
+
+	cairo_close_path (cr);
+}
+
+static void
+draw_curve_rectangle (cairo_t * cr,
+		      gboolean filled,
+		      CdkRGBA * fill_color,
+		      gint x, gint y, gint width, gint height, gint radius)
+{
+	curve_rectangle (cr, x, y, width, height, radius);
+
+	cdk_cairo_set_source_rgba (cr, fill_color);
+
+	if (filled)
+		cairo_fill (cr);
+	else
+		cairo_stroke (cr);
+}
+
+/* x, y, width, height are in the xkb coordinate system */
+static void
+draw_rectangle (CafekbdKeyboardDrawingRenderContext * context,
+		CdkRGBA * fill_color,
+		gint angle,
+		gint xkb_x, gint xkb_y, gint xkb_width, gint xkb_height,
+		gint radius)
+{
+	if (angle == 0) {
+		gint x, y, width, height;
+		gboolean filled;
+
+		if (fill_color) {
+			filled = TRUE;
+		} else {
+			fill_color = &context->dark_color;
+			filled = FALSE;
+		}
+
+		x = xkb_to_pixmap_coord (context, xkb_x);
+		y = xkb_to_pixmap_coord (context, xkb_y);
+		width =
+		    xkb_to_pixmap_coord (context, xkb_x + xkb_width) - x;
+		height =
+		    xkb_to_pixmap_coord (context, xkb_y + xkb_height) - y;
+
+		draw_curve_rectangle (context->cr, filled, fill_color,
+				      x, y, width, height,
+				      xkb_to_pixmap_double (context,
+							    radius));
+	} else {
+		XkbPointRec points[4];
+		gint x, y;
+
+		points[0].x = xkb_x;
+		points[0].y = xkb_y;
+		rotate_coordinate (xkb_x, xkb_y, xkb_x + xkb_width, xkb_y,
+				   angle, &x, &y);
+		points[1].x = x;
+		points[1].y = y;
+		rotate_coordinate (xkb_x, xkb_y, xkb_x + xkb_width,
+				   xkb_y + xkb_height, angle, &x, &y);
+		points[2].x = x;
+		points[2].y = y;
+		rotate_coordinate (xkb_x, xkb_y, xkb_x, xkb_y + xkb_height,
+				   angle, &x, &y);
+		points[3].x = x;
+		points[3].y = y;
+
+		/* the points we've calculated are relative to 0,0 */
+		draw_polygon (context, fill_color, 0, 0, points, 4,
+			      radius);
+	}
+}
+
+static void
+draw_outline (CafekbdKeyboardDrawingRenderContext * context,
+	      XkbOutlineRec * outline,
+	      CdkRGBA * color,
+	      gint angle, gint origin_x, gint origin_y)
+{
+#ifdef KBDRAW_DEBUG
+	printf (" num_points in %p: %d\n", outline, outline->num_points);
+#endif
+
+	if (outline->num_points == 1) {
+		if (color)
+			draw_rectangle (context, color, angle, origin_x,
+					origin_y, outline->points[0].x,
+					outline->points[0].y,
+					outline->corner_radius);
+
+#ifdef KBDRAW_DEBUG
+		printf ("pointsxy:%d %d %d\n", outline->points[0].x,
+			outline->points[0].y, outline->corner_radius);
+#endif
+
+		draw_rectangle (context, NULL, angle, origin_x, origin_y,
+				outline->points[0].x,
+				outline->points[0].y,
+				outline->corner_radius);
+	} else if (outline->num_points == 2) {
+		gint rotated_x0, rotated_y0;
+
+		rotate_coordinate (origin_x, origin_y,
+				   origin_x + outline->points[0].x,
+				   origin_y + outline->points[0].y,
+				   angle, &rotated_x0, &rotated_y0);
+		if (color)
+			draw_rectangle (context, color, angle, rotated_x0,
+					rotated_y0, outline->points[1].x,
+					outline->points[1].y,
+					outline->corner_radius);
+
+		draw_rectangle (context, NULL, angle, rotated_x0,
+				rotated_y0, outline->points[1].x,
+				outline->points[1].y,
+				outline->corner_radius);
+	} else {
+		if (color)
+			draw_polygon (context, color, origin_x, origin_y,
+				      outline->points,
+				      outline->num_points,
+				      outline->corner_radius);
+
+		draw_polygon (context, NULL, origin_x, origin_y,
+			      outline->points, outline->num_points,
+			      outline->corner_radius);
+	}
+}
+
+/* see PSColorDef in xkbprint */
+static gboolean
+parse_xkb_color_spec (gchar * colorspec, CdkRGBA * color)
+{
+	glong level;
+
+	color->alpha = 1.0;
+
+	if (g_ascii_strcasecmp (colorspec, "black") == 0) {
+		color->red = 0;
+		color->green = 0;
+		color->blue = 0;
+	} else if (g_ascii_strcasecmp (colorspec, "white") == 0) {
+		color->red = 1.0;
+		color->green = 1.0;
+		color->blue = 1.0;
+	} else if (g_ascii_strncasecmp (colorspec, "grey", 4) == 0 ||
+		   g_ascii_strncasecmp (colorspec, "gray", 4) == 0) {
+		level = strtol (colorspec + 4, NULL, 10);
+
+		color->red = 1.0 - 1.0 * level / 100.0;
+		color->green = 1.0 - 1.0 * level / 100.0;
+		color->blue = 1.0 - 1.0 * level / 100.0;
+	} else if (g_ascii_strcasecmp (colorspec, "red") == 0) {
+		color->red = 1.0;
+		color->green = 0;
+		color->blue = 0;
+	} else if (g_ascii_strcasecmp (colorspec, "green") == 0) {
+		color->red = 0;
+		color->green = 1.0;
+		color->blue = 0;
+	} else if (g_ascii_strcasecmp (colorspec, "blue") == 0) {
+		color->red = 0;
+		color->green = 0;
+		color->blue = 1.0;
+	} else if (g_ascii_strncasecmp (colorspec, "red", 3) == 0) {
+		level = strtol (colorspec + 3, NULL, 10);
+
+		color->red = 1.0 * level / 100.0;
+		color->green = 0;
+		color->blue = 0;
+	} else if (g_ascii_strncasecmp (colorspec, "green", 5) == 0) {
+		level = strtol (colorspec + 5, NULL, 10);
+
+		color->red = 0;
+		color->green = 1.0 * level / 100.0;
+		color->blue = 0;
+	} else if (g_ascii_strncasecmp (colorspec, "blue", 4) == 0) {
+		level = strtol (colorspec + 4, NULL, 10);
+
+		color->red = 0;
+		color->green = 0;
+		color->blue = 1.0 * level / 100.0;
+	} else
+		return FALSE;
+
+	return TRUE;
+}
+
+
+static guint
+find_keycode (CafekbdKeyboardDrawing * drawing, gchar * key_name)
+{
+#define KEYSYM_NAME_MAX_LENGTH 4
+	guint keycode;
+	gint i, j;
+	XkbKeyNamePtr pkey;
+	XkbKeyAliasPtr palias;
+	guint is_name_matched;
+	gchar *src, *dst;
+
+	if (!drawing->xkb)
+		return INVALID_KEYCODE;
+
+#ifdef KBDRAW_DEBUG
+	printf ("    looking for keycode for (%c%c%c%c)\n",
+		key_name[0], key_name[1], key_name[2], key_name[3]);
+#endif
+
+	pkey = drawing->xkb->names->keys + drawing->xkb->min_key_code;
+	for (keycode = drawing->xkb->min_key_code;
+	     keycode <= drawing->xkb->max_key_code; keycode++) {
+		is_name_matched = 1;
+		src = key_name;
+		dst = pkey->name;
+		for (i = KEYSYM_NAME_MAX_LENGTH; --i >= 0;) {
+			if ('\0' == *src)
+				break;
+			if (*src++ != *dst++) {
+				is_name_matched = 0;
+				break;
+			}
+		}
+		if (is_name_matched) {
+#ifdef KBDRAW_DEBUG
+			printf ("      found keycode %u\n", keycode);
+#endif
+			return keycode;
+		}
+		pkey++;
+	}
+
+	palias = drawing->xkb->names->key_aliases;
+	for (j = drawing->xkb->names->num_key_aliases; --j >= 0;) {
+		is_name_matched = 1;
+		src = key_name;
+		dst = palias->alias;
+		for (i = KEYSYM_NAME_MAX_LENGTH; --i >= 0;) {
+			if ('\0' == *src)
+				break;
+			if (*src++ != *dst++) {
+				is_name_matched = 0;
+				break;
+			}
+		}
+
+		if (is_name_matched) {
+			keycode = find_keycode (drawing, palias->real);
+#ifdef KBDRAW_DEBUG
+			printf ("found alias keycode %u\n", keycode);
+#endif
+			return keycode;
+		}
+		palias++;
+	}
+
+	return INVALID_KEYCODE;
+}
+
+static void
+set_markup (CafekbdKeyboardDrawingRenderContext * context, gchar *txt)<--- Parameter 'context' can be declared as pointer to const
+{
+	PangoLayout *layout = context->layout;
+	txt = strcmp ("<", txt) ? txt : "&lt;";
+	txt = strcmp ("&", txt) ? txt : "&amp;";
+	if (g_utf8_strlen (txt, -1) > 1) {
+		gchar* buf =
+		    g_strdup_printf ("<span size=\"xx-small\">%s</span>", txt);
+		pango_layout_set_markup (layout, buf, -1);
+		g_free (buf);
+	} else {
+		pango_layout_set_markup (layout, txt, -1);
+	}
+}
+
+static void
+set_key_label_in_layout (CafekbdKeyboardDrawingRenderContext * context,
+			 guint keyval)
+{
+	gchar buf[5];
+	gunichar uc;
+
+	switch (keyval) {
+	case CDK_KEY_Scroll_Lock:
+		set_markup (context, _("Scroll\nLock"));
+		break;
+
+	case CDK_KEY_space:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_Sys_Req:
+		set_markup (context, _("Sys Rq"));
+		break;
+
+	case CDK_KEY_Page_Up:
+		set_markup (context, _("Page\nUp"));
+		break;
+
+	case CDK_KEY_Page_Down:
+		set_markup (context, _("Page\nDown"));
+		break;
+
+	case CDK_KEY_Num_Lock:
+		set_markup (context, _("Num\nLock"));
+		break;
+
+	case CDK_KEY_KP_Page_Up:
+		set_markup (context, _("Pg Up"));
+		break;
+
+	case CDK_KEY_KP_Page_Down:
+		set_markup (context, _("Pg Dn"));
+		break;
+
+	case CDK_KEY_KP_Home:
+		set_markup (context, _("Home"));
+		break;
+
+	case CDK_KEY_KP_Left:
+		set_markup (context, _("Left"));
+		break;
+
+	case CDK_KEY_KP_End:
+		set_markup (context, _("End"));
+		break;
+
+	case CDK_KEY_KP_Up:
+		set_markup (context, _("Up"));
+		break;
+
+	case CDK_KEY_KP_Begin:
+		set_markup (context, _("Begin"));
+		break;
+
+	case CDK_KEY_KP_Right:
+		set_markup (context, _("Right"));
+		break;
+
+	case CDK_KEY_KP_Enter:
+		set_markup (context, _("Enter"));
+		break;
+
+	case CDK_KEY_KP_Down:
+		set_markup (context, _("Down"));
+		break;
+
+	case CDK_KEY_KP_Insert:
+		set_markup (context, _("Ins"));
+		break;
+
+	case CDK_KEY_KP_Delete:
+		set_markup (context, _("Del"));
+		break;
+
+	/* 0xfe03 */
+	case CDK_KEY_ISO_Level3_Shift:
+		set_markup (context, _("ISO_Level3_Shift"));
+		break;
+
+	/* 0xfe20 */
+	case CDK_KEY_ISO_Left_Tab:
+		set_markup (context, _("Tab"));
+		break;
+
+	/* 0xff08 */
+	case CDK_KEY_BackSpace:
+		set_markup (context, _("BackSpace"));
+		break;
+
+	/* 0xff09 */
+	case CDK_KEY_Tab:
+		set_markup (context, _("Tab"));
+		break;
+
+	/* 0xff0d */
+	case CDK_KEY_Return:
+		set_markup (context, _("Return"));
+		break;
+
+	/* 0xff13 */
+	case CDK_KEY_Pause:
+		set_markup (context, _("Pause"));
+		break;
+
+	/* 0xff1b */
+	case CDK_KEY_Escape:
+		set_markup (context, _("Esc"));
+		break;
+
+	/* 0xff50 */
+	case CDK_KEY_Home:
+		set_markup (context, _("Home"));
+		break;
+
+	/* 0xff51 */
+	case CDK_KEY_Left:
+		set_markup (context, _("Left"));
+		break;
+
+	/* 0xff52 */
+	case CDK_KEY_Up:
+		set_markup (context, _("Up"));
+		break;
+
+	/* 0xff53 */
+	case CDK_KEY_Right:
+		set_markup (context, _("Right"));
+		break;
+
+	/* 0xff54 */
+	case CDK_KEY_Down:
+		set_markup (context, _("Down"));
+		break;
+
+	/* 0xff57 */
+	case CDK_KEY_End:
+		set_markup (context, _("End"));
+		break;
+
+	/* 0xff61 */
+	case CDK_KEY_Print:
+		set_markup (context, _("Print"));
+		break;
+
+	/* 0xff63 */
+	case CDK_KEY_Insert:
+		set_markup (context, _("Insert"));
+		break;
+
+	/* 0xff67 */
+	case CDK_KEY_Menu:
+		set_markup (context, _("Menu"));
+		break;
+
+	/* 0xffbe */
+	case CDK_KEY_F1:
+		set_markup (context, _("F1"));
+		break;
+
+	/* 0xffbf */
+	case CDK_KEY_F2:
+		set_markup (context, _("F2"));
+		break;
+
+	/* 0xffc0 */
+	case CDK_KEY_F3:
+		set_markup (context, _("F3"));
+		break;
+
+	/* 0xffc1 */
+	case CDK_KEY_F4:
+		set_markup (context, _("F4"));
+		break;
+
+	/* 0xffc2 */
+	case CDK_KEY_F5:
+		set_markup (context, _("F5"));
+		break;
+
+	/* 0xffc3 */
+	case CDK_KEY_F6:
+		set_markup (context, _("F6"));
+		break;
+
+	/* 0xffc4 */
+	case CDK_KEY_F7:
+		set_markup (context, _("F7"));
+		break;
+
+	/* 0xffc5 */
+	case CDK_KEY_F8:
+		set_markup (context, _("F8"));
+		break;
+
+	/* 0xffc6 */
+	case CDK_KEY_F9:
+		set_markup (context, _("F9"));
+		break;
+
+	/* 0xffc7 */
+	case CDK_KEY_F10:
+		set_markup (context, _("F10"));
+		break;
+
+	/* 0xffc8 */
+	case CDK_KEY_F11:
+		set_markup (context, _("F11"));
+		break;
+
+	/* 0xffc9 */
+	case CDK_KEY_F12:
+		set_markup (context, _("F12"));
+		break;
+
+	/* 0xffe1 */
+	case CDK_KEY_Shift_L:
+		set_markup (context, _("Shift"));
+		break;
+
+	/* 0xffe2 */
+	case CDK_KEY_Shift_R:
+		set_markup (context, _("Shift"));
+		break;
+
+	/* 0xffe3 */
+	case CDK_KEY_Control_L:
+		set_markup (context, _("Control"));
+		break;
+
+	/* 0xffe4 */
+	case CDK_KEY_Control_R:
+		set_markup (context, _("Control"));
+		break;
+
+	/* 0xffe5 */
+	case CDK_KEY_Caps_Lock:
+		set_markup (context, _("Caps\nLock"));
+		break;
+
+	/* 0xffe7 */
+	case CDK_KEY_Meta_L:
+		set_markup (context, _("Meta"));
+		break;
+
+	/* 0xffe9 */
+	case CDK_KEY_Alt_L:
+		set_markup (context, _("Alt"));
+		break;
+
+	/* 0xffeb */
+	case CDK_KEY_Super_L:
+		set_markup (context, _("Super"));
+		break;
+
+	/* 0xffec */
+	case CDK_KEY_Super_R:
+		set_markup (context, _("Super"));
+		break;
+
+	/* 0xffff */
+	case CDK_KEY_VoidSymbol:
+		set_markup (context, _("Delete"));
+		break;
+
+	case CDK_KEY_dead_grave:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_acute:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_circumflex:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_tilde:
+		set_markup (context, "~");
+		break;
+
+	case CDK_KEY_dead_macron:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_breve:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_abovedot:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_diaeresis:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_abovering:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_doubleacute:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_caron:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_cedilla:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_ogonek:
+		set_markup (context, "");
+		break;
+
+		/* case CDK_KEY_dead_iota:
+		 * case CDK_KEY_dead_voiced_sound:
+		 * case CDK_KEY_dead_semivoiced_sound: */
+
+	case CDK_KEY_dead_belowdot:
+		set_markup (context, " ");
+		break;
+
+	case CDK_KEY_horizconnector:
+		set_markup (context, _("horiz\nconn"));
+		break;
+
+	case CDK_KEY_Mode_switch:
+		set_markup (context, _("AltGr"));
+		break;
+
+	case CDK_KEY_Multi_key:
+		set_markup (context, _("Compose"));
+		break;
+
+	default:
+		uc = cdk_keyval_to_unicode (keyval);
+		if (uc != 0 && g_unichar_isgraph (uc)) {
+			buf[g_unichar_to_utf8 (uc, buf)] = '\0';
+			set_markup (context, buf);
+		} else {
+			gchar *name = cdk_keyval_name (keyval);
+			if (name) {
+				set_markup (context, name);
+			} else
+				set_markup (context, "");
+		}
+	}
+}
+
+
+static void
+draw_pango_layout (CafekbdKeyboardDrawingRenderContext * context,
+		   CafekbdKeyboardDrawing * drawing,
+		   gint angle, gint x, gint y)
+{
+	PangoLayout *layout = context->layout;
+	CdkRGBA *color;
+	PangoLayoutLine *line;
+	gint x_off, y_off;
+	gint i;
+
+	color =
+	    drawing->colors + (drawing->xkb->geom->label_color -
+			       drawing->xkb->geom->colors);
+
+	if (angle != context->angle) {
+		PangoMatrix matrix = PANGO_MATRIX_INIT;
+		pango_matrix_rotate (&matrix, -angle / 10.0);
+		pango_context_set_matrix (pango_layout_get_context
+					  (layout), &matrix);
+		pango_layout_context_changed (layout);
+		context->angle = angle;
+	}
+
+	i = 0;
+	y_off = 0;
+	for (line = pango_layout_get_line (layout, i);
+	     line != NULL; line = pango_layout_get_line (layout, ++i)) {
+		GSList *runp;<--- Variable 'runp' can be declared as pointer to const
+		PangoRectangle line_extents;
+
+		x_off = 0;
+
+		for (runp = line->runs; runp != NULL; runp = runp->next) {
+			PangoGlyphItem *run = runp->data;
+			gint j;
+
+			for (j = 0; j < run->glyphs->num_glyphs; j++) {
+				PangoGlyphGeometry *geometry;<--- Variable 'geometry' can be declared as pointer to const
+
+				geometry =
+				    &run->glyphs->glyphs[j].geometry;
+
+				x_off += geometry->width;
+			}
+		}
+
+		pango_layout_line_get_extents (line, NULL, &line_extents);
+		y_off +=
+		    line_extents.height +
+		    pango_layout_get_spacing (layout);
+	}
+
+	cairo_move_to (context->cr, x, y);
+	cdk_cairo_set_source_rgba (context->cr, color);
+	pango_cairo_show_layout (context->cr, layout);
+}
+
+static void
+draw_key_label_helper (CafekbdKeyboardDrawingRenderContext * context,
+		       CafekbdKeyboardDrawing * drawing,
+		       KeySym keysym,
+		       gint angle,
+		       CafekbdKeyboardDrawingGroupLevelPosition glp,
+		       gint x,
+		       gint y, gint width, gint height, gint padding)
+{
+	gint label_x, label_y, label_max_width, ycell;
+
+	if (keysym == 0)
+		return;
+#ifdef KBDRAW_DEBUG
+	printf ("keysym: %04X(%c) at glp: %d\n",
+		(unsigned) keysym, (char) keysym, (int) glp);
+#endif
+
+	switch (glp) {
+	case CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT:
+	case CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT:
+		{
+			ycell =
+			    glp == CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT;
+
+			rotate_coordinate (x, y, x + padding,
+					   y + padding + (height -
+							  2 * padding) *
+					   ycell * 4 / 7, angle, &label_x,
+					   &label_y);
+			label_max_width =
+			    PANGO_SCALE * (width - 2 * padding);
+			break;
+		}
+	case CAFEKBD_KEYBOARD_DRAWING_POS_TOPRIGHT:
+	case CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT:
+		{
+			ycell =
+			    glp == CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT;
+
+			rotate_coordinate (x, y,
+					   x + padding + (width -
+							  2 * padding) *
+					   4 / 7,
+					   y + padding + (height -
+							  2 * padding) *
+					   ycell * 4 / 7, angle, &label_x,
+					   &label_y);
+			label_max_width =
+			    PANGO_SCALE * ((width - 2 * padding) -
+					   (width - 2 * padding) * 4 / 7);
+			break;
+		}
+	default:
+		return;
+	}
+	set_key_label_in_layout (context, keysym);
+	pango_layout_set_width (context->layout, label_max_width);
+	label_y -= (pango_layout_get_line_count (context->layout) - 1) *
+	    (pango_font_description_get_size (context->font_desc) /
+	     PANGO_SCALE);
+	cairo_save (context->cr);
+	cairo_rectangle (context->cr, x + padding / 2, y + padding / 2,
+			 width - padding, height - padding);
+	cairo_clip (context->cr);
+	draw_pango_layout (context, drawing, angle, label_x, label_y);
+	cairo_restore (context->cr);
+}
+
+static void
+draw_key_label (CafekbdKeyboardDrawingRenderContext * context,
+		CafekbdKeyboardDrawing * drawing,
+		guint keycode,
+		gint angle,
+		gint xkb_origin_x,
+		gint xkb_origin_y, gint xkb_width, gint xkb_height)
+{
+	gint x, y, width, height;
+	gint padding;
+	gint g, l, glp;
+
+	if (!drawing->xkb)
+		return;
+
+	padding = 23 * context->scale_numerator / context->scale_denominator;	/* 2.3mm */
+
+	x = xkb_to_pixmap_coord (context, xkb_origin_x);
+	y = xkb_to_pixmap_coord (context, xkb_origin_y);
+	width =
+	    xkb_to_pixmap_coord (context, xkb_origin_x + xkb_width) - x;
+	height =
+	    xkb_to_pixmap_coord (context, xkb_origin_y + xkb_height) - y;
+
+	for (glp = CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT;
+	     glp < CAFEKBD_KEYBOARD_DRAWING_POS_TOTAL; glp++) {
+		if (drawing->groupLevels[glp] == NULL)
+			continue;
+		g = drawing->groupLevels[glp]->group;
+		l = drawing->groupLevels[glp]->level;
+
+		if (g < 0 || g >= XkbKeyNumGroups (drawing->xkb, keycode))
+			continue;
+		if (l < 0
+		    || l >= XkbKeyGroupWidth (drawing->xkb, keycode, g))
+			continue;
+
+		/* Skip "exotic" levels like the "Ctrl" level in PC_SYSREQ */
+		if (l > 0) {
+			guint mods = XkbKeyKeyType (drawing->xkb, keycode,
+						    g)->mods.mask;
+			if ((mods & (ShiftMask | drawing->l3mod)) == 0)
+				continue;
+		}
+
+		if (drawing->track_modifiers) {
+			guint mods_rtrn;
+			KeySym keysym;
+
+			if (XkbTranslateKeyCode (drawing->xkb, keycode,
+						 XkbBuildCoreState
+						 (drawing->mods, g),
+						 &mods_rtrn, &keysym)) {
+				draw_key_label_helper (context, drawing,
+						       keysym, angle, glp,
+						       x, y, width, height,
+						       padding);
+				/* reverse y order */
+			}
+		} else {
+			KeySym keysym;
+
+			keysym =
+			    XkbKeySymEntry (drawing->xkb, keycode, l, g);
+
+			draw_key_label_helper (context, drawing, keysym,
+					       angle, glp, x, y, width,
+					       height, padding);
+			/* reverse y order */
+		}
+	}
+}
+
+/*
+ * The x offset is calculated for complex shapes. It is the rightmost of the vertical lines in the outline
+ */
+static gint
+calc_origin_offset_x (XkbOutlineRec * outline)<--- Parameter 'outline' can be declared as pointer to const
+{
+	gint rv = 0;
+	gint i;
+	XkbPointPtr point = outline->points;
+	if (outline->num_points < 3)
+		return 0;
+	for (i = outline->num_points; --i > 0;) {
+		gint x1 = point->x;
+		gint y1 = point++->y;
+		gint x2 = point->x;
+		gint y2 = point->y;
+
+		/*vertical, bottom to top (clock-wise), on the left */
+		if ((x1 == x2) && (y1 > y2) && (x1 > rv)) {
+			rv = x1;
+		}
+	}
+	return rv;
+}
+
+/* groups are from 0-3 */
+static void
+draw_key (CafekbdKeyboardDrawingRenderContext * context,
+	  CafekbdKeyboardDrawing * drawing, CafekbdKeyboardDrawingKey * key)
+{
+	XkbShapeRec *shape;
+	CtkStyleContext *style_context;
+	CdkRGBA color;
+	XkbOutlineRec *outline;
+	int origin_offset_x;
+	/* gint i; */
+
+	if (!drawing->xkb)
+		return;
+
+#ifdef KBDRAW_DEBUG
+	printf ("shape: %p (base %p, index %d)\n",
+		drawing->xkb->geom->shapes + key->xkbkey->shape_ndx,
+		drawing->xkb->geom->shapes, key->xkbkey->shape_ndx);
+#endif
+
+	shape = drawing->xkb->geom->shapes + key->xkbkey->shape_ndx;
+
+	if (key->pressed) {
+		style_context = ctk_widget_get_style_context (CTK_WIDGET (drawing));
+		ctk_style_context_save (style_context);
+		ctk_style_context_add_class (style_context, CTK_STYLE_CLASS_VIEW);
+		ctk_style_context_get_background_color (style_context,
+		                                        CTK_STATE_FLAG_SELECTED,
+		                                        &color);
+		ctk_style_context_restore (style_context);
+	 } else
+		color = *(drawing->colors + key->xkbkey->color_ndx);
+
+#ifdef KBDRAW_DEBUG
+	printf
+	    (" outlines base in the shape: %p (total: %d), origin: (%d, %d), angle %d\n",
+	     shape->outlines, shape->num_outlines, key->origin_x,
+	     key->origin_y, key->angle);
+#endif
+
+	/* draw the primary outline */
+	outline = shape->primary ? shape->primary : shape->outlines;
+	draw_outline (context, outline, &color, key->angle, key->origin_x,
+		      key->origin_y);
+#if 0
+	/* don't draw other outlines for now, since
+	 * the text placement does not take them into account
+	 */
+	for (i = 0; i < shape->num_outlines; i++) {
+		if (shape->outlines + i == shape->approx ||
+		    shape->outlines + i == shape->primary)
+			continue;
+		draw_outline (context, shape->outlines + i, NULL,
+			      key->angle, key->origin_x, key->origin_y);
+	}
+#endif
+
+	origin_offset_x = calc_origin_offset_x (outline);
+	draw_key_label (context, drawing, key->keycode, key->angle,
+			key->origin_x + origin_offset_x, key->origin_y,
+			shape->bounds.x2, shape->bounds.y2);
+}
+
+static void
+invalidate_region (CafekbdKeyboardDrawing * drawing,
+		   gdouble angle,
+		   gint origin_x, gint origin_y, XkbShapeRec * shape)
+{
+	CdkPoint points[4];
+	gint x_min, x_max, y_min, y_max;
+	gint x, y, width, height;
+	gint xx, yy;
+
+	rotate_coordinate (0, 0, 0, 0, angle, &xx, &yy);
+	points[0].x = xx;
+	points[0].y = yy;
+	rotate_coordinate (0, 0, shape->bounds.x2, 0, angle, &xx, &yy);
+	points[1].x = xx;
+	points[1].y = yy;
+	rotate_coordinate (0, 0, shape->bounds.x2, shape->bounds.y2, angle,
+			   &xx, &yy);
+	points[2].x = xx;
+	points[2].y = yy;
+	rotate_coordinate (0, 0, 0, shape->bounds.y2, angle, &xx, &yy);
+	points[3].x = xx;
+	points[3].y = yy;
+
+	x_min =
+	    MIN (MIN (points[0].x, points[1].x),
+		 MIN (points[2].x, points[3].x));
+	x_max =
+	    MAX (MAX (points[0].x, points[1].x),
+		 MAX (points[2].x, points[3].x));
+	y_min =
+	    MIN (MIN (points[0].y, points[1].y),
+		 MIN (points[2].y, points[3].y));
+	y_max =
+	    MAX (MAX (points[0].y, points[1].y),
+		 MAX (points[2].y, points[3].y));
+
+	x = xkb_to_pixmap_coord (drawing->renderContext,
+				 origin_x + x_min) - 6;
+	y = xkb_to_pixmap_coord (drawing->renderContext,
+				 origin_y + y_min) - 6;
+	width =
+	    xkb_to_pixmap_coord (drawing->renderContext,
+				 x_max - x_min) + 12;
+	height =
+	    xkb_to_pixmap_coord (drawing->renderContext,
+				 y_max - y_min) + 12;
+
+	ctk_widget_queue_draw_area (CTK_WIDGET (drawing), x, y, width,
+				    height);
+}
+
+static void
+invalidate_indicator_doodad_region (CafekbdKeyboardDrawing * drawing,
+				    CafekbdKeyboardDrawingDoodad * doodad)
+{
+	if (!drawing->xkb)
+		return;
+
+	invalidate_region (drawing,
+			   doodad->angle,
+			   doodad->origin_x +
+			   doodad->doodad->indicator.left,
+			   doodad->origin_y +
+			   doodad->doodad->indicator.top,
+			   &drawing->xkb->geom->shapes[doodad->
+						       doodad->indicator.shape_ndx]);
+}
+
+static void
+invalidate_key_region (CafekbdKeyboardDrawing * drawing,
+		       CafekbdKeyboardDrawingKey * key)
+{
+	if (!drawing->xkb)
+		return;
+
+	invalidate_region (drawing,
+			   key->angle,
+			   key->origin_x,
+			   key->origin_y,
+			   &drawing->xkb->geom->shapes[key->
+						       xkbkey->shape_ndx]);
+}
+
+static void
+draw_text_doodad (CafekbdKeyboardDrawingRenderContext * context,
+		  CafekbdKeyboardDrawing * drawing,
+		  CafekbdKeyboardDrawingDoodad * doodad,
+		  XkbTextDoodadRec * text_doodad)
+{
+	gint x, y;
+	if (!drawing->xkb)
+		return;
+
+	x = xkb_to_pixmap_coord (context,
+				 doodad->origin_x + text_doodad->left);
+	y = xkb_to_pixmap_coord (context,
+				 doodad->origin_y + text_doodad->top);
+
+	set_markup (context, text_doodad->text);
+	draw_pango_layout (context, drawing, doodad->angle, x, y);
+}
+
+static void
+draw_indicator_doodad (CafekbdKeyboardDrawingRenderContext * context,
+		       CafekbdKeyboardDrawing * drawing,
+		       CafekbdKeyboardDrawingDoodad * doodad,
+		       XkbIndicatorDoodadRec * indicator_doodad)
+{
+	CdkRGBA *color;
+	XkbShapeRec *shape;<--- Variable 'shape' can be declared as pointer to const
+	gint i;
+
+	if (!drawing->xkb)
+		return;
+
+	shape = drawing->xkb->geom->shapes + indicator_doodad->shape_ndx;
+
+	color = drawing->colors + (doodad->on ?
+				   indicator_doodad->on_color_ndx :
+				   indicator_doodad->off_color_ndx);
+
+	for (i = 0; i < 1; i++)
+		draw_outline (context, shape->outlines + i, color,
+			      doodad->angle,
+			      doodad->origin_x + indicator_doodad->left,
+			      doodad->origin_y + indicator_doodad->top);
+}
+
+static void
+draw_shape_doodad (CafekbdKeyboardDrawingRenderContext * context,
+		   CafekbdKeyboardDrawing * drawing,
+		   CafekbdKeyboardDrawingDoodad * doodad,
+		   XkbShapeDoodadRec * shape_doodad)
+{
+	XkbShapeRec *shape;
+	CdkRGBA *color;
+	gint i;
+
+	if (!drawing->xkb)
+		return;
+
+	shape = drawing->xkb->geom->shapes + shape_doodad->shape_ndx;
+	color = drawing->colors + shape_doodad->color_ndx;
+
+	/* draw the primary outline filled */
+	draw_outline (context,
+		      shape->primary ? shape->primary : shape->outlines,
+		      color, doodad->angle,
+		      doodad->origin_x + shape_doodad->left,
+		      doodad->origin_y + shape_doodad->top);
+
+	/* stroke the other outlines */
+	for (i = 0; i < shape->num_outlines; i++) {
+		if (shape->outlines + i == shape->approx ||
+		    shape->outlines + i == shape->primary)
+			continue;
+		draw_outline (context, shape->outlines + i, NULL,
+			      doodad->angle,
+			      doodad->origin_x + shape_doodad->left,
+			      doodad->origin_y + shape_doodad->top);
+	}
+}
+
+static void
+draw_doodad (CafekbdKeyboardDrawingRenderContext * context,
+	     CafekbdKeyboardDrawing * drawing,
+	     CafekbdKeyboardDrawingDoodad * doodad)
+{
+	switch (doodad->doodad->any.type) {
+	case XkbOutlineDoodad:
+	case XkbSolidDoodad:
+		draw_shape_doodad (context, drawing, doodad,
+				   &doodad->doodad->shape);
+		break;
+
+	case XkbTextDoodad:
+		draw_text_doodad (context, drawing, doodad,
+				  &doodad->doodad->text);
+		break;
+
+	case XkbIndicatorDoodad:
+		draw_indicator_doodad (context, drawing, doodad,
+				       &doodad->doodad->indicator);
+		break;
+
+	case XkbLogoDoodad:
+		/* g_print ("draw_doodad: logo: %s\n", doodad->doodad->logo.logo_name); */
+		/* XkbLogoDoodadRec is essentially a subclass of XkbShapeDoodadRec */
+		draw_shape_doodad (context, drawing, doodad,
+				   &doodad->doodad->shape);
+		break;
+	}
+}
+
+typedef struct {
+	CafekbdKeyboardDrawing *drawing;
+	CafekbdKeyboardDrawingRenderContext *context;
+} DrawKeyboardItemData;
+
+static void
+redraw_overlapping_doodads (CafekbdKeyboardDrawingRenderContext * context,
+			    CafekbdKeyboardDrawing * drawing,
+			    const CafekbdKeyboardDrawingKey * key)
+{
+	GList *list;
+	gboolean do_draw = FALSE;
+
+	for (list = drawing->keyboard_items; list; list = list->next) {
+		CafekbdKeyboardDrawingItem *item = list->data;
+
+		if (do_draw
+		    && item->type ==
+		    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD)
+			draw_doodad (context, drawing,
+				     (CafekbdKeyboardDrawingDoodad *) item);
+
+		if (list->data == key)
+			do_draw = TRUE;
+	}
+}
+
+static void
+draw_keyboard_item (CafekbdKeyboardDrawingItem * item,
+		    DrawKeyboardItemData * data)
+{
+	CafekbdKeyboardDrawing *drawing = data->drawing;
+	CafekbdKeyboardDrawingRenderContext *context = data->context;
+
+	if (!drawing->xkb)
+		return;
+
+	switch (item->type) {
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_INVALID:
+		break;
+
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY:
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA:
+		draw_key (context, drawing,
+			  (CafekbdKeyboardDrawingKey *) item);
+		break;
+
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD:
+		draw_doodad (context, drawing,
+			     (CafekbdKeyboardDrawingDoodad *) item);
+		break;
+	}
+}
+
+static void
+draw_keyboard_to_context (CafekbdKeyboardDrawingRenderContext * context,
+			  CafekbdKeyboardDrawing * drawing)
+{
+	DrawKeyboardItemData data = { drawing, context };
+#ifdef KBDRAW_DEBUG
+	printf ("mods: %d\n", drawing->mods);
+#endif
+	g_list_foreach (drawing->keyboard_items,
+			(GFunc) draw_keyboard_item, &data);
+}
+
+static gboolean
+create_cairo (CafekbdKeyboardDrawing * drawing)
+{
+	CtkStyleContext *style_context = NULL;
+	CtkStateFlags state;
+	CdkRGBA dark_color;
+
+	if (drawing == NULL)
+		return FALSE;
+	if (drawing->surface == NULL)
+		return FALSE;
+
+	drawing->renderContext->cr =
+	    cairo_create (drawing->surface);
+
+	style_context = ctk_widget_get_style_context (CTK_WIDGET (drawing));
+	state = ctk_style_context_get_state (style_context);
+
+	ctk_style_context_get_background_color (style_context, state,
+	                                        &dark_color);
+	/* make dark background by making regular background darker */
+	dark_color.red *= 0.7;
+	dark_color.green *= 0.7;
+	dark_color.blue *= 0.7;
+
+	drawing->renderContext->dark_color = dark_color;
+
+	return TRUE;
+}
+
+static void
+destroy_cairo (CafekbdKeyboardDrawing * drawing)
+{
+	cairo_destroy (drawing->renderContext->cr);
+	drawing->renderContext->cr = NULL;
+}
+
+static void
+draw_keyboard (CafekbdKeyboardDrawing * drawing)
+{
+        CtkStyleContext *context =
+	    ctk_widget_get_style_context (CTK_WIDGET (drawing));
+	CtkStateFlags state = ctk_style_context_get_state (context);
+	CdkRGBA color;
+	CtkAllocation allocation;
+
+	if (!drawing->xkb)
+		return;
+
+	ctk_widget_get_allocation (CTK_WIDGET (drawing), &allocation);
+
+	drawing->surface =
+	    cdk_window_create_similar_surface (ctk_widget_get_window
+					       (CTK_WIDGET (drawing)),
+					       CAIRO_CONTENT_COLOR,
+					       allocation.width,
+					       allocation.height);
+
+	if (create_cairo (drawing)) {
+		/* blank background */
+		ctk_style_context_save (context);
+		ctk_style_context_add_class (context, CTK_STYLE_CLASS_VIEW);
+		ctk_style_context_get_background_color (context, state, &color);
+		ctk_style_context_restore (context);
+		cdk_cairo_set_source_rgba (drawing->renderContext->cr, &color);
+		cairo_paint (drawing->renderContext->cr);
+
+		draw_keyboard_to_context (drawing->renderContext, drawing);
+		destroy_cairo (drawing);
+	}
+}
+
+static void
+alloc_render_context (CafekbdKeyboardDrawing * drawing)
+{
+	CafekbdKeyboardDrawingRenderContext *context =
+	    drawing->renderContext =
+	    g_new0 (CafekbdKeyboardDrawingRenderContext, 1);
+
+	PangoContext *pangoContext =
+	    ctk_widget_get_pango_context (CTK_WIDGET (drawing));
+
+	CtkStyleContext *style_context =
+	    ctk_widget_get_style_context (CTK_WIDGET (drawing));
+	PangoFontDescription *fd = NULL;
+
+	ctk_style_context_get (style_context,
+	                       ctk_style_context_get_state (style_context),
+	                       CTK_STYLE_PROPERTY_FONT, &fd, NULL);
+
+	context->layout = pango_layout_new (pangoContext);
+	pango_layout_set_ellipsize (context->layout, PANGO_ELLIPSIZE_END);
+
+	context->font_desc = pango_font_description_copy (fd);
+	context->angle = 0;
+	context->scale_numerator = 1;
+	context->scale_denominator = 1;
+}
+
+static void
+free_render_context (CafekbdKeyboardDrawing * drawing)
+{
+	CafekbdKeyboardDrawingRenderContext *context = drawing->renderContext;
+	g_object_unref (G_OBJECT (context->layout));
+	pango_font_description_free (context->font_desc);
+
+	g_free (drawing->renderContext);
+	drawing->renderContext = NULL;
+}
+
+static gboolean
+draw (CtkWidget              *widget G_GNUC_UNUSED,
+      cairo_t                *cr,
+      CafekbdKeyboardDrawing *drawing)
+{
+	if (!drawing->xkb)
+		return FALSE;
+
+	if (drawing->surface == NULL)
+		return FALSE;
+
+	cairo_set_source_surface (cr, drawing->surface, 0, 0);
+	cairo_paint (cr);
+
+	return FALSE;
+}
+
+static gboolean
+idle_redraw (gpointer user_data)
+{
+	CafekbdKeyboardDrawing *drawing = user_data;
+
+	drawing->idle_redraw = 0;
+	draw_keyboard (drawing);
+	ctk_widget_queue_draw (CTK_WIDGET (drawing));
+	return FALSE;
+}
+
+static gboolean
+context_setup_scaling (CafekbdKeyboardDrawingRenderContext * context,
+		       CafekbdKeyboardDrawing * drawing,
+		       gdouble width, gdouble height,
+		       gdouble dpi_x, gdouble dpi_y)
+{
+	if (!drawing->xkb)
+		return FALSE;
+
+	if (drawing->xkb->geom->width_mm <= 0
+	    || drawing->xkb->geom->height_mm <= 0) {
+		g_critical
+		    ("keyboard geometry reports width or height as zero!");
+		return FALSE;
+	}
+
+	if (width * drawing->xkb->geom->height_mm <
+	    height * drawing->xkb->geom->width_mm) {
+		context->scale_numerator = width;
+		context->scale_denominator = drawing->xkb->geom->width_mm;
+	} else {
+		context->scale_numerator = height;
+		context->scale_denominator = drawing->xkb->geom->height_mm;
+	}
+
+	pango_font_description_set_size (context->font_desc,
+					 72 * KEY_FONT_SIZE * dpi_x *
+					 context->scale_numerator /
+					 context->scale_denominator);
+	pango_layout_set_spacing (context->layout,
+				  -160 * dpi_y * context->scale_numerator /
+				  context->scale_denominator);
+	pango_layout_set_font_description (context->layout,
+					   context->font_desc);
+
+	return TRUE;
+}
+
+static void
+size_allocate (CtkWidget              *widget G_GNUC_UNUSED,
+	       CtkAllocation          *allocation,
+	       CafekbdKeyboardDrawing *drawing)
+{
+	CafekbdKeyboardDrawingRenderContext *context = drawing->renderContext;
+
+	if (drawing->surface) {
+		cairo_surface_destroy (drawing->surface);
+		drawing->surface = NULL;
+	}
+
+	if (!context_setup_scaling (context, drawing,
+				    allocation->width, allocation->height,
+				    50, 50))
+		return;
+
+	if (!drawing->idle_redraw)
+		drawing->idle_redraw = g_idle_add (idle_redraw, drawing);
+}
+
+static gint
+key_event (CtkWidget              *widget G_GNUC_UNUSED,
+	   CdkEventKey            *event,
+	   CafekbdKeyboardDrawing *drawing)
+{
+	CafekbdKeyboardDrawingKey *key;
+	if (!drawing->xkb)
+		return FALSE;
+
+	key = drawing->keys + event->hardware_keycode;
+
+	if (event->hardware_keycode > drawing->xkb->max_key_code ||
+	    event->hardware_keycode < drawing->xkb->min_key_code ||
+	    key->xkbkey == NULL) {
+		g_signal_emit (drawing,
+			       cafekbd_keyboard_drawing_signals[BAD_KEYCODE],
+			       0, event->hardware_keycode);
+		return TRUE;
+	}
+
+	if ((event->type == CDK_KEY_PRESS && key->pressed) ||
+	    (event->type == CDK_KEY_RELEASE && !key->pressed))
+		return TRUE;
+	/* otherwise this event changes the state we believed we had before */
+
+	key->pressed = (event->type == CDK_KEY_PRESS);
+
+	if (create_cairo (drawing)) {
+		draw_key (drawing->renderContext, drawing, key);
+		redraw_overlapping_doodads (drawing->renderContext,
+					    drawing, key);
+		destroy_cairo (drawing);
+	}
+
+	invalidate_key_region (drawing, key);
+	return TRUE;
+}
+
+static gint
+button_press_event (CtkWidget              *widget,
+		    CdkEventButton         *event G_GNUC_UNUSED,
+		    CafekbdKeyboardDrawing *drawing)<--- Parameter 'drawing' can be declared as pointer to const
+{
+	if (!drawing->xkb)
+		return FALSE;
+
+	ctk_widget_grab_focus (widget);
+	return FALSE;
+}
+
+static gboolean
+unpress_keys (CafekbdKeyboardDrawing * drawing)
+{
+	gint i;
+
+	drawing->timeout = 0;
+
+	if (!drawing->xkb)
+		return FALSE;
+
+	if (create_cairo (drawing)) {
+		for (i = drawing->xkb->min_key_code;
+		     i <= drawing->xkb->max_key_code; i++)
+			if (drawing->keys[i].pressed) {
+				drawing->keys[i].pressed = FALSE;
+				draw_key (drawing->renderContext, drawing,
+					  drawing->keys + i);
+				invalidate_key_region (drawing,
+						       drawing->keys + i);
+			}
+		destroy_cairo (drawing);
+	}
+
+	return FALSE;
+}
+
+static gint
+focus_event (CtkWidget              *widget G_GNUC_UNUSED,
+	     CdkEventFocus          *event,<--- Parameter 'event' can be declared as pointer to const
+	     CafekbdKeyboardDrawing *drawing)
+{
+	if (event->in && drawing->timeout > 0) {
+		g_source_remove (drawing->timeout);
+		drawing->timeout = 0;
+	} else if (drawing->timeout == 0)
+		drawing->timeout =
+		    g_timeout_add (120, (GSourceFunc) unpress_keys,
+				   drawing);
+
+	return FALSE;
+}
+
+static gint
+compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a,<--- Parameter 'a' can be declared as pointer to const
+				  CafekbdKeyboardDrawingItem * b)<--- Parameter 'b' can be declared as pointer to const
+{
+	if (a->priority > b->priority)
+		return 1;
+	else if (a->priority < b->priority)
+		return -1;
+	else
+		return 0;
+}
+
+static void
+init_indicator_doodad (CafekbdKeyboardDrawing * drawing,
+		       XkbDoodadRec * xkbdoodad,
+		       CafekbdKeyboardDrawingDoodad * doodad)
+{
+	if (!drawing->xkb)
+		return;
+
+	if (xkbdoodad->any.type == XkbIndicatorDoodad) {
+		gint index;
+		Atom iname = 0;
+		Atom sname = xkbdoodad->indicator.name;
+		unsigned long phys_indicators =
+		    drawing->xkb->indicators->phys_indicators;
+		Atom *pind = drawing->xkb->names->indicators;<--- Variable 'pind' can be declared as pointer to const
+
+#ifdef KBDRAW_DEBUG
+		printf ("Looking for %d[%s]\n",
+			(int) sname, XGetAtomName (drawing->display,
+						   sname));
+#endif
+
+		for (index = 0; index < XkbNumIndicators; index++) {
+			iname = *pind++;
+			/* name matches and it is real */
+			if (iname == sname
+			    && (phys_indicators & (1 << index)))
+				break;
+			if (iname == 0)
+				break;
+		}
+		if (iname == 0)
+			g_warning ("Could not find indicator %d [%s]\n",
+				   (int) sname,
+				   XGetAtomName (drawing->display, sname));
+		else {
+#ifdef KBDRAW_DEBUG
+			printf ("Found in xkbdesc as %d\n", index);
+#endif
+			drawing->physical_indicators[index] = doodad;
+			/* Trying to obtain the real state, but if fail - just assume OFF */
+			if (!XkbGetNamedIndicator
+			    (drawing->display, sname, NULL, &doodad->on,
+			     NULL, NULL))
+				doodad->on = 0;
+		}
+	}
+}
+
+static void
+init_keys_and_doodads (CafekbdKeyboardDrawing * drawing)
+{
+	gint i, j, k;
+	gint x, y;
+
+	if (!drawing->xkb)
+		return;
+
+	for (i = 0; i < drawing->xkb->geom->num_doodads; i++) {
+		XkbDoodadRec *xkbdoodad = drawing->xkb->geom->doodads + i;
+		CafekbdKeyboardDrawingDoodad *doodad =
+		    g_new (CafekbdKeyboardDrawingDoodad, 1);
+
+		doodad->type = CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD;
+		doodad->origin_x = 0;
+		doodad->origin_y = 0;
+		doodad->angle = 0;
+		doodad->priority = xkbdoodad->any.priority * 256 * 256;
+		doodad->doodad = xkbdoodad;
+
+		init_indicator_doodad (drawing, xkbdoodad, doodad);
+
+		drawing->keyboard_items =
+		    g_list_append (drawing->keyboard_items, doodad);
+	}
+
+	for (i = 0; i < drawing->xkb->geom->num_sections; i++) {
+		XkbSectionRec *section = drawing->xkb->geom->sections + i;
+		guint priority;
+
+#ifdef KBDRAW_DEBUG
+		printf ("initing section %d containing %d rows\n", i,
+			section->num_rows);
+#endif
+		x = section->left;
+		y = section->top;
+		priority = section->priority * 256 * 256;
+
+		for (j = 0; j < section->num_rows; j++) {
+			XkbRowRec *row = section->rows + j;
+
+#ifdef KBDRAW_DEBUG
+			printf ("  initing row %d\n", j);
+#endif
+			x = section->left + row->left;
+			y = section->top + row->top;
+
+			for (k = 0; k < row->num_keys; k++) {
+				XkbKeyRec *xkbkey = row->keys + k;
+				CafekbdKeyboardDrawingKey *key;
+				XkbShapeRec *shape =
+				    drawing->xkb->geom->shapes +
+				    xkbkey->shape_ndx;
+				guint keycode = find_keycode (drawing,
+							      xkbkey->
+							      name.name);
+
+				if (keycode == INVALID_KEYCODE)
+					continue;
+#ifdef KBDRAW_DEBUG
+				printf
+				    ("    initing key %d, shape: %p(%p + %d), code: %u\n",
+				     k, shape, drawing->xkb->geom->shapes,
+				     xkbkey->shape_ndx, keycode);
+#endif
+				if (row->vertical)
+					y += xkbkey->gap;
+				else
+					x += xkbkey->gap;
+
+				if (keycode >= drawing->xkb->min_key_code
+				    && keycode <=
+				    drawing->xkb->max_key_code) {
+					key = drawing->keys + keycode;
+					if (key->type ==
+					    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_INVALID)
+					{
+						key->type =
+						    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY;
+					} else {
+						/* duplicate key for the same keycode,
+						   already defined as CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY */
+						key =
+						    g_new0
+						    (CafekbdKeyboardDrawingKey,
+						     1);
+						key->type =
+						    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA;
+					}
+				} else {
+					g_warning
+					    ("key %4.4s: keycode = %u; not in range %d..%d\n",
+					     xkbkey->name.name, keycode,
+					     drawing->xkb->min_key_code,
+					     drawing->xkb->max_key_code);
+
+					key =
+					    g_new0 (CafekbdKeyboardDrawingKey,
+						    1);
+					key->type =
+					    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA;
+				}
+
+				key->xkbkey = xkbkey;
+				key->angle = section->angle;
+				rotate_coordinate (section->left,
+						   section->top, x, y,
+						   section->angle,
+						   &key->origin_x,
+						   &key->origin_y);
+				key->priority = priority;
+				key->keycode = keycode;
+
+				drawing->keyboard_items =
+				    g_list_append (drawing->keyboard_items,
+						   key);
+
+				if (row->vertical)
+					y += shape->bounds.y2;
+				else
+					x += shape->bounds.x2;
+
+				priority++;
+			}
+		}
+
+		for (j = 0; j < section->num_doodads; j++) {
+			XkbDoodadRec *xkbdoodad = section->doodads + j;
+			CafekbdKeyboardDrawingDoodad *doodad =
+			    g_new (CafekbdKeyboardDrawingDoodad, 1);
+
+			doodad->type =
+			    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD;
+			doodad->origin_x = x;
+			doodad->origin_y = y;
+			doodad->angle = section->angle;
+			doodad->priority =
+			    priority + xkbdoodad->any.priority;
+			doodad->doodad = xkbdoodad;
+
+			init_indicator_doodad (drawing, xkbdoodad, doodad);
+
+			drawing->keyboard_items =
+			    g_list_append (drawing->keyboard_items,
+					   doodad);
+		}
+	}
+
+	drawing->keyboard_items = g_list_sort (drawing->keyboard_items,
+					       (GCompareFunc)
+					       compare_keyboard_item_priorities);<--- You might need to cast the function pointer here<--- You might need to cast the function pointer here
+}
+
+static void
+init_colors (CafekbdKeyboardDrawing * drawing)
+{
+	gboolean result;
+	gint i;
+
+	if (!drawing->xkb)
+		return;
+
+	drawing->colors = g_new (CdkRGBA, drawing->xkb->geom->num_colors);
+
+	for (i = 0; i < drawing->xkb->geom->num_colors; i++) {
+		result =
+		    parse_xkb_color_spec (drawing->xkb->geom->
+					  colors[i].spec,
+					  drawing->colors + i);
+
+		if (!result)
+			g_warning
+			    ("init_colors: unable to parse color %s\n",
+			     drawing->xkb->geom->colors[i].spec);
+	}
+}
+
+static void
+free_cdik (			/*colors doodads indicators keys */
+		  CafekbdKeyboardDrawing * drawing)
+{
+	GList *itemp;
+
+	if (!drawing->xkb)
+		return;
+
+	for (itemp = drawing->keyboard_items; itemp; itemp = itemp->next) {
+		CafekbdKeyboardDrawingItem *item = itemp->data;
+
+		switch (item->type) {
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_INVALID:
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY:
+			break;
+
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA:
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD:
+			g_free (item);
+			break;
+		}
+	}
+
+	g_list_free (drawing->keyboard_items);
+	drawing->keyboard_items = NULL;
+
+	g_free (drawing->keys);
+	g_free (drawing->colors);
+}
+
+static void
+alloc_cdik (CafekbdKeyboardDrawing * drawing)
+{
+	if (!drawing->xkb)
+		return;
+
+	drawing->physical_indicators_size =
+	    drawing->xkb->indicators->phys_indicators + 1;
+	drawing->physical_indicators =
+	    g_new0 (CafekbdKeyboardDrawingDoodad *,
+		    drawing->physical_indicators_size);
+	drawing->keys =
+	    g_new0 (CafekbdKeyboardDrawingKey,
+		    drawing->xkb->max_key_code + 1);
+}
+
+static void
+process_indicators_state_notify (XkbIndicatorNotifyEvent * iev,<--- Parameter 'iev' can be declared as pointer to const
+				 CafekbdKeyboardDrawing * drawing)
+{
+	/* Good question: should we track indicators when the keyboard is
+	   NOT really taken from the screen */
+	gint i;
+
+	for (i = 0; i <= drawing->xkb->indicators->phys_indicators; i++)
+		if (drawing->physical_indicators[i] != NULL
+		    && (iev->changed & 1 << i)) {
+			gint state = (iev->state & 1 << i) != FALSE;
+
+			if ((state && !drawing->physical_indicators[i]->on)
+			    || (!state
+				&& drawing->physical_indicators[i]->on)) {
+				drawing->physical_indicators[i]->on =
+				    state;
+				if (create_cairo (drawing)) {
+					draw_doodad
+					    (drawing->renderContext,
+					     drawing,
+					     drawing->physical_indicators
+					     [i]);
+					destroy_cairo (drawing);
+				}
+				invalidate_indicator_doodad_region
+				    (drawing,
+				     drawing->physical_indicators[i]);
+			}
+		}
+}
+
+static CdkFilterReturn
+xkb_state_notify_event_filter (CdkXEvent              *cdkxev,
+			       CdkEvent               *event G_GNUC_UNUSED,
+			       CafekbdKeyboardDrawing *drawing)
+{
+#define modifier_change_mask (XkbModifierStateMask | XkbModifierBaseMask | XkbModifierLatchMask | XkbModifierLockMask)
+
+	if (!drawing->xkb)
+		return CDK_FILTER_CONTINUE;
+
+	if (((XEvent *) cdkxev)->type == drawing->xkb_event_type) {
+		XkbEvent *kev = (XkbEvent *) cdkxev;
+		CtkAllocation allocation;
+		switch (kev->any.xkb_type) {
+		case XkbStateNotify:
+			if (((kev->state.changed & modifier_change_mask) &&
+			     drawing->track_modifiers)) {
+				free_cdik (drawing);
+				if (drawing->track_modifiers)
+					cafekbd_keyboard_drawing_set_mods
+					    (drawing,
+					     kev->state.compat_state);
+				drawing->keys =
+				    g_new0 (CafekbdKeyboardDrawingKey,
+					    drawing->xkb->max_key_code +
+					    1);
+
+				ctk_widget_get_allocation (CTK_WIDGET
+							   (drawing),
+							   &allocation);
+				size_allocate (CTK_WIDGET (drawing),
+					       &allocation, drawing);
+
+				init_keys_and_doodads (drawing);
+				init_colors (drawing);
+			}
+			break;
+
+		case XkbIndicatorStateNotify:
+			{
+				process_indicators_state_notify (&
+								 ((XkbEvent
+								   *)
+								  cdkxev)->indicators,
+drawing);
+			}
+			break;
+
+		case XkbIndicatorMapNotify:
+		case XkbControlsNotify:
+		case XkbNamesNotify:
+		case XkbNewKeyboardNotify:
+			{
+				XkbStateRec state;
+				memset (&state, 0, sizeof (state));
+				XkbGetState (drawing->display,
+					     XkbUseCoreKbd, &state);
+				if (drawing->track_modifiers)
+					cafekbd_keyboard_drawing_set_mods
+					    (drawing, state.compat_state);
+				if (drawing->track_config)
+					cafekbd_keyboard_drawing_set_keyboard
+					    (drawing, NULL);
+			}
+			break;
+		}
+	}
+
+	return CDK_FILTER_CONTINUE;
+}
+
+static void
+destroy (CafekbdKeyboardDrawing * drawing)
+{
+	free_render_context (drawing);
+	cdk_window_remove_filter (NULL, (CdkFilterFunc)
+				  xkb_state_notify_event_filter, drawing);
+	if (drawing->timeout > 0) {
+		g_source_remove (drawing->timeout);
+		drawing->timeout = 0;
+	}
+	if (drawing->idle_redraw > 0) {
+		g_source_remove (drawing->idle_redraw);
+		drawing->idle_redraw = 0;
+	}
+
+	if (drawing->surface != NULL) {
+		cairo_surface_destroy (drawing->surface);
+	}
+}
+
+static void
+style_changed (CafekbdKeyboardDrawing * drawing)
+{
+	pango_layout_context_changed (drawing->renderContext->layout);
+}
+
+static void
+cafekbd_keyboard_drawing_init (CafekbdKeyboardDrawing * drawing)
+{
+	gint opcode = 0, error = 0, major = 1, minor = 0;
+	gint mask;
+
+	drawing->display = CDK_DISPLAY_XDISPLAY(cdk_display_get_default());
+
+	printf ("dpy: %p\n", (void *) drawing->display);
+
+	if (!XkbQueryExtension
+	    (drawing->display, &opcode, &drawing->xkb_event_type, &error,
+	     &major, &minor))
+		g_critical
+		    ("XkbQueryExtension failed! Stuff probably won't work.");
+
+	printf ("evt/error/major/minor: %d/%d/%d/%d\n",
+		drawing->xkb_event_type, error, major, minor);
+
+	/* XXX: this stuff probably doesn't matter.. also, cdk_screen_get_default can fail */
+	if (ctk_widget_has_screen (CTK_WIDGET (drawing)))
+		drawing->screen_num =
+		    cdk_x11_screen_get_screen_number (ctk_widget_get_screen
+					   (CTK_WIDGET (drawing)));
+	else
+		drawing->screen_num =
+		    cdk_x11_screen_get_screen_number (cdk_screen_get_default ());
+
+	drawing->surface = NULL;
+	alloc_render_context (drawing);
+
+	drawing->keyboard_items = NULL;
+	drawing->colors = NULL;
+
+	drawing->track_modifiers = 0;
+	drawing->track_config = 0;
+
+	/* XXX: XkbClientMapMask | XkbIndicatorMapMask | XkbNamesMask | XkbGeometryMask */
+	drawing->xkb = XkbGetKeyboard (drawing->display,
+				       XkbGBN_GeometryMask |
+				       XkbGBN_KeyNamesMask |
+				       XkbGBN_OtherNamesMask |
+				       XkbGBN_SymbolsMask |
+				       XkbGBN_IndicatorMapMask,
+				       XkbUseCoreKbd);
+	if (drawing->xkb) {
+		XkbGetNames (drawing->display, XkbAllNamesMask, drawing->xkb);
+		XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+				       XkbIndicatorStateNotify,
+				       drawing->xkb->indicators->phys_indicators,
+				       drawing->xkb->indicators->phys_indicators);
+	}
+
+	drawing->l3mod = XkbKeysymToModifiers (drawing->display,
+					       CDK_KEY_ISO_Level3_Shift);
+
+	drawing->xkbOnDisplay = TRUE;
+
+	alloc_cdik (drawing);
+
+	mask =
+	    (XkbStateNotifyMask | XkbNamesNotifyMask |
+	     XkbControlsNotifyMask | XkbIndicatorMapNotifyMask |
+	     XkbNewKeyboardNotifyMask);
+	XkbSelectEvents (drawing->display, XkbUseCoreKbd, mask, mask);
+
+	mask = XkbGroupStateMask | XkbModifierStateMask;
+	XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+			       XkbStateNotify, mask, mask);
+
+	mask = (XkbGroupNamesMask | XkbIndicatorNamesMask);
+	XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+			       XkbNamesNotify, mask, mask);
+	init_keys_and_doodads (drawing);
+	init_colors (drawing);
+
+	/* required to get key events */
+	ctk_widget_set_can_focus (CTK_WIDGET (drawing), TRUE);
+
+	ctk_widget_set_events (CTK_WIDGET (drawing),
+			       CDK_EXPOSURE_MASK | CDK_KEY_PRESS_MASK |
+			       CDK_KEY_RELEASE_MASK | CDK_BUTTON_PRESS_MASK
+			       | CDK_FOCUS_CHANGE_MASK);
+	g_signal_connect (G_OBJECT (drawing), "draw",
+			  G_CALLBACK (draw), drawing);
+	g_signal_connect_after (G_OBJECT (drawing), "key-press-event",
+				G_CALLBACK (key_event), drawing);
+	g_signal_connect_after (G_OBJECT (drawing), "key-release-event",
+				G_CALLBACK (key_event), drawing);
+	g_signal_connect (G_OBJECT (drawing), "button-press-event",
+			  G_CALLBACK (button_press_event), drawing);<--- You might need to cast the function pointer here
+	g_signal_connect (G_OBJECT (drawing), "focus-out-event",
+			  G_CALLBACK (focus_event), drawing);
+	g_signal_connect (G_OBJECT (drawing), "focus-in-event",
+			  G_CALLBACK (focus_event), drawing);<--- You might need to cast the function pointer here
+	g_signal_connect (G_OBJECT (drawing), "size-allocate",
+			  G_CALLBACK (size_allocate), drawing);
+	g_signal_connect (G_OBJECT (drawing), "destroy",
+			  G_CALLBACK (destroy), drawing);
+	g_signal_connect (G_OBJECT (drawing), "style-set",
+			  G_CALLBACK (style_changed), drawing);
+
+	cdk_window_add_filter (NULL, (CdkFilterFunc)
+			       xkb_state_notify_event_filter, drawing);
+}
+
+CtkWidget *
+cafekbd_keyboard_drawing_new (void)
+{
+	return
+	    CTK_WIDGET (g_object_new
+			(cafekbd_keyboard_drawing_get_type (), NULL));
+}
+
+static void
+cafekbd_keyboard_drawing_class_init (CafekbdKeyboardDrawingClass * klass)
+{
+	CtkWidgetClass *widget_class = CTK_WIDGET_CLASS (klass);
+	ctk_widget_class_set_css_name (widget_class, "cafekbd-keyboard-drawing");
+
+	klass->bad_keycode = NULL;
+
+	cafekbd_keyboard_drawing_signals[BAD_KEYCODE] =
+	    g_signal_new ("bad-keycode", cafekbd_keyboard_drawing_get_type (),
+			  G_SIGNAL_RUN_FIRST,
+			  G_STRUCT_OFFSET (CafekbdKeyboardDrawingClass,
+					   bad_keycode), NULL, NULL,
+			  cafekbd_keyboard_drawing_VOID__UINT, G_TYPE_NONE, 1,
+			  G_TYPE_UINT);
+}
+
+GType
+cafekbd_keyboard_drawing_get_type (void)
+{
+	static GType cafekbd_keyboard_drawing_type = 0;
+
+	if (!cafekbd_keyboard_drawing_type) {
+		static const GTypeInfo cafekbd_keyboard_drawing_info = {
+			sizeof (CafekbdKeyboardDrawingClass),
+			NULL,	/* base_init */
+			NULL,	/* base_finalize */
+			(GClassInitFunc) cafekbd_keyboard_drawing_class_init,
+			NULL,	/* class_finalize */
+			NULL,	/* class_data */
+			sizeof (CafekbdKeyboardDrawing),
+			0,	/* n_preallocs */
+			(GInstanceInitFunc) cafekbd_keyboard_drawing_init,
+			NULL	/* *value_table */
+		};
+
+		cafekbd_keyboard_drawing_type =
+		    g_type_register_static (CTK_TYPE_DRAWING_AREA,
+					    "CafekbdKeyboardDrawing",
+					    &cafekbd_keyboard_drawing_info,
+					    0);
+	}
+
+	return cafekbd_keyboard_drawing_type;
+}
+
+void
+cafekbd_keyboard_drawing_set_mods (CafekbdKeyboardDrawing * drawing, guint mods)
+{
+#ifdef KBDRAW_DEBUG
+	printf ("set_mods: %d\n", mods);
+#endif
+	if (mods != drawing->mods) {
+		drawing->mods = mods;
+		ctk_widget_queue_draw (CTK_WIDGET (drawing));
+	}
+}
+
+/**
+ * cafekbd_keyboard_drawing_render:
+ * @kbdrawing: keyboard layout to render
+ * @cr:        Cairo context to render to
+ * @layout:    Pango layout to use to render text
+ * @x:         left coordinate (pixels) of region to render in
+ * @y:         top coordinate (pixels) of region to render in
+ * @width:     width (pixels) of region to render in
+ * @height:    height (pixels) of region to render in
+ *
+ * Renders a keyboard layout to a cairo_t context.  @cr and @layout can be got
+ * from e.g. a CtkWidget or a CtkPrintContext.  @cr and @layout may be modified
+ * by the function but will not be unreffed.
+ *
+ * Returns: %TRUE on success, %FALSE on failure
+ */
+gboolean
+cafekbd_keyboard_drawing_render (CafekbdKeyboardDrawing * kbdrawing,
+			      cairo_t * cr,
+			      PangoLayout * layout,
+			      double x, double y,
+			      double width, double height,
+			      double dpi_x, double dpi_y)
+{
+	CtkStyleContext *style_context =
+	    ctk_widget_get_style_context (CTK_WIDGET (kbdrawing));
+	CdkRGBA dark_color;
+	PangoFontDescription *fd = NULL;
+
+	ctk_style_context_get_background_color (style_context,
+	                                        ctk_style_context_get_state (style_context),
+	                                        &dark_color);
+	/* make dark background by making regular background darker */
+	dark_color.red *= 0.7;
+	dark_color.green *= 0.7;
+	dark_color.blue *= 0.7;
+
+	ctk_style_context_get (style_context,
+	                       ctk_style_context_get_state (style_context),
+	                       CTK_STYLE_PROPERTY_FONT, &fd, NULL);
+	fd = pango_font_description_copy (fd);
+
+	CafekbdKeyboardDrawingRenderContext context = {
+		cr,
+		kbdrawing->renderContext->angle,
+		layout,
+		pango_font_description_copy (fd),
+		1, 1,
+		dark_color
+	};
+
+	if (!context_setup_scaling (&context, kbdrawing, width, height,
+	                            dpi_x, dpi_y))
+		return FALSE;
+	cairo_translate (cr, x, y);
+
+	draw_keyboard_to_context (&context, kbdrawing);
+
+	pango_font_description_free (fd);
+
+	return TRUE;
+}
+
+/**
+ * cafekbd_keyboard_drawing_set_keyboard: (skip)
+ */
+gboolean
+cafekbd_keyboard_drawing_set_keyboard (CafekbdKeyboardDrawing * drawing,
+				    XkbComponentNamesRec * names)
+{
+	CtkAllocation allocation;
+
+	free_cdik (drawing);
+	if (drawing->xkb)
+		XkbFreeKeyboard (drawing->xkb, 0, TRUE);	/* free_all = TRUE */
+	drawing->xkb = NULL;
+
+	if (names) {
+		drawing->xkb =
+		    XkbGetKeyboardByName (drawing->display, XkbUseCoreKbd,
+					  names, 0,
+					  XkbGBN_GeometryMask |
+					  XkbGBN_KeyNamesMask |
+					  XkbGBN_OtherNamesMask |
+					  XkbGBN_ClientSymbolsMask |
+					  XkbGBN_IndicatorMapMask, FALSE);
+		drawing->xkbOnDisplay = FALSE;
+	} else {
+		drawing->xkb = XkbGetKeyboard (drawing->display,
+					       XkbGBN_GeometryMask |
+					       XkbGBN_KeyNamesMask |
+					       XkbGBN_OtherNamesMask |
+					       XkbGBN_SymbolsMask |
+					       XkbGBN_IndicatorMapMask,
+					       XkbUseCoreKbd);
+		XkbGetNames (drawing->display, XkbAllNamesMask,
+			     drawing->xkb);
+		drawing->xkbOnDisplay = TRUE;
+	}
+
+	if (drawing->xkb) {
+		XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+				       XkbIndicatorStateNotify,
+				       drawing->xkb->indicators->phys_indicators,
+				       drawing->xkb->indicators->phys_indicators);
+	}
+
+	alloc_cdik (drawing);
+
+	init_keys_and_doodads (drawing);
+	init_colors (drawing);
+
+	ctk_widget_get_allocation (CTK_WIDGET (drawing), &allocation);
+	size_allocate (CTK_WIDGET (drawing), &allocation, drawing);
+	ctk_widget_queue_draw (CTK_WIDGET (drawing));
+
+	return TRUE;
+}
+
+const gchar* cafekbd_keyboard_drawing_get_keycodes(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->keycodes <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->keycodes);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_geometry(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->geometry <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->geometry);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_symbols(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->symbols <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->symbols);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_types(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->types <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->types);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_compat(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->compat <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->compat);
+	}
+}
+
+void
+cafekbd_keyboard_drawing_set_track_modifiers (CafekbdKeyboardDrawing * drawing,
+					   gboolean enable)
+{
+	if (enable) {
+		XkbStateRec state;
+		drawing->track_modifiers = 1;
+		memset (&state, 0, sizeof (state));
+		XkbGetState (drawing->display, XkbUseCoreKbd, &state);
+		cafekbd_keyboard_drawing_set_mods (drawing,
+						state.compat_state);
+	} else
+		drawing->track_modifiers = 0;
+}
+
+void
+cafekbd_keyboard_drawing_set_track_config (CafekbdKeyboardDrawing * drawing,
+					gboolean enable)
+{
+	if (enable)
+		drawing->track_config = 1;
+	else
+		drawing->track_config = 0;
+}
+
+void
+cafekbd_keyboard_drawing_set_groups_levels (CafekbdKeyboardDrawing * drawing,
+					 CafekbdKeyboardDrawingGroupLevel *
+					 groupLevels[])
+{
+#ifdef KBDRAW_DEBUG
+	printf ("set_group_levels [topLeft]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT]->level);
+	printf ("set_group_levels [topRight]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPRIGHT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPRIGHT]->level);
+	printf ("set_group_levels [bottomLeft]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT]->level);
+	printf ("set_group_levels [bottomRight]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT]->level);
+#endif
+	drawing->groupLevels = groupLevels;
+
+	ctk_widget_queue_draw (CTK_WIDGET (drawing));
+}
+
+typedef struct {
+	CafekbdKeyboardDrawing *drawing;
+	const gchar *description;
+} XkbLayoutPreviewPrintData;
+
+static void
+cafekbd_keyboard_drawing_begin_print (CtkPrintOperation         *operation,
+				      CtkPrintContext           *context G_GNUC_UNUSED,
+				      XkbLayoutPreviewPrintData *data G_GNUC_UNUSED)
+{
+	/* We always print single-page documents */
+	CtkPrintSettings *settings =
+	    ctk_print_operation_get_print_settings (operation);
+	ctk_print_operation_set_n_pages (operation, 1);
+	if (!ctk_print_settings_has_key
+	    (settings, CTK_PRINT_SETTINGS_ORIENTATION))
+		ctk_print_settings_set_orientation (settings,
+						    CTK_PAGE_ORIENTATION_LANDSCAPE);
+}
+
+static void
+cafekbd_keyboard_drawing_draw_page (CtkPrintOperation         *operation,
+				    CtkPrintContext           *context,
+				    gint                       page_nr G_GNUC_UNUSED,
+				    XkbLayoutPreviewPrintData *data)
+{
+	cairo_t *cr = ctk_print_context_get_cairo_context (context);
+	PangoLayout *layout =
+	    ctk_print_context_create_pango_layout (context);
+	PangoFontDescription *desc =
+	    pango_font_description_from_string ("sans 8");
+	gdouble width = ctk_print_context_get_width (context);
+	gdouble height = ctk_print_context_get_height (context);
+	gdouble dpi_x = ctk_print_context_get_dpi_x (context);
+	gdouble dpi_y = ctk_print_context_get_dpi_y (context);
+	gchar *header;
+
+	ctk_print_operation_set_unit (operation, CTK_UNIT_PIXEL);
+
+	header = g_strdup_printf
+	    (_("Keyboard layout \"%s\"\n"
+	       "Copyright &#169; X.Org Foundation and "
+	       "XKeyboardConfig contributors\n"
+	       "For licensing see package metadata"), data->description);
+	pango_layout_set_markup (layout, header, -1);
+	pango_layout_set_font_description (layout, desc);
+	pango_font_description_free (desc);
+	pango_layout_set_width (layout, pango_units_from_double (width));
+	pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER);
+	cairo_set_source_rgb (cr, 0, 0, 0);
+	cairo_move_to (cr, 0, 0);
+	pango_cairo_show_layout (cr, layout);
+
+	cafekbd_keyboard_drawing_render (CAFEKBD_KEYBOARD_DRAWING
+				      (data->drawing), cr, layout, 0.0,
+				      0.0, width, height, dpi_x, dpi_y);
+
+	g_object_unref (layout);
+}
+
+void
+cafekbd_keyboard_drawing_print (CafekbdKeyboardDrawing * drawing,
+			     CtkWindow * parent_window,
+			     const gchar * description)
+{
+	CtkPrintOperation *print;
+	CtkPrintOperationResult res;
+	static CtkPrintSettings *settings = NULL;
+	XkbLayoutPreviewPrintData data = { drawing, description };
+
+	print = ctk_print_operation_new ();
+
+	if (settings != NULL)
+		ctk_print_operation_set_print_settings (print, settings);
+
+	g_signal_connect (print, "begin_print",
+			  G_CALLBACK (cafekbd_keyboard_drawing_begin_print),
+			  &data);
+	g_signal_connect (print, "draw_page",
+			  G_CALLBACK (cafekbd_keyboard_drawing_draw_page),
+			  &data);
+
+	res = ctk_print_operation_run (print,
+				       CTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
+				       parent_window, NULL);
+
+	if (res == CTK_PRINT_OPERATION_RESULT_APPLY) {
+		if (settings != NULL)
+			g_object_unref (settings);
+		settings = ctk_print_operation_get_print_settings (print);
+		g_object_ref (settings);
+	}
+
+	g_object_unref (print);
+}
+
+static void
+show_layout_response (CtkWidget * dialog, gint resp)
+{
+	CdkRectangle rect;
+	CtkWidget *kbdraw;
+	const gchar *groupName;
+
+	switch (resp) {
+	case CTK_RESPONSE_CLOSE:
+		ctk_window_get_position (CTK_WINDOW (dialog), &rect.x,
+					 &rect.y);
+		ctk_window_get_size (CTK_WINDOW (dialog), &rect.width,
+				     &rect.height);
+		cafekbd_preview_save_position (&rect);
+		ctk_widget_destroy (dialog);
+		break;
+	case CTK_RESPONSE_PRINT:
+		kbdraw =
+		    CTK_WIDGET (g_object_get_data
+				(G_OBJECT (dialog), "kbdraw"));
+		groupName =
+		    (const gchar *) g_object_get_data (G_OBJECT (dialog),
+						       "groupName");
+		cafekbd_keyboard_drawing_print (CAFEKBD_KEYBOARD_DRAWING
+					     (kbdraw), CTK_WINDOW (dialog),
+					     groupName ? groupName :
+					     _("Unknown"));
+	}
+}
+
+CtkWidget *
+cafekbd_keyboard_drawing_new_dialog (gint group, gchar * group_name)
+{
+	static CafekbdKeyboardDrawingGroupLevel groupsLevels[] = { {
+								 0, 1}, {
+									 0,
+									 3},
+	{
+	 0, 0}, {
+		 0, 2}
+	};
+	static CafekbdKeyboardDrawingGroupLevel *pGroupsLevels[] = {
+		groupsLevels, groupsLevels + 1, groupsLevels + 2,
+		groupsLevels + 3
+	};
+
+	CtkBuilder *builder;
+	CtkWidget *dialog, *kbdraw;
+	XkbComponentNamesRec component_names;
+	XklConfigRec *xkl_data;
+	CdkRectangle *rect;
+	GError *error = NULL;
+	char title[128] = "";
+	XklEngine* engine = xkl_engine_get_instance(CDK_DISPLAY_XDISPLAY(cdk_display_get_default()));
+
+	builder = ctk_builder_new ();
+	ctk_builder_add_from_resource (builder,
+	                               "/org/cafe/peripherals/keyboard/show-layout.ui",
+	                               &error);
+
+	if (error) {
+		g_error ("Could not load UI: %s", error->message);
+		g_clear_error (&error);
+	}
+
+
+	dialog =
+	    CTK_WIDGET (ctk_builder_get_object
+			(builder, "gswitchit_layout_view"));
+	kbdraw = cafekbd_keyboard_drawing_new ();
+	ctk_widget_set_vexpand (kbdraw, TRUE);
+
+	snprintf (title, sizeof (title), _("Keyboard Layout \"%s\""),
+		  group_name);
+	ctk_window_set_title (CTK_WINDOW (dialog), title);
+	g_object_set_data_full (G_OBJECT (dialog), "group_name",
+				g_strdup (group_name), g_free);
+
+	cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING
+						 (kbdraw), pGroupsLevels);
+
+	xkl_data = xkl_config_rec_new ();
+	if (xkl_config_rec_get_from_server (xkl_data, engine)) {
+		int num_layouts = g_strv_length (xkl_data->layouts);
+		int num_variants = g_strv_length (xkl_data->variants);
+		if (group >= 0 && group < num_layouts
+		    && group < num_variants) {
+			char *l = g_strdup (xkl_data->layouts[group]);
+			char *v = g_strdup (xkl_data->variants[group]);
+			char **p;
+			int i;
+
+			if ((p = xkl_data->layouts) != NULL)
+				for (i = num_layouts; --i >= 0;)
+					g_free (*p++);
+
+			if ((p = xkl_data->variants) != NULL)
+				for (i = num_variants; --i >= 0;)
+					g_free (*p++);
+
+			xkl_data->layouts =
+			    g_realloc (xkl_data->layouts,
+				       sizeof (char *) * 2);
+			xkl_data->variants =
+			    g_realloc (xkl_data->variants,
+				       sizeof (char *) * 2);
+			xkl_data->layouts[0] = l;
+			xkl_data->variants[0] = v;
+			xkl_data->layouts[1] = xkl_data->variants[1] =
+			    NULL;
+		}
+
+		if (xkl_xkb_config_native_prepare(engine, xkl_data, &component_names))
+		{
+			cafekbd_keyboard_drawing_set_keyboard
+			    (CAFEKBD_KEYBOARD_DRAWING (kbdraw),
+			     &component_names);
+			xkl_xkb_config_native_cleanup (engine,
+						       &component_names);
+		}
+	}
+
+	g_object_unref (G_OBJECT (xkl_data));
+
+	g_object_set_data (G_OBJECT (dialog), "builderData", builder);
+	g_signal_connect (G_OBJECT (dialog), "response", G_CALLBACK (show_layout_response), NULL);
+
+	rect = cafekbd_preview_load_position ();
+
+	if (rect != NULL)
+	{
+		ctk_window_move (CTK_WINDOW (dialog), rect->x, rect->y);
+		ctk_window_resize (CTK_WINDOW (dialog), rect->width, rect->height);
+		g_free (rect);
+	}
+	else
+	{
+		ctk_window_resize (CTK_WINDOW (dialog), 700, 400);
+	}
+
+	ctk_window_set_resizable (CTK_WINDOW (dialog), TRUE);
+
+	ctk_container_add (CTK_CONTAINER
+			   (ctk_builder_get_object
+			    (builder, "preview_vbox")), kbdraw);
+
+	g_object_set_data (G_OBJECT (dialog), "kbdraw", kbdraw);
+
+		g_signal_connect_swapped(dialog, "destroy", G_CALLBACK(g_object_unref),  g_object_get_data(G_OBJECT(dialog), "builderData"));
+
+	ctk_widget_show_all(dialog);
+
+	return dialog;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/5.html b/2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/5.html new file mode 100644 index 0000000..a0afe30 --- /dev/null +++ b/2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/5.html @@ -0,0 +1,1978 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+#include <config.h>
+
+#include <memory.h>
+
+#include <cairo.h>
+
+#include <cdk/cdkkeysyms.h>
+#include <cdk/cdkx.h>
+#include <glib/gi18n-lib.h>
+#include <glib/gprintf.h>
+
+#include <cafekbd-status.h>
+
+#include <cafekbd-desktop-config.h>
+#include <cafekbd-indicator-config.h>
+
+typedef struct _gki_globals {
+	XklEngine *engine;
+	XklConfigRegistry *registry;
+
+	CafekbdDesktopConfig cfg;
+	CafekbdIndicatorConfig ind_cfg;
+	CafekbdKeyboardConfig kbd_cfg;
+
+	const gchar *tooltips_format;
+	gchar **full_group_names;
+	gchar **short_group_names;
+
+	gint current_width;
+	gint current_height;
+	int real_width;
+
+	GSList *icons;		/* list of GdkPixbuf */
+	GSList *widget_instances;	/* list of CafekbdStatus */
+	gulong state_changed_handler;
+	gulong config_changed_handler;
+} gki_globals;
+
+static gchar *settings_signal_names[] = {
+	"notify::ctk-theme-name",
+	"notify::ctk-key-theme-name",
+	"notify::ctk-font-name",
+	"notify::font-options",
+};
+
+struct _CafekbdStatusPrivate {
+	gdouble angle;
+	gulong settings_signal_handlers[sizeof (settings_signal_names) /
+					sizeof (settings_signal_names[0])];
+};
+
+/* one instance for ALL widgets */
+static gki_globals globals;
+
+#define ForAllIndicators() \
+	{ \
+		GSList* cur; \
+		for (cur = globals.widget_instances; cur != NULL; cur = cur->next) { \
+			CafekbdStatus * gki = (CafekbdStatus*)cur->data;
+#define NextIndicator() \
+		} \
+	}
+
+G_DEFINE_TYPE (CafekbdStatus, cafekbd_status, CTK_TYPE_STATUS_ICON)<--- There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
+static void
+cafekbd_status_global_init (void);
+static void
+cafekbd_status_global_term (void);
+static GdkPixbuf *
+cafekbd_status_prepare_drawing (CafekbdStatus * gki, int group);
+static void
+cafekbd_status_set_current_page_for_group (CafekbdStatus * gki, int group);
+static void
+cafekbd_status_set_current_page (CafekbdStatus * gki);
+static void
+cafekbd_status_global_cleanup (CafekbdStatus * gki);
+static void
+cafekbd_status_global_fill (CafekbdStatus * gki);
+static void
+cafekbd_status_set_tooltips (CafekbdStatus * gki, const char *str);
+
+void
+cafekbd_status_set_tooltips (CafekbdStatus * gki, const char *str)
+{
+	g_assert (str == NULL || g_utf8_validate (str, -1, NULL));
+
+	ctk_status_icon_set_tooltip_text (CTK_STATUS_ICON (gki), str);
+}
+
+void
+cafekbd_status_global_cleanup (CafekbdStatus *gki G_GNUC_UNUSED)
+{
+	while (globals.icons) {
+		if (globals.icons->data)
+			g_object_unref (G_OBJECT (globals.icons->data));
+		globals.icons =
+		    g_slist_delete_link (globals.icons, globals.icons);
+	}
+}
+
+void
+cafekbd_status_global_fill (CafekbdStatus * gki)
+{
+	int grp;
+	int total_groups = xkl_engine_get_num_groups (globals.engine);
+
+	for (grp = 0; grp < total_groups; grp++) {
+		GdkPixbuf *page = cafekbd_status_prepare_drawing (gki, grp);
+		globals.icons = g_slist_append (globals.icons, page);
+	}
+}
+
+static void
+cafekbd_status_activate (CafekbdStatus *gki G_GNUC_UNUSED)
+{
+	xkl_debug (150, "Mouse button pressed on applet\n");
+	cafekbd_desktop_config_lock_next_group (&globals.cfg);
+}
+
+/* hackish xref */
+extern gchar *cafekbd_indicator_extract_layout_name (int group,
+						  XklEngine * engine,
+						  CafekbdKeyboardConfig *
+						  kbd_cfg,
+						  gchar **
+						  short_group_names,
+						  gchar **
+						  full_group_names);
+
+extern gchar *cafekbd_indicator_create_label_title (int group,
+						 GHashTable **
+						 ln2cnt_map,
+						 gchar * layout_name);
+
+static void
+cafekbd_status_render_cairo (cairo_t * cr, int group)
+{
+	double r, g, b;
+	PangoFontDescription *pfd;
+	PangoContext *pcc;
+	PangoLayout *pl;
+	int lwidth, lheight;
+	gchar *layout_name, *lbl_title;
+	double screen_res;
+	cairo_font_options_t *fo;
+	static GHashTable *ln2cnt_map = NULL;
+
+	xkl_debug (160, "Rendering cairo for group %d\n", group);
+	if (globals.ind_cfg.background_color != NULL &&
+	    globals.ind_cfg.background_color[0] != 0) {
+		if (sscanf
+		    (globals.ind_cfg.background_color, "%lg %lg %lg", &r,
+		     &g, &b) == 3) {
+			cairo_set_source_rgb (cr, r, g, b);
+			cairo_rectangle (cr, 0, 0, globals.current_width,
+					 globals.current_height);
+			cairo_fill (cr);
+		}
+	}
+
+	if (globals.ind_cfg.foreground_color != NULL &&
+	    globals.ind_cfg.foreground_color[0] != 0) {
+		if (sscanf
+		    (globals.ind_cfg.foreground_color, "%lg %lg %lg", &r,
+		     &g, &b) == 3) {
+			cairo_set_source_rgb (cr, r, g, b);
+		}
+	}
+
+	pcc = pango_cairo_create_context (cr);
+
+	screen_res = cdk_screen_get_resolution (cdk_screen_get_default ());
+	if (screen_res > 0)
+		pango_cairo_context_set_resolution (pcc, screen_res);
+
+	fo = cairo_font_options_copy (cdk_screen_get_font_options
+				      (cdk_screen_get_default ()));
+	/* SUBPIXEL antialiasing gives bad results on in-memory images */
+	if (cairo_font_options_get_antialias (fo) ==
+	    CAIRO_ANTIALIAS_SUBPIXEL)
+		cairo_font_options_set_antialias (fo,
+						  CAIRO_ANTIALIAS_GRAY);
+	pango_cairo_context_set_font_options (pcc, fo);
+
+	pl = pango_layout_new (pcc);
+
+	layout_name = cafekbd_indicator_extract_layout_name (group,
+							  globals.engine,
+							  &globals.kbd_cfg,
+							  globals.short_group_names,
+							  globals.full_group_names);
+	lbl_title =
+	    cafekbd_indicator_create_label_title (group, &ln2cnt_map,
+					       layout_name);
+
+	if (group + 1 == xkl_engine_get_num_groups (globals.engine)) {
+		g_hash_table_destroy (ln2cnt_map);
+		ln2cnt_map = NULL;
+	}
+
+	pango_layout_set_text (pl, lbl_title, -1);
+
+	g_free (lbl_title);
+
+	pfd = pango_font_description_from_string (globals.ind_cfg.font_family);
+
+	pango_layout_set_font_description (pl, pfd);
+	pango_layout_get_size (pl, &lwidth, &lheight);
+
+	cairo_move_to (cr,
+		       (globals.current_width - lwidth / PANGO_SCALE) / 2,
+		       (globals.current_height -
+			lheight / PANGO_SCALE) / 2);
+
+	pango_cairo_show_layout (cr, pl);
+
+	pango_font_description_free (pfd);
+	g_object_unref (pl);
+	g_object_unref (pcc);
+	cairo_font_options_destroy (fo);
+	cairo_destroy (cr);
+
+	globals.real_width = (lwidth / PANGO_SCALE) + 4;
+	if (globals.real_width > globals.current_width)
+		globals.real_width = globals.current_width;
+	if (globals.real_width < globals.current_height)
+		globals.real_width = globals.current_height;
+}
+
+static inline guint8
+convert_color_channel (guint8 src, guint8 alpha)
+{
+	return alpha ? ((((guint) src) << 8) - src) / alpha : 0;
+}
+
+static void
+convert_bgra_to_rgba (guint8 const *src, guint8 * dst, int width,
+		      int height, int new_width)
+{
+	int xoffset = width - new_width;
+
+	/* *4 */
+	int ptr_step = xoffset << 2;
+
+	int x, y;
+
+	/* / 2 * 4 */
+	src = src + ((xoffset >> 1) << 2);
+
+	for (y = height; --y >= 0; src += ptr_step) {
+		for (x = new_width; --x >= 0;) {
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+			dst[0] = convert_color_channel (src[2], src[3]);
+			dst[1] = convert_color_channel (src[1], src[3]);
+			dst[2] = convert_color_channel (src[0], src[3]);
+			dst[3] = src[3];
+#else
+			dst[0] = convert_color_channel (src[1], src[0]);
+			dst[1] = convert_color_channel (src[2], src[0]);
+			dst[2] = convert_color_channel (src[3], src[0]);
+			dst[3] = src[0];
+#endif
+			dst += 4;
+			src += 4;
+		}
+	}
+}
+
+static GdkPixbuf *
+cafekbd_status_prepare_drawing (CafekbdStatus *gki G_GNUC_UNUSED,
+				int            group)
+{
+	GError *gerror = NULL;
+	char *image_filename;
+	GdkPixbuf *image;
+
+	if (globals.current_width == 0)
+		return NULL;
+
+	if (globals.ind_cfg.show_flags) {
+
+		image_filename =
+		    (char *) g_slist_nth_data (globals.
+					       ind_cfg.image_filenames,
+					       group);
+
+		image = gdk_pixbuf_new_from_file_at_size (image_filename,
+							  globals.current_width,
+							  globals.current_height,
+							  &gerror);
+
+		if (image == NULL) {
+			CtkWidget *dialog = ctk_message_dialog_new (NULL,
+								    CTK_DIALOG_DESTROY_WITH_PARENT,
+								    CTK_MESSAGE_ERROR,
+								    CTK_BUTTONS_OK,
+								    _
+								    ("There was an error loading an image: %s"),
+								    gerror
+								    ==
+								    NULL ?
+								    "Unknown"
+								    :
+								    gerror->message);
+			g_signal_connect (G_OBJECT (dialog), "response",
+					  G_CALLBACK (ctk_widget_destroy),
+					  NULL);
+
+			ctk_window_set_resizable (CTK_WINDOW (dialog),
+						  FALSE);
+
+			ctk_widget_show (dialog);
+			g_error_free (gerror);
+
+			return NULL;
+		}
+		xkl_debug (150,
+			   "Image %d[%s] loaded -> %p[%dx%d], alpha: %d\n",
+			   group, image_filename, image,
+			   gdk_pixbuf_get_width (image),
+			   gdk_pixbuf_get_height (image),
+			   gdk_pixbuf_get_has_alpha (image));
+
+		return image;
+	} else {
+		cairo_surface_t *cs =
+		    cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
+						globals.current_width,
+						globals.current_height);
+		unsigned char *cairo_data;
+		guchar *pixbuf_data;
+		cafekbd_status_render_cairo (cairo_create (cs), group);
+		cairo_data = cairo_image_surface_get_data (cs);
+#if 0
+		char pngfilename[20];
+		g_sprintf (pngfilename, "label%d.png", group);
+		cairo_surface_write_to_png (cs, pngfilename);
+#endif
+		pixbuf_data =
+		    g_new0 (guchar,
+			    4 * globals.real_width *
+			    globals.current_height);
+		convert_bgra_to_rgba (cairo_data, pixbuf_data,
+				      globals.current_width,
+				      globals.current_height,
+				      globals.real_width);
+
+		cairo_surface_destroy (cs);
+
+		image = gdk_pixbuf_new_from_data (pixbuf_data,
+						  GDK_COLORSPACE_RGB,
+						  TRUE,
+						  8,
+						  globals.real_width,
+						  globals.current_height,
+						  globals.real_width *
+						  4,
+						  (GdkPixbufDestroyNotify)
+						  g_free, NULL);
+		xkl_debug (150,
+			   "Image %d created -> %p[%dx%d], alpha: %d\n",
+			   group, image, gdk_pixbuf_get_width (image),
+			   gdk_pixbuf_get_height (image),
+			   gdk_pixbuf_get_has_alpha (image));
+
+		return image;
+	}
+	return NULL;
+}
+
+static void
+cafekbd_status_update_tooltips (CafekbdStatus * gki)
+{
+	XklState *state = xkl_engine_get_current_state (globals.engine);
+	gchar *buf;
+	if (state == NULL || state->group < 0
+	    || state->group >= g_strv_length (globals.full_group_names))
+		return;
+
+	buf = g_strdup_printf (globals.tooltips_format,
+			       globals.full_group_names[state->group]);
+
+	cafekbd_status_set_tooltips (gki, buf);
+	g_free (buf);
+}
+
+void
+cafekbd_status_reinit_ui (CafekbdStatus * gki)
+{
+	cafekbd_status_global_cleanup (gki);
+	cafekbd_status_global_fill (gki);
+
+	cafekbd_status_set_current_page (gki);
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+			    gchar     *key G_GNUC_UNUSED,
+			    gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "General configuration changed in settings - reiniting...\n");
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+	ForAllIndicators () {
+		cafekbd_status_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_ind_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+				gchar     *key G_GNUC_UNUSED,
+				gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "Applet configuration changed in settings - reiniting...\n");
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+
+	cafekbd_indicator_config_free_image_filenames (&globals.ind_cfg);
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	ForAllIndicators () {
+		cafekbd_status_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+static void
+cafekbd_status_load_group_names (const gchar ** layout_ids,
+			      const gchar ** variant_ids)
+{
+	if (!cafekbd_desktop_config_load_group_descriptions
+	    (&globals.cfg, globals.registry, layout_ids, variant_ids,
+	     &globals.short_group_names, &globals.full_group_names)) {
+		/* We just populate no short names (remain NULL) -
+		 * full names are going to be used anyway */
+		gint i, total_groups =
+		    xkl_engine_get_num_groups (globals.engine);
+		xkl_debug (150, "group descriptions loaded: %d!\n",
+			   total_groups);
+		globals.full_group_names =
+		    g_new0 (char *, total_groups + 1);
+
+		if (xkl_engine_get_features (globals.engine) &
+		    XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
+			gchar **lst = globals.kbd_cfg.layouts_variants;
+			for (i = 0; *lst; lst++, i++) {
+				globals.full_group_names[i] =
+				    g_strdup ((char *) *lst);
+			}
+		} else {
+			for (i = total_groups; --i >= 0;) {
+				globals.full_group_names[i] =
+				    g_strdup_printf ("Group %d", i);
+			}
+		}
+	}
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_kbd_cfg_callback (CafekbdStatus *gki G_GNUC_UNUSED)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+	xkl_debug (100,
+		   "XKB configuration changed on X Server - reiniting...\n");
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+
+	cafekbd_indicator_config_free_image_filenames (&globals.ind_cfg);
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	g_strfreev (globals.full_group_names);
+	globals.full_group_names = NULL;
+
+	if (globals.short_group_names != NULL) {
+		g_strfreev (globals.short_group_names);
+		globals.short_group_names = NULL;
+	}
+
+	cafekbd_status_load_group_names ((const gchar **) xklrec->layouts,
+				      (const gchar **) xklrec->variants);
+
+	ForAllIndicators () {
+		cafekbd_status_reinit_ui (gki);
+	} NextIndicator ();
+	g_object_unref (G_OBJECT (xklrec));
+}
+
+/* Should be called once for all applets */
+static void
+cafekbd_status_state_callback (XklEngine           *engine G_GNUC_UNUSED,
+			       XklEngineStateChange changeType,
+			       gint                 group,
+			       gboolean             restore)
+{
+	xkl_debug (150, "group is now %d, restore: %d\n", group, restore);
+
+	if (changeType == GROUP_CHANGED) {
+		ForAllIndicators () {
+			xkl_debug (200, "do repaint\n");
+			cafekbd_status_set_current_page_for_group (gki,
+								group);
+		}
+		NextIndicator ();
+	}
+}
+
+
+void
+cafekbd_status_set_current_page (CafekbdStatus * gki)
+{
+	XklState *cur_state;
+	cur_state = xkl_engine_get_current_state (globals.engine);
+	if (cur_state->group >= 0)
+		cafekbd_status_set_current_page_for_group (gki,
+							cur_state->group);
+}
+
+void
+cafekbd_status_set_current_page_for_group (CafekbdStatus * gki, int group)
+{
+	xkl_debug (200, "Revalidating for group %d\n", group);
+
+	ctk_status_icon_set_from_pixbuf (CTK_STATUS_ICON (gki),
+					 GDK_PIXBUF (g_slist_nth_data
+						     (globals.icons,
+						      group)));
+
+	cafekbd_status_update_tooltips (gki);
+}
+
+/* Should be called once for all widgets */
+static CdkFilterReturn
+cafekbd_status_filter_x_evt (CdkXEvent *xev,
+			     CdkEvent  *event G_GNUC_UNUSED)
+{
+	XEvent *xevent = (XEvent *) xev;
+
+	xkl_engine_filter_events (globals.engine, xevent);
+	switch (xevent->type) {
+	case ReparentNotify:
+		{
+			XReparentEvent *rne = (XReparentEvent *) xev;
+
+			ForAllIndicators () {
+				guint32 xid =
+				    ctk_status_icon_get_x11_window_id
+				    (CTK_STATUS_ICON (gki));
+
+				/* compare the indicator's parent window with the even window */
+				if (xid == rne->window) {
+					/* if so - make it transparent... */
+					xkl_engine_set_window_transparent
+					    (globals.engine, rne->window,
+					     TRUE);
+				}
+			}
+		NextIndicator ()}
+		break;
+	}
+	return CDK_FILTER_CONTINUE;
+}
+
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_start_listen (void)
+{
+	cdk_window_add_filter (NULL, (CdkFilterFunc)
+			       cafekbd_status_filter_x_evt, NULL);
+	cdk_window_add_filter (cdk_get_default_root_window (),
+			       (CdkFilterFunc) cafekbd_status_filter_x_evt,
+			       NULL);
+
+	xkl_engine_start_listen (globals.engine,
+				 XKLL_TRACK_KEYBOARD_STATE);
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_stop_listen (void)
+{
+	xkl_engine_stop_listen (globals.engine, XKLL_TRACK_KEYBOARD_STATE);
+
+	cdk_window_remove_filter (NULL, (CdkFilterFunc)
+				  cafekbd_status_filter_x_evt, NULL);
+	cdk_window_remove_filter
+	    (cdk_get_default_root_window (),
+	     (CdkFilterFunc) cafekbd_status_filter_x_evt, NULL);
+}
+
+static void
+cafekbd_status_size_changed (CafekbdStatus * gki, gint size)
+{
+	if (globals.current_height != size) {
+		globals.current_height = size;
+		globals.current_width = size * 3 / 2;
+		cafekbd_status_reinit_ui (gki);
+	}
+}
+
+static void
+cafekbd_status_theme_changed (CtkSettings   *settings G_GNUC_UNUSED,
+			      GParamSpec    *pspec G_GNUC_UNUSED,
+			      CafekbdStatus *gki)
+{
+	cafekbd_indicator_config_refresh_style (&globals.ind_cfg);
+	cafekbd_status_reinit_ui (gki);
+}
+
+static void
+cafekbd_status_init (CafekbdStatus * gki)
+{
+	int i;
+
+	if (!g_slist_length (globals.widget_instances))
+		cafekbd_status_global_init ();
+
+	gki->priv = g_new0 (CafekbdStatusPrivate, 1);
+
+	/* This should give NA a hint about the order */
+	/* commenting out fixes a Cdk-critical warning */
+/*	ctk_status_icon_set_name (CTK_STATUS_ICON (gki), "keyboard"); */
+
+	xkl_debug (100, "Initiating the widget startup process for %p\n",
+		   gki);
+
+	if (globals.engine == NULL) {
+		cafekbd_status_set_tooltips (gki,
+					  _("XKB initialization error"));
+		return;
+	}
+
+	cafekbd_status_set_tooltips (gki, NULL);
+
+	cafekbd_status_global_fill (gki);
+	cafekbd_status_set_current_page (gki);
+
+	/* append AFTER all initialization work is finished */
+	globals.widget_instances =
+	    g_slist_append (globals.widget_instances, gki);
+
+	g_signal_connect (gki, "size-changed",
+			  G_CALLBACK (cafekbd_status_size_changed), NULL);
+	g_signal_connect (gki, "activate",
+			  G_CALLBACK (cafekbd_status_activate), NULL);
+
+	for (i = sizeof (settings_signal_names) /
+	     sizeof (settings_signal_names[0]); --i >= 0;)
+		gki->priv->settings_signal_handlers[i] =
+		    g_signal_connect_after (ctk_settings_get_default (),
+					    settings_signal_names[i],
+					    G_CALLBACK
+					    (cafekbd_status_theme_changed),
+					    gki);
+}
+
+static void
+cafekbd_status_finalize (GObject * obj)
+{
+	int i;
+	CafekbdStatus *gki = CAFEKBD_STATUS (obj);
+	xkl_debug (100,
+		   "Starting the cafe-kbd-status widget shutdown process for %p\n",
+		   gki);
+
+	for (i = sizeof (settings_signal_names) /
+	     sizeof (settings_signal_names[0]); --i >= 0;)
+		g_signal_handler_disconnect (ctk_settings_get_default (),
+					     gki->
+					     priv->settings_signal_handlers
+					     [i]);
+
+	/* remove BEFORE all termination work is finished */
+	globals.widget_instances =
+	    g_slist_remove (globals.widget_instances, gki);
+
+	cafekbd_status_global_cleanup (gki);
+
+	xkl_debug (100,
+		   "The instance of cafe-kbd-status successfully finalized\n");
+
+	g_free (gki->priv);
+
+	G_OBJECT_CLASS (cafekbd_status_parent_class)->finalize (obj);
+
+	if (!g_slist_length (globals.widget_instances))
+		cafekbd_status_global_term ();
+}
+
+static void
+cafekbd_status_global_term (void)
+{
+	xkl_debug (100, "*** Last  CafekbdStatus instance *** \n");
+	cafekbd_status_stop_listen ();
+
+	cafekbd_desktop_config_stop_listen (&globals.cfg);
+	cafekbd_indicator_config_stop_listen (&globals.ind_cfg);
+
+	cafekbd_indicator_config_term (&globals.ind_cfg);
+	cafekbd_keyboard_config_term (&globals.kbd_cfg);
+	cafekbd_desktop_config_term (&globals.cfg);
+
+	if (g_signal_handler_is_connected
+	    (globals.engine, globals.state_changed_handler)) {
+		g_signal_handler_disconnect (globals.engine,
+					     globals.state_changed_handler);
+		globals.state_changed_handler = 0;
+	}
+	if (g_signal_handler_is_connected
+	    (globals.engine, globals.config_changed_handler)) {
+		g_signal_handler_disconnect (globals.engine,
+					     globals.config_changed_handler);
+		globals.config_changed_handler = 0;
+	}
+
+	g_object_unref (G_OBJECT (globals.registry));
+	globals.registry = NULL;
+	g_object_unref (G_OBJECT (globals.engine));
+	globals.engine = NULL;
+	xkl_debug (100, "*** Terminated globals *** \n");
+}
+
+static void
+cafekbd_status_class_init (CafekbdStatusClass * klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+	xkl_debug (100, "*** First CafekbdStatus instance *** \n");
+
+	memset (&globals, 0, sizeof (globals));
+
+	/* Initing some global vars */
+	globals.tooltips_format = "%s";
+
+	/* Initing vtable */
+	object_class->finalize = cafekbd_status_finalize;
+
+	/* Signals */
+}
+
+static void
+cafekbd_status_global_init (void)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+
+	globals.engine = xkl_engine_get_instance(CDK_DISPLAY_XDISPLAY(cdk_display_get_default()));
+
+	if (globals.engine == NULL) {
+		xkl_debug (0, "Libxklavier initialization error");
+		return;
+	}
+
+	globals.state_changed_handler =
+	    g_signal_connect (globals.engine, "X-state-changed",
+			      G_CALLBACK (cafekbd_status_state_callback),
+			      NULL);
+	globals.config_changed_handler =
+	    g_signal_connect (globals.engine, "X-config-changed",
+			      G_CALLBACK (cafekbd_status_kbd_cfg_callback),
+			      NULL);
+
+	cafekbd_desktop_config_init (&globals.cfg, globals.engine);
+	cafekbd_keyboard_config_init (&globals.kbd_cfg, globals.engine);
+	cafekbd_indicator_config_init (&globals.ind_cfg, globals.engine);
+
+	cafekbd_desktop_config_start_listen (&globals.cfg,
+					  (GCallback)
+					  cafekbd_status_cfg_changed, NULL);
+	cafekbd_indicator_config_start_listen (&globals.ind_cfg,
+					    (GCallback)
+					    cafekbd_status_ind_cfg_changed,
+					    NULL);
+
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+
+	globals.registry =
+	    xkl_config_registry_get_instance (globals.engine);
+	xkl_config_registry_load (globals.registry,
+				  globals.cfg.load_extra_items);
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	cafekbd_status_load_group_names ((const gchar **) xklrec->layouts,
+				      (const gchar **) xklrec->variants);
+	g_object_unref (G_OBJECT (xklrec));
+
+	cafekbd_status_start_listen ();
+
+	xkl_debug (100, "*** Inited globals *** \n");
+}
+
+CtkStatusIcon *
+cafekbd_status_new (void)
+{
+	return
+	    CTK_STATUS_ICON (g_object_new (cafekbd_status_get_type (), NULL));
+}
+
+/**
+ * cafekbd_status_get_xkl_engine:
+ *
+ * Returns: (transfer none): The engine shared by all CafekbdStatus objects
+ */
+XklEngine *
+cafekbd_status_get_xkl_engine ()
+{
+	return globals.engine;
+}
+
+/**
+ * cafekbd_status_get_group_names:
+ *
+ * Returns: (transfer none) (array zero-terminated=1): List of group names
+ */
+gchar **
+cafekbd_status_get_group_names ()
+{
+	return globals.full_group_names;
+}
+
+gchar *
+cafekbd_status_get_image_filename (guint group)
+{
+	if (!globals.ind_cfg.show_flags)
+		return NULL;
+	return cafekbd_indicator_config_get_images_file (&globals.ind_cfg,
+						      &globals.kbd_cfg,
+						      group);
+}
+
+void
+cafekbd_status_set_angle (CafekbdStatus * gki, gdouble angle)
+{
+	gki->priv->angle = angle;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/6.html b/2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/6.html new file mode 100644 index 0000000..5ed6ace --- /dev/null +++ b/2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/6.html @@ -0,0 +1,806 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctk/ctk.h>
+#include <stdlib.h>
+#include <string.h>
+#include <glib.h>
+#include "libcafekbd/cafekbd-keyboard-drawing.h"
+
+
+static gchar *groups = NULL;
+static gchar *levels = NULL;
+static gchar *symbols = NULL;
+static gchar *keycodes = NULL;
+static gchar *geometry = NULL;
+
+static gboolean track_config = FALSE;
+static gboolean track_modifiers = FALSE;
+static gboolean program_version = FALSE;
+
+static const GOptionEntry options[] = {
+	{"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
+	 "Keyboard groups to display, from 1-4. Up to four groups only may be "
+	 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
+	 "group1[,group2[,group3[,group4]]]"},
+	{"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
+	 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
+	 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
+	 "level1[,level2[,level3[,level4]]]"},
+	{"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
+	 "Symbols component of the keyboard. If you omit this option, it is "
+	 "obtained from the X server; that is, the keyboard that is currently "
+	 "configured is drawn. Examples: --symbols=us or "
+	 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL},
+	{"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
+	 "Keycodes component of the keyboard. If you omit this option, it is "
+	 "obtained from the X server; that is, the keyboard that is currently"
+	 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
+	 NULL},
+	{"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
+	 "Geometry xkb component. If you omit this option, it is obtained from the"
+	 " X server; that is, the keyboard that is currently configured is drawn. "
+	 "Example: --geometry=kinesis", NULL},
+	{"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
+	 "Track the current modifiers", NULL},
+	{"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
+	 "Track the server XKB configuration", NULL},
+	{"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
+	 "Show current version", NULL},
+	{NULL},
+};
+
+static gboolean
+set_groups (gchar * groups_option,
+	    CafekbdKeyboardDrawingGroupLevel * groupLevels)
+{
+	CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
+	gint cntr, g;
+
+	groupLevels[0].group =
+	    groupLevels[1].group =
+	    groupLevels[2].group = groupLevels[3].group = -1;
+
+	if (groups_option == NULL)
+		return TRUE;
+
+	for (cntr = 4; --cntr >= 0;) {
+		if (*groups_option == '\0')
+			return FALSE;
+
+		g = *groups_option - '1';
+		if (g < 0 || g >= 4)
+			return FALSE;
+
+		pgl->group = g;
+		/* printf ("group %d\n", pgl->group); */
+
+		groups_option++;
+		if (*groups_option == '\0')
+			return TRUE;
+		if (*groups_option != ',')
+			return FALSE;
+
+		groups_option++;
+		pgl++;
+	}
+
+	return TRUE;
+}
+
+static gboolean
+set_levels (gchar * levels_option,
+	    CafekbdKeyboardDrawingGroupLevel * groupLevels)
+{
+	CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
+	gint cntr, l;
+	gchar *p;
+
+	groupLevels[0].level =
+	    groupLevels[1].level =
+	    groupLevels[2].level = groupLevels[3].level = -1;
+
+	if (levels_option == NULL)
+		return TRUE;
+
+	for (cntr = 4; --cntr >= 0;) {
+		if (*levels_option == '\0')
+			return FALSE;
+
+		l = (gint) strtol (levels_option, &p, 10) - 1;
+		if (l < 0 || l >= 64)
+			return FALSE;
+
+		pgl->level = l;
+		/* printf ("level %d\n", pgl->level); */
+
+		levels_option = p;
+		if (*levels_option == '\0')
+			return TRUE;
+		if (*levels_option != ',')
+			return FALSE;
+
+		levels_option++;
+		pgl++;
+	}
+
+	return TRUE;
+}
+
+static void
+bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED,
+	     guint                   keycode)
+{
+	g_warning
+	    ("got keycode %u, which is not on your keyboard according to your configuration",
+	     keycode);
+}
+
+gint
+main (gint argc, gchar ** argv)
+{
+	CtkWidget *window;
+	CtkWidget *cafekbd_keyboard_drawing;
+	CdkScreen *screen;
+	CdkMonitor *monitor;
+	CdkRectangle rect;
+	GOptionContext *context;
+	GError *error = NULL;
+
+	CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
+	    { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
+	CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
+	    { &groupLevels[0], &groupLevels[1], &groupLevels[2],
+		&groupLevels[3]
+	};
+
+	context = g_option_context_new ("kbdraw");
+	g_option_context_add_main_entries (context, options, NULL);
+	if (!g_option_context_parse (context, &argc, &argv, &error)) {
+		g_message ("option parsing failed: %s", error->message);
+		g_option_context_free (context);
+		exit (EXIT_FAILURE);
+	}
+	g_option_context_free (context);
+
+	if (program_version) {
+		g_print ("kbdraw %s\n", VERSION);
+		exit (0);
+	}
+
+	ctk_init (&argc, &argv);
+
+	if (!set_groups (groups, groupLevels)) {
+		g_printerr ("--groups: invalid argument\n");
+		exit (1);
+	}
+
+	if (!set_levels (levels, groupLevels)) {
+		g_printerr ("--levels: invalid argument\n");
+		exit (1);
+	}
+
+	window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
+	g_signal_connect (G_OBJECT (window), "destroy",
+			  G_CALLBACK (ctk_main_quit), NULL);
+
+	screen = ctk_window_get_screen (CTK_WINDOW (window));
+	monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
+	cdk_monitor_get_geometry (monitor, &rect);
+	ctk_window_set_default_size (CTK_WINDOW (window),
+				     rect.width * 4 / 5,
+				     rect.height * 1 / 2);
+
+	ctk_widget_show (window);
+
+	cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
+	ctk_widget_show (cafekbd_keyboard_drawing);
+	ctk_container_add (CTK_CONTAINER (window), cafekbd_keyboard_drawing);
+
+	cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING
+						 (cafekbd_keyboard_drawing),
+						 pgroupLevels);
+
+	if (track_modifiers)
+		cafekbd_keyboard_drawing_set_track_modifiers
+		    (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing), TRUE);
+	if (track_config)
+		cafekbd_keyboard_drawing_set_track_config
+		    (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing), TRUE);
+	g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",
+			  G_CALLBACK (bad_keycode), NULL);
+
+	if (symbols || geometry || keycodes) {
+		XkbComponentNamesRec names;
+		gint success;
+
+		memset (&names, '\0', sizeof (names));
+
+		if (symbols)
+			names.symbols = symbols;
+		else
+			names.symbols = (gchar *)
+			    cafekbd_keyboard_drawing_get_symbols
+			    (CAFEKBD_KEYBOARD_DRAWING
+			     (cafekbd_keyboard_drawing));
+
+		if (keycodes)
+			names.keycodes = keycodes;
+		else
+			names.keycodes = (gchar *)
+			    cafekbd_keyboard_drawing_get_keycodes
+			    (CAFEKBD_KEYBOARD_DRAWING
+			     (cafekbd_keyboard_drawing));
+
+		if (geometry)
+			names.geometry = geometry;
+		else
+			names.geometry = (gchar *)
+			    cafekbd_keyboard_drawing_get_geometry
+			    (CAFEKBD_KEYBOARD_DRAWING
+			     (cafekbd_keyboard_drawing));
+
+		success =
+		    cafekbd_keyboard_drawing_set_keyboard
+		    (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing),
+		     &names);
+		if (!success) {
+			g_printerr
+			    ("\nError loading new keyboard description with components:\n\n"
+			     "  keycodes:  %s\n" "  types:     %s\n"
+			     "  compat:    %s\n" "  symbols:   %s\n"
+			     "  geometry:  %s\n\n", names.keycodes,
+			     names.types, names.compat, names.symbols,
+			     names.geometry);
+			exit (1);
+		}
+	}
+
+	ctk_widget_grab_focus (cafekbd_keyboard_drawing);
+
+	ctk_main ();
+
+	return 0;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/7.html b/2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/7.html new file mode 100644 index 0000000..8122587 --- /dev/null +++ b/2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/7.html @@ -0,0 +1,358 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+
+#include "libxklavier/xklavier.h"
+#include "libcafekbd/cafekbd-status.h"
+
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include <cdk/cdk.h>
+#include <cdk/cdkx.h>
+#include <glib/gi18n.h>
+#include <ctk/ctk.h>
+
+#include "X11/XKBlib.h"
+
+int
+main (int argc, char **argv)
+{
+	CtkStatusIcon *icon;<--- Variable 'icon' can be declared as pointer to const
+
+	bindtextdomain (GETTEXT_PACKAGE, CAFELOCALEDIR);
+	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+	textdomain (GETTEXT_PACKAGE);
+
+	ctk_init (&argc, &argv);
+
+	icon = cafekbd_status_new ();
+
+        if (icon == NULL)
+	{
+		return 1;
+	}
+
+	ctk_main ();
+
+	return 0;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/commitmsg b/2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/commitmsg new file mode 100644 index 0000000..891e4bf --- /dev/null +++ b/2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/commitmsg @@ -0,0 +1 @@ +Release 2.0.0 diff --git a/2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/index.html b/2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/index.html new file mode 100644 index 0000000..1040930 --- /dev/null +++ b/2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/index.html @@ -0,0 +1,242 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LineIdCWESeverityMessage
checkersReportinformationActive checkers: There was critical errors (use --checkers-report=<filename> to see details)
libcafekbd/cafekbd-desktop-config.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
libcafekbd/cafekbd-indicator-config.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
libcafekbd/cafekbd-indicator.c
66unknownMacroerrorThere is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
libcafekbd/cafekbd-keyboard-config.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
67knownConditionTrueFalse571styleCondition '*l1' is always true
67knownConditionTrueFalse571styleCondition '*l2' is always true
226constVariablePointer398styleVariable 'delim' can be declared as pointer to const
227knownConditionTrueFalse571styleCondition 'option!=NULL' is always true
282knownConditionTrueFalse570styleCondition 'variant==NULL' is always false
609constParameterPointer398styleParameter 'kbd_config' can be declared as pointer to const
libcafekbd/cafekbd-keyboard-drawing.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
61constParameterPointer398styleParameter 'context' can be declared as pointer to const
67constParameterPointer398styleParameter 'context' can be declared as pointer to const
625constParameterPointer398styleParameter 'context' can be declared as pointer to const
1026constVariablePointer398styleVariable 'runp' can be declared as pointer to const
1036constVariablePointer398styleVariable 'geometry' can be declared as pointer to const
1202constParameterPointer398styleParameter 'outline' can be declared as pointer to const
1397constVariablePointer398styleVariable 'shape' can be declared as pointer to const
1786constParameterCallback398styleParameter 'drawing' can be declared as pointer to const. However it seems that 'button_press_event' is a callback function, if 'drawing' is declared with const you might also need to cast function pointer(s).
1823constParameterCallback398styleParameter 'event' can be declared as pointer to const. However it seems that 'focus_event' is a callback function, if 'event' is declared with const you might also need to cast function pointer(s).
1838constParameterCallback398styleParameter 'a' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'a' is declared with const you might also need to cast function pointer(s).
1839constParameterCallback398styleParameter 'b' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'b' is declared with const you might also need to cast function pointer(s).
1863constVariablePointer398styleVariable 'pind' can be declared as pointer to const
2124constParameterPointer398styleParameter 'iev' can be declared as pointer to const
libcafekbd/cafekbd-status.c
82unknownMacroerrorThere is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
test/cafekbd-keyboard-drawing-test.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
test/cafekbd-status-test.c
42constVariablePointer398styleVariable 'icon' can be declared as pointer to const
+
+ +
+ + diff --git a/2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/output_28c310f42d337eadca7386aeed5be91417c339a2 b/2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/output_28c310f42d337eadca7386aeed5be91417c339a2 new file mode 100644 index 0000000..71bf803 --- /dev/null +++ b/2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/output_28c310f42d337eadca7386aeed5be91417c339a2 @@ -0,0 +1,1866 @@ +Checking libcafekbd/cafekbd-desktop-config.c ... +libcafekbd/cafekbd-desktop-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +1/10 files checked 4% done +Checking libcafekbd/cafekbd-indicator-config.c ... +libcafekbd/cafekbd-indicator-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +2/10 files checked 10% done +Checking libcafekbd/cafekbd-indicator.c ... +libcafekbd/cafekbd-indicator.c:66:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdIndicator, cafekbd_indicator, CTK_TYPE_NOTEBOOK) +^ +3/10 files checked 24% done +Checking libcafekbd/cafekbd-keyboard-config.c ... +libcafekbd/cafekbd-keyboard-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-config.c:67:8: style: Condition '*l1' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:67:15: style: Condition '*l2' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:227:16: style: Condition 'option!=NULL' is always true [knownConditionTrueFalse] + (option != NULL) ? strchr (option, ':') : NULL; + ^ +libcafekbd/cafekbd-keyboard-config.c:282:18: style: Condition 'variant==NULL' is always false [knownConditionTrueFalse] + (variant == + ^ +libcafekbd/cafekbd-keyboard-config.c:226:10: style: Variable 'delim' can be declared as pointer to const [constVariablePointer] + char *delim = + ^ +libcafekbd/cafekbd-keyboard-config.c:609:65: style: Parameter 'kbd_config' can be declared as pointer to const [constParameterPointer] +cafekbd_keyboard_config_options_is_set (CafekbdKeyboardConfig * kbd_config, + ^ +4/10 files checked 36% done +Checking libcafekbd/cafekbd-keyboard-drawing.c ... +libcafekbd/cafekbd-keyboard-drawing.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-drawing.c:61:60: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_coord (CafekbdKeyboardDrawingRenderContext * context, gint n) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:67:61: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_double (CafekbdKeyboardDrawingRenderContext * context, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:625:51: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +set_markup (CafekbdKeyboardDrawingRenderContext * context, gchar *txt) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1026:11: style: Variable 'runp' can be declared as pointer to const [constVariablePointer] + GSList *runp; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1036:25: style: Variable 'geometry' can be declared as pointer to const [constVariablePointer] + PangoGlyphGeometry *geometry; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1202:39: style: Parameter 'outline' can be declared as pointer to const [constParameterPointer] +calc_origin_offset_x (XkbOutlineRec * outline) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1397:15: style: Variable 'shape' can be declared as pointer to const [constVariablePointer] + XkbShapeRec *shape; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: style: Parameter 'drawing' can be declared as pointer to const. However it seems that 'button_press_event' is a callback function, if 'drawing' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2343:18: note: You might need to cast the function pointer here + G_CALLBACK (button_press_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: note: Parameter 'drawing' can be declared as pointer to const + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: style: Parameter 'event' can be declared as pointer to const. However it seems that 'focus_event' is a callback function, if 'event' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2347:18: note: You might need to cast the function pointer here + G_CALLBACK (focus_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: note: Parameter 'event' can be declared as pointer to const + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: style: Parameter 'a' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'a' is declared with const you might also need to cast function pointer(s). [constParameterCallback] +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: note: Parameter 'a' can be declared as pointer to const +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: style: Parameter 'b' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'b' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: note: Parameter 'b' can be declared as pointer to const + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1863:9: style: Variable 'pind' can be declared as pointer to const [constVariablePointer] + Atom *pind = drawing->xkb->names->indicators; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2124:60: style: Parameter 'iev' can be declared as pointer to const [constParameterPointer] +process_indicators_state_notify (XkbIndicatorNotifyEvent * iev, + ^ +Checking libcafekbd/cafekbd-keyboard-drawing.c: KBDRAW_DEBUG... +5/10 files checked 77% done +Checking libcafekbd/cafekbd-status.c ... +libcafekbd/cafekbd-status.c:82:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdStatus, cafekbd_status, CTK_TYPE_STATUS_ICON) +^ +6/10 files checked 91% done +Checking libcafekbd/cafekbd-util.c ... +7/10 files checked 93% done +Checking test/cafekbd-indicator-test.c ... +8/10 files checked 94% done +Checking test/cafekbd-keyboard-drawing-test.c ... +test/cafekbd-keyboard-drawing-test.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +Checking test/cafekbd-keyboard-drawing-test.c: HAVE_CONFIG_H... +9/10 files checked 99% done +Checking test/cafekbd-status-test.c ... +test/cafekbd-status-test.c:42:17: style: Variable 'icon' can be declared as pointer to const [constVariablePointer] + CtkStatusIcon *icon; + ^ +10/10 files checked 100% done +nofile:0:0: information: Active checkers: There was critical errors (use --checkers-report= to see details) [checkersReport] + +/usr/bin/cafe-autogen +checking for autoreconf >= 2.53... + testing autoreconf... found 2.72 +checking for pkg-config >= 0.14.0... + testing pkg-config... found 1.8.1 +checking for cafe-common >= 0.0.1... + testing cafe-doc-common... found 2.0.0 +Checking for required M4 macros... +Checking for forbidden M4 macros... +Processing ./configure.ac +Running cafe-doc-common... +Running autoreconf... +autoreconf: export WARNINGS=no-portability +autoreconf: Entering directory '.' +autoreconf: running: autopoint --force +Copying file ABOUT-NLS +Copying file config.rpath +Copying file m4/codeset.m4 +Copying file m4/extern-inline.m4 +Copying file m4/fcntl-o.m4 +Copying file m4/gettext.m4 +Copying file m4/glibc2.m4 +Copying file m4/glibc21.m4 +Copying file m4/iconv.m4 +Copying file m4/intdiv0.m4 +Copying file m4/intl.m4 +Copying file m4/intldir.m4 +Copying file m4/intlmacosx.m4 +Copying file m4/intmax.m4 +Copying file m4/inttypes-pri.m4 +Copying file m4/inttypes_h.m4 +Copying file m4/lcmessage.m4 +Copying file m4/lib-ld.m4 +Copying file m4/lib-link.m4 +Copying file m4/lib-prefix.m4 +Copying file m4/lock.m4 +Copying file m4/longlong.m4 +Copying file m4/nls.m4 +Copying file m4/po.m4 +Copying file m4/printf-posix.m4 +Copying file m4/progtest.m4 +Copying file m4/size_max.m4 +Copying file m4/stdint_h.m4 +Copying file m4/threadlib.m4 +Copying file m4/uintmax_t.m4 +Copying file m4/visibility.m4 +Copying file m4/wchar_t.m4 +Copying file m4/wint_t.m4 +Copying file m4/xsize.m4 +Copying file po/Makefile.in.in +Copying file po/Makevars.template +Copying file po/Rules-quot +Copying file po/boldquot.sed +Copying file po/en@boldquot.header +Copying file po/en@quot.header +Copying file po/insert-header.sin +Copying file po/quot.sed +Copying file po/remove-potcdate.sin +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: configure.ac: tracing +autoreconf: running: libtoolize --copy --force +libtoolize: putting auxiliary files in '.'. +libtoolize: copying file './ltmain.sh' +libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. +libtoolize: copying file 'm4/libtool.m4' +libtoolize: copying file 'm4/ltoptions.m4' +libtoolize: copying file 'm4/ltsugar.m4' +libtoolize: copying file 'm4/ltversion.m4' +libtoolize: copying file 'm4/lt~obsolete.m4' +autoreconf: configure.ac: not using Intltool +autoreconf: configure.ac: not using Gtkdoc +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: running: /usr/bin/autoconf --force +autoreconf: running: /usr/bin/autoheader --force +autoreconf: running: automake --add-missing --copy --force-missing +configure.ac:31: installing './compile' +configure.ac:34: installing './config.guess' +configure.ac:34: installing './config.sub' +configure.ac:16: installing './install-sh' +configure.ac:16: installing './missing' +Makefile.am: installing './INSTALL' +libcafekbd/Makefile.am: installing './depcomp' +autoreconf: Leaving directory '.' +Skipping configure process. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +checking for a BSD-compatible install... /usr/bin/install -c +checking whether sleep supports fractional seconds... yes +checking filesystem timestamp resolution... 0.01 +checking whether build environment is sane... yes +checking for a race-free mkdir -p... /usr/bin/mkdir -p +checking for gawk... no +checking for mawk... mawk +checking whether make sets $(MAKE)... yes +checking whether make supports nested variables... yes +checking xargs -n works... yes +checking whether make supports the include directive... yes (GNU style) +checking for gcc... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the C compiler works... yes +checking for C compiler default output file name... a.out +checking for suffix of executables... +checking whether we are cross compiling... no +checking for suffix of object files... o +checking whether the compiler supports GNU C... yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... rm: cannot remove 'conftest.plist': Is a directory +yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... gcc3 +checking whether C compiler accepts -Werror=unknown-warning-option... no +checking whether C compiler accepts -Wall... yes +checking whether C compiler accepts -Wmissing-prototypes... yes +checking whether C compiler accepts -Wbad-function-cast... yes +checking whether C compiler accepts -Wcast-align... yes +checking whether C compiler accepts -Wextra... yes +checking whether C compiler accepts -Wformat-nonliteral... yes +checking whether C compiler accepts -Wmissing-declarations... yes +checking whether C compiler accepts -Wnested-externs... yes +checking whether C compiler accepts -Wpointer-arith... yes +checking whether C compiler accepts -Wredundant-decls... yes +checking whether C compiler accepts -Wshadow... yes +checking whether C compiler accepts -Wstrict-prototypes... yes +checking whether C compiler accepts -Wunused-macros... yes +checking whether C compiler accepts -Werror=format-security... yes +checking whether C compiler accepts -fstrict-aliasing... yes +checking flags to pass to the C compiler /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing +checking for gcc... (cached) /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the compiler supports GNU C... (cached) yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... (cached) yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... (cached) none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... (cached) yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... (cached) gcc3 +checking build system type... x86_64-pc-linux-gnu +checking host system type... x86_64-pc-linux-gnu +checking how to print strings... printf +checking for a sed that does not truncate output... /usr/bin/sed +checking for grep that handles long lines and -e... /usr/bin/grep +checking for egrep... /usr/bin/grep -E +checking for fgrep... /usr/bin/grep -F +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld +checking if the linker (/usr/bin/ld) is GNU ld... yes +checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B +checking the name lister (/usr/bin/nm -B) interface... rm: cannot remove 'conftest.plist': Is a directory +BSD nm +checking whether ln -s works... yes +checking the maximum length of command line arguments... 3145728 +checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop +checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop +checking for /usr/bin/ld option to reload object files... -r +checking for file... file +checking for objdump... objdump +checking how to recognize dependent libraries... pass_all +checking for dlltool... no +checking how to associate runtime and link libraries... printf %s\n +checking for ranlib... ranlib +checking for ar... ar +checking for archiver @FILE support... rm: cannot remove 'conftest.plist': Is a directory +@ +checking for strip... strip +checking command to parse /usr/bin/nm -B output from /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer object... rm: cannot remove 'conftest.plist': Is a directory +ok +checking for sysroot... no +checking for a working dd... /usr/bin/dd +checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1 +checking for mt... no +checking if : is a manifest tool... no +checking for stdio.h... yes +checking for stdlib.h... yes +checking for string.h... yes +checking for inttypes.h... yes +checking for stdint.h... yes +checking for strings.h... yes +checking for sys/stat.h... yes +checking for sys/types.h... yes +checking for unistd.h... yes +checking for dlfcn.h... yes +checking for objdir... .libs +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -fno-rtti -fno-exceptions... no +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to produce PIC... -fPIC -DPIC +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer PIC flag -fPIC -DPIC works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer static flag -static works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... (cached) yes +checking whether the /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes +checking whether -lc should be explicitly linked in... no +checking dynamic linker characteristics... GNU/Linux ld.so +checking how to hardcode library paths into programs... immediate +checking whether stripping libraries is possible... yes +checking if libtool supports shared libraries... yes +checking whether to build shared libraries... yes +checking whether to build static libraries... yes +checking whether NLS is requested... yes +checking for msgfmt... /usr/bin/msgfmt +checking for gmsgfmt... /usr/bin/msgfmt +checking for xgettext... /usr/bin/xgettext +checking for msgmerge... /usr/bin/msgmerge +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld -m elf_x86_64 +checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes +checking for shared library run path origin... done +checking how to run the C preprocessor... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer -E +checking for egrep -e... (cached) /usr/bin/grep -E +checking for CFPreferencesCopyAppValue... no +checking for CFLocaleCopyCurrent... no +checking for GNU gettext in libc... yes +checking whether to use NLS... yes +checking where the gettext function comes from... libc +checking for glib-compile-resources... /usr/bin/glib-compile-resources +checking for xmllint... /usr/bin/xmllint +checking for setlocale... yes +checking for pkg-config... /usr/bin/pkg-config +checking pkg-config is at least version 0.9.0... yes +checking for glib-2.0 >= 2.50.0... yes +checking for gmodule-2.0... yes +checking for gio-2.0 >= 2.25.0... yes +checking for cdk-3.0 >= 3.22.0... yes +checking for ctk+-3.0 >= 3.22.0 cdk-x11-3.0 >= 3.22.0... yes +checking for libxklavier >= 5.2... yes +checking for X... libraries , headers +checking for gethostbyname... yes +checking for connect... yes +checking for remove... yes +checking for shmat... yes +checking for IceConnectionNumber in -lICE... yes +checking for pkg-config... (cached) /usr/bin/pkg-config +checking pkg-config is at least version 0.16... yes +checking for library containing sqrt... -lm +checking for gobject-introspection... yes +checking that generated files are newer than configure... done +configure: creating ./config.status +config.status: creating Makefile +config.status: creating libcafekbd.pc +config.status: creating libcafekbdui.pc +config.status: creating po/Makefile.in +config.status: creating libcafekbd/Makefile +config.status: creating libcafekbd/org.cafe.peripherals-keyboard-xkb.gschema.xml +config.status: creating test/Makefile +config.status: creating config.h +config.status: executing depfiles commands +config.status: executing libtool commands +config.status: executing po-directories commands +config.status: creating po/POTFILES +config.status: creating po/Makefile + +Configuration: + + prefix: /usr + exec_prefix: ${prefix} + libdir: ${exec_prefix}/lib + bindir: ${exec_prefix}/bin + sbindir: ${exec_prefix}/sbin + sysconfdir: ${prefix}/etc + datadir: ${datarootdir} + source code location: . + compiler: /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer + cflags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + Warning flags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + +scan-build: Analysis run complete. +scan-build: Removing directory '/tmp/scan-build-2025-02-06-164243-11857-1' because it contains no reports. +scan-build: No bugs found. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +make all-recursive +make[1]: Entering directory '/rootdir' +Making all in po +make[2]: Entering directory '/rootdir/po' +make libcafekbd.pot-update +make[3]: Entering directory '/rootdir/po' +sed -e '/^#/d' remove-potcdate.sin > t-remove-potcdate.sed +mv t-remove-potcdate.sed remove-potcdate.sed +package_gnu=""; \ +test -n "$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L .. -maxdepth 1 -type f \ + -size -10000000c -exec grep 'GNU libcafekbd' \ + /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU libcafekbd' ../* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ +}; \ +if test "$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ +else \ + package_prefix=''; \ +fi; \ +if test -n '' || test 'https://github.com/cafe-desktop/libcafekbd' = '@'PACKAGE_BUGREPORT'@'; then \ + msgid_bugs_address=''; \ +else \ + msgid_bugs_address='https://github.com/cafe-desktop/libcafekbd'; \ +fi; \ +case `/usr/bin/xgettext --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ + *) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --package-name="${package_prefix}libcafekbd" \ + --package-version='2.0.0' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ +esac +test ! -f libcafekbd.po || { \ + if test -f ./libcafekbd.pot-header; then \ + sed -e '1,/^#$/d' < libcafekbd.po > libcafekbd.1po && \ + cat ./libcafekbd.pot-header libcafekbd.1po > libcafekbd.po; \ + rm -f libcafekbd.1po; \ + fi; \ + if test -f ./libcafekbd.pot; then \ + sed -f remove-potcdate.sed < ./libcafekbd.pot > libcafekbd.1po && \ + sed -f remove-potcdate.sed < libcafekbd.po > libcafekbd.2po && \ + if cmp libcafekbd.1po libcafekbd.2po >/dev/null 2>&1; then \ + rm -f libcafekbd.1po libcafekbd.2po libcafekbd.po; \ + else \ + rm -f libcafekbd.1po libcafekbd.2po ./libcafekbd.pot && \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ + else \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ +} +make[3]: Leaving directory '/rootdir/po' +test ! -f ./libcafekbd.pot || \ + test -z "af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo" || make af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo +make[3]: Entering directory '/rootdir/po' +/usr/bin/msgmerge --update --quiet --lang=af af.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=am am.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=an an.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ar ar.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=as as.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ast ast.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=az az.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=be be.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn bn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bg bg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=br br.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn_IN bn_IN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bs bs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca@valencia ca@valencia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca ca.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=crh crh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cmn cmn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cs cs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=csb csb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cv cv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cy cy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=da da.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de de.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=dz dz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de_CH de_CH.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=el el.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_AU en_AU.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_CA en_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_GB en_GB.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eo eo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es es.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_419 es_419.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_AR es_AR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CL es_CL.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CO es_CO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CR es_CR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_DO es_DO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_EC es_EC.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_ES es_ES.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_MX es_MX.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_NI es_NI.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PE es_PE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PR es_PR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PA es_PA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_SV es_SV.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_US es_US.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_UY es_UY.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=et et.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_VE es_VE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eu eu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fa fa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fi fi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fil fil.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fo fo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr fr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr_CA fr_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=frp frp.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fur fur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fy fy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ga ga.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gd gd.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gl gl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gu gu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ha ha.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=he he.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hi hi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hu hu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hr hr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hy hy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=id id.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ia ia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ig ig.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ie ie.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=is is.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=it it.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=jv jv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ja ja.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ka ka.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kab kab.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=km km.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kk kk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kn kn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ko ko.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ks ks.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku ku.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku_IQ ku_IQ.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ky ky.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=la la.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lb lb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lo lo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=li li.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lt lt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lv lv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mai mai.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mg mg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mi mi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mk mk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ml ml.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mn mn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mr mr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ms ms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=my my.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nah nah.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nb nb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nds nds.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nl nl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ne ne.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nn nn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nqo nqo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nso nso.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=oc oc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=or or.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=om om.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pa pa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pl pl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pms pms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ps ps.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt pt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt_BR pt_BR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ro ro.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ru ru.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=rw rw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sco sco.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sc sc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=si si.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sk sk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sl sl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sq sq.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=so so.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr sr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr@latin sr@latin.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sv sv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ta ta.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sw sw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=te te.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tg tg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=th th.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tk tk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tl tl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tr tr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ts ts.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tt tt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ug ug.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uk uk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur ur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur_PK ur_PK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uz uz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=vi vi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=xh xh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=wa wa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yi yi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yo yo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_CN zh_CN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_HK zh_HK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_TW zh_TW.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zu zu.po libcafekbd.pot +rm -f af.gmo && /usr/bin/msgfmt -c --statistics --verbose -o af.gmo af.po +af.po: 7 translated messages, 84 untranslated messages. +rm -f am.gmo && /usr/bin/msgfmt -c --statistics --verbose -o am.gmo am.po +rm -f an.gmo && /usr/bin/msgfmt -c --statistics --verbose -o an.gmo an.po +am.po: 54 translated messages, 37 untranslated messages. +rm -f ar.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ar.gmo ar.po +rm -f as.gmo && /usr/bin/msgfmt -c --statistics --verbose -o as.gmo as.po +an.po:7: warning: header field 'Last-Translator' still has the initial default value +an.po: 0 translated messages, 91 untranslated messages. +ar.po: 50 translated messages, 41 untranslated messages. +rm -f ast.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ast.gmo ast.po +as.po: 41 translated messages, 50 untranslated messages. +rm -f az.gmo && /usr/bin/msgfmt -c --statistics --verbose -o az.gmo az.po +rm -f be.gmo && /usr/bin/msgfmt -c --statistics --verbose -o be.gmo be.po +rm -f bg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bg.gmo bg.po +rm -f bn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn.gmo bn.po +be.po: 46 translated messages, 45 untranslated messages. +az.po: 9 translated messages, 82 untranslated messages. +bg.po: 54 translated messages, 37 untranslated messages. +bn.po: 43 translated messages, 48 untranslated messages. +ast.po: 47 translated messages, 44 untranslated messages. +rm -f bn_IN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn_IN.gmo bn_IN.po +rm -f bs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bs.gmo bs.po +rm -f br.gmo && /usr/bin/msgfmt -c --statistics --verbose -o br.gmo br.po +rm -f ca.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca.gmo ca.po +rm -f ca@valencia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca@valencia.gmo ca@valencia.po +bn_IN.po: 41 translated messages, 50 untranslated messages. +bs.po: 25 translated messages, 66 untranslated messages. +br.po: 20 translated messages, 71 untranslated messages. +ca.po: 87 translated messages, 4 untranslated messages. +ca@valencia.po: 54 translated messages, 37 untranslated messages. +rm -f cmn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cmn.gmo cmn.po +rm -f crh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o crh.gmo crh.po +rm -f cs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cs.gmo cs.po +rm -f csb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o csb.gmo csb.po +rm -f cv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cv.gmo cv.po +crh.po: 11 translated messages, 80 untranslated messages. +cmn.po: 46 translated messages, 45 untranslated messages. +csb.po:7: warning: header field 'Last-Translator' still has the initial default value +csb.po: 0 translated messages, 91 untranslated messages. +rm -f cy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cy.gmo cy.po +cs.po: 81 translated messages, 10 untranslated messages. +rm -f da.gmo && /usr/bin/msgfmt -c --statistics --verbose -o da.gmo da.po +cv.po: 0 translated messages, 91 untranslated messages. +rm -f de.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de.gmo de.po +rm -f de_CH.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de_CH.gmo de_CH.po +cy.po: 26 translated messages, 65 untranslated messages. +rm -f dz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o dz.gmo dz.po +da.po: 91 translated messages. +de.po: 76 translated messages, 15 untranslated messages. +de_CH.po: 0 translated messages, 91 untranslated messages. +rm -f el.gmo && /usr/bin/msgfmt -c --statistics --verbose -o el.gmo el.po +rm -f en_AU.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_AU.gmo en_AU.po +rm -f en_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_CA.gmo en_CA.po +dz.po: 39 translated messages, 52 untranslated messages. +el.po: 54 translated messages, 37 untranslated messages. +rm -f en_GB.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_GB.gmo en_GB.po +en_AU.po: 54 translated messages, 37 untranslated messages. +en_CA.po: 10 translated messages, 81 untranslated messages. +rm -f eo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eo.gmo eo.po +rm -f es.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es.gmo es.po +en_GB.po: 54 translated messages, 37 untranslated messages. +rm -f es_419.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_419.gmo es_419.po +es.po: 89 translated messages, 2 untranslated messages. +eo.po: 52 translated messages, 39 untranslated messages. +rm -f es_AR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_AR.gmo es_AR.po +rm -f es_CL.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CL.gmo es_CL.po +es_419.po: 0 translated messages, 91 untranslated messages. +rm -f es_CO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CO.gmo es_CO.po +rm -f es_CR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CR.gmo es_CR.po +es_CL.po: 3 translated messages, 88 untranslated messages. +es_AR.po: 21 translated messages, 70 untranslated messages. +rm -f es_DO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_DO.gmo es_DO.po +es_CR.po: 1 translated message, 90 untranslated messages. +es_CO.po: 49 translated messages, 42 untranslated messages. +rm -f es_EC.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_EC.gmo es_EC.po +rm -f es_ES.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_ES.gmo es_ES.po +rm -f es_MX.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_MX.gmo es_MX.po +es_DO.po: 1 translated message, 90 untranslated messages. +es_EC.po: 1 translated message, 90 untranslated messages. +rm -f es_NI.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_NI.gmo es_NI.po +es_ES.po: 1 translated message, 90 untranslated messages. +es_MX.po: 1 translated message, 90 untranslated messages. +rm -f es_PA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PA.gmo es_PA.po +rm -f es_PE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PE.gmo es_PE.po +es_NI.po: 1 translated message, 90 untranslated messages. +rm -f es_PR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PR.gmo es_PR.po +rm -f es_SV.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_SV.gmo es_SV.po +es_PA.po: 1 translated message, 90 untranslated messages. +es_PE.po: rm -f es_US.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_US.gmo es_US.po +1 translated message, 90 untranslated messages. +es_PR.po: 1 translated message, 90 untranslated messages. +es_SV.po: 1 translated message, 90 untranslated messages. +rm -f es_UY.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_UY.gmo es_UY.po +rm -f es_VE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_VE.gmo es_VE.po +es_US.po: 0 translated messages, 91 untranslated messages. +rm -f et.gmo && /usr/bin/msgfmt -c --statistics --verbose -o et.gmo et.po +rm -f eu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eu.gmo eu.po +es_UY.po: 1 translated message, 90 untranslated messages. +es_VE.po: 1 translated message, 90 untranslated messages. +rm -f fa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fa.gmo fa.po +et.po: 54 translated messages, 37 untranslated messages. +eu.po: rm -f fi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fi.gmo fi.po +54 translated messages, 37 untranslated messages. +fa.po: 11 translated messages, 80 untranslated messages. +rm -f fil.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fil.gmo fil.po +rm -f fo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fo.gmo fo.po +rm -f fr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr.gmo fr.po +fi.po: 48 translated messages, 43 untranslated messages. +rm -f fr_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr_CA.gmo fr_CA.po +fil.po: 0 translated messages, 91 untranslated messages. +fo.po: 0 translated messages, 91 untranslated messages. +rm -f frp.gmo && /usr/bin/msgfmt -c --statistics --verbose -o frp.gmo frp.po +fr.po: 67 translated messages, 24 untranslated messages. +fr_CA.po: 3 translated messages, 88 untranslated messages. +rm -f fy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fy.gmo fy.po +rm -f fur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fur.gmo fur.po +frp.po: 7 translated messages, 84 untranslated messages. +rm -f ga.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ga.gmo ga.po +rm -f gd.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gd.gmo gd.po +fy.po: 4 translated messages, 87 untranslated messages. +rm -f gl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gl.gmo gl.po +fur.po: 4 translated messages, 87 untranslated messages. +ga.po: 41 translated messages, 50 untranslated messages. +gd.po: 0 translated messages, 91 untranslated messages. +rm -f gu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gu.gmo gu.po +gl.po: 89 translated messages, 2 untranslated messages. +rm -f ha.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ha.gmo ha.po +rm -f hi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hi.gmo hi.po +rm -f he.gmo && /usr/bin/msgfmt -c --statistics --verbose -o he.gmo he.po +gu.po: 43 translated messages, 48 untranslated messages. +rm -f hr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hr.gmo hr.po +ha.po: 5 translated messages, 86 untranslated messages. +hi.po: 45 translated messages, 46 untranslated messages. +rm -f hu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hu.gmo hu.po +hr.po: 54 translated messages, 37 untranslated messages. +he.po: 54 translated messages, 37 untranslated messages. +rm -f hy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hy.gmo hy.po +rm -f ia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ia.gmo ia.po +rm -f ie.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ie.gmo ie.po +rm -f id.gmo && /usr/bin/msgfmt -c --statistics --verbose -o id.gmo id.po +hu.po: 54 translated messages, 37 untranslated messages. +hy.po: 54 translated messages, 37 untranslated messages. +ia.po: 3 translated messages, 88 untranslated messages. +ie.po: 45 translated messages, 46 untranslated messages. +rm -f ig.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ig.gmo ig.po +rm -f is.gmo && /usr/bin/msgfmt -c --statistics --verbose -o is.gmo is.po +id.po: 91 translated messages. +rm -f it.gmo && /usr/bin/msgfmt -c --statistics --verbose -o it.gmo it.po +rm -f ja.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ja.gmo ja.po +ig.po: 5 translated messages, 86 untranslated messages. +is.po: 12 translated messages, 79 untranslated messages. +rm -f jv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o jv.gmo jv.po +rm -f ka.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ka.gmo ka.po +ja.po: it.po: 91 translated messages. +54 translated messages, 37 untranslated messages. +rm -f kab.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kab.gmo kab.po +jv.po: 2 translated messages, 89 untranslated messages. +rm -f km.gmo && /usr/bin/msgfmt -c --statistics --verbose -o km.gmo km.po +ka.po: 37 translated messagesrm -f kk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kk.gmo kk.po +, 54 untranslated messages. +kab.po: 4 translated messages, 87 untranslated messages. +rm -f kn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kn.gmo kn.po +km.po:7: warning: header field 'Last-Translator' still has the initial default value +km.po: 0 translated messages, 91 untranslated messages. +kk.po: 24 translated messages, 67 untranslated messages. +rm -f ko.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ko.gmo ko.po +rm -f ks.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ks.gmo ks.po +kn.po: 43 translated messages, 48 untranslated messages. +rm -f ku.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku.gmo ku.po +rm -f ku_IQ.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku_IQ.gmo ku_IQ.po +ko.po: 54 translated messages, 37 untranslated messages. +rm -f ky.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ky.gmo ky.po +ks.po: 3 translated messages, 88 untranslated messages. +ku_IQ.po: 16 translated messages, 75 untranslated messages. +rm -f la.gmo && /usr/bin/msgfmt -c --statistics --verbose -o la.gmo la.po +ku.po: 10 translated messages, 81 untranslated messages. +ky.po: 26 translated messages, 65 untranslated messages. +la.po: 2 translated messages, 89 untranslated messages. +rm -f lb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lb.gmo lb.po +rm -f li.gmo && /usr/bin/msgfmt -c --statistics --verbose -o li.gmo li.po +rm -f lo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lo.gmo lo.po +rm -f lv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lv.gmo lv.po +rm -f lt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lt.gmo lt.po +lb.po:7: warning: header field 'Last-Translator' still has the initial default value +lb.po: 0 translated messages, 91 untranslated messages. +li.po:7: warning: header field 'Last-Translator' still has the initial default value +li.po: 0 translated messages, 91 untranslated messages. +lo.po:7: warning: header field 'Last-Translator' still has the initial default value +lo.po: 0 translated messages, 91 untranslated messages. +lt.po: 91 translated messages. +rm -f mai.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mai.gmo mai.po +lv.po: 49 translated messages, 42 untranslated messages. +rm -f mg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mg.gmo mg.po +rm -f mi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mi.gmo mi.po +rm -f mk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mk.gmo mk.po +mai.po: 18 translated messages, 73 untranslated messages. +rm -f ml.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ml.gmo ml.po +mg.po: 10 translated messages, 81 untranslated messages. +mi.po:7: warning: header field 'Last-Translator' still has the initial default value +mi.po: 0 translated messages, 91 untranslated messages. +mk.po: 39 translated messages, 52 untranslated messages. +rm -f mn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mn.gmo mn.po +rm -f mr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mr.gmo mr.po +ml.po: 41 translated messages, 50 untranslated messages. +rm -f ms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ms.gmo ms.po +rm -f my.gmo && /usr/bin/msgfmt -c --statistics --verbose -o my.gmo my.po +mn.po: 10 translated messages, 81 untranslated messages. +mr.po: 47 translated messages, 44 untranslated messages. +rm -f nah.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nah.gmo nah.po +ms.po: 91 translated messages. +my.po:7: warning: header field 'Last-Translator' still has the initial default value +my.po: 0 translated messages, 91 untranslated messages. +rm -f nds.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nds.gmo nds.po +rm -f nb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nb.gmo nb.po +rm -f ne.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ne.gmo ne.po +nah.po: 0 translated messages, 91 untranslated messages. +rm -f nl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nl.gmo nl.po +nds.po: 12 translated messages, 79 untranslated messages. +nb.po: 91 translated messages. +ne.po: 13 translated messages, 78 untranslated messages. +rm -f nn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nn.gmo nn.po +nl.po: rm -f nso.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nso.gmo nso.po +91 translated messages. +rm -f nqo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nqo.gmo nqo.po +rm -f oc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o oc.gmo oc.po +nn.po: 40 translated messages, 51 untranslated messages. +rm -f om.gmo && /usr/bin/msgfmt -c --statistics --verbose -o om.gmo om.po +nso.po: 3 translated messages, 88 untranslated messages. +nqo.po: 0 translated messages, 91 untranslated messages. +oc.po: 68 translated messages, 23 untranslated messages. +rm -f or.gmo && /usr/bin/msgfmt -c --statistics --verbose -o or.gmo or.po +rm -f pl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pl.gmo pl.po +rm -f pms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pms.gmo pms.po +rm -f pa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pa.gmo pa.po +om.po: 0 translated messages, 91 untranslated messages. +or.po: 41 translated messages, 50 untranslated messages. +pms.po: 3 translated messages, 88 untranslated messages. +pl.po: 55 translated messages, 36 untranslated messages. +rm -f ps.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ps.gmo ps.po +pa.po: 46 translated messages, 45 untranslated messages. +rm -f pt_BR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt_BR.gmo pt_BR.po +rm -f pt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt.gmo pt.po +rm -f ro.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ro.gmo ro.po +ps.po: 6 translated messages, 85 untranslated messages. +rm -f ru.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ru.gmo ru.po +pt_BR.po: 58 translated messages, 33 untranslated messages. +ro.po: 54 translated messages, 37 untranslated messages. +pt.po: 84 translated messages, 7 untranslated messages. +rm -f rw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o rw.gmo rw.po +ru.po: 89 translated messages, 2 untranslated messages. +rm -f sc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sc.gmo sc.po +rm -f si.gmo && /usr/bin/msgfmt -c --statistics --verbose -o si.gmo si.po +rm -f sco.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sco.gmo sco.po +rw.po: 10 translated messages, 81 untranslated messages. +sc.po: 2 translated messages, 89 untranslated messages. +rm -f sk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sk.gmo sk.po +rm -f sl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sl.gmo sl.po +sco.po: 0 translated messages, 91 untranslated messages. +si.po: 36 translated messages, 55 untranslated messages. +rm -f so.gmo && /usr/bin/msgfmt -c --statistics --verbose -o so.gmo so.po +sk.po: 54 translated messages, 37 untranslated messages. +sl.po: 55 translated messages, 36 untranslated messages. +rm -f sr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr.gmo sr.po +rm -f sq.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sq.gmo sq.po +so.po: 0 translated messages, 91 untranslated messages. +rm -f sr@latin.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr@latin.gmo sr@latin.po +sr.po: 91 translated messages. +rm -f sv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sv.gmo sv.po +sq.po: 52 translated messages, 39 untranslated messages. +rm -f sw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sw.gmo sw.po +rm -f ta.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ta.gmo ta.po +sv.po: 80 translated messages, 11 untranslated messages. +sr@latin.po: 46 translated messages, 45 untranslated messages. +sw.po: 0 translated messages, 91 untranslated messages. +rm -f te.gmo && /usr/bin/msgfmt -c --statistics --verbose -o te.gmo te.po +rm -f tg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tg.gmo tg.po +ta.po: 46 translated messages, 45 untranslated messages. +rm -f th.gmo && /usr/bin/msgfmt -c --statistics --verbose -o th.gmo th.po +rm -f tk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tk.gmo tk.po +tg.po: 0 translated messages, 91 untranslated messages. +te.po: 41 translated messages, 50 untranslated messages. +rm -f tl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tl.gmo tl.po +th.po: 45 translated messages, 46 untranslated messages. +tk.po: 7 translated messages, 84 untranslated messages. +rm -f tr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tr.gmo tr.po +rm -f ts.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ts.gmo ts.po +tl.po: 0 translated messages, 91 untranslated messages. +rm -f tt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tt.gmo tt.po +tr.po: 58 translated messages, 33 untranslated messages. +rm -f ug.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ug.gmo ug.po +ts.po: rm -f uk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uk.gmo uk.po +0 translated messages, 91 untranslated messages. +tt.po:7: warning: header field 'Last-Translator' still has the initial default value +tt.po: 0 translated messages, 91 untranslated messages. +rm -f ur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur.gmo ur.po +ug.po: 6 translated messages, 85 untranslated messages. +rm -f ur_PK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur_PK.gmo ur_PK.po +rm -f uz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uz.gmo uz.po +ur.po: 7 translated messages, 84 untranslated messages. +uk.po: 58 translated messages, 33 untranslated messages. +rm -f vi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o vi.gmo vi.po +uz.po: 26 translated messages, 65 untranslated messages. +ur_PK.po:7: warning: header field 'Last-Translator' still has the initial default value +ur_PK.po: 0 translated messages, 91 untranslated messages. +rm -f xh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o xh.gmo xh.po +rm -f wa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o wa.gmo wa.po +vi.po: 52 translated messages, 39 untranslated messages. +rm -f yi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yi.gmo yi.po +rm -f yo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yo.gmo yo.po +xh.po: 8 translated messages, 83 untranslated messages. +wa.po: 9 translated messages, 82 untranslated messages. +rm -f zh_CN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_CN.gmo zh_CN.po +yi.po:7: warning: header field 'Last-Translator' still has the initial default value +yi.po: 0 translated messages, 91 untranslated messages. +rm -f zh_HK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_HK.gmo zh_HK.po +yo.po: 5 translated messages, 86 untranslated messages. +rm -f zh_TW.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_TW.gmo zh_TW.po +zh_CN.po: 63 translated messages, 28 untranslated messages. +rm -f zu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zu.gmo zu.po +zh_HK.po: 47 translated messages, 44 untranslated messages. +zh_TW.po: 91 translated messages. +zu.po: 3 translated messages, 88 untranslated messages. +make[3]: Leaving directory '/rootdir/po' +touch stamp-po +make[2]: Leaving directory '/rootdir/po' +Making all in libcafekbd +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml + GEN cafekbd-indicator-marshal.h + GEN cafekbd-keyboard-drawing-marshal.h +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... +INFO: Reading ./cafekbd-indicator-marshal.list... + GEN cafekbd-indicator-marshal.c + GEN cafekbd-keyboard-drawing-marshal.c +INFO: Reading ./cafekbd-indicator-marshal.list... +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... +make all-am +make[3]: Entering directory '/rootdir/libcafekbd' + CC libcafekbd_la-cafekbd-desktop-config.lo + CC libcafekbd_la-cafekbd-keyboard-config.lo + CC libcafekbd_la-cafekbd-util.lo + CC libcafekbdui_la-cafekbd-indicator-config.lo + CC libcafekbdui_la-cafekbd-indicator.lo +cafekbd-desktop-config.c: In function 'cafekbd_desktop_config_load_from_gsettings': +cafekbd-desktop-config.c:176:38: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 176 | || config->default_group >= + | ^~ +cafekbd-indicator-config.c: In function 'cafekbd_indicator_config_get_images_file': +cafekbd-indicator-config.c:152:59: warning: comparison of integer expressions of different signedness: 'guint' {aka 'unsigned int'} and 'int' [-Wsign-compare] + 152 | (g_strv_length (kbd_config->layouts_variants) > group)) { + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_extract_layout_name': +cafekbd-indicator.c:293:19: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 293 | if (group < g_strv_length (short_group_names)) { + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_prepare_drawing': +cafekbd-indicator.c:418:31: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 418 | if (group + 1 == + | ^~ +cafekbd-indicator.c: In function 'cafekbd_indicator_update_tooltips': +cafekbd-indicator.c:446:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 446 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-indicator.c:450:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 450 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-indicator.c: In function 'cafekbd_indicator_kbd_cfg_callback': +cafekbd-indicator.c:61:44: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 61 | CafekbdIndicator * gki = (CafekbdIndicator*)cur->data; + | ^~~ +cafekbd-indicator.c:561:9: note: in expansion of macro 'ForAllIndicators' + 561 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-indicator.c:539:55: note: shadowed declaration is here + 539 | cafekbd_indicator_kbd_cfg_callback (CafekbdIndicator *gki G_GNUC_UNUSED) +cafekbd-indicator.c: In function 'cafekbd_indicator_start_listen': +cafekbd-indicator.c:647:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 647 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:650:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 650 | (CdkFilterFunc) + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_stop_listen': +cafekbd-indicator.c:663:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 663 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:667:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 667 | (CdkFilterFunc) cafekbd_indicator_filter_x_evt, NULL); + | ^ + CC libcafekbdui_la-cafekbd-status.lo +cafekbd-status.c: In function 'cafekbd_status_render_cairo': +cafekbd-status.c:214:23: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 214 | if (group + 1 == xkl_engine_get_num_groups (globals.engine)) { + | ^~ +cafekbd-status.c: In function 'cafekbd_status_prepare_drawing': +cafekbd-status.c:376:51: warning: cast between incompatible function types from 'void (*)(void *)' to 'void (*)(guchar *, void *)' {aka 'void (*)(unsigned char *, void *)'} [-Wcast-function-type] + 376 | (GdkPixbufDestroyNotify) + | ^ +cafekbd-status.c: In function 'cafekbd_status_update_tooltips': +cafekbd-status.c:395:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 395 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-status.c:399:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 399 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-status.c: In function 'cafekbd_status_kbd_cfg_callback': +cafekbd-status.c:77:41: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 77 | CafekbdStatus * gki = (CafekbdStatus*)cur->data; + | ^~~ +cafekbd-status.c:508:9: note: in expansion of macro 'ForAllIndicators' + 508 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-status.c:484:49: note: shadowed declaration is here + 484 | cafekbd_status_kbd_cfg_callback (CafekbdStatus *gki G_GNUC_UNUSED) +cafekbd-status.c: In function 'cafekbd_status_start_listen': +cafekbd-status.c:594:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 594 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:597:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 597 | (CdkFilterFunc) cafekbd_status_filter_x_evt, + | ^ +cafekbd-status.c: In function 'cafekbd_status_stop_listen': +cafekbd-status.c:610:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 610 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:614:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 614 | (CdkFilterFunc) cafekbd_status_filter_x_evt, NULL); + | ^ + CC libcafekbdui_la-cafekbd-indicator-marshal.lo +cafekbd-indicator-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ + CC libcafekbdui_la-cafekbd-keyboard-drawing-marshal.lo +cafekbd-keyboard-drawing-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + CC libcafekbdui_la-cafekbd-keyboard-drawing.lo +cafekbd-keyboard-drawing.c: In function 'draw_polygon': +cafekbd-keyboard-drawing.c:322:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 322 | for (i = 0; i < num_points; i++) { + | ^ +cafekbd-keyboard-drawing.c: In function 'process_indicators_state_notify': +cafekbd-keyboard-drawing.c:2131:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'long unsigned int' [-Wsign-compare] + 2131 | for (i = 0; i <= drawing->xkb->indicators->phys_indicators; i++) + | ^~ +cafekbd-keyboard-drawing.c: In function 'cafekbd_keyboard_drawing_get_type': +cafekbd-keyboard-drawing.c:2394:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawingClass *)' {aka 'void (*)(struct _CafekbdKeyboardDrawingClass *)'} to 'void (*)(void *, void *)' [-Wcast-function-type] + 2394 | (GClassInitFunc) cafekbd_keyboard_drawing_class_init, + | ^ +cafekbd-keyboard-drawing.c:2399:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawing *)' {aka 'void (*)(struct _CafekbdKeyboardDrawing *)'} to 'void (*)(GTypeInstance *, void *)' {aka 'void (*)(struct _GTypeInstance *, void *)'} [-Wcast-function-type] + 2399 | (GInstanceInitFunc) cafekbd_keyboard_drawing_init, + | ^ + GEN org.cafe.peripherals-keyboard-xkb.gschema.valid + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:114:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 114 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbd.la + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspectqekde35i/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectqekde35i/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectqekde35i/Cafekbd-1.0.c:239:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 239 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspectqekde35i/Cafekbd-1.0.c:246:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 246 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspectqekde35i/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +5 warnings generated. + GICOMP Cafekbd-1.0.gir +make[3]: Leaving directory '/rootdir/libcafekbd' +make[2]: Leaving directory '/rootdir/libcafekbd' +Making all in test +make[2]: Entering directory '/rootdir/test' + CC cafekbd_indicator_test-cafekbd-indicator-test.o + CC cafekbd_keyboard_drawing_test-cafekbd-keyboard-drawing-test.o + CC cafekbd_status_test-cafekbd-status-test.o +cafekbd-keyboard-drawing-test.c:187:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 187 | g_print ("kbdraw %s\n", VERSION); + | ^~~~~~~ +cafekbd-keyboard-drawing-test.c:194:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 194 | g_printerr ("--groups: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:199:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 199 | g_printerr ("--levels: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:225:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 225 | cafekbd_keyboard_drawing_set_track_modifiers + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:228:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 228 | cafekbd_keyboard_drawing_set_track_config + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:248:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 248 | names.keycodes = keycodes; + | ^~~~~~~~ +cafekbd-keyboard-drawing-test.c:256:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 256 | names.geometry = geometry; + | ^~~~~~~~ +7 warnings generated. + CCLD cafekbd-keyboard-drawing-test + CCLD cafekbd-status-test + CCLD cafekbd-indicator-test +make[2]: Leaving directory '/rootdir/test' +make[2]: Entering directory '/rootdir' +make[2]: Leaving directory '/rootdir' +make[1]: Leaving directory '/rootdir' +scan-build: Analysis run complete. +scan-build: 11 bugs found. +scan-build: Run 'scan-view /rootdir/html-report/2025-02-06-164253-14522-1' to examine bug reports. +Making check in po +make[1]: Entering directory '/rootdir/po' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/po' +Making check in libcafekbd +make[1]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +make check-am +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:113:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 113 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspectnxg3cfas/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectnxg3cfas/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectnxg3cfas/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +3 warnings generated. + GICOMP Cafekbd-1.0.gir +make[2]: Leaving directory '/rootdir/libcafekbd' +make[1]: Leaving directory '/rootdir/libcafekbd' +Making check in test +make[1]: Entering directory '/rootdir/test' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/test' +make[1]: Entering directory '/rootdir' +make[1]: Leaving directory '/rootdir' + Listing... 0% Listing... 0% Listing... 0% adduser/testing,now 3.137 all [installed,automatic] +advaita-icon-theme/unknown,now 3.25.0-1 all [installed,automatic] +apt/testing,now 2.9.26 amd64 [installed,automatic] +aptitude-common/testing,now 0.8.13-6.1 all [installed,automatic] +aptitude/testing,now 0.8.13-6.1 amd64 [installed] +at-spi2-common/testing,now 2.55.0.1-1 all [installed,automatic] +at-spi2-core/testing,now 2.55.0.1-1 amd64 [installed,automatic] +autoconf-archive/testing,now 20220903-3 all [installed] +autoconf/testing,now 2.72-3 all [installed,automatic] +automake/testing,now 1:1.17-3 all [installed,automatic] +autopoint/testing,now 0.23.1-1 all [installed] +autotools-dev/testing,now 20220109.1 all [installed,automatic] +base-files/testing,now 13.6 amd64 [installed,automatic] +base-passwd/testing,now 3.6.6 amd64 [installed,automatic] +bash/testing,now 5.2.37-1 amd64 [installed,automatic] +binfmt-support/testing,now 2.2.2-7 amd64 [installed,automatic] +binutils-common/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils-gold-x86-64-linux-gnu/testing,now 2.44-1 amd64 [installed,automatic] +binutils-gold/testing,now 2.44-1 amd64 [installed,automatic] +binutils-x86-64-linux-gnu/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +bsdutils/testing,now 1:2.40.4-2 amd64 [installed,automatic] +build-essential/testing,now 12.12 amd64 [installed,automatic] +bzip2-doc/testing,now 1.0.8-6 all [installed,automatic] +bzip2/testing,now 1.0.8-6 amd64 [installed,automatic] +ca-certificates/testing,now 20241223 all [installed,automatic] +clang-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools/testing,now 1:19.0-63 amd64 [installed] +clang/testing,now 1:19.0-63 amd64 [installed] +coreutils/testing,now 9.5-1+b1 amd64 [installed,automatic] +cpp-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-14/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cpp/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cppcheck/testing,now 2.16.0-1 amd64 [installed] +ctk-update-icon-cache/unknown,now 3.25.6-1 amd64 [installed,automatic] +dash/testing,now 0.5.12-12 amd64 [installed,automatic] +dbus-bin/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-daemon/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-session-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-system-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-user-session/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus/testing,now 1.16.0-1 amd64 [installed,automatic] +dconf-gsettings-backend/testing,now 0.40.0-5 amd64 [installed,automatic] +dconf-service/testing,now 0.40.0-5 amd64 [installed,automatic] +debconf/testing,now 1.5.89 all [installed,automatic] +debian-archive-keyring/testing,now 2023.4 all [installed,automatic] +debianutils/testing,now 5.21 amd64 [installed,automatic] +diffutils/testing,now 1:3.10-2 amd64 [installed,automatic] +dirmngr/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +dmsetup/testing,now 2:1.02.201-1 amd64 [installed,automatic] +dpkg-dev/testing,now 1.22.14 all [installed,automatic] +dpkg/testing,now 1.22.14 amd64 [installed,automatic] +e2fsprogs/testing,now 1.47.2-1 amd64 [installed,automatic] +expect/testing,now 5.45.4-3+b1 amd64 [installed] +fakeroot/testing,now 1.37-1 amd64 [installed,automatic] +file/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +findutils/testing,now 4.10.0-3 amd64 [installed,automatic] +fontconfig-config/testing,now 2.15.0-2 amd64 [installed,automatic] +fontconfig/testing,now 2.15.0-2 amd64 [installed,automatic] +fonts-dejavu-core/testing,now 2.37-8 all [installed,automatic] +fonts-dejavu-mono/testing,now 2.37-8 all [installed,automatic] +g++-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-14/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +g++/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc-14-base/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gettext-base/testing,now 0.23.1-1 amd64 [installed,automatic] +gettext/testing,now 0.23.1-1 amd64 [installed] +gir1.2-atk-1.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-atspi-2.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-ctk-3.0/unknown,now 3.25.6-1 amd64 [installed] +gir1.2-freedesktop-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-freedesktop/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-gdkpixbuf-2.0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +gir1.2-girepository-2.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-girepository-2.0/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-glib-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-glib-2.0/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-harfbuzz-0.0/testing,now 10.2.0-1 amd64 [installed,automatic] +gir1.2-pango-1.0/testing,now 1.56.1-1 amd64 [installed,automatic] +gir1.2-xkl-1.0/testing,now 5.4-5+b2 amd64 [installed,automatic] +girepository-tools/testing,now 2.82.4-2 amd64 [installed,automatic] +git-man/testing,now 1:2.47.2-0.1 all [installed,automatic] +git/testing,now 1:2.47.2-0.1 amd64 [installed] +gnupg-l10n/testing,now 2.2.46-1 all [installed,automatic] +gnupg-utils/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gnupg/testing,now 2.2.46-1 all [installed,automatic] +gobject-introspection-bin/testing,now 1.82.0-4 amd64 [installed,automatic] +gobject-introspection/testing,now 1.82.0-4 amd64 [installed] +gpg-agent/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg-wks-client/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgconf/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgsm/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgv/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +grep/testing,now 3.11-4 amd64 [installed,automatic] +gsettings-desktop-schemas/testing,now 47.1-1 all [installed,automatic] +gzip/testing,now 1.13-1 amd64 [installed,automatic] +hicolor-icon-theme/testing,now 0.18-2 all [installed,automatic] +hostname/testing,now 3.25 amd64 [installed,automatic] +icu-devtools/testing,now 72.1-6 amd64 [installed,automatic] +init-system-helpers/testing,now 1.68 all [installed,automatic] +krb5-locales/testing,now 1.21.3-4 all [installed,automatic] +less/testing,now 643-1 amd64 [installed,automatic] +lib32gcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +lib32stdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libacl1/testing,now 2.3.2-2+b1 amd64 [installed,automatic] +libalgorithm-diff-perl/testing,now 1.201-1 all [installed,automatic] +libalgorithm-diff-xs-perl/testing,now 0.04-8+b4 amd64 [installed,automatic] +libalgorithm-merge-perl/testing,now 0.08-5 all [installed,automatic] +libapparmor1/testing,now 3.1.7-1+b3 amd64 [installed,automatic] +libapt-pkg6.0t64/testing,now 2.9.26 amd64 [installed,automatic] +libasan8/testing,now 14.2.0-12 amd64 [installed,automatic] +libassuan9/testing,now 3.0.1-2 amd64 [installed,automatic] +libatk-bridge2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk-bridge2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatomic1/testing,now 14.2.0-12 amd64 [installed,automatic] +libatspi2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatspi2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libattr1/testing,now 1:2.5.2-2 amd64 [installed,automatic] +libaudit-common/testing,now 1:4.0.2-2 all [installed,automatic] +libaudit1/testing,now 1:4.0.2-2+b1 amd64 [installed,automatic] +libavahi-client3/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common-data/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common3/testing,now 0.8-16 amd64 [installed,automatic] +libbinutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libblkid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libblkid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libboost-iostreams1.83.0/testing,now 1.83.0-4 amd64 [installed,automatic] +libbrotli-dev/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbrotli1/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbsd0/testing,now 0.12.2-2 amd64 [installed,automatic] +libbz2-1.0/testing,now 1.0.8-6 amd64 [installed,automatic] +libbz2-dev/testing,now 1.0.8-6 amd64 [installed,automatic] +libc-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc-dev-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc6-dev/testing,now 2.40-6 amd64 [installed,automatic] +libc6-i386/testing,now 2.40-6 amd64 [installed,automatic] +libc6/testing,now 2.40-6 amd64 [installed,automatic] +libcairo-gobject2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo-script-interpreter2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2-dev/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcap-dev/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcap-ng0/testing,now 0.8.5-4 amd64 [installed,automatic] +libcap2/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcbor0.10/testing,now 0.10.2-2 amd64 [installed,automatic] +libcc1-0/testing,now 14.2.0-12 amd64 [installed,automatic] +libclang-common-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-cpp19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-rt-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang1-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libcolord2/testing,now 1.4.7-1+b2 amd64 [installed,automatic] +libcom-err2/testing,now 1.47.2-1 amd64 [installed,automatic] +libcrypt-dev/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcrypt1/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcryptsetup12/testing,now 2:2.7.5-1 amd64 [installed,automatic] +libctf-nobfd0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctf0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctk-3-0/unknown,now 3.25.6-1 amd64 [installed] +libctk-3-bin/unknown,now 3.25.6-1 amd64 [installed,automatic] +libctk-3-common/unknown,now 3.25.6-1 all [installed] +libctk-3-dev/unknown,now 3.25.6-1 amd64 [installed] +libcups2t64/testing,now 2.4.10-2+b1 amd64 [installed,automatic] +libcurl3t64-gnutls/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcurl4t64/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcwidget4/testing,now 0.5.18-6+b2 amd64 [installed,automatic] +libdatrie-dev/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdatrie1/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdav1d7/testing,now 1.5.1-1 amd64 [installed,automatic] +libdb5.3t64/testing,now 5.3.28+dfsg2-9 amd64 [installed,automatic] +libdbus-1-3/testing,now 1.16.0-1 amd64 [installed,automatic] +libdbus-1-dev/testing,now 1.16.0-1 amd64 [installed,automatic] +libdconf1/testing,now 0.40.0-5 amd64 [installed,automatic] +libdebconfclient0/testing,now 0.277 amd64 [installed,automatic] +libdeflate-dev/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdeflate0/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdevmapper1.02.1/testing,now 2:1.02.201-1 amd64 [installed,automatic] +libdpkg-perl/testing,now 1.22.14 all [installed,automatic] +libdrm-amdgpu1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-common/testing,now 2.4.123-1 all [installed,automatic] +libdrm-intel1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-radeon1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm2/testing,now 2.4.123-1 amd64 [installed,automatic] +libedit2/testing,now 3.1-20250104-1 amd64 [installed,automatic] +libegl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libegl-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1-mesa-dev/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libelf1t64/testing,now 0.192-4 amd64 [installed,automatic] +libepoxy-dev/testing,now 1.5.10-2 amd64 [installed,automatic] +libepoxy0/testing,now 1.5.10-2 amd64 [installed,automatic] +liberror-perl/testing,now 0.17029-2 all [installed,automatic] +libexpat1-dev/testing,now 2.6.4-1 amd64 [installed,automatic] +libexpat1/testing,now 2.6.4-1 amd64 [installed,automatic] +libext2fs2t64/testing,now 1.47.2-1 amd64 [installed,automatic] +libfakeroot/testing,now 1.37-1 amd64 [installed,automatic] +libffi-dev/testing,now 3.4.6-1 amd64 [installed,automatic] +libffi8/testing,now 3.4.6-1 amd64 [installed,automatic] +libfido2-1/testing,now 1.15.0-1+b1 amd64 [installed,automatic] +libfile-fcntllock-perl/testing,now 0.22-4+b4 amd64 [installed,automatic] +libfontconfig-dev/testing,now 2.15.0-2 amd64 [installed,automatic] +libfontconfig1/testing,now 2.15.0-2 amd64 [installed,automatic] +libfreetype-dev/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfreetype6/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfribidi-dev/testing,now 1.0.16-1 amd64 [installed,automatic] +libfribidi0/testing,now 1.0.16-1 amd64 [installed,automatic] +libgbm1/testing,now 24.2.8-1 amd64 [installed,automatic] +libgc1/testing,now 1:8.2.8-1 amd64 [installed,automatic] +libgcc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcrypt20/testing,now 1.11.0-7 amd64 [installed,automatic] +libgdbm-compat4t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdbm6t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-dev/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-bin/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-common/testing,now 2.42.12+dfsg-2 all [installed,automatic] +libgio-2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libgio-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository-1.0-1/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-1.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-2.0-0/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository1.0-dev/testing,now 1.82.0-4 amd64 [installed] +libgl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgl1-mesa-dri/testing,now 24.2.8-1 amd64 [installed,automatic] +libgl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglapi-mesa/testing,now 24.2.8-1 amd64 [installed,automatic] +libgles-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles2/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglib2.0-0t64/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-data/testing,now 2.82.4-2 all [installed,automatic] +libglib2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-dev/testing,now 2.82.4-2 amd64 [installed] +libglvnd-core-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libglx0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgmp10/testing,now 2:6.3.0+dfsg-3 amd64 [installed,automatic] +libgnutls30t64/testing,now 3.8.8-2 amd64 [installed,automatic] +libgomp1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgpg-error-l10n/testing,now 1.51-3 all [installed,automatic] +libgpg-error0/testing,now 1.51-3 amd64 [installed,automatic] +libgpm2/testing,now 1.20.7-11+b2 amd64 [installed,automatic] +libgprofng0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libgraphite2-3/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgraphite2-dev/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgssapi-krb5-2/testing,now 1.21.3-4 amd64 [installed,automatic] +libharfbuzz-cairo0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-dev/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-gobject0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-icu0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-subset0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz0b/testing,now 10.2.0-1 amd64 [installed,automatic] +libhogweed6t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libhwasan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libice-dev/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libice6/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libicu-dev/testing,now 72.1-6 amd64 [installed,automatic] +libicu72/testing,now 72.1-6 amd64 [installed,automatic] +libidn2-0/testing,now 2.3.7-2+b1 amd64 [installed,automatic] +libisl23/testing,now 0.27-1 amd64 [installed,automatic] +libitm1/testing,now 14.2.0-12 amd64 [installed,automatic] +libjansson4/testing,now 2.14-2+b3 amd64 [installed,automatic] +libjbig-dev/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjbig0/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjpeg-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjson-c5/testing,now 0.18+ds-1 amd64 [installed,automatic] +libk5crypto3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkeyutils1/testing,now 1.6.3-4 amd64 [installed,automatic] +libkmod2/testing,now 33+20240816-2 amd64 [installed,automatic] +libkrb5-3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkrb5support0/testing,now 1.21.3-4 amd64 [installed,automatic] +libksba8/testing,now 1.6.7-2+b1 amd64 [installed,automatic] +liblcms2-2/testing,now 2.16-2 amd64 [installed,automatic] +libldap-common/testing,now 2.6.9+dfsg-1 all [installed,automatic] +libldap2/testing,now 2.6.9+dfsg-1 amd64 [installed,automatic] +liblerc-dev/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +liblerc4/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +libllvm19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +liblocale-gettext-perl/testing,now 1.07-7+b1 amd64 [installed,automatic] +liblsan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libltdl-dev/testing,now 2.5.4-3 amd64 [installed,automatic] +libltdl7/testing,now 2.5.4-3 amd64 [installed,automatic] +liblz4-1/testing,now 1.10.0-3 amd64 [installed,automatic] +liblzma-dev/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzma5/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzo2-2/testing,now 2.10-3+b1 amd64 [installed,automatic] +libmagic-mgc/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmagic1t64/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmd0/testing,now 1.1.0-2+b1 amd64 [installed,automatic] +libmount-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libmount1/testing,now 2.40.4-2 amd64 [installed,automatic] +libmpc3/testing,now 1.3.1-1+b3 amd64 [installed,automatic] +libmpfr6/testing,now 4.2.1-1+b2 amd64 [installed,automatic] +libncurses-dev/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncurses6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncursesw6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libnettle8t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libnghttp2-14/testing,now 1.64.0-1 amd64 [installed,automatic] +libnghttp3-9/testing,now 1.6.0-2 amd64 [installed,automatic] +libngtcp2-16/testing,now 1.9.1-1 amd64 [installed,automatic] +libngtcp2-crypto-gnutls8/testing,now 1.9.1-1 amd64 [installed,automatic] +libnpth0t64/testing,now 1.8-2 amd64 [installed,automatic] +libnss-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libobjc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libobjc4/testing,now 14.2.0-12 amd64 [installed,automatic] +libopengl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libopengl0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libp11-kit0/testing,now 0.25.5-3 amd64 [installed,automatic] +libpam-modules-bin/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-modules/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-runtime/testing,now 1.7.0-2 all [installed,automatic] +libpam-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libpam0g/testing,now 1.7.0-2 amd64 [installed,automatic] +libpango-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpango1.0-dev/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangocairo-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoft2-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoxft-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpciaccess0/testing,now 0.17-3+b3 amd64 [installed,automatic] +libpcre2-16-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-32-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-8-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-dev/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-posix3/testing,now 10.44-5 amd64 [installed,automatic] +libperl5.40/testing,now 5.40.0-8 amd64 [installed,automatic] +libpfm4/testing,now 4.13.0+git83-g91970fe-1 amd64 [installed,automatic] +libpipeline1/testing,now 1.5.8-1 amd64 [installed,automatic] +libpixman-1-0/testing,now 0.44.0-3 amd64 [installed,automatic] +libpixman-1-dev/testing,now 0.44.0-3 amd64 [installed,automatic] +libpkgconf3/testing,now 1.8.1-4 amd64 [installed,automatic] +libpng-dev/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng-tools/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng16-16t64/testing,now 1.6.44-3 amd64 [installed,automatic] +libproc2-0/testing,now 2:4.0.4-7 amd64 [installed,automatic] +libpsl5t64/testing,now 0.21.2-1.1+b1 amd64 [installed,automatic] +libpython3-stdlib/testing,now 3.13.1-2 amd64 [installed,automatic] +libpython3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libpython3.13-stdlib/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libquadmath0/testing,now 14.2.0-12 amd64 [installed,automatic] +libreadline8t64/testing,now 8.2-6 amd64 [installed,automatic] +librsvg2-2/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librsvg2-common/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librtmp1/testing,now 2.4+20151223.gitfa8646d.1-2+b5 amd64 [installed,automatic] +libsasl2-2/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules-db/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libseccomp2/testing,now 2.5.5-2 amd64 [installed,automatic] +libselinux1-dev/testing,now 3.7-3.1 amd64 [installed,automatic] +libselinux1/testing,now 3.7-3.1 amd64 [installed,automatic] +libsemanage-common/testing,now 3.7-2.1 all [installed,automatic] +libsemanage2/testing,now 3.7-2.1 amd64 [installed,automatic] +libsensors-config/testing,now 1:3.6.0-10 all [installed,automatic] +libsensors5/testing,now 1:3.6.0-10+b1 amd64 [installed,automatic] +libsepol-dev/testing,now 3.7-1 amd64 [installed,automatic] +libsepol2/testing,now 3.7-1 amd64 [installed,automatic] +libsframe1/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libsharpyuv-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsharpyuv0/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsigc++-2.0-0v5/testing,now 2.12.1-3 amd64 [installed,automatic] +libsm-dev/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsm6/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsmartcols1/testing,now 2.40.4-2 amd64 [installed,automatic] +libsqlite3-0/testing,now 3.46.1-1 amd64 [installed,automatic] +libss2/testing,now 1.47.2-1 amd64 [installed,automatic] +libssh2-1t64/testing,now 1.11.1-1 amd64 [installed,automatic] +libssl3t64/testing,now 3.4.0-2 amd64 [installed,automatic] +libstdc++-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libstdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libsysprof-capture-4-dev/testing,now 47.2-1 amd64 [installed,automatic] +libsystemd-dev/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd-shared/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd0/testing,now 257.2-3 amd64 [installed,automatic] +libtasn1-6/testing,now 4.19.0-3+b3 amd64 [installed,automatic] +libtcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +libthai-data/testing,now 0.1.29-2 all [installed,automatic] +libthai-dev/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libthai0/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libtiff-dev/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiff6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiffxx6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtinfo6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libtinyxml2-10/testing,now 10.0.0+dfsg-2+b2 amd64 [installed,automatic] +libtool/testing,now 2.5.4-3 all [installed] +libtsan2/testing,now 14.2.0-12 amd64 [installed,automatic] +libubsan1/testing,now 14.2.0-12 amd64 [installed,automatic] +libudev1/testing,now 257.2-3 amd64 [installed,automatic] +libunistring5/testing,now 1.3-1 amd64 [installed,automatic] +libuuid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libvulkan1/testing,now 1.4.304.0-1 amd64 [installed,automatic] +libwayland-bin/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-client0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-cursor0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-dev/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-egl1/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-server0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwebp-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebp7/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdecoder3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdemux2/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpmux3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libx11-6/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-data/testing,now 2:1.8.10-2 all [installed,automatic] +libx11-dev/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-xcb1/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libxapian30/testing,now 1.4.25-2 amd64 [installed,automatic] +libxau-dev/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxau6/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxaw7/testing,now 2:1.0.16-1 amd64 [installed,automatic] +libxcb-dri2-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-dri3-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-glx0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-present0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-randr0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-sync1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-xfixes0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcomposite-dev/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcomposite1/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcursor-dev/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxcursor1/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxdamage-dev/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdamage1/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdmcp-dev/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxdmcp6/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxext-dev/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxext6/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxfixes-dev/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxfixes3/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxft-dev/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxft2/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxi-dev/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxi6/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxinerama-dev/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxinerama1/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxkbcommon-dev/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbcommon0/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbfile1/testing,now 1:1.1.0-1+b4 amd64 [installed,automatic] +libxklavier-dev/testing,now 5.4-5+b2 amd64 [installed] +libxklavier16/testing,now 5.4-5+b2 amd64 [installed,automatic] +libxml2-dev/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxml2-utils/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed] +libxml2/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxmu6/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxmuu1/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxpm4/testing,now 1:3.5.17-1+b3 amd64 [installed,automatic] +libxrandr-dev/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrandr2/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrender-dev/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxrender1/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxshmfence1/testing,now 1.3-1+b3 amd64 [installed,automatic] +libxt6t64/testing,now 1:1.2.1-1.2+b2 amd64 [installed,automatic] +libxtst-dev/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxtst6/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxxf86vm1/testing,now 1:1.1.4-1+b4 amd64 [installed,automatic] +libxxhash0/testing,now 0.8.2-2+b2 amd64 [installed,automatic] +libyaml-0-2/testing,now 0.2.5-2 amd64 [installed,automatic] +libz3-4/testing,now 4.13.3-1 amd64 [installed,automatic] +libz3-dev/testing,now 4.13.3-1 amd64 [installed,automatic] +libzstd-dev/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +libzstd1/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +linux-libc-dev/testing,now 6.12.11-1 all [installed,automatic] +linux-sysctl-defaults/testing,now 4.11 all [installed,automatic] +llvm-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-linker-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-runtime/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +login.defs/testing,now 1:4.16.0-7 all [installed,automatic] +login/testing,now 1:4.16.0-2+really2.40.4-2 amd64 [installed,automatic] +logsave/testing,now 1.47.2-1 amd64 [installed,automatic] +m4/testing,now 1.4.19-5 amd64 [installed,automatic] +make/testing,now 4.4.1-1 amd64 [installed] +manpages-dev/testing,now 6.9.1-1 all [installed,automatic] +manpages/testing,now 6.9.1-1 all [installed,automatic] +mawk/testing,now 1.3.4.20240905-1 amd64 [installed,automatic] +media-types/testing,now 10.1.0 all [installed,automatic] +mesa-libgallium/testing,now 24.2.8-1 amd64 [installed,automatic] +mesa-vulkan-drivers/testing,now 24.2.8-1 amd64 [installed,automatic] +mount/testing,now 2.40.4-2 amd64 [installed,automatic] +native-architecture/testing,now 0.2.5 all [installed,automatic] +ncurses-base/testing,now 6.5-2 all [installed,automatic] +ncurses-bin/testing,now 6.5-2+b1 amd64 [installed,automatic] +netbase/testing,now 6.4 all [installed,automatic] +openssh-client/testing,now 1:9.9p1-3 amd64 [installed,automatic] +openssl-provider-legacy/testing,now 3.4.0-2 amd64 [installed,automatic] +openssl/testing,now 3.4.0-2 amd64 [installed,automatic] +pango1.0-tools/testing,now 1.56.1-1 amd64 [installed,automatic] +passwd/testing,now 1:4.16.0-7 amd64 [installed,automatic] +patch/testing,now 2.7.6-7 amd64 [installed,automatic] +perl-base/testing,now 5.40.0-8 amd64 [installed,automatic] +perl-modules-5.40/testing,now 5.40.0-8 all [installed,automatic] +perl/testing,now 5.40.0-8 amd64 [installed,automatic] +pinentry-curses/testing,now 1.3.1-2 amd64 [installed,automatic] +pkgconf-bin/testing,now 1.8.1-4 amd64 [installed,automatic] +pkgconf/testing,now 1.8.1-4 amd64 [installed,automatic] +procps/testing,now 2:4.0.4-7 amd64 [installed,automatic] +psmisc/testing,now 23.7-1 amd64 [installed,automatic] +publicsuffix/testing,now 20250108.1153-0.1 all [installed,automatic] +python3-autocommand/testing,now 2.2.2-3 all [installed,automatic] +python3-inflect/testing,now 7.3.1-2 all [installed,automatic] +python3-jaraco.context/testing,now 6.0.0-1 all [installed,automatic] +python3-jaraco.functools/testing,now 4.1.0-1 all [installed,automatic] +python3-jaraco.text/testing,now 4.0.0-1 all [installed,automatic] +python3-mako/testing,now 1.3.8-2 all [installed,automatic] +python3-markdown/testing,now 3.7-2 all [installed,automatic] +python3-markupsafe/testing,now 2.1.5-1+b2 amd64 [installed,automatic] +python3-minimal/testing,now 3.13.1-2 amd64 [installed,automatic] +python3-more-itertools/testing,now 10.6.0-1 all [installed,automatic] +python3-packaging/testing,now 24.2-1 all [installed,automatic] +python3-pkg-resources/testing,now 75.6.0-1 all [installed,automatic] +python3-pygments/testing,now 2.18.0+dfsg-2 all [installed,automatic] +python3-setuptools/testing,now 75.6.0-1 all [installed,automatic] +python3-typeguard/testing,now 4.4.1-1 all [installed,automatic] +python3-typing-extensions/testing,now 4.12.2-2 all [installed,automatic] +python3-yaml/testing,now 6.0.2-1+b1 amd64 [installed,automatic] +python3-zipp/testing,now 3.21.0-1 all [installed,automatic] +python3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3.13/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3/testing,now 3.13.1-2 amd64 [installed,automatic] +readline-common/testing,now 8.2-6 all [installed,automatic] +rpcsvc-proto/testing,now 1.4.3-1 amd64 [installed,automatic] +sed/testing,now 4.9-2 amd64 [installed,automatic] +sensible-utils/testing,now 0.0.24 all [installed,automatic] +sgml-base/testing,now 1.31 all [installed,automatic] +shared-mime-info/testing,now 2.4-5+b2 amd64 [installed,automatic] +sqv/testing,now 1.2.1-5 amd64 [installed,automatic] +systemd-cryptsetup/testing,now 257.2-3 amd64 [installed,automatic] +systemd-sysv/testing,now 257.2-3 amd64 [installed,automatic] +systemd-timesyncd/testing,now 257.2-3 amd64 [installed,automatic] +systemd/testing,now 257.2-3 amd64 [installed,automatic] +sysvinit-utils/testing,now 3.13-1 amd64 [installed,automatic] +tar/testing,now 1.35+dfsg-3.1 amd64 [installed,automatic] +tcl-expect/testing,now 5.45.4-3+b1 amd64 [installed,automatic] +tcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +tzdata/testing,now 2024b-6 all [installed,automatic] +util-linux/testing,now 2.40.4-2 amd64 [installed,automatic] +uuid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +wayland-protocols/testing,now 1.39-1 all [installed,automatic] +wget/testing,now 1.24.5-2+b1 amd64 [installed] +x11-common/testing,now 1:7.7+24 all [installed,automatic] +x11-xkb-utils/testing,now 7.7+9 amd64 [installed,automatic] +x11proto-dev/testing,now 2024.1-1 all [installed,automatic] +xauth/testing,now 1:1.1.2-1.1 amd64 [installed,automatic] +xdg-user-dirs/testing,now 0.18-2 amd64 [installed,automatic] +xkb-data/testing,now 2.42-1 all [installed,automatic] +xml-core/testing,now 0.19 all [installed,automatic] +xorg-sgml-doctools/testing,now 1:1.11-1.1 all [installed,automatic] +xtrans-dev/testing,now 1.4.0-1 all [installed,automatic] +xz-utils/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +zlib1g-dev/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +zlib1g/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +Errors detected in the build 0 +Warnings detected in the logs 96 +cppcheck defects detected in the logs 28 +TOTAL warnings detected in the logs 124 diff --git a/2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/stats.html b/2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/stats.html new file mode 100644 index 0000000..a805ba6 --- /dev/null +++ b/2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/stats.html @@ -0,0 +1,180 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+

Top 10 files for error severity, total findings: 2
+   1  libcafekbd/cafekbd-status.c
+   1  libcafekbd/cafekbd-indicator.c
+

+

Top 10 files for style severity, total findings: 20
+   13  libcafekbd/cafekbd-keyboard-drawing.c
+   6   libcafekbd/cafekbd-keyboard-config.c
+   1   test/cafekbd-status-test.c
+

+

Top 10 files for information severity, total findings: 5
+   1  test/cafekbd-keyboard-drawing-test.c
+   1  libcafekbd/cafekbd-keyboard-drawing.c
+   1  libcafekbd/cafekbd-keyboard-config.c
+   1  libcafekbd/cafekbd-indicator-config.c
+   1  libcafekbd/cafekbd-desktop-config.c
+

+ +
+ +
+ + diff --git a/2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/style.css b/2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/style.css new file mode 100644 index 0000000..3897bfa --- /dev/null +++ b/2025-02-06-164425-3138-cppcheck@28c310f42d33_devel/style.css @@ -0,0 +1,177 @@ + +body { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; + font-size: 13px; + line-height: 1.5; + height: 100%; + margin: 0; +} + +#wrapper { + position: fixed; + height: 100vh; + width: 100vw; + display: grid; + grid-template-rows: fit-content(8rem) auto fit-content(8rem); + grid-template-columns: fit-content(25%) 1fr; + grid-template-areas: + "header header" + "menu content" + "footer footer"; +} + +h1 { + margin: 0 0 8px -2px; + font-size: 175%; +} + +.header { + padding: 0 0 5px 15px; + grid-area: header; + border-bottom: thin solid #aaa; +} + +.footer { + grid-area: footer; + border-top: thin solid #aaa; + font-size: 85%; + +} + +.footer > p { + margin: 4px; +} + +#menu, +#menu_index { + grid-area: menu; + text-align: left; + overflow: auto; + padding: 0 23px 15px 15px; + border-right: thin solid #aaa; + min-width: 200px; +} + +#menu > a { + display: block; + margin-left: 10px; + font-size: 12px; +} + +#content, +#content_index { + grid-area: content; + padding: 0px 5px 15px 15px; + overflow: auto; +} + +label { + white-space: nowrap; +} + +label.checkBtn.disabled { + color: #606060; + background: #e0e0e0; + font-style: italic; +} + +label.checkBtn, input[type="text"] { + border: 1px solid grey; + border-radius: 4px; + box-shadow: 1px 1px inset; + padding: 1px 5px; +} + +label.checkBtn { + white-space: nowrap; + background: #ccddff; +} + +label.unchecked { + background: #eff8ff; + box-shadow: 1px 1px 1px; +} + +label.checkBtn:hover, label.unchecked:hover{ + box-shadow: 0 0 2px; +} + +label.disabled:hover { + box-shadow: 1px 1px inset; +} + +label.checkBtn > input { + display:none; +} + +.summaryTable { + width: 100%; +} + +table.summaryTable td { padding: 0 5px 0 5px; } + +.statHeader, .severityHeader { + font-weight: bold; +} + +.warning { + background-color: #ffffa7; +} + +.error { + background-color: #ffb7b7; +} + +.error2 { + background-color: #faa; + display: inline-block; + margin-left: 4px; +} + +.inconclusive { + background-color: #b6b6b4; +} + +.inconclusive2 { + background-color: #b6b6b4; + display: inline-block; + margin-left: 4px; +} + +.verbose { + display: inline-block; + vertical-align: top; + cursor: help; +} + +.verbose .content { + display: none; + position: absolute; + padding: 10px; + margin: 4px; + max-width: 40%; + white-space: pre-wrap; + border: 1px solid #000; + background-color: #ffffcc; + cursor: auto; +} + +.highlight .hll { + padding: 1px; +} + +.highlighttable { + background-color: #fff; + position: relative; + margin: -10px; +} + +.linenos { + border-right: thin solid #aaa; + color: #d3d3d3; + padding-right: 6px; +} + +.id-filtered, .severity-filtered, .file-filtered, .tool-filtered, .text-filtered { + visibility: collapse; +} diff --git a/2025-02-06-165351-14522-1@28c310f42d33_devel/commitmsg b/2025-02-06-165351-14522-1@28c310f42d33_devel/commitmsg new file mode 100644 index 0000000..891e4bf --- /dev/null +++ b/2025-02-06-165351-14522-1@28c310f42d33_devel/commitmsg @@ -0,0 +1 @@ +Release 2.0.0 diff --git a/2025-02-06-165351-14522-1@28c310f42d33_devel/index.html b/2025-02-06-165351-14522-1@28c310f42d33_devel/index.html new file mode 100644 index 0000000..7cbae02 --- /dev/null +++ b/2025-02-06-165351-14522-1@28c310f42d33_devel/index.html @@ -0,0 +1,138 @@ + + +libcafekbd (clang-tools 1:19.0-63) - scan-build results + + + + + + +

libcafekbd (clang-tools 1:19.0-63) - scan-build results

+ + + + + + + +
User:root@7a5f1f809f36
Working Directory:/rootdir
Command Line:make -j 5
Clang Version:Debian clang version 19.1.6 (1+b1) +
Date:Thu Feb 6 16:53:51 2025
+

Bug Summary

+ + + + + + + + + +
Bug TypeQuantityDisplay?
All Bugs11
Logic error
Dereference of null pointer1
Stream handling error
Invalid stream state1
Stream already in EOF1
Unused code
Unreachable code8
+ +

Filter Results by File

+ + +

Reports

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Bug GroupBug Type ▾FileFunction/MethodLinePath Length
Logic errorDereference of null pointerlibcafekbd/tmp-introspecthn0d3wzv/Cafekbd-1.0.cmain81232View Report
Stream handling errorInvalid stream statelibcafekbd/tmp-introspecthn0d3wzv/Cafekbd-1.0.cread_line8933View Report
Stream handling errorStream already in EOFlibcafekbd/tmp-introspecthn0d3wzv/Cafekbd-1.0.cread_line8933View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2481View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain1991View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain1941View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2281View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain1871View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2251View Report
Unused codeUnreachable codelibcafekbd/tmp-introspecthn0d3wzv/Cafekbd-1.0.cvalue_to_string2391View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2561View Report
+ + diff --git a/2025-02-06-165351-14522-1@28c310f42d33_devel/output_28c310f42d337eadca7386aeed5be91417c339a2 b/2025-02-06-165351-14522-1@28c310f42d33_devel/output_28c310f42d337eadca7386aeed5be91417c339a2 new file mode 100644 index 0000000..006a2f8 --- /dev/null +++ b/2025-02-06-165351-14522-1@28c310f42d33_devel/output_28c310f42d337eadca7386aeed5be91417c339a2 @@ -0,0 +1,1866 @@ +Checking libcafekbd/cafekbd-desktop-config.c ... +libcafekbd/cafekbd-desktop-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +1/10 files checked 4% done +Checking libcafekbd/cafekbd-indicator-config.c ... +libcafekbd/cafekbd-indicator-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +2/10 files checked 10% done +Checking libcafekbd/cafekbd-indicator.c ... +libcafekbd/cafekbd-indicator.c:66:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdIndicator, cafekbd_indicator, CTK_TYPE_NOTEBOOK) +^ +3/10 files checked 24% done +Checking libcafekbd/cafekbd-keyboard-config.c ... +libcafekbd/cafekbd-keyboard-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-config.c:67:8: style: Condition '*l1' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:67:15: style: Condition '*l2' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:227:16: style: Condition 'option!=NULL' is always true [knownConditionTrueFalse] + (option != NULL) ? strchr (option, ':') : NULL; + ^ +libcafekbd/cafekbd-keyboard-config.c:282:18: style: Condition 'variant==NULL' is always false [knownConditionTrueFalse] + (variant == + ^ +libcafekbd/cafekbd-keyboard-config.c:226:10: style: Variable 'delim' can be declared as pointer to const [constVariablePointer] + char *delim = + ^ +libcafekbd/cafekbd-keyboard-config.c:609:65: style: Parameter 'kbd_config' can be declared as pointer to const [constParameterPointer] +cafekbd_keyboard_config_options_is_set (CafekbdKeyboardConfig * kbd_config, + ^ +4/10 files checked 36% done +Checking libcafekbd/cafekbd-keyboard-drawing.c ... +libcafekbd/cafekbd-keyboard-drawing.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-drawing.c:61:60: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_coord (CafekbdKeyboardDrawingRenderContext * context, gint n) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:67:61: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_double (CafekbdKeyboardDrawingRenderContext * context, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:625:51: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +set_markup (CafekbdKeyboardDrawingRenderContext * context, gchar *txt) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1026:11: style: Variable 'runp' can be declared as pointer to const [constVariablePointer] + GSList *runp; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1036:25: style: Variable 'geometry' can be declared as pointer to const [constVariablePointer] + PangoGlyphGeometry *geometry; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1202:39: style: Parameter 'outline' can be declared as pointer to const [constParameterPointer] +calc_origin_offset_x (XkbOutlineRec * outline) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1397:15: style: Variable 'shape' can be declared as pointer to const [constVariablePointer] + XkbShapeRec *shape; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: style: Parameter 'drawing' can be declared as pointer to const. However it seems that 'button_press_event' is a callback function, if 'drawing' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2343:18: note: You might need to cast the function pointer here + G_CALLBACK (button_press_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: note: Parameter 'drawing' can be declared as pointer to const + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: style: Parameter 'event' can be declared as pointer to const. However it seems that 'focus_event' is a callback function, if 'event' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2347:18: note: You might need to cast the function pointer here + G_CALLBACK (focus_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: note: Parameter 'event' can be declared as pointer to const + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: style: Parameter 'a' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'a' is declared with const you might also need to cast function pointer(s). [constParameterCallback] +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: note: Parameter 'a' can be declared as pointer to const +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: style: Parameter 'b' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'b' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: note: Parameter 'b' can be declared as pointer to const + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1863:9: style: Variable 'pind' can be declared as pointer to const [constVariablePointer] + Atom *pind = drawing->xkb->names->indicators; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2124:60: style: Parameter 'iev' can be declared as pointer to const [constParameterPointer] +process_indicators_state_notify (XkbIndicatorNotifyEvent * iev, + ^ +Checking libcafekbd/cafekbd-keyboard-drawing.c: KBDRAW_DEBUG... +5/10 files checked 77% done +Checking libcafekbd/cafekbd-status.c ... +libcafekbd/cafekbd-status.c:82:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdStatus, cafekbd_status, CTK_TYPE_STATUS_ICON) +^ +6/10 files checked 91% done +Checking libcafekbd/cafekbd-util.c ... +7/10 files checked 93% done +Checking test/cafekbd-indicator-test.c ... +8/10 files checked 94% done +Checking test/cafekbd-keyboard-drawing-test.c ... +test/cafekbd-keyboard-drawing-test.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +Checking test/cafekbd-keyboard-drawing-test.c: HAVE_CONFIG_H... +9/10 files checked 99% done +Checking test/cafekbd-status-test.c ... +test/cafekbd-status-test.c:42:17: style: Variable 'icon' can be declared as pointer to const [constVariablePointer] + CtkStatusIcon *icon; + ^ +10/10 files checked 100% done +nofile:0:0: information: Active checkers: There was critical errors (use --checkers-report= to see details) [checkersReport] + +/usr/bin/cafe-autogen +checking for autoreconf >= 2.53... + testing autoreconf... found 2.72 +checking for pkg-config >= 0.14.0... + testing pkg-config... found 1.8.1 +checking for cafe-common >= 0.0.1... + testing cafe-doc-common... found 2.0.0 +Checking for required M4 macros... +Checking for forbidden M4 macros... +Processing ./configure.ac +Running cafe-doc-common... +Running autoreconf... +autoreconf: export WARNINGS=no-portability +autoreconf: Entering directory '.' +autoreconf: running: autopoint --force +Copying file ABOUT-NLS +Copying file config.rpath +Copying file m4/codeset.m4 +Copying file m4/extern-inline.m4 +Copying file m4/fcntl-o.m4 +Copying file m4/gettext.m4 +Copying file m4/glibc2.m4 +Copying file m4/glibc21.m4 +Copying file m4/iconv.m4 +Copying file m4/intdiv0.m4 +Copying file m4/intl.m4 +Copying file m4/intldir.m4 +Copying file m4/intlmacosx.m4 +Copying file m4/intmax.m4 +Copying file m4/inttypes-pri.m4 +Copying file m4/inttypes_h.m4 +Copying file m4/lcmessage.m4 +Copying file m4/lib-ld.m4 +Copying file m4/lib-link.m4 +Copying file m4/lib-prefix.m4 +Copying file m4/lock.m4 +Copying file m4/longlong.m4 +Copying file m4/nls.m4 +Copying file m4/po.m4 +Copying file m4/printf-posix.m4 +Copying file m4/progtest.m4 +Copying file m4/size_max.m4 +Copying file m4/stdint_h.m4 +Copying file m4/threadlib.m4 +Copying file m4/uintmax_t.m4 +Copying file m4/visibility.m4 +Copying file m4/wchar_t.m4 +Copying file m4/wint_t.m4 +Copying file m4/xsize.m4 +Copying file po/Makefile.in.in +Copying file po/Makevars.template +Copying file po/Rules-quot +Copying file po/boldquot.sed +Copying file po/en@boldquot.header +Copying file po/en@quot.header +Copying file po/insert-header.sin +Copying file po/quot.sed +Copying file po/remove-potcdate.sin +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: configure.ac: tracing +autoreconf: running: libtoolize --copy --force +libtoolize: putting auxiliary files in '.'. +libtoolize: copying file './ltmain.sh' +libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. +libtoolize: copying file 'm4/libtool.m4' +libtoolize: copying file 'm4/ltoptions.m4' +libtoolize: copying file 'm4/ltsugar.m4' +libtoolize: copying file 'm4/ltversion.m4' +libtoolize: copying file 'm4/lt~obsolete.m4' +autoreconf: configure.ac: not using Intltool +autoreconf: configure.ac: not using Gtkdoc +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: running: /usr/bin/autoconf --force +autoreconf: running: /usr/bin/autoheader --force +autoreconf: running: automake --add-missing --copy --force-missing +configure.ac:31: installing './compile' +configure.ac:34: installing './config.guess' +configure.ac:34: installing './config.sub' +configure.ac:16: installing './install-sh' +configure.ac:16: installing './missing' +Makefile.am: installing './INSTALL' +libcafekbd/Makefile.am: installing './depcomp' +autoreconf: Leaving directory '.' +Skipping configure process. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +checking for a BSD-compatible install... /usr/bin/install -c +checking whether sleep supports fractional seconds... yes +checking filesystem timestamp resolution... 0.01 +checking whether build environment is sane... yes +checking for a race-free mkdir -p... /usr/bin/mkdir -p +checking for gawk... no +checking for mawk... mawk +checking whether make sets $(MAKE)... yes +checking whether make supports nested variables... yes +checking xargs -n works... yes +checking whether make supports the include directive... yes (GNU style) +checking for gcc... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the C compiler works... yes +checking for C compiler default output file name... a.out +checking for suffix of executables... +checking whether we are cross compiling... no +checking for suffix of object files... o +checking whether the compiler supports GNU C... yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... rm: cannot remove 'conftest.plist': Is a directory +yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... gcc3 +checking whether C compiler accepts -Werror=unknown-warning-option... no +checking whether C compiler accepts -Wall... yes +checking whether C compiler accepts -Wmissing-prototypes... yes +checking whether C compiler accepts -Wbad-function-cast... yes +checking whether C compiler accepts -Wcast-align... yes +checking whether C compiler accepts -Wextra... yes +checking whether C compiler accepts -Wformat-nonliteral... yes +checking whether C compiler accepts -Wmissing-declarations... yes +checking whether C compiler accepts -Wnested-externs... yes +checking whether C compiler accepts -Wpointer-arith... yes +checking whether C compiler accepts -Wredundant-decls... yes +checking whether C compiler accepts -Wshadow... yes +checking whether C compiler accepts -Wstrict-prototypes... yes +checking whether C compiler accepts -Wunused-macros... yes +checking whether C compiler accepts -Werror=format-security... yes +checking whether C compiler accepts -fstrict-aliasing... yes +checking flags to pass to the C compiler /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing +checking for gcc... (cached) /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the compiler supports GNU C... (cached) yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... (cached) yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... (cached) none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... (cached) yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... (cached) gcc3 +checking build system type... x86_64-pc-linux-gnu +checking host system type... x86_64-pc-linux-gnu +checking how to print strings... printf +checking for a sed that does not truncate output... /usr/bin/sed +checking for grep that handles long lines and -e... /usr/bin/grep +checking for egrep... /usr/bin/grep -E +checking for fgrep... /usr/bin/grep -F +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld +checking if the linker (/usr/bin/ld) is GNU ld... yes +checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B +checking the name lister (/usr/bin/nm -B) interface... rm: cannot remove 'conftest.plist': Is a directory +BSD nm +checking whether ln -s works... yes +checking the maximum length of command line arguments... 3145728 +checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop +checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop +checking for /usr/bin/ld option to reload object files... -r +checking for file... file +checking for objdump... objdump +checking how to recognize dependent libraries... pass_all +checking for dlltool... no +checking how to associate runtime and link libraries... printf %s\n +checking for ranlib... ranlib +checking for ar... ar +checking for archiver @FILE support... rm: cannot remove 'conftest.plist': Is a directory +@ +checking for strip... strip +checking command to parse /usr/bin/nm -B output from /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer object... rm: cannot remove 'conftest.plist': Is a directory +ok +checking for sysroot... no +checking for a working dd... /usr/bin/dd +checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1 +checking for mt... no +checking if : is a manifest tool... no +checking for stdio.h... yes +checking for stdlib.h... yes +checking for string.h... yes +checking for inttypes.h... yes +checking for stdint.h... yes +checking for strings.h... yes +checking for sys/stat.h... yes +checking for sys/types.h... yes +checking for unistd.h... yes +checking for dlfcn.h... yes +checking for objdir... .libs +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -fno-rtti -fno-exceptions... no +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to produce PIC... -fPIC -DPIC +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer PIC flag -fPIC -DPIC works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer static flag -static works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... (cached) yes +checking whether the /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes +checking whether -lc should be explicitly linked in... no +checking dynamic linker characteristics... GNU/Linux ld.so +checking how to hardcode library paths into programs... immediate +checking whether stripping libraries is possible... yes +checking if libtool supports shared libraries... yes +checking whether to build shared libraries... yes +checking whether to build static libraries... yes +checking whether NLS is requested... yes +checking for msgfmt... /usr/bin/msgfmt +checking for gmsgfmt... /usr/bin/msgfmt +checking for xgettext... /usr/bin/xgettext +checking for msgmerge... /usr/bin/msgmerge +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld -m elf_x86_64 +checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes +checking for shared library run path origin... done +checking how to run the C preprocessor... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer -E +checking for egrep -e... (cached) /usr/bin/grep -E +checking for CFPreferencesCopyAppValue... no +checking for CFLocaleCopyCurrent... no +checking for GNU gettext in libc... yes +checking whether to use NLS... yes +checking where the gettext function comes from... libc +checking for glib-compile-resources... /usr/bin/glib-compile-resources +checking for xmllint... /usr/bin/xmllint +checking for setlocale... yes +checking for pkg-config... /usr/bin/pkg-config +checking pkg-config is at least version 0.9.0... yes +checking for glib-2.0 >= 2.50.0... yes +checking for gmodule-2.0... yes +checking for gio-2.0 >= 2.25.0... yes +checking for cdk-3.0 >= 3.22.0... yes +checking for ctk+-3.0 >= 3.22.0 cdk-x11-3.0 >= 3.22.0... yes +checking for libxklavier >= 5.2... yes +checking for X... libraries , headers +checking for gethostbyname... yes +checking for connect... yes +checking for remove... yes +checking for shmat... yes +checking for IceConnectionNumber in -lICE... yes +checking for pkg-config... (cached) /usr/bin/pkg-config +checking pkg-config is at least version 0.16... yes +checking for library containing sqrt... -lm +checking for gobject-introspection... yes +checking that generated files are newer than configure... done +configure: creating ./config.status +config.status: creating Makefile +config.status: creating libcafekbd.pc +config.status: creating libcafekbdui.pc +config.status: creating po/Makefile.in +config.status: creating libcafekbd/Makefile +config.status: creating libcafekbd/org.cafe.peripherals-keyboard-xkb.gschema.xml +config.status: creating test/Makefile +config.status: creating config.h +config.status: executing depfiles commands +config.status: executing libtool commands +config.status: executing po-directories commands +config.status: creating po/POTFILES +config.status: creating po/Makefile + +Configuration: + + prefix: /usr + exec_prefix: ${prefix} + libdir: ${exec_prefix}/lib + bindir: ${exec_prefix}/bin + sbindir: ${exec_prefix}/sbin + sysconfdir: ${prefix}/etc + datadir: ${datarootdir} + source code location: . + compiler: /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer + cflags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + Warning flags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + +scan-build: Analysis run complete. +scan-build: Removing directory '/tmp/scan-build-2025-02-06-165341-11857-1' because it contains no reports. +scan-build: No bugs found. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +make all-recursive +make[1]: Entering directory '/rootdir' +Making all in po +make[2]: Entering directory '/rootdir/po' +make libcafekbd.pot-update +make[3]: Entering directory '/rootdir/po' +sed -e '/^#/d' remove-potcdate.sin > t-remove-potcdate.sed +mv t-remove-potcdate.sed remove-potcdate.sed +package_gnu=""; \ +test -n "$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L .. -maxdepth 1 -type f \ + -size -10000000c -exec grep 'GNU libcafekbd' \ + /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU libcafekbd' ../* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ +}; \ +if test "$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ +else \ + package_prefix=''; \ +fi; \ +if test -n '' || test 'https://github.com/cafe-desktop/libcafekbd' = '@'PACKAGE_BUGREPORT'@'; then \ + msgid_bugs_address=''; \ +else \ + msgid_bugs_address='https://github.com/cafe-desktop/libcafekbd'; \ +fi; \ +case `/usr/bin/xgettext --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ + *) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --package-name="${package_prefix}libcafekbd" \ + --package-version='2.0.0' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ +esac +test ! -f libcafekbd.po || { \ + if test -f ./libcafekbd.pot-header; then \ + sed -e '1,/^#$/d' < libcafekbd.po > libcafekbd.1po && \ + cat ./libcafekbd.pot-header libcafekbd.1po > libcafekbd.po; \ + rm -f libcafekbd.1po; \ + fi; \ + if test -f ./libcafekbd.pot; then \ + sed -f remove-potcdate.sed < ./libcafekbd.pot > libcafekbd.1po && \ + sed -f remove-potcdate.sed < libcafekbd.po > libcafekbd.2po && \ + if cmp libcafekbd.1po libcafekbd.2po >/dev/null 2>&1; then \ + rm -f libcafekbd.1po libcafekbd.2po libcafekbd.po; \ + else \ + rm -f libcafekbd.1po libcafekbd.2po ./libcafekbd.pot && \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ + else \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ +} +make[3]: Leaving directory '/rootdir/po' +test ! -f ./libcafekbd.pot || \ + test -z "af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo" || make af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo +make[3]: Entering directory '/rootdir/po' +/usr/bin/msgmerge --update --quiet --lang=af af.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=an an.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=am am.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ar ar.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=as as.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ast ast.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=az az.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bg bg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn bn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=be be.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn_IN bn_IN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=br br.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bs bs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca ca.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca@valencia ca@valencia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cmn cmn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=crh crh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cs cs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cv cv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=csb csb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cy cy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=da da.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de de.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de_CH de_CH.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=dz dz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=el el.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_AU en_AU.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_CA en_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_GB en_GB.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eo eo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_419 es_419.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es es.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CL es_CL.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_AR es_AR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CO es_CO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CR es_CR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_DO es_DO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_EC es_EC.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_MX es_MX.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_ES es_ES.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_NI es_NI.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PA es_PA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PE es_PE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PR es_PR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_SV es_SV.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_US es_US.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_UY es_UY.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_VE es_VE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=et et.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fa fa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eu eu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fi fi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fil fil.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fo fo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr_CA fr_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr fr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fur fur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=frp frp.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fy fy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ga ga.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gd gd.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gl gl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gu gu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ha ha.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hi hi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=he he.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hr hr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hu hu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hy hy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ia ia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=id id.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ie ie.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ig ig.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=is is.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=it it.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ja ja.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=jv jv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ka ka.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kk kk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kab kab.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kn kn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ko ko.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=km km.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ks ks.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku ku.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku_IQ ku_IQ.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=la la.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ky ky.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lb lb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=li li.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lo lo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lv lv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lt lt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mai mai.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mg mg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mi mi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mk mk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mn mn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ml ml.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mr mr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ms ms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=my my.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nah nah.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nb nb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nds nds.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ne ne.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nl nl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nqo nqo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nn nn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nso nso.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=oc oc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=om om.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=or or.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pa pa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pl pl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pms pms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ps ps.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt pt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt_BR pt_BR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ro ro.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ru ru.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sc sc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=rw rw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sco sco.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=si si.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sk sk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sl sl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=so so.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sq sq.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr sr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr@latin sr@latin.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sw sw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sv sv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ta ta.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=te te.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tg tg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=th th.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tk tk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tl tl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tr tr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ts ts.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tt tt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ug ug.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur ur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uk uk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur_PK ur_PK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=vi vi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uz uz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=wa wa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=xh xh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yi yi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yo yo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_CN zh_CN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_HK zh_HK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_TW zh_TW.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zu zu.po libcafekbd.pot +rm -f af.gmo && /usr/bin/msgfmt -c --statistics --verbose -o af.gmo af.po +rm -f am.gmo && /usr/bin/msgfmt -c --statistics --verbose -o am.gmo am.po +af.po: 7 translated messages, 84 untranslated messages. +rm -f ar.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ar.gmo ar.po +rm -f as.gmo && /usr/bin/msgfmt -c --statistics --verbose -o as.gmo as.po +rm -f an.gmo && /usr/bin/msgfmt -c --statistics --verbose -o an.gmo an.po +am.po: 54 translated messages, 37 untranslated messages. +an.po:7: warning: header field 'Last-Translator' still has the initial default value +an.po: 0 translated messages, 91 untranslated messages. +rm -f ast.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ast.gmo ast.po +ar.po: 50 translated messages, 41 untranslated messages. +as.po: 41 translated messages, 50 untranslated messages. +rm -f az.gmo && /usr/bin/msgfmt -c --statistics --verbose -o az.gmo az.po +rm -f be.gmo && /usr/bin/msgfmt -c --statistics --verbose -o be.gmo be.po +ast.po: 47 translated messages, 44 untranslated messages. +rm -f bn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn.gmo bn.po +rm -f bg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bg.gmo bg.po +rm -f bn_IN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn_IN.gmo bn_IN.po +be.po: 46 translated messages, 45 untranslated messages. +az.po: 9 translated messages, 82 untranslated messages. +bg.po: 54 translated messages, 37 untranslated messages. +bn.po: 43 translated messages, 48 untranslated messages. +rm -f br.gmo && /usr/bin/msgfmt -c --statistics --verbose -o br.gmo br.po +rm -f bs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bs.gmo bs.po +bn_IN.po: 41 translated messages, 50 untranslated messages. +rm -f ca.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca.gmo ca.po +rm -f ca@valencia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca@valencia.gmo ca@valencia.po +bs.po: 25 translated messages, 66 untranslated messages. +br.po: 20 translated messages, 71 untranslated messages. +rm -f cmn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cmn.gmo cmn.po +ca.po: 87 translated messages, 4 untranslated messages. +ca@valencia.po: 54 translated messages, 37 untranslated messages. +rm -f cs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cs.gmo cs.po +rm -f crh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o crh.gmo crh.po +cmn.po: rm -f csb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o csb.gmo csb.po +46 translated messages, 45 untranslated messages. +rm -f cv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cv.gmo cv.po +crh.po: 11 translated messages, 80 untranslated messages. +cs.po: 81 translated messages, 10 untranslated messages. +csb.po:7: warning: header field 'Last-Translator' still has the initial default value +rm -f cy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cy.gmo cy.po +csb.po: 0 translated messages, 91 untranslated messages. +rm -f da.gmo && /usr/bin/msgfmt -c --statistics --verbose -o da.gmo da.po +cv.po: 0 translated messages, 91 untranslated messages. +rm -f de.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de.gmo de.po +rm -f de_CH.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de_CH.gmo de_CH.po +cy.po: 26 translated messages, 65 untranslated messages. +da.po: 91 translated messages. +de.po: 76 translated messages, 15 untranslated messages. +rm -f dz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o dz.gmo dz.po +de_CH.po: 0 translated messages, 91 untranslated messages. +rm -f el.gmo && /usr/bin/msgfmt -c --statistics --verbose -o el.gmo el.po +rm -f en_AU.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_AU.gmo en_AU.po +rm -f en_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_CA.gmo en_CA.po +dz.po: 39 translated messages, 52 untranslated messages. +rm -f en_GB.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_GB.gmo en_GB.po +en_AU.po: 54 translated messages, 37 untranslated messages. +el.po: 54 translated messages, 37 untranslated messages. +rm -f eo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eo.gmo eo.po +en_CA.po: 10 translated messages, 81 untranslated messages. +en_GB.po: 54 translated messages, 37 untranslated messages. +rm -f es.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es.gmo es.po +rm -f es_419.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_419.gmo es_419.po +eo.po: 52 translated messages, 39 untranslated messages. +rm -f es_AR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_AR.gmo es_AR.po +rm -f es_CL.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CL.gmo es_CL.po +es_419.po: 0 translated messages, 91 untranslated messages. +es.po: 89 translated messages, 2 untranslated messages. +rm -f es_CO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CO.gmo es_CO.po +es_CL.po: 3 translated messages, 88 untranslated messages. +es_AR.po: 21 translated messages, 70 untranslated messages. +rm -f es_CR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CR.gmo es_CR.po +rm -f es_DO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_DO.gmo es_DO.po +rm -f es_ES.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_ES.gmo es_ES.po +rm -f es_EC.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_EC.gmo es_EC.po +es_CR.po: 1 translated message, 90 untranslated messages. +es_CO.po: 49 translated messages, 42 untranslated messages. +es_DO.po: 1 translated message, 90 untranslated messages. +es_EC.po: 1 translated message, 90 untranslated messages. +es_ES.po: 1 translated message, 90 untranslated messages. +rm -f es_MX.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_MX.gmo es_MX.po +rm -f es_PA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PA.gmo es_PA.po +rm -f es_NI.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_NI.gmo es_NI.po +rm -f es_PE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PE.gmo es_PE.po +rm -f es_PR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PR.gmo es_PR.po +es_MX.po: 1 translated message, 90 untranslated messages. +es_PA.po: 1 translated message, 90 untranslated messages. +es_PE.po: 1 translated message, 90 untranslated messages. +es_NI.po: 1 translated message, 90 untranslated messages. +rm -f es_SV.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_SV.gmo es_SV.po +rm -f es_US.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_US.gmo es_US.po +es_PR.po: 1 translated message, 90 untranslated messages. +rm -f es_UY.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_UY.gmo es_UY.po +rm -f es_VE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_VE.gmo es_VE.po +es_SV.po: 1 translated message, 90 untranslated messages. +rm -f et.gmo && /usr/bin/msgfmt -c --statistics --verbose -o et.gmo et.po +es_US.po: 0 translated messages, 91 untranslated messages. +es_UY.po: 1 translated message, 90 untranslated messages. +rm -f eu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eu.gmo eu.po +es_VE.po: 1 translated message, 90 untranslated messages. +et.po: rm -f fa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fa.gmo fa.po +54 translated messages, 37 untranslated messages. +rm -f fi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fi.gmo fi.po +rm -f fil.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fil.gmo fil.po +eu.po: 54 translated messages, 37 untranslated messages. +fa.po: 11 translated messages, 80 untranslated messages. +fi.po: 48 translated messages, 43 untranslated messages. +rm -f fo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fo.gmo fo.po +rm -f fr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr.gmo fr.po +fil.po: 0 translated messages, 91 untranslated messages. +rm -f fr_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr_CA.gmo fr_CA.po +rm -f frp.gmo && /usr/bin/msgfmt -c --statistics --verbose -o frp.gmo frp.po +fo.po: 0 translated messages, 91 untranslated messages. +rm -f fur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fur.gmo fur.po +fr.po: 67 translated messages, 24 untranslated messages. +frp.po: 7 translated messages, 84 untranslated messages. +rm -f fy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fy.gmo fy.po +fr_CA.po: 3 translated messages, 88 untranslated messages. +fur.po: 4 translated messages, 87 untranslated messages. +rm -f ga.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ga.gmo ga.po +fy.po: 4 translated messagesrm -f gl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gl.gmo gl.po +, 87 untranslated messages. +rm -f gd.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gd.gmo gd.po +rm -f gu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gu.gmo gu.po +gd.po: 0 translated messages, 91 untranslated messages. +gl.po: 89 translated messages, 2 untranslated messages. +ga.po: 41 translated messages, 50 untranslated messages. +rm -f ha.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ha.gmo ha.po +rm -f he.gmo && /usr/bin/msgfmt -c --statistics --verbose -o he.gmo he.po +gu.po: 43 translated messages, 48 untranslated messages. +ha.po: 5 translated messages, 86 untranslated messages. +rm -f hi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hi.gmo hi.po +rm -f hr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hr.gmo hr.po +he.po: 54 translated messages, 37 untranslated messages. +rm -f hu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hu.gmo hu.po +rm -f hy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hy.gmo hy.po +hr.po: 54 translated messages, 37 untranslated messages. +hi.po: 45 translated messages, 46 untranslated messages. +rm -f ia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ia.gmo ia.po +hy.po: 54 translated messages, 37 untranslated messages. +hu.po: 54 translated messages, 37 untranslated messages. +ia.po: 3 translated messages, 88 untranslated messages. +rm -f id.gmo && /usr/bin/msgfmt -c --statistics --verbose -o id.gmo id.po +rm -f ie.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ie.gmo ie.po +rm -f ig.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ig.gmo ig.po +rm -f is.gmo && /usr/bin/msgfmt -c --statistics --verbose -o is.gmo is.po +id.po: 91 translated messages. +rm -f it.gmo && /usr/bin/msgfmt -c --statistics --verbose -o it.gmo it.po +ie.po: 45 translated messages, 46 untranslated messages. +ig.po: 5 translated messages, 86 untranslated messages. +is.po: 12 translated messages, 79 untranslated messages. +rm -f ja.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ja.gmo ja.po +rm -f ka.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ka.gmo ka.po +rm -f jv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o jv.gmo jv.po +it.po: 91 translated messages. +rm -f kab.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kab.gmo kab.po +ja.po: 54 translated messages, 37 untranslated messages. +jv.po: 2 translated messages, 89 untranslated messagesrm -f kk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kk.gmo kk.po +. +ka.po: 37 translated messages, 54 untranslated messages. +rm -f km.gmo && /usr/bin/msgfmt -c --statistics --verbose -o km.gmo km.po +kab.po: 4 translated messages, 87 untranslated messages. +rm -f kn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kn.gmo kn.po +rm -f ko.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ko.gmo ko.po +kk.po: 24 translated messages, 67 untranslated messages. +rm -f ks.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ks.gmo ks.po +km.po:7: warning: header field 'Last-Translator' still has the initial default value +km.po: 0 translated messages, 91 untranslated messages. +ko.po: 54 translated messages, 37 untranslated messages. +rm -f ku.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku.gmo ku.po +kn.po: 43 translated messages, 48 untranslated messages. +rm -f ku_IQ.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku_IQ.gmo ku_IQ.po +ks.po: 3 translated messages, 88 untranslated messages. +rm -f ky.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ky.gmo ky.po +rm -f la.gmo && /usr/bin/msgfmt -c --statistics --verbose -o la.gmo la.po +ku.po: 10 translated messages, 81 untranslated messages. +rm -f lb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lb.gmo lb.po +ku_IQ.po: 16 translated messages, 75 untranslated messages. +ky.po: 26 translated messages, 65 untranslated messages. +rm -f li.gmo && /usr/bin/msgfmt -c --statistics --verbose -o li.gmo li.po +la.po: 2 translated messages, 89 untranslated messages. +rm -f lo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lo.gmo lo.po +lb.po:7: warning: header field 'Last-Translator' still has the initial default value +lb.po: 0 translated messages, 91 untranslated messages. +rm -f lt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lt.gmo lt.po +li.po:7: warning: header field 'Last-Translator' still has the initial default value +li.po: 0 translated messages, 91 untranslated messages. +rm -f lv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lv.gmo lv.po +lo.po:7: warning: header field 'Last-Translator' still has the initial default value +lo.po: 0 translated messages, 91 untranslated messages. +rm -f mai.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mai.gmo mai.po +lt.po: 91 translated messages. +rm -f mg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mg.gmo mg.po +mai.po: 18 translated messages, 73 untranslated messages. +lv.po: 49 translated messages, 42 untranslated messages. +rm -f mi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mi.gmo mi.po +rm -f mk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mk.gmo mk.po +rm -f mn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mn.gmo mn.po +mg.po: 10 translated messages, 81 untranslated messages. +rm -f ml.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ml.gmo ml.po +mi.po:7: warning: header field 'Last-Translator' still has the initial default value +mi.po: 0 translated messages, 91 untranslated messages. +mk.po: 39 translated messages, 52 untranslated messages. +mn.po: 10 translated messages, 81 untranslated messages. +rm -f mr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mr.gmo mr.po +rm -f ms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ms.gmo ms.po +ml.po: 41 translated messages, 50 untranslated messages. +rm -f my.gmo && /usr/bin/msgfmt -c --statistics --verbose -o my.gmo my.po +ms.po: 91 translated messages. +rm -f nah.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nah.gmo nah.po +mr.po: 47 translated messages, 44 untranslated messages. +rm -f nb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nb.gmo nb.po +my.po:7: warning: header field 'Last-Translator' still has the initial default value +my.po: 0 translated messages, 91 untranslated messages. +rm -f nds.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nds.gmo nds.po +nah.po: 0 translated messages, 91 untranslated messages. +nb.po: 91 translated messages. +rm -f ne.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ne.gmo ne.po +rm -f nl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nl.gmo nl.po +rm -f nn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nn.gmo nn.po +nds.po: 12 translated messages, 79 untranslated messages. +nl.po: 91 translated messages. +rm -f nqo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nqo.gmo nqo.po +ne.po: 13 translated messages, 78 untranslated messages. +nn.po: 40 translated messages, 51 untranslated messages. +rm -f nso.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nso.gmo nso.po +rm -f oc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o oc.gmo oc.po +rm -f om.gmo && /usr/bin/msgfmt -c --statistics --verbose -o om.gmo om.po +nqo.po: 0 translated messages, 91 untranslated messages. +rm -f or.gmo && /usr/bin/msgfmt -c --statistics --verbose -o or.gmo or.po +nso.po: oc.po: 68 translated messages, 23 untranslated messages. +3 translated messages, 88 untranslated messages. +om.po: 0 translated messages, 91 untranslated messages. +rm -f pa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pa.gmo pa.po +rm -f pms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pms.gmo pms.po +rm -f pl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pl.gmo pl.po +or.po: 41 translated messages, 50 untranslated messages. +rm -f ps.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ps.gmo ps.po +pms.po: 3 translated messages, 88 untranslated messages. +pl.po: 55 translated messages, 36 untranslated messages. +pa.po: 46 translated messages, 45 untranslated messages. +rm -f pt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt.gmo pt.po +rm -f pt_BR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt_BR.gmo pt_BR.po +ps.po: 6 translated messages, 85 untranslated messages. +rm -f ro.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ro.gmo ro.po +rm -f ru.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ru.gmo ru.po +rm -f rw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o rw.gmo rw.po +pt_BR.po: 58 translated messages, 33 untranslated messages. +pt.po: 84 translated messages, 7 untranslated messages. +ro.po: 54 translated messages, 37 untranslated messages. +ru.po: 89 translated messages, 2 untranslated messages. +rm -f sco.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sco.gmo sco.po +rm -f sc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sc.gmo sc.po +rw.po: 10 translated messages, 81 untranslated messages. +rm -f si.gmo && /usr/bin/msgfmt -c --statistics --verbose -o si.gmo si.po +rm -f sk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sk.gmo sk.po +rm -f sl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sl.gmo sl.po +sco.po: 0 translated messages, 91 untranslated messages. +sc.po: 2 translated messages, 89 untranslated messages. +sk.po: 54 translated messages, 37 untranslated messages. +si.po: 36 translated messages, 55 untranslated messages. +sl.po: 55 translated messages, 36 untranslated messages. +rm -f so.gmo && /usr/bin/msgfmt -c --statistics --verbose -o so.gmo so.po +rm -f sq.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sq.gmo sq.po +rm -f sr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr.gmo sr.po +rm -f sr@latin.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr@latin.gmo sr@latin.po +rm -f sv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sv.gmo sv.po +so.po: 0 translated messages, 91 untranslated messages. +sq.po: 52 translated messages, 39 untranslated messages. +sr@latin.po: 46 translated messages, 45 untranslated messages. +sr.po: 91 translated messages. +rm -f sw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sw.gmo sw.po +rm -f te.gmo && /usr/bin/msgfmt -c --statistics --verbose -o te.gmo te.po +rm -f ta.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ta.gmo ta.po +sv.po: 80 translated messages, 11 untranslated messages. +rm -f tg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tg.gmo tg.po +te.po: 41 translated messages, 50 untranslated messages. +sw.po: 0 translated messages, 91 untranslated messages. +ta.po: 46 translated messages, 45 untranslated messages. +tg.po: 0 translated messages, 91 untranslated messages. +rm -f th.gmo && /usr/bin/msgfmt -c --statistics --verbose -o th.gmo th.po +rm -f tk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tk.gmo tk.po +rm -f tl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tl.gmo tl.po +rm -f tr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tr.gmo tr.po +tl.po: 0 translated messagesth.po: 45 translated messages, 46 untranslated messages. +, 91 untranslated messages. +tk.po: 7 translated messages, 84 untranslated messages. +rm -f ts.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ts.gmo ts.po +tr.po: 58 translated messages, 33 untranslated messages. +rm -f tt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tt.gmo tt.po +ts.po: 0 translated messages, 91 untranslated messages. +rm -f uk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uk.gmo uk.po +rm -f ug.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ug.gmo ug.po +rm -f ur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur.gmo ur.po +tt.po:7: warning: header field 'Last-Translator' still has the initial default value +tt.po: 0 translated messages, 91 untranslated messages. +rm -f ur_PK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur_PK.gmo ur_PK.po +ug.po: 6 translated messages, 85 untranslated messages. +uk.po: 58 translated messages, 33 untranslated messages. +rm -f uz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uz.gmo uz.po +ur.po: 7 translated messages, 84 untranslated messages. +rm -f vi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o vi.gmo vi.po +ur_PK.po:7: warning: rm -f wa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o wa.gmo wa.po +header field 'Last-Translator' still has the initial default value +ur_PK.po: 0 translated messages, 91 untranslated messages. +uz.po: 26 translated messages, 65 untranslated messages. +rm -f xh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o xh.gmo xh.po +vi.po: 52 translated messages, 39 untranslated messages. +wa.po: 9 translated messages, 82 untranslated messages. +rm -f yi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yi.gmo yi.po +rm -f yo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yo.gmo yo.po +xh.po: 8 translated messages, 83 untranslated messages. +rm -f zh_CN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_CN.gmo zh_CN.po +yi.po:7: warning: header field 'Last-Translator' still has the initial default value +rm -f zh_HK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_HK.gmo zh_HK.po +yi.po: 0 translated messages, 91 untranslated messages. +yo.po: 5 translated messages, 86 untranslated messages. +rm -f zh_TW.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_TW.gmo zh_TW.po +zh_HK.po: 47 translated messages, 44 untranslated messages. +zh_CN.po: 63 translated messages, 28 untranslated messages. +rm -f zu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zu.gmo zu.po +zh_TW.po: 91 translated messages. +zu.po: 3 translated messages, 88 untranslated messages. +make[3]: Leaving directory '/rootdir/po' +touch stamp-po +make[2]: Leaving directory '/rootdir/po' +Making all in libcafekbd +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml + GEN cafekbd-indicator-marshal.h + GEN cafekbd-keyboard-drawing-marshal.h +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... +INFO: Reading ./cafekbd-indicator-marshal.list... + GEN cafekbd-indicator-marshal.c + GEN cafekbd-keyboard-drawing-marshal.c +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... +INFO: Reading ./cafekbd-indicator-marshal.list... +make all-am +make[3]: Entering directory '/rootdir/libcafekbd' + CC libcafekbd_la-cafekbd-desktop-config.lo + CC libcafekbd_la-cafekbd-keyboard-config.lo + CC libcafekbd_la-cafekbd-util.lo + CC libcafekbdui_la-cafekbd-indicator-config.lo + CC libcafekbdui_la-cafekbd-indicator.lo +cafekbd-desktop-config.c: In function 'cafekbd_desktop_config_load_from_gsettings': +cafekbd-desktop-config.c:176:38: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 176 | || config->default_group >= + | ^~ +cafekbd-indicator.c: In function 'cafekbd_indicator_extract_layout_name': +cafekbd-indicator.c:293:19: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 293 | if (group < g_strv_length (short_group_names)) { + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_prepare_drawing': +cafekbd-indicator.c:418:31: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 418 | if (group + 1 == + | ^~ +cafekbd-indicator.c: In function 'cafekbd_indicator_update_tooltips': +cafekbd-indicator.c:446:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 446 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-indicator.c:450:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 450 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-indicator.c: In function 'cafekbd_indicator_kbd_cfg_callback': +cafekbd-indicator.c:61:44: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 61 | CafekbdIndicator * gki = (CafekbdIndicator*)cur->data; + | ^~~ +cafekbd-indicator.c:561:9: note: in expansion of macro 'ForAllIndicators' + 561 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-indicator.c:539:55: note: shadowed declaration is here + 539 | cafekbd_indicator_kbd_cfg_callback (CafekbdIndicator *gki G_GNUC_UNUSED) +cafekbd-indicator.c: In function 'cafekbd_indicator_start_listen': +cafekbd-indicator.c:647:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 647 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:650:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 650 | (CdkFilterFunc) + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_stop_listen': +cafekbd-indicator.c:663:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 663 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:667:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 667 | (CdkFilterFunc) cafekbd_indicator_filter_x_evt, NULL); + | ^ +cafekbd-indicator-config.c: In function 'cafekbd_indicator_config_get_images_file': +cafekbd-indicator-config.c:152:59: warning: comparison of integer expressions of different signedness: 'guint' {aka 'unsigned int'} and 'int' [-Wsign-compare] + 152 | (g_strv_length (kbd_config->layouts_variants) > group)) { + | ^ + CC libcafekbdui_la-cafekbd-status.lo +cafekbd-status.c: In function 'cafekbd_status_render_cairo': +cafekbd-status.c:214:23: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 214 | if (group + 1 == xkl_engine_get_num_groups (globals.engine)) { + | ^~ +cafekbd-status.c: In function 'cafekbd_status_prepare_drawing': +cafekbd-status.c:376:51: warning: cast between incompatible function types from 'void (*)(void *)' to 'void (*)(guchar *, void *)' {aka 'void (*)(unsigned char *, void *)'} [-Wcast-function-type] + 376 | (GdkPixbufDestroyNotify) + | ^ +cafekbd-status.c: In function 'cafekbd_status_update_tooltips': +cafekbd-status.c:395:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 395 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-status.c:399:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 399 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-status.c: In function 'cafekbd_status_kbd_cfg_callback': +cafekbd-status.c:77:41: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 77 | CafekbdStatus * gki = (CafekbdStatus*)cur->data; + | ^~~ +cafekbd-status.c:508:9: note: in expansion of macro 'ForAllIndicators' + 508 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-status.c:484:49: note: shadowed declaration is here + 484 | cafekbd_status_kbd_cfg_callback (CafekbdStatus *gki G_GNUC_UNUSED) +cafekbd-status.c: In function 'cafekbd_status_start_listen': +cafekbd-status.c:594:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 594 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:597:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 597 | (CdkFilterFunc) cafekbd_status_filter_x_evt, + | ^ +cafekbd-status.c: In function 'cafekbd_status_stop_listen': +cafekbd-status.c:610:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 610 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:614:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 614 | (CdkFilterFunc) cafekbd_status_filter_x_evt, NULL); + | ^ + CC libcafekbdui_la-cafekbd-indicator-marshal.lo +cafekbd-indicator-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ + CC libcafekbdui_la-cafekbd-keyboard-drawing-marshal.lo +cafekbd-keyboard-drawing-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + CC libcafekbdui_la-cafekbd-keyboard-drawing.lo +cafekbd-keyboard-drawing.c: In function 'draw_polygon': +cafekbd-keyboard-drawing.c:322:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 322 | for (i = 0; i < num_points; i++) { + | ^ +cafekbd-keyboard-drawing.c: In function 'process_indicators_state_notify': +cafekbd-keyboard-drawing.c:2131:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'long unsigned int' [-Wsign-compare] + 2131 | for (i = 0; i <= drawing->xkb->indicators->phys_indicators; i++) + | ^~ +cafekbd-keyboard-drawing.c: In function 'cafekbd_keyboard_drawing_get_type': +cafekbd-keyboard-drawing.c:2394:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawingClass *)' {aka 'void (*)(struct _CafekbdKeyboardDrawingClass *)'} to 'void (*)(void *, void *)' [-Wcast-function-type] + 2394 | (GClassInitFunc) cafekbd_keyboard_drawing_class_init, + | ^ +cafekbd-keyboard-drawing.c:2399:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawing *)' {aka 'void (*)(struct _CafekbdKeyboardDrawing *)'} to 'void (*)(GTypeInstance *, void *)' {aka 'void (*)(struct _GTypeInstance *, void *)'} [-Wcast-function-type] + 2399 | (GInstanceInitFunc) cafekbd_keyboard_drawing_init, + | ^ + GEN org.cafe.peripherals-keyboard-xkb.gschema.valid + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:114:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 114 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbd.la + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspecthn0d3wzv/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspecthn0d3wzv/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspecthn0d3wzv/Cafekbd-1.0.c:239:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 239 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspecthn0d3wzv/Cafekbd-1.0.c:246:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 246 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspecthn0d3wzv/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +5 warnings generated. + GICOMP Cafekbd-1.0.gir +make[3]: Leaving directory '/rootdir/libcafekbd' +make[2]: Leaving directory '/rootdir/libcafekbd' +Making all in test +make[2]: Entering directory '/rootdir/test' + CC cafekbd_indicator_test-cafekbd-indicator-test.o + CC cafekbd_keyboard_drawing_test-cafekbd-keyboard-drawing-test.o + CC cafekbd_status_test-cafekbd-status-test.o + CCLD cafekbd-indicator-test + CCLD cafekbd-status-test +cafekbd-keyboard-drawing-test.c:187:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 187 | g_print ("kbdraw %s\n", VERSION); + | ^~~~~~~ +cafekbd-keyboard-drawing-test.c:194:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 194 | g_printerr ("--groups: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:199:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 199 | g_printerr ("--levels: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:225:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 225 | cafekbd_keyboard_drawing_set_track_modifiers + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:228:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 228 | cafekbd_keyboard_drawing_set_track_config + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:248:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 248 | names.keycodes = keycodes; + | ^~~~~~~~ +cafekbd-keyboard-drawing-test.c:256:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 256 | names.geometry = geometry; + | ^~~~~~~~ +7 warnings generated. + CCLD cafekbd-keyboard-drawing-test +make[2]: Leaving directory '/rootdir/test' +make[2]: Entering directory '/rootdir' +make[2]: Leaving directory '/rootdir' +make[1]: Leaving directory '/rootdir' +scan-build: Analysis run complete. +scan-build: 11 bugs found. +scan-build: Run 'scan-view /rootdir/html-report/2025-02-06-165351-14522-1' to examine bug reports. +Making check in po +make[1]: Entering directory '/rootdir/po' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/po' +Making check in libcafekbd +make[1]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +make check-am +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:113:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 113 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspect9cnfrk36/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspect9cnfrk36/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspect9cnfrk36/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +3 warnings generated. + GICOMP Cafekbd-1.0.gir +make[2]: Leaving directory '/rootdir/libcafekbd' +make[1]: Leaving directory '/rootdir/libcafekbd' +Making check in test +make[1]: Entering directory '/rootdir/test' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/test' +make[1]: Entering directory '/rootdir' +make[1]: Leaving directory '/rootdir' + Listing... 0% Listing... 0% Listing... 0% adduser/testing,now 3.137 all [installed,automatic] +advaita-icon-theme/unknown,now 3.25.0-1 all [installed,automatic] +apt/testing,now 2.9.26 amd64 [installed,automatic] +aptitude-common/testing,now 0.8.13-6.1 all [installed,automatic] +aptitude/testing,now 0.8.13-6.1 amd64 [installed] +at-spi2-common/testing,now 2.55.0.1-1 all [installed,automatic] +at-spi2-core/testing,now 2.55.0.1-1 amd64 [installed,automatic] +autoconf-archive/testing,now 20220903-3 all [installed] +autoconf/testing,now 2.72-3 all [installed,automatic] +automake/testing,now 1:1.17-3 all [installed,automatic] +autopoint/testing,now 0.23.1-1 all [installed] +autotools-dev/testing,now 20220109.1 all [installed,automatic] +base-files/testing,now 13.6 amd64 [installed,automatic] +base-passwd/testing,now 3.6.6 amd64 [installed,automatic] +bash/testing,now 5.2.37-1 amd64 [installed,automatic] +binfmt-support/testing,now 2.2.2-7 amd64 [installed,automatic] +binutils-common/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils-gold-x86-64-linux-gnu/testing,now 2.44-1 amd64 [installed,automatic] +binutils-gold/testing,now 2.44-1 amd64 [installed,automatic] +binutils-x86-64-linux-gnu/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +bsdutils/testing,now 1:2.40.4-2 amd64 [installed,automatic] +build-essential/testing,now 12.12 amd64 [installed,automatic] +bzip2-doc/testing,now 1.0.8-6 all [installed,automatic] +bzip2/testing,now 1.0.8-6 amd64 [installed,automatic] +ca-certificates/testing,now 20241223 all [installed,automatic] +clang-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools/testing,now 1:19.0-63 amd64 [installed] +clang/testing,now 1:19.0-63 amd64 [installed] +coreutils/testing,now 9.5-1+b1 amd64 [installed,automatic] +cpp-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-14/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cpp/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cppcheck/testing,now 2.16.0-1 amd64 [installed] +ctk-update-icon-cache/unknown,now 3.25.6-1 amd64 [installed,automatic] +dash/testing,now 0.5.12-12 amd64 [installed,automatic] +dbus-bin/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-daemon/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-session-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-system-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-user-session/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus/testing,now 1.16.0-1 amd64 [installed,automatic] +dconf-gsettings-backend/testing,now 0.40.0-5 amd64 [installed,automatic] +dconf-service/testing,now 0.40.0-5 amd64 [installed,automatic] +debconf/testing,now 1.5.89 all [installed,automatic] +debian-archive-keyring/testing,now 2023.4 all [installed,automatic] +debianutils/testing,now 5.21 amd64 [installed,automatic] +diffutils/testing,now 1:3.10-2 amd64 [installed,automatic] +dirmngr/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +dmsetup/testing,now 2:1.02.201-1 amd64 [installed,automatic] +dpkg-dev/testing,now 1.22.14 all [installed,automatic] +dpkg/testing,now 1.22.14 amd64 [installed,automatic] +e2fsprogs/testing,now 1.47.2-1 amd64 [installed,automatic] +expect/testing,now 5.45.4-3+b1 amd64 [installed] +fakeroot/testing,now 1.37-1 amd64 [installed,automatic] +file/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +findutils/testing,now 4.10.0-3 amd64 [installed,automatic] +fontconfig-config/testing,now 2.15.0-2 amd64 [installed,automatic] +fontconfig/testing,now 2.15.0-2 amd64 [installed,automatic] +fonts-dejavu-core/testing,now 2.37-8 all [installed,automatic] +fonts-dejavu-mono/testing,now 2.37-8 all [installed,automatic] +g++-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-14/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +g++/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc-14-base/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gettext-base/testing,now 0.23.1-1 amd64 [installed,automatic] +gettext/testing,now 0.23.1-1 amd64 [installed] +gir1.2-atk-1.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-atspi-2.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-ctk-3.0/unknown,now 3.25.6-1 amd64 [installed] +gir1.2-freedesktop-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-freedesktop/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-gdkpixbuf-2.0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +gir1.2-girepository-2.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-girepository-2.0/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-glib-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-glib-2.0/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-harfbuzz-0.0/testing,now 10.2.0-1 amd64 [installed,automatic] +gir1.2-pango-1.0/testing,now 1.56.1-1 amd64 [installed,automatic] +gir1.2-xkl-1.0/testing,now 5.4-5+b2 amd64 [installed,automatic] +girepository-tools/testing,now 2.82.4-2 amd64 [installed,automatic] +git-man/testing,now 1:2.47.2-0.1 all [installed,automatic] +git/testing,now 1:2.47.2-0.1 amd64 [installed] +gnupg-l10n/testing,now 2.2.46-1 all [installed,automatic] +gnupg-utils/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gnupg/testing,now 2.2.46-1 all [installed,automatic] +gobject-introspection-bin/testing,now 1.82.0-4 amd64 [installed,automatic] +gobject-introspection/testing,now 1.82.0-4 amd64 [installed] +gpg-agent/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg-wks-client/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgconf/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgsm/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgv/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +grep/testing,now 3.11-4 amd64 [installed,automatic] +gsettings-desktop-schemas/testing,now 47.1-1 all [installed,automatic] +gzip/testing,now 1.13-1 amd64 [installed,automatic] +hicolor-icon-theme/testing,now 0.18-2 all [installed,automatic] +hostname/testing,now 3.25 amd64 [installed,automatic] +icu-devtools/testing,now 72.1-6 amd64 [installed,automatic] +init-system-helpers/testing,now 1.68 all [installed,automatic] +krb5-locales/testing,now 1.21.3-4 all [installed,automatic] +less/testing,now 643-1 amd64 [installed,automatic] +lib32gcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +lib32stdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libacl1/testing,now 2.3.2-2+b1 amd64 [installed,automatic] +libalgorithm-diff-perl/testing,now 1.201-1 all [installed,automatic] +libalgorithm-diff-xs-perl/testing,now 0.04-8+b4 amd64 [installed,automatic] +libalgorithm-merge-perl/testing,now 0.08-5 all [installed,automatic] +libapparmor1/testing,now 3.1.7-1+b3 amd64 [installed,automatic] +libapt-pkg6.0t64/testing,now 2.9.26 amd64 [installed,automatic] +libasan8/testing,now 14.2.0-12 amd64 [installed,automatic] +libassuan9/testing,now 3.0.1-2 amd64 [installed,automatic] +libatk-bridge2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk-bridge2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatomic1/testing,now 14.2.0-12 amd64 [installed,automatic] +libatspi2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatspi2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libattr1/testing,now 1:2.5.2-2 amd64 [installed,automatic] +libaudit-common/testing,now 1:4.0.2-2 all [installed,automatic] +libaudit1/testing,now 1:4.0.2-2+b1 amd64 [installed,automatic] +libavahi-client3/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common-data/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common3/testing,now 0.8-16 amd64 [installed,automatic] +libbinutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libblkid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libblkid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libboost-iostreams1.83.0/testing,now 1.83.0-4 amd64 [installed,automatic] +libbrotli-dev/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbrotli1/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbsd0/testing,now 0.12.2-2 amd64 [installed,automatic] +libbz2-1.0/testing,now 1.0.8-6 amd64 [installed,automatic] +libbz2-dev/testing,now 1.0.8-6 amd64 [installed,automatic] +libc-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc-dev-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc6-dev/testing,now 2.40-6 amd64 [installed,automatic] +libc6-i386/testing,now 2.40-6 amd64 [installed,automatic] +libc6/testing,now 2.40-6 amd64 [installed,automatic] +libcairo-gobject2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo-script-interpreter2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2-dev/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcap-dev/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcap-ng0/testing,now 0.8.5-4 amd64 [installed,automatic] +libcap2/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcbor0.10/testing,now 0.10.2-2 amd64 [installed,automatic] +libcc1-0/testing,now 14.2.0-12 amd64 [installed,automatic] +libclang-common-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-cpp19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-rt-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang1-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libcolord2/testing,now 1.4.7-1+b2 amd64 [installed,automatic] +libcom-err2/testing,now 1.47.2-1 amd64 [installed,automatic] +libcrypt-dev/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcrypt1/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcryptsetup12/testing,now 2:2.7.5-1 amd64 [installed,automatic] +libctf-nobfd0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctf0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctk-3-0/unknown,now 3.25.6-1 amd64 [installed] +libctk-3-bin/unknown,now 3.25.6-1 amd64 [installed,automatic] +libctk-3-common/unknown,now 3.25.6-1 all [installed] +libctk-3-dev/unknown,now 3.25.6-1 amd64 [installed] +libcups2t64/testing,now 2.4.10-2+b1 amd64 [installed,automatic] +libcurl3t64-gnutls/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcurl4t64/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcwidget4/testing,now 0.5.18-6+b2 amd64 [installed,automatic] +libdatrie-dev/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdatrie1/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdav1d7/testing,now 1.5.1-1 amd64 [installed,automatic] +libdb5.3t64/testing,now 5.3.28+dfsg2-9 amd64 [installed,automatic] +libdbus-1-3/testing,now 1.16.0-1 amd64 [installed,automatic] +libdbus-1-dev/testing,now 1.16.0-1 amd64 [installed,automatic] +libdconf1/testing,now 0.40.0-5 amd64 [installed,automatic] +libdebconfclient0/testing,now 0.277 amd64 [installed,automatic] +libdeflate-dev/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdeflate0/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdevmapper1.02.1/testing,now 2:1.02.201-1 amd64 [installed,automatic] +libdpkg-perl/testing,now 1.22.14 all [installed,automatic] +libdrm-amdgpu1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-common/testing,now 2.4.123-1 all [installed,automatic] +libdrm-intel1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-radeon1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm2/testing,now 2.4.123-1 amd64 [installed,automatic] +libedit2/testing,now 3.1-20250104-1 amd64 [installed,automatic] +libegl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libegl-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1-mesa-dev/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libelf1t64/testing,now 0.192-4 amd64 [installed,automatic] +libepoxy-dev/testing,now 1.5.10-2 amd64 [installed,automatic] +libepoxy0/testing,now 1.5.10-2 amd64 [installed,automatic] +liberror-perl/testing,now 0.17029-2 all [installed,automatic] +libexpat1-dev/testing,now 2.6.4-1 amd64 [installed,automatic] +libexpat1/testing,now 2.6.4-1 amd64 [installed,automatic] +libext2fs2t64/testing,now 1.47.2-1 amd64 [installed,automatic] +libfakeroot/testing,now 1.37-1 amd64 [installed,automatic] +libffi-dev/testing,now 3.4.6-1 amd64 [installed,automatic] +libffi8/testing,now 3.4.6-1 amd64 [installed,automatic] +libfido2-1/testing,now 1.15.0-1+b1 amd64 [installed,automatic] +libfile-fcntllock-perl/testing,now 0.22-4+b4 amd64 [installed,automatic] +libfontconfig-dev/testing,now 2.15.0-2 amd64 [installed,automatic] +libfontconfig1/testing,now 2.15.0-2 amd64 [installed,automatic] +libfreetype-dev/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfreetype6/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfribidi-dev/testing,now 1.0.16-1 amd64 [installed,automatic] +libfribidi0/testing,now 1.0.16-1 amd64 [installed,automatic] +libgbm1/testing,now 24.2.8-1 amd64 [installed,automatic] +libgc1/testing,now 1:8.2.8-1 amd64 [installed,automatic] +libgcc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcrypt20/testing,now 1.11.0-7 amd64 [installed,automatic] +libgdbm-compat4t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdbm6t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-dev/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-bin/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-common/testing,now 2.42.12+dfsg-2 all [installed,automatic] +libgio-2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libgio-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository-1.0-1/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-1.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-2.0-0/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository1.0-dev/testing,now 1.82.0-4 amd64 [installed] +libgl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgl1-mesa-dri/testing,now 24.2.8-1 amd64 [installed,automatic] +libgl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglapi-mesa/testing,now 24.2.8-1 amd64 [installed,automatic] +libgles-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles2/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglib2.0-0t64/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-data/testing,now 2.82.4-2 all [installed,automatic] +libglib2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-dev/testing,now 2.82.4-2 amd64 [installed] +libglvnd-core-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libglx0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgmp10/testing,now 2:6.3.0+dfsg-3 amd64 [installed,automatic] +libgnutls30t64/testing,now 3.8.8-2 amd64 [installed,automatic] +libgomp1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgpg-error-l10n/testing,now 1.51-3 all [installed,automatic] +libgpg-error0/testing,now 1.51-3 amd64 [installed,automatic] +libgpm2/testing,now 1.20.7-11+b2 amd64 [installed,automatic] +libgprofng0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libgraphite2-3/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgraphite2-dev/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgssapi-krb5-2/testing,now 1.21.3-4 amd64 [installed,automatic] +libharfbuzz-cairo0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-dev/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-gobject0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-icu0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-subset0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz0b/testing,now 10.2.0-1 amd64 [installed,automatic] +libhogweed6t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libhwasan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libice-dev/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libice6/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libicu-dev/testing,now 72.1-6 amd64 [installed,automatic] +libicu72/testing,now 72.1-6 amd64 [installed,automatic] +libidn2-0/testing,now 2.3.7-2+b1 amd64 [installed,automatic] +libisl23/testing,now 0.27-1 amd64 [installed,automatic] +libitm1/testing,now 14.2.0-12 amd64 [installed,automatic] +libjansson4/testing,now 2.14-2+b3 amd64 [installed,automatic] +libjbig-dev/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjbig0/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjpeg-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjson-c5/testing,now 0.18+ds-1 amd64 [installed,automatic] +libk5crypto3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkeyutils1/testing,now 1.6.3-4 amd64 [installed,automatic] +libkmod2/testing,now 33+20240816-2 amd64 [installed,automatic] +libkrb5-3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkrb5support0/testing,now 1.21.3-4 amd64 [installed,automatic] +libksba8/testing,now 1.6.7-2+b1 amd64 [installed,automatic] +liblcms2-2/testing,now 2.16-2 amd64 [installed,automatic] +libldap-common/testing,now 2.6.9+dfsg-1 all [installed,automatic] +libldap2/testing,now 2.6.9+dfsg-1 amd64 [installed,automatic] +liblerc-dev/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +liblerc4/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +libllvm19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +liblocale-gettext-perl/testing,now 1.07-7+b1 amd64 [installed,automatic] +liblsan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libltdl-dev/testing,now 2.5.4-3 amd64 [installed,automatic] +libltdl7/testing,now 2.5.4-3 amd64 [installed,automatic] +liblz4-1/testing,now 1.10.0-3 amd64 [installed,automatic] +liblzma-dev/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzma5/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzo2-2/testing,now 2.10-3+b1 amd64 [installed,automatic] +libmagic-mgc/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmagic1t64/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmd0/testing,now 1.1.0-2+b1 amd64 [installed,automatic] +libmount-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libmount1/testing,now 2.40.4-2 amd64 [installed,automatic] +libmpc3/testing,now 1.3.1-1+b3 amd64 [installed,automatic] +libmpfr6/testing,now 4.2.1-1+b2 amd64 [installed,automatic] +libncurses-dev/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncurses6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncursesw6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libnettle8t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libnghttp2-14/testing,now 1.64.0-1 amd64 [installed,automatic] +libnghttp3-9/testing,now 1.6.0-2 amd64 [installed,automatic] +libngtcp2-16/testing,now 1.9.1-1 amd64 [installed,automatic] +libngtcp2-crypto-gnutls8/testing,now 1.9.1-1 amd64 [installed,automatic] +libnpth0t64/testing,now 1.8-2 amd64 [installed,automatic] +libnss-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libobjc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libobjc4/testing,now 14.2.0-12 amd64 [installed,automatic] +libopengl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libopengl0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libp11-kit0/testing,now 0.25.5-3 amd64 [installed,automatic] +libpam-modules-bin/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-modules/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-runtime/testing,now 1.7.0-2 all [installed,automatic] +libpam-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libpam0g/testing,now 1.7.0-2 amd64 [installed,automatic] +libpango-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpango1.0-dev/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangocairo-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoft2-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoxft-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpciaccess0/testing,now 0.17-3+b3 amd64 [installed,automatic] +libpcre2-16-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-32-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-8-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-dev/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-posix3/testing,now 10.44-5 amd64 [installed,automatic] +libperl5.40/testing,now 5.40.0-8 amd64 [installed,automatic] +libpfm4/testing,now 4.13.0+git83-g91970fe-1 amd64 [installed,automatic] +libpipeline1/testing,now 1.5.8-1 amd64 [installed,automatic] +libpixman-1-0/testing,now 0.44.0-3 amd64 [installed,automatic] +libpixman-1-dev/testing,now 0.44.0-3 amd64 [installed,automatic] +libpkgconf3/testing,now 1.8.1-4 amd64 [installed,automatic] +libpng-dev/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng-tools/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng16-16t64/testing,now 1.6.44-3 amd64 [installed,automatic] +libproc2-0/testing,now 2:4.0.4-7 amd64 [installed,automatic] +libpsl5t64/testing,now 0.21.2-1.1+b1 amd64 [installed,automatic] +libpython3-stdlib/testing,now 3.13.1-2 amd64 [installed,automatic] +libpython3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libpython3.13-stdlib/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libquadmath0/testing,now 14.2.0-12 amd64 [installed,automatic] +libreadline8t64/testing,now 8.2-6 amd64 [installed,automatic] +librsvg2-2/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librsvg2-common/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librtmp1/testing,now 2.4+20151223.gitfa8646d.1-2+b5 amd64 [installed,automatic] +libsasl2-2/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules-db/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libseccomp2/testing,now 2.5.5-2 amd64 [installed,automatic] +libselinux1-dev/testing,now 3.7-3.1 amd64 [installed,automatic] +libselinux1/testing,now 3.7-3.1 amd64 [installed,automatic] +libsemanage-common/testing,now 3.7-2.1 all [installed,automatic] +libsemanage2/testing,now 3.7-2.1 amd64 [installed,automatic] +libsensors-config/testing,now 1:3.6.0-10 all [installed,automatic] +libsensors5/testing,now 1:3.6.0-10+b1 amd64 [installed,automatic] +libsepol-dev/testing,now 3.7-1 amd64 [installed,automatic] +libsepol2/testing,now 3.7-1 amd64 [installed,automatic] +libsframe1/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libsharpyuv-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsharpyuv0/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsigc++-2.0-0v5/testing,now 2.12.1-3 amd64 [installed,automatic] +libsm-dev/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsm6/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsmartcols1/testing,now 2.40.4-2 amd64 [installed,automatic] +libsqlite3-0/testing,now 3.46.1-1 amd64 [installed,automatic] +libss2/testing,now 1.47.2-1 amd64 [installed,automatic] +libssh2-1t64/testing,now 1.11.1-1 amd64 [installed,automatic] +libssl3t64/testing,now 3.4.0-2 amd64 [installed,automatic] +libstdc++-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libstdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libsysprof-capture-4-dev/testing,now 47.2-1 amd64 [installed,automatic] +libsystemd-dev/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd-shared/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd0/testing,now 257.2-3 amd64 [installed,automatic] +libtasn1-6/testing,now 4.19.0-3+b3 amd64 [installed,automatic] +libtcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +libthai-data/testing,now 0.1.29-2 all [installed,automatic] +libthai-dev/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libthai0/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libtiff-dev/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiff6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiffxx6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtinfo6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libtinyxml2-10/testing,now 10.0.0+dfsg-2+b2 amd64 [installed,automatic] +libtool/testing,now 2.5.4-3 all [installed] +libtsan2/testing,now 14.2.0-12 amd64 [installed,automatic] +libubsan1/testing,now 14.2.0-12 amd64 [installed,automatic] +libudev1/testing,now 257.2-3 amd64 [installed,automatic] +libunistring5/testing,now 1.3-1 amd64 [installed,automatic] +libuuid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libvulkan1/testing,now 1.4.304.0-1 amd64 [installed,automatic] +libwayland-bin/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-client0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-cursor0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-dev/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-egl1/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-server0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwebp-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebp7/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdecoder3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdemux2/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpmux3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libx11-6/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-data/testing,now 2:1.8.10-2 all [installed,automatic] +libx11-dev/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-xcb1/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libxapian30/testing,now 1.4.25-2 amd64 [installed,automatic] +libxau-dev/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxau6/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxaw7/testing,now 2:1.0.16-1 amd64 [installed,automatic] +libxcb-dri2-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-dri3-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-glx0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-present0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-randr0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-sync1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-xfixes0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcomposite-dev/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcomposite1/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcursor-dev/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxcursor1/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxdamage-dev/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdamage1/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdmcp-dev/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxdmcp6/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxext-dev/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxext6/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxfixes-dev/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxfixes3/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxft-dev/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxft2/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxi-dev/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxi6/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxinerama-dev/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxinerama1/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxkbcommon-dev/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbcommon0/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbfile1/testing,now 1:1.1.0-1+b4 amd64 [installed,automatic] +libxklavier-dev/testing,now 5.4-5+b2 amd64 [installed] +libxklavier16/testing,now 5.4-5+b2 amd64 [installed,automatic] +libxml2-dev/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxml2-utils/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed] +libxml2/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxmu6/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxmuu1/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxpm4/testing,now 1:3.5.17-1+b3 amd64 [installed,automatic] +libxrandr-dev/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrandr2/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrender-dev/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxrender1/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxshmfence1/testing,now 1.3-1+b3 amd64 [installed,automatic] +libxt6t64/testing,now 1:1.2.1-1.2+b2 amd64 [installed,automatic] +libxtst-dev/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxtst6/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxxf86vm1/testing,now 1:1.1.4-1+b4 amd64 [installed,automatic] +libxxhash0/testing,now 0.8.2-2+b2 amd64 [installed,automatic] +libyaml-0-2/testing,now 0.2.5-2 amd64 [installed,automatic] +libz3-4/testing,now 4.13.3-1 amd64 [installed,automatic] +libz3-dev/testing,now 4.13.3-1 amd64 [installed,automatic] +libzstd-dev/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +libzstd1/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +linux-libc-dev/testing,now 6.12.11-1 all [installed,automatic] +linux-sysctl-defaults/testing,now 4.11 all [installed,automatic] +llvm-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-linker-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-runtime/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +login.defs/testing,now 1:4.16.0-7 all [installed,automatic] +login/testing,now 1:4.16.0-2+really2.40.4-2 amd64 [installed,automatic] +logsave/testing,now 1.47.2-1 amd64 [installed,automatic] +m4/testing,now 1.4.19-5 amd64 [installed,automatic] +make/testing,now 4.4.1-1 amd64 [installed] +manpages-dev/testing,now 6.9.1-1 all [installed,automatic] +manpages/testing,now 6.9.1-1 all [installed,automatic] +mawk/testing,now 1.3.4.20240905-1 amd64 [installed,automatic] +media-types/testing,now 10.1.0 all [installed,automatic] +mesa-libgallium/testing,now 24.2.8-1 amd64 [installed,automatic] +mesa-vulkan-drivers/testing,now 24.2.8-1 amd64 [installed,automatic] +mount/testing,now 2.40.4-2 amd64 [installed,automatic] +native-architecture/testing,now 0.2.5 all [installed,automatic] +ncurses-base/testing,now 6.5-2 all [installed,automatic] +ncurses-bin/testing,now 6.5-2+b1 amd64 [installed,automatic] +netbase/testing,now 6.4 all [installed,automatic] +openssh-client/testing,now 1:9.9p1-3 amd64 [installed,automatic] +openssl-provider-legacy/testing,now 3.4.0-2 amd64 [installed,automatic] +openssl/testing,now 3.4.0-2 amd64 [installed,automatic] +pango1.0-tools/testing,now 1.56.1-1 amd64 [installed,automatic] +passwd/testing,now 1:4.16.0-7 amd64 [installed,automatic] +patch/testing,now 2.7.6-7 amd64 [installed,automatic] +perl-base/testing,now 5.40.0-8 amd64 [installed,automatic] +perl-modules-5.40/testing,now 5.40.0-8 all [installed,automatic] +perl/testing,now 5.40.0-8 amd64 [installed,automatic] +pinentry-curses/testing,now 1.3.1-2 amd64 [installed,automatic] +pkgconf-bin/testing,now 1.8.1-4 amd64 [installed,automatic] +pkgconf/testing,now 1.8.1-4 amd64 [installed,automatic] +procps/testing,now 2:4.0.4-7 amd64 [installed,automatic] +psmisc/testing,now 23.7-1 amd64 [installed,automatic] +publicsuffix/testing,now 20250108.1153-0.1 all [installed,automatic] +python3-autocommand/testing,now 2.2.2-3 all [installed,automatic] +python3-inflect/testing,now 7.3.1-2 all [installed,automatic] +python3-jaraco.context/testing,now 6.0.0-1 all [installed,automatic] +python3-jaraco.functools/testing,now 4.1.0-1 all [installed,automatic] +python3-jaraco.text/testing,now 4.0.0-1 all [installed,automatic] +python3-mako/testing,now 1.3.8-2 all [installed,automatic] +python3-markdown/testing,now 3.7-2 all [installed,automatic] +python3-markupsafe/testing,now 2.1.5-1+b2 amd64 [installed,automatic] +python3-minimal/testing,now 3.13.1-2 amd64 [installed,automatic] +python3-more-itertools/testing,now 10.6.0-1 all [installed,automatic] +python3-packaging/testing,now 24.2-1 all [installed,automatic] +python3-pkg-resources/testing,now 75.6.0-1 all [installed,automatic] +python3-pygments/testing,now 2.18.0+dfsg-2 all [installed,automatic] +python3-setuptools/testing,now 75.6.0-1 all [installed,automatic] +python3-typeguard/testing,now 4.4.1-1 all [installed,automatic] +python3-typing-extensions/testing,now 4.12.2-2 all [installed,automatic] +python3-yaml/testing,now 6.0.2-1+b1 amd64 [installed,automatic] +python3-zipp/testing,now 3.21.0-1 all [installed,automatic] +python3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3.13/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3/testing,now 3.13.1-2 amd64 [installed,automatic] +readline-common/testing,now 8.2-6 all [installed,automatic] +rpcsvc-proto/testing,now 1.4.3-1 amd64 [installed,automatic] +sed/testing,now 4.9-2 amd64 [installed,automatic] +sensible-utils/testing,now 0.0.24 all [installed,automatic] +sgml-base/testing,now 1.31 all [installed,automatic] +shared-mime-info/testing,now 2.4-5+b2 amd64 [installed,automatic] +sqv/testing,now 1.2.1-5 amd64 [installed,automatic] +systemd-cryptsetup/testing,now 257.2-3 amd64 [installed,automatic] +systemd-sysv/testing,now 257.2-3 amd64 [installed,automatic] +systemd-timesyncd/testing,now 257.2-3 amd64 [installed,automatic] +systemd/testing,now 257.2-3 amd64 [installed,automatic] +sysvinit-utils/testing,now 3.13-1 amd64 [installed,automatic] +tar/testing,now 1.35+dfsg-3.1 amd64 [installed,automatic] +tcl-expect/testing,now 5.45.4-3+b1 amd64 [installed,automatic] +tcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +tzdata/testing,now 2024b-6 all [installed,automatic] +util-linux/testing,now 2.40.4-2 amd64 [installed,automatic] +uuid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +wayland-protocols/testing,now 1.39-1 all [installed,automatic] +wget/testing,now 1.24.5-2+b1 amd64 [installed] +x11-common/testing,now 1:7.7+24 all [installed,automatic] +x11-xkb-utils/testing,now 7.7+9 amd64 [installed,automatic] +x11proto-dev/testing,now 2024.1-1 all [installed,automatic] +xauth/testing,now 1:1.1.2-1.1 amd64 [installed,automatic] +xdg-user-dirs/testing,now 0.18-2 amd64 [installed,automatic] +xkb-data/testing,now 2.42-1 all [installed,automatic] +xml-core/testing,now 0.19 all [installed,automatic] +xorg-sgml-doctools/testing,now 1:1.11-1.1 all [installed,automatic] +xtrans-dev/testing,now 1.4.0-1 all [installed,automatic] +xz-utils/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +zlib1g-dev/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +zlib1g/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +Errors detected in the build 0 +Warnings detected in the logs 96 +cppcheck defects detected in the logs 28 +TOTAL warnings detected in the logs 124 diff --git a/2025-02-06-165351-14522-1@28c310f42d33_devel/report-37cb39.html b/2025-02-06-165351-14522-1@28c310f42d33_devel/report-37cb39.html new file mode 100644 index 0000000..be57de7 --- /dev/null +++ b/2025-02-06-165351-14522-1@28c310f42d33_devel/report-37cb39.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 248, column 21
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-165351-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"2.0.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
This statement is never executed
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-165351-14522-1@28c310f42d33_devel/report-523ef4.html b/2025-02-06-165351-14522-1@28c310f42d33_devel/report-523ef4.html new file mode 100644 index 0000000..4983170 --- /dev/null +++ b/2025-02-06-165351-14522-1@28c310f42d33_devel/report-523ef4.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 199, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-165351-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"2.0.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
This statement is never executed
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-165351-14522-1@28c310f42d33_devel/report-5ce420.html b/2025-02-06-165351-14522-1@28c310f42d33_devel/report-5ce420.html new file mode 100644 index 0000000..e65b430 --- /dev/null +++ b/2025-02-06-165351-14522-1@28c310f42d33_devel/report-5ce420.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 194, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-165351-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"2.0.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
This statement is never executed
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-165351-14522-1@28c310f42d33_devel/report-5d4bc8.html b/2025-02-06-165351-14522-1@28c310f42d33_devel/report-5d4bc8.html new file mode 100644 index 0000000..cca130e --- /dev/null +++ b/2025-02-06-165351-14522-1@28c310f42d33_devel/report-5d4bc8.html @@ -0,0 +1,1609 @@ + + + +/rootdir/libcafekbd/tmp-introspecthn0d3wzv/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspecthn0d3wzv/Cafekbd-1.0.c
Warning:line 89, column 13
File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/libxml2 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-165351-14522-1 -x c /rootdir/libcafekbd/tmp-introspecthn0d3wzv/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
14
Loop condition is true. Entering loop body
28
Loop condition is true. Entering loop body
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
15
Assuming this stream operation fails
29
File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior
90 if (ret
15.1
'ret' is equal to 0
== 0)
16
Taking true branch
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out
16.1
'len_out' is not equal to NULL
!= NULL((void*)0))
17
Taking true branch
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
6
Assuming 'args' is not equal to NULL
7
Taking false branch
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
8
Assuming 'self' is non-null
9
Taking false branch
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input
9.1
'input' is not equal to NULL
== NULL((void*)0))
10
Taking false branch
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output
10.1
'output' is not equal to NULL
== NULL((void*)0))
11
Taking false branch
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
12
Loop condition is true. Entering loop body
26
Loop condition is true. Entering loop body
702 {
703 gsize len;
704 char *line = read_line (input, &len);
13
Calling 'read_line'
18
Returning from 'read_line'
27
Calling 'read_line'
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
19
Assuming 'line' is not equal to NULL
20
Assuming the condition is false
21
Taking false branch
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
22
Assuming the condition is false
23
Taking false branch
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
24
Assuming the condition is false
25
Taking false branch
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
742
743 if (quark == 0)
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
1
Assuming 'argc' is equal to 2
2
'?' condition is false
3
Assuming the condition is false
4
Taking false branch
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
5
Calling 'dump_irepository'
811 {
812 g_printerr ("%s\n", error->message);
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-165351-14522-1@28c310f42d33_devel/report-891289.html b/2025-02-06-165351-14522-1@28c310f42d33_devel/report-891289.html new file mode 100644 index 0000000..ad52671 --- /dev/null +++ b/2025-02-06-165351-14522-1@28c310f42d33_devel/report-891289.html @@ -0,0 +1,1603 @@ + + + +/rootdir/libcafekbd/tmp-introspecthn0d3wzv/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspecthn0d3wzv/Cafekbd-1.0.c
Warning:line 812, column 27
Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error')
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/libxml2 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-165351-14522-1 -x c /rootdir/libcafekbd/tmp-introspecthn0d3wzv/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
90 if (ret == 0)
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out != NULL((void*)0))
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
21
Assuming the condition is false
22
Taking false branch
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
23
Returning without writing to '*error'
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
7
Assuming 'args' is not equal to NULL
8
Taking false branch
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
9
Assuming 'self' is non-null
10
Taking false branch
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input
10.1
'input' is not equal to NULL
== NULL((void*)0))
11
Taking false branch
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output
11.1
'output' is not equal to NULL
== NULL((void*)0))
12
Taking false branch
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
13
Loop condition is true. Entering loop body
702 {
703 gsize len;
704 char *line = read_line (input, &len);
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
14
Assuming 'line' is not equal to NULL
15
Assuming the condition is false
16
Taking false branch
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
17
Assuming the condition is false
18
Taking false branch
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
19
Taking true branch
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
20
Calling 'invoke_error_quark'
24
Returning from 'invoke_error_quark'
742
743 if (quark == 0)
25
Assuming 'quark' is equal to 0
26
Taking true branch
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
27
Returning without writing to '*error'
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
1
'error' initialized to a null pointer value
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
2
Assuming 'argc' is equal to 2
3
'?' condition is false
4
Assuming the condition is false
5
Taking false branch
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
6
Calling 'dump_irepository'
28
Returning from 'dump_irepository'
29
Taking true branch
811 {
812 g_printerr ("%s\n", error->message);
30
Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error')
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-165351-14522-1@28c310f42d33_devel/report-9361af.html b/2025-02-06-165351-14522-1@28c310f42d33_devel/report-9361af.html new file mode 100644 index 0000000..853678a --- /dev/null +++ b/2025-02-06-165351-14522-1@28c310f42d33_devel/report-9361af.html @@ -0,0 +1,1609 @@ + + + +/rootdir/libcafekbd/tmp-introspecthn0d3wzv/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspecthn0d3wzv/Cafekbd-1.0.c
Warning:line 89, column 13
Read function called when stream is in EOF state. Function has no effect
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/libxml2 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-165351-14522-1 -x c /rootdir/libcafekbd/tmp-introspecthn0d3wzv/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
14
Loop condition is true. Entering loop body
28
Loop condition is true. Entering loop body
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
15
Assuming stream reaches end-of-file here
29
Read function called when stream is in EOF state. Function has no effect
90 if (ret
15.1
'ret' is equal to 0
== 0)
16
Taking true branch
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out
16.1
'len_out' is not equal to NULL
!= NULL((void*)0))
17
Taking true branch
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
6
Assuming 'args' is not equal to NULL
7
Taking false branch
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
8
Assuming 'self' is non-null
9
Taking false branch
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input
9.1
'input' is not equal to NULL
== NULL((void*)0))
10
Taking false branch
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output
10.1
'output' is not equal to NULL
== NULL((void*)0))
11
Taking false branch
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
12
Loop condition is true. Entering loop body
26
Loop condition is true. Entering loop body
702 {
703 gsize len;
704 char *line = read_line (input, &len);
13
Calling 'read_line'
18
Returning from 'read_line'
27
Calling 'read_line'
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
19
Assuming 'line' is not equal to NULL
20
Assuming the condition is false
21
Taking false branch
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
22
Assuming the condition is false
23
Taking false branch
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
24
Assuming the condition is false
25
Taking false branch
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
742
743 if (quark == 0)
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
1
Assuming 'argc' is equal to 2
2
'?' condition is false
3
Assuming the condition is false
4
Taking false branch
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
5
Calling 'dump_irepository'
811 {
812 g_printerr ("%s\n", error->message);
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-165351-14522-1@28c310f42d33_devel/report-b4532a.html b/2025-02-06-165351-14522-1@28c310f42d33_devel/report-b4532a.html new file mode 100644 index 0000000..f17b2cf --- /dev/null +++ b/2025-02-06-165351-14522-1@28c310f42d33_devel/report-b4532a.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 228, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-165351-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"2.0.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
This statement is never executed
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-165351-14522-1@28c310f42d33_devel/report-c098bd.html b/2025-02-06-165351-14522-1@28c310f42d33_devel/report-c098bd.html new file mode 100644 index 0000000..1a08762 --- /dev/null +++ b/2025-02-06-165351-14522-1@28c310f42d33_devel/report-c098bd.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 187, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-165351-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"2.0.0");
This statement is never executed
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-165351-14522-1@28c310f42d33_devel/report-e0f2de.html b/2025-02-06-165351-14522-1@28c310f42d33_devel/report-e0f2de.html new file mode 100644 index 0000000..00ebabf --- /dev/null +++ b/2025-02-06-165351-14522-1@28c310f42d33_devel/report-e0f2de.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 225, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-165351-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"2.0.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
This statement is never executed
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-165351-14522-1@28c310f42d33_devel/report-fb6164.html b/2025-02-06-165351-14522-1@28c310f42d33_devel/report-fb6164.html new file mode 100644 index 0000000..de9979d --- /dev/null +++ b/2025-02-06-165351-14522-1@28c310f42d33_devel/report-fb6164.html @@ -0,0 +1,1504 @@ + + + +/rootdir/libcafekbd/tmp-introspecthn0d3wzv/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspecthn0d3wzv/Cafekbd-1.0.c
Warning:line 239, column 11
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/libxml2 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-165351-14522-1 -x c /rootdir/libcafekbd/tmp-introspecthn0d3wzv/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
90 if (ret == 0)
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out != NULL((void*)0))
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
This statement is never executed
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input == NULL((void*)0))
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output == NULL((void*)0))
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
702 {
703 gsize len;
704 char *line = read_line (input, &len);
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
742
743 if (quark == 0)
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
811 {
812 g_printerr ("%s\n", error->message);
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-165351-14522-1@28c310f42d33_devel/report-ff92e7.html b/2025-02-06-165351-14522-1@28c310f42d33_devel/report-ff92e7.html new file mode 100644 index 0000000..5cd20d3 --- /dev/null +++ b/2025-02-06-165351-14522-1@28c310f42d33_devel/report-ff92e7.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 256, column 21
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-165351-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"2.0.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
This statement is never executed
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-165351-14522-1@28c310f42d33_devel/scanview.css b/2025-02-06-165351-14522-1@28c310f42d33_devel/scanview.css new file mode 100644 index 0000000..cf8a5a6 --- /dev/null +++ b/2025-02-06-165351-14522-1@28c310f42d33_devel/scanview.css @@ -0,0 +1,62 @@ +body { color:#000000; background-color:#ffffff } +body { font-family: Helvetica, sans-serif; font-size:9pt } +h1 { font-size: 14pt; } +h2 { font-size: 12pt; } +table { font-size:9pt } +table { border-spacing: 0px; border: 1px solid black } +th, table thead { + background-color:#eee; color:#666666; + font-weight: bold; cursor: default; + text-align:center; + font-weight: bold; font-family: Verdana; + white-space:nowrap; +} +.W { font-size:0px } +th, td { padding:5px; padding-left:8px; text-align:left } +td.SUMM_DESC { padding-left:12px } +td.DESC { white-space:pre } +td.Q { text-align:right } +td { text-align:left } +tbody.scrollContent { overflow:auto } + +table.form_group { + background-color: #ccc; + border: 1px solid #333; + padding: 2px; +} + +table.form_inner_group { + background-color: #ccc; + border: 1px solid #333; + padding: 0px; +} + +table.form { + background-color: #999; + border: 1px solid #333; + padding: 2px; +} + +td.form_label { + text-align: right; + vertical-align: top; +} +/* For one line entires */ +td.form_clabel { + text-align: right; + vertical-align: center; +} +td.form_value { + text-align: left; + vertical-align: top; +} +td.form_submit { + text-align: right; + vertical-align: top; +} + +h1.SubmitFail { + color: #f00; +} +h1.SubmitOk { +} diff --git a/2025-02-06-165351-14522-1@28c310f42d33_devel/sorttable.js b/2025-02-06-165351-14522-1@28c310f42d33_devel/sorttable.js new file mode 100644 index 0000000..e608daa --- /dev/null +++ b/2025-02-06-165351-14522-1@28c310f42d33_devel/sorttable.js @@ -0,0 +1,512 @@ +/* + SortTable + version 2 + 7th April 2007 + Stuart Langridge, http://www.kryogenix.org/code/browser/sorttable/ + + Instructions: + Download this file + Add to your HTML + Add class="sortable" to any table you'd like to make sortable + Click on the headers to sort + + Thanks to many, many people for contributions and suggestions. + Licenced as X11: http://www.kryogenix.org/code/browser/licence.html + This basically means: do what you want with it. +*/ + + +var stIsIE = /*@cc_on!@*/false; + +sorttable = { + init: function() { + // quit if this function has already been called + if (arguments.callee.done) return; + // flag this function so we don't do the same thing twice + arguments.callee.done = true; + // kill the timer + if (_timer) clearInterval(_timer); + + if (!document.createElement || !document.getElementsByTagName) return; + + sorttable.DATE_RE = /^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/; + + forEach(document.getElementsByTagName('table'), function(table) { + if (table.className.search(/\bsortable\b/) != -1) { + sorttable.makeSortable(table); + } + }); + + }, + + makeSortable: function(table) { + if (table.getElementsByTagName('thead').length == 0) { + // table doesn't have a tHead. Since it should have, create one and + // put the first table row in it. + the = document.createElement('thead'); + the.appendChild(table.rows[0]); + table.insertBefore(the,table.firstChild); + } + // Safari doesn't support table.tHead, sigh + if (table.tHead == null) table.tHead = table.getElementsByTagName('thead')[0]; + + if (table.tHead.rows.length != 1) return; // can't cope with two header rows + + // Sorttable v1 put rows with a class of "sortbottom" at the bottom (as + // "total" rows, for example). This is B&R, since what you're supposed + // to do is put them in a tfoot. So, if there are sortbottom rows, + // for backward compatibility, move them to tfoot (creating it if needed). + sortbottomrows = []; + for (var i=0; i5' : ' ▴'; + this.appendChild(sortrevind); + return; + } + if (this.className.search(/\bsorttable_sorted_reverse\b/) != -1) { + // if we're already sorted by this column in reverse, just + // re-reverse the table, which is quicker + sorttable.reverse(this.sorttable_tbody); + this.className = this.className.replace('sorttable_sorted_reverse', + 'sorttable_sorted'); + this.removeChild(document.getElementById('sorttable_sortrevind')); + sortfwdind = document.createElement('span'); + sortfwdind.id = "sorttable_sortfwdind"; + sortfwdind.innerHTML = stIsIE ? ' 6' : ' ▾'; + this.appendChild(sortfwdind); + return; + } + + // remove sorttable_sorted classes + theadrow = this.parentNode; + forEach(theadrow.childNodes, function(cell) { + if (cell.nodeType == 1) { // an element + cell.className = cell.className.replace('sorttable_sorted_reverse',''); + cell.className = cell.className.replace('sorttable_sorted',''); + } + }); + sortfwdind = document.getElementById('sorttable_sortfwdind'); + if (sortfwdind) { sortfwdind.parentNode.removeChild(sortfwdind); } + sortrevind = document.getElementById('sorttable_sortrevind'); + if (sortrevind) { sortrevind.parentNode.removeChild(sortrevind); } + + this.className += ' sorttable_sorted'; + sortfwdind = document.createElement('span'); + sortfwdind.id = "sorttable_sortfwdind"; + sortfwdind.innerHTML = stIsIE ? ' 6' : ' ▾'; + this.appendChild(sortfwdind); + + // build an array to sort. This is a Schwartzian transform thing, + // i.e., we "decorate" each row with the actual sort key, + // sort based on the sort keys, and then put the rows back in order + // which is a lot faster because you only do getInnerText once per row + row_array = []; + col = this.sorttable_columnindex; + rows = this.sorttable_tbody.rows; + for (var j=0; j 12) { + // definitely dd/mm + return sorttable.sort_ddmm; + } else if (second > 12) { + return sorttable.sort_mmdd; + } else { + // looks like a date, but we can't tell which, so assume + // that it's dd/mm (English imperialism!) and keep looking + sortfn = sorttable.sort_ddmm; + } + } + } + } + return sortfn; + }, + + getInnerText: function(node) { + // gets the text we want to use for sorting for a cell. + // strips leading and trailing whitespace. + // this is *not* a generic getInnerText function; it's special to sorttable. + // for example, you can override the cell text with a customkey attribute. + // it also gets .value for fields. + + hasInputs = (typeof node.getElementsByTagName == 'function') && + node.getElementsByTagName('input').length; + + if (node.getAttribute("sorttable_customkey") != null) { + return node.getAttribute("sorttable_customkey"); + } + else if (typeof node.textContent != 'undefined' && !hasInputs) { + return node.textContent.replace(/^\s+|\s+$/g, ''); + } + else if (typeof node.innerText != 'undefined' && !hasInputs) { + return node.innerText.replace(/^\s+|\s+$/g, ''); + } + else if (typeof node.text != 'undefined' && !hasInputs) { + return node.text.replace(/^\s+|\s+$/g, ''); + } + else { + switch (node.nodeType) { + case 3: + if (node.nodeName.toLowerCase() == 'input') { + return node.value.replace(/^\s+|\s+$/g, ''); + } + case 4: + return node.nodeValue.replace(/^\s+|\s+$/g, ''); + break; + case 1: + case 11: + var innerText = ''; + for (var i = 0; i < node.childNodes.length; i++) { + innerText += sorttable.getInnerText(node.childNodes[i]); + } + return innerText.replace(/^\s+|\s+$/g, ''); + break; + default: + return ''; + } + } + }, + + reverse: function(tbody) { + // reverse the rows in a tbody + newrows = []; + for (var i=0; i=0; i--) { + tbody.appendChild(newrows[i]); + } + delete newrows; + }, + + /* sort functions + each sort function takes two parameters, a and b + you are comparing a[0] and b[0] */ + sort_numeric: function(a,b) { + aa = parseFloat(a[0].replace(/[^0-9.-]/g,'')); + if (isNaN(aa)) aa = 0; + bb = parseFloat(b[0].replace(/[^0-9.-]/g,'')); + if (isNaN(bb)) bb = 0; + return aa-bb; + }, + sort_alpha: function(a,b) { + if (a[0]==b[0]) return 0; + if (a[0] 0 ) { + var q = list[i]; list[i] = list[i+1]; list[i+1] = q; + swap = true; + } + } // for + t--; + + if (!swap) break; + + for(var i = t; i > b; --i) { + if ( comp_func(list[i], list[i-1]) < 0 ) { + var q = list[i]; list[i] = list[i-1]; list[i-1] = q; + swap = true; + } + } // for + b++; + + } // while(swap) + } +} + +/* ****************************************************************** + Supporting functions: bundled here to avoid depending on a library + ****************************************************************** */ + +// Dean Edwards/Matthias Miller/John Resig + +/* for Mozilla/Opera9 */ +if (document.addEventListener) { + document.addEventListener("DOMContentLoaded", sorttable.init, false); +} + +/* for Internet Explorer */ +/*@cc_on @*/ +/*@if (@_win32) + document.write(" + + + + +

libcafekbd (clang-tools 1:19.0-63) - scan-build results

+ + + + + + + +
User:root@d2dbe33e5459
Working Directory:/rootdir
Command Line:make -j 5
Clang Version:Debian clang version 19.1.6 (1+b1) +
Date:Thu Feb 6 16:54:20 2025
+

Bug Summary

+ + + + + + + + + +
Bug TypeQuantityDisplay?
All Bugs11
Logic error
Dereference of null pointer1
Stream handling error
Invalid stream state1
Stream already in EOF1
Unused code
Unreachable code8
+ +

Filter Results by File

+ + +

Reports

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Bug GroupBug Type ▾FileFunction/MethodLinePath Length
Logic errorDereference of null pointerlibcafekbd/tmp-introspectq8aoqnje/Cafekbd-1.0.cmain81232View Report
Stream handling errorInvalid stream statelibcafekbd/tmp-introspectq8aoqnje/Cafekbd-1.0.cread_line8933View Report
Stream handling errorStream already in EOFlibcafekbd/tmp-introspectq8aoqnje/Cafekbd-1.0.cread_line8933View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2481View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain1991View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain1941View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2281View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain1871View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2251View Report
Unused codeUnreachable codelibcafekbd/tmp-introspectq8aoqnje/Cafekbd-1.0.cvalue_to_string2391View Report
Unused codeUnreachable codetest/cafekbd-keyboard-drawing-test.cmain2561View Report
+ + diff --git a/2025-02-06-165420-14522-1@28c310f42d33_master/output_28c310f42d337eadca7386aeed5be91417c339a2 b/2025-02-06-165420-14522-1@28c310f42d33_master/output_28c310f42d337eadca7386aeed5be91417c339a2 new file mode 100644 index 0000000..8079998 --- /dev/null +++ b/2025-02-06-165420-14522-1@28c310f42d33_master/output_28c310f42d337eadca7386aeed5be91417c339a2 @@ -0,0 +1,1866 @@ +Checking libcafekbd/cafekbd-desktop-config.c ... +libcafekbd/cafekbd-desktop-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +1/10 files checked 4% done +Checking libcafekbd/cafekbd-indicator-config.c ... +libcafekbd/cafekbd-indicator-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +2/10 files checked 10% done +Checking libcafekbd/cafekbd-indicator.c ... +libcafekbd/cafekbd-indicator.c:66:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdIndicator, cafekbd_indicator, CTK_TYPE_NOTEBOOK) +^ +3/10 files checked 24% done +Checking libcafekbd/cafekbd-keyboard-config.c ... +libcafekbd/cafekbd-keyboard-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-config.c:67:8: style: Condition '*l1' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:67:15: style: Condition '*l2' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:227:16: style: Condition 'option!=NULL' is always true [knownConditionTrueFalse] + (option != NULL) ? strchr (option, ':') : NULL; + ^ +libcafekbd/cafekbd-keyboard-config.c:282:18: style: Condition 'variant==NULL' is always false [knownConditionTrueFalse] + (variant == + ^ +libcafekbd/cafekbd-keyboard-config.c:226:10: style: Variable 'delim' can be declared as pointer to const [constVariablePointer] + char *delim = + ^ +libcafekbd/cafekbd-keyboard-config.c:609:65: style: Parameter 'kbd_config' can be declared as pointer to const [constParameterPointer] +cafekbd_keyboard_config_options_is_set (CafekbdKeyboardConfig * kbd_config, + ^ +4/10 files checked 36% done +Checking libcafekbd/cafekbd-keyboard-drawing.c ... +libcafekbd/cafekbd-keyboard-drawing.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-drawing.c:61:60: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_coord (CafekbdKeyboardDrawingRenderContext * context, gint n) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:67:61: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_double (CafekbdKeyboardDrawingRenderContext * context, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:625:51: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +set_markup (CafekbdKeyboardDrawingRenderContext * context, gchar *txt) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1026:11: style: Variable 'runp' can be declared as pointer to const [constVariablePointer] + GSList *runp; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1036:25: style: Variable 'geometry' can be declared as pointer to const [constVariablePointer] + PangoGlyphGeometry *geometry; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1202:39: style: Parameter 'outline' can be declared as pointer to const [constParameterPointer] +calc_origin_offset_x (XkbOutlineRec * outline) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1397:15: style: Variable 'shape' can be declared as pointer to const [constVariablePointer] + XkbShapeRec *shape; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: style: Parameter 'drawing' can be declared as pointer to const. However it seems that 'button_press_event' is a callback function, if 'drawing' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2343:18: note: You might need to cast the function pointer here + G_CALLBACK (button_press_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: note: Parameter 'drawing' can be declared as pointer to const + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: style: Parameter 'event' can be declared as pointer to const. However it seems that 'focus_event' is a callback function, if 'event' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2347:18: note: You might need to cast the function pointer here + G_CALLBACK (focus_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: note: Parameter 'event' can be declared as pointer to const + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: style: Parameter 'a' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'a' is declared with const you might also need to cast function pointer(s). [constParameterCallback] +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: note: Parameter 'a' can be declared as pointer to const +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: style: Parameter 'b' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'b' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: note: Parameter 'b' can be declared as pointer to const + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1863:9: style: Variable 'pind' can be declared as pointer to const [constVariablePointer] + Atom *pind = drawing->xkb->names->indicators; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2124:60: style: Parameter 'iev' can be declared as pointer to const [constParameterPointer] +process_indicators_state_notify (XkbIndicatorNotifyEvent * iev, + ^ +Checking libcafekbd/cafekbd-keyboard-drawing.c: KBDRAW_DEBUG... +5/10 files checked 77% done +Checking libcafekbd/cafekbd-status.c ... +libcafekbd/cafekbd-status.c:82:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdStatus, cafekbd_status, CTK_TYPE_STATUS_ICON) +^ +6/10 files checked 91% done +Checking libcafekbd/cafekbd-util.c ... +7/10 files checked 93% done +Checking test/cafekbd-indicator-test.c ... +8/10 files checked 94% done +Checking test/cafekbd-keyboard-drawing-test.c ... +test/cafekbd-keyboard-drawing-test.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +Checking test/cafekbd-keyboard-drawing-test.c: HAVE_CONFIG_H... +9/10 files checked 99% done +Checking test/cafekbd-status-test.c ... +test/cafekbd-status-test.c:42:17: style: Variable 'icon' can be declared as pointer to const [constVariablePointer] + CtkStatusIcon *icon; + ^ +10/10 files checked 100% done +nofile:0:0: information: Active checkers: There was critical errors (use --checkers-report= to see details) [checkersReport] + +/usr/bin/cafe-autogen +checking for autoreconf >= 2.53... + testing autoreconf... found 2.72 +checking for pkg-config >= 0.14.0... + testing pkg-config... found 1.8.1 +checking for cafe-common >= 0.0.1... + testing cafe-doc-common... found 2.0.0 +Checking for required M4 macros... +Checking for forbidden M4 macros... +Processing ./configure.ac +Running cafe-doc-common... +Running autoreconf... +autoreconf: export WARNINGS=no-portability +autoreconf: Entering directory '.' +autoreconf: running: autopoint --force +Copying file ABOUT-NLS +Copying file config.rpath +Copying file m4/codeset.m4 +Copying file m4/extern-inline.m4 +Copying file m4/fcntl-o.m4 +Copying file m4/gettext.m4 +Copying file m4/glibc2.m4 +Copying file m4/glibc21.m4 +Copying file m4/iconv.m4 +Copying file m4/intdiv0.m4 +Copying file m4/intl.m4 +Copying file m4/intldir.m4 +Copying file m4/intlmacosx.m4 +Copying file m4/intmax.m4 +Copying file m4/inttypes-pri.m4 +Copying file m4/inttypes_h.m4 +Copying file m4/lcmessage.m4 +Copying file m4/lib-ld.m4 +Copying file m4/lib-link.m4 +Copying file m4/lib-prefix.m4 +Copying file m4/lock.m4 +Copying file m4/longlong.m4 +Copying file m4/nls.m4 +Copying file m4/po.m4 +Copying file m4/printf-posix.m4 +Copying file m4/progtest.m4 +Copying file m4/size_max.m4 +Copying file m4/stdint_h.m4 +Copying file m4/threadlib.m4 +Copying file m4/uintmax_t.m4 +Copying file m4/visibility.m4 +Copying file m4/wchar_t.m4 +Copying file m4/wint_t.m4 +Copying file m4/xsize.m4 +Copying file po/Makefile.in.in +Copying file po/Makevars.template +Copying file po/Rules-quot +Copying file po/boldquot.sed +Copying file po/en@boldquot.header +Copying file po/en@quot.header +Copying file po/insert-header.sin +Copying file po/quot.sed +Copying file po/remove-potcdate.sin +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: configure.ac: tracing +autoreconf: running: libtoolize --copy --force +libtoolize: putting auxiliary files in '.'. +libtoolize: copying file './ltmain.sh' +libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. +libtoolize: copying file 'm4/libtool.m4' +libtoolize: copying file 'm4/ltoptions.m4' +libtoolize: copying file 'm4/ltsugar.m4' +libtoolize: copying file 'm4/ltversion.m4' +libtoolize: copying file 'm4/lt~obsolete.m4' +autoreconf: configure.ac: not using Intltool +autoreconf: configure.ac: not using Gtkdoc +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: running: /usr/bin/autoconf --force +autoreconf: running: /usr/bin/autoheader --force +autoreconf: running: automake --add-missing --copy --force-missing +configure.ac:31: installing './compile' +configure.ac:34: installing './config.guess' +configure.ac:34: installing './config.sub' +configure.ac:16: installing './install-sh' +configure.ac:16: installing './missing' +Makefile.am: installing './INSTALL' +libcafekbd/Makefile.am: installing './depcomp' +autoreconf: Leaving directory '.' +Skipping configure process. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +checking for a BSD-compatible install... /usr/bin/install -c +checking whether sleep supports fractional seconds... yes +checking filesystem timestamp resolution... 0.01 +checking whether build environment is sane... yes +checking for a race-free mkdir -p... /usr/bin/mkdir -p +checking for gawk... no +checking for mawk... mawk +checking whether make sets $(MAKE)... yes +checking whether make supports nested variables... yes +checking xargs -n works... yes +checking whether make supports the include directive... yes (GNU style) +checking for gcc... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the C compiler works... yes +checking for C compiler default output file name... a.out +checking for suffix of executables... +checking whether we are cross compiling... no +checking for suffix of object files... o +checking whether the compiler supports GNU C... yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... rm: cannot remove 'conftest.plist': Is a directory +yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... gcc3 +checking whether C compiler accepts -Werror=unknown-warning-option... no +checking whether C compiler accepts -Wall... yes +checking whether C compiler accepts -Wmissing-prototypes... yes +checking whether C compiler accepts -Wbad-function-cast... yes +checking whether C compiler accepts -Wcast-align... yes +checking whether C compiler accepts -Wextra... yes +checking whether C compiler accepts -Wformat-nonliteral... yes +checking whether C compiler accepts -Wmissing-declarations... yes +checking whether C compiler accepts -Wnested-externs... yes +checking whether C compiler accepts -Wpointer-arith... yes +checking whether C compiler accepts -Wredundant-decls... yes +checking whether C compiler accepts -Wshadow... yes +checking whether C compiler accepts -Wstrict-prototypes... yes +checking whether C compiler accepts -Wunused-macros... yes +checking whether C compiler accepts -Werror=format-security... yes +checking whether C compiler accepts -fstrict-aliasing... yes +checking flags to pass to the C compiler /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing +checking for gcc... (cached) /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the compiler supports GNU C... (cached) yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... (cached) yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... (cached) none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... (cached) yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... (cached) gcc3 +checking build system type... x86_64-pc-linux-gnu +checking host system type... x86_64-pc-linux-gnu +checking how to print strings... printf +checking for a sed that does not truncate output... /usr/bin/sed +checking for grep that handles long lines and -e... /usr/bin/grep +checking for egrep... /usr/bin/grep -E +checking for fgrep... /usr/bin/grep -F +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld +checking if the linker (/usr/bin/ld) is GNU ld... yes +checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B +checking the name lister (/usr/bin/nm -B) interface... rm: cannot remove 'conftest.plist': Is a directory +BSD nm +checking whether ln -s works... yes +checking the maximum length of command line arguments... 3145728 +checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop +checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop +checking for /usr/bin/ld option to reload object files... -r +checking for file... file +checking for objdump... objdump +checking how to recognize dependent libraries... pass_all +checking for dlltool... no +checking how to associate runtime and link libraries... printf %s\n +checking for ranlib... ranlib +checking for ar... ar +checking for archiver @FILE support... rm: cannot remove 'conftest.plist': Is a directory +@ +checking for strip... strip +checking command to parse /usr/bin/nm -B output from /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer object... rm: cannot remove 'conftest.plist': Is a directory +ok +checking for sysroot... no +checking for a working dd... /usr/bin/dd +checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1 +checking for mt... no +checking if : is a manifest tool... no +checking for stdio.h... yes +checking for stdlib.h... yes +checking for string.h... yes +checking for inttypes.h... yes +checking for stdint.h... yes +checking for strings.h... yes +checking for sys/stat.h... yes +checking for sys/types.h... yes +checking for unistd.h... yes +checking for dlfcn.h... yes +checking for objdir... .libs +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -fno-rtti -fno-exceptions... no +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to produce PIC... -fPIC -DPIC +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer PIC flag -fPIC -DPIC works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer static flag -static works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... (cached) yes +checking whether the /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes +checking whether -lc should be explicitly linked in... no +checking dynamic linker characteristics... GNU/Linux ld.so +checking how to hardcode library paths into programs... immediate +checking whether stripping libraries is possible... yes +checking if libtool supports shared libraries... yes +checking whether to build shared libraries... yes +checking whether to build static libraries... yes +checking whether NLS is requested... yes +checking for msgfmt... /usr/bin/msgfmt +checking for gmsgfmt... /usr/bin/msgfmt +checking for xgettext... /usr/bin/xgettext +checking for msgmerge... /usr/bin/msgmerge +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld -m elf_x86_64 +checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes +checking for shared library run path origin... done +checking how to run the C preprocessor... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer -E +checking for egrep -e... (cached) /usr/bin/grep -E +checking for CFPreferencesCopyAppValue... no +checking for CFLocaleCopyCurrent... no +checking for GNU gettext in libc... yes +checking whether to use NLS... yes +checking where the gettext function comes from... libc +checking for glib-compile-resources... /usr/bin/glib-compile-resources +checking for xmllint... /usr/bin/xmllint +checking for setlocale... yes +checking for pkg-config... /usr/bin/pkg-config +checking pkg-config is at least version 0.9.0... yes +checking for glib-2.0 >= 2.50.0... yes +checking for gmodule-2.0... yes +checking for gio-2.0 >= 2.25.0... yes +checking for cdk-3.0 >= 3.22.0... yes +checking for ctk+-3.0 >= 3.22.0 cdk-x11-3.0 >= 3.22.0... yes +checking for libxklavier >= 5.2... yes +checking for X... libraries , headers +checking for gethostbyname... yes +checking for connect... yes +checking for remove... yes +checking for shmat... yes +checking for IceConnectionNumber in -lICE... yes +checking for pkg-config... (cached) /usr/bin/pkg-config +checking pkg-config is at least version 0.16... yes +checking for library containing sqrt... -lm +checking for gobject-introspection... yes +checking that generated files are newer than configure... done +configure: creating ./config.status +config.status: creating Makefile +config.status: creating libcafekbd.pc +config.status: creating libcafekbdui.pc +config.status: creating po/Makefile.in +config.status: creating libcafekbd/Makefile +config.status: creating libcafekbd/org.cafe.peripherals-keyboard-xkb.gschema.xml +config.status: creating test/Makefile +config.status: creating config.h +config.status: executing depfiles commands +config.status: executing libtool commands +config.status: executing po-directories commands +config.status: creating po/POTFILES +config.status: creating po/Makefile + +Configuration: + + prefix: /usr + exec_prefix: ${prefix} + libdir: ${exec_prefix}/lib + bindir: ${exec_prefix}/bin + sbindir: ${exec_prefix}/sbin + sysconfdir: ${prefix}/etc + datadir: ${datarootdir} + source code location: . + compiler: /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer + cflags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + Warning flags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + +scan-build: Analysis run complete. +scan-build: Removing directory '/tmp/scan-build-2025-02-06-165410-11857-1' because it contains no reports. +scan-build: No bugs found. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +make all-recursive +make[1]: Entering directory '/rootdir' +Making all in po +make[2]: Entering directory '/rootdir/po' +make libcafekbd.pot-update +make[3]: Entering directory '/rootdir/po' +sed -e '/^#/d' remove-potcdate.sin > t-remove-potcdate.sed +mv t-remove-potcdate.sed remove-potcdate.sed +package_gnu=""; \ +test -n "$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L .. -maxdepth 1 -type f \ + -size -10000000c -exec grep 'GNU libcafekbd' \ + /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU libcafekbd' ../* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ +}; \ +if test "$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ +else \ + package_prefix=''; \ +fi; \ +if test -n '' || test 'https://github.com/cafe-desktop/libcafekbd' = '@'PACKAGE_BUGREPORT'@'; then \ + msgid_bugs_address=''; \ +else \ + msgid_bugs_address='https://github.com/cafe-desktop/libcafekbd'; \ +fi; \ +case `/usr/bin/xgettext --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ + *) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --package-name="${package_prefix}libcafekbd" \ + --package-version='2.0.0' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ +esac +test ! -f libcafekbd.po || { \ + if test -f ./libcafekbd.pot-header; then \ + sed -e '1,/^#$/d' < libcafekbd.po > libcafekbd.1po && \ + cat ./libcafekbd.pot-header libcafekbd.1po > libcafekbd.po; \ + rm -f libcafekbd.1po; \ + fi; \ + if test -f ./libcafekbd.pot; then \ + sed -f remove-potcdate.sed < ./libcafekbd.pot > libcafekbd.1po && \ + sed -f remove-potcdate.sed < libcafekbd.po > libcafekbd.2po && \ + if cmp libcafekbd.1po libcafekbd.2po >/dev/null 2>&1; then \ + rm -f libcafekbd.1po libcafekbd.2po libcafekbd.po; \ + else \ + rm -f libcafekbd.1po libcafekbd.2po ./libcafekbd.pot && \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ + else \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ +} +make[3]: Leaving directory '/rootdir/po' +test ! -f ./libcafekbd.pot || \ + test -z "af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo" || make af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo +make[3]: Entering directory '/rootdir/po' +/usr/bin/msgmerge --update --quiet --lang=am am.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=af af.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=an an.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=as as.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ar ar.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ast ast.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=az az.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bg bg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=be be.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn bn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=br br.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bs bs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn_IN bn_IN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca ca.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca@valencia ca@valencia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cmn cmn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=crh crh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cs cs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=csb csb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cv cv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cy cy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=da da.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de_CH de_CH.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de de.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=dz dz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=el el.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_AU en_AU.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_CA en_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_GB en_GB.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eo eo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es es.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_419 es_419.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_AR es_AR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CL es_CL.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CO es_CO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CR es_CR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_DO es_DO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_EC es_EC.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_ES es_ES.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_MX es_MX.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_NI es_NI.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PA es_PA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PE es_PE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PR es_PR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_SV es_SV.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_US es_US.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_UY es_UY.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_VE es_VE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eu eu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=et et.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fa fa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fi fi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fil fil.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fo fo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr fr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr_CA fr_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=frp frp.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fur fur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fy fy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ga ga.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gd gd.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gl gl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gu gu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ha ha.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=he he.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hi hi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hr hr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hu hu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hy hy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ia ia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=id id.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ie ie.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ig ig.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=is is.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=it it.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=jv jv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ja ja.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ka ka.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kab kab.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kn kn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kk kk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ko ko.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=km km.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ks ks.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ky ky.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku ku.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=la la.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku_IQ ku_IQ.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lb lb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=li li.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lo lo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lt lt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lv lv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mai mai.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mg mg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mi mi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mk mk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ml ml.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mn mn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mr mr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ms ms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=my my.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nah nah.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nb nb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nds nds.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ne ne.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nl nl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nn nn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nqo nqo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nso nso.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=oc oc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=or or.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=om om.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pa pa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pl pl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pms pms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ps ps.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt pt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt_BR pt_BR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ro ro.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ru ru.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sc sc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sco sco.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=rw rw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=si si.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sk sk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sl sl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sq sq.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=so so.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr sr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sv sv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr@latin sr@latin.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sw sw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=te te.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ta ta.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=th th.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tg tg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tk tk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tl tl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tr tr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ts ts.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tt tt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ug ug.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uk uk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur ur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur_PK ur_PK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uz uz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=vi vi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=xh xh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yo yo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yi yi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=wa wa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_CN zh_CN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_HK zh_HK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_TW zh_TW.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zu zu.po libcafekbd.pot +rm -f af.gmo && /usr/bin/msgfmt -c --statistics --verbose -o af.gmo af.po +af.po: 7 translated messages, 84 untranslated messages. +rm -f am.gmo && /usr/bin/msgfmt -c --statistics --verbose -o am.gmo am.po +rm -f an.gmo && /usr/bin/msgfmt -c --statistics --verbose -o an.gmo an.po +rm -f as.gmo && /usr/bin/msgfmt -c --statistics --verbose -o as.gmo as.po +am.po: 54 translated messages, 37 untranslated messages. +rm -f ar.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ar.gmo ar.po +an.po:7: warning: header field 'Last-Translator' still has the initial default value +an.po: 0 translated messages, 91 untranslated messages. +rm -f az.gmo && /usr/bin/msgfmt -c --statistics --verbose -o az.gmo az.po +as.po: 41 translated messages, 50 untranslated messages. +rm -f ast.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ast.gmo ast.po +rm -f be.gmo && /usr/bin/msgfmt -c --statistics --verbose -o be.gmo be.po +ar.po: 50 translated messages, 41 untranslated messages. +az.po: 9 translated messages, 82 untranslated messages. +ast.po: 47 translated messages, 44 untranslated messages. +rm -f bg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bg.gmo bg.po +be.po: rm -f br.gmo && /usr/bin/msgfmt -c --statistics --verbose -o br.gmo br.po +46 translated messages, 45 untranslated messages. +bg.po: 54 translated messages, 37 untranslated messages. +rm -f bn_IN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn_IN.gmo bn_IN.po +rm -f bn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn.gmo bn.po +rm -f bs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bs.gmo bs.po +br.po: 20 translated messages, 71 untranslated messages. +bn_IN.po: 41 translated messages, 50 untranslated messages. +rm -f ca.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca.gmo ca.po +bs.po: 25 translated messages, 66 untranslated messages. +bn.po: 43 translated messages, 48 untranslated messages. +rm -f ca@valencia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca@valencia.gmo ca@valencia.po +rm -f cmn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cmn.gmo cmn.po +rm -f crh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o crh.gmo crh.po +ca.po: 87 translated messages, 4 untranslated messages. +ca@valencia.po: 54 translated messages, 37 untranslated messages. +rm -f cs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cs.gmo cs.po +cmn.po: 46 translated messages, 45 untranslated messages. +rm -f csb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o csb.gmo csb.po +crh.po: 11 translated messages, 80 untranslated messages. +rm -f cv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cv.gmo cv.po +rm -f cy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cy.gmo cy.po +cs.po: 81 translated messages, 10 untranslated messages. +rm -f da.gmo && /usr/bin/msgfmt -c --statistics --verbose -o da.gmo da.po +cv.po: 0 translated messages, 91 untranslated messages. +csb.po:7: warning: header field 'Last-Translator' still has the initial default value +cy.po: csb.po: 26 translated messages, 65 untranslated messages. +0 translated messages, 91 untranslated messages. +da.po: 91 translated messages. +rm -f de.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de.gmo de.po +rm -f de_CH.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de_CH.gmo de_CH.po +rm -f dz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o dz.gmo dz.po +rm -f en_AU.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_AU.gmo en_AU.po +rm -f el.gmo && /usr/bin/msgfmt -c --statistics --verbose -o el.gmo el.po +de.po: de_CH.po: 0 translated messages, 91 untranslated messages. +76 translated messages, 15 untranslated messages. +en_AU.po: 54 translated messages, 37 untranslated messages. +el.po: 54 translated messages, 37 untranslated messages. +dz.po: 39 translated messages, 52 untranslated messages. +rm -f en_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_CA.gmo en_CA.po +rm -f en_GB.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_GB.gmo en_GB.po +rm -f eo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eo.gmo eo.po +rm -f es.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es.gmo es.po +rm -f es_419.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_419.gmo es_419.po +eo.po: 52 translated messages, 39 untranslated messages. +en_GB.po: 54 translated messages, 37 untranslated messages. +en_CA.po: 10 translated messages, 81 untranslated messages. +es_419.po: 0 translated messages, 91 untranslated messages. +es.po: 89 translated messages, 2 untranslated messages. +rm -f es_AR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_AR.gmo es_AR.po +rm -f es_CO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CO.gmo es_CO.po +rm -f es_CL.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CL.gmo es_CL.po +rm -f es_DO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_DO.gmo es_DO.po +rm -f es_CR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CR.gmo es_CR.po +es_AR.po: 21 translated messages, 70 untranslated messages. +es_CO.po: 49 translated messages, 42 untranslated messages. +es_CL.po: 3 translated messages, 88 untranslated messages. +es_DO.po: 1 translated message, 90 untranslated messages. +rm -f es_EC.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_EC.gmo es_EC.po +rm -f es_ES.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_ES.gmo es_ES.po +es_CR.po: 1 translated message, 90 untranslated messages. +rm -f es_MX.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_MX.gmo es_MX.po +rm -f es_NI.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_NI.gmo es_NI.po +es_EC.po: 1 translated message, 90 untranslated messages. +es_MX.po: 1 translated message, 90 untranslated messages. +es_ES.po: 1 translated message, 90 untranslated messages. +rm -f es_PA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PA.gmo es_PA.po +es_NI.po: 1 translated message, 90 untranslated messages. +rm -f es_PE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PE.gmo es_PE.po +rm -f es_PR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PR.gmo es_PR.po +rm -f es_SV.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_SV.gmo es_SV.po +es_PA.po: 1 translated message, 90 untranslated messages. +rm -f es_US.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_US.gmo es_US.po +es_PE.po: 1 translated message, 90 untranslated messages. +es_SV.po: 1 translated message, 90 untranslated messages. +es_PR.po: 1 translated message, 90 untranslated messages. +rm -f es_UY.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_UY.gmo es_UY.po +es_US.po: 0 translated messages, 91 untranslated messages. +rm -f es_VE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_VE.gmo es_VE.po +rm -f et.gmo && /usr/bin/msgfmt -c --statistics --verbose -o et.gmo et.po +rm -f eu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eu.gmo eu.po +rm -f fa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fa.gmo fa.po +es_UY.po: 1 translated message, 90 untranslated messages. +es_VE.po: 1 translated message, 90 untranslated messages. +et.po: 54 translated messages, 37 untranslated messages. +rm -f fi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fi.gmo fi.po +rm -f fil.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fil.gmo fil.po +eu.po: 54 translated messages, 37 untranslated messages. +fa.po: 11 translated messages, 80 untranslated messages. +rm -f fo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fo.gmo fo.po +fi.po: 48 translated messages, 43 untranslated messages. +fil.po: 0 translated messages, 91 untranslated messages. +rm -f fr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr.gmo fr.po +rm -f fr_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr_CA.gmo fr_CA.po +rm -f frp.gmo && /usr/bin/msgfmt -c --statistics --verbose -o frp.gmo frp.po +fo.po: 0 translated messages, 91 untranslated messages. +rm -f fur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fur.gmo fur.po +fr.po: 67 translated messages, 24 untranslated messages. +fr_CA.po: 3 translated messages, 88 untranslated messages. +frp.po: 7 translated messages, 84 untranslated messages. +fur.po: 4 translated messages, 87 untranslated messages. +rm -f fy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fy.gmo fy.po +rm -f ga.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ga.gmo ga.po +rm -f gd.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gd.gmo gd.po +rm -f gl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gl.gmo gl.po +fy.po: 4 translated messages, 87 untranslated messages. +rm -f gu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gu.gmo gu.po +gd.po: 0 translated messages, 91 untranslated messages. +ga.po: 41 translated messages, 50 untranslated messages. +gl.po: 89 translated messages, 2 untranslated messages. +rm -f ha.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ha.gmo ha.po +gu.po: 43 translated messages, 48 untranslated messages. +rm -f he.gmo && /usr/bin/msgfmt -c --statistics --verbose -o he.gmo he.po +rm -f hr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hr.gmo hr.po +rm -f hi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hi.gmo hi.po +rm -f hu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hu.gmo hu.po +ha.po: 5 translated messages, 86 untranslated messages. +hi.po: 45 translated messages, 46 untranslated messages. +hr.po: 54 translated messages, 37 untranslated messages. +he.po: 54 translated messages, 37 untranslated messages. +hu.po: 54 translated messages, 37 untranslated messages. +rm -f ia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ia.gmo ia.po +rm -f ie.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ie.gmo ie.po +rm -f hy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hy.gmo hy.po +rm -f id.gmo && /usr/bin/msgfmt -c --statistics --verbose -o id.gmo id.po +rm -f ig.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ig.gmo ig.po +ie.po: 45 translated messages, 46 untranslated messages. +ia.po: id.po: hy.po: 54 translated messages, 37 untranslated messages. +3 translated messages, 88 untranslated messages. +91 translated messages. +ig.po: 5 translated messages, 86 untranslated messages. +rm -f ja.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ja.gmo ja.po +rm -f is.gmo && /usr/bin/msgfmt -c --statistics --verbose -o is.gmo is.po +rm -f jv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o jv.gmo jv.po +rm -f it.gmo && /usr/bin/msgfmt -c --statistics --verbose -o it.gmo it.po +rm -f ka.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ka.gmo ka.po +ja.po: 54 translated messages, 37 untranslated messages. +is.po: 12 translated messages, 79 untranslated messages. +jv.po: 2 translated messages, 89 untranslated messages. +it.po: 91 translated messages. +ka.po: 37 translated messages, 54 untranslated messages. +rm -f kab.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kab.gmo kab.po +rm -f kk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kk.gmo kk.po +rm -f km.gmo && /usr/bin/msgfmt -c --statistics --verbose -o km.gmo km.po +rm -f kn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kn.gmo kn.po +rm -f ko.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ko.gmo ko.po +km.po:7: warning: header field 'Last-Translator' still has the initial default value +kk.po: km.po: 0 translated messages, 91 untranslated messages. +24 translated messages, 67 untranslated messages. +kab.po: 4 translated messages, 87 untranslated messages. +kn.po: 43 translated messages, 48 untranslated messages. +ko.po: rm -f ks.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ks.gmo ks.po +54 translated messages, 37 untranslated messages. +rm -f ku_IQ.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku_IQ.gmo ku_IQ.po +rm -f ku.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku.gmo ku.po +rm -f ky.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ky.gmo ky.po +rm -f la.gmo && /usr/bin/msgfmt -c --statistics --verbose -o la.gmo la.po +ks.po: 3 translated messages, 88 untranslated messages. +ku.po: 10 translated messages, 81 untranslated messages. +ku_IQ.po: 16 translated messages, 75 untranslated messages. +ky.po: 26 translated messages, 65 untranslated messages. +rm -f lb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lb.gmo lb.po +la.po: 2 translated messages, 89 untranslated messages. +rm -f li.gmo && /usr/bin/msgfmt -c --statistics --verbose -o li.gmo li.po +rm -f lo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lo.gmo lo.po +rm -f lt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lt.gmo lt.po +lb.po:7: warning: header field 'Last-Translator' still has the initial default value +lb.po: 0 translated messages, 91 untranslated messages. +rm -f lv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lv.gmo lv.po +li.po:7: warning: header field 'Last-Translator' still has the initial default value +li.po: 0 translated messages, 91 untranslated messages. +lo.po:7: warning: header field 'Last-Translator' still has the initial default value +lo.po: 0 translated messages, 91 untranslated messages. +lt.po: 91 translated messages. +lv.po: 49 translated messages, 42 untranslated messages. +rm -f mai.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mai.gmo mai.po +rm -f mg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mg.gmo mg.po +rm -f mi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mi.gmo mi.po +rm -f ml.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ml.gmo ml.po +rm -f mk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mk.gmo mk.po +mai.po: 18 translated messages, 73 untranslated messages. +mg.po: 10 translated messages, 81 untranslated messages. +ml.po: 41 translated messages, 50 untranslated messages. +mi.po:7: warning: header field 'Last-Translator' still has the initial default value +mi.po: 0 translated messages, 91 untranslated messages. +mk.po: 39 translated messages, 52 untranslated messages. +rm -f mr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mr.gmo mr.po +rm -f mn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mn.gmo mn.po +rm -f ms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ms.gmo ms.po +rm -f my.gmo && /usr/bin/msgfmt -c --statistics --verbose -o my.gmo my.po +mn.po: 10 translated messages, 81 untranslated messages. +mr.po: 47 translated messages, 44 untranslated messages. +rm -f nah.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nah.gmo nah.po +my.po:7: warning: header field 'Last-Translator' still has the initial default value +ms.po: 91 translated messages. +my.po: 0 translated messages, 91 untranslated messages. +nah.po: rm -f nb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nb.gmo nb.po +0 translated messages, 91 untranslated messages. +rm -f ne.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ne.gmo ne.po +rm -f nds.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nds.gmo nds.po +rm -f nl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nl.gmo nl.po +rm -f nn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nn.gmo nn.po +nb.po: 91 translated messages. +ne.po: 13 translated messages, 78 untranslated messages. +nds.po: 12 translated messages, 79 untranslated messages. +nl.po: 91 translated messages. +rm -f nqo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nqo.gmo nqo.po +rm -f nso.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nso.gmo nso.po +rm -f oc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o oc.gmo oc.po +nn.po: 40 translated messages, 51 untranslated messages. +rm -f om.gmo && /usr/bin/msgfmt -c --statistics --verbose -o om.gmo om.po +nqo.po: 0 translated messages, 91 untranslated messages. +oc.po: 68 translated messages, 23 untranslated messagesrm -f or.gmo && /usr/bin/msgfmt -c --statistics --verbose -o or.gmo or.po +. +nso.po: 3 translated messages, 88 untranslated messages. +om.po: 0 translated messages, 91 untranslated messages. +rm -f pa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pa.gmo pa.po +rm -f pl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pl.gmo pl.po +rm -f pms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pms.gmo pms.po +or.po: 41 translated messages, 50 untranslated messages. +pa.po: 46 translated messages, 45 untranslated messages. +rm -f ps.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ps.gmo ps.po +pl.po: 55 translated messages, 36 untranslated messages. +rm -f pt_BR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt_BR.gmo pt_BR.po +rm -f pt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt.gmo pt.po +pms.po: 3 translated messages, 88 untranslated messages. +ps.po: 6 translated messages, 85 untranslated messages. +rm -f ro.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ro.gmo ro.po +pt_BR.po: 58 translated messages, 33 untranslated messages. +pt.po: 84 translated messages, 7 untranslated messages. +rm -f ru.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ru.gmo ru.po +ro.po: 54 translated messages, 37 untranslated messages. +rm -f rw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o rw.gmo rw.po +rm -f sco.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sco.gmo sco.po +rm -f sc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sc.gmo sc.po +rm -f si.gmo && /usr/bin/msgfmt -c --statistics --verbose -o si.gmo si.po +ru.po: 89 translated messages, 2 untranslated messages. +rm -f sk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sk.gmo sk.po +si.po: rw.po: 36 translated messages10 translated messages, 81 untranslated messages. +, 55 untranslated messages. +sc.po: 2 translated messages, 89 untranslated messages. +sco.po: 0 translated messages, 91 untranslated messages. +rm -f sl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sl.gmo sl.po +rm -f so.gmo && /usr/bin/msgfmt -c --statistics --verbose -o so.gmo so.po +rm -f sq.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sq.gmo sq.po +sk.po: 54 translated messages, 37 untranslated messages. +rm -f sr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr.gmo sr.po +sl.po: 55 translated messages, 36 untranslated messages. +rm -f sr@latin.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr@latin.gmo sr@latin.po +so.po: 0 translated messages, 91 untranslated messages. +sq.po: 52 translated messages, 39 untranslated messages. +rm -f sv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sv.gmo sv.po +rm -f sw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sw.gmo sw.po +sr.po: 91 translated messages. +sr@latin.po: 46 translated messages, 45 untranslated messages. +rm -f ta.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ta.gmo ta.po +sv.po: 80 translated messages, 11 untranslated messages. +rm -f te.gmo && /usr/bin/msgfmt -c --statistics --verbose -o te.gmo te.po +sw.po: 0 translated messages, 91 untranslated messages. +rm -f tg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tg.gmo tg.po +te.po: ta.po: 46 translated messages, 45 untranslated messages. +41 translated messages, 50 untranslated messages. +rm -f tk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tk.gmo tk.po +rm -f th.gmo && /usr/bin/msgfmt -c --statistics --verbose -o th.gmo th.po +tg.po: 0 translated messages, 91 untranslated messages. +rm -f tl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tl.gmo tl.po +rm -f tr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tr.gmo tr.po +tk.po: 7 translated messages, 84 untranslated messages. +th.po: 45 translated messages, 46 untranslated messages. +rm -f ts.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ts.gmo ts.po +tl.po: 0 translated messages, 91 untranslated messages. +tr.po: ts.po: rm -f ug.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ug.gmo ug.po +0 translated messages, 91 untranslated messages. +58 translated messages, 33 untranslated messages. +rm -f tt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tt.gmo tt.po +rm -f ur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur.gmo ur.po +rm -f uk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uk.gmo uk.po +rm -f ur_PK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur_PK.gmo ur_PK.po +ug.po: tt.po:7: warning: 6 translated messages, 85 untranslated messages. +header field 'Last-Translator' still has the initial default value +tt.po: 0 translated messages, 91 untranslated messages. +ur.po: 7 translated messages, 84 untranslated messages. +uk.po: 58 translated messages, 33 untranslated messages. +ur_PK.po:7: warning: rm -f vi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o vi.gmo vi.po +header field 'Last-Translator' still has the initial default value +ur_PK.po: 0 translated messages, 91 untranslated messages. +rm -f uz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uz.gmo uz.po +rm -f wa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o wa.gmo wa.po +rm -f yi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yi.gmo yi.po +rm -f xh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o xh.gmo xh.po +vi.po: 52 translated messages, 39 untranslated messages. +uz.po: 26 translated messages, 65 untranslated messages. +wa.po: 9 translated messages, 82 untranslated messages. +yi.po:7: warning: header field 'Last-Translator' still has the initial default value +yi.po: 0 translated messages, 91 untranslated messages. +xh.po: 8 translated messages, 83 untranslated messages. +rm -f zh_HK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_HK.gmo zh_HK.po +rm -f zh_CN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_CN.gmo zh_CN.po +rm -f yo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yo.gmo yo.po +rm -f zu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zu.gmo zu.po +rm -f zh_TW.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_TW.gmo zh_TW.po +zh_HK.po: 47 translated messages, 44 untranslated messages. +yo.po: 5 translated messages, 86 untranslated messages. +zh_CN.po: 63 translated messages, 28 untranslated messages. +zu.po: 3 translated messages, 88 untranslated messages. +zh_TW.po: 91 translated messages. +make[3]: Leaving directory '/rootdir/po' +touch stamp-po +make[2]: Leaving directory '/rootdir/po' +Making all in libcafekbd +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml + GEN cafekbd-indicator-marshal.h + GEN cafekbd-keyboard-drawing-marshal.h +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +INFO: Reading ./cafekbd-indicator-marshal.list... +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... + GEN cafekbd-indicator-marshal.c + GEN cafekbd-keyboard-drawing-marshal.c +INFO: Reading ./cafekbd-indicator-marshal.list... +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... +make all-am +make[3]: Entering directory '/rootdir/libcafekbd' + CC libcafekbd_la-cafekbd-desktop-config.lo + CC libcafekbd_la-cafekbd-keyboard-config.lo + CC libcafekbd_la-cafekbd-util.lo + CC libcafekbdui_la-cafekbd-indicator-config.lo + CC libcafekbdui_la-cafekbd-indicator.lo +cafekbd-desktop-config.c: In function 'cafekbd_desktop_config_load_from_gsettings': +cafekbd-desktop-config.c:176:38: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 176 | || config->default_group >= + | ^~ +cafekbd-indicator.c: In function 'cafekbd_indicator_extract_layout_name': +cafekbd-indicator.c:293:19: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 293 | if (group < g_strv_length (short_group_names)) { + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_prepare_drawing': +cafekbd-indicator.c:418:31: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 418 | if (group + 1 == + | ^~ +cafekbd-indicator.c: In function 'cafekbd_indicator_update_tooltips': +cafekbd-indicator.c:446:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 446 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-indicator.c:450:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 450 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-indicator.c: In function 'cafekbd_indicator_kbd_cfg_callback': +cafekbd-indicator.c:61:44: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 61 | CafekbdIndicator * gki = (CafekbdIndicator*)cur->data; + | ^~~ +cafekbd-indicator.c:561:9: note: in expansion of macro 'ForAllIndicators' + 561 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-indicator.c:539:55: note: shadowed declaration is here + 539 | cafekbd_indicator_kbd_cfg_callback (CafekbdIndicator *gki G_GNUC_UNUSED) +cafekbd-indicator.c: In function 'cafekbd_indicator_start_listen': +cafekbd-indicator.c:647:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 647 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:650:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 650 | (CdkFilterFunc) + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_stop_listen': +cafekbd-indicator.c:663:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 663 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:667:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 667 | (CdkFilterFunc) cafekbd_indicator_filter_x_evt, NULL); + | ^ +cafekbd-indicator-config.c: In function 'cafekbd_indicator_config_get_images_file': +cafekbd-indicator-config.c:152:59: warning: comparison of integer expressions of different signedness: 'guint' {aka 'unsigned int'} and 'int' [-Wsign-compare] + 152 | (g_strv_length (kbd_config->layouts_variants) > group)) { + | ^ + CC libcafekbdui_la-cafekbd-status.lo +cafekbd-status.c: In function 'cafekbd_status_render_cairo': +cafekbd-status.c:214:23: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 214 | if (group + 1 == xkl_engine_get_num_groups (globals.engine)) { + | ^~ +cafekbd-status.c: In function 'cafekbd_status_prepare_drawing': +cafekbd-status.c:376:51: warning: cast between incompatible function types from 'void (*)(void *)' to 'void (*)(guchar *, void *)' {aka 'void (*)(unsigned char *, void *)'} [-Wcast-function-type] + 376 | (GdkPixbufDestroyNotify) + | ^ +cafekbd-status.c: In function 'cafekbd_status_update_tooltips': +cafekbd-status.c:395:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 395 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-status.c:399:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 399 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-status.c: In function 'cafekbd_status_kbd_cfg_callback': +cafekbd-status.c:77:41: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 77 | CafekbdStatus * gki = (CafekbdStatus*)cur->data; + | ^~~ +cafekbd-status.c:508:9: note: in expansion of macro 'ForAllIndicators' + 508 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-status.c:484:49: note: shadowed declaration is here + 484 | cafekbd_status_kbd_cfg_callback (CafekbdStatus *gki G_GNUC_UNUSED) +cafekbd-status.c: In function 'cafekbd_status_start_listen': +cafekbd-status.c:594:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 594 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:597:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 597 | (CdkFilterFunc) cafekbd_status_filter_x_evt, + | ^ +cafekbd-status.c: In function 'cafekbd_status_stop_listen': +cafekbd-status.c:610:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 610 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:614:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 614 | (CdkFilterFunc) cafekbd_status_filter_x_evt, NULL); + | ^ + CC libcafekbdui_la-cafekbd-indicator-marshal.lo +cafekbd-indicator-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ + CC libcafekbdui_la-cafekbd-keyboard-drawing-marshal.lo +cafekbd-keyboard-drawing-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + CC libcafekbdui_la-cafekbd-keyboard-drawing.lo +cafekbd-keyboard-drawing.c: In function 'draw_polygon': +cafekbd-keyboard-drawing.c:322:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 322 | for (i = 0; i < num_points; i++) { + | ^ +cafekbd-keyboard-drawing.c: In function 'process_indicators_state_notify': +cafekbd-keyboard-drawing.c:2131:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'long unsigned int' [-Wsign-compare] + 2131 | for (i = 0; i <= drawing->xkb->indicators->phys_indicators; i++) + | ^~ +cafekbd-keyboard-drawing.c: In function 'cafekbd_keyboard_drawing_get_type': +cafekbd-keyboard-drawing.c:2394:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawingClass *)' {aka 'void (*)(struct _CafekbdKeyboardDrawingClass *)'} to 'void (*)(void *, void *)' [-Wcast-function-type] + 2394 | (GClassInitFunc) cafekbd_keyboard_drawing_class_init, + | ^ +cafekbd-keyboard-drawing.c:2399:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawing *)' {aka 'void (*)(struct _CafekbdKeyboardDrawing *)'} to 'void (*)(GTypeInstance *, void *)' {aka 'void (*)(struct _GTypeInstance *, void *)'} [-Wcast-function-type] + 2399 | (GInstanceInitFunc) cafekbd_keyboard_drawing_init, + | ^ + GEN org.cafe.peripherals-keyboard-xkb.gschema.valid + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:114:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 114 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbd.la + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspectq8aoqnje/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectq8aoqnje/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectq8aoqnje/Cafekbd-1.0.c:239:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 239 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspectq8aoqnje/Cafekbd-1.0.c:246:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 246 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspectq8aoqnje/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +5 warnings generated. + GICOMP Cafekbd-1.0.gir +make[3]: Leaving directory '/rootdir/libcafekbd' +make[2]: Leaving directory '/rootdir/libcafekbd' +Making all in test +make[2]: Entering directory '/rootdir/test' + CC cafekbd_indicator_test-cafekbd-indicator-test.o + CC cafekbd_keyboard_drawing_test-cafekbd-keyboard-drawing-test.o + CC cafekbd_status_test-cafekbd-status-test.o + CCLD cafekbd-indicator-test +cafekbd-keyboard-drawing-test.c:187:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 187 | g_print ("kbdraw %s\n", VERSION); + | ^~~~~~~ +cafekbd-keyboard-drawing-test.c:194:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 194 | g_printerr ("--groups: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:199:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 199 | g_printerr ("--levels: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:225:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 225 | cafekbd_keyboard_drawing_set_track_modifiers + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:228:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 228 | cafekbd_keyboard_drawing_set_track_config + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:248:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 248 | names.keycodes = keycodes; + | ^~~~~~~~ +cafekbd-keyboard-drawing-test.c:256:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 256 | names.geometry = geometry; + | ^~~~~~~~ +7 warnings generated. + CCLD cafekbd-keyboard-drawing-test + CCLD cafekbd-status-test +make[2]: Leaving directory '/rootdir/test' +make[2]: Entering directory '/rootdir' +make[2]: Leaving directory '/rootdir' +make[1]: Leaving directory '/rootdir' +scan-build: Analysis run complete. +scan-build: 11 bugs found. +scan-build: Run 'scan-view /rootdir/html-report/2025-02-06-165420-14522-1' to examine bug reports. +Making check in po +make[1]: Entering directory '/rootdir/po' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/po' +Making check in libcafekbd +make[1]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +make check-am +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:113:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 113 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspectdvb8b8x7/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectdvb8b8x7/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectdvb8b8x7/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +3 warnings generated. + GICOMP Cafekbd-1.0.gir +make[2]: Leaving directory '/rootdir/libcafekbd' +make[1]: Leaving directory '/rootdir/libcafekbd' +Making check in test +make[1]: Entering directory '/rootdir/test' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/test' +make[1]: Entering directory '/rootdir' +make[1]: Leaving directory '/rootdir' + Listing... 0% Listing... 0% Listing... 0% adduser/testing,now 3.137 all [installed,automatic] +advaita-icon-theme/unknown,now 3.25.0-1 all [installed,automatic] +apt/testing,now 2.9.26 amd64 [installed,automatic] +aptitude-common/testing,now 0.8.13-6.1 all [installed,automatic] +aptitude/testing,now 0.8.13-6.1 amd64 [installed] +at-spi2-common/testing,now 2.55.0.1-1 all [installed,automatic] +at-spi2-core/testing,now 2.55.0.1-1 amd64 [installed,automatic] +autoconf-archive/testing,now 20220903-3 all [installed] +autoconf/testing,now 2.72-3 all [installed,automatic] +automake/testing,now 1:1.17-3 all [installed,automatic] +autopoint/testing,now 0.23.1-1 all [installed] +autotools-dev/testing,now 20220109.1 all [installed,automatic] +base-files/testing,now 13.6 amd64 [installed,automatic] +base-passwd/testing,now 3.6.6 amd64 [installed,automatic] +bash/testing,now 5.2.37-1 amd64 [installed,automatic] +binfmt-support/testing,now 2.2.2-7 amd64 [installed,automatic] +binutils-common/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils-gold-x86-64-linux-gnu/testing,now 2.44-1 amd64 [installed,automatic] +binutils-gold/testing,now 2.44-1 amd64 [installed,automatic] +binutils-x86-64-linux-gnu/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +bsdutils/testing,now 1:2.40.4-2 amd64 [installed,automatic] +build-essential/testing,now 12.12 amd64 [installed,automatic] +bzip2-doc/testing,now 1.0.8-6 all [installed,automatic] +bzip2/testing,now 1.0.8-6 amd64 [installed,automatic] +ca-certificates/testing,now 20241223 all [installed,automatic] +clang-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools/testing,now 1:19.0-63 amd64 [installed] +clang/testing,now 1:19.0-63 amd64 [installed] +coreutils/testing,now 9.5-1+b1 amd64 [installed,automatic] +cpp-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-14/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cpp/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cppcheck/testing,now 2.16.0-1 amd64 [installed] +ctk-update-icon-cache/unknown,now 3.25.6-1 amd64 [installed,automatic] +dash/testing,now 0.5.12-12 amd64 [installed,automatic] +dbus-bin/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-daemon/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-session-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-system-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-user-session/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus/testing,now 1.16.0-1 amd64 [installed,automatic] +dconf-gsettings-backend/testing,now 0.40.0-5 amd64 [installed,automatic] +dconf-service/testing,now 0.40.0-5 amd64 [installed,automatic] +debconf/testing,now 1.5.89 all [installed,automatic] +debian-archive-keyring/testing,now 2023.4 all [installed,automatic] +debianutils/testing,now 5.21 amd64 [installed,automatic] +diffutils/testing,now 1:3.10-2 amd64 [installed,automatic] +dirmngr/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +dmsetup/testing,now 2:1.02.201-1 amd64 [installed,automatic] +dpkg-dev/testing,now 1.22.14 all [installed,automatic] +dpkg/testing,now 1.22.14 amd64 [installed,automatic] +e2fsprogs/testing,now 1.47.2-1 amd64 [installed,automatic] +expect/testing,now 5.45.4-3+b1 amd64 [installed] +fakeroot/testing,now 1.37-1 amd64 [installed,automatic] +file/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +findutils/testing,now 4.10.0-3 amd64 [installed,automatic] +fontconfig-config/testing,now 2.15.0-2 amd64 [installed,automatic] +fontconfig/testing,now 2.15.0-2 amd64 [installed,automatic] +fonts-dejavu-core/testing,now 2.37-8 all [installed,automatic] +fonts-dejavu-mono/testing,now 2.37-8 all [installed,automatic] +g++-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-14/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +g++/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc-14-base/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gettext-base/testing,now 0.23.1-1 amd64 [installed,automatic] +gettext/testing,now 0.23.1-1 amd64 [installed] +gir1.2-atk-1.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-atspi-2.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-ctk-3.0/unknown,now 3.25.6-1 amd64 [installed] +gir1.2-freedesktop-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-freedesktop/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-gdkpixbuf-2.0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +gir1.2-girepository-2.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-girepository-2.0/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-glib-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-glib-2.0/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-harfbuzz-0.0/testing,now 10.2.0-1 amd64 [installed,automatic] +gir1.2-pango-1.0/testing,now 1.56.1-1 amd64 [installed,automatic] +gir1.2-xkl-1.0/testing,now 5.4-5+b2 amd64 [installed,automatic] +girepository-tools/testing,now 2.82.4-2 amd64 [installed,automatic] +git-man/testing,now 1:2.47.2-0.1 all [installed,automatic] +git/testing,now 1:2.47.2-0.1 amd64 [installed] +gnupg-l10n/testing,now 2.2.46-1 all [installed,automatic] +gnupg-utils/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gnupg/testing,now 2.2.46-1 all [installed,automatic] +gobject-introspection-bin/testing,now 1.82.0-4 amd64 [installed,automatic] +gobject-introspection/testing,now 1.82.0-4 amd64 [installed] +gpg-agent/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg-wks-client/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgconf/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgsm/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgv/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +grep/testing,now 3.11-4 amd64 [installed,automatic] +gsettings-desktop-schemas/testing,now 47.1-1 all [installed,automatic] +gzip/testing,now 1.13-1 amd64 [installed,automatic] +hicolor-icon-theme/testing,now 0.18-2 all [installed,automatic] +hostname/testing,now 3.25 amd64 [installed,automatic] +icu-devtools/testing,now 72.1-6 amd64 [installed,automatic] +init-system-helpers/testing,now 1.68 all [installed,automatic] +krb5-locales/testing,now 1.21.3-4 all [installed,automatic] +less/testing,now 643-1 amd64 [installed,automatic] +lib32gcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +lib32stdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libacl1/testing,now 2.3.2-2+b1 amd64 [installed,automatic] +libalgorithm-diff-perl/testing,now 1.201-1 all [installed,automatic] +libalgorithm-diff-xs-perl/testing,now 0.04-8+b4 amd64 [installed,automatic] +libalgorithm-merge-perl/testing,now 0.08-5 all [installed,automatic] +libapparmor1/testing,now 3.1.7-1+b3 amd64 [installed,automatic] +libapt-pkg6.0t64/testing,now 2.9.26 amd64 [installed,automatic] +libasan8/testing,now 14.2.0-12 amd64 [installed,automatic] +libassuan9/testing,now 3.0.1-2 amd64 [installed,automatic] +libatk-bridge2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk-bridge2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatomic1/testing,now 14.2.0-12 amd64 [installed,automatic] +libatspi2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatspi2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libattr1/testing,now 1:2.5.2-2 amd64 [installed,automatic] +libaudit-common/testing,now 1:4.0.2-2 all [installed,automatic] +libaudit1/testing,now 1:4.0.2-2+b1 amd64 [installed,automatic] +libavahi-client3/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common-data/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common3/testing,now 0.8-16 amd64 [installed,automatic] +libbinutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libblkid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libblkid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libboost-iostreams1.83.0/testing,now 1.83.0-4 amd64 [installed,automatic] +libbrotli-dev/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbrotli1/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbsd0/testing,now 0.12.2-2 amd64 [installed,automatic] +libbz2-1.0/testing,now 1.0.8-6 amd64 [installed,automatic] +libbz2-dev/testing,now 1.0.8-6 amd64 [installed,automatic] +libc-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc-dev-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc6-dev/testing,now 2.40-6 amd64 [installed,automatic] +libc6-i386/testing,now 2.40-6 amd64 [installed,automatic] +libc6/testing,now 2.40-6 amd64 [installed,automatic] +libcairo-gobject2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo-script-interpreter2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2-dev/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcap-dev/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcap-ng0/testing,now 0.8.5-4 amd64 [installed,automatic] +libcap2/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcbor0.10/testing,now 0.10.2-2 amd64 [installed,automatic] +libcc1-0/testing,now 14.2.0-12 amd64 [installed,automatic] +libclang-common-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-cpp19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-rt-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang1-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libcolord2/testing,now 1.4.7-1+b2 amd64 [installed,automatic] +libcom-err2/testing,now 1.47.2-1 amd64 [installed,automatic] +libcrypt-dev/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcrypt1/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcryptsetup12/testing,now 2:2.7.5-1 amd64 [installed,automatic] +libctf-nobfd0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctf0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctk-3-0/unknown,now 3.25.6-1 amd64 [installed] +libctk-3-bin/unknown,now 3.25.6-1 amd64 [installed,automatic] +libctk-3-common/unknown,now 3.25.6-1 all [installed] +libctk-3-dev/unknown,now 3.25.6-1 amd64 [installed] +libcups2t64/testing,now 2.4.10-2+b1 amd64 [installed,automatic] +libcurl3t64-gnutls/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcurl4t64/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcwidget4/testing,now 0.5.18-6+b2 amd64 [installed,automatic] +libdatrie-dev/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdatrie1/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdav1d7/testing,now 1.5.1-1 amd64 [installed,automatic] +libdb5.3t64/testing,now 5.3.28+dfsg2-9 amd64 [installed,automatic] +libdbus-1-3/testing,now 1.16.0-1 amd64 [installed,automatic] +libdbus-1-dev/testing,now 1.16.0-1 amd64 [installed,automatic] +libdconf1/testing,now 0.40.0-5 amd64 [installed,automatic] +libdebconfclient0/testing,now 0.277 amd64 [installed,automatic] +libdeflate-dev/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdeflate0/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdevmapper1.02.1/testing,now 2:1.02.201-1 amd64 [installed,automatic] +libdpkg-perl/testing,now 1.22.14 all [installed,automatic] +libdrm-amdgpu1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-common/testing,now 2.4.123-1 all [installed,automatic] +libdrm-intel1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-radeon1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm2/testing,now 2.4.123-1 amd64 [installed,automatic] +libedit2/testing,now 3.1-20250104-1 amd64 [installed,automatic] +libegl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libegl-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1-mesa-dev/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libelf1t64/testing,now 0.192-4 amd64 [installed,automatic] +libepoxy-dev/testing,now 1.5.10-2 amd64 [installed,automatic] +libepoxy0/testing,now 1.5.10-2 amd64 [installed,automatic] +liberror-perl/testing,now 0.17029-2 all [installed,automatic] +libexpat1-dev/testing,now 2.6.4-1 amd64 [installed,automatic] +libexpat1/testing,now 2.6.4-1 amd64 [installed,automatic] +libext2fs2t64/testing,now 1.47.2-1 amd64 [installed,automatic] +libfakeroot/testing,now 1.37-1 amd64 [installed,automatic] +libffi-dev/testing,now 3.4.6-1 amd64 [installed,automatic] +libffi8/testing,now 3.4.6-1 amd64 [installed,automatic] +libfido2-1/testing,now 1.15.0-1+b1 amd64 [installed,automatic] +libfile-fcntllock-perl/testing,now 0.22-4+b4 amd64 [installed,automatic] +libfontconfig-dev/testing,now 2.15.0-2 amd64 [installed,automatic] +libfontconfig1/testing,now 2.15.0-2 amd64 [installed,automatic] +libfreetype-dev/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfreetype6/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfribidi-dev/testing,now 1.0.16-1 amd64 [installed,automatic] +libfribidi0/testing,now 1.0.16-1 amd64 [installed,automatic] +libgbm1/testing,now 24.2.8-1 amd64 [installed,automatic] +libgc1/testing,now 1:8.2.8-1 amd64 [installed,automatic] +libgcc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcrypt20/testing,now 1.11.0-7 amd64 [installed,automatic] +libgdbm-compat4t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdbm6t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-dev/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-bin/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-common/testing,now 2.42.12+dfsg-2 all [installed,automatic] +libgio-2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libgio-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository-1.0-1/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-1.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-2.0-0/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository1.0-dev/testing,now 1.82.0-4 amd64 [installed] +libgl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgl1-mesa-dri/testing,now 24.2.8-1 amd64 [installed,automatic] +libgl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglapi-mesa/testing,now 24.2.8-1 amd64 [installed,automatic] +libgles-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles2/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglib2.0-0t64/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-data/testing,now 2.82.4-2 all [installed,automatic] +libglib2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-dev/testing,now 2.82.4-2 amd64 [installed] +libglvnd-core-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libglx0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgmp10/testing,now 2:6.3.0+dfsg-3 amd64 [installed,automatic] +libgnutls30t64/testing,now 3.8.8-2 amd64 [installed,automatic] +libgomp1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgpg-error-l10n/testing,now 1.51-3 all [installed,automatic] +libgpg-error0/testing,now 1.51-3 amd64 [installed,automatic] +libgpm2/testing,now 1.20.7-11+b2 amd64 [installed,automatic] +libgprofng0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libgraphite2-3/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgraphite2-dev/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgssapi-krb5-2/testing,now 1.21.3-4 amd64 [installed,automatic] +libharfbuzz-cairo0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-dev/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-gobject0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-icu0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-subset0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz0b/testing,now 10.2.0-1 amd64 [installed,automatic] +libhogweed6t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libhwasan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libice-dev/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libice6/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libicu-dev/testing,now 72.1-6 amd64 [installed,automatic] +libicu72/testing,now 72.1-6 amd64 [installed,automatic] +libidn2-0/testing,now 2.3.7-2+b1 amd64 [installed,automatic] +libisl23/testing,now 0.27-1 amd64 [installed,automatic] +libitm1/testing,now 14.2.0-12 amd64 [installed,automatic] +libjansson4/testing,now 2.14-2+b3 amd64 [installed,automatic] +libjbig-dev/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjbig0/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjpeg-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjson-c5/testing,now 0.18+ds-1 amd64 [installed,automatic] +libk5crypto3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkeyutils1/testing,now 1.6.3-4 amd64 [installed,automatic] +libkmod2/testing,now 33+20240816-2 amd64 [installed,automatic] +libkrb5-3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkrb5support0/testing,now 1.21.3-4 amd64 [installed,automatic] +libksba8/testing,now 1.6.7-2+b1 amd64 [installed,automatic] +liblcms2-2/testing,now 2.16-2 amd64 [installed,automatic] +libldap-common/testing,now 2.6.9+dfsg-1 all [installed,automatic] +libldap2/testing,now 2.6.9+dfsg-1 amd64 [installed,automatic] +liblerc-dev/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +liblerc4/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +libllvm19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +liblocale-gettext-perl/testing,now 1.07-7+b1 amd64 [installed,automatic] +liblsan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libltdl-dev/testing,now 2.5.4-3 amd64 [installed,automatic] +libltdl7/testing,now 2.5.4-3 amd64 [installed,automatic] +liblz4-1/testing,now 1.10.0-3 amd64 [installed,automatic] +liblzma-dev/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzma5/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzo2-2/testing,now 2.10-3+b1 amd64 [installed,automatic] +libmagic-mgc/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmagic1t64/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmd0/testing,now 1.1.0-2+b1 amd64 [installed,automatic] +libmount-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libmount1/testing,now 2.40.4-2 amd64 [installed,automatic] +libmpc3/testing,now 1.3.1-1+b3 amd64 [installed,automatic] +libmpfr6/testing,now 4.2.1-1+b2 amd64 [installed,automatic] +libncurses-dev/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncurses6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncursesw6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libnettle8t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libnghttp2-14/testing,now 1.64.0-1 amd64 [installed,automatic] +libnghttp3-9/testing,now 1.6.0-2 amd64 [installed,automatic] +libngtcp2-16/testing,now 1.9.1-1 amd64 [installed,automatic] +libngtcp2-crypto-gnutls8/testing,now 1.9.1-1 amd64 [installed,automatic] +libnpth0t64/testing,now 1.8-2 amd64 [installed,automatic] +libnss-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libobjc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libobjc4/testing,now 14.2.0-12 amd64 [installed,automatic] +libopengl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libopengl0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libp11-kit0/testing,now 0.25.5-3 amd64 [installed,automatic] +libpam-modules-bin/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-modules/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-runtime/testing,now 1.7.0-2 all [installed,automatic] +libpam-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libpam0g/testing,now 1.7.0-2 amd64 [installed,automatic] +libpango-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpango1.0-dev/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangocairo-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoft2-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoxft-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpciaccess0/testing,now 0.17-3+b3 amd64 [installed,automatic] +libpcre2-16-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-32-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-8-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-dev/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-posix3/testing,now 10.44-5 amd64 [installed,automatic] +libperl5.40/testing,now 5.40.0-8 amd64 [installed,automatic] +libpfm4/testing,now 4.13.0+git83-g91970fe-1 amd64 [installed,automatic] +libpipeline1/testing,now 1.5.8-1 amd64 [installed,automatic] +libpixman-1-0/testing,now 0.44.0-3 amd64 [installed,automatic] +libpixman-1-dev/testing,now 0.44.0-3 amd64 [installed,automatic] +libpkgconf3/testing,now 1.8.1-4 amd64 [installed,automatic] +libpng-dev/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng-tools/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng16-16t64/testing,now 1.6.44-3 amd64 [installed,automatic] +libproc2-0/testing,now 2:4.0.4-7 amd64 [installed,automatic] +libpsl5t64/testing,now 0.21.2-1.1+b1 amd64 [installed,automatic] +libpython3-stdlib/testing,now 3.13.1-2 amd64 [installed,automatic] +libpython3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libpython3.13-stdlib/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libquadmath0/testing,now 14.2.0-12 amd64 [installed,automatic] +libreadline8t64/testing,now 8.2-6 amd64 [installed,automatic] +librsvg2-2/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librsvg2-common/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librtmp1/testing,now 2.4+20151223.gitfa8646d.1-2+b5 amd64 [installed,automatic] +libsasl2-2/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules-db/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libseccomp2/testing,now 2.5.5-2 amd64 [installed,automatic] +libselinux1-dev/testing,now 3.7-3.1 amd64 [installed,automatic] +libselinux1/testing,now 3.7-3.1 amd64 [installed,automatic] +libsemanage-common/testing,now 3.7-2.1 all [installed,automatic] +libsemanage2/testing,now 3.7-2.1 amd64 [installed,automatic] +libsensors-config/testing,now 1:3.6.0-10 all [installed,automatic] +libsensors5/testing,now 1:3.6.0-10+b1 amd64 [installed,automatic] +libsepol-dev/testing,now 3.7-1 amd64 [installed,automatic] +libsepol2/testing,now 3.7-1 amd64 [installed,automatic] +libsframe1/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libsharpyuv-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsharpyuv0/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsigc++-2.0-0v5/testing,now 2.12.1-3 amd64 [installed,automatic] +libsm-dev/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsm6/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsmartcols1/testing,now 2.40.4-2 amd64 [installed,automatic] +libsqlite3-0/testing,now 3.46.1-1 amd64 [installed,automatic] +libss2/testing,now 1.47.2-1 amd64 [installed,automatic] +libssh2-1t64/testing,now 1.11.1-1 amd64 [installed,automatic] +libssl3t64/testing,now 3.4.0-2 amd64 [installed,automatic] +libstdc++-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libstdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libsysprof-capture-4-dev/testing,now 47.2-1 amd64 [installed,automatic] +libsystemd-dev/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd-shared/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd0/testing,now 257.2-3 amd64 [installed,automatic] +libtasn1-6/testing,now 4.19.0-3+b3 amd64 [installed,automatic] +libtcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +libthai-data/testing,now 0.1.29-2 all [installed,automatic] +libthai-dev/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libthai0/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libtiff-dev/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiff6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiffxx6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtinfo6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libtinyxml2-10/testing,now 10.0.0+dfsg-2+b2 amd64 [installed,automatic] +libtool/testing,now 2.5.4-3 all [installed] +libtsan2/testing,now 14.2.0-12 amd64 [installed,automatic] +libubsan1/testing,now 14.2.0-12 amd64 [installed,automatic] +libudev1/testing,now 257.2-3 amd64 [installed,automatic] +libunistring5/testing,now 1.3-1 amd64 [installed,automatic] +libuuid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libvulkan1/testing,now 1.4.304.0-1 amd64 [installed,automatic] +libwayland-bin/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-client0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-cursor0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-dev/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-egl1/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-server0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwebp-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebp7/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdecoder3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdemux2/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpmux3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libx11-6/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-data/testing,now 2:1.8.10-2 all [installed,automatic] +libx11-dev/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-xcb1/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libxapian30/testing,now 1.4.25-2 amd64 [installed,automatic] +libxau-dev/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxau6/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxaw7/testing,now 2:1.0.16-1 amd64 [installed,automatic] +libxcb-dri2-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-dri3-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-glx0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-present0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-randr0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-sync1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-xfixes0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcomposite-dev/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcomposite1/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcursor-dev/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxcursor1/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxdamage-dev/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdamage1/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdmcp-dev/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxdmcp6/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxext-dev/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxext6/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxfixes-dev/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxfixes3/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxft-dev/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxft2/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxi-dev/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxi6/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxinerama-dev/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxinerama1/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxkbcommon-dev/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbcommon0/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbfile1/testing,now 1:1.1.0-1+b4 amd64 [installed,automatic] +libxklavier-dev/testing,now 5.4-5+b2 amd64 [installed] +libxklavier16/testing,now 5.4-5+b2 amd64 [installed,automatic] +libxml2-dev/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxml2-utils/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed] +libxml2/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxmu6/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxmuu1/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxpm4/testing,now 1:3.5.17-1+b3 amd64 [installed,automatic] +libxrandr-dev/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrandr2/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrender-dev/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxrender1/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxshmfence1/testing,now 1.3-1+b3 amd64 [installed,automatic] +libxt6t64/testing,now 1:1.2.1-1.2+b2 amd64 [installed,automatic] +libxtst-dev/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxtst6/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxxf86vm1/testing,now 1:1.1.4-1+b4 amd64 [installed,automatic] +libxxhash0/testing,now 0.8.2-2+b2 amd64 [installed,automatic] +libyaml-0-2/testing,now 0.2.5-2 amd64 [installed,automatic] +libz3-4/testing,now 4.13.3-1 amd64 [installed,automatic] +libz3-dev/testing,now 4.13.3-1 amd64 [installed,automatic] +libzstd-dev/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +libzstd1/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +linux-libc-dev/testing,now 6.12.11-1 all [installed,automatic] +linux-sysctl-defaults/testing,now 4.11 all [installed,automatic] +llvm-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-linker-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-runtime/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +login.defs/testing,now 1:4.16.0-7 all [installed,automatic] +login/testing,now 1:4.16.0-2+really2.40.4-2 amd64 [installed,automatic] +logsave/testing,now 1.47.2-1 amd64 [installed,automatic] +m4/testing,now 1.4.19-5 amd64 [installed,automatic] +make/testing,now 4.4.1-1 amd64 [installed] +manpages-dev/testing,now 6.9.1-1 all [installed,automatic] +manpages/testing,now 6.9.1-1 all [installed,automatic] +mawk/testing,now 1.3.4.20240905-1 amd64 [installed,automatic] +media-types/testing,now 10.1.0 all [installed,automatic] +mesa-libgallium/testing,now 24.2.8-1 amd64 [installed,automatic] +mesa-vulkan-drivers/testing,now 24.2.8-1 amd64 [installed,automatic] +mount/testing,now 2.40.4-2 amd64 [installed,automatic] +native-architecture/testing,now 0.2.5 all [installed,automatic] +ncurses-base/testing,now 6.5-2 all [installed,automatic] +ncurses-bin/testing,now 6.5-2+b1 amd64 [installed,automatic] +netbase/testing,now 6.4 all [installed,automatic] +openssh-client/testing,now 1:9.9p1-3 amd64 [installed,automatic] +openssl-provider-legacy/testing,now 3.4.0-2 amd64 [installed,automatic] +openssl/testing,now 3.4.0-2 amd64 [installed,automatic] +pango1.0-tools/testing,now 1.56.1-1 amd64 [installed,automatic] +passwd/testing,now 1:4.16.0-7 amd64 [installed,automatic] +patch/testing,now 2.7.6-7 amd64 [installed,automatic] +perl-base/testing,now 5.40.0-8 amd64 [installed,automatic] +perl-modules-5.40/testing,now 5.40.0-8 all [installed,automatic] +perl/testing,now 5.40.0-8 amd64 [installed,automatic] +pinentry-curses/testing,now 1.3.1-2 amd64 [installed,automatic] +pkgconf-bin/testing,now 1.8.1-4 amd64 [installed,automatic] +pkgconf/testing,now 1.8.1-4 amd64 [installed,automatic] +procps/testing,now 2:4.0.4-7 amd64 [installed,automatic] +psmisc/testing,now 23.7-1 amd64 [installed,automatic] +publicsuffix/testing,now 20250108.1153-0.1 all [installed,automatic] +python3-autocommand/testing,now 2.2.2-3 all [installed,automatic] +python3-inflect/testing,now 7.3.1-2 all [installed,automatic] +python3-jaraco.context/testing,now 6.0.0-1 all [installed,automatic] +python3-jaraco.functools/testing,now 4.1.0-1 all [installed,automatic] +python3-jaraco.text/testing,now 4.0.0-1 all [installed,automatic] +python3-mako/testing,now 1.3.8-2 all [installed,automatic] +python3-markdown/testing,now 3.7-2 all [installed,automatic] +python3-markupsafe/testing,now 2.1.5-1+b2 amd64 [installed,automatic] +python3-minimal/testing,now 3.13.1-2 amd64 [installed,automatic] +python3-more-itertools/testing,now 10.6.0-1 all [installed,automatic] +python3-packaging/testing,now 24.2-1 all [installed,automatic] +python3-pkg-resources/testing,now 75.6.0-1 all [installed,automatic] +python3-pygments/testing,now 2.18.0+dfsg-2 all [installed,automatic] +python3-setuptools/testing,now 75.6.0-1 all [installed,automatic] +python3-typeguard/testing,now 4.4.1-1 all [installed,automatic] +python3-typing-extensions/testing,now 4.12.2-2 all [installed,automatic] +python3-yaml/testing,now 6.0.2-1+b1 amd64 [installed,automatic] +python3-zipp/testing,now 3.21.0-1 all [installed,automatic] +python3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3.13/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3/testing,now 3.13.1-2 amd64 [installed,automatic] +readline-common/testing,now 8.2-6 all [installed,automatic] +rpcsvc-proto/testing,now 1.4.3-1 amd64 [installed,automatic] +sed/testing,now 4.9-2 amd64 [installed,automatic] +sensible-utils/testing,now 0.0.24 all [installed,automatic] +sgml-base/testing,now 1.31 all [installed,automatic] +shared-mime-info/testing,now 2.4-5+b2 amd64 [installed,automatic] +sqv/testing,now 1.2.1-5 amd64 [installed,automatic] +systemd-cryptsetup/testing,now 257.2-3 amd64 [installed,automatic] +systemd-sysv/testing,now 257.2-3 amd64 [installed,automatic] +systemd-timesyncd/testing,now 257.2-3 amd64 [installed,automatic] +systemd/testing,now 257.2-3 amd64 [installed,automatic] +sysvinit-utils/testing,now 3.13-1 amd64 [installed,automatic] +tar/testing,now 1.35+dfsg-3.1 amd64 [installed,automatic] +tcl-expect/testing,now 5.45.4-3+b1 amd64 [installed,automatic] +tcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +tzdata/testing,now 2024b-6 all [installed,automatic] +util-linux/testing,now 2.40.4-2 amd64 [installed,automatic] +uuid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +wayland-protocols/testing,now 1.39-1 all [installed,automatic] +wget/testing,now 1.24.5-2+b1 amd64 [installed] +x11-common/testing,now 1:7.7+24 all [installed,automatic] +x11-xkb-utils/testing,now 7.7+9 amd64 [installed,automatic] +x11proto-dev/testing,now 2024.1-1 all [installed,automatic] +xauth/testing,now 1:1.1.2-1.1 amd64 [installed,automatic] +xdg-user-dirs/testing,now 0.18-2 amd64 [installed,automatic] +xkb-data/testing,now 2.42-1 all [installed,automatic] +xml-core/testing,now 0.19 all [installed,automatic] +xorg-sgml-doctools/testing,now 1:1.11-1.1 all [installed,automatic] +xtrans-dev/testing,now 1.4.0-1 all [installed,automatic] +xz-utils/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +zlib1g-dev/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +zlib1g/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +Errors detected in the build 0 +Warnings detected in the logs 96 +cppcheck defects detected in the logs 28 +TOTAL warnings detected in the logs 124 diff --git a/2025-02-06-165420-14522-1@28c310f42d33_master/report-37cb39.html b/2025-02-06-165420-14522-1@28c310f42d33_master/report-37cb39.html new file mode 100644 index 0000000..503ff1b --- /dev/null +++ b/2025-02-06-165420-14522-1@28c310f42d33_master/report-37cb39.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 248, column 21
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-165420-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"2.0.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
This statement is never executed
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-165420-14522-1@28c310f42d33_master/report-523ef4.html b/2025-02-06-165420-14522-1@28c310f42d33_master/report-523ef4.html new file mode 100644 index 0000000..f3b4acd --- /dev/null +++ b/2025-02-06-165420-14522-1@28c310f42d33_master/report-523ef4.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 199, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-165420-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"2.0.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
This statement is never executed
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-165420-14522-1@28c310f42d33_master/report-5ce420.html b/2025-02-06-165420-14522-1@28c310f42d33_master/report-5ce420.html new file mode 100644 index 0000000..011d948 --- /dev/null +++ b/2025-02-06-165420-14522-1@28c310f42d33_master/report-5ce420.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 194, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-165420-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"2.0.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
This statement is never executed
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-165420-14522-1@28c310f42d33_master/report-5d4bc8.html b/2025-02-06-165420-14522-1@28c310f42d33_master/report-5d4bc8.html new file mode 100644 index 0000000..83ae2b9 --- /dev/null +++ b/2025-02-06-165420-14522-1@28c310f42d33_master/report-5d4bc8.html @@ -0,0 +1,1609 @@ + + + +/rootdir/libcafekbd/tmp-introspectq8aoqnje/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspectq8aoqnje/Cafekbd-1.0.c
Warning:line 89, column 13
File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/libxml2 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-165420-14522-1 -x c /rootdir/libcafekbd/tmp-introspectq8aoqnje/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
14
Loop condition is true. Entering loop body
28
Loop condition is true. Entering loop body
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
15
Assuming this stream operation fails
29
File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior
90 if (ret
15.1
'ret' is equal to 0
== 0)
16
Taking true branch
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out
16.1
'len_out' is not equal to NULL
!= NULL((void*)0))
17
Taking true branch
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
6
Assuming 'args' is not equal to NULL
7
Taking false branch
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
8
Assuming 'self' is non-null
9
Taking false branch
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input
9.1
'input' is not equal to NULL
== NULL((void*)0))
10
Taking false branch
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output
10.1
'output' is not equal to NULL
== NULL((void*)0))
11
Taking false branch
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
12
Loop condition is true. Entering loop body
26
Loop condition is true. Entering loop body
702 {
703 gsize len;
704 char *line = read_line (input, &len);
13
Calling 'read_line'
18
Returning from 'read_line'
27
Calling 'read_line'
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
19
Assuming 'line' is not equal to NULL
20
Assuming the condition is false
21
Taking false branch
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
22
Assuming the condition is false
23
Taking false branch
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
24
Assuming the condition is false
25
Taking false branch
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
742
743 if (quark == 0)
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
1
Assuming 'argc' is equal to 2
2
'?' condition is false
3
Assuming the condition is false
4
Taking false branch
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
5
Calling 'dump_irepository'
811 {
812 g_printerr ("%s\n", error->message);
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-165420-14522-1@28c310f42d33_master/report-891289.html b/2025-02-06-165420-14522-1@28c310f42d33_master/report-891289.html new file mode 100644 index 0000000..275e51a --- /dev/null +++ b/2025-02-06-165420-14522-1@28c310f42d33_master/report-891289.html @@ -0,0 +1,1603 @@ + + + +/rootdir/libcafekbd/tmp-introspectq8aoqnje/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspectq8aoqnje/Cafekbd-1.0.c
Warning:line 812, column 27
Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error')
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/libxml2 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-165420-14522-1 -x c /rootdir/libcafekbd/tmp-introspectq8aoqnje/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
90 if (ret == 0)
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out != NULL((void*)0))
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
21
Assuming the condition is false
22
Taking false branch
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
23
Returning without writing to '*error'
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
7
Assuming 'args' is not equal to NULL
8
Taking false branch
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
9
Assuming 'self' is non-null
10
Taking false branch
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input
10.1
'input' is not equal to NULL
== NULL((void*)0))
11
Taking false branch
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output
11.1
'output' is not equal to NULL
== NULL((void*)0))
12
Taking false branch
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
13
Loop condition is true. Entering loop body
702 {
703 gsize len;
704 char *line = read_line (input, &len);
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
14
Assuming 'line' is not equal to NULL
15
Assuming the condition is false
16
Taking false branch
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
17
Assuming the condition is false
18
Taking false branch
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
19
Taking true branch
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
20
Calling 'invoke_error_quark'
24
Returning from 'invoke_error_quark'
742
743 if (quark == 0)
25
Assuming 'quark' is equal to 0
26
Taking true branch
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
27
Returning without writing to '*error'
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
1
'error' initialized to a null pointer value
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
2
Assuming 'argc' is equal to 2
3
'?' condition is false
4
Assuming the condition is false
5
Taking false branch
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
6
Calling 'dump_irepository'
28
Returning from 'dump_irepository'
29
Taking true branch
811 {
812 g_printerr ("%s\n", error->message);
30
Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error')
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-165420-14522-1@28c310f42d33_master/report-9361af.html b/2025-02-06-165420-14522-1@28c310f42d33_master/report-9361af.html new file mode 100644 index 0000000..7c67a2a --- /dev/null +++ b/2025-02-06-165420-14522-1@28c310f42d33_master/report-9361af.html @@ -0,0 +1,1609 @@ + + + +/rootdir/libcafekbd/tmp-introspectq8aoqnje/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspectq8aoqnje/Cafekbd-1.0.c
Warning:line 89, column 13
Read function called when stream is in EOF state. Function has no effect
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/libxml2 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-165420-14522-1 -x c /rootdir/libcafekbd/tmp-introspectq8aoqnje/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
14
Loop condition is true. Entering loop body
28
Loop condition is true. Entering loop body
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
15
Assuming stream reaches end-of-file here
29
Read function called when stream is in EOF state. Function has no effect
90 if (ret
15.1
'ret' is equal to 0
== 0)
16
Taking true branch
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out
16.1
'len_out' is not equal to NULL
!= NULL((void*)0))
17
Taking true branch
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
6
Assuming 'args' is not equal to NULL
7
Taking false branch
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
8
Assuming 'self' is non-null
9
Taking false branch
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input
9.1
'input' is not equal to NULL
== NULL((void*)0))
10
Taking false branch
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output
10.1
'output' is not equal to NULL
== NULL((void*)0))
11
Taking false branch
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
12
Loop condition is true. Entering loop body
26
Loop condition is true. Entering loop body
702 {
703 gsize len;
704 char *line = read_line (input, &len);
13
Calling 'read_line'
18
Returning from 'read_line'
27
Calling 'read_line'
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
19
Assuming 'line' is not equal to NULL
20
Assuming the condition is false
21
Taking false branch
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
22
Assuming the condition is false
23
Taking false branch
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
24
Assuming the condition is false
25
Taking false branch
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
742
743 if (quark == 0)
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
1
Assuming 'argc' is equal to 2
2
'?' condition is false
3
Assuming the condition is false
4
Taking false branch
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
5
Calling 'dump_irepository'
811 {
812 g_printerr ("%s\n", error->message);
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-165420-14522-1@28c310f42d33_master/report-b4532a.html b/2025-02-06-165420-14522-1@28c310f42d33_master/report-b4532a.html new file mode 100644 index 0000000..ec2a097 --- /dev/null +++ b/2025-02-06-165420-14522-1@28c310f42d33_master/report-b4532a.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 228, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-165420-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"2.0.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
This statement is never executed
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-165420-14522-1@28c310f42d33_master/report-c098bd.html b/2025-02-06-165420-14522-1@28c310f42d33_master/report-c098bd.html new file mode 100644 index 0000000..4d9c28e --- /dev/null +++ b/2025-02-06-165420-14522-1@28c310f42d33_master/report-c098bd.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 187, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-165420-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"2.0.0");
This statement is never executed
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-165420-14522-1@28c310f42d33_master/report-e0f2de.html b/2025-02-06-165420-14522-1@28c310f42d33_master/report-e0f2de.html new file mode 100644 index 0000000..78afeca --- /dev/null +++ b/2025-02-06-165420-14522-1@28c310f42d33_master/report-e0f2de.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 225, column 3
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-165420-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"2.0.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
This statement is never executed
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-165420-14522-1@28c310f42d33_master/report-fb6164.html b/2025-02-06-165420-14522-1@28c310f42d33_master/report-fb6164.html new file mode 100644 index 0000000..fea95b7 --- /dev/null +++ b/2025-02-06-165420-14522-1@28c310f42d33_master/report-fb6164.html @@ -0,0 +1,1504 @@ + + + +/rootdir/libcafekbd/tmp-introspectq8aoqnje/Cafekbd-1.0.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:libcafekbd/tmp-introspectq8aoqnje/Cafekbd-1.0.c
Warning:line 239, column 11
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Cafekbd-1.0.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/libcafekbd -fcoverage-compilation-dir=/rootdir/libcafekbd -resource-dir /usr/lib/llvm-19/lib/clang/19 -D G_LOG_DOMAIN="CafeKbdIndicator" -D DATADIR="/usr/share" -D SYSCONFDIR="/usr/etc" -D LIBDIR="/usr/lib" -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/libxml2 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /rootdir -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -I /rootdir/intl -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-deprecated-declarations -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-165420-14522-1 -x c /rootdir/libcafekbd/tmp-introspectq8aoqnje/Cafekbd-1.0.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/* This file is generated, do not edit */
2
3#undef GLIB_VERSION_MIN_REQUIRED((((2) << 16 | (82) << 8)))
4#undef GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (82) << 8)))
5
6#include <glib.h>
7#include <string.h>
8#include <stdlib.h>
9
10/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
11 * GObject introspection: Dump introspection data
12 *
13 * Copyright (C) 2008 Colin Walters <walters@verbum.org>
14 *
15 * SPDX-License-Identifier: LGPL-2.1-or-later
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33/* This file is both compiled into libgirepository.so, and installed
34 * on the filesystem. But for the dumper, we want to avoid linking
35 * to libgirepository; see
36 * https://bugzilla.gnome.org/show_bug.cgi?id=630342
37 */
38#ifdef G_IREPOSITORY_COMPILATION
39#include "config.h"
40#include "girepository.h"
41#endif
42
43#include <glib.h>
44#include <glib-object.h>
45#include <gmodule.h>
46
47#include <stdlib.h>
48#include <stdio.h>
49#include <string.h>
50
51/* Analogue of g_output_stream_write_all(). */
52static gboolean
53write_all (FILE *out,
54 const void *buffer,
55 gsize count,
56 gsize *bytes_written,
57 GError **error)
58{
59 size_t ret;
60
61 ret = fwrite (buffer, 1, count, out);
62
63 if (bytes_written != NULL((void*)0))
64 *bytes_written = ret;
65
66 if (ret < count)
67 {
68 g_set_error (error, G_FILE_ERRORg_file_error_quark (), G_FILE_ERROR_FAILED,
69 "Failed to write to file");
70 return FALSE(0);
71 }
72
73 return TRUE(!(0));
74}
75
76/* Analogue of g_data_input_stream_read_line(). */
77static char *
78read_line (FILE *input,
79 size_t *len_out)
80{
81 GByteArray *buffer = g_byte_array_new ();
82 const guint8 nul = '\0';
83
84 while (TRUE(!(0)))
85 {
86 size_t ret;
87 guint8 byte;
88
89 ret = fread (&byte, 1, 1, input);
90 if (ret == 0)
91 break;
92
93 if (byte == '\n')
94 break;
95
96 g_byte_array_append (buffer, &byte, 1);
97 }
98
99 g_byte_array_append (buffer, &nul, 1);
100
101 if (len_out != NULL((void*)0))
102 *len_out = buffer->len - 1; /* dont include terminating nul */
103
104 return (char *) g_byte_array_free (buffer, FALSE(0));
105}
106
107static void
108escaped_printf (FILE *out, const char *fmt, ...) G_GNUC_PRINTF (2, 3)__attribute__((__format__ (__printf__, 2, 3)));
109
110static void
111escaped_printf (FILE *out, const char *fmt, ...)
112{
113 char *str;
114 va_list args;
115 gsize written;
116 GError *error = NULL((void*)0);
117
118 va_start (args, fmt)__builtin_va_start(args, fmt);
119
120 str = g_markup_vprintf_escaped (fmt, args);
121 if (!write_all (out, str, strlen (str), &written, &error))
122 {
123 g_critical ("failed to write to iochannel: %s", error->message);
124 g_clear_error (&error);
125 }
126 g_free (str);
127
128 va_end (args)__builtin_va_end(args);
129}
130
131static void
132goutput_write (FILE *out, const char *str)
133{
134 gsize written;
135 GError *error = NULL((void*)0);
136 if (!write_all (out, str, strlen (str), &written, &error))
137 {
138 g_critical ("failed to write to iochannel: %s", error->message);
139 g_clear_error (&error);
140 }
141}
142
143typedef GType (*GetTypeFunc)(void);
144typedef GQuark (*ErrorQuarkFunc)(void);
145
146static GType
147invoke_get_type (GModule *self, const char *symbol, GError **error)
148{
149 GetTypeFunc sym;
150 GType ret;
151
152 if (!g_module_symbol (self, symbol, (void**)&sym))
153 {
154 g_set_error (error,
155 G_FILE_ERRORg_file_error_quark (),
156 G_FILE_ERROR_FAILED,
157 "Failed to find symbol '%s'", symbol);
158 return G_TYPE_INVALID((GType) ((0) << (2)));
159 }
160
161 ret = sym ();
162 if (ret == G_TYPE_INVALID((GType) ((0) << (2))))
163 {
164 g_set_error (error,
165 G_FILE_ERRORg_file_error_quark (),
166 G_FILE_ERROR_FAILED,
167 "Function '%s' returned G_TYPE_INVALID", symbol);
168 }
169 return ret;
170}
171
172static GQuark
173invoke_error_quark (GModule *self, const char *symbol, GError **error)
174{
175 ErrorQuarkFunc sym;
176
177 if (!g_module_symbol (self, symbol, (void**)&sym))
178 {
179 g_set_error (error,
180 G_FILE_ERRORg_file_error_quark (),
181 G_FILE_ERROR_FAILED,
182 "Failed to find symbol '%s'", symbol);
183 return G_TYPE_INVALID((GType) ((0) << (2)));
184 }
185
186 return sym ();
187}
188
189static char *
190value_transform_to_string (const GValue *value)
191{
192 GValue tmp = G_VALUE_INIT{ 0, { { 0 } } };
193 char *s = NULL((void*)0);
194
195 g_value_init (&tmp, G_TYPE_STRING((GType) ((16) << (2))));
196
197 if (g_value_transform (value, &tmp))
198 {
199 const char *str = g_value_get_string (&tmp);
200
201 if (str != NULL((void*)0))
202 s = g_strescape (str, NULL((void*)0));
203 }
204
205 g_value_unset (&tmp);
206
207 return s;
208}
209
210/* A simpler version of g_strdup_value_contents(), but with stable
211 * output and less complex semantics
212 */
213static char *
214value_to_string (const GValue *value)
215{
216 if (value == NULL((void*)0))
217 return NULL((void*)0);
218
219 if (G_VALUE_HOLDS_STRING (value)(((__extension__ ({ const GValue *__val = (const GValue*) ((value
)); GType __t = (((GType) ((16) << (2)))); gboolean __r
; if (!__val) __r = (0); else if (__val->g_type == __t) __r
= (!(0)); else __r = g_type_check_value_holds (__val, __t); __r
; }))))
)
220 {
221 const char *s = g_value_get_string (value);
222
223 if (s == NULL((void*)0))
224 return g_strdup ("NULL")g_strdup_inline ("NULL");
225
226 return g_strescape (s, NULL((void*)0));
227 }
228 else
229 {
230 GType value_type = G_VALUE_TYPE (value)(((GValue*) (value))->g_type);
231
232 switch (G_TYPE_FUNDAMENTAL (value_type)(g_type_fundamental (value_type)))
233 {
234 case G_TYPE_BOXED((GType) ((18) << (2))):
235 if (g_value_get_boxed (value) == NULL((void*)0))
236 return NULL((void*)0);
237 else
238 return value_transform_to_string (value);
239 break;
This statement is never executed
240
241 case G_TYPE_OBJECT((GType) ((20) << (2))):
242 if (g_value_get_object (value) == NULL((void*)0))
243 return NULL((void*)0);
244 else
245 return value_transform_to_string (value);
246 break;
247
248 case G_TYPE_POINTER((GType) ((17) << (2))):
249 return NULL((void*)0);
250
251 default:
252 return value_transform_to_string (value);
253 }
254 }
255
256 return NULL((void*)0);
257}
258
259static void
260dump_properties (GType type, FILE *out)
261{
262 guint i;
263 guint n_properties = 0;
264 GParamSpec **props;
265
266 if (G_TYPE_FUNDAMENTAL (type)(g_type_fundamental (type)) == G_TYPE_OBJECT((GType) ((20) << (2))))
267 {
268 GObjectClass *klass;
269 klass = g_type_class_ref (type);
270 props = g_object_class_list_properties (klass, &n_properties);
271 }
272 else
273 {
274 void *klass;
275 klass = g_type_default_interface_ref (type);
276 props = g_object_interface_list_properties (klass, &n_properties);
277 }
278
279 for (i = 0; i < n_properties; i++)
280 {
281 GParamSpec *prop;
282
283 prop = props[i];
284 if (prop->owner_type != type)
285 continue;
286
287 const GValue *v = g_param_spec_get_default_value (prop);
288 char *default_value = value_to_string (v);
289
290 if (v != NULL((void*)0) && default_value != NULL((void*)0))
291 {
292 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\" default-value=\"%s\"/>\n",
293 prop->name,
294 g_type_name (prop->value_type),
295 prop->flags,
296 default_value);
297 }
298 else
299 {
300 escaped_printf (out, " <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
301 prop->name,
302 g_type_name (prop->value_type),
303 prop->flags);
304 }
305
306 g_free (default_value);
307 }
308
309 g_free (props);
310}
311
312static void
313dump_signals (GType type, FILE *out)
314{
315 guint i;
316 guint n_sigs;
317 guint *sig_ids;
318
319 sig_ids = g_signal_list_ids (type, &n_sigs);
320 for (i = 0; i < n_sigs; i++)
321 {
322 guint sigid;
323 GSignalQuery query;
324 guint j;
325
326 sigid = sig_ids[i];
327 g_signal_query (sigid, &query);
328
329 escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
330 query.signal_name, g_type_name (query.return_type));
331
332 if (query.signal_flags & G_SIGNAL_RUN_FIRST)
333 escaped_printf (out, " when=\"first\"");
334 else if (query.signal_flags & G_SIGNAL_RUN_LAST)
335 escaped_printf (out, " when=\"last\"");
336 else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
337 escaped_printf (out, " when=\"cleanup\"");
338 else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
339 escaped_printf (out, " when=\"must-collect\"");
340 if (query.signal_flags & G_SIGNAL_NO_RECURSE)
341 escaped_printf (out, " no-recurse=\"1\"");
342
343 if (query.signal_flags & G_SIGNAL_DETAILED)
344 escaped_printf (out, " detailed=\"1\"");
345
346 if (query.signal_flags & G_SIGNAL_ACTION)
347 escaped_printf (out, " action=\"1\"");
348
349 if (query.signal_flags & G_SIGNAL_NO_HOOKS)
350 escaped_printf (out, " no-hooks=\"1\"");
351
352 goutput_write (out, ">\n");
353
354 for (j = 0; j < query.n_params; j++)
355 {
356 escaped_printf (out, " <param type=\"%s\"/>\n",
357 g_type_name (query.param_types[j]));
358 }
359 goutput_write (out, " </signal>\n");
360 }
361 g_free (sig_ids);
362}
363
364static void
365dump_object_type (GType type, const char *symbol, FILE *out)
366{
367 guint n_interfaces;
368 guint i;
369 GType *interfaces;
370
371 escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
372 g_type_name (type), symbol);
373 if (type != G_TYPE_OBJECT((GType) ((20) << (2))))
374 {
375 GString *parent_str;
376 GType parent;
377 gboolean first = TRUE(!(0));
378
379 parent = g_type_parent (type);
380 parent_str = g_string_new ("");
381 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
382 {
383 if (first)
384 first = FALSE(0);
385 else
386 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
387 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
388 parent = g_type_parent (parent);
389 }
390
391 escaped_printf (out, " parents=\"%s\"", parent_str->str);
392
393 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
394 }
395
396 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
397 escaped_printf (out, " abstract=\"1\"");
398
399 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
400 escaped_printf (out, " final=\"1\"");
401
402 goutput_write (out, ">\n");
403
404 interfaces = g_type_interfaces (type, &n_interfaces);
405 for (i = 0; i < n_interfaces; i++)
406 {
407 GType itype = interfaces[i];
408 escaped_printf (out, " <implements name=\"%s\"/>\n",
409 g_type_name (itype));
410 }
411 g_free (interfaces);
412
413 dump_properties (type, out);
414 dump_signals (type, out);
415 goutput_write (out, " </class>\n");
416}
417
418static void
419dump_interface_type (GType type, const char *symbol, FILE *out)
420{
421 guint n_interfaces;
422 guint i;
423 GType *interfaces;
424
425 escaped_printf (out, " <interface name=\"%s\" get-type=\"%s\">\n",
426 g_type_name (type), symbol);
427
428 interfaces = g_type_interface_prerequisites (type, &n_interfaces);
429 for (i = 0; i < n_interfaces; i++)
430 {
431 GType itype = interfaces[i];
432 if (itype == G_TYPE_OBJECT((GType) ((20) << (2))))
433 {
434 /* Treat this as implicit for now; in theory GInterfaces are
435 * supported on things like GstMiniObject, but right now
436 * the introspection system only supports GObject.
437 * http://bugzilla.gnome.org/show_bug.cgi?id=559706
438 */
439 continue;
440 }
441 escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
442 g_type_name (itype));
443 }
444 g_free (interfaces);
445
446 dump_properties (type, out);
447 dump_signals (type, out);
448 goutput_write (out, " </interface>\n");
449}
450
451static void
452dump_boxed_type (GType type, const char *symbol, FILE *out)
453{
454 escaped_printf (out, " <boxed name=\"%s\" get-type=\"%s\"/>\n",
455 g_type_name (type), symbol);
456}
457
458static void
459dump_pointer_type (GType type, const char *symbol, FILE *out)
460{
461 escaped_printf (out, " <pointer name=\"%s\" get-type=\"%s\"/>\n",
462 g_type_name (type), symbol);
463}
464
465static void
466dump_flags_type (GType type, const char *symbol, FILE *out)
467{
468 guint i;
469 GFlagsClass *klass;
470
471 klass = g_type_class_ref (type);
472 escaped_printf (out, " <flags name=\"%s\" get-type=\"%s\">\n",
473 g_type_name (type), symbol);
474
475 for (i = 0; i < klass->n_values; i++)
476 {
477 GFlagsValue *value = &(klass->values[i]);
478
479 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%u\"/>\n",
480 value->value_name, value->value_nick, value->value);
481 }
482 goutput_write (out, " </flags>\n");
483}
484
485static void
486dump_enum_type (GType type, const char *symbol, FILE *out)
487{
488 guint i;
489 GEnumClass *klass;
490
491 klass = g_type_class_ref (type);
492 escaped_printf (out, " <enum name=\"%s\" get-type=\"%s\">\n",
493 g_type_name (type), symbol);
494
495 for (i = 0; i < klass->n_values; i++)
496 {
497 GEnumValue *value = &(klass->values[i]);
498
499 escaped_printf (out, " <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
500 value->value_name, value->value_nick, value->value);
501 }
502 goutput_write (out, " </enum>");
503}
504
505static void
506dump_fundamental_type (GType type, const char *symbol, FILE *out)
507{
508 guint n_interfaces;
509 guint i;
510 GType *interfaces;
511 GString *parent_str;
512 GType parent;
513 gboolean first = TRUE(!(0));
514
515
516 escaped_printf (out, " <fundamental name=\"%s\" get-type=\"%s\"",
517 g_type_name (type), symbol);
518
519 if (G_TYPE_IS_ABSTRACT (type)(g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)))
520 escaped_printf (out, " abstract=\"1\"");
521
522 if (G_TYPE_IS_FINAL (type)(g_type_test_flags ((type), G_TYPE_FLAG_FINAL)))
523 escaped_printf (out, " final=\"1\"");
524
525 if (G_TYPE_IS_INSTANTIATABLE (type)(g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)))
526 escaped_printf (out, " instantiatable=\"1\"");
527
528 parent = g_type_parent (type);
529 parent_str = g_string_new ("");
530 while (parent != G_TYPE_INVALID((GType) ((0) << (2))))
531 {
532 if (first)
533 first = FALSE(0);
534 else
535 g_string_append_c (parent_str, ',')g_string_append_c_inline (parent_str, ',');
536 if (!g_type_name (parent))
537 break;
538 g_string_append (parent_str, g_type_name (parent))(__builtin_constant_p (g_type_name (parent)) ? __extension__ (
{ const char * const __val = (g_type_name (parent)); g_string_append_len_inline
(parent_str, __val, (__val != ((void*)0)) ? (gssize) strlen (
((__val) + !(__val))) : (gssize) -1); }) : g_string_append_len_inline
(parent_str, g_type_name (parent), (gssize) -1))
;
539 parent = g_type_parent (parent);
540 }
541
542 if (parent_str->len > 0)
543 escaped_printf (out, " parents=\"%s\"", parent_str->str);
544 g_string_free (parent_str, TRUE)(__builtin_constant_p ((!(0))) ? (((!(0))) ? (g_string_free) (
(parent_str), ((!(0)))) : g_string_free_and_steal (parent_str
)) : (g_string_free) ((parent_str), ((!(0)))))
;
545
546 goutput_write (out, ">\n");
547
548 interfaces = g_type_interfaces (type, &n_interfaces);
549 for (i = 0; i < n_interfaces; i++)
550 {
551 GType itype = interfaces[i];
552 escaped_printf (out, " <implements name=\"%s\"/>\n",
553 g_type_name (itype));
554 }
555 g_free (interfaces);
556 goutput_write (out, " </fundamental>\n");
557}
558
559static void
560dump_type (GType type, const char *symbol, FILE *out)
561{
562 /* XXX: We need to ensure that global ancillary structures like
563 * GParamSpecPool are initialized before we use the GType and
564 * GObject reflection API to poke at things like properties and
565 * signals; we cannot rely on GObject being instantiated at this
566 * point.
567 */
568 GObjectClass *gobject_class = g_type_class_ref (G_TYPE_OBJECT((GType) ((20) << (2))));
569
570 switch (g_type_fundamental (type))
571 {
572 case G_TYPE_OBJECT((GType) ((20) << (2))):
573 dump_object_type (type, symbol, out);
574 break;
575 case G_TYPE_INTERFACE((GType) ((2) << (2))):
576 dump_interface_type (type, symbol, out);
577 break;
578 case G_TYPE_BOXED((GType) ((18) << (2))):
579 dump_boxed_type (type, symbol, out);
580 break;
581 case G_TYPE_FLAGS((GType) ((13) << (2))):
582 dump_flags_type (type, symbol, out);
583 break;
584 case G_TYPE_ENUM((GType) ((12) << (2))):
585 dump_enum_type (type, symbol, out);
586 break;
587 case G_TYPE_POINTER((GType) ((17) << (2))):
588 dump_pointer_type (type, symbol, out);
589 break;
590 default:
591 dump_fundamental_type (type, symbol, out);
592 break;
593 }
594
595 g_type_class_unref ((GTypeClass *) gobject_class);
596}
597
598static void
599dump_error_quark (GQuark quark, const char *symbol, FILE *out)
600{
601 escaped_printf (out, " <error-quark function=\"%s\" domain=\"%s\"/>\n",
602 symbol, g_quark_to_string (quark));
603}
604
605/**
606 * g_irepository_dump:
607 * @input_filename: (type filename): Input filename (for example `input.txt`)
608 * @output_filename: (type filename): Output filename (for example `output.xml`)
609 * @error: a %GError
610 *
611 * Dump the introspection data from the types specified in @input_filename to
612 * @output_filename.
613 *
614 * The input file should be a
615 * UTF-8 Unix-line-ending text file, with each line containing either
616 * `get-type:` followed by the name of a [type@GObject.Type] `_get_type`
617 * function, or `error-quark:` followed by the name of an error quark function.
618 * No extra whitespace is allowed.
619 *
620 * This function will overwrite the contents of the output file.
621 *
622 * Returns: true on success, false on error
623 * Since: 2.80
624 */
625#ifndef G_IREPOSITORY_COMPILATION
626static gboolean
627dump_irepository (const char *arg,
628 GError **error) G_GNUC_UNUSED__attribute__ ((__unused__));
629static gboolean
630dump_irepository (const char *arg,
631 GError **error)
632#else
633gboolean
634g_irepository_dump (const char *arg,
635 GError **error)
636#endif
637{
638 GHashTable *output_types;
639 FILE *input;
640 FILE *output;
641 GModule *self;
642 gboolean caught_error = FALSE(0);
643
644 char **args = g_strsplit (arg, ",", 2);
645 if (args == NULL((void*)0))
646 {
647 g_set_error (error,
648 G_FILE_ERRORg_file_error_quark (),
649 G_FILE_ERROR_FAILED,
650 "Usage: --introspect-dump=input,output");
651 return FALSE(0);
652 }
653
654 const char *input_filename = args[0];
655 const char *output_filename = args[1];
656
657 self = g_module_open (NULL((void*)0), 0);
658 if (!self)
659 {
660 g_set_error (error,
661 G_FILE_ERRORg_file_error_quark (),
662 G_FILE_ERROR_FAILED,
663 "failed to open self: %s",
664 g_module_error ());
665 g_strfreev (args);
666 return FALSE(0);
667 }
668
669 input = fopen (input_filename, "rb");
670 if (input == NULL((void*)0))
671 {
672 int saved_errno = errno(*__errno_location ());
673 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
674 "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
675
676 g_module_close (self);
677 g_strfreev (args);
678
679 return FALSE(0);
680 }
681
682 output = fopen (output_filename, "wb");
683 if (output == NULL((void*)0))
684 {
685 int saved_errno = errno(*__errno_location ());
686 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
687 "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
688
689 fclose (input);
690 g_module_close (self);
691 g_strfreev (args);
692
693 return FALSE(0);
694 }
695
696 goutput_write (output, "<?xml version=\"1.0\"?>\n");
697 goutput_write (output, "<dump>\n");
698
699 output_types = g_hash_table_new (NULL((void*)0), NULL((void*)0));
700
701 while (TRUE(!(0)))
702 {
703 gsize len;
704 char *line = read_line (input, &len);
705 const char *function;
706
707 if (line == NULL((void*)0) || *line == '\0')
708 {
709 g_free (line);
710 break;
711 }
712
713 g_strchomp (line);
714
715 if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
716 {
717 GType type;
718
719 function = line + strlen ("get-type:");
720
721 type = invoke_get_type (self, function, error);
722
723 if (type == G_TYPE_INVALID((GType) ((0) << (2))))
724 {
725 g_printerr ("Invalid GType function: '%s'\n", function);
726 caught_error = TRUE(!(0));
727 g_free (line);
728 break;
729 }
730
731 if (g_hash_table_lookup (output_types, (gpointer) type))
732 goto next;
733 g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
734
735 dump_type (type, function, output);
736 }
737 else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
738 {
739 GQuark quark;
740 function = line + strlen ("error-quark:");
741 quark = invoke_error_quark (self, function, error);
742
743 if (quark == 0)
744 {
745 g_printerr ("Invalid error quark function: '%s'\n", function);
746 caught_error = TRUE(!(0));
747 g_free (line);
748 break;
749 }
750
751 dump_error_quark (quark, function, output);
752 }
753
754
755 next:
756 g_free (line);
757 }
758
759 g_hash_table_destroy (output_types);
760
761 goutput_write (output, "</dump>\n");
762
763 {
764 /* Avoid overwriting an earlier set error */
765 if (fclose (input) != 0 && !caught_error)
766 {
767 int saved_errno = errno(*__errno_location ());
768
769 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
770 "Error closing input file %s: %s", input_filename,
771 g_strerror (saved_errno));
772 caught_error = TRUE(!(0));
773 }
774
775 if (fclose (output) != 0 && !caught_error)
776 {
777 int saved_errno = errno(*__errno_location ());
778
779 g_set_error (error, G_FILE_ERRORg_file_error_quark (), g_file_error_from_errno (saved_errno),
780 "Error closing output file %s: %s", output_filename,
781 g_strerror (saved_errno));
782 caught_error = TRUE(!(0));
783 }
784 }
785
786 g_strfreev (args);
787
788 return !caught_error;
789}
790
791
792int
793main(int argc, char **argv)
794{
795 GError *error = NULL((void*)0);
796 const char *introspect_dump_prefix = "--introspect-dump=";
797
798#if !GLIB_CHECK_VERSION(2,35,0)(2 > (2) || (2 == (2) && 82 > (35)) || (2 == (2
) && 82 == (35) && 4 >= (0)))
799 g_type_init ();
800#endif
801
802
803
804 if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix)(__builtin_constant_p (introspect_dump_prefix)? __extension__
({ const char * const __str = (argv[1]); const char * const __prefix
= (introspect_dump_prefix); gboolean __result = (0); if (__str
== ((void*)0) || __prefix == ((void*)0)) __result = (g_str_has_prefix
) (__str, __prefix); else { const size_t __str_len = strlen (
((__str) + !(__str))); const size_t __prefix_len = strlen (((
__prefix) + !(__prefix))); if (__str_len >= __prefix_len) __result
= memcmp (((__str) + !(__str)), ((__prefix) + !(__prefix)), __prefix_len
) == 0; } __result; }) : (g_str_has_prefix) (argv[1], introspect_dump_prefix
) )
)
805 {
806 g_printerr ("Usage: %s --introspect-dump=input,output", argv[0]);
807 exit (1);
808 }
809
810 if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
811 {
812 g_printerr ("%s\n", error->message);
813 exit (1);
814 }
815 exit (0);
816}
817extern GType cafekbd_indicator_get_type(void);
818extern GType cafekbd_status_get_type(void);
819extern GType cafekbd_keyboard_drawing_get_type(void);
820G_MODULE_EXPORT__attribute__((visibility("default"))) GType (*GI_GET_TYPE_FUNCS_[])(void) = {
821 cafekbd_indicator_get_type,
822 cafekbd_status_get_type,
823 cafekbd_keyboard_drawing_get_type
824};
diff --git a/2025-02-06-165420-14522-1@28c310f42d33_master/report-ff92e7.html b/2025-02-06-165420-14522-1@28c310f42d33_master/report-ff92e7.html new file mode 100644 index 0000000..c55f01e --- /dev/null +++ b/2025-02-06-165420-14522-1@28c310f42d33_master/report-ff92e7.html @@ -0,0 +1,964 @@ + + + +cafekbd-keyboard-drawing-test.c + + + + + + + + + + + + + + + + + + + + + + + + + + +

Bug Summary

+ + + + +
File:test/cafekbd-keyboard-drawing-test.c
Warning:line 256, column 21
This statement is never executed
+ +

Annotated Source Code

+

Press '?' + to see keyboard shortcuts

+ + +
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafekbd-keyboard-drawing-test.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/test -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/libxml2 -D CAFELOCALEDIR="/usr/share/locale" -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-02-06-165420-14522-1 -x c cafekbd-keyboard-drawing-test.c +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1/*
2 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if HAVE_CONFIG_H1
21# include <config.h>
22#endif
23
24#include <ctk/ctk.h>
25#include <stdlib.h>
26#include <string.h>
27#include <glib.h>
28#include "libcafekbd/cafekbd-keyboard-drawing.h"
29
30
31static gchar *groups = NULL((void*)0);
32static gchar *levels = NULL((void*)0);
33static gchar *symbols = NULL((void*)0);
34static gchar *keycodes = NULL((void*)0);
35static gchar *geometry = NULL((void*)0);
36
37static gboolean track_config = FALSE(0);
38static gboolean track_modifiers = FALSE(0);
39static gboolean program_version = FALSE(0);
40
41static const GOptionEntry options[] = {
42 {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
43 "Keyboard groups to display, from 1-4. Up to four groups only may be "
44 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
45 "group1[,group2[,group3[,group4]]]"},
46 {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
47 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
48 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
49 "level1[,level2[,level3[,level4]]]"},
50 {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
51 "Symbols component of the keyboard. If you omit this option, it is "
52 "obtained from the X server; that is, the keyboard that is currently "
53 "configured is drawn. Examples: --symbols=us or "
54 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL((void*)0)},
55 {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
56 "Keycodes component of the keyboard. If you omit this option, it is "
57 "obtained from the X server; that is, the keyboard that is currently"
58 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
59 NULL((void*)0)},
60 {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
61 "Geometry xkb component. If you omit this option, it is obtained from the"
62 " X server; that is, the keyboard that is currently configured is drawn. "
63 "Example: --geometry=kinesis", NULL((void*)0)},
64 {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
65 "Track the current modifiers", NULL((void*)0)},
66 {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
67 "Track the server XKB configuration", NULL((void*)0)},
68 {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
69 "Show current version", NULL((void*)0)},
70 {NULL((void*)0)},
71};
72
73static gboolean
74set_groups (gchar * groups_option,
75 CafekbdKeyboardDrawingGroupLevel * groupLevels)
76{
77 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
78 gint cntr, g;
79
80 groupLevels[0].group =
81 groupLevels[1].group =
82 groupLevels[2].group = groupLevels[3].group = -1;
83
84 if (groups_option == NULL((void*)0))
85 return TRUE(!(0));
86
87 for (cntr = 4; --cntr >= 0;) {
88 if (*groups_option == '\0')
89 return FALSE(0);
90
91 g = *groups_option - '1';
92 if (g < 0 || g >= 4)
93 return FALSE(0);
94
95 pgl->group = g;
96 /* printf ("group %d\n", pgl->group); */
97
98 groups_option++;
99 if (*groups_option == '\0')
100 return TRUE(!(0));
101 if (*groups_option != ',')
102 return FALSE(0);
103
104 groups_option++;
105 pgl++;
106 }
107
108 return TRUE(!(0));
109}
110
111static gboolean
112set_levels (gchar * levels_option,
113 CafekbdKeyboardDrawingGroupLevel * groupLevels)
114{
115 CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
116 gint cntr, l;
117 gchar *p;
118
119 groupLevels[0].level =
120 groupLevels[1].level =
121 groupLevels[2].level = groupLevels[3].level = -1;
122
123 if (levels_option == NULL((void*)0))
124 return TRUE(!(0));
125
126 for (cntr = 4; --cntr >= 0;) {
127 if (*levels_option == '\0')
128 return FALSE(0);
129
130 l = (gint) strtol (levels_option, &p, 10) - 1;
131 if (l < 0 || l >= 64)
132 return FALSE(0);
133
134 pgl->level = l;
135 /* printf ("level %d\n", pgl->level); */
136
137 levels_option = p;
138 if (*levels_option == '\0')
139 return TRUE(!(0));
140 if (*levels_option != ',')
141 return FALSE(0);
142
143 levels_option++;
144 pgl++;
145 }
146
147 return TRUE(!(0));
148}
149
150static void
151bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED__attribute__ ((__unused__)),
152 guint keycode)
153{
154 g_warning
155 ("got keycode %u, which is not on your keyboard according to your configuration",
156 keycode);
157}
158
159gint
160main (gint argc, gchar ** argv)
161{
162 CtkWidget *window;
163 CtkWidget *cafekbd_keyboard_drawing;
164 CdkScreen *screen;
165 CdkMonitor *monitor;
166 CdkRectangle rect;
167 GOptionContext *context;
168 GError *error = NULL((void*)0);
169
170 CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
171 { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
172 CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
173 { &groupLevels[0], &groupLevels[1], &groupLevels[2],
174 &groupLevels[3]
175 };
176
177 context = g_option_context_new ("kbdraw");
178 g_option_context_add_main_entries (context, options, NULL((void*)0));
179 if (!g_option_context_parse (context, &argc, &argv, &error)) {
180 g_message ("option parsing failed: %s", error->message);
181 g_option_context_free (context);
182 exit (EXIT_FAILURE1);
183 }
184 g_option_context_free (context);
185
186 if (program_version) {
187 g_print ("kbdraw %s\n", VERSION"2.0.0");
188 exit (0);
189 }
190
191 ctk_init (&argc, &argv);
192
193 if (!set_groups (groups, groupLevels)) {
194 g_printerr ("--groups: invalid argument\n");
195 exit (1);
196 }
197
198 if (!set_levels (levels, groupLevels)) {
199 g_printerr ("--levels: invalid argument\n");
200 exit (1);
201 }
202
203 window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
204 g_signal_connect (G_OBJECT (window), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
205 G_CALLBACK (ctk_main_quit), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((window)), (((GType) ((20) << (2)))
)))))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
206
207 screen = ctk_window_get_screen (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
);
208 monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
209 cdk_monitor_get_geometry (monitor, &rect);
210 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
,
211 rect.width * 4 / 5,
212 rect.height * 1 / 2);
213
214 ctk_widget_show (window);
215
216 cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
217 ctk_widget_show (cafekbd_keyboard_drawing);
218 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, cafekbd_keyboard_drawing);
219
220 cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
221 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
222 pgroupLevels);
223
224 if (track_modifiers)
225 cafekbd_keyboard_drawing_set_track_modifiers
226 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
227 if (track_config)
228 cafekbd_keyboard_drawing_set_track_config
229 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
, TRUE(!(0)));
230 g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
231 G_CALLBACK (bad_keycode), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (((GType) ((
20) << (2))))))))), ("bad-keycode"), (((GCallback) (bad_keycode
))), (((void*)0)), ((void*)0), (GConnectFlags) 0)
;
232
233 if (symbols || geometry || keycodes) {
234 XkbComponentNamesRec names;
235 gint success;
236
237 memset (&names, '\0', sizeof (names));
238
239 if (symbols)
240 names.symbols = symbols;
241 else
242 names.symbols = (gchar *)
243 cafekbd_keyboard_drawing_get_symbols
244 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
245 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
246
247 if (keycodes)
248 names.keycodes = keycodes;
249 else
250 names.keycodes = (gchar *)
251 cafekbd_keyboard_drawing_get_keycodes
252 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
253 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
254
255 if (geometry)
256 names.geometry = geometry;
This statement is never executed
257 else
258 names.geometry = (gchar *)
259 cafekbd_keyboard_drawing_get_geometry
260 (CAFEKBD_KEYBOARD_DRAWING((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
261 (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
);
262
263 success =
264 cafekbd_keyboard_drawing_set_keyboard
265 (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing)((((CafekbdKeyboardDrawing*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((cafekbd_keyboard_drawing)), (cafekbd_keyboard_drawing_get_type
())))))
,
266 &names);
267 if (!success) {
268 g_printerr
269 ("\nError loading new keyboard description with components:\n\n"
270 " keycodes: %s\n" " types: %s\n"
271 " compat: %s\n" " symbols: %s\n"
272 " geometry: %s\n\n", names.keycodes,
273 names.types, names.compat, names.symbols,
274 names.geometry);
275 exit (1);
276 }
277 }
278
279 ctk_widget_grab_focus (cafekbd_keyboard_drawing);
280
281 ctk_main ();
282
283 return 0;
284}
diff --git a/2025-02-06-165420-14522-1@28c310f42d33_master/scanview.css b/2025-02-06-165420-14522-1@28c310f42d33_master/scanview.css new file mode 100644 index 0000000..cf8a5a6 --- /dev/null +++ b/2025-02-06-165420-14522-1@28c310f42d33_master/scanview.css @@ -0,0 +1,62 @@ +body { color:#000000; background-color:#ffffff } +body { font-family: Helvetica, sans-serif; font-size:9pt } +h1 { font-size: 14pt; } +h2 { font-size: 12pt; } +table { font-size:9pt } +table { border-spacing: 0px; border: 1px solid black } +th, table thead { + background-color:#eee; color:#666666; + font-weight: bold; cursor: default; + text-align:center; + font-weight: bold; font-family: Verdana; + white-space:nowrap; +} +.W { font-size:0px } +th, td { padding:5px; padding-left:8px; text-align:left } +td.SUMM_DESC { padding-left:12px } +td.DESC { white-space:pre } +td.Q { text-align:right } +td { text-align:left } +tbody.scrollContent { overflow:auto } + +table.form_group { + background-color: #ccc; + border: 1px solid #333; + padding: 2px; +} + +table.form_inner_group { + background-color: #ccc; + border: 1px solid #333; + padding: 0px; +} + +table.form { + background-color: #999; + border: 1px solid #333; + padding: 2px; +} + +td.form_label { + text-align: right; + vertical-align: top; +} +/* For one line entires */ +td.form_clabel { + text-align: right; + vertical-align: center; +} +td.form_value { + text-align: left; + vertical-align: top; +} +td.form_submit { + text-align: right; + vertical-align: top; +} + +h1.SubmitFail { + color: #f00; +} +h1.SubmitOk { +} diff --git a/2025-02-06-165420-14522-1@28c310f42d33_master/sorttable.js b/2025-02-06-165420-14522-1@28c310f42d33_master/sorttable.js new file mode 100644 index 0000000..e608daa --- /dev/null +++ b/2025-02-06-165420-14522-1@28c310f42d33_master/sorttable.js @@ -0,0 +1,512 @@ +/* + SortTable + version 2 + 7th April 2007 + Stuart Langridge, http://www.kryogenix.org/code/browser/sorttable/ + + Instructions: + Download this file + Add to your HTML + Add class="sortable" to any table you'd like to make sortable + Click on the headers to sort + + Thanks to many, many people for contributions and suggestions. + Licenced as X11: http://www.kryogenix.org/code/browser/licence.html + This basically means: do what you want with it. +*/ + + +var stIsIE = /*@cc_on!@*/false; + +sorttable = { + init: function() { + // quit if this function has already been called + if (arguments.callee.done) return; + // flag this function so we don't do the same thing twice + arguments.callee.done = true; + // kill the timer + if (_timer) clearInterval(_timer); + + if (!document.createElement || !document.getElementsByTagName) return; + + sorttable.DATE_RE = /^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/; + + forEach(document.getElementsByTagName('table'), function(table) { + if (table.className.search(/\bsortable\b/) != -1) { + sorttable.makeSortable(table); + } + }); + + }, + + makeSortable: function(table) { + if (table.getElementsByTagName('thead').length == 0) { + // table doesn't have a tHead. Since it should have, create one and + // put the first table row in it. + the = document.createElement('thead'); + the.appendChild(table.rows[0]); + table.insertBefore(the,table.firstChild); + } + // Safari doesn't support table.tHead, sigh + if (table.tHead == null) table.tHead = table.getElementsByTagName('thead')[0]; + + if (table.tHead.rows.length != 1) return; // can't cope with two header rows + + // Sorttable v1 put rows with a class of "sortbottom" at the bottom (as + // "total" rows, for example). This is B&R, since what you're supposed + // to do is put them in a tfoot. So, if there are sortbottom rows, + // for backward compatibility, move them to tfoot (creating it if needed). + sortbottomrows = []; + for (var i=0; i5' : ' ▴'; + this.appendChild(sortrevind); + return; + } + if (this.className.search(/\bsorttable_sorted_reverse\b/) != -1) { + // if we're already sorted by this column in reverse, just + // re-reverse the table, which is quicker + sorttable.reverse(this.sorttable_tbody); + this.className = this.className.replace('sorttable_sorted_reverse', + 'sorttable_sorted'); + this.removeChild(document.getElementById('sorttable_sortrevind')); + sortfwdind = document.createElement('span'); + sortfwdind.id = "sorttable_sortfwdind"; + sortfwdind.innerHTML = stIsIE ? ' 6' : ' ▾'; + this.appendChild(sortfwdind); + return; + } + + // remove sorttable_sorted classes + theadrow = this.parentNode; + forEach(theadrow.childNodes, function(cell) { + if (cell.nodeType == 1) { // an element + cell.className = cell.className.replace('sorttable_sorted_reverse',''); + cell.className = cell.className.replace('sorttable_sorted',''); + } + }); + sortfwdind = document.getElementById('sorttable_sortfwdind'); + if (sortfwdind) { sortfwdind.parentNode.removeChild(sortfwdind); } + sortrevind = document.getElementById('sorttable_sortrevind'); + if (sortrevind) { sortrevind.parentNode.removeChild(sortrevind); } + + this.className += ' sorttable_sorted'; + sortfwdind = document.createElement('span'); + sortfwdind.id = "sorttable_sortfwdind"; + sortfwdind.innerHTML = stIsIE ? ' 6' : ' ▾'; + this.appendChild(sortfwdind); + + // build an array to sort. This is a Schwartzian transform thing, + // i.e., we "decorate" each row with the actual sort key, + // sort based on the sort keys, and then put the rows back in order + // which is a lot faster because you only do getInnerText once per row + row_array = []; + col = this.sorttable_columnindex; + rows = this.sorttable_tbody.rows; + for (var j=0; j 12) { + // definitely dd/mm + return sorttable.sort_ddmm; + } else if (second > 12) { + return sorttable.sort_mmdd; + } else { + // looks like a date, but we can't tell which, so assume + // that it's dd/mm (English imperialism!) and keep looking + sortfn = sorttable.sort_ddmm; + } + } + } + } + return sortfn; + }, + + getInnerText: function(node) { + // gets the text we want to use for sorting for a cell. + // strips leading and trailing whitespace. + // this is *not* a generic getInnerText function; it's special to sorttable. + // for example, you can override the cell text with a customkey attribute. + // it also gets .value for fields. + + hasInputs = (typeof node.getElementsByTagName == 'function') && + node.getElementsByTagName('input').length; + + if (node.getAttribute("sorttable_customkey") != null) { + return node.getAttribute("sorttable_customkey"); + } + else if (typeof node.textContent != 'undefined' && !hasInputs) { + return node.textContent.replace(/^\s+|\s+$/g, ''); + } + else if (typeof node.innerText != 'undefined' && !hasInputs) { + return node.innerText.replace(/^\s+|\s+$/g, ''); + } + else if (typeof node.text != 'undefined' && !hasInputs) { + return node.text.replace(/^\s+|\s+$/g, ''); + } + else { + switch (node.nodeType) { + case 3: + if (node.nodeName.toLowerCase() == 'input') { + return node.value.replace(/^\s+|\s+$/g, ''); + } + case 4: + return node.nodeValue.replace(/^\s+|\s+$/g, ''); + break; + case 1: + case 11: + var innerText = ''; + for (var i = 0; i < node.childNodes.length; i++) { + innerText += sorttable.getInnerText(node.childNodes[i]); + } + return innerText.replace(/^\s+|\s+$/g, ''); + break; + default: + return ''; + } + } + }, + + reverse: function(tbody) { + // reverse the rows in a tbody + newrows = []; + for (var i=0; i=0; i--) { + tbody.appendChild(newrows[i]); + } + delete newrows; + }, + + /* sort functions + each sort function takes two parameters, a and b + you are comparing a[0] and b[0] */ + sort_numeric: function(a,b) { + aa = parseFloat(a[0].replace(/[^0-9.-]/g,'')); + if (isNaN(aa)) aa = 0; + bb = parseFloat(b[0].replace(/[^0-9.-]/g,'')); + if (isNaN(bb)) bb = 0; + return aa-bb; + }, + sort_alpha: function(a,b) { + if (a[0]==b[0]) return 0; + if (a[0] 0 ) { + var q = list[i]; list[i] = list[i+1]; list[i+1] = q; + swap = true; + } + } // for + t--; + + if (!swap) break; + + for(var i = t; i > b; --i) { + if ( comp_func(list[i], list[i-1]) < 0 ) { + var q = list[i]; list[i] = list[i-1]; list[i-1] = q; + swap = true; + } + } // for + b++; + + } // while(swap) + } +} + +/* ****************************************************************** + Supporting functions: bundled here to avoid depending on a library + ****************************************************************** */ + +// Dean Edwards/Matthias Miller/John Resig + +/* for Mozilla/Opera9 */ +if (document.addEventListener) { + document.addEventListener("DOMContentLoaded", sorttable.init, false); +} + +/* for Internet Explorer */ +/*@cc_on @*/ +/*@if (@_win32) + document.write(" + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <X11/keysym.h>
+
+#include <glib/gi18n-lib.h>
+#include <gio/gio.h>
+#include <cafekbd-desktop-config.h>
+#include <cafekbd-config-private.h>
+
+/**
+ * CafekbdDesktopConfig:
+ */
+#define CAFEKBD_DESKTOP_CONFIG_SCHEMA  CAFEKBD_CONFIG_SCHEMA ".general"
+
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP[] = "default-group";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW[] = "group-per-window";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS[] = "handle-indicators";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES[] = "layout-names-as-group-names";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_LOAD_EXTRA_ITEMS[] = "load-extra-items";
+
+/*
+ * static common functions
+ */
+
+static gboolean
+    cafekbd_desktop_config_get_lv_descriptions
+    (CafekbdDesktopConfig * config,
+     XklConfigRegistry * registry,
+     const gchar ** layout_ids,
+     const gchar ** variant_ids,
+     gchar *** short_layout_descriptions,
+     gchar *** long_layout_descriptions,
+     gchar *** short_variant_descriptions,
+     gchar *** long_variant_descriptions) {
+	const gchar **pl, **pv;
+	guint total_layouts;
+	gchar **sld, **lld, **svd, **lvd;
+	XklConfigItem *item = xkl_config_item_new ();
+
+	if (!
+	    (xkl_engine_get_features (config->engine) &
+	     XKLF_MULTIPLE_LAYOUTS_SUPPORTED))
+		return FALSE;
+
+	pl = layout_ids;
+	pv = variant_ids;
+	total_layouts = g_strv_length ((char **) layout_ids);
+	sld = *short_layout_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+	lld = *long_layout_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+	svd = *short_variant_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+	lvd = *long_variant_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+
+	while (pl != NULL && *pl != NULL) {
+
+		xkl_debug (100, "ids: [%s][%s]\n", *pl,
+			   pv == NULL ? NULL : *pv);
+
+		g_snprintf (item->name, sizeof item->name, "%s", *pl);
+		if (xkl_config_registry_find_layout (registry, item)) {
+			*sld = g_strdup (item->short_description);
+			*lld = g_strdup (item->description);
+		} else {
+			*sld = g_strdup ("");
+			*lld = g_strdup ("");
+		}
+
+		if (pv != NULL && *pv != NULL) {
+			g_snprintf (item->name, sizeof item->name, "%s",
+				    *pv);
+			if (xkl_config_registry_find_variant
+			    (registry, *pl, item)) {
+				*svd = g_strdup (item->short_description);
+				*lvd = g_strdup (item->description);
+			} else {
+				*svd = g_strdup ("");
+				*lvd = g_strdup ("");
+			}
+		} else {
+			*svd = g_strdup ("");
+			*lvd = g_strdup ("");
+		}
+
+		xkl_debug (100, "description: [%s][%s][%s][%s]\n",
+			   *sld, *lld, *svd, *lvd);
+		sld++;
+		lld++;
+		svd++;
+		lvd++;
+
+		pl++;
+
+		if (pv != NULL && *pv != NULL)
+			pv++;
+	}
+
+	g_object_unref (item);
+	return TRUE;
+}
+
+/*
+ * extern CafekbdDesktopConfig config functions
+ */
+void
+cafekbd_desktop_config_init (CafekbdDesktopConfig * config,
+			  XklEngine * engine)
+{
+	memset (config, 0, sizeof (*config));
+	config->settings = g_settings_new (CAFEKBD_DESKTOP_CONFIG_SCHEMA);
+	config->engine = engine;
+}
+
+void
+cafekbd_desktop_config_term (CafekbdDesktopConfig * config)
+{
+	g_object_unref (config->settings);
+	config->settings = NULL;
+}
+
+void
+cafekbd_desktop_config_load_from_gsettings (CafekbdDesktopConfig * config)
+{
+	config->group_per_app =
+	    g_settings_get_boolean (config->settings,
+				 CAFEKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW);
+	xkl_debug (150, "group_per_app: %d\n", config->group_per_app);
+
+	config->handle_indicators =
+	    g_settings_get_boolean (config->settings,
+				 CAFEKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS);
+	xkl_debug (150, "handle_indicators: %d\n",
+		   config->handle_indicators);
+
+	config->layout_names_as_group_names =
+	    g_settings_get_boolean (config->settings,
+				   CAFEKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES);
+	xkl_debug (150, "layout_names_as_group_names: %d\n",
+		   config->layout_names_as_group_names);
+
+	config->load_extra_items =
+	    g_settings_get_boolean (config->settings,
+				   CAFEKBD_DESKTOP_CONFIG_KEY_LOAD_EXTRA_ITEMS);
+	xkl_debug (150, "load_extra_items: %d\n",
+		   config->load_extra_items);
+
+	config->default_group =
+	    g_settings_get_int (config->settings,
+				  CAFEKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP);
+
+	if (config->default_group < -1
+	    || config->default_group >=
+	    xkl_engine_get_max_num_groups (config->engine))
+		config->default_group = -1;
+	xkl_debug (150, "default_group: %d\n", config->default_group);
+}
+
+void
+cafekbd_desktop_config_save_to_gsettings (CafekbdDesktopConfig * config)
+{
+	g_settings_delay (config->settings);
+
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW,
+			     config->group_per_app);
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS,
+			     config->handle_indicators);
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES,
+			     config->layout_names_as_group_names);
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_LOAD_EXTRA_ITEMS,
+			     config->load_extra_items);
+	g_settings_set_int (config->settings,
+			    CAFEKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP,
+			    config->default_group);
+
+	g_settings_apply (config->settings);
+}
+
+gboolean
+cafekbd_desktop_config_activate (CafekbdDesktopConfig * config)
+{
+	gboolean rv = TRUE;
+
+	xkl_engine_set_group_per_toplevel_window (config->engine,
+						  config->group_per_app);
+	xkl_engine_set_indicators_handling (config->engine,
+					    config->handle_indicators);
+	xkl_engine_set_default_group (config->engine,
+				      config->default_group);
+
+	return rv;
+}
+
+void
+cafekbd_desktop_config_lock_next_group (CafekbdDesktopConfig * config)
+{
+	int group = xkl_engine_get_next_group (config->engine);
+	xkl_engine_lock_group (config->engine, group);
+}
+
+void
+cafekbd_desktop_config_lock_prev_group (CafekbdDesktopConfig * config)
+{
+	int group = xkl_engine_get_prev_group (config->engine);
+	xkl_engine_lock_group (config->engine, group);
+}
+
+void
+cafekbd_desktop_config_restore_group (CafekbdDesktopConfig * config)
+{
+	int group = xkl_engine_get_current_window_group (config->engine);
+	xkl_engine_lock_group (config->engine, group);
+}
+
+/**
+ * cafekbd_desktop_config_start_listen:
+ * @func: (scope notified): a function to call when settings are changed
+ */
+void
+cafekbd_desktop_config_start_listen (CafekbdDesktopConfig * config,
+				  GCallback func,
+				  gpointer user_data)
+{
+	config->config_listener_id =
+	    g_signal_connect (config->settings, "changed", func,
+			      user_data);
+}
+
+void
+cafekbd_desktop_config_stop_listen (CafekbdDesktopConfig * config)
+{
+	g_signal_handler_disconnect (config->settings,
+				    config->config_listener_id);
+	config->config_listener_id = 0;
+}
+
+gboolean
+cafekbd_desktop_config_load_group_descriptions (CafekbdDesktopConfig
+					     * config,
+					     XklConfigRegistry *
+					     registry,
+					     const gchar **
+					     layout_ids,
+					     const gchar **
+					     variant_ids,
+					     gchar ***
+					     short_group_names,
+					     gchar *** full_group_names)
+{
+	gchar **sld, **lld, **svd, **lvd;
+	gchar **psld, **plld, **plvd;
+	gchar **psgn, **pfgn, **psvd;
+	gint total_descriptions;
+
+	if (!cafekbd_desktop_config_get_lv_descriptions
+	    (config, registry, layout_ids, variant_ids, &sld, &lld, &svd,
+	     &lvd)) {
+		return False;
+	}
+
+	total_descriptions = g_strv_length (sld);
+
+	*short_group_names = psgn =
+	    g_new0 (gchar *, total_descriptions + 1);
+	*full_group_names = pfgn =
+	    g_new0 (gchar *, total_descriptions + 1);
+
+	plld = lld;
+	psld = sld;
+	plvd = lvd;
+	psvd = svd;
+	while (plld != NULL && *plld != NULL) {
+		gchar *sd = (*psvd[0] == '\0') ? *psld : *psvd;
+		psld++, psvd++;
+		*psgn++ = g_strdup (sd);
+		*pfgn++ = g_strdup (cafekbd_keyboard_config_format_full_layout
+				    (*plld++, *plvd++));
+	}
+	g_strfreev (sld);
+	g_strfreev (lld);
+	g_strfreev (svd);
+	g_strfreev (lvd);
+
+	return True;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/1.html b/2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/1.html new file mode 100644 index 0000000..43abc15 --- /dev/null +++ b/2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/1.html @@ -0,0 +1,914 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <X11/keysym.h>
+
+#include <pango/pango.h>
+
+#include <glib/gi18n-lib.h>
+#include <cdk/cdkx.h>
+
+#include <cafekbd-keyboard-config.h>
+#include <cafekbd-indicator-config.h>
+
+#include <cafekbd-config-private.h>
+
+/**
+ * CafekbdIndicatorConfig:
+ */
+#define CAFEKBD_INDICATOR_CONFIG_SCHEMA  CAFEKBD_CONFIG_SCHEMA ".indicator"
+
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS[] = "show-flags";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_SECONDARIES[] = "secondary";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_FONT_FAMILY[] = "font-family";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_FOREGROUND_COLOR[] = "foreground-color";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_BACKGROUND_COLOR[] = "background-color";
+
+/*
+ * static applet config functions
+ */
+static void
+cafekbd_indicator_config_load_font (CafekbdIndicatorConfig * ind_config)
+{
+	ind_config->font_family =
+	    g_settings_get_string (ind_config->settings,
+				   CAFEKBD_INDICATOR_CONFIG_KEY_FONT_FAMILY);
+
+	if (ind_config->font_family == NULL ||
+	    ind_config->font_family[0] == '\0') {
+		PangoFontDescription *fd = NULL;
+		CtkWidgetPath *widget_path = ctk_widget_path_new ();
+		CtkStyleContext *context = ctk_style_context_new ();
+
+		ctk_widget_path_append_type (widget_path, CTK_TYPE_WINDOW);
+		ctk_widget_path_iter_set_name (widget_path, -1 , "PanelWidget");
+
+		ctk_style_context_set_path (context, widget_path);
+		ctk_style_context_set_screen (context, cdk_screen_get_default ());
+		ctk_style_context_set_state (context, CTK_STATE_FLAG_NORMAL);
+		ctk_style_context_add_class (context, CTK_STYLE_CLASS_DEFAULT);
+		ctk_style_context_add_class (context, "gnome-panel-menu-bar");
+		ctk_style_context_add_class (context, "cafe-panel-menu-bar");
+
+		ctk_style_context_get (context, CTK_STATE_FLAG_NORMAL,
+		                       CTK_STYLE_PROPERTY_FONT, &fd, NULL);
+
+		if (fd != NULL) {
+			ind_config->font_family =
+			    g_strdup (pango_font_description_to_string(fd));
+		}
+
+		g_object_unref (G_OBJECT (context));
+		ctk_widget_path_unref (widget_path);
+	}
+	xkl_debug (150, "font: [%s]\n", ind_config->font_family);
+
+}
+
+static void
+cafekbd_indicator_config_load_colors (CafekbdIndicatorConfig * ind_config)
+{
+	ind_config->foreground_color =
+	    g_settings_get_string (ind_config->settings,
+	                           CAFEKBD_INDICATOR_CONFIG_KEY_FOREGROUND_COLOR);
+
+	if (ind_config->foreground_color == NULL ||
+	    ind_config->foreground_color[0] == '\0') {
+		CtkWidgetPath *widget_path = ctk_widget_path_new ();
+		CtkStyleContext *context = ctk_style_context_new ();
+		CdkRGBA fg_color;
+
+		ctk_widget_path_append_type (widget_path, CTK_TYPE_WINDOW);
+		ctk_widget_path_iter_set_name (widget_path, -1 , "PanelWidget");
+
+		ctk_style_context_set_path (context, widget_path);
+		ctk_style_context_set_screen (context, cdk_screen_get_default ());
+		ctk_style_context_set_state (context, CTK_STATE_FLAG_NORMAL);
+		ctk_style_context_add_class (context, CTK_STYLE_CLASS_DEFAULT);
+		ctk_style_context_add_class (context, "gnome-panel-menu-bar");
+		ctk_style_context_add_class (context, "cafe-panel-menu-bar");
+
+		ctk_style_context_get_color (context,
+		                             CTK_STATE_FLAG_NORMAL, &fg_color);
+		ind_config->foreground_color =
+		    g_strdup_printf ("%g %g %g",
+		                     fg_color.red,
+		                     fg_color.green,
+		                     fg_color.blue);
+
+		g_object_unref (G_OBJECT (context));
+		ctk_widget_path_unref (widget_path);
+	}
+
+	ind_config->background_color =
+	    g_settings_get_string (ind_config->settings,
+				     CAFEKBD_INDICATOR_CONFIG_KEY_BACKGROUND_COLOR);
+}
+
+void
+cafekbd_indicator_config_refresh_style (CafekbdIndicatorConfig * ind_config)
+{
+	g_free (ind_config->font_family);
+	g_free (ind_config->foreground_color);
+	g_free (ind_config->background_color);
+	cafekbd_indicator_config_load_font (ind_config);
+	cafekbd_indicator_config_load_colors (ind_config);
+}
+
+gchar *
+cafekbd_indicator_config_get_images_file (CafekbdIndicatorConfig *
+				       ind_config,
+				       CafekbdKeyboardConfig *
+				       kbd_config, int group)
+{
+	char *image_file = NULL;
+	CtkIconInfo *icon_info = NULL;
+
+	if (!ind_config->show_flags)
+		return NULL;
+
+	if ((kbd_config->layouts_variants != NULL) &&
+	    (g_strv_length (kbd_config->layouts_variants) > group)) {
+		char *full_layout_name =
+		    kbd_config->layouts_variants[group];
+
+		if (full_layout_name != NULL) {
+			char *l, *v;
+			cafekbd_keyboard_config_split_items (full_layout_name,
+							  &l, &v);
+			if (l != NULL) {
+				/* probably there is something in theme? */
+				icon_info = ctk_icon_theme_lookup_icon
+				    (ind_config->icon_theme, l, 48, 0);
+
+				/* Unbelievable but happens */
+				if (icon_info != NULL &&
+				    ctk_icon_info_get_filename (icon_info) == NULL) {
+					g_object_unref (icon_info);
+					icon_info = NULL;
+				}
+			}
+		}
+	}
+	/* fallback to the default value */
+	if (icon_info == NULL) {
+		icon_info = ctk_icon_theme_lookup_icon
+		    (ind_config->icon_theme, "stock_dialog-error", 48, 0);
+	}
+	if (icon_info != NULL) {
+		image_file =
+		    g_strdup (ctk_icon_info_get_filename (icon_info));
+		g_object_unref (icon_info);
+	}
+
+	return image_file;
+}
+
+void
+cafekbd_indicator_config_load_image_filenames (CafekbdIndicatorConfig *
+					    ind_config,
+					    CafekbdKeyboardConfig *
+					    kbd_config)
+{
+	int i;
+	ind_config->image_filenames = NULL;
+
+	if (!ind_config->show_flags)
+		return;
+
+	for (i = xkl_engine_get_max_num_groups (ind_config->engine);
+	     --i >= 0;) {
+		gchar *image_file =
+		    cafekbd_indicator_config_get_images_file (ind_config,
+							   kbd_config,
+							   i);
+		ind_config->image_filenames =
+		    g_slist_prepend (ind_config->image_filenames,
+				     image_file);
+	}
+}
+
+void
+cafekbd_indicator_config_free_image_filenames (CafekbdIndicatorConfig *
+					    ind_config)
+{
+	while (ind_config->image_filenames) {
+		if (ind_config->image_filenames->data)
+			g_free (ind_config->image_filenames->data);
+		ind_config->image_filenames =
+		    g_slist_delete_link (ind_config->image_filenames,
+					 ind_config->image_filenames);
+	}
+}
+
+void
+cafekbd_indicator_config_init (CafekbdIndicatorConfig * ind_config,
+			       XklEngine * engine)
+{
+	gchar *sp;
+
+	memset (ind_config, 0, sizeof (*ind_config));
+	ind_config->settings = g_settings_new (CAFEKBD_INDICATOR_CONFIG_SCHEMA);
+	ind_config->engine = engine;
+
+	ind_config->icon_theme = ctk_icon_theme_get_default ();
+
+	ctk_icon_theme_append_search_path (ind_config->icon_theme, sp =
+					   g_build_filename (g_get_home_dir
+							     (),
+							     ".icons/flags",
+							     NULL));
+	g_free (sp);
+
+	ctk_icon_theme_append_search_path (ind_config->icon_theme,
+					   sp =
+					   g_build_filename (DATADIR,
+							     "pixmaps/flags",
+							     NULL));
+	g_free (sp);
+
+	ctk_icon_theme_append_search_path (ind_config->icon_theme,
+					   sp =
+					   g_build_filename (DATADIR,
+							     "icons/flags",
+							     NULL));
+	g_free (sp);
+}
+
+void
+cafekbd_indicator_config_term (CafekbdIndicatorConfig * ind_config)
+{
+	g_free (ind_config->font_family);
+	ind_config->font_family = NULL;
+
+	g_free (ind_config->foreground_color);
+	ind_config->foreground_color = NULL;
+
+	g_free (ind_config->background_color);
+	ind_config->background_color = NULL;
+
+	ind_config->icon_theme = NULL;
+
+	cafekbd_indicator_config_free_image_filenames (ind_config);
+
+	g_object_unref (ind_config->settings);
+	ind_config->settings = NULL;
+}
+
+void
+cafekbd_indicator_config_load_from_gsettings (CafekbdIndicatorConfig * ind_config)
+{
+	ind_config->secondary_groups_mask =
+	    g_settings_get_int (ind_config->settings,
+				CAFEKBD_INDICATOR_CONFIG_KEY_SECONDARIES);
+
+	ind_config->show_flags =
+	    g_settings_get_boolean (ind_config->settings,
+				 CAFEKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS);
+
+	cafekbd_indicator_config_load_font (ind_config);
+	cafekbd_indicator_config_load_colors (ind_config);
+
+}
+
+void
+cafekbd_indicator_config_save_to_gsettings (CafekbdIndicatorConfig * ind_config)
+{
+	g_settings_delay (ind_config->settings);
+
+	g_settings_set_int (ind_config->settings,
+				  CAFEKBD_INDICATOR_CONFIG_KEY_SECONDARIES,
+				  ind_config->secondary_groups_mask);
+	g_settings_set_boolean (ind_config->settings,
+				   CAFEKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS,
+				   ind_config->show_flags);
+
+	g_settings_apply (ind_config->settings);
+}
+
+void
+cafekbd_indicator_config_activate (CafekbdIndicatorConfig * ind_config)
+{
+	xkl_engine_set_secondary_groups_mask (ind_config->engine,
+					      ind_config->secondary_groups_mask);
+}
+
+/**
+ * cafekbd_indicator_config_start_listen:
+ * @func: (scope notified): a function to call when settings are changed
+ */
+void
+cafekbd_indicator_config_start_listen (CafekbdIndicatorConfig *
+				    ind_config,
+				    GCallback func,
+				    gpointer user_data)
+{
+	ind_config->config_listener_id =
+	    g_signal_connect (ind_config->settings, "changed", func,
+			      user_data);
+}
+
+void
+cafekbd_indicator_config_stop_listen (CafekbdIndicatorConfig * ind_config)
+{
+	g_signal_handler_disconnect (ind_config->settings,
+				     ind_config->config_listener_id);
+	ind_config->config_listener_id = 0;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/2.html b/2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/2.html new file mode 100644 index 0000000..4489934 --- /dev/null +++ b/2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/2.html @@ -0,0 +1,2100 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
+871
+872
+873
+874
+875
+876
+877
+878
+879
+880
+881
+882
+883
+884
+885
+886
+887
+888
+889
+890
+891
+892
+893
+894
+895
+896
+897
+898
+899
+900
+901
+902
+903
+904
+905
+906
+907
+908
+909
+910
+911
+912
+913
+914
+915
+916
+917
+918
+919
+920
+921
+922
+923
+924
+925
+926
+927
+928
+929
+930
+931
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+#include <config.h>
+
+#include <memory.h>
+
+#include <ctk/ctk.h>
+#include <cdk/cdkkeysyms.h>
+#include <cdk/cdkx.h>
+#include <glib/gi18n-lib.h>
+
+#include <cafekbd-indicator.h>
+#include <cafekbd-indicator-marshal.h>
+
+#include <cafekbd-desktop-config.h>
+#include <cafekbd-indicator-config.h>
+
+typedef struct _gki_globals {
+	XklEngine *engine;
+	XklConfigRegistry *registry;
+
+	CafekbdDesktopConfig cfg;
+	CafekbdIndicatorConfig ind_cfg;
+	CafekbdKeyboardConfig kbd_cfg;
+
+	const gchar *tooltips_format;
+	gchar **full_group_names;
+	gchar **short_group_names;
+	GSList *widget_instances;
+	GSList *images;
+} gki_globals;
+
+struct _CafekbdIndicatorPrivate {
+	gboolean set_parent_tooltips;
+	gdouble angle;
+};
+
+/* one instance for ALL widgets */
+static gki_globals globals;
+
+#define ForAllIndicators() \
+	{ \
+		GSList* cur; \
+		for (cur = globals.widget_instances; cur != NULL; cur = cur->next) { \
+			CafekbdIndicator * gki = (CafekbdIndicator*)cur->data;
+#define NextIndicator() \
+		} \
+	}
+
+G_DEFINE_TYPE (CafekbdIndicator, cafekbd_indicator, CTK_TYPE_NOTEBOOK)<--- There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
+
+static void
+cafekbd_indicator_global_init (void);
+static void
+cafekbd_indicator_global_term (void);
+static CtkWidget *
+cafekbd_indicator_prepare_drawing (CafekbdIndicator * gki, int group);
+static void
+cafekbd_indicator_set_current_page_for_group (CafekbdIndicator * gki, int group);
+static void
+cafekbd_indicator_set_current_page (CafekbdIndicator * gki);
+static void
+cafekbd_indicator_cleanup (CafekbdIndicator * gki);
+static void
+cafekbd_indicator_fill (CafekbdIndicator * gki);
+static void
+cafekbd_indicator_set_tooltips (CafekbdIndicator * gki, const char *str);
+
+gchar *
+cafekbd_indicator_extract_layout_name (int group, XklEngine *engine, CafekbdKeyboardConfig *kbd_cfg, gchar **short_group_names, gchar **full_group_names);
+gchar *
+cafekbd_indicator_create_label_title (int group, GHashTable **ln2cnt_map, gchar *layout_name);
+
+static void
+cafekbd_indicator_load_images (void)
+{
+	int i;
+	GSList *image_filename;
+
+	globals.images = NULL;
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	if (!globals.ind_cfg.show_flags)
+		return;
+
+	image_filename = globals.ind_cfg.image_filenames;
+
+	for (i = xkl_engine_get_max_num_groups (globals.engine);
+	     --i >= 0; image_filename = image_filename->next) {
+		GdkPixbuf *image = NULL;
+		char *image_file = (char *) image_filename->data;
+
+		if (image_file != NULL) {
+			GError *gerror = NULL;
+			image =
+			    gdk_pixbuf_new_from_file (image_file, &gerror);
+			if (image == NULL) {
+				CtkWidget *dialog =
+				    ctk_message_dialog_new (NULL,
+							    CTK_DIALOG_DESTROY_WITH_PARENT,
+							    CTK_MESSAGE_ERROR,
+							    CTK_BUTTONS_OK,
+							    _
+							    ("There was an error loading an image: %s"),
+							    gerror->
+							    message);
+				g_signal_connect (G_OBJECT (dialog),
+						  "response",
+						  G_CALLBACK
+						  (ctk_widget_destroy),
+						  NULL);
+
+				ctk_window_set_resizable (CTK_WINDOW
+							  (dialog), FALSE);
+
+				ctk_widget_show (dialog);
+				g_error_free (gerror);
+			}
+			xkl_debug (150,
+				   "Image %d[%s] loaded -> %p[%dx%d]\n",
+				   i, image_file, image,
+				   gdk_pixbuf_get_width (image),
+				   gdk_pixbuf_get_height (image));
+		}
+		/* We append the image anyway - even if it is NULL! */
+		globals.images = g_slist_append (globals.images, image);
+	}
+}
+
+static void
+cafekbd_indicator_free_images (void)
+{
+	GSList *img_node;
+
+	cafekbd_indicator_config_free_image_filenames (&globals.ind_cfg);
+
+	while ((img_node = globals.images) != NULL) {
+		GdkPixbuf *pi;
+
+		pi = GDK_PIXBUF (img_node->data);
+		/* It can be NULL - some images may be missing */
+		if (pi != NULL) {
+			g_object_unref (pi);
+		}
+		globals.images =
+		    g_slist_remove_link (globals.images, img_node);
+		g_slist_free_1 (img_node);
+	}
+}
+
+static void
+cafekbd_indicator_update_images (void)
+{
+	cafekbd_indicator_free_images ();
+	cafekbd_indicator_load_images ();
+}
+
+void
+cafekbd_indicator_set_tooltips (CafekbdIndicator * gki, const char *str)
+{
+	g_assert (str == NULL || g_utf8_validate (str, -1, NULL));
+
+	ctk_widget_set_tooltip_text (CTK_WIDGET (gki), str);
+
+	if (gki->priv->set_parent_tooltips) {
+		CtkWidget *parent =
+		    ctk_widget_get_parent (CTK_WIDGET (gki));
+		if (parent) {
+			ctk_widget_set_tooltip_text (parent, str);
+		}
+	}
+}
+
+void
+cafekbd_indicator_cleanup (CafekbdIndicator * gki)
+{
+	int i;
+	CtkNotebook *notebook = CTK_NOTEBOOK (gki);
+
+	/* Do not remove the first page! It is the default page */
+	for (i = ctk_notebook_get_n_pages (notebook); --i > 0;) {
+		ctk_notebook_remove_page (notebook, i);
+	}
+}
+
+void
+cafekbd_indicator_fill (CafekbdIndicator * gki)
+{
+	int grp;
+	int total_groups = xkl_engine_get_num_groups (globals.engine);
+	CtkNotebook *notebook = CTK_NOTEBOOK (gki);
+
+	for (grp = 0; grp < total_groups; grp++) {
+		CtkWidget *page;
+		page = cafekbd_indicator_prepare_drawing (gki, grp);
+
+		if (page == NULL)
+			page = ctk_label_new ("");
+
+		ctk_notebook_append_page (notebook, page, NULL);
+		ctk_widget_show_all (page);
+	}
+}
+
+static gboolean cafekbd_indicator_key_pressed (CtkWidget        *widget G_GNUC_UNUSED,
+					       CdkEventKey      *event,
+					       CafekbdIndicator *gki G_GNUC_UNUSED)
+{
+	switch (event->keyval)
+	{
+			case CDK_KEY_KP_Enter:
+			case CDK_KEY_ISO_Enter:
+			case CDK_KEY_3270_Enter:
+			case CDK_KEY_Return:
+			case CDK_KEY_space:
+			case CDK_KEY_KP_Space:
+			cafekbd_desktop_config_lock_next_group(&globals.cfg);
+			return TRUE;
+		default:
+			break;
+	}
+
+	return FALSE;
+}
+
+static gboolean
+cafekbd_indicator_button_pressed (CtkWidget        *widget,
+				  CdkEventButton   *event,
+				  CafekbdIndicator *gki G_GNUC_UNUSED)
+{
+	CtkWidget *img = ctk_bin_get_child (CTK_BIN (widget));
+	CtkAllocation allocation;
+	ctk_widget_get_allocation (img, &allocation);
+	xkl_debug (150, "Flag img size %d x %d\n",
+		   allocation.width, allocation.height);
+	if (event->button == 1 && event->type == CDK_BUTTON_PRESS) {
+		xkl_debug (150, "Mouse button pressed on applet\n");
+		cafekbd_desktop_config_lock_next_group (&globals.cfg);
+		return TRUE;
+	}
+	return FALSE;
+}
+
+static void
+draw_flag (CtkWidget * flag, cairo_t * cr, GdkPixbuf * image)
+{
+	/* Image width and height */
+	int iw = gdk_pixbuf_get_width (image);
+	int ih = gdk_pixbuf_get_height (image);
+	CtkAllocation allocation;
+	double xwiratio, ywiratio, wiratio;
+
+	ctk_widget_get_allocation (flag, &allocation);
+
+	/* widget-to-image scales, X and Y */
+	xwiratio = 1.0 * allocation.width / iw;
+	ywiratio = 1.0 * allocation.height / ih;
+	wiratio = xwiratio < ywiratio ? xwiratio : ywiratio;
+
+	/* transform cairo context */
+	cairo_translate (cr, allocation.width / 2.0, allocation.height / 2.0);
+	cairo_scale (cr, wiratio, wiratio);
+	cairo_translate (cr, - iw / 2.0, - ih / 2.0);
+
+	cdk_cairo_set_source_pixbuf (cr, image, 0, 0);
+	cairo_paint (cr);
+}
+
+gchar *
+cafekbd_indicator_extract_layout_name (int group, XklEngine * engine,
+				    CafekbdKeyboardConfig * kbd_cfg,
+				    gchar ** short_group_names,
+				    gchar ** full_group_names)
+{
+	char *layout_name = NULL;
+	if (group < g_strv_length (short_group_names)) {
+		if (xkl_engine_get_features (engine) &
+		    XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
+			char *full_layout_name =
+			    kbd_cfg->layouts_variants[group];
+			char *variant_name;
+			if (!cafekbd_keyboard_config_split_items
+			    (full_layout_name, &layout_name,
+			     &variant_name))
+				/* just in case */
+				layout_name = full_layout_name;
+
+			/* make it freeable */
+			layout_name = g_strdup (layout_name);
+
+			if (short_group_names != NULL) {
+				char *short_group_name =
+				    short_group_names[group];
+				if (short_group_name != NULL
+				    && *short_group_name != '\0') {
+					/* drop the long name */
+					g_free (layout_name);
+					layout_name =
+					    g_strdup (short_group_name);
+				}
+			}
+		} else {
+			layout_name = g_strdup (full_group_names[group]);
+		}
+	}
+
+	if (layout_name == NULL)
+		layout_name = g_strdup ("");
+
+	return layout_name;
+}
+
+gchar *
+cafekbd_indicator_create_label_title (int group, GHashTable ** ln2cnt_map,
+				   gchar * layout_name)
+{
+	gpointer pcounter = NULL;
+	char *prev_layout_name = NULL;
+	char *lbl_title = NULL;
+	int counter = 0;
+
+	if (group == 0) {
+		*ln2cnt_map =
+		    g_hash_table_new_full (g_str_hash, g_str_equal,
+					   g_free, NULL);
+	}
+
+	/* Process layouts with repeating description */
+	if (g_hash_table_lookup_extended
+	    (*ln2cnt_map, layout_name, (gpointer *) & prev_layout_name,
+	     &pcounter)) {
+		/* "next" same description */
+		gchar appendix[10] = "";
+		gint utf8length;
+		gunichar cidx;
+		counter = GPOINTER_TO_INT (pcounter);
+		/* Unicode subscript 2, 3, 4 */
+		cidx = 0x2081 + counter;
+		utf8length = g_unichar_to_utf8 (cidx, appendix);
+		appendix[utf8length] = '\0';
+		lbl_title = g_strconcat (layout_name, appendix, NULL);
+	} else {
+		/* "first" time this description */
+		lbl_title = g_strdup (layout_name);
+	}
+	g_hash_table_insert (*ln2cnt_map, layout_name,
+			     GINT_TO_POINTER (counter + 1));
+	return lbl_title;
+}
+
+static CtkWidget *
+cafekbd_indicator_prepare_drawing (CafekbdIndicator * gki, int group)
+{
+	gpointer pimage;
+	CtkWidget *ebox;
+
+	pimage = g_slist_nth_data (globals.images, group);
+	ebox = ctk_event_box_new ();
+	ctk_event_box_set_visible_window (CTK_EVENT_BOX (ebox), FALSE);
+	if (globals.ind_cfg.show_flags) {
+		GdkPixbuf *image;
+		CtkWidget *flag;
+
+		if (pimage == NULL)
+			return NULL;
+		image = GDK_PIXBUF (pimage);
+		flag = ctk_drawing_area_new ();
+		ctk_widget_add_events (CTK_WIDGET (flag),
+				       CDK_BUTTON_PRESS_MASK);
+		g_signal_connect (G_OBJECT (flag), "draw",
+		                  G_CALLBACK (draw_flag), image);
+		ctk_container_add (CTK_CONTAINER (ebox), flag);
+	} else {
+		char *lbl_title = NULL;
+		char *layout_name = NULL;
+		CtkWidget *label;
+		static GHashTable *ln2cnt_map = NULL;
+
+		layout_name =
+		    cafekbd_indicator_extract_layout_name (group,
+							globals.engine,
+							&globals.kbd_cfg,
+							globals.short_group_names,
+							globals.full_group_names);
+
+		lbl_title =
+		    cafekbd_indicator_create_label_title (group,
+						       &ln2cnt_map,
+						       layout_name);
+
+		label = ctk_label_new (lbl_title);
+		ctk_widget_set_halign (label, CTK_ALIGN_CENTER);
+		ctk_widget_set_valign (label, CTK_ALIGN_CENTER);
+		ctk_widget_set_margin_start (label, 2);
+		ctk_widget_set_margin_end (label, 2);
+		ctk_widget_set_margin_top (label, 2);
+		ctk_widget_set_margin_bottom (label, 2);
+		g_free (lbl_title);
+		ctk_label_set_angle (CTK_LABEL (label), gki->priv->angle);
+
+		if (group + 1 ==
+		    xkl_engine_get_num_groups (globals.engine)) {
+			g_hash_table_destroy (ln2cnt_map);
+			ln2cnt_map = NULL;
+		}
+
+		ctk_container_add (CTK_CONTAINER (ebox), label);
+	}
+
+	g_signal_connect (G_OBJECT (ebox),
+			  "button_press_event",
+			  G_CALLBACK (cafekbd_indicator_button_pressed), gki);
+
+	g_signal_connect (G_OBJECT (gki),
+			  "key_press_event",
+			  G_CALLBACK (cafekbd_indicator_key_pressed), gki);
+
+	/* We have everything prepared for that size */
+
+	return ebox;
+}
+
+static void
+cafekbd_indicator_update_tooltips (CafekbdIndicator * gki)
+{
+	XklState *state = xkl_engine_get_current_state (globals.engine);
+	gchar *buf;
+	if (state == NULL || state->group < 0
+	    || state->group >= g_strv_length (globals.full_group_names))
+		return;
+
+	buf = g_strdup_printf (globals.tooltips_format,
+			       globals.full_group_names[state->group]);
+
+	cafekbd_indicator_set_tooltips (gki, buf);
+	g_free (buf);
+}
+
+static void
+cafekbd_indicator_parent_set (CtkWidget *gki,
+			      CtkWidget *previous_parent G_GNUC_UNUSED)
+{
+	cafekbd_indicator_update_tooltips (CAFEKBD_INDICATOR (gki));
+}
+
+
+void
+cafekbd_indicator_reinit_ui (CafekbdIndicator * gki)
+{
+	cafekbd_indicator_cleanup (gki);
+	cafekbd_indicator_fill (gki);
+
+	cafekbd_indicator_set_current_page (gki);
+
+	g_signal_emit_by_name (gki, "reinit-ui");
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+			       gchar     *key G_GNUC_UNUSED,
+			       gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "General configuration changed in GSettings - reiniting...\n");
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+	ForAllIndicators () {
+		cafekbd_indicator_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_ind_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+				   gchar     *key G_GNUC_UNUSED,
+				   gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "Applet configuration changed in GSettings - reiniting...\n");
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+	cafekbd_indicator_update_images ();
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	ForAllIndicators () {
+		cafekbd_indicator_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+static void
+cafekbd_indicator_load_group_names (const gchar ** layout_ids,
+				 const gchar ** variant_ids)
+{
+	if (!cafekbd_desktop_config_load_group_descriptions
+	    (&globals.cfg, globals.registry, layout_ids, variant_ids,
+	     &globals.short_group_names, &globals.full_group_names)) {
+		/* We just populate no short names (remain NULL) -
+		 * full names are going to be used anyway */
+		gint i, total_groups =
+		    xkl_engine_get_num_groups (globals.engine);
+		globals.full_group_names =
+		    g_new0 (gchar *, total_groups + 1);
+
+		if (xkl_engine_get_features (globals.engine) &
+		    XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
+			gchar **lst = globals.kbd_cfg.layouts_variants;
+			for (i = 0; *lst; lst++, i++) {
+				globals.full_group_names[i] =
+				    g_strdup ((char *) *lst);
+			}
+		} else {
+			for (i = total_groups; --i >= 0;) {
+				globals.full_group_names[i] =
+				    g_strdup_printf ("Group %d", i);
+			}
+		}
+	}
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_kbd_cfg_callback (CafekbdIndicator *gki G_GNUC_UNUSED)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+	xkl_debug (100,
+		   "XKB configuration changed on X Server - reiniting...\n");
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+	cafekbd_indicator_update_images ();
+
+	g_strfreev (globals.full_group_names);
+	globals.full_group_names = NULL;
+
+	if (globals.short_group_names != NULL) {
+		g_strfreev (globals.short_group_names);
+		globals.short_group_names = NULL;
+	}
+
+	cafekbd_indicator_load_group_names ((const gchar **) xklrec->layouts,
+					 (const gchar **)
+					 xklrec->variants);
+
+	ForAllIndicators () {
+		cafekbd_indicator_reinit_ui (gki);
+	} NextIndicator ();
+	g_object_unref (G_OBJECT (xklrec));
+}
+
+/* Should be called once for all applets */
+static void
+cafekbd_indicator_state_callback (XklEngine           *engine G_GNUC_UNUSED,
+				  XklEngineStateChange changeType,
+				  gint                 group,
+				  gboolean             restore)
+{
+	xkl_debug (150, "group is now %d, restore: %d\n", group, restore);
+
+	if (changeType == GROUP_CHANGED) {
+		ForAllIndicators () {
+			xkl_debug (200, "do repaint\n");
+			cafekbd_indicator_set_current_page_for_group
+			    (gki, group);
+		}
+		NextIndicator ();
+	}
+}
+
+
+void
+cafekbd_indicator_set_current_page (CafekbdIndicator * gki)
+{
+	XklState *cur_state;
+	cur_state = xkl_engine_get_current_state (globals.engine);
+	if (cur_state->group >= 0)
+		cafekbd_indicator_set_current_page_for_group (gki,
+							   cur_state->
+							   group);
+}
+
+void
+cafekbd_indicator_set_current_page_for_group (CafekbdIndicator * gki, int group)
+{
+	xkl_debug (200, "Revalidating for group %d\n", group);
+
+	ctk_notebook_set_current_page (CTK_NOTEBOOK (gki), group + 1);
+
+	cafekbd_indicator_update_tooltips (gki);
+}
+
+/* Should be called once for all widgets */
+static CdkFilterReturn
+cafekbd_indicator_filter_x_evt (CdkXEvent *xev,
+				CdkEvent  *event G_GNUC_UNUSED)
+{
+	XEvent *xevent = (XEvent *) xev;
+
+	xkl_engine_filter_events (globals.engine, xevent);
+	switch (xevent->type) {
+	case ReparentNotify:
+		{
+			XReparentEvent *rne = (XReparentEvent *) xev;
+
+			ForAllIndicators () {
+				CdkWindow *w =
+				    ctk_widget_get_parent_window
+				    (CTK_WIDGET (gki));
+
+				/* compare the indicator's parent window with the even window */
+				if (w != NULL
+				    && CDK_WINDOW_XID (w) == rne->window) {
+					/* if so - make it transparent... */
+					xkl_engine_set_window_transparent
+					    (globals.engine, rne->window,
+					     TRUE);
+				}
+			}
+			NextIndicator ()
+		}
+		break;
+	}
+	return CDK_FILTER_CONTINUE;
+}
+
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_start_listen (void)
+{
+	cdk_window_add_filter (NULL, (CdkFilterFunc)
+			       cafekbd_indicator_filter_x_evt, NULL);
+	cdk_window_add_filter (cdk_get_default_root_window (),
+			       (CdkFilterFunc)
+			       cafekbd_indicator_filter_x_evt, NULL);
+
+	xkl_engine_start_listen (globals.engine,
+				 XKLL_TRACK_KEYBOARD_STATE);
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_stop_listen (void)
+{
+	xkl_engine_stop_listen (globals.engine, XKLL_TRACK_KEYBOARD_STATE);
+
+	cdk_window_remove_filter (NULL, (CdkFilterFunc)
+				  cafekbd_indicator_filter_x_evt, NULL);
+	cdk_window_remove_filter
+	    (cdk_get_default_root_window (),
+	     (CdkFilterFunc) cafekbd_indicator_filter_x_evt, NULL);
+}
+
+static gboolean
+cafekbd_indicator_scroll (CtkWidget      *gki G_GNUC_UNUSED,
+			  CdkEventScroll *event G_GNUC_UNUSED)
+{
+	/* mouse wheel events should be ignored, otherwise funny effects appear */
+	return TRUE;
+}
+
+static void cafekbd_indicator_init(CafekbdIndicator* gki)
+{
+	CtkWidget *def_drawing;
+	CtkNotebook *notebook;
+
+	if (!g_slist_length(globals.widget_instances))
+	{
+		cafekbd_indicator_global_init();
+	}
+
+	gki->priv = g_new0 (CafekbdIndicatorPrivate, 1);
+
+	notebook = CTK_NOTEBOOK (gki);
+
+	xkl_debug (100, "Initiating the widget startup process for %p\n", gki);
+
+	ctk_notebook_set_show_tabs (notebook, FALSE);
+	ctk_notebook_set_show_border (notebook, FALSE);
+
+	def_drawing =
+	    ctk_image_new_from_icon_name ("process-stop",
+				      CTK_ICON_SIZE_BUTTON);
+
+	ctk_notebook_append_page (notebook, def_drawing,
+				  ctk_label_new (""));
+
+	if (globals.engine == NULL) {
+		cafekbd_indicator_set_tooltips (gki,
+					     _
+					     ("XKB initialization error"));
+		return;
+	}
+
+	cafekbd_indicator_set_tooltips (gki, NULL);
+
+	cafekbd_indicator_fill (gki);
+	cafekbd_indicator_set_current_page (gki);
+
+	ctk_widget_add_events (CTK_WIDGET (gki), CDK_BUTTON_PRESS_MASK);
+
+	/* append AFTER all initialization work is finished */
+	globals.widget_instances =
+	    g_slist_append (globals.widget_instances, gki);
+}
+
+static void
+cafekbd_indicator_finalize (GObject * obj)
+{
+	CafekbdIndicator *gki = CAFEKBD_INDICATOR (obj);
+	xkl_debug (100,
+		   "Starting the cafe-kbd-indicator widget shutdown process for %p\n",
+		   gki);
+
+	/* remove BEFORE all termination work is finished */
+	globals.widget_instances =
+	    g_slist_remove (globals.widget_instances, gki);
+
+	cafekbd_indicator_cleanup (gki);
+
+	xkl_debug (100,
+		   "The instance of cafe-kbd-indicator successfully finalized\n");
+
+	g_free (gki->priv);
+
+	G_OBJECT_CLASS (cafekbd_indicator_parent_class)->finalize (obj);
+
+	if (!g_slist_length (globals.widget_instances))
+		cafekbd_indicator_global_term ();
+}
+
+static void
+cafekbd_indicator_global_term (void)
+{
+	xkl_debug (100, "*** Last  CafekbdIndicator instance *** \n");
+	cafekbd_indicator_stop_listen ();
+
+	cafekbd_desktop_config_stop_listen (&globals.cfg);
+	cafekbd_indicator_config_stop_listen (&globals.ind_cfg);
+
+	cafekbd_indicator_config_term (&globals.ind_cfg);
+	cafekbd_keyboard_config_term (&globals.kbd_cfg);
+	cafekbd_desktop_config_term (&globals.cfg);
+
+	g_object_unref (G_OBJECT (globals.registry));
+	globals.registry = NULL;
+	g_object_unref (G_OBJECT (globals.engine));
+	globals.engine = NULL;
+	xkl_debug (100, "*** Terminated globals *** \n");
+}
+
+static void
+cafekbd_indicator_class_init (CafekbdIndicatorClass * klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+	CtkWidgetClass *widget_class = CTK_WIDGET_CLASS (klass);
+
+	xkl_debug (100, "*** First CafekbdIndicator instance *** \n");
+
+	memset (&globals, 0, sizeof (globals));
+
+	/* Initing some global vars */
+	globals.tooltips_format = "%s";
+
+	/* Initing vtable */
+	object_class->finalize = cafekbd_indicator_finalize;
+
+	widget_class->scroll_event = cafekbd_indicator_scroll;
+	widget_class->parent_set = cafekbd_indicator_parent_set;
+
+	/* Signals */
+	g_signal_new ("reinit-ui", CAFEKBD_TYPE_INDICATOR,
+		      G_SIGNAL_RUN_LAST,
+		      G_STRUCT_OFFSET (CafekbdIndicatorClass, reinit_ui),
+		      NULL, NULL, cafekbd_indicator_VOID__VOID,
+		      G_TYPE_NONE, 0);
+}
+
+static void
+cafekbd_indicator_global_init (void)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+
+	globals.engine = xkl_engine_get_instance(CDK_DISPLAY_XDISPLAY(cdk_display_get_default()));
+
+	if (globals.engine == NULL)
+	{
+		xkl_debug (0, "Libxklavier initialization error");
+		return;
+	}
+
+	g_signal_connect (globals.engine, "X-state-changed",
+			  G_CALLBACK (cafekbd_indicator_state_callback),
+			  NULL);
+	g_signal_connect (globals.engine, "X-config-changed",
+			  G_CALLBACK (cafekbd_indicator_kbd_cfg_callback),
+			  NULL);
+
+	cafekbd_desktop_config_init (&globals.cfg, globals.engine);
+	cafekbd_keyboard_config_init (&globals.kbd_cfg, globals.engine);
+	cafekbd_indicator_config_init (&globals.ind_cfg, globals.engine);
+
+	cafekbd_desktop_config_start_listen (&globals.cfg,
+					  (GCallback)
+					  cafekbd_indicator_cfg_changed,
+					  NULL);
+	cafekbd_indicator_config_start_listen (&globals.ind_cfg,
+					    (GCallback)
+					    cafekbd_indicator_ind_cfg_changed,
+					    NULL);
+
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+
+	globals.registry =
+	    xkl_config_registry_get_instance (globals.engine);
+	xkl_config_registry_load (globals.registry,
+				  globals.cfg.load_extra_items);
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+	cafekbd_indicator_update_images ();
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	cafekbd_indicator_load_group_names ((const gchar **) xklrec->layouts,
+					 (const gchar **)
+					 xklrec->variants);
+	g_object_unref (G_OBJECT (xklrec));
+
+	cafekbd_indicator_start_listen ();
+
+	xkl_debug (100, "*** Inited globals *** \n");
+}
+
+CtkWidget *
+cafekbd_indicator_new (void)
+{
+	return
+	    CTK_WIDGET (g_object_new (cafekbd_indicator_get_type (), NULL));
+}
+
+void
+cafekbd_indicator_set_parent_tooltips (CafekbdIndicator * gki, gboolean spt)
+{
+	gki->priv->set_parent_tooltips = spt;
+	cafekbd_indicator_update_tooltips (gki);
+}
+
+void
+cafekbd_indicator_set_tooltips_format (const gchar format[])
+{
+	globals.tooltips_format = format;
+	ForAllIndicators ()
+	    cafekbd_indicator_update_tooltips (gki);
+	NextIndicator ()
+}
+
+/**
+ * cafekbd_indicator_get_xkl_engine:
+ *
+ * Returns: (transfer none): The engine shared by all CafekbdIndicator objects
+ */
+XklEngine *
+cafekbd_indicator_get_xkl_engine ()
+{
+	return globals.engine;
+}
+
+/**
+ * cafekbd_indicator_get_group_names:
+ *
+ * Returns: (transfer none) (array zero-terminated=1): List of group names
+ */
+gchar **
+cafekbd_indicator_get_group_names ()
+{
+	return globals.full_group_names;
+}
+
+gchar *
+cafekbd_indicator_get_image_filename (guint group)
+{
+	if (!globals.ind_cfg.show_flags)
+		return NULL;
+	return cafekbd_indicator_config_get_images_file (&globals.ind_cfg,
+						      &globals.kbd_cfg,
+						      group);
+}
+
+gdouble
+cafekbd_indicator_get_max_width_height_ratio (void)
+{
+	gdouble rv = 0.0;
+	GSList *ip = globals.images;
+	if (!globals.ind_cfg.show_flags)
+		return 0;
+	while (ip != NULL) {
+		GdkPixbuf *img = GDK_PIXBUF (ip->data);
+		gdouble r =
+		    1.0 * gdk_pixbuf_get_width (img) /
+		    gdk_pixbuf_get_height (img);
+		if (r > rv)
+			rv = r;
+		ip = ip->next;
+	}
+	return rv;
+}
+
+void
+cafekbd_indicator_set_angle (CafekbdIndicator * gki, gdouble angle)
+{
+	gki->priv->angle = angle;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/3.html b/2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/3.html new file mode 100644 index 0000000..2dbd2a6 --- /dev/null +++ b/2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/3.html @@ -0,0 +1,1832 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <X11/keysym.h>
+
+#include <glib/gi18n-lib.h>
+
+#include <cafekbd-keyboard-config.h>
+#include <cafekbd-config-private.h>
+#include <cafekbd-util.h>
+
+/*
+ * CafekbdKeyboardConfig
+ */
+#define CAFEKBD_KEYBOARD_CONFIG_SCHEMA CAFEKBD_CONFIG_SCHEMA ".kbd"
+
+#define GROUP_SWITCHERS_GROUP "grp"
+#define DEFAULT_GROUP_SWITCH "grp:shift_caps_toggle"
+
+const gchar CAFEKBD_KEYBOARD_CONFIG_KEY_MODEL[] = "model";
+const gchar CAFEKBD_KEYBOARD_CONFIG_KEY_LAYOUTS[] = "layouts";
+const gchar CAFEKBD_KEYBOARD_CONFIG_KEY_OPTIONS[] = "options";
+
+const gchar *CAFEKBD_KEYBOARD_CONFIG_ACTIVE[] = {
+	CAFEKBD_KEYBOARD_CONFIG_KEY_MODEL,
+	CAFEKBD_KEYBOARD_CONFIG_KEY_LAYOUTS,
+	CAFEKBD_KEYBOARD_CONFIG_KEY_OPTIONS
+};
+
+/*
+ * static common functions
+ */
+
+static gboolean
+cafekbd_strv_equal (gchar ** l1, gchar ** l2)
+{
+	if (l1 == l2)
+		return TRUE;
+	if (l1 == NULL)
+		return g_strv_length (l2) == 0;
+	if (l2 == NULL)
+		return g_strv_length (l1) == 0;
+
+	while ((*l1 != NULL) && (*l2 != NULL)) {
+		if (*l1 != *l2) {
+			if (*l1 && *l2) {<--- Condition '*l1' is always true<--- Condition '*l2' is always true
+				if (g_ascii_strcasecmp (*l1, *l2))
+					return FALSE;
+			} else
+				return FALSE;
+		}
+
+		l1++;
+		l2++;
+	}
+	return (*l1 == NULL) && (*l2 == NULL);
+}
+
+gboolean
+cafekbd_keyboard_config_get_lv_descriptions (XklConfigRegistry *
+					  config_registry,
+					  const gchar * layout_name,
+					  const gchar * variant_name,
+					  gchar ** layout_short_descr,
+					  gchar ** layout_descr,
+					  gchar ** variant_short_descr,
+					  gchar ** variant_descr)
+{
+	/* TODO make it not static */
+	static XklConfigItem *litem = NULL;
+	static XklConfigItem *vitem = NULL;
+
+	if (litem == NULL)
+		litem = xkl_config_item_new ();
+	if (vitem == NULL)
+		vitem = xkl_config_item_new ();
+
+	layout_name = g_strdup (layout_name);
+
+	g_snprintf (litem->name, sizeof litem->name, "%s", layout_name);
+	if (xkl_config_registry_find_layout (config_registry, litem)) {
+		*layout_short_descr = litem->short_description;
+		*layout_descr = litem->description;
+	} else
+		*layout_short_descr = *layout_descr = NULL;
+
+	if (variant_name != NULL) {
+		variant_name = g_strdup (variant_name);
+		g_snprintf (vitem->name, sizeof vitem->name, "%s",
+			    variant_name);
+		if (xkl_config_registry_find_variant
+		    (config_registry, layout_name, vitem)) {
+			*variant_short_descr = vitem->short_description;
+			*variant_descr = vitem->description;
+		} else
+			*variant_short_descr = *variant_descr = NULL;
+
+		g_free ((char *) variant_name);
+	} else
+		*variant_descr = NULL;
+
+	g_free ((char *) layout_name);
+	return *layout_descr != NULL;
+}
+
+/*
+ * extern common functions
+ */
+const gchar *
+cafekbd_keyboard_config_merge_items (const gchar * parent,
+				  const gchar * child)
+{
+	static gchar buffer[XKL_MAX_CI_NAME_LENGTH * 2 - 1];
+	*buffer = '\0';
+	if (parent != NULL) {
+		if (strlen (parent) >= XKL_MAX_CI_NAME_LENGTH)
+			return NULL;
+		strcat (buffer, parent);
+	}
+	if (child != NULL && *child != 0) {
+		if (strlen (child) >= XKL_MAX_CI_NAME_LENGTH)
+			return NULL;
+		strcat (buffer, "\t");
+		strcat (buffer, child);
+	}
+	return buffer;
+}
+
+gboolean
+cafekbd_keyboard_config_split_items (const gchar * merged, gchar ** parent,
+				  gchar ** child)
+{
+	static gchar pbuffer[XKL_MAX_CI_NAME_LENGTH];
+	static gchar cbuffer[XKL_MAX_CI_NAME_LENGTH];
+	int plen;
+	const gchar *pos;
+	*parent = *child = NULL;
+
+	if (merged == NULL)
+		return FALSE;
+
+	pos = strchr (merged, '\t');
+	if (pos == NULL) {
+		plen = strlen (merged);
+	} else {
+		plen = pos - merged;
+		if (strlen (pos + 1) >= XKL_MAX_CI_NAME_LENGTH)
+			return FALSE;
+		strcpy (*child = cbuffer, pos + 1);
+	}
+	if (plen >= XKL_MAX_CI_NAME_LENGTH)
+		return FALSE;
+	memcpy (*parent = pbuffer, merged, plen);
+	pbuffer[plen] = '\0';
+	return TRUE;
+}
+
+/*
+ * static CafekbdKeyboardConfig functions
+ */
+static void
+cafekbd_keyboard_config_copy_from_xkl_config (CafekbdKeyboardConfig * kbd_config,
+					   XklConfigRec * pdata)
+{
+	char **p;
+	int i;
+	cafekbd_keyboard_config_model_set (kbd_config, pdata->model);
+	xkl_debug (150, "Loaded Kbd model: [%s]\n", pdata->model);
+
+	/* Layouts */
+	g_strfreev (kbd_config->layouts_variants);
+	kbd_config->layouts_variants = NULL;
+	if (pdata->layouts != NULL) {
+		char **p1;
+
+		p = pdata->layouts;
+		p1 = pdata->variants;
+		kbd_config->layouts_variants =
+		    g_new0 (gchar *, g_strv_length (pdata->layouts) + 1);
+		i = 0;
+		while (*p != NULL) {
+			const gchar *full_layout =
+			    cafekbd_keyboard_config_merge_items (*p, *p1);
+			xkl_debug (150,
+				   "Loaded Kbd layout (with variant): [%s]\n",
+				   full_layout);
+			kbd_config->layouts_variants[i++] =
+			    g_strdup (full_layout);
+			p++;
+			p1++;
+		}
+	}
+
+	/* Options */
+	g_strfreev (kbd_config->options);
+	kbd_config->options = NULL;
+
+	if (pdata->options != NULL) {
+		p = pdata->options;
+		kbd_config->options =
+		    g_new0 (gchar *, g_strv_length (pdata->options) + 1);
+		i = 0;
+		while (*p != NULL) {
+			char *option = *p;
+			char *delim =<--- Variable 'delim' can be declared as pointer to const
+			    (option != NULL) ? strchr (option, ':') : NULL;<--- Condition 'option!=NULL' is always true
+			int len;
+			if ((delim != NULL) &&
+			    ((len =
+			      (delim - option)) <
+			     XKL_MAX_CI_NAME_LENGTH)) {
+				char group[XKL_MAX_CI_NAME_LENGTH];
+
+				strncpy (group, option, len);
+				group[len] = 0;
+				xkl_debug (150,
+					   "Loaded Kbd option: [%s][%s]\n",
+					   group, option);
+				cafekbd_keyboard_config_options_set
+				    (kbd_config, i++, group, option);
+			}
+			p++;
+		}
+	}
+}
+
+static void
+cafekbd_keyboard_config_copy_to_xkl_config (CafekbdKeyboardConfig * kbd_config,
+					 XklConfigRec * pdata)
+{
+	int i;
+	int num_layouts, num_options;
+	pdata->model =
+	    (kbd_config->model ==
+	     NULL) ? NULL : g_strdup (kbd_config->model);
+
+	num_layouts =
+	    (kbd_config->layouts_variants ==
+	     NULL) ? 0 : g_strv_length (kbd_config->layouts_variants);
+	num_options =
+	    (kbd_config->options ==
+	     NULL) ? 0 : g_strv_length (kbd_config->options);
+
+	xkl_debug (150, "Taking %d layouts\n", num_layouts);
+	if (num_layouts != 0) {
+		gchar **the_layout_variant = kbd_config->layouts_variants;
+		char **p1 = pdata->layouts =
+		    g_new0 (char *, num_layouts + 1);
+		char **p2 = pdata->variants =
+		    g_new0 (char *, num_layouts + 1);
+		for (i = num_layouts; --i >= 0;) {
+			char *layout, *variant;
+			if (cafekbd_keyboard_config_split_items
+			    (*the_layout_variant, &layout, &variant)
+			    && variant != NULL) {
+				*p1 =
+				    (layout ==
+				     NULL) ? g_strdup ("") :
+				    g_strdup (layout);
+				*p2 =
+				    (variant ==<--- Condition 'variant==NULL' is always false
+				     NULL) ? g_strdup ("") :
+				    g_strdup (variant);
+			} else {
+				*p1 =
+				    (*the_layout_variant ==
+				     NULL) ? g_strdup ("") :
+				    g_strdup (*the_layout_variant);
+				*p2 = g_strdup ("");
+			}
+			xkl_debug (150, "Adding [%s]/%p and [%s]/%p\n",
+				   *p1 ? *p1 : "(nil)", *p1,
+				   *p2 ? *p2 : "(nil)", *p2);
+			p1++;
+			p2++;
+			the_layout_variant++;
+		}
+	}
+
+	if (num_options != 0) {
+		gchar **the_option = kbd_config->options;
+		char **p = pdata->options =
+		    g_new0 (char *, num_options + 1);
+		for (i = num_options; --i >= 0;) {
+			char *group, *option;
+			if (cafekbd_keyboard_config_split_items
+			    (*the_option, &group, &option)
+			    && option != NULL)
+				*(p++) = g_strdup (option);
+			else {
+				*(p++) = g_strdup ("");
+				xkl_debug (150, "Could not split [%s]\n",
+					   *the_option);
+			}
+			the_option++;
+		}
+	}
+}
+
+static void
+cafekbd_keyboard_config_load_params (CafekbdKeyboardConfig * kbd_config,
+				  const gchar * param_names[])
+{
+	gchar *pc;
+
+	pc = g_settings_get_string (kbd_config->settings, param_names[0]);
+	if (pc == NULL) {
+		cafekbd_keyboard_config_model_set (kbd_config, NULL);
+	} else {
+		cafekbd_keyboard_config_model_set (kbd_config, pc);
+		g_free (pc);
+	}
+	xkl_debug (150, "Loaded Kbd model: [%s]\n",
+		   kbd_config->model ? kbd_config->model : "(null)");
+
+	g_strfreev (kbd_config->layouts_variants);
+
+	kbd_config->layouts_variants =
+	    g_settings_get_strv (kbd_config->settings, param_names[1]);
+
+	if (kbd_config->layouts_variants != NULL
+	    && kbd_config->layouts_variants[0] == NULL) {
+		g_strfreev (kbd_config->layouts_variants);
+		kbd_config->layouts_variants = NULL;
+	}
+
+	g_strfreev (kbd_config->options);
+
+	kbd_config->options =
+	    g_settings_get_strv (kbd_config->settings, param_names[2]);
+
+	if (kbd_config->options != NULL && kbd_config->options[0] == NULL) {
+		g_strfreev (kbd_config->options);
+		kbd_config->options = NULL;
+	}
+}
+
+static void
+cafekbd_keyboard_config_save_params (CafekbdKeyboardConfig * kbd_config,
+				  const gchar * param_names[])
+{
+	gchar **pl;
+
+	if (kbd_config->model)
+		g_settings_set_string (kbd_config->settings, param_names[0],
+				       kbd_config->model);
+	else
+		g_settings_set_string (kbd_config->settings, param_names[0],
+				       NULL);
+	xkl_debug (150, "Saved Kbd model: [%s]\n",
+		   kbd_config->model ? kbd_config->model : "(null)");
+
+	if (kbd_config->layouts_variants) {
+		pl = kbd_config->layouts_variants;
+		while (*pl != NULL) {
+			xkl_debug (150, "Saved Kbd layout: [%s]\n", *pl);
+			pl++;
+		}
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[1],
+				     (const gchar * const *)
+				     kbd_config->layouts_variants);
+	} else {
+		xkl_debug (150, "Saved Kbd layouts: []\n");
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[1], NULL);
+	}
+
+	if (kbd_config->options) {
+		pl = kbd_config->options;
+		while (*pl != NULL) {
+			xkl_debug (150, "Saved Kbd option: [%s]\n", *pl);
+			pl++;
+		}
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[2],
+				     (const gchar *
+				      const *) kbd_config->options);
+	} else {
+		xkl_debug (150, "Saved Kbd options: []\n");
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[2], NULL);
+	}
+}
+
+/*
+ * extern CafekbdKeyboardConfig config functions
+ */
+void
+cafekbd_keyboard_config_init (CafekbdKeyboardConfig * kbd_config,
+			      XklEngine * engine)
+{
+	memset (kbd_config, 0, sizeof (*kbd_config));
+	kbd_config->settings = g_settings_new (CAFEKBD_KEYBOARD_CONFIG_SCHEMA);
+	kbd_config->engine = engine;
+}
+
+void
+cafekbd_keyboard_config_term (CafekbdKeyboardConfig * kbd_config)
+{
+	cafekbd_keyboard_config_model_set (kbd_config, NULL);
+
+	g_strfreev (kbd_config->layouts_variants);
+	kbd_config->layouts_variants = NULL;
+	g_strfreev (kbd_config->options);
+	kbd_config->options = NULL;
+
+	g_object_unref (kbd_config->settings);
+	kbd_config->settings = NULL;
+}
+
+void
+cafekbd_keyboard_config_load_from_gsettings (CafekbdKeyboardConfig * kbd_config,
+				      CafekbdKeyboardConfig *
+				      kbd_config_default)
+{
+	cafekbd_keyboard_config_load_params (kbd_config,
+					  CAFEKBD_KEYBOARD_CONFIG_ACTIVE);
+
+	if (kbd_config_default != NULL) {
+
+		if (kbd_config->model == NULL)
+			kbd_config->model =
+			    g_strdup (kbd_config_default->model);
+
+		if (kbd_config->layouts_variants == NULL) {
+			kbd_config->layouts_variants =
+			    g_strdupv
+			    (kbd_config_default->layouts_variants);
+		}
+
+		if (kbd_config->options == NULL) {
+			kbd_config->options =
+			    g_strdupv (kbd_config_default->options);
+		}
+	}
+}
+
+void
+cafekbd_keyboard_config_load_from_x_current (CafekbdKeyboardConfig * kbd_config,
+					  XklConfigRec * data)
+{
+	gboolean own_data = data == NULL;
+	xkl_debug (150, "Copying config from X(current)\n");
+	if (own_data)
+		data = xkl_config_rec_new ();
+	if (xkl_config_rec_get_from_server (data, kbd_config->engine))
+		cafekbd_keyboard_config_copy_from_xkl_config (kbd_config,
+							   data);
+	else
+		xkl_debug (150,
+			   "Could not load keyboard config from server: [%s]\n",
+			   xkl_get_last_error ());
+	if (own_data)
+		g_object_unref (G_OBJECT (data));
+}
+
+void
+cafekbd_keyboard_config_load_from_x_initial (CafekbdKeyboardConfig * kbd_config,
+					  XklConfigRec * data)
+{
+	gboolean own_data = data == NULL;
+	xkl_debug (150, "Copying config from X(initial)\n");
+	if (own_data)
+		data = xkl_config_rec_new ();
+	if (xkl_config_rec_get_from_backup (data, kbd_config->engine))
+		cafekbd_keyboard_config_copy_from_xkl_config (kbd_config,
+							   data);
+	else
+		xkl_debug (150,
+			   "Could not load keyboard config from backup: [%s]\n",
+			   xkl_get_last_error ());
+	if (own_data)
+		g_object_unref (G_OBJECT (data));
+}
+
+static gboolean
+cafekbd_keyboard_config_options_equals (CafekbdKeyboardConfig * kbd_config1,
+				     CafekbdKeyboardConfig * kbd_config2)
+{
+	int num_options, num_options2;
+
+	num_options =
+	    (kbd_config1->options ==
+	     NULL) ? 0 : g_strv_length (kbd_config1->options);
+	num_options2 =
+	    (kbd_config2->options ==
+	     NULL) ? 0 : g_strv_length (kbd_config2->options);
+
+	if (num_options != num_options2)
+		return False;
+
+	if (num_options != 0) {
+		int i;
+		char *group1, *option1;
+
+		for (i = 0; i < num_options; i++) {
+			int j;
+			char *group2, *option2;
+			gboolean are_equal = FALSE;
+
+			if (!cafekbd_keyboard_config_split_items
+			    (kbd_config1->options[i], &group1, &option1))
+				continue;
+
+			option1 = g_strdup (option1);
+
+			for (j = 0; j < num_options && !are_equal; j++) {
+				if (cafekbd_keyboard_config_split_items
+				    (kbd_config2->options[j], &group2,
+				     &option2)) {
+					are_equal =
+					    strcmp (option1, option2) == 0;
+				}
+			}
+
+			g_free (option1);
+
+			if (!are_equal)
+				return False;
+		}
+	}
+
+	return True;
+}
+
+gboolean
+cafekbd_keyboard_config_equals (CafekbdKeyboardConfig * kbd_config1,
+			     CafekbdKeyboardConfig * kbd_config2)
+{
+	if (kbd_config1 == kbd_config2)
+		return True;
+	if ((kbd_config1->model != kbd_config2->model) &&
+	    (kbd_config1->model != NULL) &&
+	    (kbd_config2->model != NULL) &&
+	    g_ascii_strcasecmp (kbd_config1->model, kbd_config2->model))
+		return False;
+	if (!cafekbd_strv_equal (kbd_config1->layouts_variants,
+			   kbd_config2->layouts_variants))
+		return False;
+
+	if (!cafekbd_keyboard_config_options_equals
+	    (kbd_config1, kbd_config2))
+		return False;
+
+	return True;
+}
+
+void
+cafekbd_keyboard_config_save_to_gsettings (CafekbdKeyboardConfig * kbd_config)
+{
+	g_settings_delay (kbd_config->settings);
+
+	cafekbd_keyboard_config_save_params (kbd_config,
+					     CAFEKBD_KEYBOARD_CONFIG_ACTIVE);
+
+	g_settings_apply (kbd_config->settings);
+}
+
+void
+cafekbd_keyboard_config_model_set (CafekbdKeyboardConfig * kbd_config,
+				const gchar * model_name)
+{
+	if (kbd_config->model != NULL)
+		g_free (kbd_config->model);
+	kbd_config->model =
+	    (model_name == NULL
+	     || model_name[0] == '\0') ? NULL : g_strdup (model_name);
+}
+
+void
+cafekbd_keyboard_config_options_set (CafekbdKeyboardConfig * kbd_config,
+				  gint idx,
+				  const gchar * group_name,
+				  const gchar * option_name)
+{
+	const gchar *merged;
+	if (group_name == NULL || option_name == NULL)
+		return;
+	merged =
+	    cafekbd_keyboard_config_merge_items (group_name, option_name);
+	if (merged == NULL)
+		return;
+	kbd_config->options[idx] = g_strdup (merged);
+}
+
+gboolean
+cafekbd_keyboard_config_options_is_set (CafekbdKeyboardConfig * kbd_config,<--- Parameter 'kbd_config' can be declared as pointer to const
+				     const gchar * group_name,
+				     const gchar * option_name)
+{
+	gchar **p = kbd_config->options;
+	const gchar *merged =
+	    cafekbd_keyboard_config_merge_items (group_name, option_name);
+	if (merged == NULL)
+		return FALSE;
+
+	while (p && *p) {
+		if (!g_ascii_strcasecmp (merged, *p++))
+			return TRUE;
+	}
+	return FALSE;
+}
+
+gboolean
+cafekbd_keyboard_config_activate (CafekbdKeyboardConfig * kbd_config)
+{
+	gboolean rv;
+	XklConfigRec *data = xkl_config_rec_new ();
+
+	cafekbd_keyboard_config_copy_to_xkl_config (kbd_config, data);
+	rv = xkl_config_rec_activate (data, kbd_config->engine);
+	g_object_unref (G_OBJECT (data));
+
+	return rv;
+}
+
+/**
+ * cafekbd_keyboard_config_start_listen:
+ * @func: (scope notified): a function to call when settings are changed
+ */
+void
+cafekbd_keyboard_config_start_listen (CafekbdKeyboardConfig * kbd_config,
+				   GCallback func,
+				   gpointer user_data)
+{
+	kbd_config->config_listener_id =
+	    g_signal_connect (kbd_config->settings, "changed", func,
+			      user_data);
+}
+
+void
+cafekbd_keyboard_config_stop_listen (CafekbdKeyboardConfig * kbd_config)
+{
+	g_signal_handler_disconnect (kbd_config->settings,
+				     kbd_config->config_listener_id);
+	kbd_config->config_listener_id = 0;
+}
+
+gboolean
+cafekbd_keyboard_config_get_descriptions (XklConfigRegistry * config_registry,
+				       const gchar * name,
+				       gchar ** layout_short_descr,
+				       gchar ** layout_descr,
+				       gchar ** variant_short_descr,
+				       gchar ** variant_descr)
+{
+	char *layout_name = NULL, *variant_name = NULL;
+	if (!cafekbd_keyboard_config_split_items
+	    (name, &layout_name, &variant_name))
+		return FALSE;
+	return cafekbd_keyboard_config_get_lv_descriptions (config_registry,
+							 layout_name,
+							 variant_name,
+							 layout_short_descr,
+							 layout_descr,
+							 variant_short_descr,
+							 variant_descr);
+}
+
+const gchar *
+cafekbd_keyboard_config_format_full_layout (const gchar * layout_descr,
+					 const gchar * variant_descr)
+{
+	static gchar full_descr[XKL_MAX_CI_DESC_LENGTH * 2];
+	if (variant_descr == NULL || variant_descr[0] == 0)
+		g_snprintf (full_descr, sizeof (full_descr), "%s",
+			    layout_descr);
+	else
+		g_snprintf (full_descr, sizeof (full_descr), "%s %s",
+			    layout_descr, variant_descr);
+	return full_descr;
+}
+
+gchar *
+cafekbd_keyboard_config_to_string (const CafekbdKeyboardConfig * config)
+{
+	gchar *layouts = NULL, *options = NULL;
+	GString *buffer = g_string_new (NULL);
+
+	gchar **iter;
+	gint count;
+	gchar *result;
+
+	if (config->layouts_variants) {
+		/* g_slist_length is "expensive", so we determinate the length on the fly */
+		for (iter = config->layouts_variants, count = 0; *iter;
+		     iter++, ++count) {
+			if (buffer->len)
+				g_string_append (buffer, " ");
+
+			g_string_append (buffer, *iter);
+		}
+
+		/* Translators: The count is related to the number of options. The %s
+		 * format specifier should not be modified, left "as is". */
+		layouts =
+		    g_strdup_printf (ngettext
+				     ("layout \"%s\"", "layouts \"%s\"",
+				      count), buffer->str);
+		g_string_truncate (buffer, 0);
+	}
+	if (config->options) {
+		/* g_slist_length is "expensive", so we determinate the length on the fly */
+		for (iter = config->options, count = 0; *iter;
+		     iter++, ++count) {
+			if (buffer->len)
+				g_string_append (buffer, " ");
+
+			g_string_append (buffer, *iter);
+		}
+
+		/* Translators: The count is related to the number of options. The %s
+		 * format specifier should not be modified, left "as is". */
+		options =
+		    g_strdup_printf (ngettext
+				     ("option \"%s\"", "options \"%s\"",
+				      count), buffer->str);
+		g_string_truncate (buffer, 0);
+	}
+
+	g_string_free (buffer, TRUE);
+
+	result =
+	    g_strdup_printf (_("model \"%s\", %s and %s"), config->model,
+			     layouts ? layouts : _("no layout"),
+			     options ? options : _("no options"));
+
+	g_free (options);
+	g_free (layouts);
+
+	return result;
+}
+
+/**
+ * cafekbd_keyboard_config_add_default_switch_option_if_necessary:
+ *
+ * Returns: (transfer full) (array zero-terminated=1): List of options
+ */
+gchar **
+cafekbd_keyboard_config_add_default_switch_option_if_necessary (gchar **
+							        layouts_list,
+							        gchar **
+							        options_list,
+							        gboolean *was_appended)
+{
+	*was_appended = FALSE;
+	if (g_strv_length (layouts_list) >= 2) {
+		gboolean any_switcher = False;
+		if (*options_list != NULL) {
+			gchar **option = options_list;
+			while (*option != NULL) {
+				char *g, *o;
+				if (cafekbd_keyboard_config_split_items
+				    (*option, &g, &o)) {
+					if (!g_ascii_strcasecmp
+					    (g, GROUP_SWITCHERS_GROUP)) {
+						any_switcher = True;
+						break;
+					}
+				}
+				option++;
+			}
+		}
+		if (!any_switcher) {
+			const gchar *id =
+			    cafekbd_keyboard_config_merge_items
+			    (GROUP_SWITCHERS_GROUP,
+			     DEFAULT_GROUP_SWITCH);
+			options_list =
+			    cafekbd_strv_append (options_list, g_strdup (id));
+			*was_appended = TRUE;
+		}
+	}
+	return options_list;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/4.html b/2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/4.html new file mode 100644 index 0000000..1d97c26 --- /dev/null +++ b/2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/4.html @@ -0,0 +1,6042 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
   1
+   2
+   3
+   4
+   5
+   6
+   7
+   8
+   9
+  10
+  11
+  12
+  13
+  14
+  15
+  16
+  17
+  18
+  19
+  20
+  21
+  22
+  23
+  24
+  25
+  26
+  27
+  28
+  29
+  30
+  31
+  32
+  33
+  34
+  35
+  36
+  37
+  38
+  39
+  40
+  41
+  42
+  43
+  44
+  45
+  46
+  47
+  48
+  49
+  50
+  51
+  52
+  53
+  54
+  55
+  56
+  57
+  58
+  59
+  60
+  61
+  62
+  63
+  64
+  65
+  66
+  67
+  68
+  69
+  70
+  71
+  72
+  73
+  74
+  75
+  76
+  77
+  78
+  79
+  80
+  81
+  82
+  83
+  84
+  85
+  86
+  87
+  88
+  89
+  90
+  91
+  92
+  93
+  94
+  95
+  96
+  97
+  98
+  99
+ 100
+ 101
+ 102
+ 103
+ 104
+ 105
+ 106
+ 107
+ 108
+ 109
+ 110
+ 111
+ 112
+ 113
+ 114
+ 115
+ 116
+ 117
+ 118
+ 119
+ 120
+ 121
+ 122
+ 123
+ 124
+ 125
+ 126
+ 127
+ 128
+ 129
+ 130
+ 131
+ 132
+ 133
+ 134
+ 135
+ 136
+ 137
+ 138
+ 139
+ 140
+ 141
+ 142
+ 143
+ 144
+ 145
+ 146
+ 147
+ 148
+ 149
+ 150
+ 151
+ 152
+ 153
+ 154
+ 155
+ 156
+ 157
+ 158
+ 159
+ 160
+ 161
+ 162
+ 163
+ 164
+ 165
+ 166
+ 167
+ 168
+ 169
+ 170
+ 171
+ 172
+ 173
+ 174
+ 175
+ 176
+ 177
+ 178
+ 179
+ 180
+ 181
+ 182
+ 183
+ 184
+ 185
+ 186
+ 187
+ 188
+ 189
+ 190
+ 191
+ 192
+ 193
+ 194
+ 195
+ 196
+ 197
+ 198
+ 199
+ 200
+ 201
+ 202
+ 203
+ 204
+ 205
+ 206
+ 207
+ 208
+ 209
+ 210
+ 211
+ 212
+ 213
+ 214
+ 215
+ 216
+ 217
+ 218
+ 219
+ 220
+ 221
+ 222
+ 223
+ 224
+ 225
+ 226
+ 227
+ 228
+ 229
+ 230
+ 231
+ 232
+ 233
+ 234
+ 235
+ 236
+ 237
+ 238
+ 239
+ 240
+ 241
+ 242
+ 243
+ 244
+ 245
+ 246
+ 247
+ 248
+ 249
+ 250
+ 251
+ 252
+ 253
+ 254
+ 255
+ 256
+ 257
+ 258
+ 259
+ 260
+ 261
+ 262
+ 263
+ 264
+ 265
+ 266
+ 267
+ 268
+ 269
+ 270
+ 271
+ 272
+ 273
+ 274
+ 275
+ 276
+ 277
+ 278
+ 279
+ 280
+ 281
+ 282
+ 283
+ 284
+ 285
+ 286
+ 287
+ 288
+ 289
+ 290
+ 291
+ 292
+ 293
+ 294
+ 295
+ 296
+ 297
+ 298
+ 299
+ 300
+ 301
+ 302
+ 303
+ 304
+ 305
+ 306
+ 307
+ 308
+ 309
+ 310
+ 311
+ 312
+ 313
+ 314
+ 315
+ 316
+ 317
+ 318
+ 319
+ 320
+ 321
+ 322
+ 323
+ 324
+ 325
+ 326
+ 327
+ 328
+ 329
+ 330
+ 331
+ 332
+ 333
+ 334
+ 335
+ 336
+ 337
+ 338
+ 339
+ 340
+ 341
+ 342
+ 343
+ 344
+ 345
+ 346
+ 347
+ 348
+ 349
+ 350
+ 351
+ 352
+ 353
+ 354
+ 355
+ 356
+ 357
+ 358
+ 359
+ 360
+ 361
+ 362
+ 363
+ 364
+ 365
+ 366
+ 367
+ 368
+ 369
+ 370
+ 371
+ 372
+ 373
+ 374
+ 375
+ 376
+ 377
+ 378
+ 379
+ 380
+ 381
+ 382
+ 383
+ 384
+ 385
+ 386
+ 387
+ 388
+ 389
+ 390
+ 391
+ 392
+ 393
+ 394
+ 395
+ 396
+ 397
+ 398
+ 399
+ 400
+ 401
+ 402
+ 403
+ 404
+ 405
+ 406
+ 407
+ 408
+ 409
+ 410
+ 411
+ 412
+ 413
+ 414
+ 415
+ 416
+ 417
+ 418
+ 419
+ 420
+ 421
+ 422
+ 423
+ 424
+ 425
+ 426
+ 427
+ 428
+ 429
+ 430
+ 431
+ 432
+ 433
+ 434
+ 435
+ 436
+ 437
+ 438
+ 439
+ 440
+ 441
+ 442
+ 443
+ 444
+ 445
+ 446
+ 447
+ 448
+ 449
+ 450
+ 451
+ 452
+ 453
+ 454
+ 455
+ 456
+ 457
+ 458
+ 459
+ 460
+ 461
+ 462
+ 463
+ 464
+ 465
+ 466
+ 467
+ 468
+ 469
+ 470
+ 471
+ 472
+ 473
+ 474
+ 475
+ 476
+ 477
+ 478
+ 479
+ 480
+ 481
+ 482
+ 483
+ 484
+ 485
+ 486
+ 487
+ 488
+ 489
+ 490
+ 491
+ 492
+ 493
+ 494
+ 495
+ 496
+ 497
+ 498
+ 499
+ 500
+ 501
+ 502
+ 503
+ 504
+ 505
+ 506
+ 507
+ 508
+ 509
+ 510
+ 511
+ 512
+ 513
+ 514
+ 515
+ 516
+ 517
+ 518
+ 519
+ 520
+ 521
+ 522
+ 523
+ 524
+ 525
+ 526
+ 527
+ 528
+ 529
+ 530
+ 531
+ 532
+ 533
+ 534
+ 535
+ 536
+ 537
+ 538
+ 539
+ 540
+ 541
+ 542
+ 543
+ 544
+ 545
+ 546
+ 547
+ 548
+ 549
+ 550
+ 551
+ 552
+ 553
+ 554
+ 555
+ 556
+ 557
+ 558
+ 559
+ 560
+ 561
+ 562
+ 563
+ 564
+ 565
+ 566
+ 567
+ 568
+ 569
+ 570
+ 571
+ 572
+ 573
+ 574
+ 575
+ 576
+ 577
+ 578
+ 579
+ 580
+ 581
+ 582
+ 583
+ 584
+ 585
+ 586
+ 587
+ 588
+ 589
+ 590
+ 591
+ 592
+ 593
+ 594
+ 595
+ 596
+ 597
+ 598
+ 599
+ 600
+ 601
+ 602
+ 603
+ 604
+ 605
+ 606
+ 607
+ 608
+ 609
+ 610
+ 611
+ 612
+ 613
+ 614
+ 615
+ 616
+ 617
+ 618
+ 619
+ 620
+ 621
+ 622
+ 623
+ 624
+ 625
+ 626
+ 627
+ 628
+ 629
+ 630
+ 631
+ 632
+ 633
+ 634
+ 635
+ 636
+ 637
+ 638
+ 639
+ 640
+ 641
+ 642
+ 643
+ 644
+ 645
+ 646
+ 647
+ 648
+ 649
+ 650
+ 651
+ 652
+ 653
+ 654
+ 655
+ 656
+ 657
+ 658
+ 659
+ 660
+ 661
+ 662
+ 663
+ 664
+ 665
+ 666
+ 667
+ 668
+ 669
+ 670
+ 671
+ 672
+ 673
+ 674
+ 675
+ 676
+ 677
+ 678
+ 679
+ 680
+ 681
+ 682
+ 683
+ 684
+ 685
+ 686
+ 687
+ 688
+ 689
+ 690
+ 691
+ 692
+ 693
+ 694
+ 695
+ 696
+ 697
+ 698
+ 699
+ 700
+ 701
+ 702
+ 703
+ 704
+ 705
+ 706
+ 707
+ 708
+ 709
+ 710
+ 711
+ 712
+ 713
+ 714
+ 715
+ 716
+ 717
+ 718
+ 719
+ 720
+ 721
+ 722
+ 723
+ 724
+ 725
+ 726
+ 727
+ 728
+ 729
+ 730
+ 731
+ 732
+ 733
+ 734
+ 735
+ 736
+ 737
+ 738
+ 739
+ 740
+ 741
+ 742
+ 743
+ 744
+ 745
+ 746
+ 747
+ 748
+ 749
+ 750
+ 751
+ 752
+ 753
+ 754
+ 755
+ 756
+ 757
+ 758
+ 759
+ 760
+ 761
+ 762
+ 763
+ 764
+ 765
+ 766
+ 767
+ 768
+ 769
+ 770
+ 771
+ 772
+ 773
+ 774
+ 775
+ 776
+ 777
+ 778
+ 779
+ 780
+ 781
+ 782
+ 783
+ 784
+ 785
+ 786
+ 787
+ 788
+ 789
+ 790
+ 791
+ 792
+ 793
+ 794
+ 795
+ 796
+ 797
+ 798
+ 799
+ 800
+ 801
+ 802
+ 803
+ 804
+ 805
+ 806
+ 807
+ 808
+ 809
+ 810
+ 811
+ 812
+ 813
+ 814
+ 815
+ 816
+ 817
+ 818
+ 819
+ 820
+ 821
+ 822
+ 823
+ 824
+ 825
+ 826
+ 827
+ 828
+ 829
+ 830
+ 831
+ 832
+ 833
+ 834
+ 835
+ 836
+ 837
+ 838
+ 839
+ 840
+ 841
+ 842
+ 843
+ 844
+ 845
+ 846
+ 847
+ 848
+ 849
+ 850
+ 851
+ 852
+ 853
+ 854
+ 855
+ 856
+ 857
+ 858
+ 859
+ 860
+ 861
+ 862
+ 863
+ 864
+ 865
+ 866
+ 867
+ 868
+ 869
+ 870
+ 871
+ 872
+ 873
+ 874
+ 875
+ 876
+ 877
+ 878
+ 879
+ 880
+ 881
+ 882
+ 883
+ 884
+ 885
+ 886
+ 887
+ 888
+ 889
+ 890
+ 891
+ 892
+ 893
+ 894
+ 895
+ 896
+ 897
+ 898
+ 899
+ 900
+ 901
+ 902
+ 903
+ 904
+ 905
+ 906
+ 907
+ 908
+ 909
+ 910
+ 911
+ 912
+ 913
+ 914
+ 915
+ 916
+ 917
+ 918
+ 919
+ 920
+ 921
+ 922
+ 923
+ 924
+ 925
+ 926
+ 927
+ 928
+ 929
+ 930
+ 931
+ 932
+ 933
+ 934
+ 935
+ 936
+ 937
+ 938
+ 939
+ 940
+ 941
+ 942
+ 943
+ 944
+ 945
+ 946
+ 947
+ 948
+ 949
+ 950
+ 951
+ 952
+ 953
+ 954
+ 955
+ 956
+ 957
+ 958
+ 959
+ 960
+ 961
+ 962
+ 963
+ 964
+ 965
+ 966
+ 967
+ 968
+ 969
+ 970
+ 971
+ 972
+ 973
+ 974
+ 975
+ 976
+ 977
+ 978
+ 979
+ 980
+ 981
+ 982
+ 983
+ 984
+ 985
+ 986
+ 987
+ 988
+ 989
+ 990
+ 991
+ 992
+ 993
+ 994
+ 995
+ 996
+ 997
+ 998
+ 999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+1011
+1012
+1013
+1014
+1015
+1016
+1017
+1018
+1019
+1020
+1021
+1022
+1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
+1033
+1034
+1035
+1036
+1037
+1038
+1039
+1040
+1041
+1042
+1043
+1044
+1045
+1046
+1047
+1048
+1049
+1050
+1051
+1052
+1053
+1054
+1055
+1056
+1057
+1058
+1059
+1060
+1061
+1062
+1063
+1064
+1065
+1066
+1067
+1068
+1069
+1070
+1071
+1072
+1073
+1074
+1075
+1076
+1077
+1078
+1079
+1080
+1081
+1082
+1083
+1084
+1085
+1086
+1087
+1088
+1089
+1090
+1091
+1092
+1093
+1094
+1095
+1096
+1097
+1098
+1099
+1100
+1101
+1102
+1103
+1104
+1105
+1106
+1107
+1108
+1109
+1110
+1111
+1112
+1113
+1114
+1115
+1116
+1117
+1118
+1119
+1120
+1121
+1122
+1123
+1124
+1125
+1126
+1127
+1128
+1129
+1130
+1131
+1132
+1133
+1134
+1135
+1136
+1137
+1138
+1139
+1140
+1141
+1142
+1143
+1144
+1145
+1146
+1147
+1148
+1149
+1150
+1151
+1152
+1153
+1154
+1155
+1156
+1157
+1158
+1159
+1160
+1161
+1162
+1163
+1164
+1165
+1166
+1167
+1168
+1169
+1170
+1171
+1172
+1173
+1174
+1175
+1176
+1177
+1178
+1179
+1180
+1181
+1182
+1183
+1184
+1185
+1186
+1187
+1188
+1189
+1190
+1191
+1192
+1193
+1194
+1195
+1196
+1197
+1198
+1199
+1200
+1201
+1202
+1203
+1204
+1205
+1206
+1207
+1208
+1209
+1210
+1211
+1212
+1213
+1214
+1215
+1216
+1217
+1218
+1219
+1220
+1221
+1222
+1223
+1224
+1225
+1226
+1227
+1228
+1229
+1230
+1231
+1232
+1233
+1234
+1235
+1236
+1237
+1238
+1239
+1240
+1241
+1242
+1243
+1244
+1245
+1246
+1247
+1248
+1249
+1250
+1251
+1252
+1253
+1254
+1255
+1256
+1257
+1258
+1259
+1260
+1261
+1262
+1263
+1264
+1265
+1266
+1267
+1268
+1269
+1270
+1271
+1272
+1273
+1274
+1275
+1276
+1277
+1278
+1279
+1280
+1281
+1282
+1283
+1284
+1285
+1286
+1287
+1288
+1289
+1290
+1291
+1292
+1293
+1294
+1295
+1296
+1297
+1298
+1299
+1300
+1301
+1302
+1303
+1304
+1305
+1306
+1307
+1308
+1309
+1310
+1311
+1312
+1313
+1314
+1315
+1316
+1317
+1318
+1319
+1320
+1321
+1322
+1323
+1324
+1325
+1326
+1327
+1328
+1329
+1330
+1331
+1332
+1333
+1334
+1335
+1336
+1337
+1338
+1339
+1340
+1341
+1342
+1343
+1344
+1345
+1346
+1347
+1348
+1349
+1350
+1351
+1352
+1353
+1354
+1355
+1356
+1357
+1358
+1359
+1360
+1361
+1362
+1363
+1364
+1365
+1366
+1367
+1368
+1369
+1370
+1371
+1372
+1373
+1374
+1375
+1376
+1377
+1378
+1379
+1380
+1381
+1382
+1383
+1384
+1385
+1386
+1387
+1388
+1389
+1390
+1391
+1392
+1393
+1394
+1395
+1396
+1397
+1398
+1399
+1400
+1401
+1402
+1403
+1404
+1405
+1406
+1407
+1408
+1409
+1410
+1411
+1412
+1413
+1414
+1415
+1416
+1417
+1418
+1419
+1420
+1421
+1422
+1423
+1424
+1425
+1426
+1427
+1428
+1429
+1430
+1431
+1432
+1433
+1434
+1435
+1436
+1437
+1438
+1439
+1440
+1441
+1442
+1443
+1444
+1445
+1446
+1447
+1448
+1449
+1450
+1451
+1452
+1453
+1454
+1455
+1456
+1457
+1458
+1459
+1460
+1461
+1462
+1463
+1464
+1465
+1466
+1467
+1468
+1469
+1470
+1471
+1472
+1473
+1474
+1475
+1476
+1477
+1478
+1479
+1480
+1481
+1482
+1483
+1484
+1485
+1486
+1487
+1488
+1489
+1490
+1491
+1492
+1493
+1494
+1495
+1496
+1497
+1498
+1499
+1500
+1501
+1502
+1503
+1504
+1505
+1506
+1507
+1508
+1509
+1510
+1511
+1512
+1513
+1514
+1515
+1516
+1517
+1518
+1519
+1520
+1521
+1522
+1523
+1524
+1525
+1526
+1527
+1528
+1529
+1530
+1531
+1532
+1533
+1534
+1535
+1536
+1537
+1538
+1539
+1540
+1541
+1542
+1543
+1544
+1545
+1546
+1547
+1548
+1549
+1550
+1551
+1552
+1553
+1554
+1555
+1556
+1557
+1558
+1559
+1560
+1561
+1562
+1563
+1564
+1565
+1566
+1567
+1568
+1569
+1570
+1571
+1572
+1573
+1574
+1575
+1576
+1577
+1578
+1579
+1580
+1581
+1582
+1583
+1584
+1585
+1586
+1587
+1588
+1589
+1590
+1591
+1592
+1593
+1594
+1595
+1596
+1597
+1598
+1599
+1600
+1601
+1602
+1603
+1604
+1605
+1606
+1607
+1608
+1609
+1610
+1611
+1612
+1613
+1614
+1615
+1616
+1617
+1618
+1619
+1620
+1621
+1622
+1623
+1624
+1625
+1626
+1627
+1628
+1629
+1630
+1631
+1632
+1633
+1634
+1635
+1636
+1637
+1638
+1639
+1640
+1641
+1642
+1643
+1644
+1645
+1646
+1647
+1648
+1649
+1650
+1651
+1652
+1653
+1654
+1655
+1656
+1657
+1658
+1659
+1660
+1661
+1662
+1663
+1664
+1665
+1666
+1667
+1668
+1669
+1670
+1671
+1672
+1673
+1674
+1675
+1676
+1677
+1678
+1679
+1680
+1681
+1682
+1683
+1684
+1685
+1686
+1687
+1688
+1689
+1690
+1691
+1692
+1693
+1694
+1695
+1696
+1697
+1698
+1699
+1700
+1701
+1702
+1703
+1704
+1705
+1706
+1707
+1708
+1709
+1710
+1711
+1712
+1713
+1714
+1715
+1716
+1717
+1718
+1719
+1720
+1721
+1722
+1723
+1724
+1725
+1726
+1727
+1728
+1729
+1730
+1731
+1732
+1733
+1734
+1735
+1736
+1737
+1738
+1739
+1740
+1741
+1742
+1743
+1744
+1745
+1746
+1747
+1748
+1749
+1750
+1751
+1752
+1753
+1754
+1755
+1756
+1757
+1758
+1759
+1760
+1761
+1762
+1763
+1764
+1765
+1766
+1767
+1768
+1769
+1770
+1771
+1772
+1773
+1774
+1775
+1776
+1777
+1778
+1779
+1780
+1781
+1782
+1783
+1784
+1785
+1786
+1787
+1788
+1789
+1790
+1791
+1792
+1793
+1794
+1795
+1796
+1797
+1798
+1799
+1800
+1801
+1802
+1803
+1804
+1805
+1806
+1807
+1808
+1809
+1810
+1811
+1812
+1813
+1814
+1815
+1816
+1817
+1818
+1819
+1820
+1821
+1822
+1823
+1824
+1825
+1826
+1827
+1828
+1829
+1830
+1831
+1832
+1833
+1834
+1835
+1836
+1837
+1838
+1839
+1840
+1841
+1842
+1843
+1844
+1845
+1846
+1847
+1848
+1849
+1850
+1851
+1852
+1853
+1854
+1855
+1856
+1857
+1858
+1859
+1860
+1861
+1862
+1863
+1864
+1865
+1866
+1867
+1868
+1869
+1870
+1871
+1872
+1873
+1874
+1875
+1876
+1877
+1878
+1879
+1880
+1881
+1882
+1883
+1884
+1885
+1886
+1887
+1888
+1889
+1890
+1891
+1892
+1893
+1894
+1895
+1896
+1897
+1898
+1899
+1900
+1901
+1902
+1903
+1904
+1905
+1906
+1907
+1908
+1909
+1910
+1911
+1912
+1913
+1914
+1915
+1916
+1917
+1918
+1919
+1920
+1921
+1922
+1923
+1924
+1925
+1926
+1927
+1928
+1929
+1930
+1931
+1932
+1933
+1934
+1935
+1936
+1937
+1938
+1939
+1940
+1941
+1942
+1943
+1944
+1945
+1946
+1947
+1948
+1949
+1950
+1951
+1952
+1953
+1954
+1955
+1956
+1957
+1958
+1959
+1960
+1961
+1962
+1963
+1964
+1965
+1966
+1967
+1968
+1969
+1970
+1971
+1972
+1973
+1974
+1975
+1976
+1977
+1978
+1979
+1980
+1981
+1982
+1983
+1984
+1985
+1986
+1987
+1988
+1989
+1990
+1991
+1992
+1993
+1994
+1995
+1996
+1997
+1998
+1999
+2000
+2001
+2002
+2003
+2004
+2005
+2006
+2007
+2008
+2009
+2010
+2011
+2012
+2013
+2014
+2015
+2016
+2017
+2018
+2019
+2020
+2021
+2022
+2023
+2024
+2025
+2026
+2027
+2028
+2029
+2030
+2031
+2032
+2033
+2034
+2035
+2036
+2037
+2038
+2039
+2040
+2041
+2042
+2043
+2044
+2045
+2046
+2047
+2048
+2049
+2050
+2051
+2052
+2053
+2054
+2055
+2056
+2057
+2058
+2059
+2060
+2061
+2062
+2063
+2064
+2065
+2066
+2067
+2068
+2069
+2070
+2071
+2072
+2073
+2074
+2075
+2076
+2077
+2078
+2079
+2080
+2081
+2082
+2083
+2084
+2085
+2086
+2087
+2088
+2089
+2090
+2091
+2092
+2093
+2094
+2095
+2096
+2097
+2098
+2099
+2100
+2101
+2102
+2103
+2104
+2105
+2106
+2107
+2108
+2109
+2110
+2111
+2112
+2113
+2114
+2115
+2116
+2117
+2118
+2119
+2120
+2121
+2122
+2123
+2124
+2125
+2126
+2127
+2128
+2129
+2130
+2131
+2132
+2133
+2134
+2135
+2136
+2137
+2138
+2139
+2140
+2141
+2142
+2143
+2144
+2145
+2146
+2147
+2148
+2149
+2150
+2151
+2152
+2153
+2154
+2155
+2156
+2157
+2158
+2159
+2160
+2161
+2162
+2163
+2164
+2165
+2166
+2167
+2168
+2169
+2170
+2171
+2172
+2173
+2174
+2175
+2176
+2177
+2178
+2179
+2180
+2181
+2182
+2183
+2184
+2185
+2186
+2187
+2188
+2189
+2190
+2191
+2192
+2193
+2194
+2195
+2196
+2197
+2198
+2199
+2200
+2201
+2202
+2203
+2204
+2205
+2206
+2207
+2208
+2209
+2210
+2211
+2212
+2213
+2214
+2215
+2216
+2217
+2218
+2219
+2220
+2221
+2222
+2223
+2224
+2225
+2226
+2227
+2228
+2229
+2230
+2231
+2232
+2233
+2234
+2235
+2236
+2237
+2238
+2239
+2240
+2241
+2242
+2243
+2244
+2245
+2246
+2247
+2248
+2249
+2250
+2251
+2252
+2253
+2254
+2255
+2256
+2257
+2258
+2259
+2260
+2261
+2262
+2263
+2264
+2265
+2266
+2267
+2268
+2269
+2270
+2271
+2272
+2273
+2274
+2275
+2276
+2277
+2278
+2279
+2280
+2281
+2282
+2283
+2284
+2285
+2286
+2287
+2288
+2289
+2290
+2291
+2292
+2293
+2294
+2295
+2296
+2297
+2298
+2299
+2300
+2301
+2302
+2303
+2304
+2305
+2306
+2307
+2308
+2309
+2310
+2311
+2312
+2313
+2314
+2315
+2316
+2317
+2318
+2319
+2320
+2321
+2322
+2323
+2324
+2325
+2326
+2327
+2328
+2329
+2330
+2331
+2332
+2333
+2334
+2335
+2336
+2337
+2338
+2339
+2340
+2341
+2342
+2343
+2344
+2345
+2346
+2347
+2348
+2349
+2350
+2351
+2352
+2353
+2354
+2355
+2356
+2357
+2358
+2359
+2360
+2361
+2362
+2363
+2364
+2365
+2366
+2367
+2368
+2369
+2370
+2371
+2372
+2373
+2374
+2375
+2376
+2377
+2378
+2379
+2380
+2381
+2382
+2383
+2384
+2385
+2386
+2387
+2388
+2389
+2390
+2391
+2392
+2393
+2394
+2395
+2396
+2397
+2398
+2399
+2400
+2401
+2402
+2403
+2404
+2405
+2406
+2407
+2408
+2409
+2410
+2411
+2412
+2413
+2414
+2415
+2416
+2417
+2418
+2419
+2420
+2421
+2422
+2423
+2424
+2425
+2426
+2427
+2428
+2429
+2430
+2431
+2432
+2433
+2434
+2435
+2436
+2437
+2438
+2439
+2440
+2441
+2442
+2443
+2444
+2445
+2446
+2447
+2448
+2449
+2450
+2451
+2452
+2453
+2454
+2455
+2456
+2457
+2458
+2459
+2460
+2461
+2462
+2463
+2464
+2465
+2466
+2467
+2468
+2469
+2470
+2471
+2472
+2473
+2474
+2475
+2476
+2477
+2478
+2479
+2480
+2481
+2482
+2483
+2484
+2485
+2486
+2487
+2488
+2489
+2490
+2491
+2492
+2493
+2494
+2495
+2496
+2497
+2498
+2499
+2500
+2501
+2502
+2503
+2504
+2505
+2506
+2507
+2508
+2509
+2510
+2511
+2512
+2513
+2514
+2515
+2516
+2517
+2518
+2519
+2520
+2521
+2522
+2523
+2524
+2525
+2526
+2527
+2528
+2529
+2530
+2531
+2532
+2533
+2534
+2535
+2536
+2537
+2538
+2539
+2540
+2541
+2542
+2543
+2544
+2545
+2546
+2547
+2548
+2549
+2550
+2551
+2552
+2553
+2554
+2555
+2556
+2557
+2558
+2559
+2560
+2561
+2562
+2563
+2564
+2565
+2566
+2567
+2568
+2569
+2570
+2571
+2572
+2573
+2574
+2575
+2576
+2577
+2578
+2579
+2580
+2581
+2582
+2583
+2584
+2585
+2586
+2587
+2588
+2589
+2590
+2591
+2592
+2593
+2594
+2595
+2596
+2597
+2598
+2599
+2600
+2601
+2602
+2603
+2604
+2605
+2606
+2607
+2608
+2609
+2610
+2611
+2612
+2613
+2614
+2615
+2616
+2617
+2618
+2619
+2620
+2621
+2622
+2623
+2624
+2625
+2626
+2627
+2628
+2629
+2630
+2631
+2632
+2633
+2634
+2635
+2636
+2637
+2638
+2639
+2640
+2641
+2642
+2643
+2644
+2645
+2646
+2647
+2648
+2649
+2650
+2651
+2652
+2653
+2654
+2655
+2656
+2657
+2658
+2659
+2660
+2661
+2662
+2663
+2664
+2665
+2666
+2667
+2668
+2669
+2670
+2671
+2672
+2673
+2674
+2675
+2676
+2677
+2678
+2679
+2680
+2681
+2682
+2683
+2684
+2685
+2686
+2687
+2688
+2689
+2690
+2691
+2692
+2693
+2694
+2695
+2696
+2697
+2698
+2699
+2700
+2701
+2702
+2703
+2704
+2705
+2706
+2707
+2708
+2709
+2710
+2711
+2712
+2713
+2714
+2715
+2716
+2717
+2718
+2719
+2720
+2721
+2722
+2723
+2724
+2725
+2726
+2727
+2728
+2729
+2730
+2731
+2732
+2733
+2734
+2735
+2736
+2737
+2738
+2739
+2740
+2741
+2742
+2743
+2744
+2745
+2746
+2747
+2748
+2749
+2750
+2751
+2752
+2753
+2754
+2755
+2756
+2757
+2758
+2759
+2760
+2761
+2762
+2763
+2764
+2765
+2766
+2767
+2768
+2769
+2770
+2771
+2772
+2773
+2774
+2775
+2776
+2777
+2778
+2779
+2780
+2781
+2782
+2783
+2784
+2785
+2786
+2787
+2788
+2789
+2790
+2791
+2792
+2793
+2794
+2795
+2796
+2797
+2798
+2799
+2800
+2801
+2802
+2803
+2804
+2805
+2806
+2807
+2808
+2809
+2810
+2811
+2812
+2813
+2814
+2815
+2816
+2817
+2818
+2819
+2820
+2821
+2822
+2823
+2824
+2825
+2826
+2827
+2828
+2829
+2830
+2831
+2832
+2833
+2834
+2835
+2836
+2837
+2838
+2839
+2840
+2841
+2842
+2843
+2844
+2845
+2846
+2847
+2848
+2849
+2850
+2851
+2852
+2853
+2854
+2855
+2856
+2857
+2858
+2859
+2860
+2861
+2862
+2863
+2864
+2865
+2866
+2867
+2868
+2869
+2870
+2871
+2872
+2873
+2874
+2875
+2876
+2877
+2878
+2879
+2880
+2881
+2882
+2883
+2884
+2885
+2886
+2887
+2888
+2889
+2890
+2891
+2892
+2893
+2894
+2895
+2896
+2897
+2898
+2899
+2900
+2901
+2902
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+#include <ctk/ctk.h>
+#include <cdk/cdkx.h>
+#include <cdk/cdkkeysyms.h>
+#include <X11/XKBlib.h>
+#include <X11/extensions/XKBgeom.h>
+#include <stdlib.h>
+#include <memory.h>
+#include <math.h>
+#include <glib/gi18n-lib.h>
+#include <libxklavier/xklavier.h>
+
+#include <cafekbd-keyboard-drawing.h>
+#include <cafekbd-keyboard-drawing-marshal.h>
+#include <cafekbd-util.h>
+
+#define INVALID_KEYCODE ((guint)(-1))
+
+#define CTK_RESPONSE_PRINT 2
+
+#define KEY_FONT_SIZE 12
+
+enum {
+	BAD_KEYCODE = 0,
+	NUM_SIGNALS
+};
+
+static guint cafekbd_keyboard_drawing_signals[NUM_SIGNALS] = { 0 };
+
+static void cafekbd_keyboard_drawing_set_mods (CafekbdKeyboardDrawing * drawing,
+					    guint mods);
+
+extern gboolean xkl_xkb_config_native_prepare (XklEngine * engine,
+					      const XklConfigRec * data,
+					      gpointer component_names);
+
+extern void xkl_xkb_config_native_cleanup (XklEngine * engine,
+					  gpointer component_names);
+
+
+static gint
+xkb_to_pixmap_coord (CafekbdKeyboardDrawingRenderContext * context, gint n)<--- Parameter 'context' can be declared as pointer to const
+{
+	return n * context->scale_numerator / context->scale_denominator;
+}
+
+static gdouble
+xkb_to_pixmap_double (CafekbdKeyboardDrawingRenderContext * context,<--- Parameter 'context' can be declared as pointer to const
+		      gdouble d)
+{
+	return d * context->scale_numerator / context->scale_denominator;
+}
+
+
+/* angle is in tenths of a degree; coordinates can be anything as (xkb,
+ * pixels, pango) as long as they are all the same */
+static void
+rotate_coordinate (gint origin_x,
+		   gint origin_y,
+		   gint x,
+		   gint y, gint angle, gint * rotated_x, gint * rotated_y)
+{
+	*rotated_x =
+	    origin_x + (x - origin_x) * cos (M_PI * angle / 1800.0) - (y -
+								       origin_y)
+	    * sin (M_PI * angle / 1800.0);
+	*rotated_y =
+	    origin_y + (x - origin_x) * sin (M_PI * angle / 1800.0) + (y -
+								       origin_y)
+	    * cos (M_PI * angle / 1800.0);
+}
+
+static gdouble
+length (gdouble x, gdouble y)
+{
+	return sqrt (x * x + y * y);
+}
+
+static gdouble
+point_line_distance (gdouble ax, gdouble ay, gdouble nx, gdouble ny)
+{
+	return ax * nx + ay * ny;
+}
+
+static void
+normal_form (gdouble ax, gdouble ay,
+	     gdouble bx, gdouble by,
+	     gdouble * nx, gdouble * ny, gdouble * d)
+{
+	gdouble l;
+
+	*nx = by - ay;
+	*ny = ax - bx;
+
+	l = length (*nx, *ny);
+
+	*nx /= l;
+	*ny /= l;
+
+	*d = point_line_distance (ax, ay, *nx, *ny);
+}
+
+static void
+inverse (gdouble a, gdouble b, gdouble c, gdouble d,
+	 gdouble * e, gdouble * f, gdouble * g, gdouble * h)
+{
+	gdouble det;
+
+	det = a * d - b * c;
+
+	*e = d / det;
+	*f = -b / det;
+	*g = -c / det;
+	*h = a / det;
+}
+
+static void
+multiply (gdouble a, gdouble b, gdouble c, gdouble d,
+	  gdouble e, gdouble f, gdouble * x, gdouble * y)
+{
+	*x = a * e + b * f;
+	*y = c * e + d * f;
+}
+
+static void
+intersect (gdouble n1x, gdouble n1y, gdouble d1,
+	   gdouble n2x, gdouble n2y, gdouble d2, gdouble * x, gdouble * y)
+{
+	gdouble e, f, g, h;
+
+	inverse (n1x, n1y, n2x, n2y, &e, &f, &g, &h);
+	multiply (e, f, g, h, d1, d2, x, y);
+}
+
+
+/* draw an angle from the current point to b and then to c,
+ * with a rounded corner of the given radius.
+ */
+static void
+rounded_corner (cairo_t * cr,
+		gdouble bx, gdouble by,
+		gdouble cx, gdouble cy, gdouble radius)
+{
+	gdouble ax, ay;
+	gdouble n1x, n1y, d1;
+	gdouble n2x, n2y, d2;
+	gdouble pd1, pd2;
+	gdouble ix, iy;
+	gdouble dist1, dist2;
+	gdouble nx, ny, d;
+	gdouble a1x, a1y, c1x, c1y;
+	gdouble phi1, phi2;
+
+	cairo_get_current_point (cr, &ax, &ay);
+#ifdef KBDRAW_DEBUG
+	printf ("        current point: (%f, %f), radius %f:\n", ax, ay,
+		radius);
+#endif
+
+	/* make sure radius is not too large */
+	dist1 = length (bx - ax, by - ay);
+	dist2 = length (cx - bx, cy - by);
+
+	radius = MIN (radius, MIN (dist1, dist2));
+
+	/* construct normal forms of the lines */
+	normal_form (ax, ay, bx, by, &n1x, &n1y, &d1);
+	normal_form (bx, by, cx, cy, &n2x, &n2y, &d2);
+
+	/* find which side of the line a,b the point c is on */
+	if (point_line_distance (cx, cy, n1x, n1y) < d1)
+		pd1 = d1 - radius;
+	else
+		pd1 = d1 + radius;
+
+	/* find which side of the line b,c the point a is on */
+	if (point_line_distance (ax, ay, n2x, n2y) < d2)
+		pd2 = d2 - radius;
+	else
+		pd2 = d2 + radius;
+
+	/* intersect the parallels to find the center of the arc */
+	intersect (n1x, n1y, pd1, n2x, n2y, pd2, &ix, &iy);
+
+	nx = (bx - ax) / dist1;
+	ny = (by - ay) / dist1;
+	d = point_line_distance (ix, iy, nx, ny);
+
+	/* a1 is the point on the line a-b where the arc starts */
+	intersect (n1x, n1y, d1, nx, ny, d, &a1x, &a1y);
+
+	nx = (cx - bx) / dist2;
+	ny = (cy - by) / dist2;
+	d = point_line_distance (ix, iy, nx, ny);
+
+	/* c1 is the point on the line b-c where the arc ends */
+	intersect (n2x, n2y, d2, nx, ny, d, &c1x, &c1y);
+
+	/* determine the first angle */
+	if (a1x - ix == 0)
+		phi1 = (a1y - iy > 0) ? M_PI_2 : 3 * M_PI_2;
+	else if (a1x - ix > 0)
+		phi1 = atan ((a1y - iy) / (a1x - ix));
+	else
+		phi1 = M_PI + atan ((a1y - iy) / (a1x - ix));
+
+	/* determine the second angle */
+	if (c1x - ix == 0)
+		phi2 = (c1y - iy > 0) ? M_PI_2 : 3 * M_PI_2;
+	else if (c1x - ix > 0)
+		phi2 = atan ((c1y - iy) / (c1x - ix));
+	else
+		phi2 = M_PI + atan ((c1y - iy) / (c1x - ix));
+
+	/* compute the difference between phi2 and phi1 mod 2pi */
+	d = phi2 - phi1;
+	while (d < 0)
+		d += 2 * M_PI;
+	while (d > 2 * M_PI)
+		d -= 2 * M_PI;
+
+#ifdef KBDRAW_DEBUG
+	printf ("        line 1 to: (%f, %f):\n", a1x, a1y);
+#endif
+	if (!(isnan (a1x) || isnan (a1y)))
+		cairo_line_to (cr, a1x, a1y);
+
+	/* pick the short arc from phi1 to phi2 */
+	if (d < M_PI)
+		cairo_arc (cr, ix, iy, radius, phi1, phi2);
+	else
+		cairo_arc_negative (cr, ix, iy, radius, phi1, phi2);
+
+#ifdef KBDRAW_DEBUG
+	printf ("        line 2 to: (%f, %f):\n", cx, cy);
+#endif
+	cairo_line_to (cr, cx, cy);
+}
+
+static void
+rounded_polygon (cairo_t * cr,
+		 gboolean filled,
+		 gdouble radius, CdkPoint * points, gint num_points)
+{
+	gint i, j;
+
+	cairo_move_to (cr,
+		       (gdouble) (points[num_points - 1].x +
+				  points[0].x) / 2,
+		       (gdouble) (points[num_points - 1].y +
+				  points[0].y) / 2);
+
+
+#ifdef KBDRAW_DEBUG
+	printf ("    rounded polygon of radius %f:\n", radius);
+#endif
+	for (i = 0; i < num_points; i++) {
+		j = (i + 1) % num_points;
+		rounded_corner (cr, (gdouble) points[i].x,
+				(gdouble) points[i].y,
+				(gdouble) (points[i].x + points[j].x) / 2,
+				(gdouble) (points[i].y + points[j].y) / 2,
+				radius);
+#ifdef KBDRAW_DEBUG
+		printf ("      corner (%d, %d) -> (%d, %d):\n",
+			points[i].x, points[i].y, points[j].x,
+			points[j].y);
+#endif
+	};
+	cairo_close_path (cr);
+
+	if (filled)
+		cairo_fill (cr);
+	else
+		cairo_stroke (cr);
+}
+
+static void
+draw_polygon (CafekbdKeyboardDrawingRenderContext * context,
+	      CdkRGBA * fill_color,
+	      gint xkb_x,
+	      gint xkb_y, XkbPointRec * xkb_points, guint num_points,
+	      gdouble radius)
+{
+	CdkPoint *points;
+	gboolean filled;
+	gint i;
+
+	if (fill_color) {
+		filled = TRUE;
+	} else {
+		fill_color = &context->dark_color;
+		filled = FALSE;
+	}
+
+	cdk_cairo_set_source_rgba (context->cr, fill_color);
+
+	points = g_new (CdkPoint, num_points);
+
+#ifdef KBDRAW_DEBUG
+	printf ("    Polygon points:\n");
+#endif
+	for (i = 0; i < num_points; i++) {
+		points[i].x =
+		    xkb_to_pixmap_coord (context, xkb_x + xkb_points[i].x);
+		points[i].y =
+		    xkb_to_pixmap_coord (context, xkb_y + xkb_points[i].y);
+#ifdef KBDRAW_DEBUG
+		printf ("      %d, %d\n", points[i].x, points[i].y);
+#endif
+	}
+
+	rounded_polygon (context->cr, filled,
+			 xkb_to_pixmap_double (context, radius),
+			 points, num_points);
+
+	g_free (points);
+}
+
+static void
+curve_rectangle (cairo_t * cr,
+		 gdouble x0,
+		 gdouble y0, gdouble width, gdouble height, gdouble radius)
+{
+	gdouble x1, y1;
+
+	if (!width || !height)
+		return;
+
+	x1 = x0 + width;
+	y1 = y0 + height;
+
+	radius = MIN (radius, MIN (width / 2, height / 2));
+
+	cairo_move_to (cr, x0, y0 + radius);
+	cairo_arc (cr, x0 + radius, y0 + radius, radius, M_PI,
+		   3 * M_PI / 2);
+	cairo_line_to (cr, x1 - radius, y0);
+	cairo_arc (cr, x1 - radius, y0 + radius, radius, 3 * M_PI / 2,
+		   2 * M_PI);
+	cairo_line_to (cr, x1, y1 - radius);
+	cairo_arc (cr, x1 - radius, y1 - radius, radius, 0, M_PI / 2);
+	cairo_line_to (cr, x0 + radius, y1);
+	cairo_arc (cr, x0 + radius, y1 - radius, radius, M_PI / 2, M_PI);
+
+	cairo_close_path (cr);
+}
+
+static void
+draw_curve_rectangle (cairo_t * cr,
+		      gboolean filled,
+		      CdkRGBA * fill_color,
+		      gint x, gint y, gint width, gint height, gint radius)
+{
+	curve_rectangle (cr, x, y, width, height, radius);
+
+	cdk_cairo_set_source_rgba (cr, fill_color);
+
+	if (filled)
+		cairo_fill (cr);
+	else
+		cairo_stroke (cr);
+}
+
+/* x, y, width, height are in the xkb coordinate system */
+static void
+draw_rectangle (CafekbdKeyboardDrawingRenderContext * context,
+		CdkRGBA * fill_color,
+		gint angle,
+		gint xkb_x, gint xkb_y, gint xkb_width, gint xkb_height,
+		gint radius)
+{
+	if (angle == 0) {
+		gint x, y, width, height;
+		gboolean filled;
+
+		if (fill_color) {
+			filled = TRUE;
+		} else {
+			fill_color = &context->dark_color;
+			filled = FALSE;
+		}
+
+		x = xkb_to_pixmap_coord (context, xkb_x);
+		y = xkb_to_pixmap_coord (context, xkb_y);
+		width =
+		    xkb_to_pixmap_coord (context, xkb_x + xkb_width) - x;
+		height =
+		    xkb_to_pixmap_coord (context, xkb_y + xkb_height) - y;
+
+		draw_curve_rectangle (context->cr, filled, fill_color,
+				      x, y, width, height,
+				      xkb_to_pixmap_double (context,
+							    radius));
+	} else {
+		XkbPointRec points[4];
+		gint x, y;
+
+		points[0].x = xkb_x;
+		points[0].y = xkb_y;
+		rotate_coordinate (xkb_x, xkb_y, xkb_x + xkb_width, xkb_y,
+				   angle, &x, &y);
+		points[1].x = x;
+		points[1].y = y;
+		rotate_coordinate (xkb_x, xkb_y, xkb_x + xkb_width,
+				   xkb_y + xkb_height, angle, &x, &y);
+		points[2].x = x;
+		points[2].y = y;
+		rotate_coordinate (xkb_x, xkb_y, xkb_x, xkb_y + xkb_height,
+				   angle, &x, &y);
+		points[3].x = x;
+		points[3].y = y;
+
+		/* the points we've calculated are relative to 0,0 */
+		draw_polygon (context, fill_color, 0, 0, points, 4,
+			      radius);
+	}
+}
+
+static void
+draw_outline (CafekbdKeyboardDrawingRenderContext * context,
+	      XkbOutlineRec * outline,
+	      CdkRGBA * color,
+	      gint angle, gint origin_x, gint origin_y)
+{
+#ifdef KBDRAW_DEBUG
+	printf (" num_points in %p: %d\n", outline, outline->num_points);
+#endif
+
+	if (outline->num_points == 1) {
+		if (color)
+			draw_rectangle (context, color, angle, origin_x,
+					origin_y, outline->points[0].x,
+					outline->points[0].y,
+					outline->corner_radius);
+
+#ifdef KBDRAW_DEBUG
+		printf ("pointsxy:%d %d %d\n", outline->points[0].x,
+			outline->points[0].y, outline->corner_radius);
+#endif
+
+		draw_rectangle (context, NULL, angle, origin_x, origin_y,
+				outline->points[0].x,
+				outline->points[0].y,
+				outline->corner_radius);
+	} else if (outline->num_points == 2) {
+		gint rotated_x0, rotated_y0;
+
+		rotate_coordinate (origin_x, origin_y,
+				   origin_x + outline->points[0].x,
+				   origin_y + outline->points[0].y,
+				   angle, &rotated_x0, &rotated_y0);
+		if (color)
+			draw_rectangle (context, color, angle, rotated_x0,
+					rotated_y0, outline->points[1].x,
+					outline->points[1].y,
+					outline->corner_radius);
+
+		draw_rectangle (context, NULL, angle, rotated_x0,
+				rotated_y0, outline->points[1].x,
+				outline->points[1].y,
+				outline->corner_radius);
+	} else {
+		if (color)
+			draw_polygon (context, color, origin_x, origin_y,
+				      outline->points,
+				      outline->num_points,
+				      outline->corner_radius);
+
+		draw_polygon (context, NULL, origin_x, origin_y,
+			      outline->points, outline->num_points,
+			      outline->corner_radius);
+	}
+}
+
+/* see PSColorDef in xkbprint */
+static gboolean
+parse_xkb_color_spec (gchar * colorspec, CdkRGBA * color)
+{
+	glong level;
+
+	color->alpha = 1.0;
+
+	if (g_ascii_strcasecmp (colorspec, "black") == 0) {
+		color->red = 0;
+		color->green = 0;
+		color->blue = 0;
+	} else if (g_ascii_strcasecmp (colorspec, "white") == 0) {
+		color->red = 1.0;
+		color->green = 1.0;
+		color->blue = 1.0;
+	} else if (g_ascii_strncasecmp (colorspec, "grey", 4) == 0 ||
+		   g_ascii_strncasecmp (colorspec, "gray", 4) == 0) {
+		level = strtol (colorspec + 4, NULL, 10);
+
+		color->red = 1.0 - 1.0 * level / 100.0;
+		color->green = 1.0 - 1.0 * level / 100.0;
+		color->blue = 1.0 - 1.0 * level / 100.0;
+	} else if (g_ascii_strcasecmp (colorspec, "red") == 0) {
+		color->red = 1.0;
+		color->green = 0;
+		color->blue = 0;
+	} else if (g_ascii_strcasecmp (colorspec, "green") == 0) {
+		color->red = 0;
+		color->green = 1.0;
+		color->blue = 0;
+	} else if (g_ascii_strcasecmp (colorspec, "blue") == 0) {
+		color->red = 0;
+		color->green = 0;
+		color->blue = 1.0;
+	} else if (g_ascii_strncasecmp (colorspec, "red", 3) == 0) {
+		level = strtol (colorspec + 3, NULL, 10);
+
+		color->red = 1.0 * level / 100.0;
+		color->green = 0;
+		color->blue = 0;
+	} else if (g_ascii_strncasecmp (colorspec, "green", 5) == 0) {
+		level = strtol (colorspec + 5, NULL, 10);
+
+		color->red = 0;
+		color->green = 1.0 * level / 100.0;
+		color->blue = 0;
+	} else if (g_ascii_strncasecmp (colorspec, "blue", 4) == 0) {
+		level = strtol (colorspec + 4, NULL, 10);
+
+		color->red = 0;
+		color->green = 0;
+		color->blue = 1.0 * level / 100.0;
+	} else
+		return FALSE;
+
+	return TRUE;
+}
+
+
+static guint
+find_keycode (CafekbdKeyboardDrawing * drawing, gchar * key_name)
+{
+#define KEYSYM_NAME_MAX_LENGTH 4
+	guint keycode;
+	gint i, j;
+	XkbKeyNamePtr pkey;
+	XkbKeyAliasPtr palias;
+	guint is_name_matched;
+	gchar *src, *dst;
+
+	if (!drawing->xkb)
+		return INVALID_KEYCODE;
+
+#ifdef KBDRAW_DEBUG
+	printf ("    looking for keycode for (%c%c%c%c)\n",
+		key_name[0], key_name[1], key_name[2], key_name[3]);
+#endif
+
+	pkey = drawing->xkb->names->keys + drawing->xkb->min_key_code;
+	for (keycode = drawing->xkb->min_key_code;
+	     keycode <= drawing->xkb->max_key_code; keycode++) {
+		is_name_matched = 1;
+		src = key_name;
+		dst = pkey->name;
+		for (i = KEYSYM_NAME_MAX_LENGTH; --i >= 0;) {
+			if ('\0' == *src)
+				break;
+			if (*src++ != *dst++) {
+				is_name_matched = 0;
+				break;
+			}
+		}
+		if (is_name_matched) {
+#ifdef KBDRAW_DEBUG
+			printf ("      found keycode %u\n", keycode);
+#endif
+			return keycode;
+		}
+		pkey++;
+	}
+
+	palias = drawing->xkb->names->key_aliases;
+	for (j = drawing->xkb->names->num_key_aliases; --j >= 0;) {
+		is_name_matched = 1;
+		src = key_name;
+		dst = palias->alias;
+		for (i = KEYSYM_NAME_MAX_LENGTH; --i >= 0;) {
+			if ('\0' == *src)
+				break;
+			if (*src++ != *dst++) {
+				is_name_matched = 0;
+				break;
+			}
+		}
+
+		if (is_name_matched) {
+			keycode = find_keycode (drawing, palias->real);
+#ifdef KBDRAW_DEBUG
+			printf ("found alias keycode %u\n", keycode);
+#endif
+			return keycode;
+		}
+		palias++;
+	}
+
+	return INVALID_KEYCODE;
+}
+
+static void
+set_markup (CafekbdKeyboardDrawingRenderContext * context, gchar *txt)<--- Parameter 'context' can be declared as pointer to const
+{
+	PangoLayout *layout = context->layout;
+	txt = strcmp ("<", txt) ? txt : "&lt;";
+	txt = strcmp ("&", txt) ? txt : "&amp;";
+	if (g_utf8_strlen (txt, -1) > 1) {
+		gchar* buf =
+		    g_strdup_printf ("<span size=\"xx-small\">%s</span>", txt);
+		pango_layout_set_markup (layout, buf, -1);
+		g_free (buf);
+	} else {
+		pango_layout_set_markup (layout, txt, -1);
+	}
+}
+
+static void
+set_key_label_in_layout (CafekbdKeyboardDrawingRenderContext * context,
+			 guint keyval)
+{
+	gchar buf[5];
+	gunichar uc;
+
+	switch (keyval) {
+	case CDK_KEY_Scroll_Lock:
+		set_markup (context, _("Scroll\nLock"));
+		break;
+
+	case CDK_KEY_space:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_Sys_Req:
+		set_markup (context, _("Sys Rq"));
+		break;
+
+	case CDK_KEY_Page_Up:
+		set_markup (context, _("Page\nUp"));
+		break;
+
+	case CDK_KEY_Page_Down:
+		set_markup (context, _("Page\nDown"));
+		break;
+
+	case CDK_KEY_Num_Lock:
+		set_markup (context, _("Num\nLock"));
+		break;
+
+	case CDK_KEY_KP_Page_Up:
+		set_markup (context, _("Pg Up"));
+		break;
+
+	case CDK_KEY_KP_Page_Down:
+		set_markup (context, _("Pg Dn"));
+		break;
+
+	case CDK_KEY_KP_Home:
+		set_markup (context, _("Home"));
+		break;
+
+	case CDK_KEY_KP_Left:
+		set_markup (context, _("Left"));
+		break;
+
+	case CDK_KEY_KP_End:
+		set_markup (context, _("End"));
+		break;
+
+	case CDK_KEY_KP_Up:
+		set_markup (context, _("Up"));
+		break;
+
+	case CDK_KEY_KP_Begin:
+		set_markup (context, _("Begin"));
+		break;
+
+	case CDK_KEY_KP_Right:
+		set_markup (context, _("Right"));
+		break;
+
+	case CDK_KEY_KP_Enter:
+		set_markup (context, _("Enter"));
+		break;
+
+	case CDK_KEY_KP_Down:
+		set_markup (context, _("Down"));
+		break;
+
+	case CDK_KEY_KP_Insert:
+		set_markup (context, _("Ins"));
+		break;
+
+	case CDK_KEY_KP_Delete:
+		set_markup (context, _("Del"));
+		break;
+
+	/* 0xfe03 */
+	case CDK_KEY_ISO_Level3_Shift:
+		set_markup (context, _("ISO_Level3_Shift"));
+		break;
+
+	/* 0xfe20 */
+	case CDK_KEY_ISO_Left_Tab:
+		set_markup (context, _("Tab"));
+		break;
+
+	/* 0xff08 */
+	case CDK_KEY_BackSpace:
+		set_markup (context, _("BackSpace"));
+		break;
+
+	/* 0xff09 */
+	case CDK_KEY_Tab:
+		set_markup (context, _("Tab"));
+		break;
+
+	/* 0xff0d */
+	case CDK_KEY_Return:
+		set_markup (context, _("Return"));
+		break;
+
+	/* 0xff13 */
+	case CDK_KEY_Pause:
+		set_markup (context, _("Pause"));
+		break;
+
+	/* 0xff1b */
+	case CDK_KEY_Escape:
+		set_markup (context, _("Esc"));
+		break;
+
+	/* 0xff50 */
+	case CDK_KEY_Home:
+		set_markup (context, _("Home"));
+		break;
+
+	/* 0xff51 */
+	case CDK_KEY_Left:
+		set_markup (context, _("Left"));
+		break;
+
+	/* 0xff52 */
+	case CDK_KEY_Up:
+		set_markup (context, _("Up"));
+		break;
+
+	/* 0xff53 */
+	case CDK_KEY_Right:
+		set_markup (context, _("Right"));
+		break;
+
+	/* 0xff54 */
+	case CDK_KEY_Down:
+		set_markup (context, _("Down"));
+		break;
+
+	/* 0xff57 */
+	case CDK_KEY_End:
+		set_markup (context, _("End"));
+		break;
+
+	/* 0xff61 */
+	case CDK_KEY_Print:
+		set_markup (context, _("Print"));
+		break;
+
+	/* 0xff63 */
+	case CDK_KEY_Insert:
+		set_markup (context, _("Insert"));
+		break;
+
+	/* 0xff67 */
+	case CDK_KEY_Menu:
+		set_markup (context, _("Menu"));
+		break;
+
+	/* 0xffbe */
+	case CDK_KEY_F1:
+		set_markup (context, _("F1"));
+		break;
+
+	/* 0xffbf */
+	case CDK_KEY_F2:
+		set_markup (context, _("F2"));
+		break;
+
+	/* 0xffc0 */
+	case CDK_KEY_F3:
+		set_markup (context, _("F3"));
+		break;
+
+	/* 0xffc1 */
+	case CDK_KEY_F4:
+		set_markup (context, _("F4"));
+		break;
+
+	/* 0xffc2 */
+	case CDK_KEY_F5:
+		set_markup (context, _("F5"));
+		break;
+
+	/* 0xffc3 */
+	case CDK_KEY_F6:
+		set_markup (context, _("F6"));
+		break;
+
+	/* 0xffc4 */
+	case CDK_KEY_F7:
+		set_markup (context, _("F7"));
+		break;
+
+	/* 0xffc5 */
+	case CDK_KEY_F8:
+		set_markup (context, _("F8"));
+		break;
+
+	/* 0xffc6 */
+	case CDK_KEY_F9:
+		set_markup (context, _("F9"));
+		break;
+
+	/* 0xffc7 */
+	case CDK_KEY_F10:
+		set_markup (context, _("F10"));
+		break;
+
+	/* 0xffc8 */
+	case CDK_KEY_F11:
+		set_markup (context, _("F11"));
+		break;
+
+	/* 0xffc9 */
+	case CDK_KEY_F12:
+		set_markup (context, _("F12"));
+		break;
+
+	/* 0xffe1 */
+	case CDK_KEY_Shift_L:
+		set_markup (context, _("Shift"));
+		break;
+
+	/* 0xffe2 */
+	case CDK_KEY_Shift_R:
+		set_markup (context, _("Shift"));
+		break;
+
+	/* 0xffe3 */
+	case CDK_KEY_Control_L:
+		set_markup (context, _("Control"));
+		break;
+
+	/* 0xffe4 */
+	case CDK_KEY_Control_R:
+		set_markup (context, _("Control"));
+		break;
+
+	/* 0xffe5 */
+	case CDK_KEY_Caps_Lock:
+		set_markup (context, _("Caps\nLock"));
+		break;
+
+	/* 0xffe7 */
+	case CDK_KEY_Meta_L:
+		set_markup (context, _("Meta"));
+		break;
+
+	/* 0xffe9 */
+	case CDK_KEY_Alt_L:
+		set_markup (context, _("Alt"));
+		break;
+
+	/* 0xffeb */
+	case CDK_KEY_Super_L:
+		set_markup (context, _("Super"));
+		break;
+
+	/* 0xffec */
+	case CDK_KEY_Super_R:
+		set_markup (context, _("Super"));
+		break;
+
+	/* 0xffff */
+	case CDK_KEY_VoidSymbol:
+		set_markup (context, _("Delete"));
+		break;
+
+	case CDK_KEY_dead_grave:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_acute:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_circumflex:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_tilde:
+		set_markup (context, "~");
+		break;
+
+	case CDK_KEY_dead_macron:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_breve:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_abovedot:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_diaeresis:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_abovering:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_doubleacute:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_caron:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_cedilla:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_ogonek:
+		set_markup (context, "");
+		break;
+
+		/* case CDK_KEY_dead_iota:
+		 * case CDK_KEY_dead_voiced_sound:
+		 * case CDK_KEY_dead_semivoiced_sound: */
+
+	case CDK_KEY_dead_belowdot:
+		set_markup (context, " ");
+		break;
+
+	case CDK_KEY_horizconnector:
+		set_markup (context, _("horiz\nconn"));
+		break;
+
+	case CDK_KEY_Mode_switch:
+		set_markup (context, _("AltGr"));
+		break;
+
+	case CDK_KEY_Multi_key:
+		set_markup (context, _("Compose"));
+		break;
+
+	default:
+		uc = cdk_keyval_to_unicode (keyval);
+		if (uc != 0 && g_unichar_isgraph (uc)) {
+			buf[g_unichar_to_utf8 (uc, buf)] = '\0';
+			set_markup (context, buf);
+		} else {
+			gchar *name = cdk_keyval_name (keyval);
+			if (name) {
+				set_markup (context, name);
+			} else
+				set_markup (context, "");
+		}
+	}
+}
+
+
+static void
+draw_pango_layout (CafekbdKeyboardDrawingRenderContext * context,
+		   CafekbdKeyboardDrawing * drawing,
+		   gint angle, gint x, gint y)
+{
+	PangoLayout *layout = context->layout;
+	CdkRGBA *color;
+	PangoLayoutLine *line;
+	gint x_off, y_off;
+	gint i;
+
+	color =
+	    drawing->colors + (drawing->xkb->geom->label_color -
+			       drawing->xkb->geom->colors);
+
+	if (angle != context->angle) {
+		PangoMatrix matrix = PANGO_MATRIX_INIT;
+		pango_matrix_rotate (&matrix, -angle / 10.0);
+		pango_context_set_matrix (pango_layout_get_context
+					  (layout), &matrix);
+		pango_layout_context_changed (layout);
+		context->angle = angle;
+	}
+
+	i = 0;
+	y_off = 0;
+	for (line = pango_layout_get_line (layout, i);
+	     line != NULL; line = pango_layout_get_line (layout, ++i)) {
+		GSList *runp;<--- Variable 'runp' can be declared as pointer to const
+		PangoRectangle line_extents;
+
+		x_off = 0;
+
+		for (runp = line->runs; runp != NULL; runp = runp->next) {
+			PangoGlyphItem *run = runp->data;
+			gint j;
+
+			for (j = 0; j < run->glyphs->num_glyphs; j++) {
+				PangoGlyphGeometry *geometry;<--- Variable 'geometry' can be declared as pointer to const
+
+				geometry =
+				    &run->glyphs->glyphs[j].geometry;
+
+				x_off += geometry->width;
+			}
+		}
+
+		pango_layout_line_get_extents (line, NULL, &line_extents);
+		y_off +=
+		    line_extents.height +
+		    pango_layout_get_spacing (layout);
+	}
+
+	cairo_move_to (context->cr, x, y);
+	cdk_cairo_set_source_rgba (context->cr, color);
+	pango_cairo_show_layout (context->cr, layout);
+}
+
+static void
+draw_key_label_helper (CafekbdKeyboardDrawingRenderContext * context,
+		       CafekbdKeyboardDrawing * drawing,
+		       KeySym keysym,
+		       gint angle,
+		       CafekbdKeyboardDrawingGroupLevelPosition glp,
+		       gint x,
+		       gint y, gint width, gint height, gint padding)
+{
+	gint label_x, label_y, label_max_width, ycell;
+
+	if (keysym == 0)
+		return;
+#ifdef KBDRAW_DEBUG
+	printf ("keysym: %04X(%c) at glp: %d\n",
+		(unsigned) keysym, (char) keysym, (int) glp);
+#endif
+
+	switch (glp) {
+	case CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT:
+	case CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT:
+		{
+			ycell =
+			    glp == CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT;
+
+			rotate_coordinate (x, y, x + padding,
+					   y + padding + (height -
+							  2 * padding) *
+					   ycell * 4 / 7, angle, &label_x,
+					   &label_y);
+			label_max_width =
+			    PANGO_SCALE * (width - 2 * padding);
+			break;
+		}
+	case CAFEKBD_KEYBOARD_DRAWING_POS_TOPRIGHT:
+	case CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT:
+		{
+			ycell =
+			    glp == CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT;
+
+			rotate_coordinate (x, y,
+					   x + padding + (width -
+							  2 * padding) *
+					   4 / 7,
+					   y + padding + (height -
+							  2 * padding) *
+					   ycell * 4 / 7, angle, &label_x,
+					   &label_y);
+			label_max_width =
+			    PANGO_SCALE * ((width - 2 * padding) -
+					   (width - 2 * padding) * 4 / 7);
+			break;
+		}
+	default:
+		return;
+	}
+	set_key_label_in_layout (context, keysym);
+	pango_layout_set_width (context->layout, label_max_width);
+	label_y -= (pango_layout_get_line_count (context->layout) - 1) *
+	    (pango_font_description_get_size (context->font_desc) /
+	     PANGO_SCALE);
+	cairo_save (context->cr);
+	cairo_rectangle (context->cr, x + padding / 2, y + padding / 2,
+			 width - padding, height - padding);
+	cairo_clip (context->cr);
+	draw_pango_layout (context, drawing, angle, label_x, label_y);
+	cairo_restore (context->cr);
+}
+
+static void
+draw_key_label (CafekbdKeyboardDrawingRenderContext * context,
+		CafekbdKeyboardDrawing * drawing,
+		guint keycode,
+		gint angle,
+		gint xkb_origin_x,
+		gint xkb_origin_y, gint xkb_width, gint xkb_height)
+{
+	gint x, y, width, height;
+	gint padding;
+	gint g, l, glp;
+
+	if (!drawing->xkb)
+		return;
+
+	padding = 23 * context->scale_numerator / context->scale_denominator;	/* 2.3mm */
+
+	x = xkb_to_pixmap_coord (context, xkb_origin_x);
+	y = xkb_to_pixmap_coord (context, xkb_origin_y);
+	width =
+	    xkb_to_pixmap_coord (context, xkb_origin_x + xkb_width) - x;
+	height =
+	    xkb_to_pixmap_coord (context, xkb_origin_y + xkb_height) - y;
+
+	for (glp = CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT;
+	     glp < CAFEKBD_KEYBOARD_DRAWING_POS_TOTAL; glp++) {
+		if (drawing->groupLevels[glp] == NULL)
+			continue;
+		g = drawing->groupLevels[glp]->group;
+		l = drawing->groupLevels[glp]->level;
+
+		if (g < 0 || g >= XkbKeyNumGroups (drawing->xkb, keycode))
+			continue;
+		if (l < 0
+		    || l >= XkbKeyGroupWidth (drawing->xkb, keycode, g))
+			continue;
+
+		/* Skip "exotic" levels like the "Ctrl" level in PC_SYSREQ */
+		if (l > 0) {
+			guint mods = XkbKeyKeyType (drawing->xkb, keycode,
+						    g)->mods.mask;
+			if ((mods & (ShiftMask | drawing->l3mod)) == 0)
+				continue;
+		}
+
+		if (drawing->track_modifiers) {
+			guint mods_rtrn;
+			KeySym keysym;
+
+			if (XkbTranslateKeyCode (drawing->xkb, keycode,
+						 XkbBuildCoreState
+						 (drawing->mods, g),
+						 &mods_rtrn, &keysym)) {
+				draw_key_label_helper (context, drawing,
+						       keysym, angle, glp,
+						       x, y, width, height,
+						       padding);
+				/* reverse y order */
+			}
+		} else {
+			KeySym keysym;
+
+			keysym =
+			    XkbKeySymEntry (drawing->xkb, keycode, l, g);
+
+			draw_key_label_helper (context, drawing, keysym,
+					       angle, glp, x, y, width,
+					       height, padding);
+			/* reverse y order */
+		}
+	}
+}
+
+/*
+ * The x offset is calculated for complex shapes. It is the rightmost of the vertical lines in the outline
+ */
+static gint
+calc_origin_offset_x (XkbOutlineRec * outline)<--- Parameter 'outline' can be declared as pointer to const
+{
+	gint rv = 0;
+	gint i;
+	XkbPointPtr point = outline->points;
+	if (outline->num_points < 3)
+		return 0;
+	for (i = outline->num_points; --i > 0;) {
+		gint x1 = point->x;
+		gint y1 = point++->y;
+		gint x2 = point->x;
+		gint y2 = point->y;
+
+		/*vertical, bottom to top (clock-wise), on the left */
+		if ((x1 == x2) && (y1 > y2) && (x1 > rv)) {
+			rv = x1;
+		}
+	}
+	return rv;
+}
+
+/* groups are from 0-3 */
+static void
+draw_key (CafekbdKeyboardDrawingRenderContext * context,
+	  CafekbdKeyboardDrawing * drawing, CafekbdKeyboardDrawingKey * key)
+{
+	XkbShapeRec *shape;
+	CtkStyleContext *style_context;
+	CdkRGBA color;
+	XkbOutlineRec *outline;
+	int origin_offset_x;
+	/* gint i; */
+
+	if (!drawing->xkb)
+		return;
+
+#ifdef KBDRAW_DEBUG
+	printf ("shape: %p (base %p, index %d)\n",
+		drawing->xkb->geom->shapes + key->xkbkey->shape_ndx,
+		drawing->xkb->geom->shapes, key->xkbkey->shape_ndx);
+#endif
+
+	shape = drawing->xkb->geom->shapes + key->xkbkey->shape_ndx;
+
+	if (key->pressed) {
+		style_context = ctk_widget_get_style_context (CTK_WIDGET (drawing));
+		ctk_style_context_save (style_context);
+		ctk_style_context_add_class (style_context, CTK_STYLE_CLASS_VIEW);
+		ctk_style_context_get_background_color (style_context,
+		                                        CTK_STATE_FLAG_SELECTED,
+		                                        &color);
+		ctk_style_context_restore (style_context);
+	 } else
+		color = *(drawing->colors + key->xkbkey->color_ndx);
+
+#ifdef KBDRAW_DEBUG
+	printf
+	    (" outlines base in the shape: %p (total: %d), origin: (%d, %d), angle %d\n",
+	     shape->outlines, shape->num_outlines, key->origin_x,
+	     key->origin_y, key->angle);
+#endif
+
+	/* draw the primary outline */
+	outline = shape->primary ? shape->primary : shape->outlines;
+	draw_outline (context, outline, &color, key->angle, key->origin_x,
+		      key->origin_y);
+#if 0
+	/* don't draw other outlines for now, since
+	 * the text placement does not take them into account
+	 */
+	for (i = 0; i < shape->num_outlines; i++) {
+		if (shape->outlines + i == shape->approx ||
+		    shape->outlines + i == shape->primary)
+			continue;
+		draw_outline (context, shape->outlines + i, NULL,
+			      key->angle, key->origin_x, key->origin_y);
+	}
+#endif
+
+	origin_offset_x = calc_origin_offset_x (outline);
+	draw_key_label (context, drawing, key->keycode, key->angle,
+			key->origin_x + origin_offset_x, key->origin_y,
+			shape->bounds.x2, shape->bounds.y2);
+}
+
+static void
+invalidate_region (CafekbdKeyboardDrawing * drawing,
+		   gdouble angle,
+		   gint origin_x, gint origin_y, XkbShapeRec * shape)
+{
+	CdkPoint points[4];
+	gint x_min, x_max, y_min, y_max;
+	gint x, y, width, height;
+	gint xx, yy;
+
+	rotate_coordinate (0, 0, 0, 0, angle, &xx, &yy);
+	points[0].x = xx;
+	points[0].y = yy;
+	rotate_coordinate (0, 0, shape->bounds.x2, 0, angle, &xx, &yy);
+	points[1].x = xx;
+	points[1].y = yy;
+	rotate_coordinate (0, 0, shape->bounds.x2, shape->bounds.y2, angle,
+			   &xx, &yy);
+	points[2].x = xx;
+	points[2].y = yy;
+	rotate_coordinate (0, 0, 0, shape->bounds.y2, angle, &xx, &yy);
+	points[3].x = xx;
+	points[3].y = yy;
+
+	x_min =
+	    MIN (MIN (points[0].x, points[1].x),
+		 MIN (points[2].x, points[3].x));
+	x_max =
+	    MAX (MAX (points[0].x, points[1].x),
+		 MAX (points[2].x, points[3].x));
+	y_min =
+	    MIN (MIN (points[0].y, points[1].y),
+		 MIN (points[2].y, points[3].y));
+	y_max =
+	    MAX (MAX (points[0].y, points[1].y),
+		 MAX (points[2].y, points[3].y));
+
+	x = xkb_to_pixmap_coord (drawing->renderContext,
+				 origin_x + x_min) - 6;
+	y = xkb_to_pixmap_coord (drawing->renderContext,
+				 origin_y + y_min) - 6;
+	width =
+	    xkb_to_pixmap_coord (drawing->renderContext,
+				 x_max - x_min) + 12;
+	height =
+	    xkb_to_pixmap_coord (drawing->renderContext,
+				 y_max - y_min) + 12;
+
+	ctk_widget_queue_draw_area (CTK_WIDGET (drawing), x, y, width,
+				    height);
+}
+
+static void
+invalidate_indicator_doodad_region (CafekbdKeyboardDrawing * drawing,
+				    CafekbdKeyboardDrawingDoodad * doodad)
+{
+	if (!drawing->xkb)
+		return;
+
+	invalidate_region (drawing,
+			   doodad->angle,
+			   doodad->origin_x +
+			   doodad->doodad->indicator.left,
+			   doodad->origin_y +
+			   doodad->doodad->indicator.top,
+			   &drawing->xkb->geom->shapes[doodad->
+						       doodad->indicator.shape_ndx]);
+}
+
+static void
+invalidate_key_region (CafekbdKeyboardDrawing * drawing,
+		       CafekbdKeyboardDrawingKey * key)
+{
+	if (!drawing->xkb)
+		return;
+
+	invalidate_region (drawing,
+			   key->angle,
+			   key->origin_x,
+			   key->origin_y,
+			   &drawing->xkb->geom->shapes[key->
+						       xkbkey->shape_ndx]);
+}
+
+static void
+draw_text_doodad (CafekbdKeyboardDrawingRenderContext * context,
+		  CafekbdKeyboardDrawing * drawing,
+		  CafekbdKeyboardDrawingDoodad * doodad,
+		  XkbTextDoodadRec * text_doodad)
+{
+	gint x, y;
+	if (!drawing->xkb)
+		return;
+
+	x = xkb_to_pixmap_coord (context,
+				 doodad->origin_x + text_doodad->left);
+	y = xkb_to_pixmap_coord (context,
+				 doodad->origin_y + text_doodad->top);
+
+	set_markup (context, text_doodad->text);
+	draw_pango_layout (context, drawing, doodad->angle, x, y);
+}
+
+static void
+draw_indicator_doodad (CafekbdKeyboardDrawingRenderContext * context,
+		       CafekbdKeyboardDrawing * drawing,
+		       CafekbdKeyboardDrawingDoodad * doodad,
+		       XkbIndicatorDoodadRec * indicator_doodad)
+{
+	CdkRGBA *color;
+	XkbShapeRec *shape;<--- Variable 'shape' can be declared as pointer to const
+	gint i;
+
+	if (!drawing->xkb)
+		return;
+
+	shape = drawing->xkb->geom->shapes + indicator_doodad->shape_ndx;
+
+	color = drawing->colors + (doodad->on ?
+				   indicator_doodad->on_color_ndx :
+				   indicator_doodad->off_color_ndx);
+
+	for (i = 0; i < 1; i++)
+		draw_outline (context, shape->outlines + i, color,
+			      doodad->angle,
+			      doodad->origin_x + indicator_doodad->left,
+			      doodad->origin_y + indicator_doodad->top);
+}
+
+static void
+draw_shape_doodad (CafekbdKeyboardDrawingRenderContext * context,
+		   CafekbdKeyboardDrawing * drawing,
+		   CafekbdKeyboardDrawingDoodad * doodad,
+		   XkbShapeDoodadRec * shape_doodad)
+{
+	XkbShapeRec *shape;
+	CdkRGBA *color;
+	gint i;
+
+	if (!drawing->xkb)
+		return;
+
+	shape = drawing->xkb->geom->shapes + shape_doodad->shape_ndx;
+	color = drawing->colors + shape_doodad->color_ndx;
+
+	/* draw the primary outline filled */
+	draw_outline (context,
+		      shape->primary ? shape->primary : shape->outlines,
+		      color, doodad->angle,
+		      doodad->origin_x + shape_doodad->left,
+		      doodad->origin_y + shape_doodad->top);
+
+	/* stroke the other outlines */
+	for (i = 0; i < shape->num_outlines; i++) {
+		if (shape->outlines + i == shape->approx ||
+		    shape->outlines + i == shape->primary)
+			continue;
+		draw_outline (context, shape->outlines + i, NULL,
+			      doodad->angle,
+			      doodad->origin_x + shape_doodad->left,
+			      doodad->origin_y + shape_doodad->top);
+	}
+}
+
+static void
+draw_doodad (CafekbdKeyboardDrawingRenderContext * context,
+	     CafekbdKeyboardDrawing * drawing,
+	     CafekbdKeyboardDrawingDoodad * doodad)
+{
+	switch (doodad->doodad->any.type) {
+	case XkbOutlineDoodad:
+	case XkbSolidDoodad:
+		draw_shape_doodad (context, drawing, doodad,
+				   &doodad->doodad->shape);
+		break;
+
+	case XkbTextDoodad:
+		draw_text_doodad (context, drawing, doodad,
+				  &doodad->doodad->text);
+		break;
+
+	case XkbIndicatorDoodad:
+		draw_indicator_doodad (context, drawing, doodad,
+				       &doodad->doodad->indicator);
+		break;
+
+	case XkbLogoDoodad:
+		/* g_print ("draw_doodad: logo: %s\n", doodad->doodad->logo.logo_name); */
+		/* XkbLogoDoodadRec is essentially a subclass of XkbShapeDoodadRec */
+		draw_shape_doodad (context, drawing, doodad,
+				   &doodad->doodad->shape);
+		break;
+	}
+}
+
+typedef struct {
+	CafekbdKeyboardDrawing *drawing;
+	CafekbdKeyboardDrawingRenderContext *context;
+} DrawKeyboardItemData;
+
+static void
+redraw_overlapping_doodads (CafekbdKeyboardDrawingRenderContext * context,
+			    CafekbdKeyboardDrawing * drawing,
+			    const CafekbdKeyboardDrawingKey * key)
+{
+	GList *list;
+	gboolean do_draw = FALSE;
+
+	for (list = drawing->keyboard_items; list; list = list->next) {
+		CafekbdKeyboardDrawingItem *item = list->data;
+
+		if (do_draw
+		    && item->type ==
+		    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD)
+			draw_doodad (context, drawing,
+				     (CafekbdKeyboardDrawingDoodad *) item);
+
+		if (list->data == key)
+			do_draw = TRUE;
+	}
+}
+
+static void
+draw_keyboard_item (CafekbdKeyboardDrawingItem * item,
+		    DrawKeyboardItemData * data)
+{
+	CafekbdKeyboardDrawing *drawing = data->drawing;
+	CafekbdKeyboardDrawingRenderContext *context = data->context;
+
+	if (!drawing->xkb)
+		return;
+
+	switch (item->type) {
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_INVALID:
+		break;
+
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY:
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA:
+		draw_key (context, drawing,
+			  (CafekbdKeyboardDrawingKey *) item);
+		break;
+
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD:
+		draw_doodad (context, drawing,
+			     (CafekbdKeyboardDrawingDoodad *) item);
+		break;
+	}
+}
+
+static void
+draw_keyboard_to_context (CafekbdKeyboardDrawingRenderContext * context,
+			  CafekbdKeyboardDrawing * drawing)
+{
+	DrawKeyboardItemData data = { drawing, context };
+#ifdef KBDRAW_DEBUG
+	printf ("mods: %d\n", drawing->mods);
+#endif
+	g_list_foreach (drawing->keyboard_items,
+			(GFunc) draw_keyboard_item, &data);
+}
+
+static gboolean
+create_cairo (CafekbdKeyboardDrawing * drawing)
+{
+	CtkStyleContext *style_context = NULL;
+	CtkStateFlags state;
+	CdkRGBA dark_color;
+
+	if (drawing == NULL)
+		return FALSE;
+	if (drawing->surface == NULL)
+		return FALSE;
+
+	drawing->renderContext->cr =
+	    cairo_create (drawing->surface);
+
+	style_context = ctk_widget_get_style_context (CTK_WIDGET (drawing));
+	state = ctk_style_context_get_state (style_context);
+
+	ctk_style_context_get_background_color (style_context, state,
+	                                        &dark_color);
+	/* make dark background by making regular background darker */
+	dark_color.red *= 0.7;
+	dark_color.green *= 0.7;
+	dark_color.blue *= 0.7;
+
+	drawing->renderContext->dark_color = dark_color;
+
+	return TRUE;
+}
+
+static void
+destroy_cairo (CafekbdKeyboardDrawing * drawing)
+{
+	cairo_destroy (drawing->renderContext->cr);
+	drawing->renderContext->cr = NULL;
+}
+
+static void
+draw_keyboard (CafekbdKeyboardDrawing * drawing)
+{
+        CtkStyleContext *context =
+	    ctk_widget_get_style_context (CTK_WIDGET (drawing));
+	CtkStateFlags state = ctk_style_context_get_state (context);
+	CdkRGBA color;
+	CtkAllocation allocation;
+
+	if (!drawing->xkb)
+		return;
+
+	ctk_widget_get_allocation (CTK_WIDGET (drawing), &allocation);
+
+	drawing->surface =
+	    cdk_window_create_similar_surface (ctk_widget_get_window
+					       (CTK_WIDGET (drawing)),
+					       CAIRO_CONTENT_COLOR,
+					       allocation.width,
+					       allocation.height);
+
+	if (create_cairo (drawing)) {
+		/* blank background */
+		ctk_style_context_save (context);
+		ctk_style_context_add_class (context, CTK_STYLE_CLASS_VIEW);
+		ctk_style_context_get_background_color (context, state, &color);
+		ctk_style_context_restore (context);
+		cdk_cairo_set_source_rgba (drawing->renderContext->cr, &color);
+		cairo_paint (drawing->renderContext->cr);
+
+		draw_keyboard_to_context (drawing->renderContext, drawing);
+		destroy_cairo (drawing);
+	}
+}
+
+static void
+alloc_render_context (CafekbdKeyboardDrawing * drawing)
+{
+	CafekbdKeyboardDrawingRenderContext *context =
+	    drawing->renderContext =
+	    g_new0 (CafekbdKeyboardDrawingRenderContext, 1);
+
+	PangoContext *pangoContext =
+	    ctk_widget_get_pango_context (CTK_WIDGET (drawing));
+
+	CtkStyleContext *style_context =
+	    ctk_widget_get_style_context (CTK_WIDGET (drawing));
+	PangoFontDescription *fd = NULL;
+
+	ctk_style_context_get (style_context,
+	                       ctk_style_context_get_state (style_context),
+	                       CTK_STYLE_PROPERTY_FONT, &fd, NULL);
+
+	context->layout = pango_layout_new (pangoContext);
+	pango_layout_set_ellipsize (context->layout, PANGO_ELLIPSIZE_END);
+
+	context->font_desc = pango_font_description_copy (fd);
+	context->angle = 0;
+	context->scale_numerator = 1;
+	context->scale_denominator = 1;
+}
+
+static void
+free_render_context (CafekbdKeyboardDrawing * drawing)
+{
+	CafekbdKeyboardDrawingRenderContext *context = drawing->renderContext;
+	g_object_unref (G_OBJECT (context->layout));
+	pango_font_description_free (context->font_desc);
+
+	g_free (drawing->renderContext);
+	drawing->renderContext = NULL;
+}
+
+static gboolean
+draw (CtkWidget              *widget G_GNUC_UNUSED,
+      cairo_t                *cr,
+      CafekbdKeyboardDrawing *drawing)
+{
+	if (!drawing->xkb)
+		return FALSE;
+
+	if (drawing->surface == NULL)
+		return FALSE;
+
+	cairo_set_source_surface (cr, drawing->surface, 0, 0);
+	cairo_paint (cr);
+
+	return FALSE;
+}
+
+static gboolean
+idle_redraw (gpointer user_data)
+{
+	CafekbdKeyboardDrawing *drawing = user_data;
+
+	drawing->idle_redraw = 0;
+	draw_keyboard (drawing);
+	ctk_widget_queue_draw (CTK_WIDGET (drawing));
+	return FALSE;
+}
+
+static gboolean
+context_setup_scaling (CafekbdKeyboardDrawingRenderContext * context,
+		       CafekbdKeyboardDrawing * drawing,
+		       gdouble width, gdouble height,
+		       gdouble dpi_x, gdouble dpi_y)
+{
+	if (!drawing->xkb)
+		return FALSE;
+
+	if (drawing->xkb->geom->width_mm <= 0
+	    || drawing->xkb->geom->height_mm <= 0) {
+		g_critical
+		    ("keyboard geometry reports width or height as zero!");
+		return FALSE;
+	}
+
+	if (width * drawing->xkb->geom->height_mm <
+	    height * drawing->xkb->geom->width_mm) {
+		context->scale_numerator = width;
+		context->scale_denominator = drawing->xkb->geom->width_mm;
+	} else {
+		context->scale_numerator = height;
+		context->scale_denominator = drawing->xkb->geom->height_mm;
+	}
+
+	pango_font_description_set_size (context->font_desc,
+					 72 * KEY_FONT_SIZE * dpi_x *
+					 context->scale_numerator /
+					 context->scale_denominator);
+	pango_layout_set_spacing (context->layout,
+				  -160 * dpi_y * context->scale_numerator /
+				  context->scale_denominator);
+	pango_layout_set_font_description (context->layout,
+					   context->font_desc);
+
+	return TRUE;
+}
+
+static void
+size_allocate (CtkWidget              *widget G_GNUC_UNUSED,
+	       CtkAllocation          *allocation,
+	       CafekbdKeyboardDrawing *drawing)
+{
+	CafekbdKeyboardDrawingRenderContext *context = drawing->renderContext;
+
+	if (drawing->surface) {
+		cairo_surface_destroy (drawing->surface);
+		drawing->surface = NULL;
+	}
+
+	if (!context_setup_scaling (context, drawing,
+				    allocation->width, allocation->height,
+				    50, 50))
+		return;
+
+	if (!drawing->idle_redraw)
+		drawing->idle_redraw = g_idle_add (idle_redraw, drawing);
+}
+
+static gint
+key_event (CtkWidget              *widget G_GNUC_UNUSED,
+	   CdkEventKey            *event,
+	   CafekbdKeyboardDrawing *drawing)
+{
+	CafekbdKeyboardDrawingKey *key;
+	if (!drawing->xkb)
+		return FALSE;
+
+	key = drawing->keys + event->hardware_keycode;
+
+	if (event->hardware_keycode > drawing->xkb->max_key_code ||
+	    event->hardware_keycode < drawing->xkb->min_key_code ||
+	    key->xkbkey == NULL) {
+		g_signal_emit (drawing,
+			       cafekbd_keyboard_drawing_signals[BAD_KEYCODE],
+			       0, event->hardware_keycode);
+		return TRUE;
+	}
+
+	if ((event->type == CDK_KEY_PRESS && key->pressed) ||
+	    (event->type == CDK_KEY_RELEASE && !key->pressed))
+		return TRUE;
+	/* otherwise this event changes the state we believed we had before */
+
+	key->pressed = (event->type == CDK_KEY_PRESS);
+
+	if (create_cairo (drawing)) {
+		draw_key (drawing->renderContext, drawing, key);
+		redraw_overlapping_doodads (drawing->renderContext,
+					    drawing, key);
+		destroy_cairo (drawing);
+	}
+
+	invalidate_key_region (drawing, key);
+	return TRUE;
+}
+
+static gint
+button_press_event (CtkWidget              *widget,
+		    CdkEventButton         *event G_GNUC_UNUSED,
+		    CafekbdKeyboardDrawing *drawing)<--- Parameter 'drawing' can be declared as pointer to const
+{
+	if (!drawing->xkb)
+		return FALSE;
+
+	ctk_widget_grab_focus (widget);
+	return FALSE;
+}
+
+static gboolean
+unpress_keys (CafekbdKeyboardDrawing * drawing)
+{
+	gint i;
+
+	drawing->timeout = 0;
+
+	if (!drawing->xkb)
+		return FALSE;
+
+	if (create_cairo (drawing)) {
+		for (i = drawing->xkb->min_key_code;
+		     i <= drawing->xkb->max_key_code; i++)
+			if (drawing->keys[i].pressed) {
+				drawing->keys[i].pressed = FALSE;
+				draw_key (drawing->renderContext, drawing,
+					  drawing->keys + i);
+				invalidate_key_region (drawing,
+						       drawing->keys + i);
+			}
+		destroy_cairo (drawing);
+	}
+
+	return FALSE;
+}
+
+static gint
+focus_event (CtkWidget              *widget G_GNUC_UNUSED,
+	     CdkEventFocus          *event,<--- Parameter 'event' can be declared as pointer to const
+	     CafekbdKeyboardDrawing *drawing)
+{
+	if (event->in && drawing->timeout > 0) {
+		g_source_remove (drawing->timeout);
+		drawing->timeout = 0;
+	} else if (drawing->timeout == 0)
+		drawing->timeout =
+		    g_timeout_add (120, (GSourceFunc) unpress_keys,
+				   drawing);
+
+	return FALSE;
+}
+
+static gint
+compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a,<--- Parameter 'a' can be declared as pointer to const
+				  CafekbdKeyboardDrawingItem * b)<--- Parameter 'b' can be declared as pointer to const
+{
+	if (a->priority > b->priority)
+		return 1;
+	else if (a->priority < b->priority)
+		return -1;
+	else
+		return 0;
+}
+
+static void
+init_indicator_doodad (CafekbdKeyboardDrawing * drawing,
+		       XkbDoodadRec * xkbdoodad,
+		       CafekbdKeyboardDrawingDoodad * doodad)
+{
+	if (!drawing->xkb)
+		return;
+
+	if (xkbdoodad->any.type == XkbIndicatorDoodad) {
+		gint index;
+		Atom iname = 0;
+		Atom sname = xkbdoodad->indicator.name;
+		unsigned long phys_indicators =
+		    drawing->xkb->indicators->phys_indicators;
+		Atom *pind = drawing->xkb->names->indicators;<--- Variable 'pind' can be declared as pointer to const
+
+#ifdef KBDRAW_DEBUG
+		printf ("Looking for %d[%s]\n",
+			(int) sname, XGetAtomName (drawing->display,
+						   sname));
+#endif
+
+		for (index = 0; index < XkbNumIndicators; index++) {
+			iname = *pind++;
+			/* name matches and it is real */
+			if (iname == sname
+			    && (phys_indicators & (1 << index)))
+				break;
+			if (iname == 0)
+				break;
+		}
+		if (iname == 0)
+			g_warning ("Could not find indicator %d [%s]\n",
+				   (int) sname,
+				   XGetAtomName (drawing->display, sname));
+		else {
+#ifdef KBDRAW_DEBUG
+			printf ("Found in xkbdesc as %d\n", index);
+#endif
+			drawing->physical_indicators[index] = doodad;
+			/* Trying to obtain the real state, but if fail - just assume OFF */
+			if (!XkbGetNamedIndicator
+			    (drawing->display, sname, NULL, &doodad->on,
+			     NULL, NULL))
+				doodad->on = 0;
+		}
+	}
+}
+
+static void
+init_keys_and_doodads (CafekbdKeyboardDrawing * drawing)
+{
+	gint i, j, k;
+	gint x, y;
+
+	if (!drawing->xkb)
+		return;
+
+	for (i = 0; i < drawing->xkb->geom->num_doodads; i++) {
+		XkbDoodadRec *xkbdoodad = drawing->xkb->geom->doodads + i;
+		CafekbdKeyboardDrawingDoodad *doodad =
+		    g_new (CafekbdKeyboardDrawingDoodad, 1);
+
+		doodad->type = CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD;
+		doodad->origin_x = 0;
+		doodad->origin_y = 0;
+		doodad->angle = 0;
+		doodad->priority = xkbdoodad->any.priority * 256 * 256;
+		doodad->doodad = xkbdoodad;
+
+		init_indicator_doodad (drawing, xkbdoodad, doodad);
+
+		drawing->keyboard_items =
+		    g_list_append (drawing->keyboard_items, doodad);
+	}
+
+	for (i = 0; i < drawing->xkb->geom->num_sections; i++) {
+		XkbSectionRec *section = drawing->xkb->geom->sections + i;
+		guint priority;
+
+#ifdef KBDRAW_DEBUG
+		printf ("initing section %d containing %d rows\n", i,
+			section->num_rows);
+#endif
+		x = section->left;
+		y = section->top;
+		priority = section->priority * 256 * 256;
+
+		for (j = 0; j < section->num_rows; j++) {
+			XkbRowRec *row = section->rows + j;
+
+#ifdef KBDRAW_DEBUG
+			printf ("  initing row %d\n", j);
+#endif
+			x = section->left + row->left;
+			y = section->top + row->top;
+
+			for (k = 0; k < row->num_keys; k++) {
+				XkbKeyRec *xkbkey = row->keys + k;
+				CafekbdKeyboardDrawingKey *key;
+				XkbShapeRec *shape =
+				    drawing->xkb->geom->shapes +
+				    xkbkey->shape_ndx;
+				guint keycode = find_keycode (drawing,
+							      xkbkey->
+							      name.name);
+
+				if (keycode == INVALID_KEYCODE)
+					continue;
+#ifdef KBDRAW_DEBUG
+				printf
+				    ("    initing key %d, shape: %p(%p + %d), code: %u\n",
+				     k, shape, drawing->xkb->geom->shapes,
+				     xkbkey->shape_ndx, keycode);
+#endif
+				if (row->vertical)
+					y += xkbkey->gap;
+				else
+					x += xkbkey->gap;
+
+				if (keycode >= drawing->xkb->min_key_code
+				    && keycode <=
+				    drawing->xkb->max_key_code) {
+					key = drawing->keys + keycode;
+					if (key->type ==
+					    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_INVALID)
+					{
+						key->type =
+						    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY;
+					} else {
+						/* duplicate key for the same keycode,
+						   already defined as CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY */
+						key =
+						    g_new0
+						    (CafekbdKeyboardDrawingKey,
+						     1);
+						key->type =
+						    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA;
+					}
+				} else {
+					g_warning
+					    ("key %4.4s: keycode = %u; not in range %d..%d\n",
+					     xkbkey->name.name, keycode,
+					     drawing->xkb->min_key_code,
+					     drawing->xkb->max_key_code);
+
+					key =
+					    g_new0 (CafekbdKeyboardDrawingKey,
+						    1);
+					key->type =
+					    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA;
+				}
+
+				key->xkbkey = xkbkey;
+				key->angle = section->angle;
+				rotate_coordinate (section->left,
+						   section->top, x, y,
+						   section->angle,
+						   &key->origin_x,
+						   &key->origin_y);
+				key->priority = priority;
+				key->keycode = keycode;
+
+				drawing->keyboard_items =
+				    g_list_append (drawing->keyboard_items,
+						   key);
+
+				if (row->vertical)
+					y += shape->bounds.y2;
+				else
+					x += shape->bounds.x2;
+
+				priority++;
+			}
+		}
+
+		for (j = 0; j < section->num_doodads; j++) {
+			XkbDoodadRec *xkbdoodad = section->doodads + j;
+			CafekbdKeyboardDrawingDoodad *doodad =
+			    g_new (CafekbdKeyboardDrawingDoodad, 1);
+
+			doodad->type =
+			    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD;
+			doodad->origin_x = x;
+			doodad->origin_y = y;
+			doodad->angle = section->angle;
+			doodad->priority =
+			    priority + xkbdoodad->any.priority;
+			doodad->doodad = xkbdoodad;
+
+			init_indicator_doodad (drawing, xkbdoodad, doodad);
+
+			drawing->keyboard_items =
+			    g_list_append (drawing->keyboard_items,
+					   doodad);
+		}
+	}
+
+	drawing->keyboard_items = g_list_sort (drawing->keyboard_items,
+					       (GCompareFunc)
+					       compare_keyboard_item_priorities);<--- You might need to cast the function pointer here<--- You might need to cast the function pointer here
+}
+
+static void
+init_colors (CafekbdKeyboardDrawing * drawing)
+{
+	gboolean result;
+	gint i;
+
+	if (!drawing->xkb)
+		return;
+
+	drawing->colors = g_new (CdkRGBA, drawing->xkb->geom->num_colors);
+
+	for (i = 0; i < drawing->xkb->geom->num_colors; i++) {
+		result =
+		    parse_xkb_color_spec (drawing->xkb->geom->
+					  colors[i].spec,
+					  drawing->colors + i);
+
+		if (!result)
+			g_warning
+			    ("init_colors: unable to parse color %s\n",
+			     drawing->xkb->geom->colors[i].spec);
+	}
+}
+
+static void
+free_cdik (			/*colors doodads indicators keys */
+		  CafekbdKeyboardDrawing * drawing)
+{
+	GList *itemp;
+
+	if (!drawing->xkb)
+		return;
+
+	for (itemp = drawing->keyboard_items; itemp; itemp = itemp->next) {
+		CafekbdKeyboardDrawingItem *item = itemp->data;
+
+		switch (item->type) {
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_INVALID:
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY:
+			break;
+
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA:
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD:
+			g_free (item);
+			break;
+		}
+	}
+
+	g_list_free (drawing->keyboard_items);
+	drawing->keyboard_items = NULL;
+
+	g_free (drawing->keys);
+	g_free (drawing->colors);
+}
+
+static void
+alloc_cdik (CafekbdKeyboardDrawing * drawing)
+{
+	if (!drawing->xkb)
+		return;
+
+	drawing->physical_indicators_size =
+	    drawing->xkb->indicators->phys_indicators + 1;
+	drawing->physical_indicators =
+	    g_new0 (CafekbdKeyboardDrawingDoodad *,
+		    drawing->physical_indicators_size);
+	drawing->keys =
+	    g_new0 (CafekbdKeyboardDrawingKey,
+		    drawing->xkb->max_key_code + 1);
+}
+
+static void
+process_indicators_state_notify (XkbIndicatorNotifyEvent * iev,<--- Parameter 'iev' can be declared as pointer to const
+				 CafekbdKeyboardDrawing * drawing)
+{
+	/* Good question: should we track indicators when the keyboard is
+	   NOT really taken from the screen */
+	gint i;
+
+	for (i = 0; i <= drawing->xkb->indicators->phys_indicators; i++)
+		if (drawing->physical_indicators[i] != NULL
+		    && (iev->changed & 1 << i)) {
+			gint state = (iev->state & 1 << i) != FALSE;
+
+			if ((state && !drawing->physical_indicators[i]->on)
+			    || (!state
+				&& drawing->physical_indicators[i]->on)) {
+				drawing->physical_indicators[i]->on =
+				    state;
+				if (create_cairo (drawing)) {
+					draw_doodad
+					    (drawing->renderContext,
+					     drawing,
+					     drawing->physical_indicators
+					     [i]);
+					destroy_cairo (drawing);
+				}
+				invalidate_indicator_doodad_region
+				    (drawing,
+				     drawing->physical_indicators[i]);
+			}
+		}
+}
+
+static CdkFilterReturn
+xkb_state_notify_event_filter (CdkXEvent              *cdkxev,
+			       CdkEvent               *event G_GNUC_UNUSED,
+			       CafekbdKeyboardDrawing *drawing)
+{
+#define modifier_change_mask (XkbModifierStateMask | XkbModifierBaseMask | XkbModifierLatchMask | XkbModifierLockMask)
+
+	if (!drawing->xkb)
+		return CDK_FILTER_CONTINUE;
+
+	if (((XEvent *) cdkxev)->type == drawing->xkb_event_type) {
+		XkbEvent *kev = (XkbEvent *) cdkxev;
+		CtkAllocation allocation;
+		switch (kev->any.xkb_type) {
+		case XkbStateNotify:
+			if (((kev->state.changed & modifier_change_mask) &&
+			     drawing->track_modifiers)) {
+				free_cdik (drawing);
+				if (drawing->track_modifiers)
+					cafekbd_keyboard_drawing_set_mods
+					    (drawing,
+					     kev->state.compat_state);
+				drawing->keys =
+				    g_new0 (CafekbdKeyboardDrawingKey,
+					    drawing->xkb->max_key_code +
+					    1);
+
+				ctk_widget_get_allocation (CTK_WIDGET
+							   (drawing),
+							   &allocation);
+				size_allocate (CTK_WIDGET (drawing),
+					       &allocation, drawing);
+
+				init_keys_and_doodads (drawing);
+				init_colors (drawing);
+			}
+			break;
+
+		case XkbIndicatorStateNotify:
+			{
+				process_indicators_state_notify (&
+								 ((XkbEvent
+								   *)
+								  cdkxev)->indicators,
+drawing);
+			}
+			break;
+
+		case XkbIndicatorMapNotify:
+		case XkbControlsNotify:
+		case XkbNamesNotify:
+		case XkbNewKeyboardNotify:
+			{
+				XkbStateRec state;
+				memset (&state, 0, sizeof (state));
+				XkbGetState (drawing->display,
+					     XkbUseCoreKbd, &state);
+				if (drawing->track_modifiers)
+					cafekbd_keyboard_drawing_set_mods
+					    (drawing, state.compat_state);
+				if (drawing->track_config)
+					cafekbd_keyboard_drawing_set_keyboard
+					    (drawing, NULL);
+			}
+			break;
+		}
+	}
+
+	return CDK_FILTER_CONTINUE;
+}
+
+static void
+destroy (CafekbdKeyboardDrawing * drawing)
+{
+	free_render_context (drawing);
+	cdk_window_remove_filter (NULL, (CdkFilterFunc)
+				  xkb_state_notify_event_filter, drawing);
+	if (drawing->timeout > 0) {
+		g_source_remove (drawing->timeout);
+		drawing->timeout = 0;
+	}
+	if (drawing->idle_redraw > 0) {
+		g_source_remove (drawing->idle_redraw);
+		drawing->idle_redraw = 0;
+	}
+
+	if (drawing->surface != NULL) {
+		cairo_surface_destroy (drawing->surface);
+	}
+}
+
+static void
+style_changed (CafekbdKeyboardDrawing * drawing)
+{
+	pango_layout_context_changed (drawing->renderContext->layout);
+}
+
+static void
+cafekbd_keyboard_drawing_init (CafekbdKeyboardDrawing * drawing)
+{
+	gint opcode = 0, error = 0, major = 1, minor = 0;
+	gint mask;
+
+	drawing->display = CDK_DISPLAY_XDISPLAY(cdk_display_get_default());
+
+	printf ("dpy: %p\n", (void *) drawing->display);
+
+	if (!XkbQueryExtension
+	    (drawing->display, &opcode, &drawing->xkb_event_type, &error,
+	     &major, &minor))
+		g_critical
+		    ("XkbQueryExtension failed! Stuff probably won't work.");
+
+	printf ("evt/error/major/minor: %d/%d/%d/%d\n",
+		drawing->xkb_event_type, error, major, minor);
+
+	/* XXX: this stuff probably doesn't matter.. also, cdk_screen_get_default can fail */
+	if (ctk_widget_has_screen (CTK_WIDGET (drawing)))
+		drawing->screen_num =
+		    cdk_x11_screen_get_screen_number (ctk_widget_get_screen
+					   (CTK_WIDGET (drawing)));
+	else
+		drawing->screen_num =
+		    cdk_x11_screen_get_screen_number (cdk_screen_get_default ());
+
+	drawing->surface = NULL;
+	alloc_render_context (drawing);
+
+	drawing->keyboard_items = NULL;
+	drawing->colors = NULL;
+
+	drawing->track_modifiers = 0;
+	drawing->track_config = 0;
+
+	/* XXX: XkbClientMapMask | XkbIndicatorMapMask | XkbNamesMask | XkbGeometryMask */
+	drawing->xkb = XkbGetKeyboard (drawing->display,
+				       XkbGBN_GeometryMask |
+				       XkbGBN_KeyNamesMask |
+				       XkbGBN_OtherNamesMask |
+				       XkbGBN_SymbolsMask |
+				       XkbGBN_IndicatorMapMask,
+				       XkbUseCoreKbd);
+	if (drawing->xkb) {
+		XkbGetNames (drawing->display, XkbAllNamesMask, drawing->xkb);
+		XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+				       XkbIndicatorStateNotify,
+				       drawing->xkb->indicators->phys_indicators,
+				       drawing->xkb->indicators->phys_indicators);
+	}
+
+	drawing->l3mod = XkbKeysymToModifiers (drawing->display,
+					       CDK_KEY_ISO_Level3_Shift);
+
+	drawing->xkbOnDisplay = TRUE;
+
+	alloc_cdik (drawing);
+
+	mask =
+	    (XkbStateNotifyMask | XkbNamesNotifyMask |
+	     XkbControlsNotifyMask | XkbIndicatorMapNotifyMask |
+	     XkbNewKeyboardNotifyMask);
+	XkbSelectEvents (drawing->display, XkbUseCoreKbd, mask, mask);
+
+	mask = XkbGroupStateMask | XkbModifierStateMask;
+	XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+			       XkbStateNotify, mask, mask);
+
+	mask = (XkbGroupNamesMask | XkbIndicatorNamesMask);
+	XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+			       XkbNamesNotify, mask, mask);
+	init_keys_and_doodads (drawing);
+	init_colors (drawing);
+
+	/* required to get key events */
+	ctk_widget_set_can_focus (CTK_WIDGET (drawing), TRUE);
+
+	ctk_widget_set_events (CTK_WIDGET (drawing),
+			       CDK_EXPOSURE_MASK | CDK_KEY_PRESS_MASK |
+			       CDK_KEY_RELEASE_MASK | CDK_BUTTON_PRESS_MASK
+			       | CDK_FOCUS_CHANGE_MASK);
+	g_signal_connect (G_OBJECT (drawing), "draw",
+			  G_CALLBACK (draw), drawing);
+	g_signal_connect_after (G_OBJECT (drawing), "key-press-event",
+				G_CALLBACK (key_event), drawing);
+	g_signal_connect_after (G_OBJECT (drawing), "key-release-event",
+				G_CALLBACK (key_event), drawing);
+	g_signal_connect (G_OBJECT (drawing), "button-press-event",
+			  G_CALLBACK (button_press_event), drawing);<--- You might need to cast the function pointer here
+	g_signal_connect (G_OBJECT (drawing), "focus-out-event",
+			  G_CALLBACK (focus_event), drawing);
+	g_signal_connect (G_OBJECT (drawing), "focus-in-event",
+			  G_CALLBACK (focus_event), drawing);<--- You might need to cast the function pointer here
+	g_signal_connect (G_OBJECT (drawing), "size-allocate",
+			  G_CALLBACK (size_allocate), drawing);
+	g_signal_connect (G_OBJECT (drawing), "destroy",
+			  G_CALLBACK (destroy), drawing);
+	g_signal_connect (G_OBJECT (drawing), "style-set",
+			  G_CALLBACK (style_changed), drawing);
+
+	cdk_window_add_filter (NULL, (CdkFilterFunc)
+			       xkb_state_notify_event_filter, drawing);
+}
+
+CtkWidget *
+cafekbd_keyboard_drawing_new (void)
+{
+	return
+	    CTK_WIDGET (g_object_new
+			(cafekbd_keyboard_drawing_get_type (), NULL));
+}
+
+static void
+cafekbd_keyboard_drawing_class_init (CafekbdKeyboardDrawingClass * klass)
+{
+	CtkWidgetClass *widget_class = CTK_WIDGET_CLASS (klass);
+	ctk_widget_class_set_css_name (widget_class, "cafekbd-keyboard-drawing");
+
+	klass->bad_keycode = NULL;
+
+	cafekbd_keyboard_drawing_signals[BAD_KEYCODE] =
+	    g_signal_new ("bad-keycode", cafekbd_keyboard_drawing_get_type (),
+			  G_SIGNAL_RUN_FIRST,
+			  G_STRUCT_OFFSET (CafekbdKeyboardDrawingClass,
+					   bad_keycode), NULL, NULL,
+			  cafekbd_keyboard_drawing_VOID__UINT, G_TYPE_NONE, 1,
+			  G_TYPE_UINT);
+}
+
+GType
+cafekbd_keyboard_drawing_get_type (void)
+{
+	static GType cafekbd_keyboard_drawing_type = 0;
+
+	if (!cafekbd_keyboard_drawing_type) {
+		static const GTypeInfo cafekbd_keyboard_drawing_info = {
+			sizeof (CafekbdKeyboardDrawingClass),
+			NULL,	/* base_init */
+			NULL,	/* base_finalize */
+			(GClassInitFunc) cafekbd_keyboard_drawing_class_init,
+			NULL,	/* class_finalize */
+			NULL,	/* class_data */
+			sizeof (CafekbdKeyboardDrawing),
+			0,	/* n_preallocs */
+			(GInstanceInitFunc) cafekbd_keyboard_drawing_init,
+			NULL	/* *value_table */
+		};
+
+		cafekbd_keyboard_drawing_type =
+		    g_type_register_static (CTK_TYPE_DRAWING_AREA,
+					    "CafekbdKeyboardDrawing",
+					    &cafekbd_keyboard_drawing_info,
+					    0);
+	}
+
+	return cafekbd_keyboard_drawing_type;
+}
+
+void
+cafekbd_keyboard_drawing_set_mods (CafekbdKeyboardDrawing * drawing, guint mods)
+{
+#ifdef KBDRAW_DEBUG
+	printf ("set_mods: %d\n", mods);
+#endif
+	if (mods != drawing->mods) {
+		drawing->mods = mods;
+		ctk_widget_queue_draw (CTK_WIDGET (drawing));
+	}
+}
+
+/**
+ * cafekbd_keyboard_drawing_render:
+ * @kbdrawing: keyboard layout to render
+ * @cr:        Cairo context to render to
+ * @layout:    Pango layout to use to render text
+ * @x:         left coordinate (pixels) of region to render in
+ * @y:         top coordinate (pixels) of region to render in
+ * @width:     width (pixels) of region to render in
+ * @height:    height (pixels) of region to render in
+ *
+ * Renders a keyboard layout to a cairo_t context.  @cr and @layout can be got
+ * from e.g. a CtkWidget or a CtkPrintContext.  @cr and @layout may be modified
+ * by the function but will not be unreffed.
+ *
+ * Returns: %TRUE on success, %FALSE on failure
+ */
+gboolean
+cafekbd_keyboard_drawing_render (CafekbdKeyboardDrawing * kbdrawing,
+			      cairo_t * cr,
+			      PangoLayout * layout,
+			      double x, double y,
+			      double width, double height,
+			      double dpi_x, double dpi_y)
+{
+	CtkStyleContext *style_context =
+	    ctk_widget_get_style_context (CTK_WIDGET (kbdrawing));
+	CdkRGBA dark_color;
+	PangoFontDescription *fd = NULL;
+
+	ctk_style_context_get_background_color (style_context,
+	                                        ctk_style_context_get_state (style_context),
+	                                        &dark_color);
+	/* make dark background by making regular background darker */
+	dark_color.red *= 0.7;
+	dark_color.green *= 0.7;
+	dark_color.blue *= 0.7;
+
+	ctk_style_context_get (style_context,
+	                       ctk_style_context_get_state (style_context),
+	                       CTK_STYLE_PROPERTY_FONT, &fd, NULL);
+	fd = pango_font_description_copy (fd);
+
+	CafekbdKeyboardDrawingRenderContext context = {
+		cr,
+		kbdrawing->renderContext->angle,
+		layout,
+		pango_font_description_copy (fd),
+		1, 1,
+		dark_color
+	};
+
+	if (!context_setup_scaling (&context, kbdrawing, width, height,
+	                            dpi_x, dpi_y))
+		return FALSE;
+	cairo_translate (cr, x, y);
+
+	draw_keyboard_to_context (&context, kbdrawing);
+
+	pango_font_description_free (fd);
+
+	return TRUE;
+}
+
+/**
+ * cafekbd_keyboard_drawing_set_keyboard: (skip)
+ */
+gboolean
+cafekbd_keyboard_drawing_set_keyboard (CafekbdKeyboardDrawing * drawing,
+				    XkbComponentNamesRec * names)
+{
+	CtkAllocation allocation;
+
+	free_cdik (drawing);
+	if (drawing->xkb)
+		XkbFreeKeyboard (drawing->xkb, 0, TRUE);	/* free_all = TRUE */
+	drawing->xkb = NULL;
+
+	if (names) {
+		drawing->xkb =
+		    XkbGetKeyboardByName (drawing->display, XkbUseCoreKbd,
+					  names, 0,
+					  XkbGBN_GeometryMask |
+					  XkbGBN_KeyNamesMask |
+					  XkbGBN_OtherNamesMask |
+					  XkbGBN_ClientSymbolsMask |
+					  XkbGBN_IndicatorMapMask, FALSE);
+		drawing->xkbOnDisplay = FALSE;
+	} else {
+		drawing->xkb = XkbGetKeyboard (drawing->display,
+					       XkbGBN_GeometryMask |
+					       XkbGBN_KeyNamesMask |
+					       XkbGBN_OtherNamesMask |
+					       XkbGBN_SymbolsMask |
+					       XkbGBN_IndicatorMapMask,
+					       XkbUseCoreKbd);
+		XkbGetNames (drawing->display, XkbAllNamesMask,
+			     drawing->xkb);
+		drawing->xkbOnDisplay = TRUE;
+	}
+
+	if (drawing->xkb) {
+		XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+				       XkbIndicatorStateNotify,
+				       drawing->xkb->indicators->phys_indicators,
+				       drawing->xkb->indicators->phys_indicators);
+	}
+
+	alloc_cdik (drawing);
+
+	init_keys_and_doodads (drawing);
+	init_colors (drawing);
+
+	ctk_widget_get_allocation (CTK_WIDGET (drawing), &allocation);
+	size_allocate (CTK_WIDGET (drawing), &allocation, drawing);
+	ctk_widget_queue_draw (CTK_WIDGET (drawing));
+
+	return TRUE;
+}
+
+const gchar* cafekbd_keyboard_drawing_get_keycodes(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->keycodes <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->keycodes);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_geometry(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->geometry <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->geometry);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_symbols(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->symbols <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->symbols);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_types(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->types <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->types);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_compat(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->compat <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->compat);
+	}
+}
+
+void
+cafekbd_keyboard_drawing_set_track_modifiers (CafekbdKeyboardDrawing * drawing,
+					   gboolean enable)
+{
+	if (enable) {
+		XkbStateRec state;
+		drawing->track_modifiers = 1;
+		memset (&state, 0, sizeof (state));
+		XkbGetState (drawing->display, XkbUseCoreKbd, &state);
+		cafekbd_keyboard_drawing_set_mods (drawing,
+						state.compat_state);
+	} else
+		drawing->track_modifiers = 0;
+}
+
+void
+cafekbd_keyboard_drawing_set_track_config (CafekbdKeyboardDrawing * drawing,
+					gboolean enable)
+{
+	if (enable)
+		drawing->track_config = 1;
+	else
+		drawing->track_config = 0;
+}
+
+void
+cafekbd_keyboard_drawing_set_groups_levels (CafekbdKeyboardDrawing * drawing,
+					 CafekbdKeyboardDrawingGroupLevel *
+					 groupLevels[])
+{
+#ifdef KBDRAW_DEBUG
+	printf ("set_group_levels [topLeft]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT]->level);
+	printf ("set_group_levels [topRight]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPRIGHT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPRIGHT]->level);
+	printf ("set_group_levels [bottomLeft]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT]->level);
+	printf ("set_group_levels [bottomRight]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT]->level);
+#endif
+	drawing->groupLevels = groupLevels;
+
+	ctk_widget_queue_draw (CTK_WIDGET (drawing));
+}
+
+typedef struct {
+	CafekbdKeyboardDrawing *drawing;
+	const gchar *description;
+} XkbLayoutPreviewPrintData;
+
+static void
+cafekbd_keyboard_drawing_begin_print (CtkPrintOperation         *operation,
+				      CtkPrintContext           *context G_GNUC_UNUSED,
+				      XkbLayoutPreviewPrintData *data G_GNUC_UNUSED)
+{
+	/* We always print single-page documents */
+	CtkPrintSettings *settings =
+	    ctk_print_operation_get_print_settings (operation);
+	ctk_print_operation_set_n_pages (operation, 1);
+	if (!ctk_print_settings_has_key
+	    (settings, CTK_PRINT_SETTINGS_ORIENTATION))
+		ctk_print_settings_set_orientation (settings,
+						    CTK_PAGE_ORIENTATION_LANDSCAPE);
+}
+
+static void
+cafekbd_keyboard_drawing_draw_page (CtkPrintOperation         *operation,
+				    CtkPrintContext           *context,
+				    gint                       page_nr G_GNUC_UNUSED,
+				    XkbLayoutPreviewPrintData *data)
+{
+	cairo_t *cr = ctk_print_context_get_cairo_context (context);
+	PangoLayout *layout =
+	    ctk_print_context_create_pango_layout (context);
+	PangoFontDescription *desc =
+	    pango_font_description_from_string ("sans 8");
+	gdouble width = ctk_print_context_get_width (context);
+	gdouble height = ctk_print_context_get_height (context);
+	gdouble dpi_x = ctk_print_context_get_dpi_x (context);
+	gdouble dpi_y = ctk_print_context_get_dpi_y (context);
+	gchar *header;
+
+	ctk_print_operation_set_unit (operation, CTK_UNIT_PIXEL);
+
+	header = g_strdup_printf
+	    (_("Keyboard layout \"%s\"\n"
+	       "Copyright &#169; X.Org Foundation and "
+	       "XKeyboardConfig contributors\n"
+	       "For licensing see package metadata"), data->description);
+	pango_layout_set_markup (layout, header, -1);
+	pango_layout_set_font_description (layout, desc);
+	pango_font_description_free (desc);
+	pango_layout_set_width (layout, pango_units_from_double (width));
+	pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER);
+	cairo_set_source_rgb (cr, 0, 0, 0);
+	cairo_move_to (cr, 0, 0);
+	pango_cairo_show_layout (cr, layout);
+
+	cafekbd_keyboard_drawing_render (CAFEKBD_KEYBOARD_DRAWING
+				      (data->drawing), cr, layout, 0.0,
+				      0.0, width, height, dpi_x, dpi_y);
+
+	g_object_unref (layout);
+}
+
+void
+cafekbd_keyboard_drawing_print (CafekbdKeyboardDrawing * drawing,
+			     CtkWindow * parent_window,
+			     const gchar * description)
+{
+	CtkPrintOperation *print;
+	CtkPrintOperationResult res;
+	static CtkPrintSettings *settings = NULL;
+	XkbLayoutPreviewPrintData data = { drawing, description };
+
+	print = ctk_print_operation_new ();
+
+	if (settings != NULL)
+		ctk_print_operation_set_print_settings (print, settings);
+
+	g_signal_connect (print, "begin_print",
+			  G_CALLBACK (cafekbd_keyboard_drawing_begin_print),
+			  &data);
+	g_signal_connect (print, "draw_page",
+			  G_CALLBACK (cafekbd_keyboard_drawing_draw_page),
+			  &data);
+
+	res = ctk_print_operation_run (print,
+				       CTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
+				       parent_window, NULL);
+
+	if (res == CTK_PRINT_OPERATION_RESULT_APPLY) {
+		if (settings != NULL)
+			g_object_unref (settings);
+		settings = ctk_print_operation_get_print_settings (print);
+		g_object_ref (settings);
+	}
+
+	g_object_unref (print);
+}
+
+static void
+show_layout_response (CtkWidget * dialog, gint resp)
+{
+	CdkRectangle rect;
+	CtkWidget *kbdraw;
+	const gchar *groupName;
+
+	switch (resp) {
+	case CTK_RESPONSE_CLOSE:
+		ctk_window_get_position (CTK_WINDOW (dialog), &rect.x,
+					 &rect.y);
+		ctk_window_get_size (CTK_WINDOW (dialog), &rect.width,
+				     &rect.height);
+		cafekbd_preview_save_position (&rect);
+		ctk_widget_destroy (dialog);
+		break;
+	case CTK_RESPONSE_PRINT:
+		kbdraw =
+		    CTK_WIDGET (g_object_get_data
+				(G_OBJECT (dialog), "kbdraw"));
+		groupName =
+		    (const gchar *) g_object_get_data (G_OBJECT (dialog),
+						       "groupName");
+		cafekbd_keyboard_drawing_print (CAFEKBD_KEYBOARD_DRAWING
+					     (kbdraw), CTK_WINDOW (dialog),
+					     groupName ? groupName :
+					     _("Unknown"));
+	}
+}
+
+CtkWidget *
+cafekbd_keyboard_drawing_new_dialog (gint group, gchar * group_name)
+{
+	static CafekbdKeyboardDrawingGroupLevel groupsLevels[] = { {
+								 0, 1}, {
+									 0,
+									 3},
+	{
+	 0, 0}, {
+		 0, 2}
+	};
+	static CafekbdKeyboardDrawingGroupLevel *pGroupsLevels[] = {
+		groupsLevels, groupsLevels + 1, groupsLevels + 2,
+		groupsLevels + 3
+	};
+
+	CtkBuilder *builder;
+	CtkWidget *dialog, *kbdraw;
+	XkbComponentNamesRec component_names;
+	XklConfigRec *xkl_data;
+	CdkRectangle *rect;
+	GError *error = NULL;
+	char title[128] = "";
+	XklEngine* engine = xkl_engine_get_instance(CDK_DISPLAY_XDISPLAY(cdk_display_get_default()));
+
+	builder = ctk_builder_new ();
+	ctk_builder_add_from_resource (builder,
+	                               "/org/cafe/peripherals/keyboard/show-layout.ui",
+	                               &error);
+
+	if (error) {
+		g_error ("Could not load UI: %s", error->message);
+		g_clear_error (&error);
+	}
+
+
+	dialog =
+	    CTK_WIDGET (ctk_builder_get_object
+			(builder, "gswitchit_layout_view"));
+	kbdraw = cafekbd_keyboard_drawing_new ();
+	ctk_widget_set_vexpand (kbdraw, TRUE);
+
+	snprintf (title, sizeof (title), _("Keyboard Layout \"%s\""),
+		  group_name);
+	ctk_window_set_title (CTK_WINDOW (dialog), title);
+	g_object_set_data_full (G_OBJECT (dialog), "group_name",
+				g_strdup (group_name), g_free);
+
+	cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING
+						 (kbdraw), pGroupsLevels);
+
+	xkl_data = xkl_config_rec_new ();
+	if (xkl_config_rec_get_from_server (xkl_data, engine)) {
+		int num_layouts = g_strv_length (xkl_data->layouts);
+		int num_variants = g_strv_length (xkl_data->variants);
+		if (group >= 0 && group < num_layouts
+		    && group < num_variants) {
+			char *l = g_strdup (xkl_data->layouts[group]);
+			char *v = g_strdup (xkl_data->variants[group]);
+			char **p;
+			int i;
+
+			if ((p = xkl_data->layouts) != NULL)
+				for (i = num_layouts; --i >= 0;)
+					g_free (*p++);
+
+			if ((p = xkl_data->variants) != NULL)
+				for (i = num_variants; --i >= 0;)
+					g_free (*p++);
+
+			xkl_data->layouts =
+			    g_realloc (xkl_data->layouts,
+				       sizeof (char *) * 2);
+			xkl_data->variants =
+			    g_realloc (xkl_data->variants,
+				       sizeof (char *) * 2);
+			xkl_data->layouts[0] = l;
+			xkl_data->variants[0] = v;
+			xkl_data->layouts[1] = xkl_data->variants[1] =
+			    NULL;
+		}
+
+		if (xkl_xkb_config_native_prepare(engine, xkl_data, &component_names))
+		{
+			cafekbd_keyboard_drawing_set_keyboard
+			    (CAFEKBD_KEYBOARD_DRAWING (kbdraw),
+			     &component_names);
+			xkl_xkb_config_native_cleanup (engine,
+						       &component_names);
+		}
+	}
+
+	g_object_unref (G_OBJECT (xkl_data));
+
+	g_object_set_data (G_OBJECT (dialog), "builderData", builder);
+	g_signal_connect (G_OBJECT (dialog), "response", G_CALLBACK (show_layout_response), NULL);
+
+	rect = cafekbd_preview_load_position ();
+
+	if (rect != NULL)
+	{
+		ctk_window_move (CTK_WINDOW (dialog), rect->x, rect->y);
+		ctk_window_resize (CTK_WINDOW (dialog), rect->width, rect->height);
+		g_free (rect);
+	}
+	else
+	{
+		ctk_window_resize (CTK_WINDOW (dialog), 700, 400);
+	}
+
+	ctk_window_set_resizable (CTK_WINDOW (dialog), TRUE);
+
+	ctk_container_add (CTK_CONTAINER
+			   (ctk_builder_get_object
+			    (builder, "preview_vbox")), kbdraw);
+
+	g_object_set_data (G_OBJECT (dialog), "kbdraw", kbdraw);
+
+		g_signal_connect_swapped(dialog, "destroy", G_CALLBACK(g_object_unref),  g_object_get_data(G_OBJECT(dialog), "builderData"));
+
+	ctk_widget_show_all(dialog);
+
+	return dialog;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/5.html b/2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/5.html new file mode 100644 index 0000000..a0afe30 --- /dev/null +++ b/2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/5.html @@ -0,0 +1,1978 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+#include <config.h>
+
+#include <memory.h>
+
+#include <cairo.h>
+
+#include <cdk/cdkkeysyms.h>
+#include <cdk/cdkx.h>
+#include <glib/gi18n-lib.h>
+#include <glib/gprintf.h>
+
+#include <cafekbd-status.h>
+
+#include <cafekbd-desktop-config.h>
+#include <cafekbd-indicator-config.h>
+
+typedef struct _gki_globals {
+	XklEngine *engine;
+	XklConfigRegistry *registry;
+
+	CafekbdDesktopConfig cfg;
+	CafekbdIndicatorConfig ind_cfg;
+	CafekbdKeyboardConfig kbd_cfg;
+
+	const gchar *tooltips_format;
+	gchar **full_group_names;
+	gchar **short_group_names;
+
+	gint current_width;
+	gint current_height;
+	int real_width;
+
+	GSList *icons;		/* list of GdkPixbuf */
+	GSList *widget_instances;	/* list of CafekbdStatus */
+	gulong state_changed_handler;
+	gulong config_changed_handler;
+} gki_globals;
+
+static gchar *settings_signal_names[] = {
+	"notify::ctk-theme-name",
+	"notify::ctk-key-theme-name",
+	"notify::ctk-font-name",
+	"notify::font-options",
+};
+
+struct _CafekbdStatusPrivate {
+	gdouble angle;
+	gulong settings_signal_handlers[sizeof (settings_signal_names) /
+					sizeof (settings_signal_names[0])];
+};
+
+/* one instance for ALL widgets */
+static gki_globals globals;
+
+#define ForAllIndicators() \
+	{ \
+		GSList* cur; \
+		for (cur = globals.widget_instances; cur != NULL; cur = cur->next) { \
+			CafekbdStatus * gki = (CafekbdStatus*)cur->data;
+#define NextIndicator() \
+		} \
+	}
+
+G_DEFINE_TYPE (CafekbdStatus, cafekbd_status, CTK_TYPE_STATUS_ICON)<--- There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
+static void
+cafekbd_status_global_init (void);
+static void
+cafekbd_status_global_term (void);
+static GdkPixbuf *
+cafekbd_status_prepare_drawing (CafekbdStatus * gki, int group);
+static void
+cafekbd_status_set_current_page_for_group (CafekbdStatus * gki, int group);
+static void
+cafekbd_status_set_current_page (CafekbdStatus * gki);
+static void
+cafekbd_status_global_cleanup (CafekbdStatus * gki);
+static void
+cafekbd_status_global_fill (CafekbdStatus * gki);
+static void
+cafekbd_status_set_tooltips (CafekbdStatus * gki, const char *str);
+
+void
+cafekbd_status_set_tooltips (CafekbdStatus * gki, const char *str)
+{
+	g_assert (str == NULL || g_utf8_validate (str, -1, NULL));
+
+	ctk_status_icon_set_tooltip_text (CTK_STATUS_ICON (gki), str);
+}
+
+void
+cafekbd_status_global_cleanup (CafekbdStatus *gki G_GNUC_UNUSED)
+{
+	while (globals.icons) {
+		if (globals.icons->data)
+			g_object_unref (G_OBJECT (globals.icons->data));
+		globals.icons =
+		    g_slist_delete_link (globals.icons, globals.icons);
+	}
+}
+
+void
+cafekbd_status_global_fill (CafekbdStatus * gki)
+{
+	int grp;
+	int total_groups = xkl_engine_get_num_groups (globals.engine);
+
+	for (grp = 0; grp < total_groups; grp++) {
+		GdkPixbuf *page = cafekbd_status_prepare_drawing (gki, grp);
+		globals.icons = g_slist_append (globals.icons, page);
+	}
+}
+
+static void
+cafekbd_status_activate (CafekbdStatus *gki G_GNUC_UNUSED)
+{
+	xkl_debug (150, "Mouse button pressed on applet\n");
+	cafekbd_desktop_config_lock_next_group (&globals.cfg);
+}
+
+/* hackish xref */
+extern gchar *cafekbd_indicator_extract_layout_name (int group,
+						  XklEngine * engine,
+						  CafekbdKeyboardConfig *
+						  kbd_cfg,
+						  gchar **
+						  short_group_names,
+						  gchar **
+						  full_group_names);
+
+extern gchar *cafekbd_indicator_create_label_title (int group,
+						 GHashTable **
+						 ln2cnt_map,
+						 gchar * layout_name);
+
+static void
+cafekbd_status_render_cairo (cairo_t * cr, int group)
+{
+	double r, g, b;
+	PangoFontDescription *pfd;
+	PangoContext *pcc;
+	PangoLayout *pl;
+	int lwidth, lheight;
+	gchar *layout_name, *lbl_title;
+	double screen_res;
+	cairo_font_options_t *fo;
+	static GHashTable *ln2cnt_map = NULL;
+
+	xkl_debug (160, "Rendering cairo for group %d\n", group);
+	if (globals.ind_cfg.background_color != NULL &&
+	    globals.ind_cfg.background_color[0] != 0) {
+		if (sscanf
+		    (globals.ind_cfg.background_color, "%lg %lg %lg", &r,
+		     &g, &b) == 3) {
+			cairo_set_source_rgb (cr, r, g, b);
+			cairo_rectangle (cr, 0, 0, globals.current_width,
+					 globals.current_height);
+			cairo_fill (cr);
+		}
+	}
+
+	if (globals.ind_cfg.foreground_color != NULL &&
+	    globals.ind_cfg.foreground_color[0] != 0) {
+		if (sscanf
+		    (globals.ind_cfg.foreground_color, "%lg %lg %lg", &r,
+		     &g, &b) == 3) {
+			cairo_set_source_rgb (cr, r, g, b);
+		}
+	}
+
+	pcc = pango_cairo_create_context (cr);
+
+	screen_res = cdk_screen_get_resolution (cdk_screen_get_default ());
+	if (screen_res > 0)
+		pango_cairo_context_set_resolution (pcc, screen_res);
+
+	fo = cairo_font_options_copy (cdk_screen_get_font_options
+				      (cdk_screen_get_default ()));
+	/* SUBPIXEL antialiasing gives bad results on in-memory images */
+	if (cairo_font_options_get_antialias (fo) ==
+	    CAIRO_ANTIALIAS_SUBPIXEL)
+		cairo_font_options_set_antialias (fo,
+						  CAIRO_ANTIALIAS_GRAY);
+	pango_cairo_context_set_font_options (pcc, fo);
+
+	pl = pango_layout_new (pcc);
+
+	layout_name = cafekbd_indicator_extract_layout_name (group,
+							  globals.engine,
+							  &globals.kbd_cfg,
+							  globals.short_group_names,
+							  globals.full_group_names);
+	lbl_title =
+	    cafekbd_indicator_create_label_title (group, &ln2cnt_map,
+					       layout_name);
+
+	if (group + 1 == xkl_engine_get_num_groups (globals.engine)) {
+		g_hash_table_destroy (ln2cnt_map);
+		ln2cnt_map = NULL;
+	}
+
+	pango_layout_set_text (pl, lbl_title, -1);
+
+	g_free (lbl_title);
+
+	pfd = pango_font_description_from_string (globals.ind_cfg.font_family);
+
+	pango_layout_set_font_description (pl, pfd);
+	pango_layout_get_size (pl, &lwidth, &lheight);
+
+	cairo_move_to (cr,
+		       (globals.current_width - lwidth / PANGO_SCALE) / 2,
+		       (globals.current_height -
+			lheight / PANGO_SCALE) / 2);
+
+	pango_cairo_show_layout (cr, pl);
+
+	pango_font_description_free (pfd);
+	g_object_unref (pl);
+	g_object_unref (pcc);
+	cairo_font_options_destroy (fo);
+	cairo_destroy (cr);
+
+	globals.real_width = (lwidth / PANGO_SCALE) + 4;
+	if (globals.real_width > globals.current_width)
+		globals.real_width = globals.current_width;
+	if (globals.real_width < globals.current_height)
+		globals.real_width = globals.current_height;
+}
+
+static inline guint8
+convert_color_channel (guint8 src, guint8 alpha)
+{
+	return alpha ? ((((guint) src) << 8) - src) / alpha : 0;
+}
+
+static void
+convert_bgra_to_rgba (guint8 const *src, guint8 * dst, int width,
+		      int height, int new_width)
+{
+	int xoffset = width - new_width;
+
+	/* *4 */
+	int ptr_step = xoffset << 2;
+
+	int x, y;
+
+	/* / 2 * 4 */
+	src = src + ((xoffset >> 1) << 2);
+
+	for (y = height; --y >= 0; src += ptr_step) {
+		for (x = new_width; --x >= 0;) {
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+			dst[0] = convert_color_channel (src[2], src[3]);
+			dst[1] = convert_color_channel (src[1], src[3]);
+			dst[2] = convert_color_channel (src[0], src[3]);
+			dst[3] = src[3];
+#else
+			dst[0] = convert_color_channel (src[1], src[0]);
+			dst[1] = convert_color_channel (src[2], src[0]);
+			dst[2] = convert_color_channel (src[3], src[0]);
+			dst[3] = src[0];
+#endif
+			dst += 4;
+			src += 4;
+		}
+	}
+}
+
+static GdkPixbuf *
+cafekbd_status_prepare_drawing (CafekbdStatus *gki G_GNUC_UNUSED,
+				int            group)
+{
+	GError *gerror = NULL;
+	char *image_filename;
+	GdkPixbuf *image;
+
+	if (globals.current_width == 0)
+		return NULL;
+
+	if (globals.ind_cfg.show_flags) {
+
+		image_filename =
+		    (char *) g_slist_nth_data (globals.
+					       ind_cfg.image_filenames,
+					       group);
+
+		image = gdk_pixbuf_new_from_file_at_size (image_filename,
+							  globals.current_width,
+							  globals.current_height,
+							  &gerror);
+
+		if (image == NULL) {
+			CtkWidget *dialog = ctk_message_dialog_new (NULL,
+								    CTK_DIALOG_DESTROY_WITH_PARENT,
+								    CTK_MESSAGE_ERROR,
+								    CTK_BUTTONS_OK,
+								    _
+								    ("There was an error loading an image: %s"),
+								    gerror
+								    ==
+								    NULL ?
+								    "Unknown"
+								    :
+								    gerror->message);
+			g_signal_connect (G_OBJECT (dialog), "response",
+					  G_CALLBACK (ctk_widget_destroy),
+					  NULL);
+
+			ctk_window_set_resizable (CTK_WINDOW (dialog),
+						  FALSE);
+
+			ctk_widget_show (dialog);
+			g_error_free (gerror);
+
+			return NULL;
+		}
+		xkl_debug (150,
+			   "Image %d[%s] loaded -> %p[%dx%d], alpha: %d\n",
+			   group, image_filename, image,
+			   gdk_pixbuf_get_width (image),
+			   gdk_pixbuf_get_height (image),
+			   gdk_pixbuf_get_has_alpha (image));
+
+		return image;
+	} else {
+		cairo_surface_t *cs =
+		    cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
+						globals.current_width,
+						globals.current_height);
+		unsigned char *cairo_data;
+		guchar *pixbuf_data;
+		cafekbd_status_render_cairo (cairo_create (cs), group);
+		cairo_data = cairo_image_surface_get_data (cs);
+#if 0
+		char pngfilename[20];
+		g_sprintf (pngfilename, "label%d.png", group);
+		cairo_surface_write_to_png (cs, pngfilename);
+#endif
+		pixbuf_data =
+		    g_new0 (guchar,
+			    4 * globals.real_width *
+			    globals.current_height);
+		convert_bgra_to_rgba (cairo_data, pixbuf_data,
+				      globals.current_width,
+				      globals.current_height,
+				      globals.real_width);
+
+		cairo_surface_destroy (cs);
+
+		image = gdk_pixbuf_new_from_data (pixbuf_data,
+						  GDK_COLORSPACE_RGB,
+						  TRUE,
+						  8,
+						  globals.real_width,
+						  globals.current_height,
+						  globals.real_width *
+						  4,
+						  (GdkPixbufDestroyNotify)
+						  g_free, NULL);
+		xkl_debug (150,
+			   "Image %d created -> %p[%dx%d], alpha: %d\n",
+			   group, image, gdk_pixbuf_get_width (image),
+			   gdk_pixbuf_get_height (image),
+			   gdk_pixbuf_get_has_alpha (image));
+
+		return image;
+	}
+	return NULL;
+}
+
+static void
+cafekbd_status_update_tooltips (CafekbdStatus * gki)
+{
+	XklState *state = xkl_engine_get_current_state (globals.engine);
+	gchar *buf;
+	if (state == NULL || state->group < 0
+	    || state->group >= g_strv_length (globals.full_group_names))
+		return;
+
+	buf = g_strdup_printf (globals.tooltips_format,
+			       globals.full_group_names[state->group]);
+
+	cafekbd_status_set_tooltips (gki, buf);
+	g_free (buf);
+}
+
+void
+cafekbd_status_reinit_ui (CafekbdStatus * gki)
+{
+	cafekbd_status_global_cleanup (gki);
+	cafekbd_status_global_fill (gki);
+
+	cafekbd_status_set_current_page (gki);
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+			    gchar     *key G_GNUC_UNUSED,
+			    gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "General configuration changed in settings - reiniting...\n");
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+	ForAllIndicators () {
+		cafekbd_status_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_ind_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+				gchar     *key G_GNUC_UNUSED,
+				gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "Applet configuration changed in settings - reiniting...\n");
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+
+	cafekbd_indicator_config_free_image_filenames (&globals.ind_cfg);
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	ForAllIndicators () {
+		cafekbd_status_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+static void
+cafekbd_status_load_group_names (const gchar ** layout_ids,
+			      const gchar ** variant_ids)
+{
+	if (!cafekbd_desktop_config_load_group_descriptions
+	    (&globals.cfg, globals.registry, layout_ids, variant_ids,
+	     &globals.short_group_names, &globals.full_group_names)) {
+		/* We just populate no short names (remain NULL) -
+		 * full names are going to be used anyway */
+		gint i, total_groups =
+		    xkl_engine_get_num_groups (globals.engine);
+		xkl_debug (150, "group descriptions loaded: %d!\n",
+			   total_groups);
+		globals.full_group_names =
+		    g_new0 (char *, total_groups + 1);
+
+		if (xkl_engine_get_features (globals.engine) &
+		    XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
+			gchar **lst = globals.kbd_cfg.layouts_variants;
+			for (i = 0; *lst; lst++, i++) {
+				globals.full_group_names[i] =
+				    g_strdup ((char *) *lst);
+			}
+		} else {
+			for (i = total_groups; --i >= 0;) {
+				globals.full_group_names[i] =
+				    g_strdup_printf ("Group %d", i);
+			}
+		}
+	}
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_kbd_cfg_callback (CafekbdStatus *gki G_GNUC_UNUSED)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+	xkl_debug (100,
+		   "XKB configuration changed on X Server - reiniting...\n");
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+
+	cafekbd_indicator_config_free_image_filenames (&globals.ind_cfg);
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	g_strfreev (globals.full_group_names);
+	globals.full_group_names = NULL;
+
+	if (globals.short_group_names != NULL) {
+		g_strfreev (globals.short_group_names);
+		globals.short_group_names = NULL;
+	}
+
+	cafekbd_status_load_group_names ((const gchar **) xklrec->layouts,
+				      (const gchar **) xklrec->variants);
+
+	ForAllIndicators () {
+		cafekbd_status_reinit_ui (gki);
+	} NextIndicator ();
+	g_object_unref (G_OBJECT (xklrec));
+}
+
+/* Should be called once for all applets */
+static void
+cafekbd_status_state_callback (XklEngine           *engine G_GNUC_UNUSED,
+			       XklEngineStateChange changeType,
+			       gint                 group,
+			       gboolean             restore)
+{
+	xkl_debug (150, "group is now %d, restore: %d\n", group, restore);
+
+	if (changeType == GROUP_CHANGED) {
+		ForAllIndicators () {
+			xkl_debug (200, "do repaint\n");
+			cafekbd_status_set_current_page_for_group (gki,
+								group);
+		}
+		NextIndicator ();
+	}
+}
+
+
+void
+cafekbd_status_set_current_page (CafekbdStatus * gki)
+{
+	XklState *cur_state;
+	cur_state = xkl_engine_get_current_state (globals.engine);
+	if (cur_state->group >= 0)
+		cafekbd_status_set_current_page_for_group (gki,
+							cur_state->group);
+}
+
+void
+cafekbd_status_set_current_page_for_group (CafekbdStatus * gki, int group)
+{
+	xkl_debug (200, "Revalidating for group %d\n", group);
+
+	ctk_status_icon_set_from_pixbuf (CTK_STATUS_ICON (gki),
+					 GDK_PIXBUF (g_slist_nth_data
+						     (globals.icons,
+						      group)));
+
+	cafekbd_status_update_tooltips (gki);
+}
+
+/* Should be called once for all widgets */
+static CdkFilterReturn
+cafekbd_status_filter_x_evt (CdkXEvent *xev,
+			     CdkEvent  *event G_GNUC_UNUSED)
+{
+	XEvent *xevent = (XEvent *) xev;
+
+	xkl_engine_filter_events (globals.engine, xevent);
+	switch (xevent->type) {
+	case ReparentNotify:
+		{
+			XReparentEvent *rne = (XReparentEvent *) xev;
+
+			ForAllIndicators () {
+				guint32 xid =
+				    ctk_status_icon_get_x11_window_id
+				    (CTK_STATUS_ICON (gki));
+
+				/* compare the indicator's parent window with the even window */
+				if (xid == rne->window) {
+					/* if so - make it transparent... */
+					xkl_engine_set_window_transparent
+					    (globals.engine, rne->window,
+					     TRUE);
+				}
+			}
+		NextIndicator ()}
+		break;
+	}
+	return CDK_FILTER_CONTINUE;
+}
+
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_start_listen (void)
+{
+	cdk_window_add_filter (NULL, (CdkFilterFunc)
+			       cafekbd_status_filter_x_evt, NULL);
+	cdk_window_add_filter (cdk_get_default_root_window (),
+			       (CdkFilterFunc) cafekbd_status_filter_x_evt,
+			       NULL);
+
+	xkl_engine_start_listen (globals.engine,
+				 XKLL_TRACK_KEYBOARD_STATE);
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_stop_listen (void)
+{
+	xkl_engine_stop_listen (globals.engine, XKLL_TRACK_KEYBOARD_STATE);
+
+	cdk_window_remove_filter (NULL, (CdkFilterFunc)
+				  cafekbd_status_filter_x_evt, NULL);
+	cdk_window_remove_filter
+	    (cdk_get_default_root_window (),
+	     (CdkFilterFunc) cafekbd_status_filter_x_evt, NULL);
+}
+
+static void
+cafekbd_status_size_changed (CafekbdStatus * gki, gint size)
+{
+	if (globals.current_height != size) {
+		globals.current_height = size;
+		globals.current_width = size * 3 / 2;
+		cafekbd_status_reinit_ui (gki);
+	}
+}
+
+static void
+cafekbd_status_theme_changed (CtkSettings   *settings G_GNUC_UNUSED,
+			      GParamSpec    *pspec G_GNUC_UNUSED,
+			      CafekbdStatus *gki)
+{
+	cafekbd_indicator_config_refresh_style (&globals.ind_cfg);
+	cafekbd_status_reinit_ui (gki);
+}
+
+static void
+cafekbd_status_init (CafekbdStatus * gki)
+{
+	int i;
+
+	if (!g_slist_length (globals.widget_instances))
+		cafekbd_status_global_init ();
+
+	gki->priv = g_new0 (CafekbdStatusPrivate, 1);
+
+	/* This should give NA a hint about the order */
+	/* commenting out fixes a Cdk-critical warning */
+/*	ctk_status_icon_set_name (CTK_STATUS_ICON (gki), "keyboard"); */
+
+	xkl_debug (100, "Initiating the widget startup process for %p\n",
+		   gki);
+
+	if (globals.engine == NULL) {
+		cafekbd_status_set_tooltips (gki,
+					  _("XKB initialization error"));
+		return;
+	}
+
+	cafekbd_status_set_tooltips (gki, NULL);
+
+	cafekbd_status_global_fill (gki);
+	cafekbd_status_set_current_page (gki);
+
+	/* append AFTER all initialization work is finished */
+	globals.widget_instances =
+	    g_slist_append (globals.widget_instances, gki);
+
+	g_signal_connect (gki, "size-changed",
+			  G_CALLBACK (cafekbd_status_size_changed), NULL);
+	g_signal_connect (gki, "activate",
+			  G_CALLBACK (cafekbd_status_activate), NULL);
+
+	for (i = sizeof (settings_signal_names) /
+	     sizeof (settings_signal_names[0]); --i >= 0;)
+		gki->priv->settings_signal_handlers[i] =
+		    g_signal_connect_after (ctk_settings_get_default (),
+					    settings_signal_names[i],
+					    G_CALLBACK
+					    (cafekbd_status_theme_changed),
+					    gki);
+}
+
+static void
+cafekbd_status_finalize (GObject * obj)
+{
+	int i;
+	CafekbdStatus *gki = CAFEKBD_STATUS (obj);
+	xkl_debug (100,
+		   "Starting the cafe-kbd-status widget shutdown process for %p\n",
+		   gki);
+
+	for (i = sizeof (settings_signal_names) /
+	     sizeof (settings_signal_names[0]); --i >= 0;)
+		g_signal_handler_disconnect (ctk_settings_get_default (),
+					     gki->
+					     priv->settings_signal_handlers
+					     [i]);
+
+	/* remove BEFORE all termination work is finished */
+	globals.widget_instances =
+	    g_slist_remove (globals.widget_instances, gki);
+
+	cafekbd_status_global_cleanup (gki);
+
+	xkl_debug (100,
+		   "The instance of cafe-kbd-status successfully finalized\n");
+
+	g_free (gki->priv);
+
+	G_OBJECT_CLASS (cafekbd_status_parent_class)->finalize (obj);
+
+	if (!g_slist_length (globals.widget_instances))
+		cafekbd_status_global_term ();
+}
+
+static void
+cafekbd_status_global_term (void)
+{
+	xkl_debug (100, "*** Last  CafekbdStatus instance *** \n");
+	cafekbd_status_stop_listen ();
+
+	cafekbd_desktop_config_stop_listen (&globals.cfg);
+	cafekbd_indicator_config_stop_listen (&globals.ind_cfg);
+
+	cafekbd_indicator_config_term (&globals.ind_cfg);
+	cafekbd_keyboard_config_term (&globals.kbd_cfg);
+	cafekbd_desktop_config_term (&globals.cfg);
+
+	if (g_signal_handler_is_connected
+	    (globals.engine, globals.state_changed_handler)) {
+		g_signal_handler_disconnect (globals.engine,
+					     globals.state_changed_handler);
+		globals.state_changed_handler = 0;
+	}
+	if (g_signal_handler_is_connected
+	    (globals.engine, globals.config_changed_handler)) {
+		g_signal_handler_disconnect (globals.engine,
+					     globals.config_changed_handler);
+		globals.config_changed_handler = 0;
+	}
+
+	g_object_unref (G_OBJECT (globals.registry));
+	globals.registry = NULL;
+	g_object_unref (G_OBJECT (globals.engine));
+	globals.engine = NULL;
+	xkl_debug (100, "*** Terminated globals *** \n");
+}
+
+static void
+cafekbd_status_class_init (CafekbdStatusClass * klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+	xkl_debug (100, "*** First CafekbdStatus instance *** \n");
+
+	memset (&globals, 0, sizeof (globals));
+
+	/* Initing some global vars */
+	globals.tooltips_format = "%s";
+
+	/* Initing vtable */
+	object_class->finalize = cafekbd_status_finalize;
+
+	/* Signals */
+}
+
+static void
+cafekbd_status_global_init (void)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+
+	globals.engine = xkl_engine_get_instance(CDK_DISPLAY_XDISPLAY(cdk_display_get_default()));
+
+	if (globals.engine == NULL) {
+		xkl_debug (0, "Libxklavier initialization error");
+		return;
+	}
+
+	globals.state_changed_handler =
+	    g_signal_connect (globals.engine, "X-state-changed",
+			      G_CALLBACK (cafekbd_status_state_callback),
+			      NULL);
+	globals.config_changed_handler =
+	    g_signal_connect (globals.engine, "X-config-changed",
+			      G_CALLBACK (cafekbd_status_kbd_cfg_callback),
+			      NULL);
+
+	cafekbd_desktop_config_init (&globals.cfg, globals.engine);
+	cafekbd_keyboard_config_init (&globals.kbd_cfg, globals.engine);
+	cafekbd_indicator_config_init (&globals.ind_cfg, globals.engine);
+
+	cafekbd_desktop_config_start_listen (&globals.cfg,
+					  (GCallback)
+					  cafekbd_status_cfg_changed, NULL);
+	cafekbd_indicator_config_start_listen (&globals.ind_cfg,
+					    (GCallback)
+					    cafekbd_status_ind_cfg_changed,
+					    NULL);
+
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+
+	globals.registry =
+	    xkl_config_registry_get_instance (globals.engine);
+	xkl_config_registry_load (globals.registry,
+				  globals.cfg.load_extra_items);
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	cafekbd_status_load_group_names ((const gchar **) xklrec->layouts,
+				      (const gchar **) xklrec->variants);
+	g_object_unref (G_OBJECT (xklrec));
+
+	cafekbd_status_start_listen ();
+
+	xkl_debug (100, "*** Inited globals *** \n");
+}
+
+CtkStatusIcon *
+cafekbd_status_new (void)
+{
+	return
+	    CTK_STATUS_ICON (g_object_new (cafekbd_status_get_type (), NULL));
+}
+
+/**
+ * cafekbd_status_get_xkl_engine:
+ *
+ * Returns: (transfer none): The engine shared by all CafekbdStatus objects
+ */
+XklEngine *
+cafekbd_status_get_xkl_engine ()
+{
+	return globals.engine;
+}
+
+/**
+ * cafekbd_status_get_group_names:
+ *
+ * Returns: (transfer none) (array zero-terminated=1): List of group names
+ */
+gchar **
+cafekbd_status_get_group_names ()
+{
+	return globals.full_group_names;
+}
+
+gchar *
+cafekbd_status_get_image_filename (guint group)
+{
+	if (!globals.ind_cfg.show_flags)
+		return NULL;
+	return cafekbd_indicator_config_get_images_file (&globals.ind_cfg,
+						      &globals.kbd_cfg,
+						      group);
+}
+
+void
+cafekbd_status_set_angle (CafekbdStatus * gki, gdouble angle)
+{
+	gki->priv->angle = angle;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/6.html b/2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/6.html new file mode 100644 index 0000000..5ed6ace --- /dev/null +++ b/2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/6.html @@ -0,0 +1,806 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctk/ctk.h>
+#include <stdlib.h>
+#include <string.h>
+#include <glib.h>
+#include "libcafekbd/cafekbd-keyboard-drawing.h"
+
+
+static gchar *groups = NULL;
+static gchar *levels = NULL;
+static gchar *symbols = NULL;
+static gchar *keycodes = NULL;
+static gchar *geometry = NULL;
+
+static gboolean track_config = FALSE;
+static gboolean track_modifiers = FALSE;
+static gboolean program_version = FALSE;
+
+static const GOptionEntry options[] = {
+	{"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
+	 "Keyboard groups to display, from 1-4. Up to four groups only may be "
+	 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
+	 "group1[,group2[,group3[,group4]]]"},
+	{"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
+	 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
+	 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
+	 "level1[,level2[,level3[,level4]]]"},
+	{"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
+	 "Symbols component of the keyboard. If you omit this option, it is "
+	 "obtained from the X server; that is, the keyboard that is currently "
+	 "configured is drawn. Examples: --symbols=us or "
+	 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL},
+	{"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
+	 "Keycodes component of the keyboard. If you omit this option, it is "
+	 "obtained from the X server; that is, the keyboard that is currently"
+	 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
+	 NULL},
+	{"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
+	 "Geometry xkb component. If you omit this option, it is obtained from the"
+	 " X server; that is, the keyboard that is currently configured is drawn. "
+	 "Example: --geometry=kinesis", NULL},
+	{"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
+	 "Track the current modifiers", NULL},
+	{"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
+	 "Track the server XKB configuration", NULL},
+	{"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
+	 "Show current version", NULL},
+	{NULL},
+};
+
+static gboolean
+set_groups (gchar * groups_option,
+	    CafekbdKeyboardDrawingGroupLevel * groupLevels)
+{
+	CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
+	gint cntr, g;
+
+	groupLevels[0].group =
+	    groupLevels[1].group =
+	    groupLevels[2].group = groupLevels[3].group = -1;
+
+	if (groups_option == NULL)
+		return TRUE;
+
+	for (cntr = 4; --cntr >= 0;) {
+		if (*groups_option == '\0')
+			return FALSE;
+
+		g = *groups_option - '1';
+		if (g < 0 || g >= 4)
+			return FALSE;
+
+		pgl->group = g;
+		/* printf ("group %d\n", pgl->group); */
+
+		groups_option++;
+		if (*groups_option == '\0')
+			return TRUE;
+		if (*groups_option != ',')
+			return FALSE;
+
+		groups_option++;
+		pgl++;
+	}
+
+	return TRUE;
+}
+
+static gboolean
+set_levels (gchar * levels_option,
+	    CafekbdKeyboardDrawingGroupLevel * groupLevels)
+{
+	CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
+	gint cntr, l;
+	gchar *p;
+
+	groupLevels[0].level =
+	    groupLevels[1].level =
+	    groupLevels[2].level = groupLevels[3].level = -1;
+
+	if (levels_option == NULL)
+		return TRUE;
+
+	for (cntr = 4; --cntr >= 0;) {
+		if (*levels_option == '\0')
+			return FALSE;
+
+		l = (gint) strtol (levels_option, &p, 10) - 1;
+		if (l < 0 || l >= 64)
+			return FALSE;
+
+		pgl->level = l;
+		/* printf ("level %d\n", pgl->level); */
+
+		levels_option = p;
+		if (*levels_option == '\0')
+			return TRUE;
+		if (*levels_option != ',')
+			return FALSE;
+
+		levels_option++;
+		pgl++;
+	}
+
+	return TRUE;
+}
+
+static void
+bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED,
+	     guint                   keycode)
+{
+	g_warning
+	    ("got keycode %u, which is not on your keyboard according to your configuration",
+	     keycode);
+}
+
+gint
+main (gint argc, gchar ** argv)
+{
+	CtkWidget *window;
+	CtkWidget *cafekbd_keyboard_drawing;
+	CdkScreen *screen;
+	CdkMonitor *monitor;
+	CdkRectangle rect;
+	GOptionContext *context;
+	GError *error = NULL;
+
+	CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
+	    { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
+	CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
+	    { &groupLevels[0], &groupLevels[1], &groupLevels[2],
+		&groupLevels[3]
+	};
+
+	context = g_option_context_new ("kbdraw");
+	g_option_context_add_main_entries (context, options, NULL);
+	if (!g_option_context_parse (context, &argc, &argv, &error)) {
+		g_message ("option parsing failed: %s", error->message);
+		g_option_context_free (context);
+		exit (EXIT_FAILURE);
+	}
+	g_option_context_free (context);
+
+	if (program_version) {
+		g_print ("kbdraw %s\n", VERSION);
+		exit (0);
+	}
+
+	ctk_init (&argc, &argv);
+
+	if (!set_groups (groups, groupLevels)) {
+		g_printerr ("--groups: invalid argument\n");
+		exit (1);
+	}
+
+	if (!set_levels (levels, groupLevels)) {
+		g_printerr ("--levels: invalid argument\n");
+		exit (1);
+	}
+
+	window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
+	g_signal_connect (G_OBJECT (window), "destroy",
+			  G_CALLBACK (ctk_main_quit), NULL);
+
+	screen = ctk_window_get_screen (CTK_WINDOW (window));
+	monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
+	cdk_monitor_get_geometry (monitor, &rect);
+	ctk_window_set_default_size (CTK_WINDOW (window),
+				     rect.width * 4 / 5,
+				     rect.height * 1 / 2);
+
+	ctk_widget_show (window);
+
+	cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
+	ctk_widget_show (cafekbd_keyboard_drawing);
+	ctk_container_add (CTK_CONTAINER (window), cafekbd_keyboard_drawing);
+
+	cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING
+						 (cafekbd_keyboard_drawing),
+						 pgroupLevels);
+
+	if (track_modifiers)
+		cafekbd_keyboard_drawing_set_track_modifiers
+		    (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing), TRUE);
+	if (track_config)
+		cafekbd_keyboard_drawing_set_track_config
+		    (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing), TRUE);
+	g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",
+			  G_CALLBACK (bad_keycode), NULL);
+
+	if (symbols || geometry || keycodes) {
+		XkbComponentNamesRec names;
+		gint success;
+
+		memset (&names, '\0', sizeof (names));
+
+		if (symbols)
+			names.symbols = symbols;
+		else
+			names.symbols = (gchar *)
+			    cafekbd_keyboard_drawing_get_symbols
+			    (CAFEKBD_KEYBOARD_DRAWING
+			     (cafekbd_keyboard_drawing));
+
+		if (keycodes)
+			names.keycodes = keycodes;
+		else
+			names.keycodes = (gchar *)
+			    cafekbd_keyboard_drawing_get_keycodes
+			    (CAFEKBD_KEYBOARD_DRAWING
+			     (cafekbd_keyboard_drawing));
+
+		if (geometry)
+			names.geometry = geometry;
+		else
+			names.geometry = (gchar *)
+			    cafekbd_keyboard_drawing_get_geometry
+			    (CAFEKBD_KEYBOARD_DRAWING
+			     (cafekbd_keyboard_drawing));
+
+		success =
+		    cafekbd_keyboard_drawing_set_keyboard
+		    (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing),
+		     &names);
+		if (!success) {
+			g_printerr
+			    ("\nError loading new keyboard description with components:\n\n"
+			     "  keycodes:  %s\n" "  types:     %s\n"
+			     "  compat:    %s\n" "  symbols:   %s\n"
+			     "  geometry:  %s\n\n", names.keycodes,
+			     names.types, names.compat, names.symbols,
+			     names.geometry);
+			exit (1);
+		}
+	}
+
+	ctk_widget_grab_focus (cafekbd_keyboard_drawing);
+
+	ctk_main ();
+
+	return 0;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/7.html b/2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/7.html new file mode 100644 index 0000000..8122587 --- /dev/null +++ b/2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/7.html @@ -0,0 +1,358 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+
+#include "libxklavier/xklavier.h"
+#include "libcafekbd/cafekbd-status.h"
+
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include <cdk/cdk.h>
+#include <cdk/cdkx.h>
+#include <glib/gi18n.h>
+#include <ctk/ctk.h>
+
+#include "X11/XKBlib.h"
+
+int
+main (int argc, char **argv)
+{
+	CtkStatusIcon *icon;<--- Variable 'icon' can be declared as pointer to const
+
+	bindtextdomain (GETTEXT_PACKAGE, CAFELOCALEDIR);
+	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+	textdomain (GETTEXT_PACKAGE);
+
+	ctk_init (&argc, &argv);
+
+	icon = cafekbd_status_new ();
+
+        if (icon == NULL)
+	{
+		return 1;
+	}
+
+	ctk_main ();
+
+	return 0;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/commitmsg b/2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/commitmsg new file mode 100644 index 0000000..891e4bf --- /dev/null +++ b/2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/commitmsg @@ -0,0 +1 @@ +Release 2.0.0 diff --git a/2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/index.html b/2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/index.html new file mode 100644 index 0000000..1040930 --- /dev/null +++ b/2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/index.html @@ -0,0 +1,242 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LineIdCWESeverityMessage
checkersReportinformationActive checkers: There was critical errors (use --checkers-report=<filename> to see details)
libcafekbd/cafekbd-desktop-config.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
libcafekbd/cafekbd-indicator-config.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
libcafekbd/cafekbd-indicator.c
66unknownMacroerrorThere is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
libcafekbd/cafekbd-keyboard-config.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
67knownConditionTrueFalse571styleCondition '*l1' is always true
67knownConditionTrueFalse571styleCondition '*l2' is always true
226constVariablePointer398styleVariable 'delim' can be declared as pointer to const
227knownConditionTrueFalse571styleCondition 'option!=NULL' is always true
282knownConditionTrueFalse570styleCondition 'variant==NULL' is always false
609constParameterPointer398styleParameter 'kbd_config' can be declared as pointer to const
libcafekbd/cafekbd-keyboard-drawing.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
61constParameterPointer398styleParameter 'context' can be declared as pointer to const
67constParameterPointer398styleParameter 'context' can be declared as pointer to const
625constParameterPointer398styleParameter 'context' can be declared as pointer to const
1026constVariablePointer398styleVariable 'runp' can be declared as pointer to const
1036constVariablePointer398styleVariable 'geometry' can be declared as pointer to const
1202constParameterPointer398styleParameter 'outline' can be declared as pointer to const
1397constVariablePointer398styleVariable 'shape' can be declared as pointer to const
1786constParameterCallback398styleParameter 'drawing' can be declared as pointer to const. However it seems that 'button_press_event' is a callback function, if 'drawing' is declared with const you might also need to cast function pointer(s).
1823constParameterCallback398styleParameter 'event' can be declared as pointer to const. However it seems that 'focus_event' is a callback function, if 'event' is declared with const you might also need to cast function pointer(s).
1838constParameterCallback398styleParameter 'a' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'a' is declared with const you might also need to cast function pointer(s).
1839constParameterCallback398styleParameter 'b' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'b' is declared with const you might also need to cast function pointer(s).
1863constVariablePointer398styleVariable 'pind' can be declared as pointer to const
2124constParameterPointer398styleParameter 'iev' can be declared as pointer to const
libcafekbd/cafekbd-status.c
82unknownMacroerrorThere is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
test/cafekbd-keyboard-drawing-test.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
test/cafekbd-status-test.c
42constVariablePointer398styleVariable 'icon' can be declared as pointer to const
+
+ +
+ + diff --git a/2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/output_28c310f42d337eadca7386aeed5be91417c339a2 b/2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/output_28c310f42d337eadca7386aeed5be91417c339a2 new file mode 100644 index 0000000..006a2f8 --- /dev/null +++ b/2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/output_28c310f42d337eadca7386aeed5be91417c339a2 @@ -0,0 +1,1866 @@ +Checking libcafekbd/cafekbd-desktop-config.c ... +libcafekbd/cafekbd-desktop-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +1/10 files checked 4% done +Checking libcafekbd/cafekbd-indicator-config.c ... +libcafekbd/cafekbd-indicator-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +2/10 files checked 10% done +Checking libcafekbd/cafekbd-indicator.c ... +libcafekbd/cafekbd-indicator.c:66:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdIndicator, cafekbd_indicator, CTK_TYPE_NOTEBOOK) +^ +3/10 files checked 24% done +Checking libcafekbd/cafekbd-keyboard-config.c ... +libcafekbd/cafekbd-keyboard-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-config.c:67:8: style: Condition '*l1' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:67:15: style: Condition '*l2' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:227:16: style: Condition 'option!=NULL' is always true [knownConditionTrueFalse] + (option != NULL) ? strchr (option, ':') : NULL; + ^ +libcafekbd/cafekbd-keyboard-config.c:282:18: style: Condition 'variant==NULL' is always false [knownConditionTrueFalse] + (variant == + ^ +libcafekbd/cafekbd-keyboard-config.c:226:10: style: Variable 'delim' can be declared as pointer to const [constVariablePointer] + char *delim = + ^ +libcafekbd/cafekbd-keyboard-config.c:609:65: style: Parameter 'kbd_config' can be declared as pointer to const [constParameterPointer] +cafekbd_keyboard_config_options_is_set (CafekbdKeyboardConfig * kbd_config, + ^ +4/10 files checked 36% done +Checking libcafekbd/cafekbd-keyboard-drawing.c ... +libcafekbd/cafekbd-keyboard-drawing.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-drawing.c:61:60: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_coord (CafekbdKeyboardDrawingRenderContext * context, gint n) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:67:61: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_double (CafekbdKeyboardDrawingRenderContext * context, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:625:51: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +set_markup (CafekbdKeyboardDrawingRenderContext * context, gchar *txt) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1026:11: style: Variable 'runp' can be declared as pointer to const [constVariablePointer] + GSList *runp; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1036:25: style: Variable 'geometry' can be declared as pointer to const [constVariablePointer] + PangoGlyphGeometry *geometry; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1202:39: style: Parameter 'outline' can be declared as pointer to const [constParameterPointer] +calc_origin_offset_x (XkbOutlineRec * outline) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1397:15: style: Variable 'shape' can be declared as pointer to const [constVariablePointer] + XkbShapeRec *shape; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: style: Parameter 'drawing' can be declared as pointer to const. However it seems that 'button_press_event' is a callback function, if 'drawing' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2343:18: note: You might need to cast the function pointer here + G_CALLBACK (button_press_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: note: Parameter 'drawing' can be declared as pointer to const + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: style: Parameter 'event' can be declared as pointer to const. However it seems that 'focus_event' is a callback function, if 'event' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2347:18: note: You might need to cast the function pointer here + G_CALLBACK (focus_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: note: Parameter 'event' can be declared as pointer to const + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: style: Parameter 'a' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'a' is declared with const you might also need to cast function pointer(s). [constParameterCallback] +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: note: Parameter 'a' can be declared as pointer to const +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: style: Parameter 'b' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'b' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: note: Parameter 'b' can be declared as pointer to const + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1863:9: style: Variable 'pind' can be declared as pointer to const [constVariablePointer] + Atom *pind = drawing->xkb->names->indicators; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2124:60: style: Parameter 'iev' can be declared as pointer to const [constParameterPointer] +process_indicators_state_notify (XkbIndicatorNotifyEvent * iev, + ^ +Checking libcafekbd/cafekbd-keyboard-drawing.c: KBDRAW_DEBUG... +5/10 files checked 77% done +Checking libcafekbd/cafekbd-status.c ... +libcafekbd/cafekbd-status.c:82:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdStatus, cafekbd_status, CTK_TYPE_STATUS_ICON) +^ +6/10 files checked 91% done +Checking libcafekbd/cafekbd-util.c ... +7/10 files checked 93% done +Checking test/cafekbd-indicator-test.c ... +8/10 files checked 94% done +Checking test/cafekbd-keyboard-drawing-test.c ... +test/cafekbd-keyboard-drawing-test.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +Checking test/cafekbd-keyboard-drawing-test.c: HAVE_CONFIG_H... +9/10 files checked 99% done +Checking test/cafekbd-status-test.c ... +test/cafekbd-status-test.c:42:17: style: Variable 'icon' can be declared as pointer to const [constVariablePointer] + CtkStatusIcon *icon; + ^ +10/10 files checked 100% done +nofile:0:0: information: Active checkers: There was critical errors (use --checkers-report= to see details) [checkersReport] + +/usr/bin/cafe-autogen +checking for autoreconf >= 2.53... + testing autoreconf... found 2.72 +checking for pkg-config >= 0.14.0... + testing pkg-config... found 1.8.1 +checking for cafe-common >= 0.0.1... + testing cafe-doc-common... found 2.0.0 +Checking for required M4 macros... +Checking for forbidden M4 macros... +Processing ./configure.ac +Running cafe-doc-common... +Running autoreconf... +autoreconf: export WARNINGS=no-portability +autoreconf: Entering directory '.' +autoreconf: running: autopoint --force +Copying file ABOUT-NLS +Copying file config.rpath +Copying file m4/codeset.m4 +Copying file m4/extern-inline.m4 +Copying file m4/fcntl-o.m4 +Copying file m4/gettext.m4 +Copying file m4/glibc2.m4 +Copying file m4/glibc21.m4 +Copying file m4/iconv.m4 +Copying file m4/intdiv0.m4 +Copying file m4/intl.m4 +Copying file m4/intldir.m4 +Copying file m4/intlmacosx.m4 +Copying file m4/intmax.m4 +Copying file m4/inttypes-pri.m4 +Copying file m4/inttypes_h.m4 +Copying file m4/lcmessage.m4 +Copying file m4/lib-ld.m4 +Copying file m4/lib-link.m4 +Copying file m4/lib-prefix.m4 +Copying file m4/lock.m4 +Copying file m4/longlong.m4 +Copying file m4/nls.m4 +Copying file m4/po.m4 +Copying file m4/printf-posix.m4 +Copying file m4/progtest.m4 +Copying file m4/size_max.m4 +Copying file m4/stdint_h.m4 +Copying file m4/threadlib.m4 +Copying file m4/uintmax_t.m4 +Copying file m4/visibility.m4 +Copying file m4/wchar_t.m4 +Copying file m4/wint_t.m4 +Copying file m4/xsize.m4 +Copying file po/Makefile.in.in +Copying file po/Makevars.template +Copying file po/Rules-quot +Copying file po/boldquot.sed +Copying file po/en@boldquot.header +Copying file po/en@quot.header +Copying file po/insert-header.sin +Copying file po/quot.sed +Copying file po/remove-potcdate.sin +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: configure.ac: tracing +autoreconf: running: libtoolize --copy --force +libtoolize: putting auxiliary files in '.'. +libtoolize: copying file './ltmain.sh' +libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. +libtoolize: copying file 'm4/libtool.m4' +libtoolize: copying file 'm4/ltoptions.m4' +libtoolize: copying file 'm4/ltsugar.m4' +libtoolize: copying file 'm4/ltversion.m4' +libtoolize: copying file 'm4/lt~obsolete.m4' +autoreconf: configure.ac: not using Intltool +autoreconf: configure.ac: not using Gtkdoc +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: running: /usr/bin/autoconf --force +autoreconf: running: /usr/bin/autoheader --force +autoreconf: running: automake --add-missing --copy --force-missing +configure.ac:31: installing './compile' +configure.ac:34: installing './config.guess' +configure.ac:34: installing './config.sub' +configure.ac:16: installing './install-sh' +configure.ac:16: installing './missing' +Makefile.am: installing './INSTALL' +libcafekbd/Makefile.am: installing './depcomp' +autoreconf: Leaving directory '.' +Skipping configure process. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +checking for a BSD-compatible install... /usr/bin/install -c +checking whether sleep supports fractional seconds... yes +checking filesystem timestamp resolution... 0.01 +checking whether build environment is sane... yes +checking for a race-free mkdir -p... /usr/bin/mkdir -p +checking for gawk... no +checking for mawk... mawk +checking whether make sets $(MAKE)... yes +checking whether make supports nested variables... yes +checking xargs -n works... yes +checking whether make supports the include directive... yes (GNU style) +checking for gcc... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the C compiler works... yes +checking for C compiler default output file name... a.out +checking for suffix of executables... +checking whether we are cross compiling... no +checking for suffix of object files... o +checking whether the compiler supports GNU C... yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... rm: cannot remove 'conftest.plist': Is a directory +yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... gcc3 +checking whether C compiler accepts -Werror=unknown-warning-option... no +checking whether C compiler accepts -Wall... yes +checking whether C compiler accepts -Wmissing-prototypes... yes +checking whether C compiler accepts -Wbad-function-cast... yes +checking whether C compiler accepts -Wcast-align... yes +checking whether C compiler accepts -Wextra... yes +checking whether C compiler accepts -Wformat-nonliteral... yes +checking whether C compiler accepts -Wmissing-declarations... yes +checking whether C compiler accepts -Wnested-externs... yes +checking whether C compiler accepts -Wpointer-arith... yes +checking whether C compiler accepts -Wredundant-decls... yes +checking whether C compiler accepts -Wshadow... yes +checking whether C compiler accepts -Wstrict-prototypes... yes +checking whether C compiler accepts -Wunused-macros... yes +checking whether C compiler accepts -Werror=format-security... yes +checking whether C compiler accepts -fstrict-aliasing... yes +checking flags to pass to the C compiler /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing +checking for gcc... (cached) /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the compiler supports GNU C... (cached) yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... (cached) yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... (cached) none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... (cached) yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... (cached) gcc3 +checking build system type... x86_64-pc-linux-gnu +checking host system type... x86_64-pc-linux-gnu +checking how to print strings... printf +checking for a sed that does not truncate output... /usr/bin/sed +checking for grep that handles long lines and -e... /usr/bin/grep +checking for egrep... /usr/bin/grep -E +checking for fgrep... /usr/bin/grep -F +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld +checking if the linker (/usr/bin/ld) is GNU ld... yes +checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B +checking the name lister (/usr/bin/nm -B) interface... rm: cannot remove 'conftest.plist': Is a directory +BSD nm +checking whether ln -s works... yes +checking the maximum length of command line arguments... 3145728 +checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop +checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop +checking for /usr/bin/ld option to reload object files... -r +checking for file... file +checking for objdump... objdump +checking how to recognize dependent libraries... pass_all +checking for dlltool... no +checking how to associate runtime and link libraries... printf %s\n +checking for ranlib... ranlib +checking for ar... ar +checking for archiver @FILE support... rm: cannot remove 'conftest.plist': Is a directory +@ +checking for strip... strip +checking command to parse /usr/bin/nm -B output from /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer object... rm: cannot remove 'conftest.plist': Is a directory +ok +checking for sysroot... no +checking for a working dd... /usr/bin/dd +checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1 +checking for mt... no +checking if : is a manifest tool... no +checking for stdio.h... yes +checking for stdlib.h... yes +checking for string.h... yes +checking for inttypes.h... yes +checking for stdint.h... yes +checking for strings.h... yes +checking for sys/stat.h... yes +checking for sys/types.h... yes +checking for unistd.h... yes +checking for dlfcn.h... yes +checking for objdir... .libs +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -fno-rtti -fno-exceptions... no +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to produce PIC... -fPIC -DPIC +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer PIC flag -fPIC -DPIC works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer static flag -static works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... (cached) yes +checking whether the /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes +checking whether -lc should be explicitly linked in... no +checking dynamic linker characteristics... GNU/Linux ld.so +checking how to hardcode library paths into programs... immediate +checking whether stripping libraries is possible... yes +checking if libtool supports shared libraries... yes +checking whether to build shared libraries... yes +checking whether to build static libraries... yes +checking whether NLS is requested... yes +checking for msgfmt... /usr/bin/msgfmt +checking for gmsgfmt... /usr/bin/msgfmt +checking for xgettext... /usr/bin/xgettext +checking for msgmerge... /usr/bin/msgmerge +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld -m elf_x86_64 +checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes +checking for shared library run path origin... done +checking how to run the C preprocessor... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer -E +checking for egrep -e... (cached) /usr/bin/grep -E +checking for CFPreferencesCopyAppValue... no +checking for CFLocaleCopyCurrent... no +checking for GNU gettext in libc... yes +checking whether to use NLS... yes +checking where the gettext function comes from... libc +checking for glib-compile-resources... /usr/bin/glib-compile-resources +checking for xmllint... /usr/bin/xmllint +checking for setlocale... yes +checking for pkg-config... /usr/bin/pkg-config +checking pkg-config is at least version 0.9.0... yes +checking for glib-2.0 >= 2.50.0... yes +checking for gmodule-2.0... yes +checking for gio-2.0 >= 2.25.0... yes +checking for cdk-3.0 >= 3.22.0... yes +checking for ctk+-3.0 >= 3.22.0 cdk-x11-3.0 >= 3.22.0... yes +checking for libxklavier >= 5.2... yes +checking for X... libraries , headers +checking for gethostbyname... yes +checking for connect... yes +checking for remove... yes +checking for shmat... yes +checking for IceConnectionNumber in -lICE... yes +checking for pkg-config... (cached) /usr/bin/pkg-config +checking pkg-config is at least version 0.16... yes +checking for library containing sqrt... -lm +checking for gobject-introspection... yes +checking that generated files are newer than configure... done +configure: creating ./config.status +config.status: creating Makefile +config.status: creating libcafekbd.pc +config.status: creating libcafekbdui.pc +config.status: creating po/Makefile.in +config.status: creating libcafekbd/Makefile +config.status: creating libcafekbd/org.cafe.peripherals-keyboard-xkb.gschema.xml +config.status: creating test/Makefile +config.status: creating config.h +config.status: executing depfiles commands +config.status: executing libtool commands +config.status: executing po-directories commands +config.status: creating po/POTFILES +config.status: creating po/Makefile + +Configuration: + + prefix: /usr + exec_prefix: ${prefix} + libdir: ${exec_prefix}/lib + bindir: ${exec_prefix}/bin + sbindir: ${exec_prefix}/sbin + sysconfdir: ${prefix}/etc + datadir: ${datarootdir} + source code location: . + compiler: /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer + cflags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + Warning flags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + +scan-build: Analysis run complete. +scan-build: Removing directory '/tmp/scan-build-2025-02-06-165341-11857-1' because it contains no reports. +scan-build: No bugs found. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +make all-recursive +make[1]: Entering directory '/rootdir' +Making all in po +make[2]: Entering directory '/rootdir/po' +make libcafekbd.pot-update +make[3]: Entering directory '/rootdir/po' +sed -e '/^#/d' remove-potcdate.sin > t-remove-potcdate.sed +mv t-remove-potcdate.sed remove-potcdate.sed +package_gnu=""; \ +test -n "$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L .. -maxdepth 1 -type f \ + -size -10000000c -exec grep 'GNU libcafekbd' \ + /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU libcafekbd' ../* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ +}; \ +if test "$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ +else \ + package_prefix=''; \ +fi; \ +if test -n '' || test 'https://github.com/cafe-desktop/libcafekbd' = '@'PACKAGE_BUGREPORT'@'; then \ + msgid_bugs_address=''; \ +else \ + msgid_bugs_address='https://github.com/cafe-desktop/libcafekbd'; \ +fi; \ +case `/usr/bin/xgettext --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ + *) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --package-name="${package_prefix}libcafekbd" \ + --package-version='2.0.0' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ +esac +test ! -f libcafekbd.po || { \ + if test -f ./libcafekbd.pot-header; then \ + sed -e '1,/^#$/d' < libcafekbd.po > libcafekbd.1po && \ + cat ./libcafekbd.pot-header libcafekbd.1po > libcafekbd.po; \ + rm -f libcafekbd.1po; \ + fi; \ + if test -f ./libcafekbd.pot; then \ + sed -f remove-potcdate.sed < ./libcafekbd.pot > libcafekbd.1po && \ + sed -f remove-potcdate.sed < libcafekbd.po > libcafekbd.2po && \ + if cmp libcafekbd.1po libcafekbd.2po >/dev/null 2>&1; then \ + rm -f libcafekbd.1po libcafekbd.2po libcafekbd.po; \ + else \ + rm -f libcafekbd.1po libcafekbd.2po ./libcafekbd.pot && \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ + else \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ +} +make[3]: Leaving directory '/rootdir/po' +test ! -f ./libcafekbd.pot || \ + test -z "af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo" || make af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo +make[3]: Entering directory '/rootdir/po' +/usr/bin/msgmerge --update --quiet --lang=af af.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=an an.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=am am.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ar ar.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=as as.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ast ast.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=az az.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bg bg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn bn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=be be.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn_IN bn_IN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=br br.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bs bs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca ca.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca@valencia ca@valencia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cmn cmn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=crh crh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cs cs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cv cv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=csb csb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cy cy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=da da.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de de.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de_CH de_CH.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=dz dz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=el el.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_AU en_AU.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_CA en_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_GB en_GB.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eo eo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_419 es_419.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es es.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CL es_CL.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_AR es_AR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CO es_CO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CR es_CR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_DO es_DO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_EC es_EC.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_MX es_MX.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_ES es_ES.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_NI es_NI.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PA es_PA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PE es_PE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PR es_PR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_SV es_SV.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_US es_US.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_UY es_UY.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_VE es_VE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=et et.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fa fa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eu eu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fi fi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fil fil.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fo fo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr_CA fr_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr fr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fur fur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=frp frp.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fy fy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ga ga.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gd gd.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gl gl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gu gu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ha ha.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hi hi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=he he.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hr hr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hu hu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hy hy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ia ia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=id id.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ie ie.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ig ig.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=is is.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=it it.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ja ja.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=jv jv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ka ka.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kk kk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kab kab.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kn kn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ko ko.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=km km.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ks ks.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku ku.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku_IQ ku_IQ.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=la la.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ky ky.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lb lb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=li li.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lo lo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lv lv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lt lt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mai mai.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mg mg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mi mi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mk mk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mn mn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ml ml.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mr mr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ms ms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=my my.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nah nah.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nb nb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nds nds.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ne ne.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nl nl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nqo nqo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nn nn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nso nso.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=oc oc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=om om.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=or or.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pa pa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pl pl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pms pms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ps ps.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt pt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt_BR pt_BR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ro ro.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ru ru.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sc sc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=rw rw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sco sco.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=si si.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sk sk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sl sl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=so so.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sq sq.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr sr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr@latin sr@latin.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sw sw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sv sv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ta ta.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=te te.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tg tg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=th th.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tk tk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tl tl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tr tr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ts ts.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tt tt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ug ug.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur ur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uk uk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur_PK ur_PK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=vi vi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uz uz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=wa wa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=xh xh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yi yi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yo yo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_CN zh_CN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_HK zh_HK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_TW zh_TW.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zu zu.po libcafekbd.pot +rm -f af.gmo && /usr/bin/msgfmt -c --statistics --verbose -o af.gmo af.po +rm -f am.gmo && /usr/bin/msgfmt -c --statistics --verbose -o am.gmo am.po +af.po: 7 translated messages, 84 untranslated messages. +rm -f ar.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ar.gmo ar.po +rm -f as.gmo && /usr/bin/msgfmt -c --statistics --verbose -o as.gmo as.po +rm -f an.gmo && /usr/bin/msgfmt -c --statistics --verbose -o an.gmo an.po +am.po: 54 translated messages, 37 untranslated messages. +an.po:7: warning: header field 'Last-Translator' still has the initial default value +an.po: 0 translated messages, 91 untranslated messages. +rm -f ast.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ast.gmo ast.po +ar.po: 50 translated messages, 41 untranslated messages. +as.po: 41 translated messages, 50 untranslated messages. +rm -f az.gmo && /usr/bin/msgfmt -c --statistics --verbose -o az.gmo az.po +rm -f be.gmo && /usr/bin/msgfmt -c --statistics --verbose -o be.gmo be.po +ast.po: 47 translated messages, 44 untranslated messages. +rm -f bn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn.gmo bn.po +rm -f bg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bg.gmo bg.po +rm -f bn_IN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn_IN.gmo bn_IN.po +be.po: 46 translated messages, 45 untranslated messages. +az.po: 9 translated messages, 82 untranslated messages. +bg.po: 54 translated messages, 37 untranslated messages. +bn.po: 43 translated messages, 48 untranslated messages. +rm -f br.gmo && /usr/bin/msgfmt -c --statistics --verbose -o br.gmo br.po +rm -f bs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bs.gmo bs.po +bn_IN.po: 41 translated messages, 50 untranslated messages. +rm -f ca.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca.gmo ca.po +rm -f ca@valencia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca@valencia.gmo ca@valencia.po +bs.po: 25 translated messages, 66 untranslated messages. +br.po: 20 translated messages, 71 untranslated messages. +rm -f cmn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cmn.gmo cmn.po +ca.po: 87 translated messages, 4 untranslated messages. +ca@valencia.po: 54 translated messages, 37 untranslated messages. +rm -f cs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cs.gmo cs.po +rm -f crh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o crh.gmo crh.po +cmn.po: rm -f csb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o csb.gmo csb.po +46 translated messages, 45 untranslated messages. +rm -f cv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cv.gmo cv.po +crh.po: 11 translated messages, 80 untranslated messages. +cs.po: 81 translated messages, 10 untranslated messages. +csb.po:7: warning: header field 'Last-Translator' still has the initial default value +rm -f cy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cy.gmo cy.po +csb.po: 0 translated messages, 91 untranslated messages. +rm -f da.gmo && /usr/bin/msgfmt -c --statistics --verbose -o da.gmo da.po +cv.po: 0 translated messages, 91 untranslated messages. +rm -f de.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de.gmo de.po +rm -f de_CH.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de_CH.gmo de_CH.po +cy.po: 26 translated messages, 65 untranslated messages. +da.po: 91 translated messages. +de.po: 76 translated messages, 15 untranslated messages. +rm -f dz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o dz.gmo dz.po +de_CH.po: 0 translated messages, 91 untranslated messages. +rm -f el.gmo && /usr/bin/msgfmt -c --statistics --verbose -o el.gmo el.po +rm -f en_AU.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_AU.gmo en_AU.po +rm -f en_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_CA.gmo en_CA.po +dz.po: 39 translated messages, 52 untranslated messages. +rm -f en_GB.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_GB.gmo en_GB.po +en_AU.po: 54 translated messages, 37 untranslated messages. +el.po: 54 translated messages, 37 untranslated messages. +rm -f eo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eo.gmo eo.po +en_CA.po: 10 translated messages, 81 untranslated messages. +en_GB.po: 54 translated messages, 37 untranslated messages. +rm -f es.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es.gmo es.po +rm -f es_419.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_419.gmo es_419.po +eo.po: 52 translated messages, 39 untranslated messages. +rm -f es_AR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_AR.gmo es_AR.po +rm -f es_CL.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CL.gmo es_CL.po +es_419.po: 0 translated messages, 91 untranslated messages. +es.po: 89 translated messages, 2 untranslated messages. +rm -f es_CO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CO.gmo es_CO.po +es_CL.po: 3 translated messages, 88 untranslated messages. +es_AR.po: 21 translated messages, 70 untranslated messages. +rm -f es_CR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CR.gmo es_CR.po +rm -f es_DO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_DO.gmo es_DO.po +rm -f es_ES.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_ES.gmo es_ES.po +rm -f es_EC.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_EC.gmo es_EC.po +es_CR.po: 1 translated message, 90 untranslated messages. +es_CO.po: 49 translated messages, 42 untranslated messages. +es_DO.po: 1 translated message, 90 untranslated messages. +es_EC.po: 1 translated message, 90 untranslated messages. +es_ES.po: 1 translated message, 90 untranslated messages. +rm -f es_MX.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_MX.gmo es_MX.po +rm -f es_PA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PA.gmo es_PA.po +rm -f es_NI.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_NI.gmo es_NI.po +rm -f es_PE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PE.gmo es_PE.po +rm -f es_PR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PR.gmo es_PR.po +es_MX.po: 1 translated message, 90 untranslated messages. +es_PA.po: 1 translated message, 90 untranslated messages. +es_PE.po: 1 translated message, 90 untranslated messages. +es_NI.po: 1 translated message, 90 untranslated messages. +rm -f es_SV.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_SV.gmo es_SV.po +rm -f es_US.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_US.gmo es_US.po +es_PR.po: 1 translated message, 90 untranslated messages. +rm -f es_UY.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_UY.gmo es_UY.po +rm -f es_VE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_VE.gmo es_VE.po +es_SV.po: 1 translated message, 90 untranslated messages. +rm -f et.gmo && /usr/bin/msgfmt -c --statistics --verbose -o et.gmo et.po +es_US.po: 0 translated messages, 91 untranslated messages. +es_UY.po: 1 translated message, 90 untranslated messages. +rm -f eu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eu.gmo eu.po +es_VE.po: 1 translated message, 90 untranslated messages. +et.po: rm -f fa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fa.gmo fa.po +54 translated messages, 37 untranslated messages. +rm -f fi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fi.gmo fi.po +rm -f fil.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fil.gmo fil.po +eu.po: 54 translated messages, 37 untranslated messages. +fa.po: 11 translated messages, 80 untranslated messages. +fi.po: 48 translated messages, 43 untranslated messages. +rm -f fo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fo.gmo fo.po +rm -f fr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr.gmo fr.po +fil.po: 0 translated messages, 91 untranslated messages. +rm -f fr_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr_CA.gmo fr_CA.po +rm -f frp.gmo && /usr/bin/msgfmt -c --statistics --verbose -o frp.gmo frp.po +fo.po: 0 translated messages, 91 untranslated messages. +rm -f fur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fur.gmo fur.po +fr.po: 67 translated messages, 24 untranslated messages. +frp.po: 7 translated messages, 84 untranslated messages. +rm -f fy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fy.gmo fy.po +fr_CA.po: 3 translated messages, 88 untranslated messages. +fur.po: 4 translated messages, 87 untranslated messages. +rm -f ga.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ga.gmo ga.po +fy.po: 4 translated messagesrm -f gl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gl.gmo gl.po +, 87 untranslated messages. +rm -f gd.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gd.gmo gd.po +rm -f gu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gu.gmo gu.po +gd.po: 0 translated messages, 91 untranslated messages. +gl.po: 89 translated messages, 2 untranslated messages. +ga.po: 41 translated messages, 50 untranslated messages. +rm -f ha.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ha.gmo ha.po +rm -f he.gmo && /usr/bin/msgfmt -c --statistics --verbose -o he.gmo he.po +gu.po: 43 translated messages, 48 untranslated messages. +ha.po: 5 translated messages, 86 untranslated messages. +rm -f hi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hi.gmo hi.po +rm -f hr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hr.gmo hr.po +he.po: 54 translated messages, 37 untranslated messages. +rm -f hu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hu.gmo hu.po +rm -f hy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hy.gmo hy.po +hr.po: 54 translated messages, 37 untranslated messages. +hi.po: 45 translated messages, 46 untranslated messages. +rm -f ia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ia.gmo ia.po +hy.po: 54 translated messages, 37 untranslated messages. +hu.po: 54 translated messages, 37 untranslated messages. +ia.po: 3 translated messages, 88 untranslated messages. +rm -f id.gmo && /usr/bin/msgfmt -c --statistics --verbose -o id.gmo id.po +rm -f ie.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ie.gmo ie.po +rm -f ig.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ig.gmo ig.po +rm -f is.gmo && /usr/bin/msgfmt -c --statistics --verbose -o is.gmo is.po +id.po: 91 translated messages. +rm -f it.gmo && /usr/bin/msgfmt -c --statistics --verbose -o it.gmo it.po +ie.po: 45 translated messages, 46 untranslated messages. +ig.po: 5 translated messages, 86 untranslated messages. +is.po: 12 translated messages, 79 untranslated messages. +rm -f ja.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ja.gmo ja.po +rm -f ka.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ka.gmo ka.po +rm -f jv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o jv.gmo jv.po +it.po: 91 translated messages. +rm -f kab.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kab.gmo kab.po +ja.po: 54 translated messages, 37 untranslated messages. +jv.po: 2 translated messages, 89 untranslated messagesrm -f kk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kk.gmo kk.po +. +ka.po: 37 translated messages, 54 untranslated messages. +rm -f km.gmo && /usr/bin/msgfmt -c --statistics --verbose -o km.gmo km.po +kab.po: 4 translated messages, 87 untranslated messages. +rm -f kn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kn.gmo kn.po +rm -f ko.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ko.gmo ko.po +kk.po: 24 translated messages, 67 untranslated messages. +rm -f ks.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ks.gmo ks.po +km.po:7: warning: header field 'Last-Translator' still has the initial default value +km.po: 0 translated messages, 91 untranslated messages. +ko.po: 54 translated messages, 37 untranslated messages. +rm -f ku.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku.gmo ku.po +kn.po: 43 translated messages, 48 untranslated messages. +rm -f ku_IQ.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku_IQ.gmo ku_IQ.po +ks.po: 3 translated messages, 88 untranslated messages. +rm -f ky.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ky.gmo ky.po +rm -f la.gmo && /usr/bin/msgfmt -c --statistics --verbose -o la.gmo la.po +ku.po: 10 translated messages, 81 untranslated messages. +rm -f lb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lb.gmo lb.po +ku_IQ.po: 16 translated messages, 75 untranslated messages. +ky.po: 26 translated messages, 65 untranslated messages. +rm -f li.gmo && /usr/bin/msgfmt -c --statistics --verbose -o li.gmo li.po +la.po: 2 translated messages, 89 untranslated messages. +rm -f lo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lo.gmo lo.po +lb.po:7: warning: header field 'Last-Translator' still has the initial default value +lb.po: 0 translated messages, 91 untranslated messages. +rm -f lt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lt.gmo lt.po +li.po:7: warning: header field 'Last-Translator' still has the initial default value +li.po: 0 translated messages, 91 untranslated messages. +rm -f lv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lv.gmo lv.po +lo.po:7: warning: header field 'Last-Translator' still has the initial default value +lo.po: 0 translated messages, 91 untranslated messages. +rm -f mai.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mai.gmo mai.po +lt.po: 91 translated messages. +rm -f mg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mg.gmo mg.po +mai.po: 18 translated messages, 73 untranslated messages. +lv.po: 49 translated messages, 42 untranslated messages. +rm -f mi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mi.gmo mi.po +rm -f mk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mk.gmo mk.po +rm -f mn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mn.gmo mn.po +mg.po: 10 translated messages, 81 untranslated messages. +rm -f ml.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ml.gmo ml.po +mi.po:7: warning: header field 'Last-Translator' still has the initial default value +mi.po: 0 translated messages, 91 untranslated messages. +mk.po: 39 translated messages, 52 untranslated messages. +mn.po: 10 translated messages, 81 untranslated messages. +rm -f mr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mr.gmo mr.po +rm -f ms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ms.gmo ms.po +ml.po: 41 translated messages, 50 untranslated messages. +rm -f my.gmo && /usr/bin/msgfmt -c --statistics --verbose -o my.gmo my.po +ms.po: 91 translated messages. +rm -f nah.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nah.gmo nah.po +mr.po: 47 translated messages, 44 untranslated messages. +rm -f nb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nb.gmo nb.po +my.po:7: warning: header field 'Last-Translator' still has the initial default value +my.po: 0 translated messages, 91 untranslated messages. +rm -f nds.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nds.gmo nds.po +nah.po: 0 translated messages, 91 untranslated messages. +nb.po: 91 translated messages. +rm -f ne.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ne.gmo ne.po +rm -f nl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nl.gmo nl.po +rm -f nn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nn.gmo nn.po +nds.po: 12 translated messages, 79 untranslated messages. +nl.po: 91 translated messages. +rm -f nqo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nqo.gmo nqo.po +ne.po: 13 translated messages, 78 untranslated messages. +nn.po: 40 translated messages, 51 untranslated messages. +rm -f nso.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nso.gmo nso.po +rm -f oc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o oc.gmo oc.po +rm -f om.gmo && /usr/bin/msgfmt -c --statistics --verbose -o om.gmo om.po +nqo.po: 0 translated messages, 91 untranslated messages. +rm -f or.gmo && /usr/bin/msgfmt -c --statistics --verbose -o or.gmo or.po +nso.po: oc.po: 68 translated messages, 23 untranslated messages. +3 translated messages, 88 untranslated messages. +om.po: 0 translated messages, 91 untranslated messages. +rm -f pa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pa.gmo pa.po +rm -f pms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pms.gmo pms.po +rm -f pl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pl.gmo pl.po +or.po: 41 translated messages, 50 untranslated messages. +rm -f ps.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ps.gmo ps.po +pms.po: 3 translated messages, 88 untranslated messages. +pl.po: 55 translated messages, 36 untranslated messages. +pa.po: 46 translated messages, 45 untranslated messages. +rm -f pt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt.gmo pt.po +rm -f pt_BR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt_BR.gmo pt_BR.po +ps.po: 6 translated messages, 85 untranslated messages. +rm -f ro.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ro.gmo ro.po +rm -f ru.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ru.gmo ru.po +rm -f rw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o rw.gmo rw.po +pt_BR.po: 58 translated messages, 33 untranslated messages. +pt.po: 84 translated messages, 7 untranslated messages. +ro.po: 54 translated messages, 37 untranslated messages. +ru.po: 89 translated messages, 2 untranslated messages. +rm -f sco.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sco.gmo sco.po +rm -f sc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sc.gmo sc.po +rw.po: 10 translated messages, 81 untranslated messages. +rm -f si.gmo && /usr/bin/msgfmt -c --statistics --verbose -o si.gmo si.po +rm -f sk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sk.gmo sk.po +rm -f sl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sl.gmo sl.po +sco.po: 0 translated messages, 91 untranslated messages. +sc.po: 2 translated messages, 89 untranslated messages. +sk.po: 54 translated messages, 37 untranslated messages. +si.po: 36 translated messages, 55 untranslated messages. +sl.po: 55 translated messages, 36 untranslated messages. +rm -f so.gmo && /usr/bin/msgfmt -c --statistics --verbose -o so.gmo so.po +rm -f sq.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sq.gmo sq.po +rm -f sr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr.gmo sr.po +rm -f sr@latin.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr@latin.gmo sr@latin.po +rm -f sv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sv.gmo sv.po +so.po: 0 translated messages, 91 untranslated messages. +sq.po: 52 translated messages, 39 untranslated messages. +sr@latin.po: 46 translated messages, 45 untranslated messages. +sr.po: 91 translated messages. +rm -f sw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sw.gmo sw.po +rm -f te.gmo && /usr/bin/msgfmt -c --statistics --verbose -o te.gmo te.po +rm -f ta.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ta.gmo ta.po +sv.po: 80 translated messages, 11 untranslated messages. +rm -f tg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tg.gmo tg.po +te.po: 41 translated messages, 50 untranslated messages. +sw.po: 0 translated messages, 91 untranslated messages. +ta.po: 46 translated messages, 45 untranslated messages. +tg.po: 0 translated messages, 91 untranslated messages. +rm -f th.gmo && /usr/bin/msgfmt -c --statistics --verbose -o th.gmo th.po +rm -f tk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tk.gmo tk.po +rm -f tl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tl.gmo tl.po +rm -f tr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tr.gmo tr.po +tl.po: 0 translated messagesth.po: 45 translated messages, 46 untranslated messages. +, 91 untranslated messages. +tk.po: 7 translated messages, 84 untranslated messages. +rm -f ts.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ts.gmo ts.po +tr.po: 58 translated messages, 33 untranslated messages. +rm -f tt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tt.gmo tt.po +ts.po: 0 translated messages, 91 untranslated messages. +rm -f uk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uk.gmo uk.po +rm -f ug.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ug.gmo ug.po +rm -f ur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur.gmo ur.po +tt.po:7: warning: header field 'Last-Translator' still has the initial default value +tt.po: 0 translated messages, 91 untranslated messages. +rm -f ur_PK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur_PK.gmo ur_PK.po +ug.po: 6 translated messages, 85 untranslated messages. +uk.po: 58 translated messages, 33 untranslated messages. +rm -f uz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uz.gmo uz.po +ur.po: 7 translated messages, 84 untranslated messages. +rm -f vi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o vi.gmo vi.po +ur_PK.po:7: warning: rm -f wa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o wa.gmo wa.po +header field 'Last-Translator' still has the initial default value +ur_PK.po: 0 translated messages, 91 untranslated messages. +uz.po: 26 translated messages, 65 untranslated messages. +rm -f xh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o xh.gmo xh.po +vi.po: 52 translated messages, 39 untranslated messages. +wa.po: 9 translated messages, 82 untranslated messages. +rm -f yi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yi.gmo yi.po +rm -f yo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yo.gmo yo.po +xh.po: 8 translated messages, 83 untranslated messages. +rm -f zh_CN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_CN.gmo zh_CN.po +yi.po:7: warning: header field 'Last-Translator' still has the initial default value +rm -f zh_HK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_HK.gmo zh_HK.po +yi.po: 0 translated messages, 91 untranslated messages. +yo.po: 5 translated messages, 86 untranslated messages. +rm -f zh_TW.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_TW.gmo zh_TW.po +zh_HK.po: 47 translated messages, 44 untranslated messages. +zh_CN.po: 63 translated messages, 28 untranslated messages. +rm -f zu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zu.gmo zu.po +zh_TW.po: 91 translated messages. +zu.po: 3 translated messages, 88 untranslated messages. +make[3]: Leaving directory '/rootdir/po' +touch stamp-po +make[2]: Leaving directory '/rootdir/po' +Making all in libcafekbd +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml + GEN cafekbd-indicator-marshal.h + GEN cafekbd-keyboard-drawing-marshal.h +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... +INFO: Reading ./cafekbd-indicator-marshal.list... + GEN cafekbd-indicator-marshal.c + GEN cafekbd-keyboard-drawing-marshal.c +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... +INFO: Reading ./cafekbd-indicator-marshal.list... +make all-am +make[3]: Entering directory '/rootdir/libcafekbd' + CC libcafekbd_la-cafekbd-desktop-config.lo + CC libcafekbd_la-cafekbd-keyboard-config.lo + CC libcafekbd_la-cafekbd-util.lo + CC libcafekbdui_la-cafekbd-indicator-config.lo + CC libcafekbdui_la-cafekbd-indicator.lo +cafekbd-desktop-config.c: In function 'cafekbd_desktop_config_load_from_gsettings': +cafekbd-desktop-config.c:176:38: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 176 | || config->default_group >= + | ^~ +cafekbd-indicator.c: In function 'cafekbd_indicator_extract_layout_name': +cafekbd-indicator.c:293:19: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 293 | if (group < g_strv_length (short_group_names)) { + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_prepare_drawing': +cafekbd-indicator.c:418:31: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 418 | if (group + 1 == + | ^~ +cafekbd-indicator.c: In function 'cafekbd_indicator_update_tooltips': +cafekbd-indicator.c:446:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 446 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-indicator.c:450:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 450 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-indicator.c: In function 'cafekbd_indicator_kbd_cfg_callback': +cafekbd-indicator.c:61:44: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 61 | CafekbdIndicator * gki = (CafekbdIndicator*)cur->data; + | ^~~ +cafekbd-indicator.c:561:9: note: in expansion of macro 'ForAllIndicators' + 561 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-indicator.c:539:55: note: shadowed declaration is here + 539 | cafekbd_indicator_kbd_cfg_callback (CafekbdIndicator *gki G_GNUC_UNUSED) +cafekbd-indicator.c: In function 'cafekbd_indicator_start_listen': +cafekbd-indicator.c:647:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 647 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:650:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 650 | (CdkFilterFunc) + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_stop_listen': +cafekbd-indicator.c:663:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 663 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:667:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 667 | (CdkFilterFunc) cafekbd_indicator_filter_x_evt, NULL); + | ^ +cafekbd-indicator-config.c: In function 'cafekbd_indicator_config_get_images_file': +cafekbd-indicator-config.c:152:59: warning: comparison of integer expressions of different signedness: 'guint' {aka 'unsigned int'} and 'int' [-Wsign-compare] + 152 | (g_strv_length (kbd_config->layouts_variants) > group)) { + | ^ + CC libcafekbdui_la-cafekbd-status.lo +cafekbd-status.c: In function 'cafekbd_status_render_cairo': +cafekbd-status.c:214:23: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 214 | if (group + 1 == xkl_engine_get_num_groups (globals.engine)) { + | ^~ +cafekbd-status.c: In function 'cafekbd_status_prepare_drawing': +cafekbd-status.c:376:51: warning: cast between incompatible function types from 'void (*)(void *)' to 'void (*)(guchar *, void *)' {aka 'void (*)(unsigned char *, void *)'} [-Wcast-function-type] + 376 | (GdkPixbufDestroyNotify) + | ^ +cafekbd-status.c: In function 'cafekbd_status_update_tooltips': +cafekbd-status.c:395:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 395 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-status.c:399:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 399 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-status.c: In function 'cafekbd_status_kbd_cfg_callback': +cafekbd-status.c:77:41: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 77 | CafekbdStatus * gki = (CafekbdStatus*)cur->data; + | ^~~ +cafekbd-status.c:508:9: note: in expansion of macro 'ForAllIndicators' + 508 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-status.c:484:49: note: shadowed declaration is here + 484 | cafekbd_status_kbd_cfg_callback (CafekbdStatus *gki G_GNUC_UNUSED) +cafekbd-status.c: In function 'cafekbd_status_start_listen': +cafekbd-status.c:594:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 594 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:597:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 597 | (CdkFilterFunc) cafekbd_status_filter_x_evt, + | ^ +cafekbd-status.c: In function 'cafekbd_status_stop_listen': +cafekbd-status.c:610:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 610 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:614:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 614 | (CdkFilterFunc) cafekbd_status_filter_x_evt, NULL); + | ^ + CC libcafekbdui_la-cafekbd-indicator-marshal.lo +cafekbd-indicator-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ + CC libcafekbdui_la-cafekbd-keyboard-drawing-marshal.lo +cafekbd-keyboard-drawing-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + CC libcafekbdui_la-cafekbd-keyboard-drawing.lo +cafekbd-keyboard-drawing.c: In function 'draw_polygon': +cafekbd-keyboard-drawing.c:322:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 322 | for (i = 0; i < num_points; i++) { + | ^ +cafekbd-keyboard-drawing.c: In function 'process_indicators_state_notify': +cafekbd-keyboard-drawing.c:2131:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'long unsigned int' [-Wsign-compare] + 2131 | for (i = 0; i <= drawing->xkb->indicators->phys_indicators; i++) + | ^~ +cafekbd-keyboard-drawing.c: In function 'cafekbd_keyboard_drawing_get_type': +cafekbd-keyboard-drawing.c:2394:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawingClass *)' {aka 'void (*)(struct _CafekbdKeyboardDrawingClass *)'} to 'void (*)(void *, void *)' [-Wcast-function-type] + 2394 | (GClassInitFunc) cafekbd_keyboard_drawing_class_init, + | ^ +cafekbd-keyboard-drawing.c:2399:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawing *)' {aka 'void (*)(struct _CafekbdKeyboardDrawing *)'} to 'void (*)(GTypeInstance *, void *)' {aka 'void (*)(struct _GTypeInstance *, void *)'} [-Wcast-function-type] + 2399 | (GInstanceInitFunc) cafekbd_keyboard_drawing_init, + | ^ + GEN org.cafe.peripherals-keyboard-xkb.gschema.valid + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:114:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 114 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbd.la + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspecthn0d3wzv/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspecthn0d3wzv/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspecthn0d3wzv/Cafekbd-1.0.c:239:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 239 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspecthn0d3wzv/Cafekbd-1.0.c:246:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 246 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspecthn0d3wzv/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +5 warnings generated. + GICOMP Cafekbd-1.0.gir +make[3]: Leaving directory '/rootdir/libcafekbd' +make[2]: Leaving directory '/rootdir/libcafekbd' +Making all in test +make[2]: Entering directory '/rootdir/test' + CC cafekbd_indicator_test-cafekbd-indicator-test.o + CC cafekbd_keyboard_drawing_test-cafekbd-keyboard-drawing-test.o + CC cafekbd_status_test-cafekbd-status-test.o + CCLD cafekbd-indicator-test + CCLD cafekbd-status-test +cafekbd-keyboard-drawing-test.c:187:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 187 | g_print ("kbdraw %s\n", VERSION); + | ^~~~~~~ +cafekbd-keyboard-drawing-test.c:194:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 194 | g_printerr ("--groups: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:199:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 199 | g_printerr ("--levels: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:225:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 225 | cafekbd_keyboard_drawing_set_track_modifiers + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:228:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 228 | cafekbd_keyboard_drawing_set_track_config + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:248:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 248 | names.keycodes = keycodes; + | ^~~~~~~~ +cafekbd-keyboard-drawing-test.c:256:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 256 | names.geometry = geometry; + | ^~~~~~~~ +7 warnings generated. + CCLD cafekbd-keyboard-drawing-test +make[2]: Leaving directory '/rootdir/test' +make[2]: Entering directory '/rootdir' +make[2]: Leaving directory '/rootdir' +make[1]: Leaving directory '/rootdir' +scan-build: Analysis run complete. +scan-build: 11 bugs found. +scan-build: Run 'scan-view /rootdir/html-report/2025-02-06-165351-14522-1' to examine bug reports. +Making check in po +make[1]: Entering directory '/rootdir/po' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/po' +Making check in libcafekbd +make[1]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +make check-am +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:113:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 113 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspect9cnfrk36/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspect9cnfrk36/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspect9cnfrk36/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +3 warnings generated. + GICOMP Cafekbd-1.0.gir +make[2]: Leaving directory '/rootdir/libcafekbd' +make[1]: Leaving directory '/rootdir/libcafekbd' +Making check in test +make[1]: Entering directory '/rootdir/test' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/test' +make[1]: Entering directory '/rootdir' +make[1]: Leaving directory '/rootdir' + Listing... 0% Listing... 0% Listing... 0% adduser/testing,now 3.137 all [installed,automatic] +advaita-icon-theme/unknown,now 3.25.0-1 all [installed,automatic] +apt/testing,now 2.9.26 amd64 [installed,automatic] +aptitude-common/testing,now 0.8.13-6.1 all [installed,automatic] +aptitude/testing,now 0.8.13-6.1 amd64 [installed] +at-spi2-common/testing,now 2.55.0.1-1 all [installed,automatic] +at-spi2-core/testing,now 2.55.0.1-1 amd64 [installed,automatic] +autoconf-archive/testing,now 20220903-3 all [installed] +autoconf/testing,now 2.72-3 all [installed,automatic] +automake/testing,now 1:1.17-3 all [installed,automatic] +autopoint/testing,now 0.23.1-1 all [installed] +autotools-dev/testing,now 20220109.1 all [installed,automatic] +base-files/testing,now 13.6 amd64 [installed,automatic] +base-passwd/testing,now 3.6.6 amd64 [installed,automatic] +bash/testing,now 5.2.37-1 amd64 [installed,automatic] +binfmt-support/testing,now 2.2.2-7 amd64 [installed,automatic] +binutils-common/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils-gold-x86-64-linux-gnu/testing,now 2.44-1 amd64 [installed,automatic] +binutils-gold/testing,now 2.44-1 amd64 [installed,automatic] +binutils-x86-64-linux-gnu/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +bsdutils/testing,now 1:2.40.4-2 amd64 [installed,automatic] +build-essential/testing,now 12.12 amd64 [installed,automatic] +bzip2-doc/testing,now 1.0.8-6 all [installed,automatic] +bzip2/testing,now 1.0.8-6 amd64 [installed,automatic] +ca-certificates/testing,now 20241223 all [installed,automatic] +clang-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools/testing,now 1:19.0-63 amd64 [installed] +clang/testing,now 1:19.0-63 amd64 [installed] +coreutils/testing,now 9.5-1+b1 amd64 [installed,automatic] +cpp-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-14/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cpp/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cppcheck/testing,now 2.16.0-1 amd64 [installed] +ctk-update-icon-cache/unknown,now 3.25.6-1 amd64 [installed,automatic] +dash/testing,now 0.5.12-12 amd64 [installed,automatic] +dbus-bin/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-daemon/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-session-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-system-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-user-session/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus/testing,now 1.16.0-1 amd64 [installed,automatic] +dconf-gsettings-backend/testing,now 0.40.0-5 amd64 [installed,automatic] +dconf-service/testing,now 0.40.0-5 amd64 [installed,automatic] +debconf/testing,now 1.5.89 all [installed,automatic] +debian-archive-keyring/testing,now 2023.4 all [installed,automatic] +debianutils/testing,now 5.21 amd64 [installed,automatic] +diffutils/testing,now 1:3.10-2 amd64 [installed,automatic] +dirmngr/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +dmsetup/testing,now 2:1.02.201-1 amd64 [installed,automatic] +dpkg-dev/testing,now 1.22.14 all [installed,automatic] +dpkg/testing,now 1.22.14 amd64 [installed,automatic] +e2fsprogs/testing,now 1.47.2-1 amd64 [installed,automatic] +expect/testing,now 5.45.4-3+b1 amd64 [installed] +fakeroot/testing,now 1.37-1 amd64 [installed,automatic] +file/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +findutils/testing,now 4.10.0-3 amd64 [installed,automatic] +fontconfig-config/testing,now 2.15.0-2 amd64 [installed,automatic] +fontconfig/testing,now 2.15.0-2 amd64 [installed,automatic] +fonts-dejavu-core/testing,now 2.37-8 all [installed,automatic] +fonts-dejavu-mono/testing,now 2.37-8 all [installed,automatic] +g++-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-14/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +g++/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc-14-base/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gettext-base/testing,now 0.23.1-1 amd64 [installed,automatic] +gettext/testing,now 0.23.1-1 amd64 [installed] +gir1.2-atk-1.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-atspi-2.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-ctk-3.0/unknown,now 3.25.6-1 amd64 [installed] +gir1.2-freedesktop-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-freedesktop/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-gdkpixbuf-2.0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +gir1.2-girepository-2.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-girepository-2.0/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-glib-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-glib-2.0/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-harfbuzz-0.0/testing,now 10.2.0-1 amd64 [installed,automatic] +gir1.2-pango-1.0/testing,now 1.56.1-1 amd64 [installed,automatic] +gir1.2-xkl-1.0/testing,now 5.4-5+b2 amd64 [installed,automatic] +girepository-tools/testing,now 2.82.4-2 amd64 [installed,automatic] +git-man/testing,now 1:2.47.2-0.1 all [installed,automatic] +git/testing,now 1:2.47.2-0.1 amd64 [installed] +gnupg-l10n/testing,now 2.2.46-1 all [installed,automatic] +gnupg-utils/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gnupg/testing,now 2.2.46-1 all [installed,automatic] +gobject-introspection-bin/testing,now 1.82.0-4 amd64 [installed,automatic] +gobject-introspection/testing,now 1.82.0-4 amd64 [installed] +gpg-agent/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg-wks-client/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgconf/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgsm/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgv/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +grep/testing,now 3.11-4 amd64 [installed,automatic] +gsettings-desktop-schemas/testing,now 47.1-1 all [installed,automatic] +gzip/testing,now 1.13-1 amd64 [installed,automatic] +hicolor-icon-theme/testing,now 0.18-2 all [installed,automatic] +hostname/testing,now 3.25 amd64 [installed,automatic] +icu-devtools/testing,now 72.1-6 amd64 [installed,automatic] +init-system-helpers/testing,now 1.68 all [installed,automatic] +krb5-locales/testing,now 1.21.3-4 all [installed,automatic] +less/testing,now 643-1 amd64 [installed,automatic] +lib32gcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +lib32stdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libacl1/testing,now 2.3.2-2+b1 amd64 [installed,automatic] +libalgorithm-diff-perl/testing,now 1.201-1 all [installed,automatic] +libalgorithm-diff-xs-perl/testing,now 0.04-8+b4 amd64 [installed,automatic] +libalgorithm-merge-perl/testing,now 0.08-5 all [installed,automatic] +libapparmor1/testing,now 3.1.7-1+b3 amd64 [installed,automatic] +libapt-pkg6.0t64/testing,now 2.9.26 amd64 [installed,automatic] +libasan8/testing,now 14.2.0-12 amd64 [installed,automatic] +libassuan9/testing,now 3.0.1-2 amd64 [installed,automatic] +libatk-bridge2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk-bridge2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatomic1/testing,now 14.2.0-12 amd64 [installed,automatic] +libatspi2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatspi2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libattr1/testing,now 1:2.5.2-2 amd64 [installed,automatic] +libaudit-common/testing,now 1:4.0.2-2 all [installed,automatic] +libaudit1/testing,now 1:4.0.2-2+b1 amd64 [installed,automatic] +libavahi-client3/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common-data/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common3/testing,now 0.8-16 amd64 [installed,automatic] +libbinutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libblkid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libblkid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libboost-iostreams1.83.0/testing,now 1.83.0-4 amd64 [installed,automatic] +libbrotli-dev/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbrotli1/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbsd0/testing,now 0.12.2-2 amd64 [installed,automatic] +libbz2-1.0/testing,now 1.0.8-6 amd64 [installed,automatic] +libbz2-dev/testing,now 1.0.8-6 amd64 [installed,automatic] +libc-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc-dev-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc6-dev/testing,now 2.40-6 amd64 [installed,automatic] +libc6-i386/testing,now 2.40-6 amd64 [installed,automatic] +libc6/testing,now 2.40-6 amd64 [installed,automatic] +libcairo-gobject2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo-script-interpreter2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2-dev/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcap-dev/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcap-ng0/testing,now 0.8.5-4 amd64 [installed,automatic] +libcap2/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcbor0.10/testing,now 0.10.2-2 amd64 [installed,automatic] +libcc1-0/testing,now 14.2.0-12 amd64 [installed,automatic] +libclang-common-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-cpp19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-rt-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang1-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libcolord2/testing,now 1.4.7-1+b2 amd64 [installed,automatic] +libcom-err2/testing,now 1.47.2-1 amd64 [installed,automatic] +libcrypt-dev/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcrypt1/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcryptsetup12/testing,now 2:2.7.5-1 amd64 [installed,automatic] +libctf-nobfd0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctf0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctk-3-0/unknown,now 3.25.6-1 amd64 [installed] +libctk-3-bin/unknown,now 3.25.6-1 amd64 [installed,automatic] +libctk-3-common/unknown,now 3.25.6-1 all [installed] +libctk-3-dev/unknown,now 3.25.6-1 amd64 [installed] +libcups2t64/testing,now 2.4.10-2+b1 amd64 [installed,automatic] +libcurl3t64-gnutls/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcurl4t64/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcwidget4/testing,now 0.5.18-6+b2 amd64 [installed,automatic] +libdatrie-dev/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdatrie1/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdav1d7/testing,now 1.5.1-1 amd64 [installed,automatic] +libdb5.3t64/testing,now 5.3.28+dfsg2-9 amd64 [installed,automatic] +libdbus-1-3/testing,now 1.16.0-1 amd64 [installed,automatic] +libdbus-1-dev/testing,now 1.16.0-1 amd64 [installed,automatic] +libdconf1/testing,now 0.40.0-5 amd64 [installed,automatic] +libdebconfclient0/testing,now 0.277 amd64 [installed,automatic] +libdeflate-dev/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdeflate0/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdevmapper1.02.1/testing,now 2:1.02.201-1 amd64 [installed,automatic] +libdpkg-perl/testing,now 1.22.14 all [installed,automatic] +libdrm-amdgpu1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-common/testing,now 2.4.123-1 all [installed,automatic] +libdrm-intel1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-radeon1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm2/testing,now 2.4.123-1 amd64 [installed,automatic] +libedit2/testing,now 3.1-20250104-1 amd64 [installed,automatic] +libegl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libegl-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1-mesa-dev/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libelf1t64/testing,now 0.192-4 amd64 [installed,automatic] +libepoxy-dev/testing,now 1.5.10-2 amd64 [installed,automatic] +libepoxy0/testing,now 1.5.10-2 amd64 [installed,automatic] +liberror-perl/testing,now 0.17029-2 all [installed,automatic] +libexpat1-dev/testing,now 2.6.4-1 amd64 [installed,automatic] +libexpat1/testing,now 2.6.4-1 amd64 [installed,automatic] +libext2fs2t64/testing,now 1.47.2-1 amd64 [installed,automatic] +libfakeroot/testing,now 1.37-1 amd64 [installed,automatic] +libffi-dev/testing,now 3.4.6-1 amd64 [installed,automatic] +libffi8/testing,now 3.4.6-1 amd64 [installed,automatic] +libfido2-1/testing,now 1.15.0-1+b1 amd64 [installed,automatic] +libfile-fcntllock-perl/testing,now 0.22-4+b4 amd64 [installed,automatic] +libfontconfig-dev/testing,now 2.15.0-2 amd64 [installed,automatic] +libfontconfig1/testing,now 2.15.0-2 amd64 [installed,automatic] +libfreetype-dev/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfreetype6/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfribidi-dev/testing,now 1.0.16-1 amd64 [installed,automatic] +libfribidi0/testing,now 1.0.16-1 amd64 [installed,automatic] +libgbm1/testing,now 24.2.8-1 amd64 [installed,automatic] +libgc1/testing,now 1:8.2.8-1 amd64 [installed,automatic] +libgcc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcrypt20/testing,now 1.11.0-7 amd64 [installed,automatic] +libgdbm-compat4t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdbm6t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-dev/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-bin/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-common/testing,now 2.42.12+dfsg-2 all [installed,automatic] +libgio-2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libgio-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository-1.0-1/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-1.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-2.0-0/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository1.0-dev/testing,now 1.82.0-4 amd64 [installed] +libgl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgl1-mesa-dri/testing,now 24.2.8-1 amd64 [installed,automatic] +libgl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglapi-mesa/testing,now 24.2.8-1 amd64 [installed,automatic] +libgles-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles2/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglib2.0-0t64/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-data/testing,now 2.82.4-2 all [installed,automatic] +libglib2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-dev/testing,now 2.82.4-2 amd64 [installed] +libglvnd-core-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libglx0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgmp10/testing,now 2:6.3.0+dfsg-3 amd64 [installed,automatic] +libgnutls30t64/testing,now 3.8.8-2 amd64 [installed,automatic] +libgomp1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgpg-error-l10n/testing,now 1.51-3 all [installed,automatic] +libgpg-error0/testing,now 1.51-3 amd64 [installed,automatic] +libgpm2/testing,now 1.20.7-11+b2 amd64 [installed,automatic] +libgprofng0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libgraphite2-3/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgraphite2-dev/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgssapi-krb5-2/testing,now 1.21.3-4 amd64 [installed,automatic] +libharfbuzz-cairo0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-dev/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-gobject0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-icu0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-subset0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz0b/testing,now 10.2.0-1 amd64 [installed,automatic] +libhogweed6t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libhwasan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libice-dev/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libice6/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libicu-dev/testing,now 72.1-6 amd64 [installed,automatic] +libicu72/testing,now 72.1-6 amd64 [installed,automatic] +libidn2-0/testing,now 2.3.7-2+b1 amd64 [installed,automatic] +libisl23/testing,now 0.27-1 amd64 [installed,automatic] +libitm1/testing,now 14.2.0-12 amd64 [installed,automatic] +libjansson4/testing,now 2.14-2+b3 amd64 [installed,automatic] +libjbig-dev/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjbig0/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjpeg-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjson-c5/testing,now 0.18+ds-1 amd64 [installed,automatic] +libk5crypto3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkeyutils1/testing,now 1.6.3-4 amd64 [installed,automatic] +libkmod2/testing,now 33+20240816-2 amd64 [installed,automatic] +libkrb5-3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkrb5support0/testing,now 1.21.3-4 amd64 [installed,automatic] +libksba8/testing,now 1.6.7-2+b1 amd64 [installed,automatic] +liblcms2-2/testing,now 2.16-2 amd64 [installed,automatic] +libldap-common/testing,now 2.6.9+dfsg-1 all [installed,automatic] +libldap2/testing,now 2.6.9+dfsg-1 amd64 [installed,automatic] +liblerc-dev/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +liblerc4/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +libllvm19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +liblocale-gettext-perl/testing,now 1.07-7+b1 amd64 [installed,automatic] +liblsan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libltdl-dev/testing,now 2.5.4-3 amd64 [installed,automatic] +libltdl7/testing,now 2.5.4-3 amd64 [installed,automatic] +liblz4-1/testing,now 1.10.0-3 amd64 [installed,automatic] +liblzma-dev/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzma5/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzo2-2/testing,now 2.10-3+b1 amd64 [installed,automatic] +libmagic-mgc/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmagic1t64/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmd0/testing,now 1.1.0-2+b1 amd64 [installed,automatic] +libmount-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libmount1/testing,now 2.40.4-2 amd64 [installed,automatic] +libmpc3/testing,now 1.3.1-1+b3 amd64 [installed,automatic] +libmpfr6/testing,now 4.2.1-1+b2 amd64 [installed,automatic] +libncurses-dev/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncurses6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncursesw6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libnettle8t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libnghttp2-14/testing,now 1.64.0-1 amd64 [installed,automatic] +libnghttp3-9/testing,now 1.6.0-2 amd64 [installed,automatic] +libngtcp2-16/testing,now 1.9.1-1 amd64 [installed,automatic] +libngtcp2-crypto-gnutls8/testing,now 1.9.1-1 amd64 [installed,automatic] +libnpth0t64/testing,now 1.8-2 amd64 [installed,automatic] +libnss-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libobjc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libobjc4/testing,now 14.2.0-12 amd64 [installed,automatic] +libopengl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libopengl0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libp11-kit0/testing,now 0.25.5-3 amd64 [installed,automatic] +libpam-modules-bin/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-modules/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-runtime/testing,now 1.7.0-2 all [installed,automatic] +libpam-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libpam0g/testing,now 1.7.0-2 amd64 [installed,automatic] +libpango-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpango1.0-dev/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangocairo-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoft2-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoxft-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpciaccess0/testing,now 0.17-3+b3 amd64 [installed,automatic] +libpcre2-16-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-32-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-8-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-dev/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-posix3/testing,now 10.44-5 amd64 [installed,automatic] +libperl5.40/testing,now 5.40.0-8 amd64 [installed,automatic] +libpfm4/testing,now 4.13.0+git83-g91970fe-1 amd64 [installed,automatic] +libpipeline1/testing,now 1.5.8-1 amd64 [installed,automatic] +libpixman-1-0/testing,now 0.44.0-3 amd64 [installed,automatic] +libpixman-1-dev/testing,now 0.44.0-3 amd64 [installed,automatic] +libpkgconf3/testing,now 1.8.1-4 amd64 [installed,automatic] +libpng-dev/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng-tools/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng16-16t64/testing,now 1.6.44-3 amd64 [installed,automatic] +libproc2-0/testing,now 2:4.0.4-7 amd64 [installed,automatic] +libpsl5t64/testing,now 0.21.2-1.1+b1 amd64 [installed,automatic] +libpython3-stdlib/testing,now 3.13.1-2 amd64 [installed,automatic] +libpython3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libpython3.13-stdlib/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libquadmath0/testing,now 14.2.0-12 amd64 [installed,automatic] +libreadline8t64/testing,now 8.2-6 amd64 [installed,automatic] +librsvg2-2/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librsvg2-common/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librtmp1/testing,now 2.4+20151223.gitfa8646d.1-2+b5 amd64 [installed,automatic] +libsasl2-2/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules-db/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libseccomp2/testing,now 2.5.5-2 amd64 [installed,automatic] +libselinux1-dev/testing,now 3.7-3.1 amd64 [installed,automatic] +libselinux1/testing,now 3.7-3.1 amd64 [installed,automatic] +libsemanage-common/testing,now 3.7-2.1 all [installed,automatic] +libsemanage2/testing,now 3.7-2.1 amd64 [installed,automatic] +libsensors-config/testing,now 1:3.6.0-10 all [installed,automatic] +libsensors5/testing,now 1:3.6.0-10+b1 amd64 [installed,automatic] +libsepol-dev/testing,now 3.7-1 amd64 [installed,automatic] +libsepol2/testing,now 3.7-1 amd64 [installed,automatic] +libsframe1/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libsharpyuv-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsharpyuv0/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsigc++-2.0-0v5/testing,now 2.12.1-3 amd64 [installed,automatic] +libsm-dev/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsm6/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsmartcols1/testing,now 2.40.4-2 amd64 [installed,automatic] +libsqlite3-0/testing,now 3.46.1-1 amd64 [installed,automatic] +libss2/testing,now 1.47.2-1 amd64 [installed,automatic] +libssh2-1t64/testing,now 1.11.1-1 amd64 [installed,automatic] +libssl3t64/testing,now 3.4.0-2 amd64 [installed,automatic] +libstdc++-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libstdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libsysprof-capture-4-dev/testing,now 47.2-1 amd64 [installed,automatic] +libsystemd-dev/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd-shared/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd0/testing,now 257.2-3 amd64 [installed,automatic] +libtasn1-6/testing,now 4.19.0-3+b3 amd64 [installed,automatic] +libtcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +libthai-data/testing,now 0.1.29-2 all [installed,automatic] +libthai-dev/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libthai0/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libtiff-dev/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiff6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiffxx6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtinfo6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libtinyxml2-10/testing,now 10.0.0+dfsg-2+b2 amd64 [installed,automatic] +libtool/testing,now 2.5.4-3 all [installed] +libtsan2/testing,now 14.2.0-12 amd64 [installed,automatic] +libubsan1/testing,now 14.2.0-12 amd64 [installed,automatic] +libudev1/testing,now 257.2-3 amd64 [installed,automatic] +libunistring5/testing,now 1.3-1 amd64 [installed,automatic] +libuuid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libvulkan1/testing,now 1.4.304.0-1 amd64 [installed,automatic] +libwayland-bin/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-client0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-cursor0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-dev/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-egl1/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-server0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwebp-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebp7/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdecoder3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdemux2/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpmux3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libx11-6/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-data/testing,now 2:1.8.10-2 all [installed,automatic] +libx11-dev/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-xcb1/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libxapian30/testing,now 1.4.25-2 amd64 [installed,automatic] +libxau-dev/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxau6/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxaw7/testing,now 2:1.0.16-1 amd64 [installed,automatic] +libxcb-dri2-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-dri3-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-glx0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-present0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-randr0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-sync1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-xfixes0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcomposite-dev/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcomposite1/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcursor-dev/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxcursor1/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxdamage-dev/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdamage1/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdmcp-dev/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxdmcp6/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxext-dev/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxext6/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxfixes-dev/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxfixes3/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxft-dev/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxft2/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxi-dev/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxi6/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxinerama-dev/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxinerama1/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxkbcommon-dev/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbcommon0/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbfile1/testing,now 1:1.1.0-1+b4 amd64 [installed,automatic] +libxklavier-dev/testing,now 5.4-5+b2 amd64 [installed] +libxklavier16/testing,now 5.4-5+b2 amd64 [installed,automatic] +libxml2-dev/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxml2-utils/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed] +libxml2/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxmu6/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxmuu1/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxpm4/testing,now 1:3.5.17-1+b3 amd64 [installed,automatic] +libxrandr-dev/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrandr2/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrender-dev/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxrender1/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxshmfence1/testing,now 1.3-1+b3 amd64 [installed,automatic] +libxt6t64/testing,now 1:1.2.1-1.2+b2 amd64 [installed,automatic] +libxtst-dev/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxtst6/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxxf86vm1/testing,now 1:1.1.4-1+b4 amd64 [installed,automatic] +libxxhash0/testing,now 0.8.2-2+b2 amd64 [installed,automatic] +libyaml-0-2/testing,now 0.2.5-2 amd64 [installed,automatic] +libz3-4/testing,now 4.13.3-1 amd64 [installed,automatic] +libz3-dev/testing,now 4.13.3-1 amd64 [installed,automatic] +libzstd-dev/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +libzstd1/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +linux-libc-dev/testing,now 6.12.11-1 all [installed,automatic] +linux-sysctl-defaults/testing,now 4.11 all [installed,automatic] +llvm-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-linker-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-runtime/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +login.defs/testing,now 1:4.16.0-7 all [installed,automatic] +login/testing,now 1:4.16.0-2+really2.40.4-2 amd64 [installed,automatic] +logsave/testing,now 1.47.2-1 amd64 [installed,automatic] +m4/testing,now 1.4.19-5 amd64 [installed,automatic] +make/testing,now 4.4.1-1 amd64 [installed] +manpages-dev/testing,now 6.9.1-1 all [installed,automatic] +manpages/testing,now 6.9.1-1 all [installed,automatic] +mawk/testing,now 1.3.4.20240905-1 amd64 [installed,automatic] +media-types/testing,now 10.1.0 all [installed,automatic] +mesa-libgallium/testing,now 24.2.8-1 amd64 [installed,automatic] +mesa-vulkan-drivers/testing,now 24.2.8-1 amd64 [installed,automatic] +mount/testing,now 2.40.4-2 amd64 [installed,automatic] +native-architecture/testing,now 0.2.5 all [installed,automatic] +ncurses-base/testing,now 6.5-2 all [installed,automatic] +ncurses-bin/testing,now 6.5-2+b1 amd64 [installed,automatic] +netbase/testing,now 6.4 all [installed,automatic] +openssh-client/testing,now 1:9.9p1-3 amd64 [installed,automatic] +openssl-provider-legacy/testing,now 3.4.0-2 amd64 [installed,automatic] +openssl/testing,now 3.4.0-2 amd64 [installed,automatic] +pango1.0-tools/testing,now 1.56.1-1 amd64 [installed,automatic] +passwd/testing,now 1:4.16.0-7 amd64 [installed,automatic] +patch/testing,now 2.7.6-7 amd64 [installed,automatic] +perl-base/testing,now 5.40.0-8 amd64 [installed,automatic] +perl-modules-5.40/testing,now 5.40.0-8 all [installed,automatic] +perl/testing,now 5.40.0-8 amd64 [installed,automatic] +pinentry-curses/testing,now 1.3.1-2 amd64 [installed,automatic] +pkgconf-bin/testing,now 1.8.1-4 amd64 [installed,automatic] +pkgconf/testing,now 1.8.1-4 amd64 [installed,automatic] +procps/testing,now 2:4.0.4-7 amd64 [installed,automatic] +psmisc/testing,now 23.7-1 amd64 [installed,automatic] +publicsuffix/testing,now 20250108.1153-0.1 all [installed,automatic] +python3-autocommand/testing,now 2.2.2-3 all [installed,automatic] +python3-inflect/testing,now 7.3.1-2 all [installed,automatic] +python3-jaraco.context/testing,now 6.0.0-1 all [installed,automatic] +python3-jaraco.functools/testing,now 4.1.0-1 all [installed,automatic] +python3-jaraco.text/testing,now 4.0.0-1 all [installed,automatic] +python3-mako/testing,now 1.3.8-2 all [installed,automatic] +python3-markdown/testing,now 3.7-2 all [installed,automatic] +python3-markupsafe/testing,now 2.1.5-1+b2 amd64 [installed,automatic] +python3-minimal/testing,now 3.13.1-2 amd64 [installed,automatic] +python3-more-itertools/testing,now 10.6.0-1 all [installed,automatic] +python3-packaging/testing,now 24.2-1 all [installed,automatic] +python3-pkg-resources/testing,now 75.6.0-1 all [installed,automatic] +python3-pygments/testing,now 2.18.0+dfsg-2 all [installed,automatic] +python3-setuptools/testing,now 75.6.0-1 all [installed,automatic] +python3-typeguard/testing,now 4.4.1-1 all [installed,automatic] +python3-typing-extensions/testing,now 4.12.2-2 all [installed,automatic] +python3-yaml/testing,now 6.0.2-1+b1 amd64 [installed,automatic] +python3-zipp/testing,now 3.21.0-1 all [installed,automatic] +python3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3.13/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3/testing,now 3.13.1-2 amd64 [installed,automatic] +readline-common/testing,now 8.2-6 all [installed,automatic] +rpcsvc-proto/testing,now 1.4.3-1 amd64 [installed,automatic] +sed/testing,now 4.9-2 amd64 [installed,automatic] +sensible-utils/testing,now 0.0.24 all [installed,automatic] +sgml-base/testing,now 1.31 all [installed,automatic] +shared-mime-info/testing,now 2.4-5+b2 amd64 [installed,automatic] +sqv/testing,now 1.2.1-5 amd64 [installed,automatic] +systemd-cryptsetup/testing,now 257.2-3 amd64 [installed,automatic] +systemd-sysv/testing,now 257.2-3 amd64 [installed,automatic] +systemd-timesyncd/testing,now 257.2-3 amd64 [installed,automatic] +systemd/testing,now 257.2-3 amd64 [installed,automatic] +sysvinit-utils/testing,now 3.13-1 amd64 [installed,automatic] +tar/testing,now 1.35+dfsg-3.1 amd64 [installed,automatic] +tcl-expect/testing,now 5.45.4-3+b1 amd64 [installed,automatic] +tcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +tzdata/testing,now 2024b-6 all [installed,automatic] +util-linux/testing,now 2.40.4-2 amd64 [installed,automatic] +uuid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +wayland-protocols/testing,now 1.39-1 all [installed,automatic] +wget/testing,now 1.24.5-2+b1 amd64 [installed] +x11-common/testing,now 1:7.7+24 all [installed,automatic] +x11-xkb-utils/testing,now 7.7+9 amd64 [installed,automatic] +x11proto-dev/testing,now 2024.1-1 all [installed,automatic] +xauth/testing,now 1:1.1.2-1.1 amd64 [installed,automatic] +xdg-user-dirs/testing,now 0.18-2 amd64 [installed,automatic] +xkb-data/testing,now 2.42-1 all [installed,automatic] +xml-core/testing,now 0.19 all [installed,automatic] +xorg-sgml-doctools/testing,now 1:1.11-1.1 all [installed,automatic] +xtrans-dev/testing,now 1.4.0-1 all [installed,automatic] +xz-utils/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +zlib1g-dev/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +zlib1g/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +Errors detected in the build 0 +Warnings detected in the logs 96 +cppcheck defects detected in the logs 28 +TOTAL warnings detected in the logs 124 diff --git a/2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/stats.html b/2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/stats.html new file mode 100644 index 0000000..a805ba6 --- /dev/null +++ b/2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/stats.html @@ -0,0 +1,180 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+

Top 10 files for error severity, total findings: 2
+   1  libcafekbd/cafekbd-status.c
+   1  libcafekbd/cafekbd-indicator.c
+

+

Top 10 files for style severity, total findings: 20
+   13  libcafekbd/cafekbd-keyboard-drawing.c
+   6   libcafekbd/cafekbd-keyboard-config.c
+   1   test/cafekbd-status-test.c
+

+

Top 10 files for information severity, total findings: 5
+   1  test/cafekbd-keyboard-drawing-test.c
+   1  libcafekbd/cafekbd-keyboard-drawing.c
+   1  libcafekbd/cafekbd-keyboard-config.c
+   1  libcafekbd/cafekbd-indicator-config.c
+   1  libcafekbd/cafekbd-desktop-config.c
+

+ +
+ +
+ + diff --git a/2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/style.css b/2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/style.css new file mode 100644 index 0000000..3897bfa --- /dev/null +++ b/2025-02-06-165521-8955-cppcheck@28c310f42d33_devel/style.css @@ -0,0 +1,177 @@ + +body { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; + font-size: 13px; + line-height: 1.5; + height: 100%; + margin: 0; +} + +#wrapper { + position: fixed; + height: 100vh; + width: 100vw; + display: grid; + grid-template-rows: fit-content(8rem) auto fit-content(8rem); + grid-template-columns: fit-content(25%) 1fr; + grid-template-areas: + "header header" + "menu content" + "footer footer"; +} + +h1 { + margin: 0 0 8px -2px; + font-size: 175%; +} + +.header { + padding: 0 0 5px 15px; + grid-area: header; + border-bottom: thin solid #aaa; +} + +.footer { + grid-area: footer; + border-top: thin solid #aaa; + font-size: 85%; + +} + +.footer > p { + margin: 4px; +} + +#menu, +#menu_index { + grid-area: menu; + text-align: left; + overflow: auto; + padding: 0 23px 15px 15px; + border-right: thin solid #aaa; + min-width: 200px; +} + +#menu > a { + display: block; + margin-left: 10px; + font-size: 12px; +} + +#content, +#content_index { + grid-area: content; + padding: 0px 5px 15px 15px; + overflow: auto; +} + +label { + white-space: nowrap; +} + +label.checkBtn.disabled { + color: #606060; + background: #e0e0e0; + font-style: italic; +} + +label.checkBtn, input[type="text"] { + border: 1px solid grey; + border-radius: 4px; + box-shadow: 1px 1px inset; + padding: 1px 5px; +} + +label.checkBtn { + white-space: nowrap; + background: #ccddff; +} + +label.unchecked { + background: #eff8ff; + box-shadow: 1px 1px 1px; +} + +label.checkBtn:hover, label.unchecked:hover{ + box-shadow: 0 0 2px; +} + +label.disabled:hover { + box-shadow: 1px 1px inset; +} + +label.checkBtn > input { + display:none; +} + +.summaryTable { + width: 100%; +} + +table.summaryTable td { padding: 0 5px 0 5px; } + +.statHeader, .severityHeader { + font-weight: bold; +} + +.warning { + background-color: #ffffa7; +} + +.error { + background-color: #ffb7b7; +} + +.error2 { + background-color: #faa; + display: inline-block; + margin-left: 4px; +} + +.inconclusive { + background-color: #b6b6b4; +} + +.inconclusive2 { + background-color: #b6b6b4; + display: inline-block; + margin-left: 4px; +} + +.verbose { + display: inline-block; + vertical-align: top; + cursor: help; +} + +.verbose .content { + display: none; + position: absolute; + padding: 10px; + margin: 4px; + max-width: 40%; + white-space: pre-wrap; + border: 1px solid #000; + background-color: #ffffcc; + cursor: auto; +} + +.highlight .hll { + padding: 1px; +} + +.highlighttable { + background-color: #fff; + position: relative; + margin: -10px; +} + +.linenos { + border-right: thin solid #aaa; + color: #d3d3d3; + padding-right: 6px; +} + +.id-filtered, .severity-filtered, .file-filtered, .tool-filtered, .text-filtered { + visibility: collapse; +} diff --git a/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/0.html b/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/0.html new file mode 100644 index 0000000..98f4aaa --- /dev/null +++ b/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/0.html @@ -0,0 +1,862 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <X11/keysym.h>
+
+#include <glib/gi18n-lib.h>
+#include <gio/gio.h>
+#include <cafekbd-desktop-config.h>
+#include <cafekbd-config-private.h>
+
+/**
+ * CafekbdDesktopConfig:
+ */
+#define CAFEKBD_DESKTOP_CONFIG_SCHEMA  CAFEKBD_CONFIG_SCHEMA ".general"
+
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP[] = "default-group";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW[] = "group-per-window";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS[] = "handle-indicators";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES[] = "layout-names-as-group-names";
+const gchar CAFEKBD_DESKTOP_CONFIG_KEY_LOAD_EXTRA_ITEMS[] = "load-extra-items";
+
+/*
+ * static common functions
+ */
+
+static gboolean
+    cafekbd_desktop_config_get_lv_descriptions
+    (CafekbdDesktopConfig * config,
+     XklConfigRegistry * registry,
+     const gchar ** layout_ids,
+     const gchar ** variant_ids,
+     gchar *** short_layout_descriptions,
+     gchar *** long_layout_descriptions,
+     gchar *** short_variant_descriptions,
+     gchar *** long_variant_descriptions) {
+	const gchar **pl, **pv;
+	guint total_layouts;
+	gchar **sld, **lld, **svd, **lvd;
+	XklConfigItem *item = xkl_config_item_new ();
+
+	if (!
+	    (xkl_engine_get_features (config->engine) &
+	     XKLF_MULTIPLE_LAYOUTS_SUPPORTED))
+		return FALSE;
+
+	pl = layout_ids;
+	pv = variant_ids;
+	total_layouts = g_strv_length ((char **) layout_ids);
+	sld = *short_layout_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+	lld = *long_layout_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+	svd = *short_variant_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+	lvd = *long_variant_descriptions =
+	    g_new0 (gchar *, total_layouts + 1);
+
+	while (pl != NULL && *pl != NULL) {
+
+		xkl_debug (100, "ids: [%s][%s]\n", *pl,
+			   pv == NULL ? NULL : *pv);
+
+		g_snprintf (item->name, sizeof item->name, "%s", *pl);
+		if (xkl_config_registry_find_layout (registry, item)) {
+			*sld = g_strdup (item->short_description);
+			*lld = g_strdup (item->description);
+		} else {
+			*sld = g_strdup ("");
+			*lld = g_strdup ("");
+		}
+
+		if (pv != NULL && *pv != NULL) {
+			g_snprintf (item->name, sizeof item->name, "%s",
+				    *pv);
+			if (xkl_config_registry_find_variant
+			    (registry, *pl, item)) {
+				*svd = g_strdup (item->short_description);
+				*lvd = g_strdup (item->description);
+			} else {
+				*svd = g_strdup ("");
+				*lvd = g_strdup ("");
+			}
+		} else {
+			*svd = g_strdup ("");
+			*lvd = g_strdup ("");
+		}
+
+		xkl_debug (100, "description: [%s][%s][%s][%s]\n",
+			   *sld, *lld, *svd, *lvd);
+		sld++;
+		lld++;
+		svd++;
+		lvd++;
+
+		pl++;
+
+		if (pv != NULL && *pv != NULL)
+			pv++;
+	}
+
+	g_object_unref (item);
+	return TRUE;
+}
+
+/*
+ * extern CafekbdDesktopConfig config functions
+ */
+void
+cafekbd_desktop_config_init (CafekbdDesktopConfig * config,
+			  XklEngine * engine)
+{
+	memset (config, 0, sizeof (*config));
+	config->settings = g_settings_new (CAFEKBD_DESKTOP_CONFIG_SCHEMA);
+	config->engine = engine;
+}
+
+void
+cafekbd_desktop_config_term (CafekbdDesktopConfig * config)
+{
+	g_object_unref (config->settings);
+	config->settings = NULL;
+}
+
+void
+cafekbd_desktop_config_load_from_gsettings (CafekbdDesktopConfig * config)
+{
+	config->group_per_app =
+	    g_settings_get_boolean (config->settings,
+				 CAFEKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW);
+	xkl_debug (150, "group_per_app: %d\n", config->group_per_app);
+
+	config->handle_indicators =
+	    g_settings_get_boolean (config->settings,
+				 CAFEKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS);
+	xkl_debug (150, "handle_indicators: %d\n",
+		   config->handle_indicators);
+
+	config->layout_names_as_group_names =
+	    g_settings_get_boolean (config->settings,
+				   CAFEKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES);
+	xkl_debug (150, "layout_names_as_group_names: %d\n",
+		   config->layout_names_as_group_names);
+
+	config->load_extra_items =
+	    g_settings_get_boolean (config->settings,
+				   CAFEKBD_DESKTOP_CONFIG_KEY_LOAD_EXTRA_ITEMS);
+	xkl_debug (150, "load_extra_items: %d\n",
+		   config->load_extra_items);
+
+	config->default_group =
+	    g_settings_get_int (config->settings,
+				  CAFEKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP);
+
+	if (config->default_group < -1
+	    || config->default_group >=
+	    xkl_engine_get_max_num_groups (config->engine))
+		config->default_group = -1;
+	xkl_debug (150, "default_group: %d\n", config->default_group);
+}
+
+void
+cafekbd_desktop_config_save_to_gsettings (CafekbdDesktopConfig * config)
+{
+	g_settings_delay (config->settings);
+
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW,
+			     config->group_per_app);
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS,
+			     config->handle_indicators);
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES,
+			     config->layout_names_as_group_names);
+	g_settings_set_boolean (config->settings,
+			     CAFEKBD_DESKTOP_CONFIG_KEY_LOAD_EXTRA_ITEMS,
+			     config->load_extra_items);
+	g_settings_set_int (config->settings,
+			    CAFEKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP,
+			    config->default_group);
+
+	g_settings_apply (config->settings);
+}
+
+gboolean
+cafekbd_desktop_config_activate (CafekbdDesktopConfig * config)
+{
+	gboolean rv = TRUE;
+
+	xkl_engine_set_group_per_toplevel_window (config->engine,
+						  config->group_per_app);
+	xkl_engine_set_indicators_handling (config->engine,
+					    config->handle_indicators);
+	xkl_engine_set_default_group (config->engine,
+				      config->default_group);
+
+	return rv;
+}
+
+void
+cafekbd_desktop_config_lock_next_group (CafekbdDesktopConfig * config)
+{
+	int group = xkl_engine_get_next_group (config->engine);
+	xkl_engine_lock_group (config->engine, group);
+}
+
+void
+cafekbd_desktop_config_lock_prev_group (CafekbdDesktopConfig * config)
+{
+	int group = xkl_engine_get_prev_group (config->engine);
+	xkl_engine_lock_group (config->engine, group);
+}
+
+void
+cafekbd_desktop_config_restore_group (CafekbdDesktopConfig * config)
+{
+	int group = xkl_engine_get_current_window_group (config->engine);
+	xkl_engine_lock_group (config->engine, group);
+}
+
+/**
+ * cafekbd_desktop_config_start_listen:
+ * @func: (scope notified): a function to call when settings are changed
+ */
+void
+cafekbd_desktop_config_start_listen (CafekbdDesktopConfig * config,
+				  GCallback func,
+				  gpointer user_data)
+{
+	config->config_listener_id =
+	    g_signal_connect (config->settings, "changed", func,
+			      user_data);
+}
+
+void
+cafekbd_desktop_config_stop_listen (CafekbdDesktopConfig * config)
+{
+	g_signal_handler_disconnect (config->settings,
+				    config->config_listener_id);
+	config->config_listener_id = 0;
+}
+
+gboolean
+cafekbd_desktop_config_load_group_descriptions (CafekbdDesktopConfig
+					     * config,
+					     XklConfigRegistry *
+					     registry,
+					     const gchar **
+					     layout_ids,
+					     const gchar **
+					     variant_ids,
+					     gchar ***
+					     short_group_names,
+					     gchar *** full_group_names)
+{
+	gchar **sld, **lld, **svd, **lvd;
+	gchar **psld, **plld, **plvd;
+	gchar **psgn, **pfgn, **psvd;
+	gint total_descriptions;
+
+	if (!cafekbd_desktop_config_get_lv_descriptions
+	    (config, registry, layout_ids, variant_ids, &sld, &lld, &svd,
+	     &lvd)) {
+		return False;
+	}
+
+	total_descriptions = g_strv_length (sld);
+
+	*short_group_names = psgn =
+	    g_new0 (gchar *, total_descriptions + 1);
+	*full_group_names = pfgn =
+	    g_new0 (gchar *, total_descriptions + 1);
+
+	plld = lld;
+	psld = sld;
+	plvd = lvd;
+	psvd = svd;
+	while (plld != NULL && *plld != NULL) {
+		gchar *sd = (*psvd[0] == '\0') ? *psld : *psvd;
+		psld++, psvd++;
+		*psgn++ = g_strdup (sd);
+		*pfgn++ = g_strdup (cafekbd_keyboard_config_format_full_layout
+				    (*plld++, *plvd++));
+	}
+	g_strfreev (sld);
+	g_strfreev (lld);
+	g_strfreev (svd);
+	g_strfreev (lvd);
+
+	return True;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/1.html b/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/1.html new file mode 100644 index 0000000..43abc15 --- /dev/null +++ b/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/1.html @@ -0,0 +1,914 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <X11/keysym.h>
+
+#include <pango/pango.h>
+
+#include <glib/gi18n-lib.h>
+#include <cdk/cdkx.h>
+
+#include <cafekbd-keyboard-config.h>
+#include <cafekbd-indicator-config.h>
+
+#include <cafekbd-config-private.h>
+
+/**
+ * CafekbdIndicatorConfig:
+ */
+#define CAFEKBD_INDICATOR_CONFIG_SCHEMA  CAFEKBD_CONFIG_SCHEMA ".indicator"
+
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS[] = "show-flags";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_SECONDARIES[] = "secondary";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_FONT_FAMILY[] = "font-family";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_FOREGROUND_COLOR[] = "foreground-color";
+const gchar CAFEKBD_INDICATOR_CONFIG_KEY_BACKGROUND_COLOR[] = "background-color";
+
+/*
+ * static applet config functions
+ */
+static void
+cafekbd_indicator_config_load_font (CafekbdIndicatorConfig * ind_config)
+{
+	ind_config->font_family =
+	    g_settings_get_string (ind_config->settings,
+				   CAFEKBD_INDICATOR_CONFIG_KEY_FONT_FAMILY);
+
+	if (ind_config->font_family == NULL ||
+	    ind_config->font_family[0] == '\0') {
+		PangoFontDescription *fd = NULL;
+		CtkWidgetPath *widget_path = ctk_widget_path_new ();
+		CtkStyleContext *context = ctk_style_context_new ();
+
+		ctk_widget_path_append_type (widget_path, CTK_TYPE_WINDOW);
+		ctk_widget_path_iter_set_name (widget_path, -1 , "PanelWidget");
+
+		ctk_style_context_set_path (context, widget_path);
+		ctk_style_context_set_screen (context, cdk_screen_get_default ());
+		ctk_style_context_set_state (context, CTK_STATE_FLAG_NORMAL);
+		ctk_style_context_add_class (context, CTK_STYLE_CLASS_DEFAULT);
+		ctk_style_context_add_class (context, "gnome-panel-menu-bar");
+		ctk_style_context_add_class (context, "cafe-panel-menu-bar");
+
+		ctk_style_context_get (context, CTK_STATE_FLAG_NORMAL,
+		                       CTK_STYLE_PROPERTY_FONT, &fd, NULL);
+
+		if (fd != NULL) {
+			ind_config->font_family =
+			    g_strdup (pango_font_description_to_string(fd));
+		}
+
+		g_object_unref (G_OBJECT (context));
+		ctk_widget_path_unref (widget_path);
+	}
+	xkl_debug (150, "font: [%s]\n", ind_config->font_family);
+
+}
+
+static void
+cafekbd_indicator_config_load_colors (CafekbdIndicatorConfig * ind_config)
+{
+	ind_config->foreground_color =
+	    g_settings_get_string (ind_config->settings,
+	                           CAFEKBD_INDICATOR_CONFIG_KEY_FOREGROUND_COLOR);
+
+	if (ind_config->foreground_color == NULL ||
+	    ind_config->foreground_color[0] == '\0') {
+		CtkWidgetPath *widget_path = ctk_widget_path_new ();
+		CtkStyleContext *context = ctk_style_context_new ();
+		CdkRGBA fg_color;
+
+		ctk_widget_path_append_type (widget_path, CTK_TYPE_WINDOW);
+		ctk_widget_path_iter_set_name (widget_path, -1 , "PanelWidget");
+
+		ctk_style_context_set_path (context, widget_path);
+		ctk_style_context_set_screen (context, cdk_screen_get_default ());
+		ctk_style_context_set_state (context, CTK_STATE_FLAG_NORMAL);
+		ctk_style_context_add_class (context, CTK_STYLE_CLASS_DEFAULT);
+		ctk_style_context_add_class (context, "gnome-panel-menu-bar");
+		ctk_style_context_add_class (context, "cafe-panel-menu-bar");
+
+		ctk_style_context_get_color (context,
+		                             CTK_STATE_FLAG_NORMAL, &fg_color);
+		ind_config->foreground_color =
+		    g_strdup_printf ("%g %g %g",
+		                     fg_color.red,
+		                     fg_color.green,
+		                     fg_color.blue);
+
+		g_object_unref (G_OBJECT (context));
+		ctk_widget_path_unref (widget_path);
+	}
+
+	ind_config->background_color =
+	    g_settings_get_string (ind_config->settings,
+				     CAFEKBD_INDICATOR_CONFIG_KEY_BACKGROUND_COLOR);
+}
+
+void
+cafekbd_indicator_config_refresh_style (CafekbdIndicatorConfig * ind_config)
+{
+	g_free (ind_config->font_family);
+	g_free (ind_config->foreground_color);
+	g_free (ind_config->background_color);
+	cafekbd_indicator_config_load_font (ind_config);
+	cafekbd_indicator_config_load_colors (ind_config);
+}
+
+gchar *
+cafekbd_indicator_config_get_images_file (CafekbdIndicatorConfig *
+				       ind_config,
+				       CafekbdKeyboardConfig *
+				       kbd_config, int group)
+{
+	char *image_file = NULL;
+	CtkIconInfo *icon_info = NULL;
+
+	if (!ind_config->show_flags)
+		return NULL;
+
+	if ((kbd_config->layouts_variants != NULL) &&
+	    (g_strv_length (kbd_config->layouts_variants) > group)) {
+		char *full_layout_name =
+		    kbd_config->layouts_variants[group];
+
+		if (full_layout_name != NULL) {
+			char *l, *v;
+			cafekbd_keyboard_config_split_items (full_layout_name,
+							  &l, &v);
+			if (l != NULL) {
+				/* probably there is something in theme? */
+				icon_info = ctk_icon_theme_lookup_icon
+				    (ind_config->icon_theme, l, 48, 0);
+
+				/* Unbelievable but happens */
+				if (icon_info != NULL &&
+				    ctk_icon_info_get_filename (icon_info) == NULL) {
+					g_object_unref (icon_info);
+					icon_info = NULL;
+				}
+			}
+		}
+	}
+	/* fallback to the default value */
+	if (icon_info == NULL) {
+		icon_info = ctk_icon_theme_lookup_icon
+		    (ind_config->icon_theme, "stock_dialog-error", 48, 0);
+	}
+	if (icon_info != NULL) {
+		image_file =
+		    g_strdup (ctk_icon_info_get_filename (icon_info));
+		g_object_unref (icon_info);
+	}
+
+	return image_file;
+}
+
+void
+cafekbd_indicator_config_load_image_filenames (CafekbdIndicatorConfig *
+					    ind_config,
+					    CafekbdKeyboardConfig *
+					    kbd_config)
+{
+	int i;
+	ind_config->image_filenames = NULL;
+
+	if (!ind_config->show_flags)
+		return;
+
+	for (i = xkl_engine_get_max_num_groups (ind_config->engine);
+	     --i >= 0;) {
+		gchar *image_file =
+		    cafekbd_indicator_config_get_images_file (ind_config,
+							   kbd_config,
+							   i);
+		ind_config->image_filenames =
+		    g_slist_prepend (ind_config->image_filenames,
+				     image_file);
+	}
+}
+
+void
+cafekbd_indicator_config_free_image_filenames (CafekbdIndicatorConfig *
+					    ind_config)
+{
+	while (ind_config->image_filenames) {
+		if (ind_config->image_filenames->data)
+			g_free (ind_config->image_filenames->data);
+		ind_config->image_filenames =
+		    g_slist_delete_link (ind_config->image_filenames,
+					 ind_config->image_filenames);
+	}
+}
+
+void
+cafekbd_indicator_config_init (CafekbdIndicatorConfig * ind_config,
+			       XklEngine * engine)
+{
+	gchar *sp;
+
+	memset (ind_config, 0, sizeof (*ind_config));
+	ind_config->settings = g_settings_new (CAFEKBD_INDICATOR_CONFIG_SCHEMA);
+	ind_config->engine = engine;
+
+	ind_config->icon_theme = ctk_icon_theme_get_default ();
+
+	ctk_icon_theme_append_search_path (ind_config->icon_theme, sp =
+					   g_build_filename (g_get_home_dir
+							     (),
+							     ".icons/flags",
+							     NULL));
+	g_free (sp);
+
+	ctk_icon_theme_append_search_path (ind_config->icon_theme,
+					   sp =
+					   g_build_filename (DATADIR,
+							     "pixmaps/flags",
+							     NULL));
+	g_free (sp);
+
+	ctk_icon_theme_append_search_path (ind_config->icon_theme,
+					   sp =
+					   g_build_filename (DATADIR,
+							     "icons/flags",
+							     NULL));
+	g_free (sp);
+}
+
+void
+cafekbd_indicator_config_term (CafekbdIndicatorConfig * ind_config)
+{
+	g_free (ind_config->font_family);
+	ind_config->font_family = NULL;
+
+	g_free (ind_config->foreground_color);
+	ind_config->foreground_color = NULL;
+
+	g_free (ind_config->background_color);
+	ind_config->background_color = NULL;
+
+	ind_config->icon_theme = NULL;
+
+	cafekbd_indicator_config_free_image_filenames (ind_config);
+
+	g_object_unref (ind_config->settings);
+	ind_config->settings = NULL;
+}
+
+void
+cafekbd_indicator_config_load_from_gsettings (CafekbdIndicatorConfig * ind_config)
+{
+	ind_config->secondary_groups_mask =
+	    g_settings_get_int (ind_config->settings,
+				CAFEKBD_INDICATOR_CONFIG_KEY_SECONDARIES);
+
+	ind_config->show_flags =
+	    g_settings_get_boolean (ind_config->settings,
+				 CAFEKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS);
+
+	cafekbd_indicator_config_load_font (ind_config);
+	cafekbd_indicator_config_load_colors (ind_config);
+
+}
+
+void
+cafekbd_indicator_config_save_to_gsettings (CafekbdIndicatorConfig * ind_config)
+{
+	g_settings_delay (ind_config->settings);
+
+	g_settings_set_int (ind_config->settings,
+				  CAFEKBD_INDICATOR_CONFIG_KEY_SECONDARIES,
+				  ind_config->secondary_groups_mask);
+	g_settings_set_boolean (ind_config->settings,
+				   CAFEKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS,
+				   ind_config->show_flags);
+
+	g_settings_apply (ind_config->settings);
+}
+
+void
+cafekbd_indicator_config_activate (CafekbdIndicatorConfig * ind_config)
+{
+	xkl_engine_set_secondary_groups_mask (ind_config->engine,
+					      ind_config->secondary_groups_mask);
+}
+
+/**
+ * cafekbd_indicator_config_start_listen:
+ * @func: (scope notified): a function to call when settings are changed
+ */
+void
+cafekbd_indicator_config_start_listen (CafekbdIndicatorConfig *
+				    ind_config,
+				    GCallback func,
+				    gpointer user_data)
+{
+	ind_config->config_listener_id =
+	    g_signal_connect (ind_config->settings, "changed", func,
+			      user_data);
+}
+
+void
+cafekbd_indicator_config_stop_listen (CafekbdIndicatorConfig * ind_config)
+{
+	g_signal_handler_disconnect (ind_config->settings,
+				     ind_config->config_listener_id);
+	ind_config->config_listener_id = 0;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/2.html b/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/2.html new file mode 100644 index 0000000..4489934 --- /dev/null +++ b/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/2.html @@ -0,0 +1,2100 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
+871
+872
+873
+874
+875
+876
+877
+878
+879
+880
+881
+882
+883
+884
+885
+886
+887
+888
+889
+890
+891
+892
+893
+894
+895
+896
+897
+898
+899
+900
+901
+902
+903
+904
+905
+906
+907
+908
+909
+910
+911
+912
+913
+914
+915
+916
+917
+918
+919
+920
+921
+922
+923
+924
+925
+926
+927
+928
+929
+930
+931
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+#include <config.h>
+
+#include <memory.h>
+
+#include <ctk/ctk.h>
+#include <cdk/cdkkeysyms.h>
+#include <cdk/cdkx.h>
+#include <glib/gi18n-lib.h>
+
+#include <cafekbd-indicator.h>
+#include <cafekbd-indicator-marshal.h>
+
+#include <cafekbd-desktop-config.h>
+#include <cafekbd-indicator-config.h>
+
+typedef struct _gki_globals {
+	XklEngine *engine;
+	XklConfigRegistry *registry;
+
+	CafekbdDesktopConfig cfg;
+	CafekbdIndicatorConfig ind_cfg;
+	CafekbdKeyboardConfig kbd_cfg;
+
+	const gchar *tooltips_format;
+	gchar **full_group_names;
+	gchar **short_group_names;
+	GSList *widget_instances;
+	GSList *images;
+} gki_globals;
+
+struct _CafekbdIndicatorPrivate {
+	gboolean set_parent_tooltips;
+	gdouble angle;
+};
+
+/* one instance for ALL widgets */
+static gki_globals globals;
+
+#define ForAllIndicators() \
+	{ \
+		GSList* cur; \
+		for (cur = globals.widget_instances; cur != NULL; cur = cur->next) { \
+			CafekbdIndicator * gki = (CafekbdIndicator*)cur->data;
+#define NextIndicator() \
+		} \
+	}
+
+G_DEFINE_TYPE (CafekbdIndicator, cafekbd_indicator, CTK_TYPE_NOTEBOOK)<--- There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
+
+static void
+cafekbd_indicator_global_init (void);
+static void
+cafekbd_indicator_global_term (void);
+static CtkWidget *
+cafekbd_indicator_prepare_drawing (CafekbdIndicator * gki, int group);
+static void
+cafekbd_indicator_set_current_page_for_group (CafekbdIndicator * gki, int group);
+static void
+cafekbd_indicator_set_current_page (CafekbdIndicator * gki);
+static void
+cafekbd_indicator_cleanup (CafekbdIndicator * gki);
+static void
+cafekbd_indicator_fill (CafekbdIndicator * gki);
+static void
+cafekbd_indicator_set_tooltips (CafekbdIndicator * gki, const char *str);
+
+gchar *
+cafekbd_indicator_extract_layout_name (int group, XklEngine *engine, CafekbdKeyboardConfig *kbd_cfg, gchar **short_group_names, gchar **full_group_names);
+gchar *
+cafekbd_indicator_create_label_title (int group, GHashTable **ln2cnt_map, gchar *layout_name);
+
+static void
+cafekbd_indicator_load_images (void)
+{
+	int i;
+	GSList *image_filename;
+
+	globals.images = NULL;
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	if (!globals.ind_cfg.show_flags)
+		return;
+
+	image_filename = globals.ind_cfg.image_filenames;
+
+	for (i = xkl_engine_get_max_num_groups (globals.engine);
+	     --i >= 0; image_filename = image_filename->next) {
+		GdkPixbuf *image = NULL;
+		char *image_file = (char *) image_filename->data;
+
+		if (image_file != NULL) {
+			GError *gerror = NULL;
+			image =
+			    gdk_pixbuf_new_from_file (image_file, &gerror);
+			if (image == NULL) {
+				CtkWidget *dialog =
+				    ctk_message_dialog_new (NULL,
+							    CTK_DIALOG_DESTROY_WITH_PARENT,
+							    CTK_MESSAGE_ERROR,
+							    CTK_BUTTONS_OK,
+							    _
+							    ("There was an error loading an image: %s"),
+							    gerror->
+							    message);
+				g_signal_connect (G_OBJECT (dialog),
+						  "response",
+						  G_CALLBACK
+						  (ctk_widget_destroy),
+						  NULL);
+
+				ctk_window_set_resizable (CTK_WINDOW
+							  (dialog), FALSE);
+
+				ctk_widget_show (dialog);
+				g_error_free (gerror);
+			}
+			xkl_debug (150,
+				   "Image %d[%s] loaded -> %p[%dx%d]\n",
+				   i, image_file, image,
+				   gdk_pixbuf_get_width (image),
+				   gdk_pixbuf_get_height (image));
+		}
+		/* We append the image anyway - even if it is NULL! */
+		globals.images = g_slist_append (globals.images, image);
+	}
+}
+
+static void
+cafekbd_indicator_free_images (void)
+{
+	GSList *img_node;
+
+	cafekbd_indicator_config_free_image_filenames (&globals.ind_cfg);
+
+	while ((img_node = globals.images) != NULL) {
+		GdkPixbuf *pi;
+
+		pi = GDK_PIXBUF (img_node->data);
+		/* It can be NULL - some images may be missing */
+		if (pi != NULL) {
+			g_object_unref (pi);
+		}
+		globals.images =
+		    g_slist_remove_link (globals.images, img_node);
+		g_slist_free_1 (img_node);
+	}
+}
+
+static void
+cafekbd_indicator_update_images (void)
+{
+	cafekbd_indicator_free_images ();
+	cafekbd_indicator_load_images ();
+}
+
+void
+cafekbd_indicator_set_tooltips (CafekbdIndicator * gki, const char *str)
+{
+	g_assert (str == NULL || g_utf8_validate (str, -1, NULL));
+
+	ctk_widget_set_tooltip_text (CTK_WIDGET (gki), str);
+
+	if (gki->priv->set_parent_tooltips) {
+		CtkWidget *parent =
+		    ctk_widget_get_parent (CTK_WIDGET (gki));
+		if (parent) {
+			ctk_widget_set_tooltip_text (parent, str);
+		}
+	}
+}
+
+void
+cafekbd_indicator_cleanup (CafekbdIndicator * gki)
+{
+	int i;
+	CtkNotebook *notebook = CTK_NOTEBOOK (gki);
+
+	/* Do not remove the first page! It is the default page */
+	for (i = ctk_notebook_get_n_pages (notebook); --i > 0;) {
+		ctk_notebook_remove_page (notebook, i);
+	}
+}
+
+void
+cafekbd_indicator_fill (CafekbdIndicator * gki)
+{
+	int grp;
+	int total_groups = xkl_engine_get_num_groups (globals.engine);
+	CtkNotebook *notebook = CTK_NOTEBOOK (gki);
+
+	for (grp = 0; grp < total_groups; grp++) {
+		CtkWidget *page;
+		page = cafekbd_indicator_prepare_drawing (gki, grp);
+
+		if (page == NULL)
+			page = ctk_label_new ("");
+
+		ctk_notebook_append_page (notebook, page, NULL);
+		ctk_widget_show_all (page);
+	}
+}
+
+static gboolean cafekbd_indicator_key_pressed (CtkWidget        *widget G_GNUC_UNUSED,
+					       CdkEventKey      *event,
+					       CafekbdIndicator *gki G_GNUC_UNUSED)
+{
+	switch (event->keyval)
+	{
+			case CDK_KEY_KP_Enter:
+			case CDK_KEY_ISO_Enter:
+			case CDK_KEY_3270_Enter:
+			case CDK_KEY_Return:
+			case CDK_KEY_space:
+			case CDK_KEY_KP_Space:
+			cafekbd_desktop_config_lock_next_group(&globals.cfg);
+			return TRUE;
+		default:
+			break;
+	}
+
+	return FALSE;
+}
+
+static gboolean
+cafekbd_indicator_button_pressed (CtkWidget        *widget,
+				  CdkEventButton   *event,
+				  CafekbdIndicator *gki G_GNUC_UNUSED)
+{
+	CtkWidget *img = ctk_bin_get_child (CTK_BIN (widget));
+	CtkAllocation allocation;
+	ctk_widget_get_allocation (img, &allocation);
+	xkl_debug (150, "Flag img size %d x %d\n",
+		   allocation.width, allocation.height);
+	if (event->button == 1 && event->type == CDK_BUTTON_PRESS) {
+		xkl_debug (150, "Mouse button pressed on applet\n");
+		cafekbd_desktop_config_lock_next_group (&globals.cfg);
+		return TRUE;
+	}
+	return FALSE;
+}
+
+static void
+draw_flag (CtkWidget * flag, cairo_t * cr, GdkPixbuf * image)
+{
+	/* Image width and height */
+	int iw = gdk_pixbuf_get_width (image);
+	int ih = gdk_pixbuf_get_height (image);
+	CtkAllocation allocation;
+	double xwiratio, ywiratio, wiratio;
+
+	ctk_widget_get_allocation (flag, &allocation);
+
+	/* widget-to-image scales, X and Y */
+	xwiratio = 1.0 * allocation.width / iw;
+	ywiratio = 1.0 * allocation.height / ih;
+	wiratio = xwiratio < ywiratio ? xwiratio : ywiratio;
+
+	/* transform cairo context */
+	cairo_translate (cr, allocation.width / 2.0, allocation.height / 2.0);
+	cairo_scale (cr, wiratio, wiratio);
+	cairo_translate (cr, - iw / 2.0, - ih / 2.0);
+
+	cdk_cairo_set_source_pixbuf (cr, image, 0, 0);
+	cairo_paint (cr);
+}
+
+gchar *
+cafekbd_indicator_extract_layout_name (int group, XklEngine * engine,
+				    CafekbdKeyboardConfig * kbd_cfg,
+				    gchar ** short_group_names,
+				    gchar ** full_group_names)
+{
+	char *layout_name = NULL;
+	if (group < g_strv_length (short_group_names)) {
+		if (xkl_engine_get_features (engine) &
+		    XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
+			char *full_layout_name =
+			    kbd_cfg->layouts_variants[group];
+			char *variant_name;
+			if (!cafekbd_keyboard_config_split_items
+			    (full_layout_name, &layout_name,
+			     &variant_name))
+				/* just in case */
+				layout_name = full_layout_name;
+
+			/* make it freeable */
+			layout_name = g_strdup (layout_name);
+
+			if (short_group_names != NULL) {
+				char *short_group_name =
+				    short_group_names[group];
+				if (short_group_name != NULL
+				    && *short_group_name != '\0') {
+					/* drop the long name */
+					g_free (layout_name);
+					layout_name =
+					    g_strdup (short_group_name);
+				}
+			}
+		} else {
+			layout_name = g_strdup (full_group_names[group]);
+		}
+	}
+
+	if (layout_name == NULL)
+		layout_name = g_strdup ("");
+
+	return layout_name;
+}
+
+gchar *
+cafekbd_indicator_create_label_title (int group, GHashTable ** ln2cnt_map,
+				   gchar * layout_name)
+{
+	gpointer pcounter = NULL;
+	char *prev_layout_name = NULL;
+	char *lbl_title = NULL;
+	int counter = 0;
+
+	if (group == 0) {
+		*ln2cnt_map =
+		    g_hash_table_new_full (g_str_hash, g_str_equal,
+					   g_free, NULL);
+	}
+
+	/* Process layouts with repeating description */
+	if (g_hash_table_lookup_extended
+	    (*ln2cnt_map, layout_name, (gpointer *) & prev_layout_name,
+	     &pcounter)) {
+		/* "next" same description */
+		gchar appendix[10] = "";
+		gint utf8length;
+		gunichar cidx;
+		counter = GPOINTER_TO_INT (pcounter);
+		/* Unicode subscript 2, 3, 4 */
+		cidx = 0x2081 + counter;
+		utf8length = g_unichar_to_utf8 (cidx, appendix);
+		appendix[utf8length] = '\0';
+		lbl_title = g_strconcat (layout_name, appendix, NULL);
+	} else {
+		/* "first" time this description */
+		lbl_title = g_strdup (layout_name);
+	}
+	g_hash_table_insert (*ln2cnt_map, layout_name,
+			     GINT_TO_POINTER (counter + 1));
+	return lbl_title;
+}
+
+static CtkWidget *
+cafekbd_indicator_prepare_drawing (CafekbdIndicator * gki, int group)
+{
+	gpointer pimage;
+	CtkWidget *ebox;
+
+	pimage = g_slist_nth_data (globals.images, group);
+	ebox = ctk_event_box_new ();
+	ctk_event_box_set_visible_window (CTK_EVENT_BOX (ebox), FALSE);
+	if (globals.ind_cfg.show_flags) {
+		GdkPixbuf *image;
+		CtkWidget *flag;
+
+		if (pimage == NULL)
+			return NULL;
+		image = GDK_PIXBUF (pimage);
+		flag = ctk_drawing_area_new ();
+		ctk_widget_add_events (CTK_WIDGET (flag),
+				       CDK_BUTTON_PRESS_MASK);
+		g_signal_connect (G_OBJECT (flag), "draw",
+		                  G_CALLBACK (draw_flag), image);
+		ctk_container_add (CTK_CONTAINER (ebox), flag);
+	} else {
+		char *lbl_title = NULL;
+		char *layout_name = NULL;
+		CtkWidget *label;
+		static GHashTable *ln2cnt_map = NULL;
+
+		layout_name =
+		    cafekbd_indicator_extract_layout_name (group,
+							globals.engine,
+							&globals.kbd_cfg,
+							globals.short_group_names,
+							globals.full_group_names);
+
+		lbl_title =
+		    cafekbd_indicator_create_label_title (group,
+						       &ln2cnt_map,
+						       layout_name);
+
+		label = ctk_label_new (lbl_title);
+		ctk_widget_set_halign (label, CTK_ALIGN_CENTER);
+		ctk_widget_set_valign (label, CTK_ALIGN_CENTER);
+		ctk_widget_set_margin_start (label, 2);
+		ctk_widget_set_margin_end (label, 2);
+		ctk_widget_set_margin_top (label, 2);
+		ctk_widget_set_margin_bottom (label, 2);
+		g_free (lbl_title);
+		ctk_label_set_angle (CTK_LABEL (label), gki->priv->angle);
+
+		if (group + 1 ==
+		    xkl_engine_get_num_groups (globals.engine)) {
+			g_hash_table_destroy (ln2cnt_map);
+			ln2cnt_map = NULL;
+		}
+
+		ctk_container_add (CTK_CONTAINER (ebox), label);
+	}
+
+	g_signal_connect (G_OBJECT (ebox),
+			  "button_press_event",
+			  G_CALLBACK (cafekbd_indicator_button_pressed), gki);
+
+	g_signal_connect (G_OBJECT (gki),
+			  "key_press_event",
+			  G_CALLBACK (cafekbd_indicator_key_pressed), gki);
+
+	/* We have everything prepared for that size */
+
+	return ebox;
+}
+
+static void
+cafekbd_indicator_update_tooltips (CafekbdIndicator * gki)
+{
+	XklState *state = xkl_engine_get_current_state (globals.engine);
+	gchar *buf;
+	if (state == NULL || state->group < 0
+	    || state->group >= g_strv_length (globals.full_group_names))
+		return;
+
+	buf = g_strdup_printf (globals.tooltips_format,
+			       globals.full_group_names[state->group]);
+
+	cafekbd_indicator_set_tooltips (gki, buf);
+	g_free (buf);
+}
+
+static void
+cafekbd_indicator_parent_set (CtkWidget *gki,
+			      CtkWidget *previous_parent G_GNUC_UNUSED)
+{
+	cafekbd_indicator_update_tooltips (CAFEKBD_INDICATOR (gki));
+}
+
+
+void
+cafekbd_indicator_reinit_ui (CafekbdIndicator * gki)
+{
+	cafekbd_indicator_cleanup (gki);
+	cafekbd_indicator_fill (gki);
+
+	cafekbd_indicator_set_current_page (gki);
+
+	g_signal_emit_by_name (gki, "reinit-ui");
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+			       gchar     *key G_GNUC_UNUSED,
+			       gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "General configuration changed in GSettings - reiniting...\n");
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+	ForAllIndicators () {
+		cafekbd_indicator_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_ind_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+				   gchar     *key G_GNUC_UNUSED,
+				   gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "Applet configuration changed in GSettings - reiniting...\n");
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+	cafekbd_indicator_update_images ();
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	ForAllIndicators () {
+		cafekbd_indicator_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+static void
+cafekbd_indicator_load_group_names (const gchar ** layout_ids,
+				 const gchar ** variant_ids)
+{
+	if (!cafekbd_desktop_config_load_group_descriptions
+	    (&globals.cfg, globals.registry, layout_ids, variant_ids,
+	     &globals.short_group_names, &globals.full_group_names)) {
+		/* We just populate no short names (remain NULL) -
+		 * full names are going to be used anyway */
+		gint i, total_groups =
+		    xkl_engine_get_num_groups (globals.engine);
+		globals.full_group_names =
+		    g_new0 (gchar *, total_groups + 1);
+
+		if (xkl_engine_get_features (globals.engine) &
+		    XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
+			gchar **lst = globals.kbd_cfg.layouts_variants;
+			for (i = 0; *lst; lst++, i++) {
+				globals.full_group_names[i] =
+				    g_strdup ((char *) *lst);
+			}
+		} else {
+			for (i = total_groups; --i >= 0;) {
+				globals.full_group_names[i] =
+				    g_strdup_printf ("Group %d", i);
+			}
+		}
+	}
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_kbd_cfg_callback (CafekbdIndicator *gki G_GNUC_UNUSED)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+	xkl_debug (100,
+		   "XKB configuration changed on X Server - reiniting...\n");
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+	cafekbd_indicator_update_images ();
+
+	g_strfreev (globals.full_group_names);
+	globals.full_group_names = NULL;
+
+	if (globals.short_group_names != NULL) {
+		g_strfreev (globals.short_group_names);
+		globals.short_group_names = NULL;
+	}
+
+	cafekbd_indicator_load_group_names ((const gchar **) xklrec->layouts,
+					 (const gchar **)
+					 xklrec->variants);
+
+	ForAllIndicators () {
+		cafekbd_indicator_reinit_ui (gki);
+	} NextIndicator ();
+	g_object_unref (G_OBJECT (xklrec));
+}
+
+/* Should be called once for all applets */
+static void
+cafekbd_indicator_state_callback (XklEngine           *engine G_GNUC_UNUSED,
+				  XklEngineStateChange changeType,
+				  gint                 group,
+				  gboolean             restore)
+{
+	xkl_debug (150, "group is now %d, restore: %d\n", group, restore);
+
+	if (changeType == GROUP_CHANGED) {
+		ForAllIndicators () {
+			xkl_debug (200, "do repaint\n");
+			cafekbd_indicator_set_current_page_for_group
+			    (gki, group);
+		}
+		NextIndicator ();
+	}
+}
+
+
+void
+cafekbd_indicator_set_current_page (CafekbdIndicator * gki)
+{
+	XklState *cur_state;
+	cur_state = xkl_engine_get_current_state (globals.engine);
+	if (cur_state->group >= 0)
+		cafekbd_indicator_set_current_page_for_group (gki,
+							   cur_state->
+							   group);
+}
+
+void
+cafekbd_indicator_set_current_page_for_group (CafekbdIndicator * gki, int group)
+{
+	xkl_debug (200, "Revalidating for group %d\n", group);
+
+	ctk_notebook_set_current_page (CTK_NOTEBOOK (gki), group + 1);
+
+	cafekbd_indicator_update_tooltips (gki);
+}
+
+/* Should be called once for all widgets */
+static CdkFilterReturn
+cafekbd_indicator_filter_x_evt (CdkXEvent *xev,
+				CdkEvent  *event G_GNUC_UNUSED)
+{
+	XEvent *xevent = (XEvent *) xev;
+
+	xkl_engine_filter_events (globals.engine, xevent);
+	switch (xevent->type) {
+	case ReparentNotify:
+		{
+			XReparentEvent *rne = (XReparentEvent *) xev;
+
+			ForAllIndicators () {
+				CdkWindow *w =
+				    ctk_widget_get_parent_window
+				    (CTK_WIDGET (gki));
+
+				/* compare the indicator's parent window with the even window */
+				if (w != NULL
+				    && CDK_WINDOW_XID (w) == rne->window) {
+					/* if so - make it transparent... */
+					xkl_engine_set_window_transparent
+					    (globals.engine, rne->window,
+					     TRUE);
+				}
+			}
+			NextIndicator ()
+		}
+		break;
+	}
+	return CDK_FILTER_CONTINUE;
+}
+
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_start_listen (void)
+{
+	cdk_window_add_filter (NULL, (CdkFilterFunc)
+			       cafekbd_indicator_filter_x_evt, NULL);
+	cdk_window_add_filter (cdk_get_default_root_window (),
+			       (CdkFilterFunc)
+			       cafekbd_indicator_filter_x_evt, NULL);
+
+	xkl_engine_start_listen (globals.engine,
+				 XKLL_TRACK_KEYBOARD_STATE);
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_indicator_stop_listen (void)
+{
+	xkl_engine_stop_listen (globals.engine, XKLL_TRACK_KEYBOARD_STATE);
+
+	cdk_window_remove_filter (NULL, (CdkFilterFunc)
+				  cafekbd_indicator_filter_x_evt, NULL);
+	cdk_window_remove_filter
+	    (cdk_get_default_root_window (),
+	     (CdkFilterFunc) cafekbd_indicator_filter_x_evt, NULL);
+}
+
+static gboolean
+cafekbd_indicator_scroll (CtkWidget      *gki G_GNUC_UNUSED,
+			  CdkEventScroll *event G_GNUC_UNUSED)
+{
+	/* mouse wheel events should be ignored, otherwise funny effects appear */
+	return TRUE;
+}
+
+static void cafekbd_indicator_init(CafekbdIndicator* gki)
+{
+	CtkWidget *def_drawing;
+	CtkNotebook *notebook;
+
+	if (!g_slist_length(globals.widget_instances))
+	{
+		cafekbd_indicator_global_init();
+	}
+
+	gki->priv = g_new0 (CafekbdIndicatorPrivate, 1);
+
+	notebook = CTK_NOTEBOOK (gki);
+
+	xkl_debug (100, "Initiating the widget startup process for %p\n", gki);
+
+	ctk_notebook_set_show_tabs (notebook, FALSE);
+	ctk_notebook_set_show_border (notebook, FALSE);
+
+	def_drawing =
+	    ctk_image_new_from_icon_name ("process-stop",
+				      CTK_ICON_SIZE_BUTTON);
+
+	ctk_notebook_append_page (notebook, def_drawing,
+				  ctk_label_new (""));
+
+	if (globals.engine == NULL) {
+		cafekbd_indicator_set_tooltips (gki,
+					     _
+					     ("XKB initialization error"));
+		return;
+	}
+
+	cafekbd_indicator_set_tooltips (gki, NULL);
+
+	cafekbd_indicator_fill (gki);
+	cafekbd_indicator_set_current_page (gki);
+
+	ctk_widget_add_events (CTK_WIDGET (gki), CDK_BUTTON_PRESS_MASK);
+
+	/* append AFTER all initialization work is finished */
+	globals.widget_instances =
+	    g_slist_append (globals.widget_instances, gki);
+}
+
+static void
+cafekbd_indicator_finalize (GObject * obj)
+{
+	CafekbdIndicator *gki = CAFEKBD_INDICATOR (obj);
+	xkl_debug (100,
+		   "Starting the cafe-kbd-indicator widget shutdown process for %p\n",
+		   gki);
+
+	/* remove BEFORE all termination work is finished */
+	globals.widget_instances =
+	    g_slist_remove (globals.widget_instances, gki);
+
+	cafekbd_indicator_cleanup (gki);
+
+	xkl_debug (100,
+		   "The instance of cafe-kbd-indicator successfully finalized\n");
+
+	g_free (gki->priv);
+
+	G_OBJECT_CLASS (cafekbd_indicator_parent_class)->finalize (obj);
+
+	if (!g_slist_length (globals.widget_instances))
+		cafekbd_indicator_global_term ();
+}
+
+static void
+cafekbd_indicator_global_term (void)
+{
+	xkl_debug (100, "*** Last  CafekbdIndicator instance *** \n");
+	cafekbd_indicator_stop_listen ();
+
+	cafekbd_desktop_config_stop_listen (&globals.cfg);
+	cafekbd_indicator_config_stop_listen (&globals.ind_cfg);
+
+	cafekbd_indicator_config_term (&globals.ind_cfg);
+	cafekbd_keyboard_config_term (&globals.kbd_cfg);
+	cafekbd_desktop_config_term (&globals.cfg);
+
+	g_object_unref (G_OBJECT (globals.registry));
+	globals.registry = NULL;
+	g_object_unref (G_OBJECT (globals.engine));
+	globals.engine = NULL;
+	xkl_debug (100, "*** Terminated globals *** \n");
+}
+
+static void
+cafekbd_indicator_class_init (CafekbdIndicatorClass * klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+	CtkWidgetClass *widget_class = CTK_WIDGET_CLASS (klass);
+
+	xkl_debug (100, "*** First CafekbdIndicator instance *** \n");
+
+	memset (&globals, 0, sizeof (globals));
+
+	/* Initing some global vars */
+	globals.tooltips_format = "%s";
+
+	/* Initing vtable */
+	object_class->finalize = cafekbd_indicator_finalize;
+
+	widget_class->scroll_event = cafekbd_indicator_scroll;
+	widget_class->parent_set = cafekbd_indicator_parent_set;
+
+	/* Signals */
+	g_signal_new ("reinit-ui", CAFEKBD_TYPE_INDICATOR,
+		      G_SIGNAL_RUN_LAST,
+		      G_STRUCT_OFFSET (CafekbdIndicatorClass, reinit_ui),
+		      NULL, NULL, cafekbd_indicator_VOID__VOID,
+		      G_TYPE_NONE, 0);
+}
+
+static void
+cafekbd_indicator_global_init (void)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+
+	globals.engine = xkl_engine_get_instance(CDK_DISPLAY_XDISPLAY(cdk_display_get_default()));
+
+	if (globals.engine == NULL)
+	{
+		xkl_debug (0, "Libxklavier initialization error");
+		return;
+	}
+
+	g_signal_connect (globals.engine, "X-state-changed",
+			  G_CALLBACK (cafekbd_indicator_state_callback),
+			  NULL);
+	g_signal_connect (globals.engine, "X-config-changed",
+			  G_CALLBACK (cafekbd_indicator_kbd_cfg_callback),
+			  NULL);
+
+	cafekbd_desktop_config_init (&globals.cfg, globals.engine);
+	cafekbd_keyboard_config_init (&globals.kbd_cfg, globals.engine);
+	cafekbd_indicator_config_init (&globals.ind_cfg, globals.engine);
+
+	cafekbd_desktop_config_start_listen (&globals.cfg,
+					  (GCallback)
+					  cafekbd_indicator_cfg_changed,
+					  NULL);
+	cafekbd_indicator_config_start_listen (&globals.ind_cfg,
+					    (GCallback)
+					    cafekbd_indicator_ind_cfg_changed,
+					    NULL);
+
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+
+	globals.registry =
+	    xkl_config_registry_get_instance (globals.engine);
+	xkl_config_registry_load (globals.registry,
+				  globals.cfg.load_extra_items);
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+	cafekbd_indicator_update_images ();
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	cafekbd_indicator_load_group_names ((const gchar **) xklrec->layouts,
+					 (const gchar **)
+					 xklrec->variants);
+	g_object_unref (G_OBJECT (xklrec));
+
+	cafekbd_indicator_start_listen ();
+
+	xkl_debug (100, "*** Inited globals *** \n");
+}
+
+CtkWidget *
+cafekbd_indicator_new (void)
+{
+	return
+	    CTK_WIDGET (g_object_new (cafekbd_indicator_get_type (), NULL));
+}
+
+void
+cafekbd_indicator_set_parent_tooltips (CafekbdIndicator * gki, gboolean spt)
+{
+	gki->priv->set_parent_tooltips = spt;
+	cafekbd_indicator_update_tooltips (gki);
+}
+
+void
+cafekbd_indicator_set_tooltips_format (const gchar format[])
+{
+	globals.tooltips_format = format;
+	ForAllIndicators ()
+	    cafekbd_indicator_update_tooltips (gki);
+	NextIndicator ()
+}
+
+/**
+ * cafekbd_indicator_get_xkl_engine:
+ *
+ * Returns: (transfer none): The engine shared by all CafekbdIndicator objects
+ */
+XklEngine *
+cafekbd_indicator_get_xkl_engine ()
+{
+	return globals.engine;
+}
+
+/**
+ * cafekbd_indicator_get_group_names:
+ *
+ * Returns: (transfer none) (array zero-terminated=1): List of group names
+ */
+gchar **
+cafekbd_indicator_get_group_names ()
+{
+	return globals.full_group_names;
+}
+
+gchar *
+cafekbd_indicator_get_image_filename (guint group)
+{
+	if (!globals.ind_cfg.show_flags)
+		return NULL;
+	return cafekbd_indicator_config_get_images_file (&globals.ind_cfg,
+						      &globals.kbd_cfg,
+						      group);
+}
+
+gdouble
+cafekbd_indicator_get_max_width_height_ratio (void)
+{
+	gdouble rv = 0.0;
+	GSList *ip = globals.images;
+	if (!globals.ind_cfg.show_flags)
+		return 0;
+	while (ip != NULL) {
+		GdkPixbuf *img = GDK_PIXBUF (ip->data);
+		gdouble r =
+		    1.0 * gdk_pixbuf_get_width (img) /
+		    gdk_pixbuf_get_height (img);
+		if (r > rv)
+			rv = r;
+		ip = ip->next;
+	}
+	return rv;
+}
+
+void
+cafekbd_indicator_set_angle (CafekbdIndicator * gki, gdouble angle)
+{
+	gki->priv->angle = angle;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/3.html b/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/3.html new file mode 100644 index 0000000..2dbd2a6 --- /dev/null +++ b/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/3.html @@ -0,0 +1,1832 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <X11/keysym.h>
+
+#include <glib/gi18n-lib.h>
+
+#include <cafekbd-keyboard-config.h>
+#include <cafekbd-config-private.h>
+#include <cafekbd-util.h>
+
+/*
+ * CafekbdKeyboardConfig
+ */
+#define CAFEKBD_KEYBOARD_CONFIG_SCHEMA CAFEKBD_CONFIG_SCHEMA ".kbd"
+
+#define GROUP_SWITCHERS_GROUP "grp"
+#define DEFAULT_GROUP_SWITCH "grp:shift_caps_toggle"
+
+const gchar CAFEKBD_KEYBOARD_CONFIG_KEY_MODEL[] = "model";
+const gchar CAFEKBD_KEYBOARD_CONFIG_KEY_LAYOUTS[] = "layouts";
+const gchar CAFEKBD_KEYBOARD_CONFIG_KEY_OPTIONS[] = "options";
+
+const gchar *CAFEKBD_KEYBOARD_CONFIG_ACTIVE[] = {
+	CAFEKBD_KEYBOARD_CONFIG_KEY_MODEL,
+	CAFEKBD_KEYBOARD_CONFIG_KEY_LAYOUTS,
+	CAFEKBD_KEYBOARD_CONFIG_KEY_OPTIONS
+};
+
+/*
+ * static common functions
+ */
+
+static gboolean
+cafekbd_strv_equal (gchar ** l1, gchar ** l2)
+{
+	if (l1 == l2)
+		return TRUE;
+	if (l1 == NULL)
+		return g_strv_length (l2) == 0;
+	if (l2 == NULL)
+		return g_strv_length (l1) == 0;
+
+	while ((*l1 != NULL) && (*l2 != NULL)) {
+		if (*l1 != *l2) {
+			if (*l1 && *l2) {<--- Condition '*l1' is always true<--- Condition '*l2' is always true
+				if (g_ascii_strcasecmp (*l1, *l2))
+					return FALSE;
+			} else
+				return FALSE;
+		}
+
+		l1++;
+		l2++;
+	}
+	return (*l1 == NULL) && (*l2 == NULL);
+}
+
+gboolean
+cafekbd_keyboard_config_get_lv_descriptions (XklConfigRegistry *
+					  config_registry,
+					  const gchar * layout_name,
+					  const gchar * variant_name,
+					  gchar ** layout_short_descr,
+					  gchar ** layout_descr,
+					  gchar ** variant_short_descr,
+					  gchar ** variant_descr)
+{
+	/* TODO make it not static */
+	static XklConfigItem *litem = NULL;
+	static XklConfigItem *vitem = NULL;
+
+	if (litem == NULL)
+		litem = xkl_config_item_new ();
+	if (vitem == NULL)
+		vitem = xkl_config_item_new ();
+
+	layout_name = g_strdup (layout_name);
+
+	g_snprintf (litem->name, sizeof litem->name, "%s", layout_name);
+	if (xkl_config_registry_find_layout (config_registry, litem)) {
+		*layout_short_descr = litem->short_description;
+		*layout_descr = litem->description;
+	} else
+		*layout_short_descr = *layout_descr = NULL;
+
+	if (variant_name != NULL) {
+		variant_name = g_strdup (variant_name);
+		g_snprintf (vitem->name, sizeof vitem->name, "%s",
+			    variant_name);
+		if (xkl_config_registry_find_variant
+		    (config_registry, layout_name, vitem)) {
+			*variant_short_descr = vitem->short_description;
+			*variant_descr = vitem->description;
+		} else
+			*variant_short_descr = *variant_descr = NULL;
+
+		g_free ((char *) variant_name);
+	} else
+		*variant_descr = NULL;
+
+	g_free ((char *) layout_name);
+	return *layout_descr != NULL;
+}
+
+/*
+ * extern common functions
+ */
+const gchar *
+cafekbd_keyboard_config_merge_items (const gchar * parent,
+				  const gchar * child)
+{
+	static gchar buffer[XKL_MAX_CI_NAME_LENGTH * 2 - 1];
+	*buffer = '\0';
+	if (parent != NULL) {
+		if (strlen (parent) >= XKL_MAX_CI_NAME_LENGTH)
+			return NULL;
+		strcat (buffer, parent);
+	}
+	if (child != NULL && *child != 0) {
+		if (strlen (child) >= XKL_MAX_CI_NAME_LENGTH)
+			return NULL;
+		strcat (buffer, "\t");
+		strcat (buffer, child);
+	}
+	return buffer;
+}
+
+gboolean
+cafekbd_keyboard_config_split_items (const gchar * merged, gchar ** parent,
+				  gchar ** child)
+{
+	static gchar pbuffer[XKL_MAX_CI_NAME_LENGTH];
+	static gchar cbuffer[XKL_MAX_CI_NAME_LENGTH];
+	int plen;
+	const gchar *pos;
+	*parent = *child = NULL;
+
+	if (merged == NULL)
+		return FALSE;
+
+	pos = strchr (merged, '\t');
+	if (pos == NULL) {
+		plen = strlen (merged);
+	} else {
+		plen = pos - merged;
+		if (strlen (pos + 1) >= XKL_MAX_CI_NAME_LENGTH)
+			return FALSE;
+		strcpy (*child = cbuffer, pos + 1);
+	}
+	if (plen >= XKL_MAX_CI_NAME_LENGTH)
+		return FALSE;
+	memcpy (*parent = pbuffer, merged, plen);
+	pbuffer[plen] = '\0';
+	return TRUE;
+}
+
+/*
+ * static CafekbdKeyboardConfig functions
+ */
+static void
+cafekbd_keyboard_config_copy_from_xkl_config (CafekbdKeyboardConfig * kbd_config,
+					   XklConfigRec * pdata)
+{
+	char **p;
+	int i;
+	cafekbd_keyboard_config_model_set (kbd_config, pdata->model);
+	xkl_debug (150, "Loaded Kbd model: [%s]\n", pdata->model);
+
+	/* Layouts */
+	g_strfreev (kbd_config->layouts_variants);
+	kbd_config->layouts_variants = NULL;
+	if (pdata->layouts != NULL) {
+		char **p1;
+
+		p = pdata->layouts;
+		p1 = pdata->variants;
+		kbd_config->layouts_variants =
+		    g_new0 (gchar *, g_strv_length (pdata->layouts) + 1);
+		i = 0;
+		while (*p != NULL) {
+			const gchar *full_layout =
+			    cafekbd_keyboard_config_merge_items (*p, *p1);
+			xkl_debug (150,
+				   "Loaded Kbd layout (with variant): [%s]\n",
+				   full_layout);
+			kbd_config->layouts_variants[i++] =
+			    g_strdup (full_layout);
+			p++;
+			p1++;
+		}
+	}
+
+	/* Options */
+	g_strfreev (kbd_config->options);
+	kbd_config->options = NULL;
+
+	if (pdata->options != NULL) {
+		p = pdata->options;
+		kbd_config->options =
+		    g_new0 (gchar *, g_strv_length (pdata->options) + 1);
+		i = 0;
+		while (*p != NULL) {
+			char *option = *p;
+			char *delim =<--- Variable 'delim' can be declared as pointer to const
+			    (option != NULL) ? strchr (option, ':') : NULL;<--- Condition 'option!=NULL' is always true
+			int len;
+			if ((delim != NULL) &&
+			    ((len =
+			      (delim - option)) <
+			     XKL_MAX_CI_NAME_LENGTH)) {
+				char group[XKL_MAX_CI_NAME_LENGTH];
+
+				strncpy (group, option, len);
+				group[len] = 0;
+				xkl_debug (150,
+					   "Loaded Kbd option: [%s][%s]\n",
+					   group, option);
+				cafekbd_keyboard_config_options_set
+				    (kbd_config, i++, group, option);
+			}
+			p++;
+		}
+	}
+}
+
+static void
+cafekbd_keyboard_config_copy_to_xkl_config (CafekbdKeyboardConfig * kbd_config,
+					 XklConfigRec * pdata)
+{
+	int i;
+	int num_layouts, num_options;
+	pdata->model =
+	    (kbd_config->model ==
+	     NULL) ? NULL : g_strdup (kbd_config->model);
+
+	num_layouts =
+	    (kbd_config->layouts_variants ==
+	     NULL) ? 0 : g_strv_length (kbd_config->layouts_variants);
+	num_options =
+	    (kbd_config->options ==
+	     NULL) ? 0 : g_strv_length (kbd_config->options);
+
+	xkl_debug (150, "Taking %d layouts\n", num_layouts);
+	if (num_layouts != 0) {
+		gchar **the_layout_variant = kbd_config->layouts_variants;
+		char **p1 = pdata->layouts =
+		    g_new0 (char *, num_layouts + 1);
+		char **p2 = pdata->variants =
+		    g_new0 (char *, num_layouts + 1);
+		for (i = num_layouts; --i >= 0;) {
+			char *layout, *variant;
+			if (cafekbd_keyboard_config_split_items
+			    (*the_layout_variant, &layout, &variant)
+			    && variant != NULL) {
+				*p1 =
+				    (layout ==
+				     NULL) ? g_strdup ("") :
+				    g_strdup (layout);
+				*p2 =
+				    (variant ==<--- Condition 'variant==NULL' is always false
+				     NULL) ? g_strdup ("") :
+				    g_strdup (variant);
+			} else {
+				*p1 =
+				    (*the_layout_variant ==
+				     NULL) ? g_strdup ("") :
+				    g_strdup (*the_layout_variant);
+				*p2 = g_strdup ("");
+			}
+			xkl_debug (150, "Adding [%s]/%p and [%s]/%p\n",
+				   *p1 ? *p1 : "(nil)", *p1,
+				   *p2 ? *p2 : "(nil)", *p2);
+			p1++;
+			p2++;
+			the_layout_variant++;
+		}
+	}
+
+	if (num_options != 0) {
+		gchar **the_option = kbd_config->options;
+		char **p = pdata->options =
+		    g_new0 (char *, num_options + 1);
+		for (i = num_options; --i >= 0;) {
+			char *group, *option;
+			if (cafekbd_keyboard_config_split_items
+			    (*the_option, &group, &option)
+			    && option != NULL)
+				*(p++) = g_strdup (option);
+			else {
+				*(p++) = g_strdup ("");
+				xkl_debug (150, "Could not split [%s]\n",
+					   *the_option);
+			}
+			the_option++;
+		}
+	}
+}
+
+static void
+cafekbd_keyboard_config_load_params (CafekbdKeyboardConfig * kbd_config,
+				  const gchar * param_names[])
+{
+	gchar *pc;
+
+	pc = g_settings_get_string (kbd_config->settings, param_names[0]);
+	if (pc == NULL) {
+		cafekbd_keyboard_config_model_set (kbd_config, NULL);
+	} else {
+		cafekbd_keyboard_config_model_set (kbd_config, pc);
+		g_free (pc);
+	}
+	xkl_debug (150, "Loaded Kbd model: [%s]\n",
+		   kbd_config->model ? kbd_config->model : "(null)");
+
+	g_strfreev (kbd_config->layouts_variants);
+
+	kbd_config->layouts_variants =
+	    g_settings_get_strv (kbd_config->settings, param_names[1]);
+
+	if (kbd_config->layouts_variants != NULL
+	    && kbd_config->layouts_variants[0] == NULL) {
+		g_strfreev (kbd_config->layouts_variants);
+		kbd_config->layouts_variants = NULL;
+	}
+
+	g_strfreev (kbd_config->options);
+
+	kbd_config->options =
+	    g_settings_get_strv (kbd_config->settings, param_names[2]);
+
+	if (kbd_config->options != NULL && kbd_config->options[0] == NULL) {
+		g_strfreev (kbd_config->options);
+		kbd_config->options = NULL;
+	}
+}
+
+static void
+cafekbd_keyboard_config_save_params (CafekbdKeyboardConfig * kbd_config,
+				  const gchar * param_names[])
+{
+	gchar **pl;
+
+	if (kbd_config->model)
+		g_settings_set_string (kbd_config->settings, param_names[0],
+				       kbd_config->model);
+	else
+		g_settings_set_string (kbd_config->settings, param_names[0],
+				       NULL);
+	xkl_debug (150, "Saved Kbd model: [%s]\n",
+		   kbd_config->model ? kbd_config->model : "(null)");
+
+	if (kbd_config->layouts_variants) {
+		pl = kbd_config->layouts_variants;
+		while (*pl != NULL) {
+			xkl_debug (150, "Saved Kbd layout: [%s]\n", *pl);
+			pl++;
+		}
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[1],
+				     (const gchar * const *)
+				     kbd_config->layouts_variants);
+	} else {
+		xkl_debug (150, "Saved Kbd layouts: []\n");
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[1], NULL);
+	}
+
+	if (kbd_config->options) {
+		pl = kbd_config->options;
+		while (*pl != NULL) {
+			xkl_debug (150, "Saved Kbd option: [%s]\n", *pl);
+			pl++;
+		}
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[2],
+				     (const gchar *
+				      const *) kbd_config->options);
+	} else {
+		xkl_debug (150, "Saved Kbd options: []\n");
+		g_settings_set_strv (kbd_config->settings,
+				     param_names[2], NULL);
+	}
+}
+
+/*
+ * extern CafekbdKeyboardConfig config functions
+ */
+void
+cafekbd_keyboard_config_init (CafekbdKeyboardConfig * kbd_config,
+			      XklEngine * engine)
+{
+	memset (kbd_config, 0, sizeof (*kbd_config));
+	kbd_config->settings = g_settings_new (CAFEKBD_KEYBOARD_CONFIG_SCHEMA);
+	kbd_config->engine = engine;
+}
+
+void
+cafekbd_keyboard_config_term (CafekbdKeyboardConfig * kbd_config)
+{
+	cafekbd_keyboard_config_model_set (kbd_config, NULL);
+
+	g_strfreev (kbd_config->layouts_variants);
+	kbd_config->layouts_variants = NULL;
+	g_strfreev (kbd_config->options);
+	kbd_config->options = NULL;
+
+	g_object_unref (kbd_config->settings);
+	kbd_config->settings = NULL;
+}
+
+void
+cafekbd_keyboard_config_load_from_gsettings (CafekbdKeyboardConfig * kbd_config,
+				      CafekbdKeyboardConfig *
+				      kbd_config_default)
+{
+	cafekbd_keyboard_config_load_params (kbd_config,
+					  CAFEKBD_KEYBOARD_CONFIG_ACTIVE);
+
+	if (kbd_config_default != NULL) {
+
+		if (kbd_config->model == NULL)
+			kbd_config->model =
+			    g_strdup (kbd_config_default->model);
+
+		if (kbd_config->layouts_variants == NULL) {
+			kbd_config->layouts_variants =
+			    g_strdupv
+			    (kbd_config_default->layouts_variants);
+		}
+
+		if (kbd_config->options == NULL) {
+			kbd_config->options =
+			    g_strdupv (kbd_config_default->options);
+		}
+	}
+}
+
+void
+cafekbd_keyboard_config_load_from_x_current (CafekbdKeyboardConfig * kbd_config,
+					  XklConfigRec * data)
+{
+	gboolean own_data = data == NULL;
+	xkl_debug (150, "Copying config from X(current)\n");
+	if (own_data)
+		data = xkl_config_rec_new ();
+	if (xkl_config_rec_get_from_server (data, kbd_config->engine))
+		cafekbd_keyboard_config_copy_from_xkl_config (kbd_config,
+							   data);
+	else
+		xkl_debug (150,
+			   "Could not load keyboard config from server: [%s]\n",
+			   xkl_get_last_error ());
+	if (own_data)
+		g_object_unref (G_OBJECT (data));
+}
+
+void
+cafekbd_keyboard_config_load_from_x_initial (CafekbdKeyboardConfig * kbd_config,
+					  XklConfigRec * data)
+{
+	gboolean own_data = data == NULL;
+	xkl_debug (150, "Copying config from X(initial)\n");
+	if (own_data)
+		data = xkl_config_rec_new ();
+	if (xkl_config_rec_get_from_backup (data, kbd_config->engine))
+		cafekbd_keyboard_config_copy_from_xkl_config (kbd_config,
+							   data);
+	else
+		xkl_debug (150,
+			   "Could not load keyboard config from backup: [%s]\n",
+			   xkl_get_last_error ());
+	if (own_data)
+		g_object_unref (G_OBJECT (data));
+}
+
+static gboolean
+cafekbd_keyboard_config_options_equals (CafekbdKeyboardConfig * kbd_config1,
+				     CafekbdKeyboardConfig * kbd_config2)
+{
+	int num_options, num_options2;
+
+	num_options =
+	    (kbd_config1->options ==
+	     NULL) ? 0 : g_strv_length (kbd_config1->options);
+	num_options2 =
+	    (kbd_config2->options ==
+	     NULL) ? 0 : g_strv_length (kbd_config2->options);
+
+	if (num_options != num_options2)
+		return False;
+
+	if (num_options != 0) {
+		int i;
+		char *group1, *option1;
+
+		for (i = 0; i < num_options; i++) {
+			int j;
+			char *group2, *option2;
+			gboolean are_equal = FALSE;
+
+			if (!cafekbd_keyboard_config_split_items
+			    (kbd_config1->options[i], &group1, &option1))
+				continue;
+
+			option1 = g_strdup (option1);
+
+			for (j = 0; j < num_options && !are_equal; j++) {
+				if (cafekbd_keyboard_config_split_items
+				    (kbd_config2->options[j], &group2,
+				     &option2)) {
+					are_equal =
+					    strcmp (option1, option2) == 0;
+				}
+			}
+
+			g_free (option1);
+
+			if (!are_equal)
+				return False;
+		}
+	}
+
+	return True;
+}
+
+gboolean
+cafekbd_keyboard_config_equals (CafekbdKeyboardConfig * kbd_config1,
+			     CafekbdKeyboardConfig * kbd_config2)
+{
+	if (kbd_config1 == kbd_config2)
+		return True;
+	if ((kbd_config1->model != kbd_config2->model) &&
+	    (kbd_config1->model != NULL) &&
+	    (kbd_config2->model != NULL) &&
+	    g_ascii_strcasecmp (kbd_config1->model, kbd_config2->model))
+		return False;
+	if (!cafekbd_strv_equal (kbd_config1->layouts_variants,
+			   kbd_config2->layouts_variants))
+		return False;
+
+	if (!cafekbd_keyboard_config_options_equals
+	    (kbd_config1, kbd_config2))
+		return False;
+
+	return True;
+}
+
+void
+cafekbd_keyboard_config_save_to_gsettings (CafekbdKeyboardConfig * kbd_config)
+{
+	g_settings_delay (kbd_config->settings);
+
+	cafekbd_keyboard_config_save_params (kbd_config,
+					     CAFEKBD_KEYBOARD_CONFIG_ACTIVE);
+
+	g_settings_apply (kbd_config->settings);
+}
+
+void
+cafekbd_keyboard_config_model_set (CafekbdKeyboardConfig * kbd_config,
+				const gchar * model_name)
+{
+	if (kbd_config->model != NULL)
+		g_free (kbd_config->model);
+	kbd_config->model =
+	    (model_name == NULL
+	     || model_name[0] == '\0') ? NULL : g_strdup (model_name);
+}
+
+void
+cafekbd_keyboard_config_options_set (CafekbdKeyboardConfig * kbd_config,
+				  gint idx,
+				  const gchar * group_name,
+				  const gchar * option_name)
+{
+	const gchar *merged;
+	if (group_name == NULL || option_name == NULL)
+		return;
+	merged =
+	    cafekbd_keyboard_config_merge_items (group_name, option_name);
+	if (merged == NULL)
+		return;
+	kbd_config->options[idx] = g_strdup (merged);
+}
+
+gboolean
+cafekbd_keyboard_config_options_is_set (CafekbdKeyboardConfig * kbd_config,<--- Parameter 'kbd_config' can be declared as pointer to const
+				     const gchar * group_name,
+				     const gchar * option_name)
+{
+	gchar **p = kbd_config->options;
+	const gchar *merged =
+	    cafekbd_keyboard_config_merge_items (group_name, option_name);
+	if (merged == NULL)
+		return FALSE;
+
+	while (p && *p) {
+		if (!g_ascii_strcasecmp (merged, *p++))
+			return TRUE;
+	}
+	return FALSE;
+}
+
+gboolean
+cafekbd_keyboard_config_activate (CafekbdKeyboardConfig * kbd_config)
+{
+	gboolean rv;
+	XklConfigRec *data = xkl_config_rec_new ();
+
+	cafekbd_keyboard_config_copy_to_xkl_config (kbd_config, data);
+	rv = xkl_config_rec_activate (data, kbd_config->engine);
+	g_object_unref (G_OBJECT (data));
+
+	return rv;
+}
+
+/**
+ * cafekbd_keyboard_config_start_listen:
+ * @func: (scope notified): a function to call when settings are changed
+ */
+void
+cafekbd_keyboard_config_start_listen (CafekbdKeyboardConfig * kbd_config,
+				   GCallback func,
+				   gpointer user_data)
+{
+	kbd_config->config_listener_id =
+	    g_signal_connect (kbd_config->settings, "changed", func,
+			      user_data);
+}
+
+void
+cafekbd_keyboard_config_stop_listen (CafekbdKeyboardConfig * kbd_config)
+{
+	g_signal_handler_disconnect (kbd_config->settings,
+				     kbd_config->config_listener_id);
+	kbd_config->config_listener_id = 0;
+}
+
+gboolean
+cafekbd_keyboard_config_get_descriptions (XklConfigRegistry * config_registry,
+				       const gchar * name,
+				       gchar ** layout_short_descr,
+				       gchar ** layout_descr,
+				       gchar ** variant_short_descr,
+				       gchar ** variant_descr)
+{
+	char *layout_name = NULL, *variant_name = NULL;
+	if (!cafekbd_keyboard_config_split_items
+	    (name, &layout_name, &variant_name))
+		return FALSE;
+	return cafekbd_keyboard_config_get_lv_descriptions (config_registry,
+							 layout_name,
+							 variant_name,
+							 layout_short_descr,
+							 layout_descr,
+							 variant_short_descr,
+							 variant_descr);
+}
+
+const gchar *
+cafekbd_keyboard_config_format_full_layout (const gchar * layout_descr,
+					 const gchar * variant_descr)
+{
+	static gchar full_descr[XKL_MAX_CI_DESC_LENGTH * 2];
+	if (variant_descr == NULL || variant_descr[0] == 0)
+		g_snprintf (full_descr, sizeof (full_descr), "%s",
+			    layout_descr);
+	else
+		g_snprintf (full_descr, sizeof (full_descr), "%s %s",
+			    layout_descr, variant_descr);
+	return full_descr;
+}
+
+gchar *
+cafekbd_keyboard_config_to_string (const CafekbdKeyboardConfig * config)
+{
+	gchar *layouts = NULL, *options = NULL;
+	GString *buffer = g_string_new (NULL);
+
+	gchar **iter;
+	gint count;
+	gchar *result;
+
+	if (config->layouts_variants) {
+		/* g_slist_length is "expensive", so we determinate the length on the fly */
+		for (iter = config->layouts_variants, count = 0; *iter;
+		     iter++, ++count) {
+			if (buffer->len)
+				g_string_append (buffer, " ");
+
+			g_string_append (buffer, *iter);
+		}
+
+		/* Translators: The count is related to the number of options. The %s
+		 * format specifier should not be modified, left "as is". */
+		layouts =
+		    g_strdup_printf (ngettext
+				     ("layout \"%s\"", "layouts \"%s\"",
+				      count), buffer->str);
+		g_string_truncate (buffer, 0);
+	}
+	if (config->options) {
+		/* g_slist_length is "expensive", so we determinate the length on the fly */
+		for (iter = config->options, count = 0; *iter;
+		     iter++, ++count) {
+			if (buffer->len)
+				g_string_append (buffer, " ");
+
+			g_string_append (buffer, *iter);
+		}
+
+		/* Translators: The count is related to the number of options. The %s
+		 * format specifier should not be modified, left "as is". */
+		options =
+		    g_strdup_printf (ngettext
+				     ("option \"%s\"", "options \"%s\"",
+				      count), buffer->str);
+		g_string_truncate (buffer, 0);
+	}
+
+	g_string_free (buffer, TRUE);
+
+	result =
+	    g_strdup_printf (_("model \"%s\", %s and %s"), config->model,
+			     layouts ? layouts : _("no layout"),
+			     options ? options : _("no options"));
+
+	g_free (options);
+	g_free (layouts);
+
+	return result;
+}
+
+/**
+ * cafekbd_keyboard_config_add_default_switch_option_if_necessary:
+ *
+ * Returns: (transfer full) (array zero-terminated=1): List of options
+ */
+gchar **
+cafekbd_keyboard_config_add_default_switch_option_if_necessary (gchar **
+							        layouts_list,
+							        gchar **
+							        options_list,
+							        gboolean *was_appended)
+{
+	*was_appended = FALSE;
+	if (g_strv_length (layouts_list) >= 2) {
+		gboolean any_switcher = False;
+		if (*options_list != NULL) {
+			gchar **option = options_list;
+			while (*option != NULL) {
+				char *g, *o;
+				if (cafekbd_keyboard_config_split_items
+				    (*option, &g, &o)) {
+					if (!g_ascii_strcasecmp
+					    (g, GROUP_SWITCHERS_GROUP)) {
+						any_switcher = True;
+						break;
+					}
+				}
+				option++;
+			}
+		}
+		if (!any_switcher) {
+			const gchar *id =
+			    cafekbd_keyboard_config_merge_items
+			    (GROUP_SWITCHERS_GROUP,
+			     DEFAULT_GROUP_SWITCH);
+			options_list =
+			    cafekbd_strv_append (options_list, g_strdup (id));
+			*was_appended = TRUE;
+		}
+	}
+	return options_list;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/4.html b/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/4.html new file mode 100644 index 0000000..1d97c26 --- /dev/null +++ b/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/4.html @@ -0,0 +1,6042 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
   1
+   2
+   3
+   4
+   5
+   6
+   7
+   8
+   9
+  10
+  11
+  12
+  13
+  14
+  15
+  16
+  17
+  18
+  19
+  20
+  21
+  22
+  23
+  24
+  25
+  26
+  27
+  28
+  29
+  30
+  31
+  32
+  33
+  34
+  35
+  36
+  37
+  38
+  39
+  40
+  41
+  42
+  43
+  44
+  45
+  46
+  47
+  48
+  49
+  50
+  51
+  52
+  53
+  54
+  55
+  56
+  57
+  58
+  59
+  60
+  61
+  62
+  63
+  64
+  65
+  66
+  67
+  68
+  69
+  70
+  71
+  72
+  73
+  74
+  75
+  76
+  77
+  78
+  79
+  80
+  81
+  82
+  83
+  84
+  85
+  86
+  87
+  88
+  89
+  90
+  91
+  92
+  93
+  94
+  95
+  96
+  97
+  98
+  99
+ 100
+ 101
+ 102
+ 103
+ 104
+ 105
+ 106
+ 107
+ 108
+ 109
+ 110
+ 111
+ 112
+ 113
+ 114
+ 115
+ 116
+ 117
+ 118
+ 119
+ 120
+ 121
+ 122
+ 123
+ 124
+ 125
+ 126
+ 127
+ 128
+ 129
+ 130
+ 131
+ 132
+ 133
+ 134
+ 135
+ 136
+ 137
+ 138
+ 139
+ 140
+ 141
+ 142
+ 143
+ 144
+ 145
+ 146
+ 147
+ 148
+ 149
+ 150
+ 151
+ 152
+ 153
+ 154
+ 155
+ 156
+ 157
+ 158
+ 159
+ 160
+ 161
+ 162
+ 163
+ 164
+ 165
+ 166
+ 167
+ 168
+ 169
+ 170
+ 171
+ 172
+ 173
+ 174
+ 175
+ 176
+ 177
+ 178
+ 179
+ 180
+ 181
+ 182
+ 183
+ 184
+ 185
+ 186
+ 187
+ 188
+ 189
+ 190
+ 191
+ 192
+ 193
+ 194
+ 195
+ 196
+ 197
+ 198
+ 199
+ 200
+ 201
+ 202
+ 203
+ 204
+ 205
+ 206
+ 207
+ 208
+ 209
+ 210
+ 211
+ 212
+ 213
+ 214
+ 215
+ 216
+ 217
+ 218
+ 219
+ 220
+ 221
+ 222
+ 223
+ 224
+ 225
+ 226
+ 227
+ 228
+ 229
+ 230
+ 231
+ 232
+ 233
+ 234
+ 235
+ 236
+ 237
+ 238
+ 239
+ 240
+ 241
+ 242
+ 243
+ 244
+ 245
+ 246
+ 247
+ 248
+ 249
+ 250
+ 251
+ 252
+ 253
+ 254
+ 255
+ 256
+ 257
+ 258
+ 259
+ 260
+ 261
+ 262
+ 263
+ 264
+ 265
+ 266
+ 267
+ 268
+ 269
+ 270
+ 271
+ 272
+ 273
+ 274
+ 275
+ 276
+ 277
+ 278
+ 279
+ 280
+ 281
+ 282
+ 283
+ 284
+ 285
+ 286
+ 287
+ 288
+ 289
+ 290
+ 291
+ 292
+ 293
+ 294
+ 295
+ 296
+ 297
+ 298
+ 299
+ 300
+ 301
+ 302
+ 303
+ 304
+ 305
+ 306
+ 307
+ 308
+ 309
+ 310
+ 311
+ 312
+ 313
+ 314
+ 315
+ 316
+ 317
+ 318
+ 319
+ 320
+ 321
+ 322
+ 323
+ 324
+ 325
+ 326
+ 327
+ 328
+ 329
+ 330
+ 331
+ 332
+ 333
+ 334
+ 335
+ 336
+ 337
+ 338
+ 339
+ 340
+ 341
+ 342
+ 343
+ 344
+ 345
+ 346
+ 347
+ 348
+ 349
+ 350
+ 351
+ 352
+ 353
+ 354
+ 355
+ 356
+ 357
+ 358
+ 359
+ 360
+ 361
+ 362
+ 363
+ 364
+ 365
+ 366
+ 367
+ 368
+ 369
+ 370
+ 371
+ 372
+ 373
+ 374
+ 375
+ 376
+ 377
+ 378
+ 379
+ 380
+ 381
+ 382
+ 383
+ 384
+ 385
+ 386
+ 387
+ 388
+ 389
+ 390
+ 391
+ 392
+ 393
+ 394
+ 395
+ 396
+ 397
+ 398
+ 399
+ 400
+ 401
+ 402
+ 403
+ 404
+ 405
+ 406
+ 407
+ 408
+ 409
+ 410
+ 411
+ 412
+ 413
+ 414
+ 415
+ 416
+ 417
+ 418
+ 419
+ 420
+ 421
+ 422
+ 423
+ 424
+ 425
+ 426
+ 427
+ 428
+ 429
+ 430
+ 431
+ 432
+ 433
+ 434
+ 435
+ 436
+ 437
+ 438
+ 439
+ 440
+ 441
+ 442
+ 443
+ 444
+ 445
+ 446
+ 447
+ 448
+ 449
+ 450
+ 451
+ 452
+ 453
+ 454
+ 455
+ 456
+ 457
+ 458
+ 459
+ 460
+ 461
+ 462
+ 463
+ 464
+ 465
+ 466
+ 467
+ 468
+ 469
+ 470
+ 471
+ 472
+ 473
+ 474
+ 475
+ 476
+ 477
+ 478
+ 479
+ 480
+ 481
+ 482
+ 483
+ 484
+ 485
+ 486
+ 487
+ 488
+ 489
+ 490
+ 491
+ 492
+ 493
+ 494
+ 495
+ 496
+ 497
+ 498
+ 499
+ 500
+ 501
+ 502
+ 503
+ 504
+ 505
+ 506
+ 507
+ 508
+ 509
+ 510
+ 511
+ 512
+ 513
+ 514
+ 515
+ 516
+ 517
+ 518
+ 519
+ 520
+ 521
+ 522
+ 523
+ 524
+ 525
+ 526
+ 527
+ 528
+ 529
+ 530
+ 531
+ 532
+ 533
+ 534
+ 535
+ 536
+ 537
+ 538
+ 539
+ 540
+ 541
+ 542
+ 543
+ 544
+ 545
+ 546
+ 547
+ 548
+ 549
+ 550
+ 551
+ 552
+ 553
+ 554
+ 555
+ 556
+ 557
+ 558
+ 559
+ 560
+ 561
+ 562
+ 563
+ 564
+ 565
+ 566
+ 567
+ 568
+ 569
+ 570
+ 571
+ 572
+ 573
+ 574
+ 575
+ 576
+ 577
+ 578
+ 579
+ 580
+ 581
+ 582
+ 583
+ 584
+ 585
+ 586
+ 587
+ 588
+ 589
+ 590
+ 591
+ 592
+ 593
+ 594
+ 595
+ 596
+ 597
+ 598
+ 599
+ 600
+ 601
+ 602
+ 603
+ 604
+ 605
+ 606
+ 607
+ 608
+ 609
+ 610
+ 611
+ 612
+ 613
+ 614
+ 615
+ 616
+ 617
+ 618
+ 619
+ 620
+ 621
+ 622
+ 623
+ 624
+ 625
+ 626
+ 627
+ 628
+ 629
+ 630
+ 631
+ 632
+ 633
+ 634
+ 635
+ 636
+ 637
+ 638
+ 639
+ 640
+ 641
+ 642
+ 643
+ 644
+ 645
+ 646
+ 647
+ 648
+ 649
+ 650
+ 651
+ 652
+ 653
+ 654
+ 655
+ 656
+ 657
+ 658
+ 659
+ 660
+ 661
+ 662
+ 663
+ 664
+ 665
+ 666
+ 667
+ 668
+ 669
+ 670
+ 671
+ 672
+ 673
+ 674
+ 675
+ 676
+ 677
+ 678
+ 679
+ 680
+ 681
+ 682
+ 683
+ 684
+ 685
+ 686
+ 687
+ 688
+ 689
+ 690
+ 691
+ 692
+ 693
+ 694
+ 695
+ 696
+ 697
+ 698
+ 699
+ 700
+ 701
+ 702
+ 703
+ 704
+ 705
+ 706
+ 707
+ 708
+ 709
+ 710
+ 711
+ 712
+ 713
+ 714
+ 715
+ 716
+ 717
+ 718
+ 719
+ 720
+ 721
+ 722
+ 723
+ 724
+ 725
+ 726
+ 727
+ 728
+ 729
+ 730
+ 731
+ 732
+ 733
+ 734
+ 735
+ 736
+ 737
+ 738
+ 739
+ 740
+ 741
+ 742
+ 743
+ 744
+ 745
+ 746
+ 747
+ 748
+ 749
+ 750
+ 751
+ 752
+ 753
+ 754
+ 755
+ 756
+ 757
+ 758
+ 759
+ 760
+ 761
+ 762
+ 763
+ 764
+ 765
+ 766
+ 767
+ 768
+ 769
+ 770
+ 771
+ 772
+ 773
+ 774
+ 775
+ 776
+ 777
+ 778
+ 779
+ 780
+ 781
+ 782
+ 783
+ 784
+ 785
+ 786
+ 787
+ 788
+ 789
+ 790
+ 791
+ 792
+ 793
+ 794
+ 795
+ 796
+ 797
+ 798
+ 799
+ 800
+ 801
+ 802
+ 803
+ 804
+ 805
+ 806
+ 807
+ 808
+ 809
+ 810
+ 811
+ 812
+ 813
+ 814
+ 815
+ 816
+ 817
+ 818
+ 819
+ 820
+ 821
+ 822
+ 823
+ 824
+ 825
+ 826
+ 827
+ 828
+ 829
+ 830
+ 831
+ 832
+ 833
+ 834
+ 835
+ 836
+ 837
+ 838
+ 839
+ 840
+ 841
+ 842
+ 843
+ 844
+ 845
+ 846
+ 847
+ 848
+ 849
+ 850
+ 851
+ 852
+ 853
+ 854
+ 855
+ 856
+ 857
+ 858
+ 859
+ 860
+ 861
+ 862
+ 863
+ 864
+ 865
+ 866
+ 867
+ 868
+ 869
+ 870
+ 871
+ 872
+ 873
+ 874
+ 875
+ 876
+ 877
+ 878
+ 879
+ 880
+ 881
+ 882
+ 883
+ 884
+ 885
+ 886
+ 887
+ 888
+ 889
+ 890
+ 891
+ 892
+ 893
+ 894
+ 895
+ 896
+ 897
+ 898
+ 899
+ 900
+ 901
+ 902
+ 903
+ 904
+ 905
+ 906
+ 907
+ 908
+ 909
+ 910
+ 911
+ 912
+ 913
+ 914
+ 915
+ 916
+ 917
+ 918
+ 919
+ 920
+ 921
+ 922
+ 923
+ 924
+ 925
+ 926
+ 927
+ 928
+ 929
+ 930
+ 931
+ 932
+ 933
+ 934
+ 935
+ 936
+ 937
+ 938
+ 939
+ 940
+ 941
+ 942
+ 943
+ 944
+ 945
+ 946
+ 947
+ 948
+ 949
+ 950
+ 951
+ 952
+ 953
+ 954
+ 955
+ 956
+ 957
+ 958
+ 959
+ 960
+ 961
+ 962
+ 963
+ 964
+ 965
+ 966
+ 967
+ 968
+ 969
+ 970
+ 971
+ 972
+ 973
+ 974
+ 975
+ 976
+ 977
+ 978
+ 979
+ 980
+ 981
+ 982
+ 983
+ 984
+ 985
+ 986
+ 987
+ 988
+ 989
+ 990
+ 991
+ 992
+ 993
+ 994
+ 995
+ 996
+ 997
+ 998
+ 999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+1011
+1012
+1013
+1014
+1015
+1016
+1017
+1018
+1019
+1020
+1021
+1022
+1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
+1033
+1034
+1035
+1036
+1037
+1038
+1039
+1040
+1041
+1042
+1043
+1044
+1045
+1046
+1047
+1048
+1049
+1050
+1051
+1052
+1053
+1054
+1055
+1056
+1057
+1058
+1059
+1060
+1061
+1062
+1063
+1064
+1065
+1066
+1067
+1068
+1069
+1070
+1071
+1072
+1073
+1074
+1075
+1076
+1077
+1078
+1079
+1080
+1081
+1082
+1083
+1084
+1085
+1086
+1087
+1088
+1089
+1090
+1091
+1092
+1093
+1094
+1095
+1096
+1097
+1098
+1099
+1100
+1101
+1102
+1103
+1104
+1105
+1106
+1107
+1108
+1109
+1110
+1111
+1112
+1113
+1114
+1115
+1116
+1117
+1118
+1119
+1120
+1121
+1122
+1123
+1124
+1125
+1126
+1127
+1128
+1129
+1130
+1131
+1132
+1133
+1134
+1135
+1136
+1137
+1138
+1139
+1140
+1141
+1142
+1143
+1144
+1145
+1146
+1147
+1148
+1149
+1150
+1151
+1152
+1153
+1154
+1155
+1156
+1157
+1158
+1159
+1160
+1161
+1162
+1163
+1164
+1165
+1166
+1167
+1168
+1169
+1170
+1171
+1172
+1173
+1174
+1175
+1176
+1177
+1178
+1179
+1180
+1181
+1182
+1183
+1184
+1185
+1186
+1187
+1188
+1189
+1190
+1191
+1192
+1193
+1194
+1195
+1196
+1197
+1198
+1199
+1200
+1201
+1202
+1203
+1204
+1205
+1206
+1207
+1208
+1209
+1210
+1211
+1212
+1213
+1214
+1215
+1216
+1217
+1218
+1219
+1220
+1221
+1222
+1223
+1224
+1225
+1226
+1227
+1228
+1229
+1230
+1231
+1232
+1233
+1234
+1235
+1236
+1237
+1238
+1239
+1240
+1241
+1242
+1243
+1244
+1245
+1246
+1247
+1248
+1249
+1250
+1251
+1252
+1253
+1254
+1255
+1256
+1257
+1258
+1259
+1260
+1261
+1262
+1263
+1264
+1265
+1266
+1267
+1268
+1269
+1270
+1271
+1272
+1273
+1274
+1275
+1276
+1277
+1278
+1279
+1280
+1281
+1282
+1283
+1284
+1285
+1286
+1287
+1288
+1289
+1290
+1291
+1292
+1293
+1294
+1295
+1296
+1297
+1298
+1299
+1300
+1301
+1302
+1303
+1304
+1305
+1306
+1307
+1308
+1309
+1310
+1311
+1312
+1313
+1314
+1315
+1316
+1317
+1318
+1319
+1320
+1321
+1322
+1323
+1324
+1325
+1326
+1327
+1328
+1329
+1330
+1331
+1332
+1333
+1334
+1335
+1336
+1337
+1338
+1339
+1340
+1341
+1342
+1343
+1344
+1345
+1346
+1347
+1348
+1349
+1350
+1351
+1352
+1353
+1354
+1355
+1356
+1357
+1358
+1359
+1360
+1361
+1362
+1363
+1364
+1365
+1366
+1367
+1368
+1369
+1370
+1371
+1372
+1373
+1374
+1375
+1376
+1377
+1378
+1379
+1380
+1381
+1382
+1383
+1384
+1385
+1386
+1387
+1388
+1389
+1390
+1391
+1392
+1393
+1394
+1395
+1396
+1397
+1398
+1399
+1400
+1401
+1402
+1403
+1404
+1405
+1406
+1407
+1408
+1409
+1410
+1411
+1412
+1413
+1414
+1415
+1416
+1417
+1418
+1419
+1420
+1421
+1422
+1423
+1424
+1425
+1426
+1427
+1428
+1429
+1430
+1431
+1432
+1433
+1434
+1435
+1436
+1437
+1438
+1439
+1440
+1441
+1442
+1443
+1444
+1445
+1446
+1447
+1448
+1449
+1450
+1451
+1452
+1453
+1454
+1455
+1456
+1457
+1458
+1459
+1460
+1461
+1462
+1463
+1464
+1465
+1466
+1467
+1468
+1469
+1470
+1471
+1472
+1473
+1474
+1475
+1476
+1477
+1478
+1479
+1480
+1481
+1482
+1483
+1484
+1485
+1486
+1487
+1488
+1489
+1490
+1491
+1492
+1493
+1494
+1495
+1496
+1497
+1498
+1499
+1500
+1501
+1502
+1503
+1504
+1505
+1506
+1507
+1508
+1509
+1510
+1511
+1512
+1513
+1514
+1515
+1516
+1517
+1518
+1519
+1520
+1521
+1522
+1523
+1524
+1525
+1526
+1527
+1528
+1529
+1530
+1531
+1532
+1533
+1534
+1535
+1536
+1537
+1538
+1539
+1540
+1541
+1542
+1543
+1544
+1545
+1546
+1547
+1548
+1549
+1550
+1551
+1552
+1553
+1554
+1555
+1556
+1557
+1558
+1559
+1560
+1561
+1562
+1563
+1564
+1565
+1566
+1567
+1568
+1569
+1570
+1571
+1572
+1573
+1574
+1575
+1576
+1577
+1578
+1579
+1580
+1581
+1582
+1583
+1584
+1585
+1586
+1587
+1588
+1589
+1590
+1591
+1592
+1593
+1594
+1595
+1596
+1597
+1598
+1599
+1600
+1601
+1602
+1603
+1604
+1605
+1606
+1607
+1608
+1609
+1610
+1611
+1612
+1613
+1614
+1615
+1616
+1617
+1618
+1619
+1620
+1621
+1622
+1623
+1624
+1625
+1626
+1627
+1628
+1629
+1630
+1631
+1632
+1633
+1634
+1635
+1636
+1637
+1638
+1639
+1640
+1641
+1642
+1643
+1644
+1645
+1646
+1647
+1648
+1649
+1650
+1651
+1652
+1653
+1654
+1655
+1656
+1657
+1658
+1659
+1660
+1661
+1662
+1663
+1664
+1665
+1666
+1667
+1668
+1669
+1670
+1671
+1672
+1673
+1674
+1675
+1676
+1677
+1678
+1679
+1680
+1681
+1682
+1683
+1684
+1685
+1686
+1687
+1688
+1689
+1690
+1691
+1692
+1693
+1694
+1695
+1696
+1697
+1698
+1699
+1700
+1701
+1702
+1703
+1704
+1705
+1706
+1707
+1708
+1709
+1710
+1711
+1712
+1713
+1714
+1715
+1716
+1717
+1718
+1719
+1720
+1721
+1722
+1723
+1724
+1725
+1726
+1727
+1728
+1729
+1730
+1731
+1732
+1733
+1734
+1735
+1736
+1737
+1738
+1739
+1740
+1741
+1742
+1743
+1744
+1745
+1746
+1747
+1748
+1749
+1750
+1751
+1752
+1753
+1754
+1755
+1756
+1757
+1758
+1759
+1760
+1761
+1762
+1763
+1764
+1765
+1766
+1767
+1768
+1769
+1770
+1771
+1772
+1773
+1774
+1775
+1776
+1777
+1778
+1779
+1780
+1781
+1782
+1783
+1784
+1785
+1786
+1787
+1788
+1789
+1790
+1791
+1792
+1793
+1794
+1795
+1796
+1797
+1798
+1799
+1800
+1801
+1802
+1803
+1804
+1805
+1806
+1807
+1808
+1809
+1810
+1811
+1812
+1813
+1814
+1815
+1816
+1817
+1818
+1819
+1820
+1821
+1822
+1823
+1824
+1825
+1826
+1827
+1828
+1829
+1830
+1831
+1832
+1833
+1834
+1835
+1836
+1837
+1838
+1839
+1840
+1841
+1842
+1843
+1844
+1845
+1846
+1847
+1848
+1849
+1850
+1851
+1852
+1853
+1854
+1855
+1856
+1857
+1858
+1859
+1860
+1861
+1862
+1863
+1864
+1865
+1866
+1867
+1868
+1869
+1870
+1871
+1872
+1873
+1874
+1875
+1876
+1877
+1878
+1879
+1880
+1881
+1882
+1883
+1884
+1885
+1886
+1887
+1888
+1889
+1890
+1891
+1892
+1893
+1894
+1895
+1896
+1897
+1898
+1899
+1900
+1901
+1902
+1903
+1904
+1905
+1906
+1907
+1908
+1909
+1910
+1911
+1912
+1913
+1914
+1915
+1916
+1917
+1918
+1919
+1920
+1921
+1922
+1923
+1924
+1925
+1926
+1927
+1928
+1929
+1930
+1931
+1932
+1933
+1934
+1935
+1936
+1937
+1938
+1939
+1940
+1941
+1942
+1943
+1944
+1945
+1946
+1947
+1948
+1949
+1950
+1951
+1952
+1953
+1954
+1955
+1956
+1957
+1958
+1959
+1960
+1961
+1962
+1963
+1964
+1965
+1966
+1967
+1968
+1969
+1970
+1971
+1972
+1973
+1974
+1975
+1976
+1977
+1978
+1979
+1980
+1981
+1982
+1983
+1984
+1985
+1986
+1987
+1988
+1989
+1990
+1991
+1992
+1993
+1994
+1995
+1996
+1997
+1998
+1999
+2000
+2001
+2002
+2003
+2004
+2005
+2006
+2007
+2008
+2009
+2010
+2011
+2012
+2013
+2014
+2015
+2016
+2017
+2018
+2019
+2020
+2021
+2022
+2023
+2024
+2025
+2026
+2027
+2028
+2029
+2030
+2031
+2032
+2033
+2034
+2035
+2036
+2037
+2038
+2039
+2040
+2041
+2042
+2043
+2044
+2045
+2046
+2047
+2048
+2049
+2050
+2051
+2052
+2053
+2054
+2055
+2056
+2057
+2058
+2059
+2060
+2061
+2062
+2063
+2064
+2065
+2066
+2067
+2068
+2069
+2070
+2071
+2072
+2073
+2074
+2075
+2076
+2077
+2078
+2079
+2080
+2081
+2082
+2083
+2084
+2085
+2086
+2087
+2088
+2089
+2090
+2091
+2092
+2093
+2094
+2095
+2096
+2097
+2098
+2099
+2100
+2101
+2102
+2103
+2104
+2105
+2106
+2107
+2108
+2109
+2110
+2111
+2112
+2113
+2114
+2115
+2116
+2117
+2118
+2119
+2120
+2121
+2122
+2123
+2124
+2125
+2126
+2127
+2128
+2129
+2130
+2131
+2132
+2133
+2134
+2135
+2136
+2137
+2138
+2139
+2140
+2141
+2142
+2143
+2144
+2145
+2146
+2147
+2148
+2149
+2150
+2151
+2152
+2153
+2154
+2155
+2156
+2157
+2158
+2159
+2160
+2161
+2162
+2163
+2164
+2165
+2166
+2167
+2168
+2169
+2170
+2171
+2172
+2173
+2174
+2175
+2176
+2177
+2178
+2179
+2180
+2181
+2182
+2183
+2184
+2185
+2186
+2187
+2188
+2189
+2190
+2191
+2192
+2193
+2194
+2195
+2196
+2197
+2198
+2199
+2200
+2201
+2202
+2203
+2204
+2205
+2206
+2207
+2208
+2209
+2210
+2211
+2212
+2213
+2214
+2215
+2216
+2217
+2218
+2219
+2220
+2221
+2222
+2223
+2224
+2225
+2226
+2227
+2228
+2229
+2230
+2231
+2232
+2233
+2234
+2235
+2236
+2237
+2238
+2239
+2240
+2241
+2242
+2243
+2244
+2245
+2246
+2247
+2248
+2249
+2250
+2251
+2252
+2253
+2254
+2255
+2256
+2257
+2258
+2259
+2260
+2261
+2262
+2263
+2264
+2265
+2266
+2267
+2268
+2269
+2270
+2271
+2272
+2273
+2274
+2275
+2276
+2277
+2278
+2279
+2280
+2281
+2282
+2283
+2284
+2285
+2286
+2287
+2288
+2289
+2290
+2291
+2292
+2293
+2294
+2295
+2296
+2297
+2298
+2299
+2300
+2301
+2302
+2303
+2304
+2305
+2306
+2307
+2308
+2309
+2310
+2311
+2312
+2313
+2314
+2315
+2316
+2317
+2318
+2319
+2320
+2321
+2322
+2323
+2324
+2325
+2326
+2327
+2328
+2329
+2330
+2331
+2332
+2333
+2334
+2335
+2336
+2337
+2338
+2339
+2340
+2341
+2342
+2343
+2344
+2345
+2346
+2347
+2348
+2349
+2350
+2351
+2352
+2353
+2354
+2355
+2356
+2357
+2358
+2359
+2360
+2361
+2362
+2363
+2364
+2365
+2366
+2367
+2368
+2369
+2370
+2371
+2372
+2373
+2374
+2375
+2376
+2377
+2378
+2379
+2380
+2381
+2382
+2383
+2384
+2385
+2386
+2387
+2388
+2389
+2390
+2391
+2392
+2393
+2394
+2395
+2396
+2397
+2398
+2399
+2400
+2401
+2402
+2403
+2404
+2405
+2406
+2407
+2408
+2409
+2410
+2411
+2412
+2413
+2414
+2415
+2416
+2417
+2418
+2419
+2420
+2421
+2422
+2423
+2424
+2425
+2426
+2427
+2428
+2429
+2430
+2431
+2432
+2433
+2434
+2435
+2436
+2437
+2438
+2439
+2440
+2441
+2442
+2443
+2444
+2445
+2446
+2447
+2448
+2449
+2450
+2451
+2452
+2453
+2454
+2455
+2456
+2457
+2458
+2459
+2460
+2461
+2462
+2463
+2464
+2465
+2466
+2467
+2468
+2469
+2470
+2471
+2472
+2473
+2474
+2475
+2476
+2477
+2478
+2479
+2480
+2481
+2482
+2483
+2484
+2485
+2486
+2487
+2488
+2489
+2490
+2491
+2492
+2493
+2494
+2495
+2496
+2497
+2498
+2499
+2500
+2501
+2502
+2503
+2504
+2505
+2506
+2507
+2508
+2509
+2510
+2511
+2512
+2513
+2514
+2515
+2516
+2517
+2518
+2519
+2520
+2521
+2522
+2523
+2524
+2525
+2526
+2527
+2528
+2529
+2530
+2531
+2532
+2533
+2534
+2535
+2536
+2537
+2538
+2539
+2540
+2541
+2542
+2543
+2544
+2545
+2546
+2547
+2548
+2549
+2550
+2551
+2552
+2553
+2554
+2555
+2556
+2557
+2558
+2559
+2560
+2561
+2562
+2563
+2564
+2565
+2566
+2567
+2568
+2569
+2570
+2571
+2572
+2573
+2574
+2575
+2576
+2577
+2578
+2579
+2580
+2581
+2582
+2583
+2584
+2585
+2586
+2587
+2588
+2589
+2590
+2591
+2592
+2593
+2594
+2595
+2596
+2597
+2598
+2599
+2600
+2601
+2602
+2603
+2604
+2605
+2606
+2607
+2608
+2609
+2610
+2611
+2612
+2613
+2614
+2615
+2616
+2617
+2618
+2619
+2620
+2621
+2622
+2623
+2624
+2625
+2626
+2627
+2628
+2629
+2630
+2631
+2632
+2633
+2634
+2635
+2636
+2637
+2638
+2639
+2640
+2641
+2642
+2643
+2644
+2645
+2646
+2647
+2648
+2649
+2650
+2651
+2652
+2653
+2654
+2655
+2656
+2657
+2658
+2659
+2660
+2661
+2662
+2663
+2664
+2665
+2666
+2667
+2668
+2669
+2670
+2671
+2672
+2673
+2674
+2675
+2676
+2677
+2678
+2679
+2680
+2681
+2682
+2683
+2684
+2685
+2686
+2687
+2688
+2689
+2690
+2691
+2692
+2693
+2694
+2695
+2696
+2697
+2698
+2699
+2700
+2701
+2702
+2703
+2704
+2705
+2706
+2707
+2708
+2709
+2710
+2711
+2712
+2713
+2714
+2715
+2716
+2717
+2718
+2719
+2720
+2721
+2722
+2723
+2724
+2725
+2726
+2727
+2728
+2729
+2730
+2731
+2732
+2733
+2734
+2735
+2736
+2737
+2738
+2739
+2740
+2741
+2742
+2743
+2744
+2745
+2746
+2747
+2748
+2749
+2750
+2751
+2752
+2753
+2754
+2755
+2756
+2757
+2758
+2759
+2760
+2761
+2762
+2763
+2764
+2765
+2766
+2767
+2768
+2769
+2770
+2771
+2772
+2773
+2774
+2775
+2776
+2777
+2778
+2779
+2780
+2781
+2782
+2783
+2784
+2785
+2786
+2787
+2788
+2789
+2790
+2791
+2792
+2793
+2794
+2795
+2796
+2797
+2798
+2799
+2800
+2801
+2802
+2803
+2804
+2805
+2806
+2807
+2808
+2809
+2810
+2811
+2812
+2813
+2814
+2815
+2816
+2817
+2818
+2819
+2820
+2821
+2822
+2823
+2824
+2825
+2826
+2827
+2828
+2829
+2830
+2831
+2832
+2833
+2834
+2835
+2836
+2837
+2838
+2839
+2840
+2841
+2842
+2843
+2844
+2845
+2846
+2847
+2848
+2849
+2850
+2851
+2852
+2853
+2854
+2855
+2856
+2857
+2858
+2859
+2860
+2861
+2862
+2863
+2864
+2865
+2866
+2867
+2868
+2869
+2870
+2871
+2872
+2873
+2874
+2875
+2876
+2877
+2878
+2879
+2880
+2881
+2882
+2883
+2884
+2885
+2886
+2887
+2888
+2889
+2890
+2891
+2892
+2893
+2894
+2895
+2896
+2897
+2898
+2899
+2900
+2901
+2902
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+#include <ctk/ctk.h>
+#include <cdk/cdkx.h>
+#include <cdk/cdkkeysyms.h>
+#include <X11/XKBlib.h>
+#include <X11/extensions/XKBgeom.h>
+#include <stdlib.h>
+#include <memory.h>
+#include <math.h>
+#include <glib/gi18n-lib.h>
+#include <libxklavier/xklavier.h>
+
+#include <cafekbd-keyboard-drawing.h>
+#include <cafekbd-keyboard-drawing-marshal.h>
+#include <cafekbd-util.h>
+
+#define INVALID_KEYCODE ((guint)(-1))
+
+#define CTK_RESPONSE_PRINT 2
+
+#define KEY_FONT_SIZE 12
+
+enum {
+	BAD_KEYCODE = 0,
+	NUM_SIGNALS
+};
+
+static guint cafekbd_keyboard_drawing_signals[NUM_SIGNALS] = { 0 };
+
+static void cafekbd_keyboard_drawing_set_mods (CafekbdKeyboardDrawing * drawing,
+					    guint mods);
+
+extern gboolean xkl_xkb_config_native_prepare (XklEngine * engine,
+					      const XklConfigRec * data,
+					      gpointer component_names);
+
+extern void xkl_xkb_config_native_cleanup (XklEngine * engine,
+					  gpointer component_names);
+
+
+static gint
+xkb_to_pixmap_coord (CafekbdKeyboardDrawingRenderContext * context, gint n)<--- Parameter 'context' can be declared as pointer to const
+{
+	return n * context->scale_numerator / context->scale_denominator;
+}
+
+static gdouble
+xkb_to_pixmap_double (CafekbdKeyboardDrawingRenderContext * context,<--- Parameter 'context' can be declared as pointer to const
+		      gdouble d)
+{
+	return d * context->scale_numerator / context->scale_denominator;
+}
+
+
+/* angle is in tenths of a degree; coordinates can be anything as (xkb,
+ * pixels, pango) as long as they are all the same */
+static void
+rotate_coordinate (gint origin_x,
+		   gint origin_y,
+		   gint x,
+		   gint y, gint angle, gint * rotated_x, gint * rotated_y)
+{
+	*rotated_x =
+	    origin_x + (x - origin_x) * cos (M_PI * angle / 1800.0) - (y -
+								       origin_y)
+	    * sin (M_PI * angle / 1800.0);
+	*rotated_y =
+	    origin_y + (x - origin_x) * sin (M_PI * angle / 1800.0) + (y -
+								       origin_y)
+	    * cos (M_PI * angle / 1800.0);
+}
+
+static gdouble
+length (gdouble x, gdouble y)
+{
+	return sqrt (x * x + y * y);
+}
+
+static gdouble
+point_line_distance (gdouble ax, gdouble ay, gdouble nx, gdouble ny)
+{
+	return ax * nx + ay * ny;
+}
+
+static void
+normal_form (gdouble ax, gdouble ay,
+	     gdouble bx, gdouble by,
+	     gdouble * nx, gdouble * ny, gdouble * d)
+{
+	gdouble l;
+
+	*nx = by - ay;
+	*ny = ax - bx;
+
+	l = length (*nx, *ny);
+
+	*nx /= l;
+	*ny /= l;
+
+	*d = point_line_distance (ax, ay, *nx, *ny);
+}
+
+static void
+inverse (gdouble a, gdouble b, gdouble c, gdouble d,
+	 gdouble * e, gdouble * f, gdouble * g, gdouble * h)
+{
+	gdouble det;
+
+	det = a * d - b * c;
+
+	*e = d / det;
+	*f = -b / det;
+	*g = -c / det;
+	*h = a / det;
+}
+
+static void
+multiply (gdouble a, gdouble b, gdouble c, gdouble d,
+	  gdouble e, gdouble f, gdouble * x, gdouble * y)
+{
+	*x = a * e + b * f;
+	*y = c * e + d * f;
+}
+
+static void
+intersect (gdouble n1x, gdouble n1y, gdouble d1,
+	   gdouble n2x, gdouble n2y, gdouble d2, gdouble * x, gdouble * y)
+{
+	gdouble e, f, g, h;
+
+	inverse (n1x, n1y, n2x, n2y, &e, &f, &g, &h);
+	multiply (e, f, g, h, d1, d2, x, y);
+}
+
+
+/* draw an angle from the current point to b and then to c,
+ * with a rounded corner of the given radius.
+ */
+static void
+rounded_corner (cairo_t * cr,
+		gdouble bx, gdouble by,
+		gdouble cx, gdouble cy, gdouble radius)
+{
+	gdouble ax, ay;
+	gdouble n1x, n1y, d1;
+	gdouble n2x, n2y, d2;
+	gdouble pd1, pd2;
+	gdouble ix, iy;
+	gdouble dist1, dist2;
+	gdouble nx, ny, d;
+	gdouble a1x, a1y, c1x, c1y;
+	gdouble phi1, phi2;
+
+	cairo_get_current_point (cr, &ax, &ay);
+#ifdef KBDRAW_DEBUG
+	printf ("        current point: (%f, %f), radius %f:\n", ax, ay,
+		radius);
+#endif
+
+	/* make sure radius is not too large */
+	dist1 = length (bx - ax, by - ay);
+	dist2 = length (cx - bx, cy - by);
+
+	radius = MIN (radius, MIN (dist1, dist2));
+
+	/* construct normal forms of the lines */
+	normal_form (ax, ay, bx, by, &n1x, &n1y, &d1);
+	normal_form (bx, by, cx, cy, &n2x, &n2y, &d2);
+
+	/* find which side of the line a,b the point c is on */
+	if (point_line_distance (cx, cy, n1x, n1y) < d1)
+		pd1 = d1 - radius;
+	else
+		pd1 = d1 + radius;
+
+	/* find which side of the line b,c the point a is on */
+	if (point_line_distance (ax, ay, n2x, n2y) < d2)
+		pd2 = d2 - radius;
+	else
+		pd2 = d2 + radius;
+
+	/* intersect the parallels to find the center of the arc */
+	intersect (n1x, n1y, pd1, n2x, n2y, pd2, &ix, &iy);
+
+	nx = (bx - ax) / dist1;
+	ny = (by - ay) / dist1;
+	d = point_line_distance (ix, iy, nx, ny);
+
+	/* a1 is the point on the line a-b where the arc starts */
+	intersect (n1x, n1y, d1, nx, ny, d, &a1x, &a1y);
+
+	nx = (cx - bx) / dist2;
+	ny = (cy - by) / dist2;
+	d = point_line_distance (ix, iy, nx, ny);
+
+	/* c1 is the point on the line b-c where the arc ends */
+	intersect (n2x, n2y, d2, nx, ny, d, &c1x, &c1y);
+
+	/* determine the first angle */
+	if (a1x - ix == 0)
+		phi1 = (a1y - iy > 0) ? M_PI_2 : 3 * M_PI_2;
+	else if (a1x - ix > 0)
+		phi1 = atan ((a1y - iy) / (a1x - ix));
+	else
+		phi1 = M_PI + atan ((a1y - iy) / (a1x - ix));
+
+	/* determine the second angle */
+	if (c1x - ix == 0)
+		phi2 = (c1y - iy > 0) ? M_PI_2 : 3 * M_PI_2;
+	else if (c1x - ix > 0)
+		phi2 = atan ((c1y - iy) / (c1x - ix));
+	else
+		phi2 = M_PI + atan ((c1y - iy) / (c1x - ix));
+
+	/* compute the difference between phi2 and phi1 mod 2pi */
+	d = phi2 - phi1;
+	while (d < 0)
+		d += 2 * M_PI;
+	while (d > 2 * M_PI)
+		d -= 2 * M_PI;
+
+#ifdef KBDRAW_DEBUG
+	printf ("        line 1 to: (%f, %f):\n", a1x, a1y);
+#endif
+	if (!(isnan (a1x) || isnan (a1y)))
+		cairo_line_to (cr, a1x, a1y);
+
+	/* pick the short arc from phi1 to phi2 */
+	if (d < M_PI)
+		cairo_arc (cr, ix, iy, radius, phi1, phi2);
+	else
+		cairo_arc_negative (cr, ix, iy, radius, phi1, phi2);
+
+#ifdef KBDRAW_DEBUG
+	printf ("        line 2 to: (%f, %f):\n", cx, cy);
+#endif
+	cairo_line_to (cr, cx, cy);
+}
+
+static void
+rounded_polygon (cairo_t * cr,
+		 gboolean filled,
+		 gdouble radius, CdkPoint * points, gint num_points)
+{
+	gint i, j;
+
+	cairo_move_to (cr,
+		       (gdouble) (points[num_points - 1].x +
+				  points[0].x) / 2,
+		       (gdouble) (points[num_points - 1].y +
+				  points[0].y) / 2);
+
+
+#ifdef KBDRAW_DEBUG
+	printf ("    rounded polygon of radius %f:\n", radius);
+#endif
+	for (i = 0; i < num_points; i++) {
+		j = (i + 1) % num_points;
+		rounded_corner (cr, (gdouble) points[i].x,
+				(gdouble) points[i].y,
+				(gdouble) (points[i].x + points[j].x) / 2,
+				(gdouble) (points[i].y + points[j].y) / 2,
+				radius);
+#ifdef KBDRAW_DEBUG
+		printf ("      corner (%d, %d) -> (%d, %d):\n",
+			points[i].x, points[i].y, points[j].x,
+			points[j].y);
+#endif
+	};
+	cairo_close_path (cr);
+
+	if (filled)
+		cairo_fill (cr);
+	else
+		cairo_stroke (cr);
+}
+
+static void
+draw_polygon (CafekbdKeyboardDrawingRenderContext * context,
+	      CdkRGBA * fill_color,
+	      gint xkb_x,
+	      gint xkb_y, XkbPointRec * xkb_points, guint num_points,
+	      gdouble radius)
+{
+	CdkPoint *points;
+	gboolean filled;
+	gint i;
+
+	if (fill_color) {
+		filled = TRUE;
+	} else {
+		fill_color = &context->dark_color;
+		filled = FALSE;
+	}
+
+	cdk_cairo_set_source_rgba (context->cr, fill_color);
+
+	points = g_new (CdkPoint, num_points);
+
+#ifdef KBDRAW_DEBUG
+	printf ("    Polygon points:\n");
+#endif
+	for (i = 0; i < num_points; i++) {
+		points[i].x =
+		    xkb_to_pixmap_coord (context, xkb_x + xkb_points[i].x);
+		points[i].y =
+		    xkb_to_pixmap_coord (context, xkb_y + xkb_points[i].y);
+#ifdef KBDRAW_DEBUG
+		printf ("      %d, %d\n", points[i].x, points[i].y);
+#endif
+	}
+
+	rounded_polygon (context->cr, filled,
+			 xkb_to_pixmap_double (context, radius),
+			 points, num_points);
+
+	g_free (points);
+}
+
+static void
+curve_rectangle (cairo_t * cr,
+		 gdouble x0,
+		 gdouble y0, gdouble width, gdouble height, gdouble radius)
+{
+	gdouble x1, y1;
+
+	if (!width || !height)
+		return;
+
+	x1 = x0 + width;
+	y1 = y0 + height;
+
+	radius = MIN (radius, MIN (width / 2, height / 2));
+
+	cairo_move_to (cr, x0, y0 + radius);
+	cairo_arc (cr, x0 + radius, y0 + radius, radius, M_PI,
+		   3 * M_PI / 2);
+	cairo_line_to (cr, x1 - radius, y0);
+	cairo_arc (cr, x1 - radius, y0 + radius, radius, 3 * M_PI / 2,
+		   2 * M_PI);
+	cairo_line_to (cr, x1, y1 - radius);
+	cairo_arc (cr, x1 - radius, y1 - radius, radius, 0, M_PI / 2);
+	cairo_line_to (cr, x0 + radius, y1);
+	cairo_arc (cr, x0 + radius, y1 - radius, radius, M_PI / 2, M_PI);
+
+	cairo_close_path (cr);
+}
+
+static void
+draw_curve_rectangle (cairo_t * cr,
+		      gboolean filled,
+		      CdkRGBA * fill_color,
+		      gint x, gint y, gint width, gint height, gint radius)
+{
+	curve_rectangle (cr, x, y, width, height, radius);
+
+	cdk_cairo_set_source_rgba (cr, fill_color);
+
+	if (filled)
+		cairo_fill (cr);
+	else
+		cairo_stroke (cr);
+}
+
+/* x, y, width, height are in the xkb coordinate system */
+static void
+draw_rectangle (CafekbdKeyboardDrawingRenderContext * context,
+		CdkRGBA * fill_color,
+		gint angle,
+		gint xkb_x, gint xkb_y, gint xkb_width, gint xkb_height,
+		gint radius)
+{
+	if (angle == 0) {
+		gint x, y, width, height;
+		gboolean filled;
+
+		if (fill_color) {
+			filled = TRUE;
+		} else {
+			fill_color = &context->dark_color;
+			filled = FALSE;
+		}
+
+		x = xkb_to_pixmap_coord (context, xkb_x);
+		y = xkb_to_pixmap_coord (context, xkb_y);
+		width =
+		    xkb_to_pixmap_coord (context, xkb_x + xkb_width) - x;
+		height =
+		    xkb_to_pixmap_coord (context, xkb_y + xkb_height) - y;
+
+		draw_curve_rectangle (context->cr, filled, fill_color,
+				      x, y, width, height,
+				      xkb_to_pixmap_double (context,
+							    radius));
+	} else {
+		XkbPointRec points[4];
+		gint x, y;
+
+		points[0].x = xkb_x;
+		points[0].y = xkb_y;
+		rotate_coordinate (xkb_x, xkb_y, xkb_x + xkb_width, xkb_y,
+				   angle, &x, &y);
+		points[1].x = x;
+		points[1].y = y;
+		rotate_coordinate (xkb_x, xkb_y, xkb_x + xkb_width,
+				   xkb_y + xkb_height, angle, &x, &y);
+		points[2].x = x;
+		points[2].y = y;
+		rotate_coordinate (xkb_x, xkb_y, xkb_x, xkb_y + xkb_height,
+				   angle, &x, &y);
+		points[3].x = x;
+		points[3].y = y;
+
+		/* the points we've calculated are relative to 0,0 */
+		draw_polygon (context, fill_color, 0, 0, points, 4,
+			      radius);
+	}
+}
+
+static void
+draw_outline (CafekbdKeyboardDrawingRenderContext * context,
+	      XkbOutlineRec * outline,
+	      CdkRGBA * color,
+	      gint angle, gint origin_x, gint origin_y)
+{
+#ifdef KBDRAW_DEBUG
+	printf (" num_points in %p: %d\n", outline, outline->num_points);
+#endif
+
+	if (outline->num_points == 1) {
+		if (color)
+			draw_rectangle (context, color, angle, origin_x,
+					origin_y, outline->points[0].x,
+					outline->points[0].y,
+					outline->corner_radius);
+
+#ifdef KBDRAW_DEBUG
+		printf ("pointsxy:%d %d %d\n", outline->points[0].x,
+			outline->points[0].y, outline->corner_radius);
+#endif
+
+		draw_rectangle (context, NULL, angle, origin_x, origin_y,
+				outline->points[0].x,
+				outline->points[0].y,
+				outline->corner_radius);
+	} else if (outline->num_points == 2) {
+		gint rotated_x0, rotated_y0;
+
+		rotate_coordinate (origin_x, origin_y,
+				   origin_x + outline->points[0].x,
+				   origin_y + outline->points[0].y,
+				   angle, &rotated_x0, &rotated_y0);
+		if (color)
+			draw_rectangle (context, color, angle, rotated_x0,
+					rotated_y0, outline->points[1].x,
+					outline->points[1].y,
+					outline->corner_radius);
+
+		draw_rectangle (context, NULL, angle, rotated_x0,
+				rotated_y0, outline->points[1].x,
+				outline->points[1].y,
+				outline->corner_radius);
+	} else {
+		if (color)
+			draw_polygon (context, color, origin_x, origin_y,
+				      outline->points,
+				      outline->num_points,
+				      outline->corner_radius);
+
+		draw_polygon (context, NULL, origin_x, origin_y,
+			      outline->points, outline->num_points,
+			      outline->corner_radius);
+	}
+}
+
+/* see PSColorDef in xkbprint */
+static gboolean
+parse_xkb_color_spec (gchar * colorspec, CdkRGBA * color)
+{
+	glong level;
+
+	color->alpha = 1.0;
+
+	if (g_ascii_strcasecmp (colorspec, "black") == 0) {
+		color->red = 0;
+		color->green = 0;
+		color->blue = 0;
+	} else if (g_ascii_strcasecmp (colorspec, "white") == 0) {
+		color->red = 1.0;
+		color->green = 1.0;
+		color->blue = 1.0;
+	} else if (g_ascii_strncasecmp (colorspec, "grey", 4) == 0 ||
+		   g_ascii_strncasecmp (colorspec, "gray", 4) == 0) {
+		level = strtol (colorspec + 4, NULL, 10);
+
+		color->red = 1.0 - 1.0 * level / 100.0;
+		color->green = 1.0 - 1.0 * level / 100.0;
+		color->blue = 1.0 - 1.0 * level / 100.0;
+	} else if (g_ascii_strcasecmp (colorspec, "red") == 0) {
+		color->red = 1.0;
+		color->green = 0;
+		color->blue = 0;
+	} else if (g_ascii_strcasecmp (colorspec, "green") == 0) {
+		color->red = 0;
+		color->green = 1.0;
+		color->blue = 0;
+	} else if (g_ascii_strcasecmp (colorspec, "blue") == 0) {
+		color->red = 0;
+		color->green = 0;
+		color->blue = 1.0;
+	} else if (g_ascii_strncasecmp (colorspec, "red", 3) == 0) {
+		level = strtol (colorspec + 3, NULL, 10);
+
+		color->red = 1.0 * level / 100.0;
+		color->green = 0;
+		color->blue = 0;
+	} else if (g_ascii_strncasecmp (colorspec, "green", 5) == 0) {
+		level = strtol (colorspec + 5, NULL, 10);
+
+		color->red = 0;
+		color->green = 1.0 * level / 100.0;
+		color->blue = 0;
+	} else if (g_ascii_strncasecmp (colorspec, "blue", 4) == 0) {
+		level = strtol (colorspec + 4, NULL, 10);
+
+		color->red = 0;
+		color->green = 0;
+		color->blue = 1.0 * level / 100.0;
+	} else
+		return FALSE;
+
+	return TRUE;
+}
+
+
+static guint
+find_keycode (CafekbdKeyboardDrawing * drawing, gchar * key_name)
+{
+#define KEYSYM_NAME_MAX_LENGTH 4
+	guint keycode;
+	gint i, j;
+	XkbKeyNamePtr pkey;
+	XkbKeyAliasPtr palias;
+	guint is_name_matched;
+	gchar *src, *dst;
+
+	if (!drawing->xkb)
+		return INVALID_KEYCODE;
+
+#ifdef KBDRAW_DEBUG
+	printf ("    looking for keycode for (%c%c%c%c)\n",
+		key_name[0], key_name[1], key_name[2], key_name[3]);
+#endif
+
+	pkey = drawing->xkb->names->keys + drawing->xkb->min_key_code;
+	for (keycode = drawing->xkb->min_key_code;
+	     keycode <= drawing->xkb->max_key_code; keycode++) {
+		is_name_matched = 1;
+		src = key_name;
+		dst = pkey->name;
+		for (i = KEYSYM_NAME_MAX_LENGTH; --i >= 0;) {
+			if ('\0' == *src)
+				break;
+			if (*src++ != *dst++) {
+				is_name_matched = 0;
+				break;
+			}
+		}
+		if (is_name_matched) {
+#ifdef KBDRAW_DEBUG
+			printf ("      found keycode %u\n", keycode);
+#endif
+			return keycode;
+		}
+		pkey++;
+	}
+
+	palias = drawing->xkb->names->key_aliases;
+	for (j = drawing->xkb->names->num_key_aliases; --j >= 0;) {
+		is_name_matched = 1;
+		src = key_name;
+		dst = palias->alias;
+		for (i = KEYSYM_NAME_MAX_LENGTH; --i >= 0;) {
+			if ('\0' == *src)
+				break;
+			if (*src++ != *dst++) {
+				is_name_matched = 0;
+				break;
+			}
+		}
+
+		if (is_name_matched) {
+			keycode = find_keycode (drawing, palias->real);
+#ifdef KBDRAW_DEBUG
+			printf ("found alias keycode %u\n", keycode);
+#endif
+			return keycode;
+		}
+		palias++;
+	}
+
+	return INVALID_KEYCODE;
+}
+
+static void
+set_markup (CafekbdKeyboardDrawingRenderContext * context, gchar *txt)<--- Parameter 'context' can be declared as pointer to const
+{
+	PangoLayout *layout = context->layout;
+	txt = strcmp ("<", txt) ? txt : "&lt;";
+	txt = strcmp ("&", txt) ? txt : "&amp;";
+	if (g_utf8_strlen (txt, -1) > 1) {
+		gchar* buf =
+		    g_strdup_printf ("<span size=\"xx-small\">%s</span>", txt);
+		pango_layout_set_markup (layout, buf, -1);
+		g_free (buf);
+	} else {
+		pango_layout_set_markup (layout, txt, -1);
+	}
+}
+
+static void
+set_key_label_in_layout (CafekbdKeyboardDrawingRenderContext * context,
+			 guint keyval)
+{
+	gchar buf[5];
+	gunichar uc;
+
+	switch (keyval) {
+	case CDK_KEY_Scroll_Lock:
+		set_markup (context, _("Scroll\nLock"));
+		break;
+
+	case CDK_KEY_space:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_Sys_Req:
+		set_markup (context, _("Sys Rq"));
+		break;
+
+	case CDK_KEY_Page_Up:
+		set_markup (context, _("Page\nUp"));
+		break;
+
+	case CDK_KEY_Page_Down:
+		set_markup (context, _("Page\nDown"));
+		break;
+
+	case CDK_KEY_Num_Lock:
+		set_markup (context, _("Num\nLock"));
+		break;
+
+	case CDK_KEY_KP_Page_Up:
+		set_markup (context, _("Pg Up"));
+		break;
+
+	case CDK_KEY_KP_Page_Down:
+		set_markup (context, _("Pg Dn"));
+		break;
+
+	case CDK_KEY_KP_Home:
+		set_markup (context, _("Home"));
+		break;
+
+	case CDK_KEY_KP_Left:
+		set_markup (context, _("Left"));
+		break;
+
+	case CDK_KEY_KP_End:
+		set_markup (context, _("End"));
+		break;
+
+	case CDK_KEY_KP_Up:
+		set_markup (context, _("Up"));
+		break;
+
+	case CDK_KEY_KP_Begin:
+		set_markup (context, _("Begin"));
+		break;
+
+	case CDK_KEY_KP_Right:
+		set_markup (context, _("Right"));
+		break;
+
+	case CDK_KEY_KP_Enter:
+		set_markup (context, _("Enter"));
+		break;
+
+	case CDK_KEY_KP_Down:
+		set_markup (context, _("Down"));
+		break;
+
+	case CDK_KEY_KP_Insert:
+		set_markup (context, _("Ins"));
+		break;
+
+	case CDK_KEY_KP_Delete:
+		set_markup (context, _("Del"));
+		break;
+
+	/* 0xfe03 */
+	case CDK_KEY_ISO_Level3_Shift:
+		set_markup (context, _("ISO_Level3_Shift"));
+		break;
+
+	/* 0xfe20 */
+	case CDK_KEY_ISO_Left_Tab:
+		set_markup (context, _("Tab"));
+		break;
+
+	/* 0xff08 */
+	case CDK_KEY_BackSpace:
+		set_markup (context, _("BackSpace"));
+		break;
+
+	/* 0xff09 */
+	case CDK_KEY_Tab:
+		set_markup (context, _("Tab"));
+		break;
+
+	/* 0xff0d */
+	case CDK_KEY_Return:
+		set_markup (context, _("Return"));
+		break;
+
+	/* 0xff13 */
+	case CDK_KEY_Pause:
+		set_markup (context, _("Pause"));
+		break;
+
+	/* 0xff1b */
+	case CDK_KEY_Escape:
+		set_markup (context, _("Esc"));
+		break;
+
+	/* 0xff50 */
+	case CDK_KEY_Home:
+		set_markup (context, _("Home"));
+		break;
+
+	/* 0xff51 */
+	case CDK_KEY_Left:
+		set_markup (context, _("Left"));
+		break;
+
+	/* 0xff52 */
+	case CDK_KEY_Up:
+		set_markup (context, _("Up"));
+		break;
+
+	/* 0xff53 */
+	case CDK_KEY_Right:
+		set_markup (context, _("Right"));
+		break;
+
+	/* 0xff54 */
+	case CDK_KEY_Down:
+		set_markup (context, _("Down"));
+		break;
+
+	/* 0xff57 */
+	case CDK_KEY_End:
+		set_markup (context, _("End"));
+		break;
+
+	/* 0xff61 */
+	case CDK_KEY_Print:
+		set_markup (context, _("Print"));
+		break;
+
+	/* 0xff63 */
+	case CDK_KEY_Insert:
+		set_markup (context, _("Insert"));
+		break;
+
+	/* 0xff67 */
+	case CDK_KEY_Menu:
+		set_markup (context, _("Menu"));
+		break;
+
+	/* 0xffbe */
+	case CDK_KEY_F1:
+		set_markup (context, _("F1"));
+		break;
+
+	/* 0xffbf */
+	case CDK_KEY_F2:
+		set_markup (context, _("F2"));
+		break;
+
+	/* 0xffc0 */
+	case CDK_KEY_F3:
+		set_markup (context, _("F3"));
+		break;
+
+	/* 0xffc1 */
+	case CDK_KEY_F4:
+		set_markup (context, _("F4"));
+		break;
+
+	/* 0xffc2 */
+	case CDK_KEY_F5:
+		set_markup (context, _("F5"));
+		break;
+
+	/* 0xffc3 */
+	case CDK_KEY_F6:
+		set_markup (context, _("F6"));
+		break;
+
+	/* 0xffc4 */
+	case CDK_KEY_F7:
+		set_markup (context, _("F7"));
+		break;
+
+	/* 0xffc5 */
+	case CDK_KEY_F8:
+		set_markup (context, _("F8"));
+		break;
+
+	/* 0xffc6 */
+	case CDK_KEY_F9:
+		set_markup (context, _("F9"));
+		break;
+
+	/* 0xffc7 */
+	case CDK_KEY_F10:
+		set_markup (context, _("F10"));
+		break;
+
+	/* 0xffc8 */
+	case CDK_KEY_F11:
+		set_markup (context, _("F11"));
+		break;
+
+	/* 0xffc9 */
+	case CDK_KEY_F12:
+		set_markup (context, _("F12"));
+		break;
+
+	/* 0xffe1 */
+	case CDK_KEY_Shift_L:
+		set_markup (context, _("Shift"));
+		break;
+
+	/* 0xffe2 */
+	case CDK_KEY_Shift_R:
+		set_markup (context, _("Shift"));
+		break;
+
+	/* 0xffe3 */
+	case CDK_KEY_Control_L:
+		set_markup (context, _("Control"));
+		break;
+
+	/* 0xffe4 */
+	case CDK_KEY_Control_R:
+		set_markup (context, _("Control"));
+		break;
+
+	/* 0xffe5 */
+	case CDK_KEY_Caps_Lock:
+		set_markup (context, _("Caps\nLock"));
+		break;
+
+	/* 0xffe7 */
+	case CDK_KEY_Meta_L:
+		set_markup (context, _("Meta"));
+		break;
+
+	/* 0xffe9 */
+	case CDK_KEY_Alt_L:
+		set_markup (context, _("Alt"));
+		break;
+
+	/* 0xffeb */
+	case CDK_KEY_Super_L:
+		set_markup (context, _("Super"));
+		break;
+
+	/* 0xffec */
+	case CDK_KEY_Super_R:
+		set_markup (context, _("Super"));
+		break;
+
+	/* 0xffff */
+	case CDK_KEY_VoidSymbol:
+		set_markup (context, _("Delete"));
+		break;
+
+	case CDK_KEY_dead_grave:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_acute:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_circumflex:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_tilde:
+		set_markup (context, "~");
+		break;
+
+	case CDK_KEY_dead_macron:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_breve:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_abovedot:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_diaeresis:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_abovering:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_doubleacute:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_caron:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_cedilla:
+		set_markup (context, "");
+		break;
+
+	case CDK_KEY_dead_ogonek:
+		set_markup (context, "");
+		break;
+
+		/* case CDK_KEY_dead_iota:
+		 * case CDK_KEY_dead_voiced_sound:
+		 * case CDK_KEY_dead_semivoiced_sound: */
+
+	case CDK_KEY_dead_belowdot:
+		set_markup (context, " ");
+		break;
+
+	case CDK_KEY_horizconnector:
+		set_markup (context, _("horiz\nconn"));
+		break;
+
+	case CDK_KEY_Mode_switch:
+		set_markup (context, _("AltGr"));
+		break;
+
+	case CDK_KEY_Multi_key:
+		set_markup (context, _("Compose"));
+		break;
+
+	default:
+		uc = cdk_keyval_to_unicode (keyval);
+		if (uc != 0 && g_unichar_isgraph (uc)) {
+			buf[g_unichar_to_utf8 (uc, buf)] = '\0';
+			set_markup (context, buf);
+		} else {
+			gchar *name = cdk_keyval_name (keyval);
+			if (name) {
+				set_markup (context, name);
+			} else
+				set_markup (context, "");
+		}
+	}
+}
+
+
+static void
+draw_pango_layout (CafekbdKeyboardDrawingRenderContext * context,
+		   CafekbdKeyboardDrawing * drawing,
+		   gint angle, gint x, gint y)
+{
+	PangoLayout *layout = context->layout;
+	CdkRGBA *color;
+	PangoLayoutLine *line;
+	gint x_off, y_off;
+	gint i;
+
+	color =
+	    drawing->colors + (drawing->xkb->geom->label_color -
+			       drawing->xkb->geom->colors);
+
+	if (angle != context->angle) {
+		PangoMatrix matrix = PANGO_MATRIX_INIT;
+		pango_matrix_rotate (&matrix, -angle / 10.0);
+		pango_context_set_matrix (pango_layout_get_context
+					  (layout), &matrix);
+		pango_layout_context_changed (layout);
+		context->angle = angle;
+	}
+
+	i = 0;
+	y_off = 0;
+	for (line = pango_layout_get_line (layout, i);
+	     line != NULL; line = pango_layout_get_line (layout, ++i)) {
+		GSList *runp;<--- Variable 'runp' can be declared as pointer to const
+		PangoRectangle line_extents;
+
+		x_off = 0;
+
+		for (runp = line->runs; runp != NULL; runp = runp->next) {
+			PangoGlyphItem *run = runp->data;
+			gint j;
+
+			for (j = 0; j < run->glyphs->num_glyphs; j++) {
+				PangoGlyphGeometry *geometry;<--- Variable 'geometry' can be declared as pointer to const
+
+				geometry =
+				    &run->glyphs->glyphs[j].geometry;
+
+				x_off += geometry->width;
+			}
+		}
+
+		pango_layout_line_get_extents (line, NULL, &line_extents);
+		y_off +=
+		    line_extents.height +
+		    pango_layout_get_spacing (layout);
+	}
+
+	cairo_move_to (context->cr, x, y);
+	cdk_cairo_set_source_rgba (context->cr, color);
+	pango_cairo_show_layout (context->cr, layout);
+}
+
+static void
+draw_key_label_helper (CafekbdKeyboardDrawingRenderContext * context,
+		       CafekbdKeyboardDrawing * drawing,
+		       KeySym keysym,
+		       gint angle,
+		       CafekbdKeyboardDrawingGroupLevelPosition glp,
+		       gint x,
+		       gint y, gint width, gint height, gint padding)
+{
+	gint label_x, label_y, label_max_width, ycell;
+
+	if (keysym == 0)
+		return;
+#ifdef KBDRAW_DEBUG
+	printf ("keysym: %04X(%c) at glp: %d\n",
+		(unsigned) keysym, (char) keysym, (int) glp);
+#endif
+
+	switch (glp) {
+	case CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT:
+	case CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT:
+		{
+			ycell =
+			    glp == CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT;
+
+			rotate_coordinate (x, y, x + padding,
+					   y + padding + (height -
+							  2 * padding) *
+					   ycell * 4 / 7, angle, &label_x,
+					   &label_y);
+			label_max_width =
+			    PANGO_SCALE * (width - 2 * padding);
+			break;
+		}
+	case CAFEKBD_KEYBOARD_DRAWING_POS_TOPRIGHT:
+	case CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT:
+		{
+			ycell =
+			    glp == CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT;
+
+			rotate_coordinate (x, y,
+					   x + padding + (width -
+							  2 * padding) *
+					   4 / 7,
+					   y + padding + (height -
+							  2 * padding) *
+					   ycell * 4 / 7, angle, &label_x,
+					   &label_y);
+			label_max_width =
+			    PANGO_SCALE * ((width - 2 * padding) -
+					   (width - 2 * padding) * 4 / 7);
+			break;
+		}
+	default:
+		return;
+	}
+	set_key_label_in_layout (context, keysym);
+	pango_layout_set_width (context->layout, label_max_width);
+	label_y -= (pango_layout_get_line_count (context->layout) - 1) *
+	    (pango_font_description_get_size (context->font_desc) /
+	     PANGO_SCALE);
+	cairo_save (context->cr);
+	cairo_rectangle (context->cr, x + padding / 2, y + padding / 2,
+			 width - padding, height - padding);
+	cairo_clip (context->cr);
+	draw_pango_layout (context, drawing, angle, label_x, label_y);
+	cairo_restore (context->cr);
+}
+
+static void
+draw_key_label (CafekbdKeyboardDrawingRenderContext * context,
+		CafekbdKeyboardDrawing * drawing,
+		guint keycode,
+		gint angle,
+		gint xkb_origin_x,
+		gint xkb_origin_y, gint xkb_width, gint xkb_height)
+{
+	gint x, y, width, height;
+	gint padding;
+	gint g, l, glp;
+
+	if (!drawing->xkb)
+		return;
+
+	padding = 23 * context->scale_numerator / context->scale_denominator;	/* 2.3mm */
+
+	x = xkb_to_pixmap_coord (context, xkb_origin_x);
+	y = xkb_to_pixmap_coord (context, xkb_origin_y);
+	width =
+	    xkb_to_pixmap_coord (context, xkb_origin_x + xkb_width) - x;
+	height =
+	    xkb_to_pixmap_coord (context, xkb_origin_y + xkb_height) - y;
+
+	for (glp = CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT;
+	     glp < CAFEKBD_KEYBOARD_DRAWING_POS_TOTAL; glp++) {
+		if (drawing->groupLevels[glp] == NULL)
+			continue;
+		g = drawing->groupLevels[glp]->group;
+		l = drawing->groupLevels[glp]->level;
+
+		if (g < 0 || g >= XkbKeyNumGroups (drawing->xkb, keycode))
+			continue;
+		if (l < 0
+		    || l >= XkbKeyGroupWidth (drawing->xkb, keycode, g))
+			continue;
+
+		/* Skip "exotic" levels like the "Ctrl" level in PC_SYSREQ */
+		if (l > 0) {
+			guint mods = XkbKeyKeyType (drawing->xkb, keycode,
+						    g)->mods.mask;
+			if ((mods & (ShiftMask | drawing->l3mod)) == 0)
+				continue;
+		}
+
+		if (drawing->track_modifiers) {
+			guint mods_rtrn;
+			KeySym keysym;
+
+			if (XkbTranslateKeyCode (drawing->xkb, keycode,
+						 XkbBuildCoreState
+						 (drawing->mods, g),
+						 &mods_rtrn, &keysym)) {
+				draw_key_label_helper (context, drawing,
+						       keysym, angle, glp,
+						       x, y, width, height,
+						       padding);
+				/* reverse y order */
+			}
+		} else {
+			KeySym keysym;
+
+			keysym =
+			    XkbKeySymEntry (drawing->xkb, keycode, l, g);
+
+			draw_key_label_helper (context, drawing, keysym,
+					       angle, glp, x, y, width,
+					       height, padding);
+			/* reverse y order */
+		}
+	}
+}
+
+/*
+ * The x offset is calculated for complex shapes. It is the rightmost of the vertical lines in the outline
+ */
+static gint
+calc_origin_offset_x (XkbOutlineRec * outline)<--- Parameter 'outline' can be declared as pointer to const
+{
+	gint rv = 0;
+	gint i;
+	XkbPointPtr point = outline->points;
+	if (outline->num_points < 3)
+		return 0;
+	for (i = outline->num_points; --i > 0;) {
+		gint x1 = point->x;
+		gint y1 = point++->y;
+		gint x2 = point->x;
+		gint y2 = point->y;
+
+		/*vertical, bottom to top (clock-wise), on the left */
+		if ((x1 == x2) && (y1 > y2) && (x1 > rv)) {
+			rv = x1;
+		}
+	}
+	return rv;
+}
+
+/* groups are from 0-3 */
+static void
+draw_key (CafekbdKeyboardDrawingRenderContext * context,
+	  CafekbdKeyboardDrawing * drawing, CafekbdKeyboardDrawingKey * key)
+{
+	XkbShapeRec *shape;
+	CtkStyleContext *style_context;
+	CdkRGBA color;
+	XkbOutlineRec *outline;
+	int origin_offset_x;
+	/* gint i; */
+
+	if (!drawing->xkb)
+		return;
+
+#ifdef KBDRAW_DEBUG
+	printf ("shape: %p (base %p, index %d)\n",
+		drawing->xkb->geom->shapes + key->xkbkey->shape_ndx,
+		drawing->xkb->geom->shapes, key->xkbkey->shape_ndx);
+#endif
+
+	shape = drawing->xkb->geom->shapes + key->xkbkey->shape_ndx;
+
+	if (key->pressed) {
+		style_context = ctk_widget_get_style_context (CTK_WIDGET (drawing));
+		ctk_style_context_save (style_context);
+		ctk_style_context_add_class (style_context, CTK_STYLE_CLASS_VIEW);
+		ctk_style_context_get_background_color (style_context,
+		                                        CTK_STATE_FLAG_SELECTED,
+		                                        &color);
+		ctk_style_context_restore (style_context);
+	 } else
+		color = *(drawing->colors + key->xkbkey->color_ndx);
+
+#ifdef KBDRAW_DEBUG
+	printf
+	    (" outlines base in the shape: %p (total: %d), origin: (%d, %d), angle %d\n",
+	     shape->outlines, shape->num_outlines, key->origin_x,
+	     key->origin_y, key->angle);
+#endif
+
+	/* draw the primary outline */
+	outline = shape->primary ? shape->primary : shape->outlines;
+	draw_outline (context, outline, &color, key->angle, key->origin_x,
+		      key->origin_y);
+#if 0
+	/* don't draw other outlines for now, since
+	 * the text placement does not take them into account
+	 */
+	for (i = 0; i < shape->num_outlines; i++) {
+		if (shape->outlines + i == shape->approx ||
+		    shape->outlines + i == shape->primary)
+			continue;
+		draw_outline (context, shape->outlines + i, NULL,
+			      key->angle, key->origin_x, key->origin_y);
+	}
+#endif
+
+	origin_offset_x = calc_origin_offset_x (outline);
+	draw_key_label (context, drawing, key->keycode, key->angle,
+			key->origin_x + origin_offset_x, key->origin_y,
+			shape->bounds.x2, shape->bounds.y2);
+}
+
+static void
+invalidate_region (CafekbdKeyboardDrawing * drawing,
+		   gdouble angle,
+		   gint origin_x, gint origin_y, XkbShapeRec * shape)
+{
+	CdkPoint points[4];
+	gint x_min, x_max, y_min, y_max;
+	gint x, y, width, height;
+	gint xx, yy;
+
+	rotate_coordinate (0, 0, 0, 0, angle, &xx, &yy);
+	points[0].x = xx;
+	points[0].y = yy;
+	rotate_coordinate (0, 0, shape->bounds.x2, 0, angle, &xx, &yy);
+	points[1].x = xx;
+	points[1].y = yy;
+	rotate_coordinate (0, 0, shape->bounds.x2, shape->bounds.y2, angle,
+			   &xx, &yy);
+	points[2].x = xx;
+	points[2].y = yy;
+	rotate_coordinate (0, 0, 0, shape->bounds.y2, angle, &xx, &yy);
+	points[3].x = xx;
+	points[3].y = yy;
+
+	x_min =
+	    MIN (MIN (points[0].x, points[1].x),
+		 MIN (points[2].x, points[3].x));
+	x_max =
+	    MAX (MAX (points[0].x, points[1].x),
+		 MAX (points[2].x, points[3].x));
+	y_min =
+	    MIN (MIN (points[0].y, points[1].y),
+		 MIN (points[2].y, points[3].y));
+	y_max =
+	    MAX (MAX (points[0].y, points[1].y),
+		 MAX (points[2].y, points[3].y));
+
+	x = xkb_to_pixmap_coord (drawing->renderContext,
+				 origin_x + x_min) - 6;
+	y = xkb_to_pixmap_coord (drawing->renderContext,
+				 origin_y + y_min) - 6;
+	width =
+	    xkb_to_pixmap_coord (drawing->renderContext,
+				 x_max - x_min) + 12;
+	height =
+	    xkb_to_pixmap_coord (drawing->renderContext,
+				 y_max - y_min) + 12;
+
+	ctk_widget_queue_draw_area (CTK_WIDGET (drawing), x, y, width,
+				    height);
+}
+
+static void
+invalidate_indicator_doodad_region (CafekbdKeyboardDrawing * drawing,
+				    CafekbdKeyboardDrawingDoodad * doodad)
+{
+	if (!drawing->xkb)
+		return;
+
+	invalidate_region (drawing,
+			   doodad->angle,
+			   doodad->origin_x +
+			   doodad->doodad->indicator.left,
+			   doodad->origin_y +
+			   doodad->doodad->indicator.top,
+			   &drawing->xkb->geom->shapes[doodad->
+						       doodad->indicator.shape_ndx]);
+}
+
+static void
+invalidate_key_region (CafekbdKeyboardDrawing * drawing,
+		       CafekbdKeyboardDrawingKey * key)
+{
+	if (!drawing->xkb)
+		return;
+
+	invalidate_region (drawing,
+			   key->angle,
+			   key->origin_x,
+			   key->origin_y,
+			   &drawing->xkb->geom->shapes[key->
+						       xkbkey->shape_ndx]);
+}
+
+static void
+draw_text_doodad (CafekbdKeyboardDrawingRenderContext * context,
+		  CafekbdKeyboardDrawing * drawing,
+		  CafekbdKeyboardDrawingDoodad * doodad,
+		  XkbTextDoodadRec * text_doodad)
+{
+	gint x, y;
+	if (!drawing->xkb)
+		return;
+
+	x = xkb_to_pixmap_coord (context,
+				 doodad->origin_x + text_doodad->left);
+	y = xkb_to_pixmap_coord (context,
+				 doodad->origin_y + text_doodad->top);
+
+	set_markup (context, text_doodad->text);
+	draw_pango_layout (context, drawing, doodad->angle, x, y);
+}
+
+static void
+draw_indicator_doodad (CafekbdKeyboardDrawingRenderContext * context,
+		       CafekbdKeyboardDrawing * drawing,
+		       CafekbdKeyboardDrawingDoodad * doodad,
+		       XkbIndicatorDoodadRec * indicator_doodad)
+{
+	CdkRGBA *color;
+	XkbShapeRec *shape;<--- Variable 'shape' can be declared as pointer to const
+	gint i;
+
+	if (!drawing->xkb)
+		return;
+
+	shape = drawing->xkb->geom->shapes + indicator_doodad->shape_ndx;
+
+	color = drawing->colors + (doodad->on ?
+				   indicator_doodad->on_color_ndx :
+				   indicator_doodad->off_color_ndx);
+
+	for (i = 0; i < 1; i++)
+		draw_outline (context, shape->outlines + i, color,
+			      doodad->angle,
+			      doodad->origin_x + indicator_doodad->left,
+			      doodad->origin_y + indicator_doodad->top);
+}
+
+static void
+draw_shape_doodad (CafekbdKeyboardDrawingRenderContext * context,
+		   CafekbdKeyboardDrawing * drawing,
+		   CafekbdKeyboardDrawingDoodad * doodad,
+		   XkbShapeDoodadRec * shape_doodad)
+{
+	XkbShapeRec *shape;
+	CdkRGBA *color;
+	gint i;
+
+	if (!drawing->xkb)
+		return;
+
+	shape = drawing->xkb->geom->shapes + shape_doodad->shape_ndx;
+	color = drawing->colors + shape_doodad->color_ndx;
+
+	/* draw the primary outline filled */
+	draw_outline (context,
+		      shape->primary ? shape->primary : shape->outlines,
+		      color, doodad->angle,
+		      doodad->origin_x + shape_doodad->left,
+		      doodad->origin_y + shape_doodad->top);
+
+	/* stroke the other outlines */
+	for (i = 0; i < shape->num_outlines; i++) {
+		if (shape->outlines + i == shape->approx ||
+		    shape->outlines + i == shape->primary)
+			continue;
+		draw_outline (context, shape->outlines + i, NULL,
+			      doodad->angle,
+			      doodad->origin_x + shape_doodad->left,
+			      doodad->origin_y + shape_doodad->top);
+	}
+}
+
+static void
+draw_doodad (CafekbdKeyboardDrawingRenderContext * context,
+	     CafekbdKeyboardDrawing * drawing,
+	     CafekbdKeyboardDrawingDoodad * doodad)
+{
+	switch (doodad->doodad->any.type) {
+	case XkbOutlineDoodad:
+	case XkbSolidDoodad:
+		draw_shape_doodad (context, drawing, doodad,
+				   &doodad->doodad->shape);
+		break;
+
+	case XkbTextDoodad:
+		draw_text_doodad (context, drawing, doodad,
+				  &doodad->doodad->text);
+		break;
+
+	case XkbIndicatorDoodad:
+		draw_indicator_doodad (context, drawing, doodad,
+				       &doodad->doodad->indicator);
+		break;
+
+	case XkbLogoDoodad:
+		/* g_print ("draw_doodad: logo: %s\n", doodad->doodad->logo.logo_name); */
+		/* XkbLogoDoodadRec is essentially a subclass of XkbShapeDoodadRec */
+		draw_shape_doodad (context, drawing, doodad,
+				   &doodad->doodad->shape);
+		break;
+	}
+}
+
+typedef struct {
+	CafekbdKeyboardDrawing *drawing;
+	CafekbdKeyboardDrawingRenderContext *context;
+} DrawKeyboardItemData;
+
+static void
+redraw_overlapping_doodads (CafekbdKeyboardDrawingRenderContext * context,
+			    CafekbdKeyboardDrawing * drawing,
+			    const CafekbdKeyboardDrawingKey * key)
+{
+	GList *list;
+	gboolean do_draw = FALSE;
+
+	for (list = drawing->keyboard_items; list; list = list->next) {
+		CafekbdKeyboardDrawingItem *item = list->data;
+
+		if (do_draw
+		    && item->type ==
+		    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD)
+			draw_doodad (context, drawing,
+				     (CafekbdKeyboardDrawingDoodad *) item);
+
+		if (list->data == key)
+			do_draw = TRUE;
+	}
+}
+
+static void
+draw_keyboard_item (CafekbdKeyboardDrawingItem * item,
+		    DrawKeyboardItemData * data)
+{
+	CafekbdKeyboardDrawing *drawing = data->drawing;
+	CafekbdKeyboardDrawingRenderContext *context = data->context;
+
+	if (!drawing->xkb)
+		return;
+
+	switch (item->type) {
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_INVALID:
+		break;
+
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY:
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA:
+		draw_key (context, drawing,
+			  (CafekbdKeyboardDrawingKey *) item);
+		break;
+
+	case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD:
+		draw_doodad (context, drawing,
+			     (CafekbdKeyboardDrawingDoodad *) item);
+		break;
+	}
+}
+
+static void
+draw_keyboard_to_context (CafekbdKeyboardDrawingRenderContext * context,
+			  CafekbdKeyboardDrawing * drawing)
+{
+	DrawKeyboardItemData data = { drawing, context };
+#ifdef KBDRAW_DEBUG
+	printf ("mods: %d\n", drawing->mods);
+#endif
+	g_list_foreach (drawing->keyboard_items,
+			(GFunc) draw_keyboard_item, &data);
+}
+
+static gboolean
+create_cairo (CafekbdKeyboardDrawing * drawing)
+{
+	CtkStyleContext *style_context = NULL;
+	CtkStateFlags state;
+	CdkRGBA dark_color;
+
+	if (drawing == NULL)
+		return FALSE;
+	if (drawing->surface == NULL)
+		return FALSE;
+
+	drawing->renderContext->cr =
+	    cairo_create (drawing->surface);
+
+	style_context = ctk_widget_get_style_context (CTK_WIDGET (drawing));
+	state = ctk_style_context_get_state (style_context);
+
+	ctk_style_context_get_background_color (style_context, state,
+	                                        &dark_color);
+	/* make dark background by making regular background darker */
+	dark_color.red *= 0.7;
+	dark_color.green *= 0.7;
+	dark_color.blue *= 0.7;
+
+	drawing->renderContext->dark_color = dark_color;
+
+	return TRUE;
+}
+
+static void
+destroy_cairo (CafekbdKeyboardDrawing * drawing)
+{
+	cairo_destroy (drawing->renderContext->cr);
+	drawing->renderContext->cr = NULL;
+}
+
+static void
+draw_keyboard (CafekbdKeyboardDrawing * drawing)
+{
+        CtkStyleContext *context =
+	    ctk_widget_get_style_context (CTK_WIDGET (drawing));
+	CtkStateFlags state = ctk_style_context_get_state (context);
+	CdkRGBA color;
+	CtkAllocation allocation;
+
+	if (!drawing->xkb)
+		return;
+
+	ctk_widget_get_allocation (CTK_WIDGET (drawing), &allocation);
+
+	drawing->surface =
+	    cdk_window_create_similar_surface (ctk_widget_get_window
+					       (CTK_WIDGET (drawing)),
+					       CAIRO_CONTENT_COLOR,
+					       allocation.width,
+					       allocation.height);
+
+	if (create_cairo (drawing)) {
+		/* blank background */
+		ctk_style_context_save (context);
+		ctk_style_context_add_class (context, CTK_STYLE_CLASS_VIEW);
+		ctk_style_context_get_background_color (context, state, &color);
+		ctk_style_context_restore (context);
+		cdk_cairo_set_source_rgba (drawing->renderContext->cr, &color);
+		cairo_paint (drawing->renderContext->cr);
+
+		draw_keyboard_to_context (drawing->renderContext, drawing);
+		destroy_cairo (drawing);
+	}
+}
+
+static void
+alloc_render_context (CafekbdKeyboardDrawing * drawing)
+{
+	CafekbdKeyboardDrawingRenderContext *context =
+	    drawing->renderContext =
+	    g_new0 (CafekbdKeyboardDrawingRenderContext, 1);
+
+	PangoContext *pangoContext =
+	    ctk_widget_get_pango_context (CTK_WIDGET (drawing));
+
+	CtkStyleContext *style_context =
+	    ctk_widget_get_style_context (CTK_WIDGET (drawing));
+	PangoFontDescription *fd = NULL;
+
+	ctk_style_context_get (style_context,
+	                       ctk_style_context_get_state (style_context),
+	                       CTK_STYLE_PROPERTY_FONT, &fd, NULL);
+
+	context->layout = pango_layout_new (pangoContext);
+	pango_layout_set_ellipsize (context->layout, PANGO_ELLIPSIZE_END);
+
+	context->font_desc = pango_font_description_copy (fd);
+	context->angle = 0;
+	context->scale_numerator = 1;
+	context->scale_denominator = 1;
+}
+
+static void
+free_render_context (CafekbdKeyboardDrawing * drawing)
+{
+	CafekbdKeyboardDrawingRenderContext *context = drawing->renderContext;
+	g_object_unref (G_OBJECT (context->layout));
+	pango_font_description_free (context->font_desc);
+
+	g_free (drawing->renderContext);
+	drawing->renderContext = NULL;
+}
+
+static gboolean
+draw (CtkWidget              *widget G_GNUC_UNUSED,
+      cairo_t                *cr,
+      CafekbdKeyboardDrawing *drawing)
+{
+	if (!drawing->xkb)
+		return FALSE;
+
+	if (drawing->surface == NULL)
+		return FALSE;
+
+	cairo_set_source_surface (cr, drawing->surface, 0, 0);
+	cairo_paint (cr);
+
+	return FALSE;
+}
+
+static gboolean
+idle_redraw (gpointer user_data)
+{
+	CafekbdKeyboardDrawing *drawing = user_data;
+
+	drawing->idle_redraw = 0;
+	draw_keyboard (drawing);
+	ctk_widget_queue_draw (CTK_WIDGET (drawing));
+	return FALSE;
+}
+
+static gboolean
+context_setup_scaling (CafekbdKeyboardDrawingRenderContext * context,
+		       CafekbdKeyboardDrawing * drawing,
+		       gdouble width, gdouble height,
+		       gdouble dpi_x, gdouble dpi_y)
+{
+	if (!drawing->xkb)
+		return FALSE;
+
+	if (drawing->xkb->geom->width_mm <= 0
+	    || drawing->xkb->geom->height_mm <= 0) {
+		g_critical
+		    ("keyboard geometry reports width or height as zero!");
+		return FALSE;
+	}
+
+	if (width * drawing->xkb->geom->height_mm <
+	    height * drawing->xkb->geom->width_mm) {
+		context->scale_numerator = width;
+		context->scale_denominator = drawing->xkb->geom->width_mm;
+	} else {
+		context->scale_numerator = height;
+		context->scale_denominator = drawing->xkb->geom->height_mm;
+	}
+
+	pango_font_description_set_size (context->font_desc,
+					 72 * KEY_FONT_SIZE * dpi_x *
+					 context->scale_numerator /
+					 context->scale_denominator);
+	pango_layout_set_spacing (context->layout,
+				  -160 * dpi_y * context->scale_numerator /
+				  context->scale_denominator);
+	pango_layout_set_font_description (context->layout,
+					   context->font_desc);
+
+	return TRUE;
+}
+
+static void
+size_allocate (CtkWidget              *widget G_GNUC_UNUSED,
+	       CtkAllocation          *allocation,
+	       CafekbdKeyboardDrawing *drawing)
+{
+	CafekbdKeyboardDrawingRenderContext *context = drawing->renderContext;
+
+	if (drawing->surface) {
+		cairo_surface_destroy (drawing->surface);
+		drawing->surface = NULL;
+	}
+
+	if (!context_setup_scaling (context, drawing,
+				    allocation->width, allocation->height,
+				    50, 50))
+		return;
+
+	if (!drawing->idle_redraw)
+		drawing->idle_redraw = g_idle_add (idle_redraw, drawing);
+}
+
+static gint
+key_event (CtkWidget              *widget G_GNUC_UNUSED,
+	   CdkEventKey            *event,
+	   CafekbdKeyboardDrawing *drawing)
+{
+	CafekbdKeyboardDrawingKey *key;
+	if (!drawing->xkb)
+		return FALSE;
+
+	key = drawing->keys + event->hardware_keycode;
+
+	if (event->hardware_keycode > drawing->xkb->max_key_code ||
+	    event->hardware_keycode < drawing->xkb->min_key_code ||
+	    key->xkbkey == NULL) {
+		g_signal_emit (drawing,
+			       cafekbd_keyboard_drawing_signals[BAD_KEYCODE],
+			       0, event->hardware_keycode);
+		return TRUE;
+	}
+
+	if ((event->type == CDK_KEY_PRESS && key->pressed) ||
+	    (event->type == CDK_KEY_RELEASE && !key->pressed))
+		return TRUE;
+	/* otherwise this event changes the state we believed we had before */
+
+	key->pressed = (event->type == CDK_KEY_PRESS);
+
+	if (create_cairo (drawing)) {
+		draw_key (drawing->renderContext, drawing, key);
+		redraw_overlapping_doodads (drawing->renderContext,
+					    drawing, key);
+		destroy_cairo (drawing);
+	}
+
+	invalidate_key_region (drawing, key);
+	return TRUE;
+}
+
+static gint
+button_press_event (CtkWidget              *widget,
+		    CdkEventButton         *event G_GNUC_UNUSED,
+		    CafekbdKeyboardDrawing *drawing)<--- Parameter 'drawing' can be declared as pointer to const
+{
+	if (!drawing->xkb)
+		return FALSE;
+
+	ctk_widget_grab_focus (widget);
+	return FALSE;
+}
+
+static gboolean
+unpress_keys (CafekbdKeyboardDrawing * drawing)
+{
+	gint i;
+
+	drawing->timeout = 0;
+
+	if (!drawing->xkb)
+		return FALSE;
+
+	if (create_cairo (drawing)) {
+		for (i = drawing->xkb->min_key_code;
+		     i <= drawing->xkb->max_key_code; i++)
+			if (drawing->keys[i].pressed) {
+				drawing->keys[i].pressed = FALSE;
+				draw_key (drawing->renderContext, drawing,
+					  drawing->keys + i);
+				invalidate_key_region (drawing,
+						       drawing->keys + i);
+			}
+		destroy_cairo (drawing);
+	}
+
+	return FALSE;
+}
+
+static gint
+focus_event (CtkWidget              *widget G_GNUC_UNUSED,
+	     CdkEventFocus          *event,<--- Parameter 'event' can be declared as pointer to const
+	     CafekbdKeyboardDrawing *drawing)
+{
+	if (event->in && drawing->timeout > 0) {
+		g_source_remove (drawing->timeout);
+		drawing->timeout = 0;
+	} else if (drawing->timeout == 0)
+		drawing->timeout =
+		    g_timeout_add (120, (GSourceFunc) unpress_keys,
+				   drawing);
+
+	return FALSE;
+}
+
+static gint
+compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a,<--- Parameter 'a' can be declared as pointer to const
+				  CafekbdKeyboardDrawingItem * b)<--- Parameter 'b' can be declared as pointer to const
+{
+	if (a->priority > b->priority)
+		return 1;
+	else if (a->priority < b->priority)
+		return -1;
+	else
+		return 0;
+}
+
+static void
+init_indicator_doodad (CafekbdKeyboardDrawing * drawing,
+		       XkbDoodadRec * xkbdoodad,
+		       CafekbdKeyboardDrawingDoodad * doodad)
+{
+	if (!drawing->xkb)
+		return;
+
+	if (xkbdoodad->any.type == XkbIndicatorDoodad) {
+		gint index;
+		Atom iname = 0;
+		Atom sname = xkbdoodad->indicator.name;
+		unsigned long phys_indicators =
+		    drawing->xkb->indicators->phys_indicators;
+		Atom *pind = drawing->xkb->names->indicators;<--- Variable 'pind' can be declared as pointer to const
+
+#ifdef KBDRAW_DEBUG
+		printf ("Looking for %d[%s]\n",
+			(int) sname, XGetAtomName (drawing->display,
+						   sname));
+#endif
+
+		for (index = 0; index < XkbNumIndicators; index++) {
+			iname = *pind++;
+			/* name matches and it is real */
+			if (iname == sname
+			    && (phys_indicators & (1 << index)))
+				break;
+			if (iname == 0)
+				break;
+		}
+		if (iname == 0)
+			g_warning ("Could not find indicator %d [%s]\n",
+				   (int) sname,
+				   XGetAtomName (drawing->display, sname));
+		else {
+#ifdef KBDRAW_DEBUG
+			printf ("Found in xkbdesc as %d\n", index);
+#endif
+			drawing->physical_indicators[index] = doodad;
+			/* Trying to obtain the real state, but if fail - just assume OFF */
+			if (!XkbGetNamedIndicator
+			    (drawing->display, sname, NULL, &doodad->on,
+			     NULL, NULL))
+				doodad->on = 0;
+		}
+	}
+}
+
+static void
+init_keys_and_doodads (CafekbdKeyboardDrawing * drawing)
+{
+	gint i, j, k;
+	gint x, y;
+
+	if (!drawing->xkb)
+		return;
+
+	for (i = 0; i < drawing->xkb->geom->num_doodads; i++) {
+		XkbDoodadRec *xkbdoodad = drawing->xkb->geom->doodads + i;
+		CafekbdKeyboardDrawingDoodad *doodad =
+		    g_new (CafekbdKeyboardDrawingDoodad, 1);
+
+		doodad->type = CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD;
+		doodad->origin_x = 0;
+		doodad->origin_y = 0;
+		doodad->angle = 0;
+		doodad->priority = xkbdoodad->any.priority * 256 * 256;
+		doodad->doodad = xkbdoodad;
+
+		init_indicator_doodad (drawing, xkbdoodad, doodad);
+
+		drawing->keyboard_items =
+		    g_list_append (drawing->keyboard_items, doodad);
+	}
+
+	for (i = 0; i < drawing->xkb->geom->num_sections; i++) {
+		XkbSectionRec *section = drawing->xkb->geom->sections + i;
+		guint priority;
+
+#ifdef KBDRAW_DEBUG
+		printf ("initing section %d containing %d rows\n", i,
+			section->num_rows);
+#endif
+		x = section->left;
+		y = section->top;
+		priority = section->priority * 256 * 256;
+
+		for (j = 0; j < section->num_rows; j++) {
+			XkbRowRec *row = section->rows + j;
+
+#ifdef KBDRAW_DEBUG
+			printf ("  initing row %d\n", j);
+#endif
+			x = section->left + row->left;
+			y = section->top + row->top;
+
+			for (k = 0; k < row->num_keys; k++) {
+				XkbKeyRec *xkbkey = row->keys + k;
+				CafekbdKeyboardDrawingKey *key;
+				XkbShapeRec *shape =
+				    drawing->xkb->geom->shapes +
+				    xkbkey->shape_ndx;
+				guint keycode = find_keycode (drawing,
+							      xkbkey->
+							      name.name);
+
+				if (keycode == INVALID_KEYCODE)
+					continue;
+#ifdef KBDRAW_DEBUG
+				printf
+				    ("    initing key %d, shape: %p(%p + %d), code: %u\n",
+				     k, shape, drawing->xkb->geom->shapes,
+				     xkbkey->shape_ndx, keycode);
+#endif
+				if (row->vertical)
+					y += xkbkey->gap;
+				else
+					x += xkbkey->gap;
+
+				if (keycode >= drawing->xkb->min_key_code
+				    && keycode <=
+				    drawing->xkb->max_key_code) {
+					key = drawing->keys + keycode;
+					if (key->type ==
+					    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_INVALID)
+					{
+						key->type =
+						    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY;
+					} else {
+						/* duplicate key for the same keycode,
+						   already defined as CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY */
+						key =
+						    g_new0
+						    (CafekbdKeyboardDrawingKey,
+						     1);
+						key->type =
+						    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA;
+					}
+				} else {
+					g_warning
+					    ("key %4.4s: keycode = %u; not in range %d..%d\n",
+					     xkbkey->name.name, keycode,
+					     drawing->xkb->min_key_code,
+					     drawing->xkb->max_key_code);
+
+					key =
+					    g_new0 (CafekbdKeyboardDrawingKey,
+						    1);
+					key->type =
+					    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA;
+				}
+
+				key->xkbkey = xkbkey;
+				key->angle = section->angle;
+				rotate_coordinate (section->left,
+						   section->top, x, y,
+						   section->angle,
+						   &key->origin_x,
+						   &key->origin_y);
+				key->priority = priority;
+				key->keycode = keycode;
+
+				drawing->keyboard_items =
+				    g_list_append (drawing->keyboard_items,
+						   key);
+
+				if (row->vertical)
+					y += shape->bounds.y2;
+				else
+					x += shape->bounds.x2;
+
+				priority++;
+			}
+		}
+
+		for (j = 0; j < section->num_doodads; j++) {
+			XkbDoodadRec *xkbdoodad = section->doodads + j;
+			CafekbdKeyboardDrawingDoodad *doodad =
+			    g_new (CafekbdKeyboardDrawingDoodad, 1);
+
+			doodad->type =
+			    CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD;
+			doodad->origin_x = x;
+			doodad->origin_y = y;
+			doodad->angle = section->angle;
+			doodad->priority =
+			    priority + xkbdoodad->any.priority;
+			doodad->doodad = xkbdoodad;
+
+			init_indicator_doodad (drawing, xkbdoodad, doodad);
+
+			drawing->keyboard_items =
+			    g_list_append (drawing->keyboard_items,
+					   doodad);
+		}
+	}
+
+	drawing->keyboard_items = g_list_sort (drawing->keyboard_items,
+					       (GCompareFunc)
+					       compare_keyboard_item_priorities);<--- You might need to cast the function pointer here<--- You might need to cast the function pointer here
+}
+
+static void
+init_colors (CafekbdKeyboardDrawing * drawing)
+{
+	gboolean result;
+	gint i;
+
+	if (!drawing->xkb)
+		return;
+
+	drawing->colors = g_new (CdkRGBA, drawing->xkb->geom->num_colors);
+
+	for (i = 0; i < drawing->xkb->geom->num_colors; i++) {
+		result =
+		    parse_xkb_color_spec (drawing->xkb->geom->
+					  colors[i].spec,
+					  drawing->colors + i);
+
+		if (!result)
+			g_warning
+			    ("init_colors: unable to parse color %s\n",
+			     drawing->xkb->geom->colors[i].spec);
+	}
+}
+
+static void
+free_cdik (			/*colors doodads indicators keys */
+		  CafekbdKeyboardDrawing * drawing)
+{
+	GList *itemp;
+
+	if (!drawing->xkb)
+		return;
+
+	for (itemp = drawing->keyboard_items; itemp; itemp = itemp->next) {
+		CafekbdKeyboardDrawingItem *item = itemp->data;
+
+		switch (item->type) {
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_INVALID:
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY:
+			break;
+
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY_EXTRA:
+		case CAFEKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD:
+			g_free (item);
+			break;
+		}
+	}
+
+	g_list_free (drawing->keyboard_items);
+	drawing->keyboard_items = NULL;
+
+	g_free (drawing->keys);
+	g_free (drawing->colors);
+}
+
+static void
+alloc_cdik (CafekbdKeyboardDrawing * drawing)
+{
+	if (!drawing->xkb)
+		return;
+
+	drawing->physical_indicators_size =
+	    drawing->xkb->indicators->phys_indicators + 1;
+	drawing->physical_indicators =
+	    g_new0 (CafekbdKeyboardDrawingDoodad *,
+		    drawing->physical_indicators_size);
+	drawing->keys =
+	    g_new0 (CafekbdKeyboardDrawingKey,
+		    drawing->xkb->max_key_code + 1);
+}
+
+static void
+process_indicators_state_notify (XkbIndicatorNotifyEvent * iev,<--- Parameter 'iev' can be declared as pointer to const
+				 CafekbdKeyboardDrawing * drawing)
+{
+	/* Good question: should we track indicators when the keyboard is
+	   NOT really taken from the screen */
+	gint i;
+
+	for (i = 0; i <= drawing->xkb->indicators->phys_indicators; i++)
+		if (drawing->physical_indicators[i] != NULL
+		    && (iev->changed & 1 << i)) {
+			gint state = (iev->state & 1 << i) != FALSE;
+
+			if ((state && !drawing->physical_indicators[i]->on)
+			    || (!state
+				&& drawing->physical_indicators[i]->on)) {
+				drawing->physical_indicators[i]->on =
+				    state;
+				if (create_cairo (drawing)) {
+					draw_doodad
+					    (drawing->renderContext,
+					     drawing,
+					     drawing->physical_indicators
+					     [i]);
+					destroy_cairo (drawing);
+				}
+				invalidate_indicator_doodad_region
+				    (drawing,
+				     drawing->physical_indicators[i]);
+			}
+		}
+}
+
+static CdkFilterReturn
+xkb_state_notify_event_filter (CdkXEvent              *cdkxev,
+			       CdkEvent               *event G_GNUC_UNUSED,
+			       CafekbdKeyboardDrawing *drawing)
+{
+#define modifier_change_mask (XkbModifierStateMask | XkbModifierBaseMask | XkbModifierLatchMask | XkbModifierLockMask)
+
+	if (!drawing->xkb)
+		return CDK_FILTER_CONTINUE;
+
+	if (((XEvent *) cdkxev)->type == drawing->xkb_event_type) {
+		XkbEvent *kev = (XkbEvent *) cdkxev;
+		CtkAllocation allocation;
+		switch (kev->any.xkb_type) {
+		case XkbStateNotify:
+			if (((kev->state.changed & modifier_change_mask) &&
+			     drawing->track_modifiers)) {
+				free_cdik (drawing);
+				if (drawing->track_modifiers)
+					cafekbd_keyboard_drawing_set_mods
+					    (drawing,
+					     kev->state.compat_state);
+				drawing->keys =
+				    g_new0 (CafekbdKeyboardDrawingKey,
+					    drawing->xkb->max_key_code +
+					    1);
+
+				ctk_widget_get_allocation (CTK_WIDGET
+							   (drawing),
+							   &allocation);
+				size_allocate (CTK_WIDGET (drawing),
+					       &allocation, drawing);
+
+				init_keys_and_doodads (drawing);
+				init_colors (drawing);
+			}
+			break;
+
+		case XkbIndicatorStateNotify:
+			{
+				process_indicators_state_notify (&
+								 ((XkbEvent
+								   *)
+								  cdkxev)->indicators,
+drawing);
+			}
+			break;
+
+		case XkbIndicatorMapNotify:
+		case XkbControlsNotify:
+		case XkbNamesNotify:
+		case XkbNewKeyboardNotify:
+			{
+				XkbStateRec state;
+				memset (&state, 0, sizeof (state));
+				XkbGetState (drawing->display,
+					     XkbUseCoreKbd, &state);
+				if (drawing->track_modifiers)
+					cafekbd_keyboard_drawing_set_mods
+					    (drawing, state.compat_state);
+				if (drawing->track_config)
+					cafekbd_keyboard_drawing_set_keyboard
+					    (drawing, NULL);
+			}
+			break;
+		}
+	}
+
+	return CDK_FILTER_CONTINUE;
+}
+
+static void
+destroy (CafekbdKeyboardDrawing * drawing)
+{
+	free_render_context (drawing);
+	cdk_window_remove_filter (NULL, (CdkFilterFunc)
+				  xkb_state_notify_event_filter, drawing);
+	if (drawing->timeout > 0) {
+		g_source_remove (drawing->timeout);
+		drawing->timeout = 0;
+	}
+	if (drawing->idle_redraw > 0) {
+		g_source_remove (drawing->idle_redraw);
+		drawing->idle_redraw = 0;
+	}
+
+	if (drawing->surface != NULL) {
+		cairo_surface_destroy (drawing->surface);
+	}
+}
+
+static void
+style_changed (CafekbdKeyboardDrawing * drawing)
+{
+	pango_layout_context_changed (drawing->renderContext->layout);
+}
+
+static void
+cafekbd_keyboard_drawing_init (CafekbdKeyboardDrawing * drawing)
+{
+	gint opcode = 0, error = 0, major = 1, minor = 0;
+	gint mask;
+
+	drawing->display = CDK_DISPLAY_XDISPLAY(cdk_display_get_default());
+
+	printf ("dpy: %p\n", (void *) drawing->display);
+
+	if (!XkbQueryExtension
+	    (drawing->display, &opcode, &drawing->xkb_event_type, &error,
+	     &major, &minor))
+		g_critical
+		    ("XkbQueryExtension failed! Stuff probably won't work.");
+
+	printf ("evt/error/major/minor: %d/%d/%d/%d\n",
+		drawing->xkb_event_type, error, major, minor);
+
+	/* XXX: this stuff probably doesn't matter.. also, cdk_screen_get_default can fail */
+	if (ctk_widget_has_screen (CTK_WIDGET (drawing)))
+		drawing->screen_num =
+		    cdk_x11_screen_get_screen_number (ctk_widget_get_screen
+					   (CTK_WIDGET (drawing)));
+	else
+		drawing->screen_num =
+		    cdk_x11_screen_get_screen_number (cdk_screen_get_default ());
+
+	drawing->surface = NULL;
+	alloc_render_context (drawing);
+
+	drawing->keyboard_items = NULL;
+	drawing->colors = NULL;
+
+	drawing->track_modifiers = 0;
+	drawing->track_config = 0;
+
+	/* XXX: XkbClientMapMask | XkbIndicatorMapMask | XkbNamesMask | XkbGeometryMask */
+	drawing->xkb = XkbGetKeyboard (drawing->display,
+				       XkbGBN_GeometryMask |
+				       XkbGBN_KeyNamesMask |
+				       XkbGBN_OtherNamesMask |
+				       XkbGBN_SymbolsMask |
+				       XkbGBN_IndicatorMapMask,
+				       XkbUseCoreKbd);
+	if (drawing->xkb) {
+		XkbGetNames (drawing->display, XkbAllNamesMask, drawing->xkb);
+		XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+				       XkbIndicatorStateNotify,
+				       drawing->xkb->indicators->phys_indicators,
+				       drawing->xkb->indicators->phys_indicators);
+	}
+
+	drawing->l3mod = XkbKeysymToModifiers (drawing->display,
+					       CDK_KEY_ISO_Level3_Shift);
+
+	drawing->xkbOnDisplay = TRUE;
+
+	alloc_cdik (drawing);
+
+	mask =
+	    (XkbStateNotifyMask | XkbNamesNotifyMask |
+	     XkbControlsNotifyMask | XkbIndicatorMapNotifyMask |
+	     XkbNewKeyboardNotifyMask);
+	XkbSelectEvents (drawing->display, XkbUseCoreKbd, mask, mask);
+
+	mask = XkbGroupStateMask | XkbModifierStateMask;
+	XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+			       XkbStateNotify, mask, mask);
+
+	mask = (XkbGroupNamesMask | XkbIndicatorNamesMask);
+	XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+			       XkbNamesNotify, mask, mask);
+	init_keys_and_doodads (drawing);
+	init_colors (drawing);
+
+	/* required to get key events */
+	ctk_widget_set_can_focus (CTK_WIDGET (drawing), TRUE);
+
+	ctk_widget_set_events (CTK_WIDGET (drawing),
+			       CDK_EXPOSURE_MASK | CDK_KEY_PRESS_MASK |
+			       CDK_KEY_RELEASE_MASK | CDK_BUTTON_PRESS_MASK
+			       | CDK_FOCUS_CHANGE_MASK);
+	g_signal_connect (G_OBJECT (drawing), "draw",
+			  G_CALLBACK (draw), drawing);
+	g_signal_connect_after (G_OBJECT (drawing), "key-press-event",
+				G_CALLBACK (key_event), drawing);
+	g_signal_connect_after (G_OBJECT (drawing), "key-release-event",
+				G_CALLBACK (key_event), drawing);
+	g_signal_connect (G_OBJECT (drawing), "button-press-event",
+			  G_CALLBACK (button_press_event), drawing);<--- You might need to cast the function pointer here
+	g_signal_connect (G_OBJECT (drawing), "focus-out-event",
+			  G_CALLBACK (focus_event), drawing);
+	g_signal_connect (G_OBJECT (drawing), "focus-in-event",
+			  G_CALLBACK (focus_event), drawing);<--- You might need to cast the function pointer here
+	g_signal_connect (G_OBJECT (drawing), "size-allocate",
+			  G_CALLBACK (size_allocate), drawing);
+	g_signal_connect (G_OBJECT (drawing), "destroy",
+			  G_CALLBACK (destroy), drawing);
+	g_signal_connect (G_OBJECT (drawing), "style-set",
+			  G_CALLBACK (style_changed), drawing);
+
+	cdk_window_add_filter (NULL, (CdkFilterFunc)
+			       xkb_state_notify_event_filter, drawing);
+}
+
+CtkWidget *
+cafekbd_keyboard_drawing_new (void)
+{
+	return
+	    CTK_WIDGET (g_object_new
+			(cafekbd_keyboard_drawing_get_type (), NULL));
+}
+
+static void
+cafekbd_keyboard_drawing_class_init (CafekbdKeyboardDrawingClass * klass)
+{
+	CtkWidgetClass *widget_class = CTK_WIDGET_CLASS (klass);
+	ctk_widget_class_set_css_name (widget_class, "cafekbd-keyboard-drawing");
+
+	klass->bad_keycode = NULL;
+
+	cafekbd_keyboard_drawing_signals[BAD_KEYCODE] =
+	    g_signal_new ("bad-keycode", cafekbd_keyboard_drawing_get_type (),
+			  G_SIGNAL_RUN_FIRST,
+			  G_STRUCT_OFFSET (CafekbdKeyboardDrawingClass,
+					   bad_keycode), NULL, NULL,
+			  cafekbd_keyboard_drawing_VOID__UINT, G_TYPE_NONE, 1,
+			  G_TYPE_UINT);
+}
+
+GType
+cafekbd_keyboard_drawing_get_type (void)
+{
+	static GType cafekbd_keyboard_drawing_type = 0;
+
+	if (!cafekbd_keyboard_drawing_type) {
+		static const GTypeInfo cafekbd_keyboard_drawing_info = {
+			sizeof (CafekbdKeyboardDrawingClass),
+			NULL,	/* base_init */
+			NULL,	/* base_finalize */
+			(GClassInitFunc) cafekbd_keyboard_drawing_class_init,
+			NULL,	/* class_finalize */
+			NULL,	/* class_data */
+			sizeof (CafekbdKeyboardDrawing),
+			0,	/* n_preallocs */
+			(GInstanceInitFunc) cafekbd_keyboard_drawing_init,
+			NULL	/* *value_table */
+		};
+
+		cafekbd_keyboard_drawing_type =
+		    g_type_register_static (CTK_TYPE_DRAWING_AREA,
+					    "CafekbdKeyboardDrawing",
+					    &cafekbd_keyboard_drawing_info,
+					    0);
+	}
+
+	return cafekbd_keyboard_drawing_type;
+}
+
+void
+cafekbd_keyboard_drawing_set_mods (CafekbdKeyboardDrawing * drawing, guint mods)
+{
+#ifdef KBDRAW_DEBUG
+	printf ("set_mods: %d\n", mods);
+#endif
+	if (mods != drawing->mods) {
+		drawing->mods = mods;
+		ctk_widget_queue_draw (CTK_WIDGET (drawing));
+	}
+}
+
+/**
+ * cafekbd_keyboard_drawing_render:
+ * @kbdrawing: keyboard layout to render
+ * @cr:        Cairo context to render to
+ * @layout:    Pango layout to use to render text
+ * @x:         left coordinate (pixels) of region to render in
+ * @y:         top coordinate (pixels) of region to render in
+ * @width:     width (pixels) of region to render in
+ * @height:    height (pixels) of region to render in
+ *
+ * Renders a keyboard layout to a cairo_t context.  @cr and @layout can be got
+ * from e.g. a CtkWidget or a CtkPrintContext.  @cr and @layout may be modified
+ * by the function but will not be unreffed.
+ *
+ * Returns: %TRUE on success, %FALSE on failure
+ */
+gboolean
+cafekbd_keyboard_drawing_render (CafekbdKeyboardDrawing * kbdrawing,
+			      cairo_t * cr,
+			      PangoLayout * layout,
+			      double x, double y,
+			      double width, double height,
+			      double dpi_x, double dpi_y)
+{
+	CtkStyleContext *style_context =
+	    ctk_widget_get_style_context (CTK_WIDGET (kbdrawing));
+	CdkRGBA dark_color;
+	PangoFontDescription *fd = NULL;
+
+	ctk_style_context_get_background_color (style_context,
+	                                        ctk_style_context_get_state (style_context),
+	                                        &dark_color);
+	/* make dark background by making regular background darker */
+	dark_color.red *= 0.7;
+	dark_color.green *= 0.7;
+	dark_color.blue *= 0.7;
+
+	ctk_style_context_get (style_context,
+	                       ctk_style_context_get_state (style_context),
+	                       CTK_STYLE_PROPERTY_FONT, &fd, NULL);
+	fd = pango_font_description_copy (fd);
+
+	CafekbdKeyboardDrawingRenderContext context = {
+		cr,
+		kbdrawing->renderContext->angle,
+		layout,
+		pango_font_description_copy (fd),
+		1, 1,
+		dark_color
+	};
+
+	if (!context_setup_scaling (&context, kbdrawing, width, height,
+	                            dpi_x, dpi_y))
+		return FALSE;
+	cairo_translate (cr, x, y);
+
+	draw_keyboard_to_context (&context, kbdrawing);
+
+	pango_font_description_free (fd);
+
+	return TRUE;
+}
+
+/**
+ * cafekbd_keyboard_drawing_set_keyboard: (skip)
+ */
+gboolean
+cafekbd_keyboard_drawing_set_keyboard (CafekbdKeyboardDrawing * drawing,
+				    XkbComponentNamesRec * names)
+{
+	CtkAllocation allocation;
+
+	free_cdik (drawing);
+	if (drawing->xkb)
+		XkbFreeKeyboard (drawing->xkb, 0, TRUE);	/* free_all = TRUE */
+	drawing->xkb = NULL;
+
+	if (names) {
+		drawing->xkb =
+		    XkbGetKeyboardByName (drawing->display, XkbUseCoreKbd,
+					  names, 0,
+					  XkbGBN_GeometryMask |
+					  XkbGBN_KeyNamesMask |
+					  XkbGBN_OtherNamesMask |
+					  XkbGBN_ClientSymbolsMask |
+					  XkbGBN_IndicatorMapMask, FALSE);
+		drawing->xkbOnDisplay = FALSE;
+	} else {
+		drawing->xkb = XkbGetKeyboard (drawing->display,
+					       XkbGBN_GeometryMask |
+					       XkbGBN_KeyNamesMask |
+					       XkbGBN_OtherNamesMask |
+					       XkbGBN_SymbolsMask |
+					       XkbGBN_IndicatorMapMask,
+					       XkbUseCoreKbd);
+		XkbGetNames (drawing->display, XkbAllNamesMask,
+			     drawing->xkb);
+		drawing->xkbOnDisplay = TRUE;
+	}
+
+	if (drawing->xkb) {
+		XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
+				       XkbIndicatorStateNotify,
+				       drawing->xkb->indicators->phys_indicators,
+				       drawing->xkb->indicators->phys_indicators);
+	}
+
+	alloc_cdik (drawing);
+
+	init_keys_and_doodads (drawing);
+	init_colors (drawing);
+
+	ctk_widget_get_allocation (CTK_WIDGET (drawing), &allocation);
+	size_allocate (CTK_WIDGET (drawing), &allocation, drawing);
+	ctk_widget_queue_draw (CTK_WIDGET (drawing));
+
+	return TRUE;
+}
+
+const gchar* cafekbd_keyboard_drawing_get_keycodes(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->keycodes <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->keycodes);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_geometry(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->geometry <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->geometry);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_symbols(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->symbols <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->symbols);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_types(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->types <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->types);
+	}
+}
+
+const gchar* cafekbd_keyboard_drawing_get_compat(CafekbdKeyboardDrawing* drawing)
+{
+	if (!drawing->xkb || drawing->xkb->names->compat <= 0)
+	{
+		return NULL;
+	}
+	else
+	{
+		return XGetAtomName(drawing->display, drawing->xkb->names->compat);
+	}
+}
+
+void
+cafekbd_keyboard_drawing_set_track_modifiers (CafekbdKeyboardDrawing * drawing,
+					   gboolean enable)
+{
+	if (enable) {
+		XkbStateRec state;
+		drawing->track_modifiers = 1;
+		memset (&state, 0, sizeof (state));
+		XkbGetState (drawing->display, XkbUseCoreKbd, &state);
+		cafekbd_keyboard_drawing_set_mods (drawing,
+						state.compat_state);
+	} else
+		drawing->track_modifiers = 0;
+}
+
+void
+cafekbd_keyboard_drawing_set_track_config (CafekbdKeyboardDrawing * drawing,
+					gboolean enable)
+{
+	if (enable)
+		drawing->track_config = 1;
+	else
+		drawing->track_config = 0;
+}
+
+void
+cafekbd_keyboard_drawing_set_groups_levels (CafekbdKeyboardDrawing * drawing,
+					 CafekbdKeyboardDrawingGroupLevel *
+					 groupLevels[])
+{
+#ifdef KBDRAW_DEBUG
+	printf ("set_group_levels [topLeft]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPLEFT]->level);
+	printf ("set_group_levels [topRight]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPRIGHT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_TOPRIGHT]->level);
+	printf ("set_group_levels [bottomLeft]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT]->level);
+	printf ("set_group_levels [bottomRight]: %d %d \n",
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT]->group,
+		groupLevels[CAFEKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT]->level);
+#endif
+	drawing->groupLevels = groupLevels;
+
+	ctk_widget_queue_draw (CTK_WIDGET (drawing));
+}
+
+typedef struct {
+	CafekbdKeyboardDrawing *drawing;
+	const gchar *description;
+} XkbLayoutPreviewPrintData;
+
+static void
+cafekbd_keyboard_drawing_begin_print (CtkPrintOperation         *operation,
+				      CtkPrintContext           *context G_GNUC_UNUSED,
+				      XkbLayoutPreviewPrintData *data G_GNUC_UNUSED)
+{
+	/* We always print single-page documents */
+	CtkPrintSettings *settings =
+	    ctk_print_operation_get_print_settings (operation);
+	ctk_print_operation_set_n_pages (operation, 1);
+	if (!ctk_print_settings_has_key
+	    (settings, CTK_PRINT_SETTINGS_ORIENTATION))
+		ctk_print_settings_set_orientation (settings,
+						    CTK_PAGE_ORIENTATION_LANDSCAPE);
+}
+
+static void
+cafekbd_keyboard_drawing_draw_page (CtkPrintOperation         *operation,
+				    CtkPrintContext           *context,
+				    gint                       page_nr G_GNUC_UNUSED,
+				    XkbLayoutPreviewPrintData *data)
+{
+	cairo_t *cr = ctk_print_context_get_cairo_context (context);
+	PangoLayout *layout =
+	    ctk_print_context_create_pango_layout (context);
+	PangoFontDescription *desc =
+	    pango_font_description_from_string ("sans 8");
+	gdouble width = ctk_print_context_get_width (context);
+	gdouble height = ctk_print_context_get_height (context);
+	gdouble dpi_x = ctk_print_context_get_dpi_x (context);
+	gdouble dpi_y = ctk_print_context_get_dpi_y (context);
+	gchar *header;
+
+	ctk_print_operation_set_unit (operation, CTK_UNIT_PIXEL);
+
+	header = g_strdup_printf
+	    (_("Keyboard layout \"%s\"\n"
+	       "Copyright &#169; X.Org Foundation and "
+	       "XKeyboardConfig contributors\n"
+	       "For licensing see package metadata"), data->description);
+	pango_layout_set_markup (layout, header, -1);
+	pango_layout_set_font_description (layout, desc);
+	pango_font_description_free (desc);
+	pango_layout_set_width (layout, pango_units_from_double (width));
+	pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER);
+	cairo_set_source_rgb (cr, 0, 0, 0);
+	cairo_move_to (cr, 0, 0);
+	pango_cairo_show_layout (cr, layout);
+
+	cafekbd_keyboard_drawing_render (CAFEKBD_KEYBOARD_DRAWING
+				      (data->drawing), cr, layout, 0.0,
+				      0.0, width, height, dpi_x, dpi_y);
+
+	g_object_unref (layout);
+}
+
+void
+cafekbd_keyboard_drawing_print (CafekbdKeyboardDrawing * drawing,
+			     CtkWindow * parent_window,
+			     const gchar * description)
+{
+	CtkPrintOperation *print;
+	CtkPrintOperationResult res;
+	static CtkPrintSettings *settings = NULL;
+	XkbLayoutPreviewPrintData data = { drawing, description };
+
+	print = ctk_print_operation_new ();
+
+	if (settings != NULL)
+		ctk_print_operation_set_print_settings (print, settings);
+
+	g_signal_connect (print, "begin_print",
+			  G_CALLBACK (cafekbd_keyboard_drawing_begin_print),
+			  &data);
+	g_signal_connect (print, "draw_page",
+			  G_CALLBACK (cafekbd_keyboard_drawing_draw_page),
+			  &data);
+
+	res = ctk_print_operation_run (print,
+				       CTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
+				       parent_window, NULL);
+
+	if (res == CTK_PRINT_OPERATION_RESULT_APPLY) {
+		if (settings != NULL)
+			g_object_unref (settings);
+		settings = ctk_print_operation_get_print_settings (print);
+		g_object_ref (settings);
+	}
+
+	g_object_unref (print);
+}
+
+static void
+show_layout_response (CtkWidget * dialog, gint resp)
+{
+	CdkRectangle rect;
+	CtkWidget *kbdraw;
+	const gchar *groupName;
+
+	switch (resp) {
+	case CTK_RESPONSE_CLOSE:
+		ctk_window_get_position (CTK_WINDOW (dialog), &rect.x,
+					 &rect.y);
+		ctk_window_get_size (CTK_WINDOW (dialog), &rect.width,
+				     &rect.height);
+		cafekbd_preview_save_position (&rect);
+		ctk_widget_destroy (dialog);
+		break;
+	case CTK_RESPONSE_PRINT:
+		kbdraw =
+		    CTK_WIDGET (g_object_get_data
+				(G_OBJECT (dialog), "kbdraw"));
+		groupName =
+		    (const gchar *) g_object_get_data (G_OBJECT (dialog),
+						       "groupName");
+		cafekbd_keyboard_drawing_print (CAFEKBD_KEYBOARD_DRAWING
+					     (kbdraw), CTK_WINDOW (dialog),
+					     groupName ? groupName :
+					     _("Unknown"));
+	}
+}
+
+CtkWidget *
+cafekbd_keyboard_drawing_new_dialog (gint group, gchar * group_name)
+{
+	static CafekbdKeyboardDrawingGroupLevel groupsLevels[] = { {
+								 0, 1}, {
+									 0,
+									 3},
+	{
+	 0, 0}, {
+		 0, 2}
+	};
+	static CafekbdKeyboardDrawingGroupLevel *pGroupsLevels[] = {
+		groupsLevels, groupsLevels + 1, groupsLevels + 2,
+		groupsLevels + 3
+	};
+
+	CtkBuilder *builder;
+	CtkWidget *dialog, *kbdraw;
+	XkbComponentNamesRec component_names;
+	XklConfigRec *xkl_data;
+	CdkRectangle *rect;
+	GError *error = NULL;
+	char title[128] = "";
+	XklEngine* engine = xkl_engine_get_instance(CDK_DISPLAY_XDISPLAY(cdk_display_get_default()));
+
+	builder = ctk_builder_new ();
+	ctk_builder_add_from_resource (builder,
+	                               "/org/cafe/peripherals/keyboard/show-layout.ui",
+	                               &error);
+
+	if (error) {
+		g_error ("Could not load UI: %s", error->message);
+		g_clear_error (&error);
+	}
+
+
+	dialog =
+	    CTK_WIDGET (ctk_builder_get_object
+			(builder, "gswitchit_layout_view"));
+	kbdraw = cafekbd_keyboard_drawing_new ();
+	ctk_widget_set_vexpand (kbdraw, TRUE);
+
+	snprintf (title, sizeof (title), _("Keyboard Layout \"%s\""),
+		  group_name);
+	ctk_window_set_title (CTK_WINDOW (dialog), title);
+	g_object_set_data_full (G_OBJECT (dialog), "group_name",
+				g_strdup (group_name), g_free);
+
+	cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING
+						 (kbdraw), pGroupsLevels);
+
+	xkl_data = xkl_config_rec_new ();
+	if (xkl_config_rec_get_from_server (xkl_data, engine)) {
+		int num_layouts = g_strv_length (xkl_data->layouts);
+		int num_variants = g_strv_length (xkl_data->variants);
+		if (group >= 0 && group < num_layouts
+		    && group < num_variants) {
+			char *l = g_strdup (xkl_data->layouts[group]);
+			char *v = g_strdup (xkl_data->variants[group]);
+			char **p;
+			int i;
+
+			if ((p = xkl_data->layouts) != NULL)
+				for (i = num_layouts; --i >= 0;)
+					g_free (*p++);
+
+			if ((p = xkl_data->variants) != NULL)
+				for (i = num_variants; --i >= 0;)
+					g_free (*p++);
+
+			xkl_data->layouts =
+			    g_realloc (xkl_data->layouts,
+				       sizeof (char *) * 2);
+			xkl_data->variants =
+			    g_realloc (xkl_data->variants,
+				       sizeof (char *) * 2);
+			xkl_data->layouts[0] = l;
+			xkl_data->variants[0] = v;
+			xkl_data->layouts[1] = xkl_data->variants[1] =
+			    NULL;
+		}
+
+		if (xkl_xkb_config_native_prepare(engine, xkl_data, &component_names))
+		{
+			cafekbd_keyboard_drawing_set_keyboard
+			    (CAFEKBD_KEYBOARD_DRAWING (kbdraw),
+			     &component_names);
+			xkl_xkb_config_native_cleanup (engine,
+						       &component_names);
+		}
+	}
+
+	g_object_unref (G_OBJECT (xkl_data));
+
+	g_object_set_data (G_OBJECT (dialog), "builderData", builder);
+	g_signal_connect (G_OBJECT (dialog), "response", G_CALLBACK (show_layout_response), NULL);
+
+	rect = cafekbd_preview_load_position ();
+
+	if (rect != NULL)
+	{
+		ctk_window_move (CTK_WINDOW (dialog), rect->x, rect->y);
+		ctk_window_resize (CTK_WINDOW (dialog), rect->width, rect->height);
+		g_free (rect);
+	}
+	else
+	{
+		ctk_window_resize (CTK_WINDOW (dialog), 700, 400);
+	}
+
+	ctk_window_set_resizable (CTK_WINDOW (dialog), TRUE);
+
+	ctk_container_add (CTK_CONTAINER
+			   (ctk_builder_get_object
+			    (builder, "preview_vbox")), kbdraw);
+
+	g_object_set_data (G_OBJECT (dialog), "kbdraw", kbdraw);
+
+		g_signal_connect_swapped(dialog, "destroy", G_CALLBACK(g_object_unref),  g_object_get_data(G_OBJECT(dialog), "builderData"));
+
+	ctk_widget_show_all(dialog);
+
+	return dialog;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/5.html b/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/5.html new file mode 100644 index 0000000..a0afe30 --- /dev/null +++ b/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/5.html @@ -0,0 +1,1978 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+#include <config.h>
+
+#include <memory.h>
+
+#include <cairo.h>
+
+#include <cdk/cdkkeysyms.h>
+#include <cdk/cdkx.h>
+#include <glib/gi18n-lib.h>
+#include <glib/gprintf.h>
+
+#include <cafekbd-status.h>
+
+#include <cafekbd-desktop-config.h>
+#include <cafekbd-indicator-config.h>
+
+typedef struct _gki_globals {
+	XklEngine *engine;
+	XklConfigRegistry *registry;
+
+	CafekbdDesktopConfig cfg;
+	CafekbdIndicatorConfig ind_cfg;
+	CafekbdKeyboardConfig kbd_cfg;
+
+	const gchar *tooltips_format;
+	gchar **full_group_names;
+	gchar **short_group_names;
+
+	gint current_width;
+	gint current_height;
+	int real_width;
+
+	GSList *icons;		/* list of GdkPixbuf */
+	GSList *widget_instances;	/* list of CafekbdStatus */
+	gulong state_changed_handler;
+	gulong config_changed_handler;
+} gki_globals;
+
+static gchar *settings_signal_names[] = {
+	"notify::ctk-theme-name",
+	"notify::ctk-key-theme-name",
+	"notify::ctk-font-name",
+	"notify::font-options",
+};
+
+struct _CafekbdStatusPrivate {
+	gdouble angle;
+	gulong settings_signal_handlers[sizeof (settings_signal_names) /
+					sizeof (settings_signal_names[0])];
+};
+
+/* one instance for ALL widgets */
+static gki_globals globals;
+
+#define ForAllIndicators() \
+	{ \
+		GSList* cur; \
+		for (cur = globals.widget_instances; cur != NULL; cur = cur->next) { \
+			CafekbdStatus * gki = (CafekbdStatus*)cur->data;
+#define NextIndicator() \
+		} \
+	}
+
+G_DEFINE_TYPE (CafekbdStatus, cafekbd_status, CTK_TYPE_STATUS_ICON)<--- There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
+static void
+cafekbd_status_global_init (void);
+static void
+cafekbd_status_global_term (void);
+static GdkPixbuf *
+cafekbd_status_prepare_drawing (CafekbdStatus * gki, int group);
+static void
+cafekbd_status_set_current_page_for_group (CafekbdStatus * gki, int group);
+static void
+cafekbd_status_set_current_page (CafekbdStatus * gki);
+static void
+cafekbd_status_global_cleanup (CafekbdStatus * gki);
+static void
+cafekbd_status_global_fill (CafekbdStatus * gki);
+static void
+cafekbd_status_set_tooltips (CafekbdStatus * gki, const char *str);
+
+void
+cafekbd_status_set_tooltips (CafekbdStatus * gki, const char *str)
+{
+	g_assert (str == NULL || g_utf8_validate (str, -1, NULL));
+
+	ctk_status_icon_set_tooltip_text (CTK_STATUS_ICON (gki), str);
+}
+
+void
+cafekbd_status_global_cleanup (CafekbdStatus *gki G_GNUC_UNUSED)
+{
+	while (globals.icons) {
+		if (globals.icons->data)
+			g_object_unref (G_OBJECT (globals.icons->data));
+		globals.icons =
+		    g_slist_delete_link (globals.icons, globals.icons);
+	}
+}
+
+void
+cafekbd_status_global_fill (CafekbdStatus * gki)
+{
+	int grp;
+	int total_groups = xkl_engine_get_num_groups (globals.engine);
+
+	for (grp = 0; grp < total_groups; grp++) {
+		GdkPixbuf *page = cafekbd_status_prepare_drawing (gki, grp);
+		globals.icons = g_slist_append (globals.icons, page);
+	}
+}
+
+static void
+cafekbd_status_activate (CafekbdStatus *gki G_GNUC_UNUSED)
+{
+	xkl_debug (150, "Mouse button pressed on applet\n");
+	cafekbd_desktop_config_lock_next_group (&globals.cfg);
+}
+
+/* hackish xref */
+extern gchar *cafekbd_indicator_extract_layout_name (int group,
+						  XklEngine * engine,
+						  CafekbdKeyboardConfig *
+						  kbd_cfg,
+						  gchar **
+						  short_group_names,
+						  gchar **
+						  full_group_names);
+
+extern gchar *cafekbd_indicator_create_label_title (int group,
+						 GHashTable **
+						 ln2cnt_map,
+						 gchar * layout_name);
+
+static void
+cafekbd_status_render_cairo (cairo_t * cr, int group)
+{
+	double r, g, b;
+	PangoFontDescription *pfd;
+	PangoContext *pcc;
+	PangoLayout *pl;
+	int lwidth, lheight;
+	gchar *layout_name, *lbl_title;
+	double screen_res;
+	cairo_font_options_t *fo;
+	static GHashTable *ln2cnt_map = NULL;
+
+	xkl_debug (160, "Rendering cairo for group %d\n", group);
+	if (globals.ind_cfg.background_color != NULL &&
+	    globals.ind_cfg.background_color[0] != 0) {
+		if (sscanf
+		    (globals.ind_cfg.background_color, "%lg %lg %lg", &r,
+		     &g, &b) == 3) {
+			cairo_set_source_rgb (cr, r, g, b);
+			cairo_rectangle (cr, 0, 0, globals.current_width,
+					 globals.current_height);
+			cairo_fill (cr);
+		}
+	}
+
+	if (globals.ind_cfg.foreground_color != NULL &&
+	    globals.ind_cfg.foreground_color[0] != 0) {
+		if (sscanf
+		    (globals.ind_cfg.foreground_color, "%lg %lg %lg", &r,
+		     &g, &b) == 3) {
+			cairo_set_source_rgb (cr, r, g, b);
+		}
+	}
+
+	pcc = pango_cairo_create_context (cr);
+
+	screen_res = cdk_screen_get_resolution (cdk_screen_get_default ());
+	if (screen_res > 0)
+		pango_cairo_context_set_resolution (pcc, screen_res);
+
+	fo = cairo_font_options_copy (cdk_screen_get_font_options
+				      (cdk_screen_get_default ()));
+	/* SUBPIXEL antialiasing gives bad results on in-memory images */
+	if (cairo_font_options_get_antialias (fo) ==
+	    CAIRO_ANTIALIAS_SUBPIXEL)
+		cairo_font_options_set_antialias (fo,
+						  CAIRO_ANTIALIAS_GRAY);
+	pango_cairo_context_set_font_options (pcc, fo);
+
+	pl = pango_layout_new (pcc);
+
+	layout_name = cafekbd_indicator_extract_layout_name (group,
+							  globals.engine,
+							  &globals.kbd_cfg,
+							  globals.short_group_names,
+							  globals.full_group_names);
+	lbl_title =
+	    cafekbd_indicator_create_label_title (group, &ln2cnt_map,
+					       layout_name);
+
+	if (group + 1 == xkl_engine_get_num_groups (globals.engine)) {
+		g_hash_table_destroy (ln2cnt_map);
+		ln2cnt_map = NULL;
+	}
+
+	pango_layout_set_text (pl, lbl_title, -1);
+
+	g_free (lbl_title);
+
+	pfd = pango_font_description_from_string (globals.ind_cfg.font_family);
+
+	pango_layout_set_font_description (pl, pfd);
+	pango_layout_get_size (pl, &lwidth, &lheight);
+
+	cairo_move_to (cr,
+		       (globals.current_width - lwidth / PANGO_SCALE) / 2,
+		       (globals.current_height -
+			lheight / PANGO_SCALE) / 2);
+
+	pango_cairo_show_layout (cr, pl);
+
+	pango_font_description_free (pfd);
+	g_object_unref (pl);
+	g_object_unref (pcc);
+	cairo_font_options_destroy (fo);
+	cairo_destroy (cr);
+
+	globals.real_width = (lwidth / PANGO_SCALE) + 4;
+	if (globals.real_width > globals.current_width)
+		globals.real_width = globals.current_width;
+	if (globals.real_width < globals.current_height)
+		globals.real_width = globals.current_height;
+}
+
+static inline guint8
+convert_color_channel (guint8 src, guint8 alpha)
+{
+	return alpha ? ((((guint) src) << 8) - src) / alpha : 0;
+}
+
+static void
+convert_bgra_to_rgba (guint8 const *src, guint8 * dst, int width,
+		      int height, int new_width)
+{
+	int xoffset = width - new_width;
+
+	/* *4 */
+	int ptr_step = xoffset << 2;
+
+	int x, y;
+
+	/* / 2 * 4 */
+	src = src + ((xoffset >> 1) << 2);
+
+	for (y = height; --y >= 0; src += ptr_step) {
+		for (x = new_width; --x >= 0;) {
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+			dst[0] = convert_color_channel (src[2], src[3]);
+			dst[1] = convert_color_channel (src[1], src[3]);
+			dst[2] = convert_color_channel (src[0], src[3]);
+			dst[3] = src[3];
+#else
+			dst[0] = convert_color_channel (src[1], src[0]);
+			dst[1] = convert_color_channel (src[2], src[0]);
+			dst[2] = convert_color_channel (src[3], src[0]);
+			dst[3] = src[0];
+#endif
+			dst += 4;
+			src += 4;
+		}
+	}
+}
+
+static GdkPixbuf *
+cafekbd_status_prepare_drawing (CafekbdStatus *gki G_GNUC_UNUSED,
+				int            group)
+{
+	GError *gerror = NULL;
+	char *image_filename;
+	GdkPixbuf *image;
+
+	if (globals.current_width == 0)
+		return NULL;
+
+	if (globals.ind_cfg.show_flags) {
+
+		image_filename =
+		    (char *) g_slist_nth_data (globals.
+					       ind_cfg.image_filenames,
+					       group);
+
+		image = gdk_pixbuf_new_from_file_at_size (image_filename,
+							  globals.current_width,
+							  globals.current_height,
+							  &gerror);
+
+		if (image == NULL) {
+			CtkWidget *dialog = ctk_message_dialog_new (NULL,
+								    CTK_DIALOG_DESTROY_WITH_PARENT,
+								    CTK_MESSAGE_ERROR,
+								    CTK_BUTTONS_OK,
+								    _
+								    ("There was an error loading an image: %s"),
+								    gerror
+								    ==
+								    NULL ?
+								    "Unknown"
+								    :
+								    gerror->message);
+			g_signal_connect (G_OBJECT (dialog), "response",
+					  G_CALLBACK (ctk_widget_destroy),
+					  NULL);
+
+			ctk_window_set_resizable (CTK_WINDOW (dialog),
+						  FALSE);
+
+			ctk_widget_show (dialog);
+			g_error_free (gerror);
+
+			return NULL;
+		}
+		xkl_debug (150,
+			   "Image %d[%s] loaded -> %p[%dx%d], alpha: %d\n",
+			   group, image_filename, image,
+			   gdk_pixbuf_get_width (image),
+			   gdk_pixbuf_get_height (image),
+			   gdk_pixbuf_get_has_alpha (image));
+
+		return image;
+	} else {
+		cairo_surface_t *cs =
+		    cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
+						globals.current_width,
+						globals.current_height);
+		unsigned char *cairo_data;
+		guchar *pixbuf_data;
+		cafekbd_status_render_cairo (cairo_create (cs), group);
+		cairo_data = cairo_image_surface_get_data (cs);
+#if 0
+		char pngfilename[20];
+		g_sprintf (pngfilename, "label%d.png", group);
+		cairo_surface_write_to_png (cs, pngfilename);
+#endif
+		pixbuf_data =
+		    g_new0 (guchar,
+			    4 * globals.real_width *
+			    globals.current_height);
+		convert_bgra_to_rgba (cairo_data, pixbuf_data,
+				      globals.current_width,
+				      globals.current_height,
+				      globals.real_width);
+
+		cairo_surface_destroy (cs);
+
+		image = gdk_pixbuf_new_from_data (pixbuf_data,
+						  GDK_COLORSPACE_RGB,
+						  TRUE,
+						  8,
+						  globals.real_width,
+						  globals.current_height,
+						  globals.real_width *
+						  4,
+						  (GdkPixbufDestroyNotify)
+						  g_free, NULL);
+		xkl_debug (150,
+			   "Image %d created -> %p[%dx%d], alpha: %d\n",
+			   group, image, gdk_pixbuf_get_width (image),
+			   gdk_pixbuf_get_height (image),
+			   gdk_pixbuf_get_has_alpha (image));
+
+		return image;
+	}
+	return NULL;
+}
+
+static void
+cafekbd_status_update_tooltips (CafekbdStatus * gki)
+{
+	XklState *state = xkl_engine_get_current_state (globals.engine);
+	gchar *buf;
+	if (state == NULL || state->group < 0
+	    || state->group >= g_strv_length (globals.full_group_names))
+		return;
+
+	buf = g_strdup_printf (globals.tooltips_format,
+			       globals.full_group_names[state->group]);
+
+	cafekbd_status_set_tooltips (gki, buf);
+	g_free (buf);
+}
+
+void
+cafekbd_status_reinit_ui (CafekbdStatus * gki)
+{
+	cafekbd_status_global_cleanup (gki);
+	cafekbd_status_global_fill (gki);
+
+	cafekbd_status_set_current_page (gki);
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+			    gchar     *key G_GNUC_UNUSED,
+			    gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "General configuration changed in settings - reiniting...\n");
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+	ForAllIndicators () {
+		cafekbd_status_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_ind_cfg_changed (GSettings *settings G_GNUC_UNUSED,
+				gchar     *key G_GNUC_UNUSED,
+				gpointer   user_data G_GNUC_UNUSED)
+{
+	xkl_debug (100,
+		   "Applet configuration changed in settings - reiniting...\n");
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+
+	cafekbd_indicator_config_free_image_filenames (&globals.ind_cfg);
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	ForAllIndicators () {
+		cafekbd_status_reinit_ui (gki);
+	} NextIndicator ();
+}
+
+static void
+cafekbd_status_load_group_names (const gchar ** layout_ids,
+			      const gchar ** variant_ids)
+{
+	if (!cafekbd_desktop_config_load_group_descriptions
+	    (&globals.cfg, globals.registry, layout_ids, variant_ids,
+	     &globals.short_group_names, &globals.full_group_names)) {
+		/* We just populate no short names (remain NULL) -
+		 * full names are going to be used anyway */
+		gint i, total_groups =
+		    xkl_engine_get_num_groups (globals.engine);
+		xkl_debug (150, "group descriptions loaded: %d!\n",
+			   total_groups);
+		globals.full_group_names =
+		    g_new0 (char *, total_groups + 1);
+
+		if (xkl_engine_get_features (globals.engine) &
+		    XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
+			gchar **lst = globals.kbd_cfg.layouts_variants;
+			for (i = 0; *lst; lst++, i++) {
+				globals.full_group_names[i] =
+				    g_strdup ((char *) *lst);
+			}
+		} else {
+			for (i = total_groups; --i >= 0;) {
+				globals.full_group_names[i] =
+				    g_strdup_printf ("Group %d", i);
+			}
+		}
+	}
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_kbd_cfg_callback (CafekbdStatus *gki G_GNUC_UNUSED)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+	xkl_debug (100,
+		   "XKB configuration changed on X Server - reiniting...\n");
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+
+	cafekbd_indicator_config_free_image_filenames (&globals.ind_cfg);
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	g_strfreev (globals.full_group_names);
+	globals.full_group_names = NULL;
+
+	if (globals.short_group_names != NULL) {
+		g_strfreev (globals.short_group_names);
+		globals.short_group_names = NULL;
+	}
+
+	cafekbd_status_load_group_names ((const gchar **) xklrec->layouts,
+				      (const gchar **) xklrec->variants);
+
+	ForAllIndicators () {
+		cafekbd_status_reinit_ui (gki);
+	} NextIndicator ();
+	g_object_unref (G_OBJECT (xklrec));
+}
+
+/* Should be called once for all applets */
+static void
+cafekbd_status_state_callback (XklEngine           *engine G_GNUC_UNUSED,
+			       XklEngineStateChange changeType,
+			       gint                 group,
+			       gboolean             restore)
+{
+	xkl_debug (150, "group is now %d, restore: %d\n", group, restore);
+
+	if (changeType == GROUP_CHANGED) {
+		ForAllIndicators () {
+			xkl_debug (200, "do repaint\n");
+			cafekbd_status_set_current_page_for_group (gki,
+								group);
+		}
+		NextIndicator ();
+	}
+}
+
+
+void
+cafekbd_status_set_current_page (CafekbdStatus * gki)
+{
+	XklState *cur_state;
+	cur_state = xkl_engine_get_current_state (globals.engine);
+	if (cur_state->group >= 0)
+		cafekbd_status_set_current_page_for_group (gki,
+							cur_state->group);
+}
+
+void
+cafekbd_status_set_current_page_for_group (CafekbdStatus * gki, int group)
+{
+	xkl_debug (200, "Revalidating for group %d\n", group);
+
+	ctk_status_icon_set_from_pixbuf (CTK_STATUS_ICON (gki),
+					 GDK_PIXBUF (g_slist_nth_data
+						     (globals.icons,
+						      group)));
+
+	cafekbd_status_update_tooltips (gki);
+}
+
+/* Should be called once for all widgets */
+static CdkFilterReturn
+cafekbd_status_filter_x_evt (CdkXEvent *xev,
+			     CdkEvent  *event G_GNUC_UNUSED)
+{
+	XEvent *xevent = (XEvent *) xev;
+
+	xkl_engine_filter_events (globals.engine, xevent);
+	switch (xevent->type) {
+	case ReparentNotify:
+		{
+			XReparentEvent *rne = (XReparentEvent *) xev;
+
+			ForAllIndicators () {
+				guint32 xid =
+				    ctk_status_icon_get_x11_window_id
+				    (CTK_STATUS_ICON (gki));
+
+				/* compare the indicator's parent window with the even window */
+				if (xid == rne->window) {
+					/* if so - make it transparent... */
+					xkl_engine_set_window_transparent
+					    (globals.engine, rne->window,
+					     TRUE);
+				}
+			}
+		NextIndicator ()}
+		break;
+	}
+	return CDK_FILTER_CONTINUE;
+}
+
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_start_listen (void)
+{
+	cdk_window_add_filter (NULL, (CdkFilterFunc)
+			       cafekbd_status_filter_x_evt, NULL);
+	cdk_window_add_filter (cdk_get_default_root_window (),
+			       (CdkFilterFunc) cafekbd_status_filter_x_evt,
+			       NULL);
+
+	xkl_engine_start_listen (globals.engine,
+				 XKLL_TRACK_KEYBOARD_STATE);
+}
+
+/* Should be called once for all widgets */
+static void
+cafekbd_status_stop_listen (void)
+{
+	xkl_engine_stop_listen (globals.engine, XKLL_TRACK_KEYBOARD_STATE);
+
+	cdk_window_remove_filter (NULL, (CdkFilterFunc)
+				  cafekbd_status_filter_x_evt, NULL);
+	cdk_window_remove_filter
+	    (cdk_get_default_root_window (),
+	     (CdkFilterFunc) cafekbd_status_filter_x_evt, NULL);
+}
+
+static void
+cafekbd_status_size_changed (CafekbdStatus * gki, gint size)
+{
+	if (globals.current_height != size) {
+		globals.current_height = size;
+		globals.current_width = size * 3 / 2;
+		cafekbd_status_reinit_ui (gki);
+	}
+}
+
+static void
+cafekbd_status_theme_changed (CtkSettings   *settings G_GNUC_UNUSED,
+			      GParamSpec    *pspec G_GNUC_UNUSED,
+			      CafekbdStatus *gki)
+{
+	cafekbd_indicator_config_refresh_style (&globals.ind_cfg);
+	cafekbd_status_reinit_ui (gki);
+}
+
+static void
+cafekbd_status_init (CafekbdStatus * gki)
+{
+	int i;
+
+	if (!g_slist_length (globals.widget_instances))
+		cafekbd_status_global_init ();
+
+	gki->priv = g_new0 (CafekbdStatusPrivate, 1);
+
+	/* This should give NA a hint about the order */
+	/* commenting out fixes a Cdk-critical warning */
+/*	ctk_status_icon_set_name (CTK_STATUS_ICON (gki), "keyboard"); */
+
+	xkl_debug (100, "Initiating the widget startup process for %p\n",
+		   gki);
+
+	if (globals.engine == NULL) {
+		cafekbd_status_set_tooltips (gki,
+					  _("XKB initialization error"));
+		return;
+	}
+
+	cafekbd_status_set_tooltips (gki, NULL);
+
+	cafekbd_status_global_fill (gki);
+	cafekbd_status_set_current_page (gki);
+
+	/* append AFTER all initialization work is finished */
+	globals.widget_instances =
+	    g_slist_append (globals.widget_instances, gki);
+
+	g_signal_connect (gki, "size-changed",
+			  G_CALLBACK (cafekbd_status_size_changed), NULL);
+	g_signal_connect (gki, "activate",
+			  G_CALLBACK (cafekbd_status_activate), NULL);
+
+	for (i = sizeof (settings_signal_names) /
+	     sizeof (settings_signal_names[0]); --i >= 0;)
+		gki->priv->settings_signal_handlers[i] =
+		    g_signal_connect_after (ctk_settings_get_default (),
+					    settings_signal_names[i],
+					    G_CALLBACK
+					    (cafekbd_status_theme_changed),
+					    gki);
+}
+
+static void
+cafekbd_status_finalize (GObject * obj)
+{
+	int i;
+	CafekbdStatus *gki = CAFEKBD_STATUS (obj);
+	xkl_debug (100,
+		   "Starting the cafe-kbd-status widget shutdown process for %p\n",
+		   gki);
+
+	for (i = sizeof (settings_signal_names) /
+	     sizeof (settings_signal_names[0]); --i >= 0;)
+		g_signal_handler_disconnect (ctk_settings_get_default (),
+					     gki->
+					     priv->settings_signal_handlers
+					     [i]);
+
+	/* remove BEFORE all termination work is finished */
+	globals.widget_instances =
+	    g_slist_remove (globals.widget_instances, gki);
+
+	cafekbd_status_global_cleanup (gki);
+
+	xkl_debug (100,
+		   "The instance of cafe-kbd-status successfully finalized\n");
+
+	g_free (gki->priv);
+
+	G_OBJECT_CLASS (cafekbd_status_parent_class)->finalize (obj);
+
+	if (!g_slist_length (globals.widget_instances))
+		cafekbd_status_global_term ();
+}
+
+static void
+cafekbd_status_global_term (void)
+{
+	xkl_debug (100, "*** Last  CafekbdStatus instance *** \n");
+	cafekbd_status_stop_listen ();
+
+	cafekbd_desktop_config_stop_listen (&globals.cfg);
+	cafekbd_indicator_config_stop_listen (&globals.ind_cfg);
+
+	cafekbd_indicator_config_term (&globals.ind_cfg);
+	cafekbd_keyboard_config_term (&globals.kbd_cfg);
+	cafekbd_desktop_config_term (&globals.cfg);
+
+	if (g_signal_handler_is_connected
+	    (globals.engine, globals.state_changed_handler)) {
+		g_signal_handler_disconnect (globals.engine,
+					     globals.state_changed_handler);
+		globals.state_changed_handler = 0;
+	}
+	if (g_signal_handler_is_connected
+	    (globals.engine, globals.config_changed_handler)) {
+		g_signal_handler_disconnect (globals.engine,
+					     globals.config_changed_handler);
+		globals.config_changed_handler = 0;
+	}
+
+	g_object_unref (G_OBJECT (globals.registry));
+	globals.registry = NULL;
+	g_object_unref (G_OBJECT (globals.engine));
+	globals.engine = NULL;
+	xkl_debug (100, "*** Terminated globals *** \n");
+}
+
+static void
+cafekbd_status_class_init (CafekbdStatusClass * klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+	xkl_debug (100, "*** First CafekbdStatus instance *** \n");
+
+	memset (&globals, 0, sizeof (globals));
+
+	/* Initing some global vars */
+	globals.tooltips_format = "%s";
+
+	/* Initing vtable */
+	object_class->finalize = cafekbd_status_finalize;
+
+	/* Signals */
+}
+
+static void
+cafekbd_status_global_init (void)
+{
+	XklConfigRec *xklrec = xkl_config_rec_new ();
+
+	globals.engine = xkl_engine_get_instance(CDK_DISPLAY_XDISPLAY(cdk_display_get_default()));
+
+	if (globals.engine == NULL) {
+		xkl_debug (0, "Libxklavier initialization error");
+		return;
+	}
+
+	globals.state_changed_handler =
+	    g_signal_connect (globals.engine, "X-state-changed",
+			      G_CALLBACK (cafekbd_status_state_callback),
+			      NULL);
+	globals.config_changed_handler =
+	    g_signal_connect (globals.engine, "X-config-changed",
+			      G_CALLBACK (cafekbd_status_kbd_cfg_callback),
+			      NULL);
+
+	cafekbd_desktop_config_init (&globals.cfg, globals.engine);
+	cafekbd_keyboard_config_init (&globals.kbd_cfg, globals.engine);
+	cafekbd_indicator_config_init (&globals.ind_cfg, globals.engine);
+
+	cafekbd_desktop_config_start_listen (&globals.cfg,
+					  (GCallback)
+					  cafekbd_status_cfg_changed, NULL);
+	cafekbd_indicator_config_start_listen (&globals.ind_cfg,
+					    (GCallback)
+					    cafekbd_status_ind_cfg_changed,
+					    NULL);
+
+	cafekbd_desktop_config_load_from_gsettings (&globals.cfg);
+	cafekbd_desktop_config_activate (&globals.cfg);
+
+	globals.registry =
+	    xkl_config_registry_get_instance (globals.engine);
+	xkl_config_registry_load (globals.registry,
+				  globals.cfg.load_extra_items);
+
+	cafekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
+						  xklrec);
+
+	cafekbd_indicator_config_load_from_gsettings (&globals.ind_cfg);
+
+	cafekbd_indicator_config_load_image_filenames (&globals.ind_cfg,
+						    &globals.kbd_cfg);
+
+	cafekbd_indicator_config_activate (&globals.ind_cfg);
+
+	cafekbd_status_load_group_names ((const gchar **) xklrec->layouts,
+				      (const gchar **) xklrec->variants);
+	g_object_unref (G_OBJECT (xklrec));
+
+	cafekbd_status_start_listen ();
+
+	xkl_debug (100, "*** Inited globals *** \n");
+}
+
+CtkStatusIcon *
+cafekbd_status_new (void)
+{
+	return
+	    CTK_STATUS_ICON (g_object_new (cafekbd_status_get_type (), NULL));
+}
+
+/**
+ * cafekbd_status_get_xkl_engine:
+ *
+ * Returns: (transfer none): The engine shared by all CafekbdStatus objects
+ */
+XklEngine *
+cafekbd_status_get_xkl_engine ()
+{
+	return globals.engine;
+}
+
+/**
+ * cafekbd_status_get_group_names:
+ *
+ * Returns: (transfer none) (array zero-terminated=1): List of group names
+ */
+gchar **
+cafekbd_status_get_group_names ()
+{
+	return globals.full_group_names;
+}
+
+gchar *
+cafekbd_status_get_image_filename (guint group)
+{
+	if (!globals.ind_cfg.show_flags)
+		return NULL;
+	return cafekbd_indicator_config_get_images_file (&globals.ind_cfg,
+						      &globals.kbd_cfg,
+						      group);
+}
+
+void
+cafekbd_status_set_angle (CafekbdStatus * gki, gdouble angle)
+{
+	gki->priv->angle = angle;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/6.html b/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/6.html new file mode 100644 index 0000000..5ed6ace --- /dev/null +++ b/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/6.html @@ -0,0 +1,806 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctk/ctk.h>
+#include <stdlib.h>
+#include <string.h>
+#include <glib.h>
+#include "libcafekbd/cafekbd-keyboard-drawing.h"
+
+
+static gchar *groups = NULL;
+static gchar *levels = NULL;
+static gchar *symbols = NULL;
+static gchar *keycodes = NULL;
+static gchar *geometry = NULL;
+
+static gboolean track_config = FALSE;
+static gboolean track_modifiers = FALSE;
+static gboolean program_version = FALSE;
+
+static const GOptionEntry options[] = {
+	{"groups", '\0', 0, G_OPTION_ARG_STRING, &groups,
+	 "Keyboard groups to display, from 1-4. Up to four groups only may be "
+	 "displayed. Examples: --groups=3 or --groups=1,2,1,2",
+	 "group1[,group2[,group3[,group4]]]"},
+	{"levels", '\0', 0, G_OPTION_ARG_STRING, &levels,
+	 "Keyboard shift levels to display, from 1-64. Up to four shift levels "
+	 "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
+	 "level1[,level2[,level3[,level4]]]"},
+	{"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols,
+	 "Symbols component of the keyboard. If you omit this option, it is "
+	 "obtained from the X server; that is, the keyboard that is currently "
+	 "configured is drawn. Examples: --symbols=us or "
+	 "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL},
+	{"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes,
+	 "Keycodes component of the keyboard. If you omit this option, it is "
+	 "obtained from the X server; that is, the keyboard that is currently"
+	 " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
+	 NULL},
+	{"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry,
+	 "Geometry xkb component. If you omit this option, it is obtained from the"
+	 " X server; that is, the keyboard that is currently configured is drawn. "
+	 "Example: --geometry=kinesis", NULL},
+	{"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers,
+	 "Track the current modifiers", NULL},
+	{"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config,
+	 "Track the server XKB configuration", NULL},
+	{"version", '\0', 0, G_OPTION_ARG_NONE, &program_version,
+	 "Show current version", NULL},
+	{NULL},
+};
+
+static gboolean
+set_groups (gchar * groups_option,
+	    CafekbdKeyboardDrawingGroupLevel * groupLevels)
+{
+	CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
+	gint cntr, g;
+
+	groupLevels[0].group =
+	    groupLevels[1].group =
+	    groupLevels[2].group = groupLevels[3].group = -1;
+
+	if (groups_option == NULL)
+		return TRUE;
+
+	for (cntr = 4; --cntr >= 0;) {
+		if (*groups_option == '\0')
+			return FALSE;
+
+		g = *groups_option - '1';
+		if (g < 0 || g >= 4)
+			return FALSE;
+
+		pgl->group = g;
+		/* printf ("group %d\n", pgl->group); */
+
+		groups_option++;
+		if (*groups_option == '\0')
+			return TRUE;
+		if (*groups_option != ',')
+			return FALSE;
+
+		groups_option++;
+		pgl++;
+	}
+
+	return TRUE;
+}
+
+static gboolean
+set_levels (gchar * levels_option,
+	    CafekbdKeyboardDrawingGroupLevel * groupLevels)
+{
+	CafekbdKeyboardDrawingGroupLevel *pgl = groupLevels;
+	gint cntr, l;
+	gchar *p;
+
+	groupLevels[0].level =
+	    groupLevels[1].level =
+	    groupLevels[2].level = groupLevels[3].level = -1;
+
+	if (levels_option == NULL)
+		return TRUE;
+
+	for (cntr = 4; --cntr >= 0;) {
+		if (*levels_option == '\0')
+			return FALSE;
+
+		l = (gint) strtol (levels_option, &p, 10) - 1;
+		if (l < 0 || l >= 64)
+			return FALSE;
+
+		pgl->level = l;
+		/* printf ("level %d\n", pgl->level); */
+
+		levels_option = p;
+		if (*levels_option == '\0')
+			return TRUE;
+		if (*levels_option != ',')
+			return FALSE;
+
+		levels_option++;
+		pgl++;
+	}
+
+	return TRUE;
+}
+
+static void
+bad_keycode (CafekbdKeyboardDrawing *drawing G_GNUC_UNUSED,
+	     guint                   keycode)
+{
+	g_warning
+	    ("got keycode %u, which is not on your keyboard according to your configuration",
+	     keycode);
+}
+
+gint
+main (gint argc, gchar ** argv)
+{
+	CtkWidget *window;
+	CtkWidget *cafekbd_keyboard_drawing;
+	CdkScreen *screen;
+	CdkMonitor *monitor;
+	CdkRectangle rect;
+	GOptionContext *context;
+	GError *error = NULL;
+
+	CafekbdKeyboardDrawingGroupLevel groupLevels[4] =
+	    { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
+	CafekbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
+	    { &groupLevels[0], &groupLevels[1], &groupLevels[2],
+		&groupLevels[3]
+	};
+
+	context = g_option_context_new ("kbdraw");
+	g_option_context_add_main_entries (context, options, NULL);
+	if (!g_option_context_parse (context, &argc, &argv, &error)) {
+		g_message ("option parsing failed: %s", error->message);
+		g_option_context_free (context);
+		exit (EXIT_FAILURE);
+	}
+	g_option_context_free (context);
+
+	if (program_version) {
+		g_print ("kbdraw %s\n", VERSION);
+		exit (0);
+	}
+
+	ctk_init (&argc, &argv);
+
+	if (!set_groups (groups, groupLevels)) {
+		g_printerr ("--groups: invalid argument\n");
+		exit (1);
+	}
+
+	if (!set_levels (levels, groupLevels)) {
+		g_printerr ("--levels: invalid argument\n");
+		exit (1);
+	}
+
+	window = ctk_window_new (CTK_WINDOW_TOPLEVEL);
+	g_signal_connect (G_OBJECT (window), "destroy",
+			  G_CALLBACK (ctk_main_quit), NULL);
+
+	screen = ctk_window_get_screen (CTK_WINDOW (window));
+	monitor = cdk_display_get_monitor_at_point (cdk_screen_get_display (screen), 0, 0);
+	cdk_monitor_get_geometry (monitor, &rect);
+	ctk_window_set_default_size (CTK_WINDOW (window),
+				     rect.width * 4 / 5,
+				     rect.height * 1 / 2);
+
+	ctk_widget_show (window);
+
+	cafekbd_keyboard_drawing = cafekbd_keyboard_drawing_new ();
+	ctk_widget_show (cafekbd_keyboard_drawing);
+	ctk_container_add (CTK_CONTAINER (window), cafekbd_keyboard_drawing);
+
+	cafekbd_keyboard_drawing_set_groups_levels (CAFEKBD_KEYBOARD_DRAWING
+						 (cafekbd_keyboard_drawing),
+						 pgroupLevels);
+
+	if (track_modifiers)
+		cafekbd_keyboard_drawing_set_track_modifiers
+		    (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing), TRUE);
+	if (track_config)
+		cafekbd_keyboard_drawing_set_track_config
+		    (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing), TRUE);
+	g_signal_connect (G_OBJECT (cafekbd_keyboard_drawing), "bad-keycode",
+			  G_CALLBACK (bad_keycode), NULL);
+
+	if (symbols || geometry || keycodes) {
+		XkbComponentNamesRec names;
+		gint success;
+
+		memset (&names, '\0', sizeof (names));
+
+		if (symbols)
+			names.symbols = symbols;
+		else
+			names.symbols = (gchar *)
+			    cafekbd_keyboard_drawing_get_symbols
+			    (CAFEKBD_KEYBOARD_DRAWING
+			     (cafekbd_keyboard_drawing));
+
+		if (keycodes)
+			names.keycodes = keycodes;
+		else
+			names.keycodes = (gchar *)
+			    cafekbd_keyboard_drawing_get_keycodes
+			    (CAFEKBD_KEYBOARD_DRAWING
+			     (cafekbd_keyboard_drawing));
+
+		if (geometry)
+			names.geometry = geometry;
+		else
+			names.geometry = (gchar *)
+			    cafekbd_keyboard_drawing_get_geometry
+			    (CAFEKBD_KEYBOARD_DRAWING
+			     (cafekbd_keyboard_drawing));
+
+		success =
+		    cafekbd_keyboard_drawing_set_keyboard
+		    (CAFEKBD_KEYBOARD_DRAWING (cafekbd_keyboard_drawing),
+		     &names);
+		if (!success) {
+			g_printerr
+			    ("\nError loading new keyboard description with components:\n\n"
+			     "  keycodes:  %s\n" "  types:     %s\n"
+			     "  compat:    %s\n" "  symbols:   %s\n"
+			     "  geometry:  %s\n\n", names.keycodes,
+			     names.types, names.compat, names.symbols,
+			     names.geometry);
+			exit (1);
+		}
+	}
+
+	ctk_widget_grab_focus (cafekbd_keyboard_drawing);
+
+	ctk_main ();
+
+	return 0;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/7.html b/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/7.html new file mode 100644 index 0000000..8122587 --- /dev/null +++ b/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/7.html @@ -0,0 +1,358 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
/*
+ * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+
+#include "libxklavier/xklavier.h"
+#include "libcafekbd/cafekbd-status.h"
+
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include <cdk/cdk.h>
+#include <cdk/cdkx.h>
+#include <glib/gi18n.h>
+#include <ctk/ctk.h>
+
+#include "X11/XKBlib.h"
+
+int
+main (int argc, char **argv)
+{
+	CtkStatusIcon *icon;<--- Variable 'icon' can be declared as pointer to const
+
+	bindtextdomain (GETTEXT_PACKAGE, CAFELOCALEDIR);
+	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+	textdomain (GETTEXT_PACKAGE);
+
+	ctk_init (&argc, &argv);
+
+	icon = cafekbd_status_new ();
+
+        if (icon == NULL)
+	{
+		return 1;
+	}
+
+	ctk_main ();
+
+	return 0;
+}
+
+ +
+ +
+ + diff --git a/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/commitmsg b/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/commitmsg new file mode 100644 index 0000000..891e4bf --- /dev/null +++ b/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/commitmsg @@ -0,0 +1 @@ +Release 2.0.0 diff --git a/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/index.html b/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/index.html new file mode 100644 index 0000000..1040930 --- /dev/null +++ b/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/index.html @@ -0,0 +1,242 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LineIdCWESeverityMessage
checkersReportinformationActive checkers: There was critical errors (use --checkers-report=<filename> to see details)
libcafekbd/cafekbd-desktop-config.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
libcafekbd/cafekbd-indicator-config.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
libcafekbd/cafekbd-indicator.c
66unknownMacroerrorThere is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
libcafekbd/cafekbd-keyboard-config.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
67knownConditionTrueFalse571styleCondition '*l1' is always true
67knownConditionTrueFalse571styleCondition '*l2' is always true
226constVariablePointer398styleVariable 'delim' can be declared as pointer to const
227knownConditionTrueFalse571styleCondition 'option!=NULL' is always true
282knownConditionTrueFalse570styleCondition 'variant==NULL' is always false
609constParameterPointer398styleParameter 'kbd_config' can be declared as pointer to const
libcafekbd/cafekbd-keyboard-drawing.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
61constParameterPointer398styleParameter 'context' can be declared as pointer to const
67constParameterPointer398styleParameter 'context' can be declared as pointer to const
625constParameterPointer398styleParameter 'context' can be declared as pointer to const
1026constVariablePointer398styleVariable 'runp' can be declared as pointer to const
1036constVariablePointer398styleVariable 'geometry' can be declared as pointer to const
1202constParameterPointer398styleParameter 'outline' can be declared as pointer to const
1397constVariablePointer398styleVariable 'shape' can be declared as pointer to const
1786constParameterCallback398styleParameter 'drawing' can be declared as pointer to const. However it seems that 'button_press_event' is a callback function, if 'drawing' is declared with const you might also need to cast function pointer(s).
1823constParameterCallback398styleParameter 'event' can be declared as pointer to const. However it seems that 'focus_event' is a callback function, if 'event' is declared with const you might also need to cast function pointer(s).
1838constParameterCallback398styleParameter 'a' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'a' is declared with const you might also need to cast function pointer(s).
1839constParameterCallback398styleParameter 'b' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'b' is declared with const you might also need to cast function pointer(s).
1863constVariablePointer398styleVariable 'pind' can be declared as pointer to const
2124constParameterPointer398styleParameter 'iev' can be declared as pointer to const
libcafekbd/cafekbd-status.c
82unknownMacroerrorThere is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.
test/cafekbd-keyboard-drawing-test.c
0normalCheckLevelMaxBranchesinformationLimiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
test/cafekbd-status-test.c
42constVariablePointer398styleVariable 'icon' can be declared as pointer to const
+
+ +
+ + diff --git a/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/output_28c310f42d337eadca7386aeed5be91417c339a2 b/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/output_28c310f42d337eadca7386aeed5be91417c339a2 new file mode 100644 index 0000000..8079998 --- /dev/null +++ b/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/output_28c310f42d337eadca7386aeed5be91417c339a2 @@ -0,0 +1,1866 @@ +Checking libcafekbd/cafekbd-desktop-config.c ... +libcafekbd/cafekbd-desktop-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +1/10 files checked 4% done +Checking libcafekbd/cafekbd-indicator-config.c ... +libcafekbd/cafekbd-indicator-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +2/10 files checked 10% done +Checking libcafekbd/cafekbd-indicator.c ... +libcafekbd/cafekbd-indicator.c:66:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdIndicator, cafekbd_indicator, CTK_TYPE_NOTEBOOK) +^ +3/10 files checked 24% done +Checking libcafekbd/cafekbd-keyboard-config.c ... +libcafekbd/cafekbd-keyboard-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-config.c:67:8: style: Condition '*l1' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:67:15: style: Condition '*l2' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:227:16: style: Condition 'option!=NULL' is always true [knownConditionTrueFalse] + (option != NULL) ? strchr (option, ':') : NULL; + ^ +libcafekbd/cafekbd-keyboard-config.c:282:18: style: Condition 'variant==NULL' is always false [knownConditionTrueFalse] + (variant == + ^ +libcafekbd/cafekbd-keyboard-config.c:226:10: style: Variable 'delim' can be declared as pointer to const [constVariablePointer] + char *delim = + ^ +libcafekbd/cafekbd-keyboard-config.c:609:65: style: Parameter 'kbd_config' can be declared as pointer to const [constParameterPointer] +cafekbd_keyboard_config_options_is_set (CafekbdKeyboardConfig * kbd_config, + ^ +4/10 files checked 36% done +Checking libcafekbd/cafekbd-keyboard-drawing.c ... +libcafekbd/cafekbd-keyboard-drawing.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-drawing.c:61:60: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_coord (CafekbdKeyboardDrawingRenderContext * context, gint n) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:67:61: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_double (CafekbdKeyboardDrawingRenderContext * context, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:625:51: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +set_markup (CafekbdKeyboardDrawingRenderContext * context, gchar *txt) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1026:11: style: Variable 'runp' can be declared as pointer to const [constVariablePointer] + GSList *runp; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1036:25: style: Variable 'geometry' can be declared as pointer to const [constVariablePointer] + PangoGlyphGeometry *geometry; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1202:39: style: Parameter 'outline' can be declared as pointer to const [constParameterPointer] +calc_origin_offset_x (XkbOutlineRec * outline) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1397:15: style: Variable 'shape' can be declared as pointer to const [constVariablePointer] + XkbShapeRec *shape; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: style: Parameter 'drawing' can be declared as pointer to const. However it seems that 'button_press_event' is a callback function, if 'drawing' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2343:18: note: You might need to cast the function pointer here + G_CALLBACK (button_press_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: note: Parameter 'drawing' can be declared as pointer to const + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: style: Parameter 'event' can be declared as pointer to const. However it seems that 'focus_event' is a callback function, if 'event' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2347:18: note: You might need to cast the function pointer here + G_CALLBACK (focus_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: note: Parameter 'event' can be declared as pointer to const + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: style: Parameter 'a' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'a' is declared with const you might also need to cast function pointer(s). [constParameterCallback] +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: note: Parameter 'a' can be declared as pointer to const +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: style: Parameter 'b' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'b' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: note: Parameter 'b' can be declared as pointer to const + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1863:9: style: Variable 'pind' can be declared as pointer to const [constVariablePointer] + Atom *pind = drawing->xkb->names->indicators; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2124:60: style: Parameter 'iev' can be declared as pointer to const [constParameterPointer] +process_indicators_state_notify (XkbIndicatorNotifyEvent * iev, + ^ +Checking libcafekbd/cafekbd-keyboard-drawing.c: KBDRAW_DEBUG... +5/10 files checked 77% done +Checking libcafekbd/cafekbd-status.c ... +libcafekbd/cafekbd-status.c:82:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdStatus, cafekbd_status, CTK_TYPE_STATUS_ICON) +^ +6/10 files checked 91% done +Checking libcafekbd/cafekbd-util.c ... +7/10 files checked 93% done +Checking test/cafekbd-indicator-test.c ... +8/10 files checked 94% done +Checking test/cafekbd-keyboard-drawing-test.c ... +test/cafekbd-keyboard-drawing-test.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +Checking test/cafekbd-keyboard-drawing-test.c: HAVE_CONFIG_H... +9/10 files checked 99% done +Checking test/cafekbd-status-test.c ... +test/cafekbd-status-test.c:42:17: style: Variable 'icon' can be declared as pointer to const [constVariablePointer] + CtkStatusIcon *icon; + ^ +10/10 files checked 100% done +nofile:0:0: information: Active checkers: There was critical errors (use --checkers-report= to see details) [checkersReport] + +/usr/bin/cafe-autogen +checking for autoreconf >= 2.53... + testing autoreconf... found 2.72 +checking for pkg-config >= 0.14.0... + testing pkg-config... found 1.8.1 +checking for cafe-common >= 0.0.1... + testing cafe-doc-common... found 2.0.0 +Checking for required M4 macros... +Checking for forbidden M4 macros... +Processing ./configure.ac +Running cafe-doc-common... +Running autoreconf... +autoreconf: export WARNINGS=no-portability +autoreconf: Entering directory '.' +autoreconf: running: autopoint --force +Copying file ABOUT-NLS +Copying file config.rpath +Copying file m4/codeset.m4 +Copying file m4/extern-inline.m4 +Copying file m4/fcntl-o.m4 +Copying file m4/gettext.m4 +Copying file m4/glibc2.m4 +Copying file m4/glibc21.m4 +Copying file m4/iconv.m4 +Copying file m4/intdiv0.m4 +Copying file m4/intl.m4 +Copying file m4/intldir.m4 +Copying file m4/intlmacosx.m4 +Copying file m4/intmax.m4 +Copying file m4/inttypes-pri.m4 +Copying file m4/inttypes_h.m4 +Copying file m4/lcmessage.m4 +Copying file m4/lib-ld.m4 +Copying file m4/lib-link.m4 +Copying file m4/lib-prefix.m4 +Copying file m4/lock.m4 +Copying file m4/longlong.m4 +Copying file m4/nls.m4 +Copying file m4/po.m4 +Copying file m4/printf-posix.m4 +Copying file m4/progtest.m4 +Copying file m4/size_max.m4 +Copying file m4/stdint_h.m4 +Copying file m4/threadlib.m4 +Copying file m4/uintmax_t.m4 +Copying file m4/visibility.m4 +Copying file m4/wchar_t.m4 +Copying file m4/wint_t.m4 +Copying file m4/xsize.m4 +Copying file po/Makefile.in.in +Copying file po/Makevars.template +Copying file po/Rules-quot +Copying file po/boldquot.sed +Copying file po/en@boldquot.header +Copying file po/en@quot.header +Copying file po/insert-header.sin +Copying file po/quot.sed +Copying file po/remove-potcdate.sin +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: configure.ac: tracing +autoreconf: running: libtoolize --copy --force +libtoolize: putting auxiliary files in '.'. +libtoolize: copying file './ltmain.sh' +libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. +libtoolize: copying file 'm4/libtool.m4' +libtoolize: copying file 'm4/ltoptions.m4' +libtoolize: copying file 'm4/ltsugar.m4' +libtoolize: copying file 'm4/ltversion.m4' +libtoolize: copying file 'm4/lt~obsolete.m4' +autoreconf: configure.ac: not using Intltool +autoreconf: configure.ac: not using Gtkdoc +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: running: /usr/bin/autoconf --force +autoreconf: running: /usr/bin/autoheader --force +autoreconf: running: automake --add-missing --copy --force-missing +configure.ac:31: installing './compile' +configure.ac:34: installing './config.guess' +configure.ac:34: installing './config.sub' +configure.ac:16: installing './install-sh' +configure.ac:16: installing './missing' +Makefile.am: installing './INSTALL' +libcafekbd/Makefile.am: installing './depcomp' +autoreconf: Leaving directory '.' +Skipping configure process. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +checking for a BSD-compatible install... /usr/bin/install -c +checking whether sleep supports fractional seconds... yes +checking filesystem timestamp resolution... 0.01 +checking whether build environment is sane... yes +checking for a race-free mkdir -p... /usr/bin/mkdir -p +checking for gawk... no +checking for mawk... mawk +checking whether make sets $(MAKE)... yes +checking whether make supports nested variables... yes +checking xargs -n works... yes +checking whether make supports the include directive... yes (GNU style) +checking for gcc... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the C compiler works... yes +checking for C compiler default output file name... a.out +checking for suffix of executables... +checking whether we are cross compiling... no +checking for suffix of object files... o +checking whether the compiler supports GNU C... yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... rm: cannot remove 'conftest.plist': Is a directory +yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... gcc3 +checking whether C compiler accepts -Werror=unknown-warning-option... no +checking whether C compiler accepts -Wall... yes +checking whether C compiler accepts -Wmissing-prototypes... yes +checking whether C compiler accepts -Wbad-function-cast... yes +checking whether C compiler accepts -Wcast-align... yes +checking whether C compiler accepts -Wextra... yes +checking whether C compiler accepts -Wformat-nonliteral... yes +checking whether C compiler accepts -Wmissing-declarations... yes +checking whether C compiler accepts -Wnested-externs... yes +checking whether C compiler accepts -Wpointer-arith... yes +checking whether C compiler accepts -Wredundant-decls... yes +checking whether C compiler accepts -Wshadow... yes +checking whether C compiler accepts -Wstrict-prototypes... yes +checking whether C compiler accepts -Wunused-macros... yes +checking whether C compiler accepts -Werror=format-security... yes +checking whether C compiler accepts -fstrict-aliasing... yes +checking flags to pass to the C compiler /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing +checking for gcc... (cached) /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the compiler supports GNU C... (cached) yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... (cached) yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... (cached) none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... (cached) yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... (cached) gcc3 +checking build system type... x86_64-pc-linux-gnu +checking host system type... x86_64-pc-linux-gnu +checking how to print strings... printf +checking for a sed that does not truncate output... /usr/bin/sed +checking for grep that handles long lines and -e... /usr/bin/grep +checking for egrep... /usr/bin/grep -E +checking for fgrep... /usr/bin/grep -F +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld +checking if the linker (/usr/bin/ld) is GNU ld... yes +checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B +checking the name lister (/usr/bin/nm -B) interface... rm: cannot remove 'conftest.plist': Is a directory +BSD nm +checking whether ln -s works... yes +checking the maximum length of command line arguments... 3145728 +checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop +checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop +checking for /usr/bin/ld option to reload object files... -r +checking for file... file +checking for objdump... objdump +checking how to recognize dependent libraries... pass_all +checking for dlltool... no +checking how to associate runtime and link libraries... printf %s\n +checking for ranlib... ranlib +checking for ar... ar +checking for archiver @FILE support... rm: cannot remove 'conftest.plist': Is a directory +@ +checking for strip... strip +checking command to parse /usr/bin/nm -B output from /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer object... rm: cannot remove 'conftest.plist': Is a directory +ok +checking for sysroot... no +checking for a working dd... /usr/bin/dd +checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1 +checking for mt... no +checking if : is a manifest tool... no +checking for stdio.h... yes +checking for stdlib.h... yes +checking for string.h... yes +checking for inttypes.h... yes +checking for stdint.h... yes +checking for strings.h... yes +checking for sys/stat.h... yes +checking for sys/types.h... yes +checking for unistd.h... yes +checking for dlfcn.h... yes +checking for objdir... .libs +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -fno-rtti -fno-exceptions... no +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to produce PIC... -fPIC -DPIC +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer PIC flag -fPIC -DPIC works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer static flag -static works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... (cached) yes +checking whether the /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes +checking whether -lc should be explicitly linked in... no +checking dynamic linker characteristics... GNU/Linux ld.so +checking how to hardcode library paths into programs... immediate +checking whether stripping libraries is possible... yes +checking if libtool supports shared libraries... yes +checking whether to build shared libraries... yes +checking whether to build static libraries... yes +checking whether NLS is requested... yes +checking for msgfmt... /usr/bin/msgfmt +checking for gmsgfmt... /usr/bin/msgfmt +checking for xgettext... /usr/bin/xgettext +checking for msgmerge... /usr/bin/msgmerge +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld -m elf_x86_64 +checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes +checking for shared library run path origin... done +checking how to run the C preprocessor... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer -E +checking for egrep -e... (cached) /usr/bin/grep -E +checking for CFPreferencesCopyAppValue... no +checking for CFLocaleCopyCurrent... no +checking for GNU gettext in libc... yes +checking whether to use NLS... yes +checking where the gettext function comes from... libc +checking for glib-compile-resources... /usr/bin/glib-compile-resources +checking for xmllint... /usr/bin/xmllint +checking for setlocale... yes +checking for pkg-config... /usr/bin/pkg-config +checking pkg-config is at least version 0.9.0... yes +checking for glib-2.0 >= 2.50.0... yes +checking for gmodule-2.0... yes +checking for gio-2.0 >= 2.25.0... yes +checking for cdk-3.0 >= 3.22.0... yes +checking for ctk+-3.0 >= 3.22.0 cdk-x11-3.0 >= 3.22.0... yes +checking for libxklavier >= 5.2... yes +checking for X... libraries , headers +checking for gethostbyname... yes +checking for connect... yes +checking for remove... yes +checking for shmat... yes +checking for IceConnectionNumber in -lICE... yes +checking for pkg-config... (cached) /usr/bin/pkg-config +checking pkg-config is at least version 0.16... yes +checking for library containing sqrt... -lm +checking for gobject-introspection... yes +checking that generated files are newer than configure... done +configure: creating ./config.status +config.status: creating Makefile +config.status: creating libcafekbd.pc +config.status: creating libcafekbdui.pc +config.status: creating po/Makefile.in +config.status: creating libcafekbd/Makefile +config.status: creating libcafekbd/org.cafe.peripherals-keyboard-xkb.gschema.xml +config.status: creating test/Makefile +config.status: creating config.h +config.status: executing depfiles commands +config.status: executing libtool commands +config.status: executing po-directories commands +config.status: creating po/POTFILES +config.status: creating po/Makefile + +Configuration: + + prefix: /usr + exec_prefix: ${prefix} + libdir: ${exec_prefix}/lib + bindir: ${exec_prefix}/bin + sbindir: ${exec_prefix}/sbin + sysconfdir: ${prefix}/etc + datadir: ${datarootdir} + source code location: . + compiler: /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer + cflags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + Warning flags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + +scan-build: Analysis run complete. +scan-build: Removing directory '/tmp/scan-build-2025-02-06-165410-11857-1' because it contains no reports. +scan-build: No bugs found. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +make all-recursive +make[1]: Entering directory '/rootdir' +Making all in po +make[2]: Entering directory '/rootdir/po' +make libcafekbd.pot-update +make[3]: Entering directory '/rootdir/po' +sed -e '/^#/d' remove-potcdate.sin > t-remove-potcdate.sed +mv t-remove-potcdate.sed remove-potcdate.sed +package_gnu=""; \ +test -n "$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L .. -maxdepth 1 -type f \ + -size -10000000c -exec grep 'GNU libcafekbd' \ + /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU libcafekbd' ../* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ +}; \ +if test "$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ +else \ + package_prefix=''; \ +fi; \ +if test -n '' || test 'https://github.com/cafe-desktop/libcafekbd' = '@'PACKAGE_BUGREPORT'@'; then \ + msgid_bugs_address=''; \ +else \ + msgid_bugs_address='https://github.com/cafe-desktop/libcafekbd'; \ +fi; \ +case `/usr/bin/xgettext --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ + *) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --package-name="${package_prefix}libcafekbd" \ + --package-version='2.0.0' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ +esac +test ! -f libcafekbd.po || { \ + if test -f ./libcafekbd.pot-header; then \ + sed -e '1,/^#$/d' < libcafekbd.po > libcafekbd.1po && \ + cat ./libcafekbd.pot-header libcafekbd.1po > libcafekbd.po; \ + rm -f libcafekbd.1po; \ + fi; \ + if test -f ./libcafekbd.pot; then \ + sed -f remove-potcdate.sed < ./libcafekbd.pot > libcafekbd.1po && \ + sed -f remove-potcdate.sed < libcafekbd.po > libcafekbd.2po && \ + if cmp libcafekbd.1po libcafekbd.2po >/dev/null 2>&1; then \ + rm -f libcafekbd.1po libcafekbd.2po libcafekbd.po; \ + else \ + rm -f libcafekbd.1po libcafekbd.2po ./libcafekbd.pot && \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ + else \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ +} +make[3]: Leaving directory '/rootdir/po' +test ! -f ./libcafekbd.pot || \ + test -z "af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo" || make af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo +make[3]: Entering directory '/rootdir/po' +/usr/bin/msgmerge --update --quiet --lang=am am.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=af af.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=an an.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=as as.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ar ar.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ast ast.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=az az.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bg bg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=be be.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn bn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=br br.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bs bs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn_IN bn_IN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca ca.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca@valencia ca@valencia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cmn cmn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=crh crh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cs cs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=csb csb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cv cv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cy cy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=da da.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de_CH de_CH.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de de.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=dz dz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=el el.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_AU en_AU.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_CA en_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_GB en_GB.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eo eo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es es.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_419 es_419.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_AR es_AR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CL es_CL.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CO es_CO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CR es_CR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_DO es_DO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_EC es_EC.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_ES es_ES.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_MX es_MX.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_NI es_NI.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PA es_PA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PE es_PE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PR es_PR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_SV es_SV.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_US es_US.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_UY es_UY.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_VE es_VE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eu eu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=et et.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fa fa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fi fi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fil fil.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fo fo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr fr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr_CA fr_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=frp frp.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fur fur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fy fy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ga ga.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gd gd.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gl gl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gu gu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ha ha.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=he he.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hi hi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hr hr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hu hu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hy hy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ia ia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=id id.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ie ie.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ig ig.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=is is.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=it it.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=jv jv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ja ja.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ka ka.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kab kab.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kn kn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kk kk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ko ko.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=km km.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ks ks.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ky ky.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku ku.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=la la.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku_IQ ku_IQ.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lb lb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=li li.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lo lo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lt lt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lv lv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mai mai.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mg mg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mi mi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mk mk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ml ml.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mn mn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mr mr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ms ms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=my my.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nah nah.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nb nb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nds nds.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ne ne.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nl nl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nn nn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nqo nqo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nso nso.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=oc oc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=or or.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=om om.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pa pa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pl pl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pms pms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ps ps.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt pt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt_BR pt_BR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ro ro.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ru ru.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sc sc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sco sco.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=rw rw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=si si.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sk sk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sl sl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sq sq.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=so so.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr sr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sv sv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr@latin sr@latin.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sw sw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=te te.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ta ta.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=th th.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tg tg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tk tk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tl tl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tr tr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ts ts.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tt tt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ug ug.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uk uk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur ur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur_PK ur_PK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uz uz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=vi vi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=xh xh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yo yo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yi yi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=wa wa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_CN zh_CN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_HK zh_HK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_TW zh_TW.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zu zu.po libcafekbd.pot +rm -f af.gmo && /usr/bin/msgfmt -c --statistics --verbose -o af.gmo af.po +af.po: 7 translated messages, 84 untranslated messages. +rm -f am.gmo && /usr/bin/msgfmt -c --statistics --verbose -o am.gmo am.po +rm -f an.gmo && /usr/bin/msgfmt -c --statistics --verbose -o an.gmo an.po +rm -f as.gmo && /usr/bin/msgfmt -c --statistics --verbose -o as.gmo as.po +am.po: 54 translated messages, 37 untranslated messages. +rm -f ar.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ar.gmo ar.po +an.po:7: warning: header field 'Last-Translator' still has the initial default value +an.po: 0 translated messages, 91 untranslated messages. +rm -f az.gmo && /usr/bin/msgfmt -c --statistics --verbose -o az.gmo az.po +as.po: 41 translated messages, 50 untranslated messages. +rm -f ast.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ast.gmo ast.po +rm -f be.gmo && /usr/bin/msgfmt -c --statistics --verbose -o be.gmo be.po +ar.po: 50 translated messages, 41 untranslated messages. +az.po: 9 translated messages, 82 untranslated messages. +ast.po: 47 translated messages, 44 untranslated messages. +rm -f bg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bg.gmo bg.po +be.po: rm -f br.gmo && /usr/bin/msgfmt -c --statistics --verbose -o br.gmo br.po +46 translated messages, 45 untranslated messages. +bg.po: 54 translated messages, 37 untranslated messages. +rm -f bn_IN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn_IN.gmo bn_IN.po +rm -f bn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn.gmo bn.po +rm -f bs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bs.gmo bs.po +br.po: 20 translated messages, 71 untranslated messages. +bn_IN.po: 41 translated messages, 50 untranslated messages. +rm -f ca.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca.gmo ca.po +bs.po: 25 translated messages, 66 untranslated messages. +bn.po: 43 translated messages, 48 untranslated messages. +rm -f ca@valencia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca@valencia.gmo ca@valencia.po +rm -f cmn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cmn.gmo cmn.po +rm -f crh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o crh.gmo crh.po +ca.po: 87 translated messages, 4 untranslated messages. +ca@valencia.po: 54 translated messages, 37 untranslated messages. +rm -f cs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cs.gmo cs.po +cmn.po: 46 translated messages, 45 untranslated messages. +rm -f csb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o csb.gmo csb.po +crh.po: 11 translated messages, 80 untranslated messages. +rm -f cv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cv.gmo cv.po +rm -f cy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cy.gmo cy.po +cs.po: 81 translated messages, 10 untranslated messages. +rm -f da.gmo && /usr/bin/msgfmt -c --statistics --verbose -o da.gmo da.po +cv.po: 0 translated messages, 91 untranslated messages. +csb.po:7: warning: header field 'Last-Translator' still has the initial default value +cy.po: csb.po: 26 translated messages, 65 untranslated messages. +0 translated messages, 91 untranslated messages. +da.po: 91 translated messages. +rm -f de.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de.gmo de.po +rm -f de_CH.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de_CH.gmo de_CH.po +rm -f dz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o dz.gmo dz.po +rm -f en_AU.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_AU.gmo en_AU.po +rm -f el.gmo && /usr/bin/msgfmt -c --statistics --verbose -o el.gmo el.po +de.po: de_CH.po: 0 translated messages, 91 untranslated messages. +76 translated messages, 15 untranslated messages. +en_AU.po: 54 translated messages, 37 untranslated messages. +el.po: 54 translated messages, 37 untranslated messages. +dz.po: 39 translated messages, 52 untranslated messages. +rm -f en_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_CA.gmo en_CA.po +rm -f en_GB.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_GB.gmo en_GB.po +rm -f eo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eo.gmo eo.po +rm -f es.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es.gmo es.po +rm -f es_419.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_419.gmo es_419.po +eo.po: 52 translated messages, 39 untranslated messages. +en_GB.po: 54 translated messages, 37 untranslated messages. +en_CA.po: 10 translated messages, 81 untranslated messages. +es_419.po: 0 translated messages, 91 untranslated messages. +es.po: 89 translated messages, 2 untranslated messages. +rm -f es_AR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_AR.gmo es_AR.po +rm -f es_CO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CO.gmo es_CO.po +rm -f es_CL.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CL.gmo es_CL.po +rm -f es_DO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_DO.gmo es_DO.po +rm -f es_CR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CR.gmo es_CR.po +es_AR.po: 21 translated messages, 70 untranslated messages. +es_CO.po: 49 translated messages, 42 untranslated messages. +es_CL.po: 3 translated messages, 88 untranslated messages. +es_DO.po: 1 translated message, 90 untranslated messages. +rm -f es_EC.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_EC.gmo es_EC.po +rm -f es_ES.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_ES.gmo es_ES.po +es_CR.po: 1 translated message, 90 untranslated messages. +rm -f es_MX.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_MX.gmo es_MX.po +rm -f es_NI.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_NI.gmo es_NI.po +es_EC.po: 1 translated message, 90 untranslated messages. +es_MX.po: 1 translated message, 90 untranslated messages. +es_ES.po: 1 translated message, 90 untranslated messages. +rm -f es_PA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PA.gmo es_PA.po +es_NI.po: 1 translated message, 90 untranslated messages. +rm -f es_PE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PE.gmo es_PE.po +rm -f es_PR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PR.gmo es_PR.po +rm -f es_SV.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_SV.gmo es_SV.po +es_PA.po: 1 translated message, 90 untranslated messages. +rm -f es_US.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_US.gmo es_US.po +es_PE.po: 1 translated message, 90 untranslated messages. +es_SV.po: 1 translated message, 90 untranslated messages. +es_PR.po: 1 translated message, 90 untranslated messages. +rm -f es_UY.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_UY.gmo es_UY.po +es_US.po: 0 translated messages, 91 untranslated messages. +rm -f es_VE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_VE.gmo es_VE.po +rm -f et.gmo && /usr/bin/msgfmt -c --statistics --verbose -o et.gmo et.po +rm -f eu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eu.gmo eu.po +rm -f fa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fa.gmo fa.po +es_UY.po: 1 translated message, 90 untranslated messages. +es_VE.po: 1 translated message, 90 untranslated messages. +et.po: 54 translated messages, 37 untranslated messages. +rm -f fi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fi.gmo fi.po +rm -f fil.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fil.gmo fil.po +eu.po: 54 translated messages, 37 untranslated messages. +fa.po: 11 translated messages, 80 untranslated messages. +rm -f fo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fo.gmo fo.po +fi.po: 48 translated messages, 43 untranslated messages. +fil.po: 0 translated messages, 91 untranslated messages. +rm -f fr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr.gmo fr.po +rm -f fr_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr_CA.gmo fr_CA.po +rm -f frp.gmo && /usr/bin/msgfmt -c --statistics --verbose -o frp.gmo frp.po +fo.po: 0 translated messages, 91 untranslated messages. +rm -f fur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fur.gmo fur.po +fr.po: 67 translated messages, 24 untranslated messages. +fr_CA.po: 3 translated messages, 88 untranslated messages. +frp.po: 7 translated messages, 84 untranslated messages. +fur.po: 4 translated messages, 87 untranslated messages. +rm -f fy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fy.gmo fy.po +rm -f ga.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ga.gmo ga.po +rm -f gd.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gd.gmo gd.po +rm -f gl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gl.gmo gl.po +fy.po: 4 translated messages, 87 untranslated messages. +rm -f gu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gu.gmo gu.po +gd.po: 0 translated messages, 91 untranslated messages. +ga.po: 41 translated messages, 50 untranslated messages. +gl.po: 89 translated messages, 2 untranslated messages. +rm -f ha.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ha.gmo ha.po +gu.po: 43 translated messages, 48 untranslated messages. +rm -f he.gmo && /usr/bin/msgfmt -c --statistics --verbose -o he.gmo he.po +rm -f hr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hr.gmo hr.po +rm -f hi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hi.gmo hi.po +rm -f hu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hu.gmo hu.po +ha.po: 5 translated messages, 86 untranslated messages. +hi.po: 45 translated messages, 46 untranslated messages. +hr.po: 54 translated messages, 37 untranslated messages. +he.po: 54 translated messages, 37 untranslated messages. +hu.po: 54 translated messages, 37 untranslated messages. +rm -f ia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ia.gmo ia.po +rm -f ie.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ie.gmo ie.po +rm -f hy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hy.gmo hy.po +rm -f id.gmo && /usr/bin/msgfmt -c --statistics --verbose -o id.gmo id.po +rm -f ig.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ig.gmo ig.po +ie.po: 45 translated messages, 46 untranslated messages. +ia.po: id.po: hy.po: 54 translated messages, 37 untranslated messages. +3 translated messages, 88 untranslated messages. +91 translated messages. +ig.po: 5 translated messages, 86 untranslated messages. +rm -f ja.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ja.gmo ja.po +rm -f is.gmo && /usr/bin/msgfmt -c --statistics --verbose -o is.gmo is.po +rm -f jv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o jv.gmo jv.po +rm -f it.gmo && /usr/bin/msgfmt -c --statistics --verbose -o it.gmo it.po +rm -f ka.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ka.gmo ka.po +ja.po: 54 translated messages, 37 untranslated messages. +is.po: 12 translated messages, 79 untranslated messages. +jv.po: 2 translated messages, 89 untranslated messages. +it.po: 91 translated messages. +ka.po: 37 translated messages, 54 untranslated messages. +rm -f kab.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kab.gmo kab.po +rm -f kk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kk.gmo kk.po +rm -f km.gmo && /usr/bin/msgfmt -c --statistics --verbose -o km.gmo km.po +rm -f kn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kn.gmo kn.po +rm -f ko.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ko.gmo ko.po +km.po:7: warning: header field 'Last-Translator' still has the initial default value +kk.po: km.po: 0 translated messages, 91 untranslated messages. +24 translated messages, 67 untranslated messages. +kab.po: 4 translated messages, 87 untranslated messages. +kn.po: 43 translated messages, 48 untranslated messages. +ko.po: rm -f ks.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ks.gmo ks.po +54 translated messages, 37 untranslated messages. +rm -f ku_IQ.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku_IQ.gmo ku_IQ.po +rm -f ku.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku.gmo ku.po +rm -f ky.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ky.gmo ky.po +rm -f la.gmo && /usr/bin/msgfmt -c --statistics --verbose -o la.gmo la.po +ks.po: 3 translated messages, 88 untranslated messages. +ku.po: 10 translated messages, 81 untranslated messages. +ku_IQ.po: 16 translated messages, 75 untranslated messages. +ky.po: 26 translated messages, 65 untranslated messages. +rm -f lb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lb.gmo lb.po +la.po: 2 translated messages, 89 untranslated messages. +rm -f li.gmo && /usr/bin/msgfmt -c --statistics --verbose -o li.gmo li.po +rm -f lo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lo.gmo lo.po +rm -f lt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lt.gmo lt.po +lb.po:7: warning: header field 'Last-Translator' still has the initial default value +lb.po: 0 translated messages, 91 untranslated messages. +rm -f lv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lv.gmo lv.po +li.po:7: warning: header field 'Last-Translator' still has the initial default value +li.po: 0 translated messages, 91 untranslated messages. +lo.po:7: warning: header field 'Last-Translator' still has the initial default value +lo.po: 0 translated messages, 91 untranslated messages. +lt.po: 91 translated messages. +lv.po: 49 translated messages, 42 untranslated messages. +rm -f mai.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mai.gmo mai.po +rm -f mg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mg.gmo mg.po +rm -f mi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mi.gmo mi.po +rm -f ml.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ml.gmo ml.po +rm -f mk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mk.gmo mk.po +mai.po: 18 translated messages, 73 untranslated messages. +mg.po: 10 translated messages, 81 untranslated messages. +ml.po: 41 translated messages, 50 untranslated messages. +mi.po:7: warning: header field 'Last-Translator' still has the initial default value +mi.po: 0 translated messages, 91 untranslated messages. +mk.po: 39 translated messages, 52 untranslated messages. +rm -f mr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mr.gmo mr.po +rm -f mn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mn.gmo mn.po +rm -f ms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ms.gmo ms.po +rm -f my.gmo && /usr/bin/msgfmt -c --statistics --verbose -o my.gmo my.po +mn.po: 10 translated messages, 81 untranslated messages. +mr.po: 47 translated messages, 44 untranslated messages. +rm -f nah.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nah.gmo nah.po +my.po:7: warning: header field 'Last-Translator' still has the initial default value +ms.po: 91 translated messages. +my.po: 0 translated messages, 91 untranslated messages. +nah.po: rm -f nb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nb.gmo nb.po +0 translated messages, 91 untranslated messages. +rm -f ne.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ne.gmo ne.po +rm -f nds.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nds.gmo nds.po +rm -f nl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nl.gmo nl.po +rm -f nn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nn.gmo nn.po +nb.po: 91 translated messages. +ne.po: 13 translated messages, 78 untranslated messages. +nds.po: 12 translated messages, 79 untranslated messages. +nl.po: 91 translated messages. +rm -f nqo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nqo.gmo nqo.po +rm -f nso.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nso.gmo nso.po +rm -f oc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o oc.gmo oc.po +nn.po: 40 translated messages, 51 untranslated messages. +rm -f om.gmo && /usr/bin/msgfmt -c --statistics --verbose -o om.gmo om.po +nqo.po: 0 translated messages, 91 untranslated messages. +oc.po: 68 translated messages, 23 untranslated messagesrm -f or.gmo && /usr/bin/msgfmt -c --statistics --verbose -o or.gmo or.po +. +nso.po: 3 translated messages, 88 untranslated messages. +om.po: 0 translated messages, 91 untranslated messages. +rm -f pa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pa.gmo pa.po +rm -f pl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pl.gmo pl.po +rm -f pms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pms.gmo pms.po +or.po: 41 translated messages, 50 untranslated messages. +pa.po: 46 translated messages, 45 untranslated messages. +rm -f ps.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ps.gmo ps.po +pl.po: 55 translated messages, 36 untranslated messages. +rm -f pt_BR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt_BR.gmo pt_BR.po +rm -f pt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt.gmo pt.po +pms.po: 3 translated messages, 88 untranslated messages. +ps.po: 6 translated messages, 85 untranslated messages. +rm -f ro.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ro.gmo ro.po +pt_BR.po: 58 translated messages, 33 untranslated messages. +pt.po: 84 translated messages, 7 untranslated messages. +rm -f ru.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ru.gmo ru.po +ro.po: 54 translated messages, 37 untranslated messages. +rm -f rw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o rw.gmo rw.po +rm -f sco.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sco.gmo sco.po +rm -f sc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sc.gmo sc.po +rm -f si.gmo && /usr/bin/msgfmt -c --statistics --verbose -o si.gmo si.po +ru.po: 89 translated messages, 2 untranslated messages. +rm -f sk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sk.gmo sk.po +si.po: rw.po: 36 translated messages10 translated messages, 81 untranslated messages. +, 55 untranslated messages. +sc.po: 2 translated messages, 89 untranslated messages. +sco.po: 0 translated messages, 91 untranslated messages. +rm -f sl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sl.gmo sl.po +rm -f so.gmo && /usr/bin/msgfmt -c --statistics --verbose -o so.gmo so.po +rm -f sq.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sq.gmo sq.po +sk.po: 54 translated messages, 37 untranslated messages. +rm -f sr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr.gmo sr.po +sl.po: 55 translated messages, 36 untranslated messages. +rm -f sr@latin.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr@latin.gmo sr@latin.po +so.po: 0 translated messages, 91 untranslated messages. +sq.po: 52 translated messages, 39 untranslated messages. +rm -f sv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sv.gmo sv.po +rm -f sw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sw.gmo sw.po +sr.po: 91 translated messages. +sr@latin.po: 46 translated messages, 45 untranslated messages. +rm -f ta.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ta.gmo ta.po +sv.po: 80 translated messages, 11 untranslated messages. +rm -f te.gmo && /usr/bin/msgfmt -c --statistics --verbose -o te.gmo te.po +sw.po: 0 translated messages, 91 untranslated messages. +rm -f tg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tg.gmo tg.po +te.po: ta.po: 46 translated messages, 45 untranslated messages. +41 translated messages, 50 untranslated messages. +rm -f tk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tk.gmo tk.po +rm -f th.gmo && /usr/bin/msgfmt -c --statistics --verbose -o th.gmo th.po +tg.po: 0 translated messages, 91 untranslated messages. +rm -f tl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tl.gmo tl.po +rm -f tr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tr.gmo tr.po +tk.po: 7 translated messages, 84 untranslated messages. +th.po: 45 translated messages, 46 untranslated messages. +rm -f ts.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ts.gmo ts.po +tl.po: 0 translated messages, 91 untranslated messages. +tr.po: ts.po: rm -f ug.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ug.gmo ug.po +0 translated messages, 91 untranslated messages. +58 translated messages, 33 untranslated messages. +rm -f tt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tt.gmo tt.po +rm -f ur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur.gmo ur.po +rm -f uk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uk.gmo uk.po +rm -f ur_PK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur_PK.gmo ur_PK.po +ug.po: tt.po:7: warning: 6 translated messages, 85 untranslated messages. +header field 'Last-Translator' still has the initial default value +tt.po: 0 translated messages, 91 untranslated messages. +ur.po: 7 translated messages, 84 untranslated messages. +uk.po: 58 translated messages, 33 untranslated messages. +ur_PK.po:7: warning: rm -f vi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o vi.gmo vi.po +header field 'Last-Translator' still has the initial default value +ur_PK.po: 0 translated messages, 91 untranslated messages. +rm -f uz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uz.gmo uz.po +rm -f wa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o wa.gmo wa.po +rm -f yi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yi.gmo yi.po +rm -f xh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o xh.gmo xh.po +vi.po: 52 translated messages, 39 untranslated messages. +uz.po: 26 translated messages, 65 untranslated messages. +wa.po: 9 translated messages, 82 untranslated messages. +yi.po:7: warning: header field 'Last-Translator' still has the initial default value +yi.po: 0 translated messages, 91 untranslated messages. +xh.po: 8 translated messages, 83 untranslated messages. +rm -f zh_HK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_HK.gmo zh_HK.po +rm -f zh_CN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_CN.gmo zh_CN.po +rm -f yo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yo.gmo yo.po +rm -f zu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zu.gmo zu.po +rm -f zh_TW.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_TW.gmo zh_TW.po +zh_HK.po: 47 translated messages, 44 untranslated messages. +yo.po: 5 translated messages, 86 untranslated messages. +zh_CN.po: 63 translated messages, 28 untranslated messages. +zu.po: 3 translated messages, 88 untranslated messages. +zh_TW.po: 91 translated messages. +make[3]: Leaving directory '/rootdir/po' +touch stamp-po +make[2]: Leaving directory '/rootdir/po' +Making all in libcafekbd +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml + GEN cafekbd-indicator-marshal.h + GEN cafekbd-keyboard-drawing-marshal.h +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +INFO: Reading ./cafekbd-indicator-marshal.list... +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... + GEN cafekbd-indicator-marshal.c + GEN cafekbd-keyboard-drawing-marshal.c +INFO: Reading ./cafekbd-indicator-marshal.list... +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... +make all-am +make[3]: Entering directory '/rootdir/libcafekbd' + CC libcafekbd_la-cafekbd-desktop-config.lo + CC libcafekbd_la-cafekbd-keyboard-config.lo + CC libcafekbd_la-cafekbd-util.lo + CC libcafekbdui_la-cafekbd-indicator-config.lo + CC libcafekbdui_la-cafekbd-indicator.lo +cafekbd-desktop-config.c: In function 'cafekbd_desktop_config_load_from_gsettings': +cafekbd-desktop-config.c:176:38: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 176 | || config->default_group >= + | ^~ +cafekbd-indicator.c: In function 'cafekbd_indicator_extract_layout_name': +cafekbd-indicator.c:293:19: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 293 | if (group < g_strv_length (short_group_names)) { + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_prepare_drawing': +cafekbd-indicator.c:418:31: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 418 | if (group + 1 == + | ^~ +cafekbd-indicator.c: In function 'cafekbd_indicator_update_tooltips': +cafekbd-indicator.c:446:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 446 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-indicator.c:450:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 450 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-indicator.c: In function 'cafekbd_indicator_kbd_cfg_callback': +cafekbd-indicator.c:61:44: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 61 | CafekbdIndicator * gki = (CafekbdIndicator*)cur->data; + | ^~~ +cafekbd-indicator.c:561:9: note: in expansion of macro 'ForAllIndicators' + 561 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-indicator.c:539:55: note: shadowed declaration is here + 539 | cafekbd_indicator_kbd_cfg_callback (CafekbdIndicator *gki G_GNUC_UNUSED) +cafekbd-indicator.c: In function 'cafekbd_indicator_start_listen': +cafekbd-indicator.c:647:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 647 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:650:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 650 | (CdkFilterFunc) + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_stop_listen': +cafekbd-indicator.c:663:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 663 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:667:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 667 | (CdkFilterFunc) cafekbd_indicator_filter_x_evt, NULL); + | ^ +cafekbd-indicator-config.c: In function 'cafekbd_indicator_config_get_images_file': +cafekbd-indicator-config.c:152:59: warning: comparison of integer expressions of different signedness: 'guint' {aka 'unsigned int'} and 'int' [-Wsign-compare] + 152 | (g_strv_length (kbd_config->layouts_variants) > group)) { + | ^ + CC libcafekbdui_la-cafekbd-status.lo +cafekbd-status.c: In function 'cafekbd_status_render_cairo': +cafekbd-status.c:214:23: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 214 | if (group + 1 == xkl_engine_get_num_groups (globals.engine)) { + | ^~ +cafekbd-status.c: In function 'cafekbd_status_prepare_drawing': +cafekbd-status.c:376:51: warning: cast between incompatible function types from 'void (*)(void *)' to 'void (*)(guchar *, void *)' {aka 'void (*)(unsigned char *, void *)'} [-Wcast-function-type] + 376 | (GdkPixbufDestroyNotify) + | ^ +cafekbd-status.c: In function 'cafekbd_status_update_tooltips': +cafekbd-status.c:395:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 395 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-status.c:399:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 399 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-status.c: In function 'cafekbd_status_kbd_cfg_callback': +cafekbd-status.c:77:41: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 77 | CafekbdStatus * gki = (CafekbdStatus*)cur->data; + | ^~~ +cafekbd-status.c:508:9: note: in expansion of macro 'ForAllIndicators' + 508 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-status.c:484:49: note: shadowed declaration is here + 484 | cafekbd_status_kbd_cfg_callback (CafekbdStatus *gki G_GNUC_UNUSED) +cafekbd-status.c: In function 'cafekbd_status_start_listen': +cafekbd-status.c:594:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 594 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:597:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 597 | (CdkFilterFunc) cafekbd_status_filter_x_evt, + | ^ +cafekbd-status.c: In function 'cafekbd_status_stop_listen': +cafekbd-status.c:610:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 610 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:614:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 614 | (CdkFilterFunc) cafekbd_status_filter_x_evt, NULL); + | ^ + CC libcafekbdui_la-cafekbd-indicator-marshal.lo +cafekbd-indicator-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ + CC libcafekbdui_la-cafekbd-keyboard-drawing-marshal.lo +cafekbd-keyboard-drawing-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + CC libcafekbdui_la-cafekbd-keyboard-drawing.lo +cafekbd-keyboard-drawing.c: In function 'draw_polygon': +cafekbd-keyboard-drawing.c:322:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 322 | for (i = 0; i < num_points; i++) { + | ^ +cafekbd-keyboard-drawing.c: In function 'process_indicators_state_notify': +cafekbd-keyboard-drawing.c:2131:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'long unsigned int' [-Wsign-compare] + 2131 | for (i = 0; i <= drawing->xkb->indicators->phys_indicators; i++) + | ^~ +cafekbd-keyboard-drawing.c: In function 'cafekbd_keyboard_drawing_get_type': +cafekbd-keyboard-drawing.c:2394:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawingClass *)' {aka 'void (*)(struct _CafekbdKeyboardDrawingClass *)'} to 'void (*)(void *, void *)' [-Wcast-function-type] + 2394 | (GClassInitFunc) cafekbd_keyboard_drawing_class_init, + | ^ +cafekbd-keyboard-drawing.c:2399:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawing *)' {aka 'void (*)(struct _CafekbdKeyboardDrawing *)'} to 'void (*)(GTypeInstance *, void *)' {aka 'void (*)(struct _GTypeInstance *, void *)'} [-Wcast-function-type] + 2399 | (GInstanceInitFunc) cafekbd_keyboard_drawing_init, + | ^ + GEN org.cafe.peripherals-keyboard-xkb.gschema.valid + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:114:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 114 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbd.la + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspectq8aoqnje/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectq8aoqnje/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectq8aoqnje/Cafekbd-1.0.c:239:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 239 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspectq8aoqnje/Cafekbd-1.0.c:246:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 246 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspectq8aoqnje/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +5 warnings generated. + GICOMP Cafekbd-1.0.gir +make[3]: Leaving directory '/rootdir/libcafekbd' +make[2]: Leaving directory '/rootdir/libcafekbd' +Making all in test +make[2]: Entering directory '/rootdir/test' + CC cafekbd_indicator_test-cafekbd-indicator-test.o + CC cafekbd_keyboard_drawing_test-cafekbd-keyboard-drawing-test.o + CC cafekbd_status_test-cafekbd-status-test.o + CCLD cafekbd-indicator-test +cafekbd-keyboard-drawing-test.c:187:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 187 | g_print ("kbdraw %s\n", VERSION); + | ^~~~~~~ +cafekbd-keyboard-drawing-test.c:194:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 194 | g_printerr ("--groups: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:199:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 199 | g_printerr ("--levels: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:225:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 225 | cafekbd_keyboard_drawing_set_track_modifiers + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:228:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 228 | cafekbd_keyboard_drawing_set_track_config + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:248:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 248 | names.keycodes = keycodes; + | ^~~~~~~~ +cafekbd-keyboard-drawing-test.c:256:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 256 | names.geometry = geometry; + | ^~~~~~~~ +7 warnings generated. + CCLD cafekbd-keyboard-drawing-test + CCLD cafekbd-status-test +make[2]: Leaving directory '/rootdir/test' +make[2]: Entering directory '/rootdir' +make[2]: Leaving directory '/rootdir' +make[1]: Leaving directory '/rootdir' +scan-build: Analysis run complete. +scan-build: 11 bugs found. +scan-build: Run 'scan-view /rootdir/html-report/2025-02-06-165420-14522-1' to examine bug reports. +Making check in po +make[1]: Entering directory '/rootdir/po' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/po' +Making check in libcafekbd +make[1]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +make check-am +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:113:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 113 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspectdvb8b8x7/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectdvb8b8x7/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectdvb8b8x7/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +3 warnings generated. + GICOMP Cafekbd-1.0.gir +make[2]: Leaving directory '/rootdir/libcafekbd' +make[1]: Leaving directory '/rootdir/libcafekbd' +Making check in test +make[1]: Entering directory '/rootdir/test' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/test' +make[1]: Entering directory '/rootdir' +make[1]: Leaving directory '/rootdir' + Listing... 0% Listing... 0% Listing... 0% adduser/testing,now 3.137 all [installed,automatic] +advaita-icon-theme/unknown,now 3.25.0-1 all [installed,automatic] +apt/testing,now 2.9.26 amd64 [installed,automatic] +aptitude-common/testing,now 0.8.13-6.1 all [installed,automatic] +aptitude/testing,now 0.8.13-6.1 amd64 [installed] +at-spi2-common/testing,now 2.55.0.1-1 all [installed,automatic] +at-spi2-core/testing,now 2.55.0.1-1 amd64 [installed,automatic] +autoconf-archive/testing,now 20220903-3 all [installed] +autoconf/testing,now 2.72-3 all [installed,automatic] +automake/testing,now 1:1.17-3 all [installed,automatic] +autopoint/testing,now 0.23.1-1 all [installed] +autotools-dev/testing,now 20220109.1 all [installed,automatic] +base-files/testing,now 13.6 amd64 [installed,automatic] +base-passwd/testing,now 3.6.6 amd64 [installed,automatic] +bash/testing,now 5.2.37-1 amd64 [installed,automatic] +binfmt-support/testing,now 2.2.2-7 amd64 [installed,automatic] +binutils-common/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils-gold-x86-64-linux-gnu/testing,now 2.44-1 amd64 [installed,automatic] +binutils-gold/testing,now 2.44-1 amd64 [installed,automatic] +binutils-x86-64-linux-gnu/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +bsdutils/testing,now 1:2.40.4-2 amd64 [installed,automatic] +build-essential/testing,now 12.12 amd64 [installed,automatic] +bzip2-doc/testing,now 1.0.8-6 all [installed,automatic] +bzip2/testing,now 1.0.8-6 amd64 [installed,automatic] +ca-certificates/testing,now 20241223 all [installed,automatic] +clang-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools/testing,now 1:19.0-63 amd64 [installed] +clang/testing,now 1:19.0-63 amd64 [installed] +coreutils/testing,now 9.5-1+b1 amd64 [installed,automatic] +cpp-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-14/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cpp/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cppcheck/testing,now 2.16.0-1 amd64 [installed] +ctk-update-icon-cache/unknown,now 3.25.6-1 amd64 [installed,automatic] +dash/testing,now 0.5.12-12 amd64 [installed,automatic] +dbus-bin/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-daemon/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-session-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-system-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-user-session/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus/testing,now 1.16.0-1 amd64 [installed,automatic] +dconf-gsettings-backend/testing,now 0.40.0-5 amd64 [installed,automatic] +dconf-service/testing,now 0.40.0-5 amd64 [installed,automatic] +debconf/testing,now 1.5.89 all [installed,automatic] +debian-archive-keyring/testing,now 2023.4 all [installed,automatic] +debianutils/testing,now 5.21 amd64 [installed,automatic] +diffutils/testing,now 1:3.10-2 amd64 [installed,automatic] +dirmngr/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +dmsetup/testing,now 2:1.02.201-1 amd64 [installed,automatic] +dpkg-dev/testing,now 1.22.14 all [installed,automatic] +dpkg/testing,now 1.22.14 amd64 [installed,automatic] +e2fsprogs/testing,now 1.47.2-1 amd64 [installed,automatic] +expect/testing,now 5.45.4-3+b1 amd64 [installed] +fakeroot/testing,now 1.37-1 amd64 [installed,automatic] +file/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +findutils/testing,now 4.10.0-3 amd64 [installed,automatic] +fontconfig-config/testing,now 2.15.0-2 amd64 [installed,automatic] +fontconfig/testing,now 2.15.0-2 amd64 [installed,automatic] +fonts-dejavu-core/testing,now 2.37-8 all [installed,automatic] +fonts-dejavu-mono/testing,now 2.37-8 all [installed,automatic] +g++-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-14/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +g++/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc-14-base/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gettext-base/testing,now 0.23.1-1 amd64 [installed,automatic] +gettext/testing,now 0.23.1-1 amd64 [installed] +gir1.2-atk-1.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-atspi-2.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-ctk-3.0/unknown,now 3.25.6-1 amd64 [installed] +gir1.2-freedesktop-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-freedesktop/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-gdkpixbuf-2.0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +gir1.2-girepository-2.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-girepository-2.0/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-glib-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-glib-2.0/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-harfbuzz-0.0/testing,now 10.2.0-1 amd64 [installed,automatic] +gir1.2-pango-1.0/testing,now 1.56.1-1 amd64 [installed,automatic] +gir1.2-xkl-1.0/testing,now 5.4-5+b2 amd64 [installed,automatic] +girepository-tools/testing,now 2.82.4-2 amd64 [installed,automatic] +git-man/testing,now 1:2.47.2-0.1 all [installed,automatic] +git/testing,now 1:2.47.2-0.1 amd64 [installed] +gnupg-l10n/testing,now 2.2.46-1 all [installed,automatic] +gnupg-utils/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gnupg/testing,now 2.2.46-1 all [installed,automatic] +gobject-introspection-bin/testing,now 1.82.0-4 amd64 [installed,automatic] +gobject-introspection/testing,now 1.82.0-4 amd64 [installed] +gpg-agent/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg-wks-client/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgconf/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgsm/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgv/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +grep/testing,now 3.11-4 amd64 [installed,automatic] +gsettings-desktop-schemas/testing,now 47.1-1 all [installed,automatic] +gzip/testing,now 1.13-1 amd64 [installed,automatic] +hicolor-icon-theme/testing,now 0.18-2 all [installed,automatic] +hostname/testing,now 3.25 amd64 [installed,automatic] +icu-devtools/testing,now 72.1-6 amd64 [installed,automatic] +init-system-helpers/testing,now 1.68 all [installed,automatic] +krb5-locales/testing,now 1.21.3-4 all [installed,automatic] +less/testing,now 643-1 amd64 [installed,automatic] +lib32gcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +lib32stdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libacl1/testing,now 2.3.2-2+b1 amd64 [installed,automatic] +libalgorithm-diff-perl/testing,now 1.201-1 all [installed,automatic] +libalgorithm-diff-xs-perl/testing,now 0.04-8+b4 amd64 [installed,automatic] +libalgorithm-merge-perl/testing,now 0.08-5 all [installed,automatic] +libapparmor1/testing,now 3.1.7-1+b3 amd64 [installed,automatic] +libapt-pkg6.0t64/testing,now 2.9.26 amd64 [installed,automatic] +libasan8/testing,now 14.2.0-12 amd64 [installed,automatic] +libassuan9/testing,now 3.0.1-2 amd64 [installed,automatic] +libatk-bridge2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk-bridge2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatomic1/testing,now 14.2.0-12 amd64 [installed,automatic] +libatspi2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatspi2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libattr1/testing,now 1:2.5.2-2 amd64 [installed,automatic] +libaudit-common/testing,now 1:4.0.2-2 all [installed,automatic] +libaudit1/testing,now 1:4.0.2-2+b1 amd64 [installed,automatic] +libavahi-client3/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common-data/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common3/testing,now 0.8-16 amd64 [installed,automatic] +libbinutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libblkid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libblkid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libboost-iostreams1.83.0/testing,now 1.83.0-4 amd64 [installed,automatic] +libbrotli-dev/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbrotli1/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbsd0/testing,now 0.12.2-2 amd64 [installed,automatic] +libbz2-1.0/testing,now 1.0.8-6 amd64 [installed,automatic] +libbz2-dev/testing,now 1.0.8-6 amd64 [installed,automatic] +libc-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc-dev-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc6-dev/testing,now 2.40-6 amd64 [installed,automatic] +libc6-i386/testing,now 2.40-6 amd64 [installed,automatic] +libc6/testing,now 2.40-6 amd64 [installed,automatic] +libcairo-gobject2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo-script-interpreter2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2-dev/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcap-dev/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcap-ng0/testing,now 0.8.5-4 amd64 [installed,automatic] +libcap2/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcbor0.10/testing,now 0.10.2-2 amd64 [installed,automatic] +libcc1-0/testing,now 14.2.0-12 amd64 [installed,automatic] +libclang-common-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-cpp19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-rt-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang1-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libcolord2/testing,now 1.4.7-1+b2 amd64 [installed,automatic] +libcom-err2/testing,now 1.47.2-1 amd64 [installed,automatic] +libcrypt-dev/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcrypt1/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcryptsetup12/testing,now 2:2.7.5-1 amd64 [installed,automatic] +libctf-nobfd0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctf0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctk-3-0/unknown,now 3.25.6-1 amd64 [installed] +libctk-3-bin/unknown,now 3.25.6-1 amd64 [installed,automatic] +libctk-3-common/unknown,now 3.25.6-1 all [installed] +libctk-3-dev/unknown,now 3.25.6-1 amd64 [installed] +libcups2t64/testing,now 2.4.10-2+b1 amd64 [installed,automatic] +libcurl3t64-gnutls/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcurl4t64/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcwidget4/testing,now 0.5.18-6+b2 amd64 [installed,automatic] +libdatrie-dev/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdatrie1/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdav1d7/testing,now 1.5.1-1 amd64 [installed,automatic] +libdb5.3t64/testing,now 5.3.28+dfsg2-9 amd64 [installed,automatic] +libdbus-1-3/testing,now 1.16.0-1 amd64 [installed,automatic] +libdbus-1-dev/testing,now 1.16.0-1 amd64 [installed,automatic] +libdconf1/testing,now 0.40.0-5 amd64 [installed,automatic] +libdebconfclient0/testing,now 0.277 amd64 [installed,automatic] +libdeflate-dev/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdeflate0/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdevmapper1.02.1/testing,now 2:1.02.201-1 amd64 [installed,automatic] +libdpkg-perl/testing,now 1.22.14 all [installed,automatic] +libdrm-amdgpu1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-common/testing,now 2.4.123-1 all [installed,automatic] +libdrm-intel1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-radeon1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm2/testing,now 2.4.123-1 amd64 [installed,automatic] +libedit2/testing,now 3.1-20250104-1 amd64 [installed,automatic] +libegl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libegl-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1-mesa-dev/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libelf1t64/testing,now 0.192-4 amd64 [installed,automatic] +libepoxy-dev/testing,now 1.5.10-2 amd64 [installed,automatic] +libepoxy0/testing,now 1.5.10-2 amd64 [installed,automatic] +liberror-perl/testing,now 0.17029-2 all [installed,automatic] +libexpat1-dev/testing,now 2.6.4-1 amd64 [installed,automatic] +libexpat1/testing,now 2.6.4-1 amd64 [installed,automatic] +libext2fs2t64/testing,now 1.47.2-1 amd64 [installed,automatic] +libfakeroot/testing,now 1.37-1 amd64 [installed,automatic] +libffi-dev/testing,now 3.4.6-1 amd64 [installed,automatic] +libffi8/testing,now 3.4.6-1 amd64 [installed,automatic] +libfido2-1/testing,now 1.15.0-1+b1 amd64 [installed,automatic] +libfile-fcntllock-perl/testing,now 0.22-4+b4 amd64 [installed,automatic] +libfontconfig-dev/testing,now 2.15.0-2 amd64 [installed,automatic] +libfontconfig1/testing,now 2.15.0-2 amd64 [installed,automatic] +libfreetype-dev/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfreetype6/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfribidi-dev/testing,now 1.0.16-1 amd64 [installed,automatic] +libfribidi0/testing,now 1.0.16-1 amd64 [installed,automatic] +libgbm1/testing,now 24.2.8-1 amd64 [installed,automatic] +libgc1/testing,now 1:8.2.8-1 amd64 [installed,automatic] +libgcc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcrypt20/testing,now 1.11.0-7 amd64 [installed,automatic] +libgdbm-compat4t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdbm6t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-dev/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-bin/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-common/testing,now 2.42.12+dfsg-2 all [installed,automatic] +libgio-2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libgio-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository-1.0-1/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-1.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-2.0-0/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository1.0-dev/testing,now 1.82.0-4 amd64 [installed] +libgl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgl1-mesa-dri/testing,now 24.2.8-1 amd64 [installed,automatic] +libgl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglapi-mesa/testing,now 24.2.8-1 amd64 [installed,automatic] +libgles-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles2/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglib2.0-0t64/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-data/testing,now 2.82.4-2 all [installed,automatic] +libglib2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-dev/testing,now 2.82.4-2 amd64 [installed] +libglvnd-core-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libglx0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgmp10/testing,now 2:6.3.0+dfsg-3 amd64 [installed,automatic] +libgnutls30t64/testing,now 3.8.8-2 amd64 [installed,automatic] +libgomp1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgpg-error-l10n/testing,now 1.51-3 all [installed,automatic] +libgpg-error0/testing,now 1.51-3 amd64 [installed,automatic] +libgpm2/testing,now 1.20.7-11+b2 amd64 [installed,automatic] +libgprofng0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libgraphite2-3/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgraphite2-dev/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgssapi-krb5-2/testing,now 1.21.3-4 amd64 [installed,automatic] +libharfbuzz-cairo0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-dev/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-gobject0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-icu0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-subset0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz0b/testing,now 10.2.0-1 amd64 [installed,automatic] +libhogweed6t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libhwasan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libice-dev/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libice6/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libicu-dev/testing,now 72.1-6 amd64 [installed,automatic] +libicu72/testing,now 72.1-6 amd64 [installed,automatic] +libidn2-0/testing,now 2.3.7-2+b1 amd64 [installed,automatic] +libisl23/testing,now 0.27-1 amd64 [installed,automatic] +libitm1/testing,now 14.2.0-12 amd64 [installed,automatic] +libjansson4/testing,now 2.14-2+b3 amd64 [installed,automatic] +libjbig-dev/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjbig0/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjpeg-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjson-c5/testing,now 0.18+ds-1 amd64 [installed,automatic] +libk5crypto3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkeyutils1/testing,now 1.6.3-4 amd64 [installed,automatic] +libkmod2/testing,now 33+20240816-2 amd64 [installed,automatic] +libkrb5-3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkrb5support0/testing,now 1.21.3-4 amd64 [installed,automatic] +libksba8/testing,now 1.6.7-2+b1 amd64 [installed,automatic] +liblcms2-2/testing,now 2.16-2 amd64 [installed,automatic] +libldap-common/testing,now 2.6.9+dfsg-1 all [installed,automatic] +libldap2/testing,now 2.6.9+dfsg-1 amd64 [installed,automatic] +liblerc-dev/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +liblerc4/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +libllvm19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +liblocale-gettext-perl/testing,now 1.07-7+b1 amd64 [installed,automatic] +liblsan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libltdl-dev/testing,now 2.5.4-3 amd64 [installed,automatic] +libltdl7/testing,now 2.5.4-3 amd64 [installed,automatic] +liblz4-1/testing,now 1.10.0-3 amd64 [installed,automatic] +liblzma-dev/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzma5/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzo2-2/testing,now 2.10-3+b1 amd64 [installed,automatic] +libmagic-mgc/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmagic1t64/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmd0/testing,now 1.1.0-2+b1 amd64 [installed,automatic] +libmount-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libmount1/testing,now 2.40.4-2 amd64 [installed,automatic] +libmpc3/testing,now 1.3.1-1+b3 amd64 [installed,automatic] +libmpfr6/testing,now 4.2.1-1+b2 amd64 [installed,automatic] +libncurses-dev/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncurses6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncursesw6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libnettle8t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libnghttp2-14/testing,now 1.64.0-1 amd64 [installed,automatic] +libnghttp3-9/testing,now 1.6.0-2 amd64 [installed,automatic] +libngtcp2-16/testing,now 1.9.1-1 amd64 [installed,automatic] +libngtcp2-crypto-gnutls8/testing,now 1.9.1-1 amd64 [installed,automatic] +libnpth0t64/testing,now 1.8-2 amd64 [installed,automatic] +libnss-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libobjc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libobjc4/testing,now 14.2.0-12 amd64 [installed,automatic] +libopengl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libopengl0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libp11-kit0/testing,now 0.25.5-3 amd64 [installed,automatic] +libpam-modules-bin/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-modules/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-runtime/testing,now 1.7.0-2 all [installed,automatic] +libpam-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libpam0g/testing,now 1.7.0-2 amd64 [installed,automatic] +libpango-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpango1.0-dev/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangocairo-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoft2-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoxft-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpciaccess0/testing,now 0.17-3+b3 amd64 [installed,automatic] +libpcre2-16-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-32-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-8-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-dev/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-posix3/testing,now 10.44-5 amd64 [installed,automatic] +libperl5.40/testing,now 5.40.0-8 amd64 [installed,automatic] +libpfm4/testing,now 4.13.0+git83-g91970fe-1 amd64 [installed,automatic] +libpipeline1/testing,now 1.5.8-1 amd64 [installed,automatic] +libpixman-1-0/testing,now 0.44.0-3 amd64 [installed,automatic] +libpixman-1-dev/testing,now 0.44.0-3 amd64 [installed,automatic] +libpkgconf3/testing,now 1.8.1-4 amd64 [installed,automatic] +libpng-dev/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng-tools/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng16-16t64/testing,now 1.6.44-3 amd64 [installed,automatic] +libproc2-0/testing,now 2:4.0.4-7 amd64 [installed,automatic] +libpsl5t64/testing,now 0.21.2-1.1+b1 amd64 [installed,automatic] +libpython3-stdlib/testing,now 3.13.1-2 amd64 [installed,automatic] +libpython3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libpython3.13-stdlib/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libquadmath0/testing,now 14.2.0-12 amd64 [installed,automatic] +libreadline8t64/testing,now 8.2-6 amd64 [installed,automatic] +librsvg2-2/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librsvg2-common/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librtmp1/testing,now 2.4+20151223.gitfa8646d.1-2+b5 amd64 [installed,automatic] +libsasl2-2/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules-db/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libseccomp2/testing,now 2.5.5-2 amd64 [installed,automatic] +libselinux1-dev/testing,now 3.7-3.1 amd64 [installed,automatic] +libselinux1/testing,now 3.7-3.1 amd64 [installed,automatic] +libsemanage-common/testing,now 3.7-2.1 all [installed,automatic] +libsemanage2/testing,now 3.7-2.1 amd64 [installed,automatic] +libsensors-config/testing,now 1:3.6.0-10 all [installed,automatic] +libsensors5/testing,now 1:3.6.0-10+b1 amd64 [installed,automatic] +libsepol-dev/testing,now 3.7-1 amd64 [installed,automatic] +libsepol2/testing,now 3.7-1 amd64 [installed,automatic] +libsframe1/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libsharpyuv-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsharpyuv0/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsigc++-2.0-0v5/testing,now 2.12.1-3 amd64 [installed,automatic] +libsm-dev/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsm6/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsmartcols1/testing,now 2.40.4-2 amd64 [installed,automatic] +libsqlite3-0/testing,now 3.46.1-1 amd64 [installed,automatic] +libss2/testing,now 1.47.2-1 amd64 [installed,automatic] +libssh2-1t64/testing,now 1.11.1-1 amd64 [installed,automatic] +libssl3t64/testing,now 3.4.0-2 amd64 [installed,automatic] +libstdc++-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libstdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libsysprof-capture-4-dev/testing,now 47.2-1 amd64 [installed,automatic] +libsystemd-dev/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd-shared/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd0/testing,now 257.2-3 amd64 [installed,automatic] +libtasn1-6/testing,now 4.19.0-3+b3 amd64 [installed,automatic] +libtcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +libthai-data/testing,now 0.1.29-2 all [installed,automatic] +libthai-dev/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libthai0/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libtiff-dev/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiff6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiffxx6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtinfo6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libtinyxml2-10/testing,now 10.0.0+dfsg-2+b2 amd64 [installed,automatic] +libtool/testing,now 2.5.4-3 all [installed] +libtsan2/testing,now 14.2.0-12 amd64 [installed,automatic] +libubsan1/testing,now 14.2.0-12 amd64 [installed,automatic] +libudev1/testing,now 257.2-3 amd64 [installed,automatic] +libunistring5/testing,now 1.3-1 amd64 [installed,automatic] +libuuid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libvulkan1/testing,now 1.4.304.0-1 amd64 [installed,automatic] +libwayland-bin/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-client0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-cursor0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-dev/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-egl1/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-server0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwebp-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebp7/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdecoder3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdemux2/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpmux3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libx11-6/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-data/testing,now 2:1.8.10-2 all [installed,automatic] +libx11-dev/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-xcb1/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libxapian30/testing,now 1.4.25-2 amd64 [installed,automatic] +libxau-dev/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxau6/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxaw7/testing,now 2:1.0.16-1 amd64 [installed,automatic] +libxcb-dri2-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-dri3-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-glx0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-present0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-randr0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-sync1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-xfixes0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcomposite-dev/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcomposite1/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcursor-dev/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxcursor1/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxdamage-dev/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdamage1/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdmcp-dev/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxdmcp6/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxext-dev/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxext6/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxfixes-dev/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxfixes3/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxft-dev/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxft2/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxi-dev/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxi6/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxinerama-dev/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxinerama1/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxkbcommon-dev/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbcommon0/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbfile1/testing,now 1:1.1.0-1+b4 amd64 [installed,automatic] +libxklavier-dev/testing,now 5.4-5+b2 amd64 [installed] +libxklavier16/testing,now 5.4-5+b2 amd64 [installed,automatic] +libxml2-dev/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxml2-utils/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed] +libxml2/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxmu6/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxmuu1/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxpm4/testing,now 1:3.5.17-1+b3 amd64 [installed,automatic] +libxrandr-dev/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrandr2/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrender-dev/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxrender1/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxshmfence1/testing,now 1.3-1+b3 amd64 [installed,automatic] +libxt6t64/testing,now 1:1.2.1-1.2+b2 amd64 [installed,automatic] +libxtst-dev/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxtst6/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxxf86vm1/testing,now 1:1.1.4-1+b4 amd64 [installed,automatic] +libxxhash0/testing,now 0.8.2-2+b2 amd64 [installed,automatic] +libyaml-0-2/testing,now 0.2.5-2 amd64 [installed,automatic] +libz3-4/testing,now 4.13.3-1 amd64 [installed,automatic] +libz3-dev/testing,now 4.13.3-1 amd64 [installed,automatic] +libzstd-dev/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +libzstd1/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +linux-libc-dev/testing,now 6.12.11-1 all [installed,automatic] +linux-sysctl-defaults/testing,now 4.11 all [installed,automatic] +llvm-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-linker-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-runtime/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +login.defs/testing,now 1:4.16.0-7 all [installed,automatic] +login/testing,now 1:4.16.0-2+really2.40.4-2 amd64 [installed,automatic] +logsave/testing,now 1.47.2-1 amd64 [installed,automatic] +m4/testing,now 1.4.19-5 amd64 [installed,automatic] +make/testing,now 4.4.1-1 amd64 [installed] +manpages-dev/testing,now 6.9.1-1 all [installed,automatic] +manpages/testing,now 6.9.1-1 all [installed,automatic] +mawk/testing,now 1.3.4.20240905-1 amd64 [installed,automatic] +media-types/testing,now 10.1.0 all [installed,automatic] +mesa-libgallium/testing,now 24.2.8-1 amd64 [installed,automatic] +mesa-vulkan-drivers/testing,now 24.2.8-1 amd64 [installed,automatic] +mount/testing,now 2.40.4-2 amd64 [installed,automatic] +native-architecture/testing,now 0.2.5 all [installed,automatic] +ncurses-base/testing,now 6.5-2 all [installed,automatic] +ncurses-bin/testing,now 6.5-2+b1 amd64 [installed,automatic] +netbase/testing,now 6.4 all [installed,automatic] +openssh-client/testing,now 1:9.9p1-3 amd64 [installed,automatic] +openssl-provider-legacy/testing,now 3.4.0-2 amd64 [installed,automatic] +openssl/testing,now 3.4.0-2 amd64 [installed,automatic] +pango1.0-tools/testing,now 1.56.1-1 amd64 [installed,automatic] +passwd/testing,now 1:4.16.0-7 amd64 [installed,automatic] +patch/testing,now 2.7.6-7 amd64 [installed,automatic] +perl-base/testing,now 5.40.0-8 amd64 [installed,automatic] +perl-modules-5.40/testing,now 5.40.0-8 all [installed,automatic] +perl/testing,now 5.40.0-8 amd64 [installed,automatic] +pinentry-curses/testing,now 1.3.1-2 amd64 [installed,automatic] +pkgconf-bin/testing,now 1.8.1-4 amd64 [installed,automatic] +pkgconf/testing,now 1.8.1-4 amd64 [installed,automatic] +procps/testing,now 2:4.0.4-7 amd64 [installed,automatic] +psmisc/testing,now 23.7-1 amd64 [installed,automatic] +publicsuffix/testing,now 20250108.1153-0.1 all [installed,automatic] +python3-autocommand/testing,now 2.2.2-3 all [installed,automatic] +python3-inflect/testing,now 7.3.1-2 all [installed,automatic] +python3-jaraco.context/testing,now 6.0.0-1 all [installed,automatic] +python3-jaraco.functools/testing,now 4.1.0-1 all [installed,automatic] +python3-jaraco.text/testing,now 4.0.0-1 all [installed,automatic] +python3-mako/testing,now 1.3.8-2 all [installed,automatic] +python3-markdown/testing,now 3.7-2 all [installed,automatic] +python3-markupsafe/testing,now 2.1.5-1+b2 amd64 [installed,automatic] +python3-minimal/testing,now 3.13.1-2 amd64 [installed,automatic] +python3-more-itertools/testing,now 10.6.0-1 all [installed,automatic] +python3-packaging/testing,now 24.2-1 all [installed,automatic] +python3-pkg-resources/testing,now 75.6.0-1 all [installed,automatic] +python3-pygments/testing,now 2.18.0+dfsg-2 all [installed,automatic] +python3-setuptools/testing,now 75.6.0-1 all [installed,automatic] +python3-typeguard/testing,now 4.4.1-1 all [installed,automatic] +python3-typing-extensions/testing,now 4.12.2-2 all [installed,automatic] +python3-yaml/testing,now 6.0.2-1+b1 amd64 [installed,automatic] +python3-zipp/testing,now 3.21.0-1 all [installed,automatic] +python3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3.13/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3/testing,now 3.13.1-2 amd64 [installed,automatic] +readline-common/testing,now 8.2-6 all [installed,automatic] +rpcsvc-proto/testing,now 1.4.3-1 amd64 [installed,automatic] +sed/testing,now 4.9-2 amd64 [installed,automatic] +sensible-utils/testing,now 0.0.24 all [installed,automatic] +sgml-base/testing,now 1.31 all [installed,automatic] +shared-mime-info/testing,now 2.4-5+b2 amd64 [installed,automatic] +sqv/testing,now 1.2.1-5 amd64 [installed,automatic] +systemd-cryptsetup/testing,now 257.2-3 amd64 [installed,automatic] +systemd-sysv/testing,now 257.2-3 amd64 [installed,automatic] +systemd-timesyncd/testing,now 257.2-3 amd64 [installed,automatic] +systemd/testing,now 257.2-3 amd64 [installed,automatic] +sysvinit-utils/testing,now 3.13-1 amd64 [installed,automatic] +tar/testing,now 1.35+dfsg-3.1 amd64 [installed,automatic] +tcl-expect/testing,now 5.45.4-3+b1 amd64 [installed,automatic] +tcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +tzdata/testing,now 2024b-6 all [installed,automatic] +util-linux/testing,now 2.40.4-2 amd64 [installed,automatic] +uuid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +wayland-protocols/testing,now 1.39-1 all [installed,automatic] +wget/testing,now 1.24.5-2+b1 amd64 [installed] +x11-common/testing,now 1:7.7+24 all [installed,automatic] +x11-xkb-utils/testing,now 7.7+9 amd64 [installed,automatic] +x11proto-dev/testing,now 2024.1-1 all [installed,automatic] +xauth/testing,now 1:1.1.2-1.1 amd64 [installed,automatic] +xdg-user-dirs/testing,now 0.18-2 amd64 [installed,automatic] +xkb-data/testing,now 2.42-1 all [installed,automatic] +xml-core/testing,now 0.19 all [installed,automatic] +xorg-sgml-doctools/testing,now 1:1.11-1.1 all [installed,automatic] +xtrans-dev/testing,now 1.4.0-1 all [installed,automatic] +xz-utils/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +zlib1g-dev/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +zlib1g/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +Errors detected in the build 0 +Warnings detected in the logs 96 +cppcheck defects detected in the logs 28 +TOTAL warnings detected in the logs 124 diff --git a/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/stats.html b/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/stats.html new file mode 100644 index 0000000..a805ba6 --- /dev/null +++ b/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/stats.html @@ -0,0 +1,180 @@ + + + + + + Cppcheck - HTML report - libcafekbd (cppcheck 2.16.0-1) + + + + + +
+ + + +
+

Top 10 files for error severity, total findings: 2
+   1  libcafekbd/cafekbd-status.c
+   1  libcafekbd/cafekbd-indicator.c
+

+

Top 10 files for style severity, total findings: 20
+   13  libcafekbd/cafekbd-keyboard-drawing.c
+   6   libcafekbd/cafekbd-keyboard-config.c
+   1   test/cafekbd-status-test.c
+

+

Top 10 files for information severity, total findings: 5
+   1  test/cafekbd-keyboard-drawing-test.c
+   1  libcafekbd/cafekbd-keyboard-drawing.c
+   1  libcafekbd/cafekbd-keyboard-config.c
+   1  libcafekbd/cafekbd-indicator-config.c
+   1  libcafekbd/cafekbd-desktop-config.c
+

+ +
+ +
+ + diff --git a/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/style.css b/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/style.css new file mode 100644 index 0000000..3897bfa --- /dev/null +++ b/2025-02-06-165554-7340-cppcheck@28c310f42d33_master/style.css @@ -0,0 +1,177 @@ + +body { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; + font-size: 13px; + line-height: 1.5; + height: 100%; + margin: 0; +} + +#wrapper { + position: fixed; + height: 100vh; + width: 100vw; + display: grid; + grid-template-rows: fit-content(8rem) auto fit-content(8rem); + grid-template-columns: fit-content(25%) 1fr; + grid-template-areas: + "header header" + "menu content" + "footer footer"; +} + +h1 { + margin: 0 0 8px -2px; + font-size: 175%; +} + +.header { + padding: 0 0 5px 15px; + grid-area: header; + border-bottom: thin solid #aaa; +} + +.footer { + grid-area: footer; + border-top: thin solid #aaa; + font-size: 85%; + +} + +.footer > p { + margin: 4px; +} + +#menu, +#menu_index { + grid-area: menu; + text-align: left; + overflow: auto; + padding: 0 23px 15px 15px; + border-right: thin solid #aaa; + min-width: 200px; +} + +#menu > a { + display: block; + margin-left: 10px; + font-size: 12px; +} + +#content, +#content_index { + grid-area: content; + padding: 0px 5px 15px 15px; + overflow: auto; +} + +label { + white-space: nowrap; +} + +label.checkBtn.disabled { + color: #606060; + background: #e0e0e0; + font-style: italic; +} + +label.checkBtn, input[type="text"] { + border: 1px solid grey; + border-radius: 4px; + box-shadow: 1px 1px inset; + padding: 1px 5px; +} + +label.checkBtn { + white-space: nowrap; + background: #ccddff; +} + +label.unchecked { + background: #eff8ff; + box-shadow: 1px 1px 1px; +} + +label.checkBtn:hover, label.unchecked:hover{ + box-shadow: 0 0 2px; +} + +label.disabled:hover { + box-shadow: 1px 1px inset; +} + +label.checkBtn > input { + display:none; +} + +.summaryTable { + width: 100%; +} + +table.summaryTable td { padding: 0 5px 0 5px; } + +.statHeader, .severityHeader { + font-weight: bold; +} + +.warning { + background-color: #ffffa7; +} + +.error { + background-color: #ffb7b7; +} + +.error2 { + background-color: #faa; + display: inline-block; + margin-left: 4px; +} + +.inconclusive { + background-color: #b6b6b4; +} + +.inconclusive2 { + background-color: #b6b6b4; + display: inline-block; + margin-left: 4px; +} + +.verbose { + display: inline-block; + vertical-align: top; + cursor: help; +} + +.verbose .content { + display: none; + position: absolute; + padding: 10px; + margin: 4px; + max-width: 40%; + white-space: pre-wrap; + border: 1px solid #000; + background-color: #ffffcc; + cursor: auto; +} + +.highlight .hll { + padding: 1px; +} + +.highlighttable { + background-color: #fff; + position: relative; + margin: -10px; +} + +.linenos { + border-right: thin solid #aaa; + color: #d3d3d3; + padding-right: 6px; +} + +.id-filtered, .severity-filtered, .file-filtered, .tool-filtered, .text-filtered { + visibility: collapse; +} diff --git a/index.html b/index.html new file mode 100644 index 0000000..0c568ba --- /dev/null +++ b/index.html @@ -0,0 +1,51 @@ + + + + + + libcafekbd Code Analyzer results + + +

+ cafe-desktop/libcafekbd Static analyzer results +

+ GitHub + Build Status +
+Commit: 28c310f42d337eadca7386aeed5be91417c339a2
+Compare:
+Branch: master
+Time: 2025-02-06 16:55:54+00:00
+Messages:
+
+Release 2.0.0
+
+Logs
+
+Warnings: 124
+
+ +31M + + diff --git a/output_28c310f42d337eadca7386aeed5be91417c339a2 b/output_28c310f42d337eadca7386aeed5be91417c339a2 new file mode 100644 index 0000000..8079998 --- /dev/null +++ b/output_28c310f42d337eadca7386aeed5be91417c339a2 @@ -0,0 +1,1866 @@ +Checking libcafekbd/cafekbd-desktop-config.c ... +libcafekbd/cafekbd-desktop-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +1/10 files checked 4% done +Checking libcafekbd/cafekbd-indicator-config.c ... +libcafekbd/cafekbd-indicator-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +2/10 files checked 10% done +Checking libcafekbd/cafekbd-indicator.c ... +libcafekbd/cafekbd-indicator.c:66:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdIndicator, cafekbd_indicator, CTK_TYPE_NOTEBOOK) +^ +3/10 files checked 24% done +Checking libcafekbd/cafekbd-keyboard-config.c ... +libcafekbd/cafekbd-keyboard-config.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-config.c:67:8: style: Condition '*l1' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:67:15: style: Condition '*l2' is always true [knownConditionTrueFalse] + if (*l1 && *l2) { + ^ +libcafekbd/cafekbd-keyboard-config.c:227:16: style: Condition 'option!=NULL' is always true [knownConditionTrueFalse] + (option != NULL) ? strchr (option, ':') : NULL; + ^ +libcafekbd/cafekbd-keyboard-config.c:282:18: style: Condition 'variant==NULL' is always false [knownConditionTrueFalse] + (variant == + ^ +libcafekbd/cafekbd-keyboard-config.c:226:10: style: Variable 'delim' can be declared as pointer to const [constVariablePointer] + char *delim = + ^ +libcafekbd/cafekbd-keyboard-config.c:609:65: style: Parameter 'kbd_config' can be declared as pointer to const [constParameterPointer] +cafekbd_keyboard_config_options_is_set (CafekbdKeyboardConfig * kbd_config, + ^ +4/10 files checked 36% done +Checking libcafekbd/cafekbd-keyboard-drawing.c ... +libcafekbd/cafekbd-keyboard-drawing.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +libcafekbd/cafekbd-keyboard-drawing.c:61:60: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_coord (CafekbdKeyboardDrawingRenderContext * context, gint n) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:67:61: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +xkb_to_pixmap_double (CafekbdKeyboardDrawingRenderContext * context, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:625:51: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] +set_markup (CafekbdKeyboardDrawingRenderContext * context, gchar *txt) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1026:11: style: Variable 'runp' can be declared as pointer to const [constVariablePointer] + GSList *runp; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1036:25: style: Variable 'geometry' can be declared as pointer to const [constVariablePointer] + PangoGlyphGeometry *geometry; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1202:39: style: Parameter 'outline' can be declared as pointer to const [constParameterPointer] +calc_origin_offset_x (XkbOutlineRec * outline) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1397:15: style: Variable 'shape' can be declared as pointer to const [constVariablePointer] + XkbShapeRec *shape; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: style: Parameter 'drawing' can be declared as pointer to const. However it seems that 'button_press_event' is a callback function, if 'drawing' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2343:18: note: You might need to cast the function pointer here + G_CALLBACK (button_press_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1786:31: note: Parameter 'drawing' can be declared as pointer to const + CafekbdKeyboardDrawing *drawing) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: style: Parameter 'event' can be declared as pointer to const. However it seems that 'focus_event' is a callback function, if 'event' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2347:18: note: You might need to cast the function pointer here + G_CALLBACK (focus_event), drawing); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1823:31: note: Parameter 'event' can be declared as pointer to const + CdkEventFocus *event, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: style: Parameter 'a' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'a' is declared with const you might also need to cast function pointer(s). [constParameterCallback] +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1838:64: note: Parameter 'a' can be declared as pointer to const +compare_keyboard_item_priorities (CafekbdKeyboardDrawingItem * a, + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: style: Parameter 'b' can be declared as pointer to const. However it seems that 'compare_keyboard_item_priorities' is a callback function, if 'b' is declared with const you might also need to cast function pointer(s). [constParameterCallback] + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2049:13: note: You might need to cast the function pointer here + compare_keyboard_item_priorities); + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1839:36: note: Parameter 'b' can be declared as pointer to const + CafekbdKeyboardDrawingItem * b) + ^ +libcafekbd/cafekbd-keyboard-drawing.c:1863:9: style: Variable 'pind' can be declared as pointer to const [constVariablePointer] + Atom *pind = drawing->xkb->names->indicators; + ^ +libcafekbd/cafekbd-keyboard-drawing.c:2124:60: style: Parameter 'iev' can be declared as pointer to const [constParameterPointer] +process_indicators_state_notify (XkbIndicatorNotifyEvent * iev, + ^ +Checking libcafekbd/cafekbd-keyboard-drawing.c: KBDRAW_DEBUG... +5/10 files checked 77% done +Checking libcafekbd/cafekbd-status.c ... +libcafekbd/cafekbd-status.c:82:1: error: There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it. [unknownMacro] +G_DEFINE_TYPE (CafekbdStatus, cafekbd_status, CTK_TYPE_STATUS_ICON) +^ +6/10 files checked 91% done +Checking libcafekbd/cafekbd-util.c ... +7/10 files checked 93% done +Checking test/cafekbd-indicator-test.c ... +8/10 files checked 94% done +Checking test/cafekbd-keyboard-drawing-test.c ... +test/cafekbd-keyboard-drawing-test.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] + +^ +Checking test/cafekbd-keyboard-drawing-test.c: HAVE_CONFIG_H... +9/10 files checked 99% done +Checking test/cafekbd-status-test.c ... +test/cafekbd-status-test.c:42:17: style: Variable 'icon' can be declared as pointer to const [constVariablePointer] + CtkStatusIcon *icon; + ^ +10/10 files checked 100% done +nofile:0:0: information: Active checkers: There was critical errors (use --checkers-report= to see details) [checkersReport] + +/usr/bin/cafe-autogen +checking for autoreconf >= 2.53... + testing autoreconf... found 2.72 +checking for pkg-config >= 0.14.0... + testing pkg-config... found 1.8.1 +checking for cafe-common >= 0.0.1... + testing cafe-doc-common... found 2.0.0 +Checking for required M4 macros... +Checking for forbidden M4 macros... +Processing ./configure.ac +Running cafe-doc-common... +Running autoreconf... +autoreconf: export WARNINGS=no-portability +autoreconf: Entering directory '.' +autoreconf: running: autopoint --force +Copying file ABOUT-NLS +Copying file config.rpath +Copying file m4/codeset.m4 +Copying file m4/extern-inline.m4 +Copying file m4/fcntl-o.m4 +Copying file m4/gettext.m4 +Copying file m4/glibc2.m4 +Copying file m4/glibc21.m4 +Copying file m4/iconv.m4 +Copying file m4/intdiv0.m4 +Copying file m4/intl.m4 +Copying file m4/intldir.m4 +Copying file m4/intlmacosx.m4 +Copying file m4/intmax.m4 +Copying file m4/inttypes-pri.m4 +Copying file m4/inttypes_h.m4 +Copying file m4/lcmessage.m4 +Copying file m4/lib-ld.m4 +Copying file m4/lib-link.m4 +Copying file m4/lib-prefix.m4 +Copying file m4/lock.m4 +Copying file m4/longlong.m4 +Copying file m4/nls.m4 +Copying file m4/po.m4 +Copying file m4/printf-posix.m4 +Copying file m4/progtest.m4 +Copying file m4/size_max.m4 +Copying file m4/stdint_h.m4 +Copying file m4/threadlib.m4 +Copying file m4/uintmax_t.m4 +Copying file m4/visibility.m4 +Copying file m4/wchar_t.m4 +Copying file m4/wint_t.m4 +Copying file m4/xsize.m4 +Copying file po/Makefile.in.in +Copying file po/Makevars.template +Copying file po/Rules-quot +Copying file po/boldquot.sed +Copying file po/en@boldquot.header +Copying file po/en@quot.header +Copying file po/insert-header.sin +Copying file po/quot.sed +Copying file po/remove-potcdate.sin +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: configure.ac: tracing +autoreconf: running: libtoolize --copy --force +libtoolize: putting auxiliary files in '.'. +libtoolize: copying file './ltmain.sh' +libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. +libtoolize: copying file 'm4/libtool.m4' +libtoolize: copying file 'm4/ltoptions.m4' +libtoolize: copying file 'm4/ltsugar.m4' +libtoolize: copying file 'm4/ltversion.m4' +libtoolize: copying file 'm4/lt~obsolete.m4' +autoreconf: configure.ac: not using Intltool +autoreconf: configure.ac: not using Gtkdoc +autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS} +autoreconf: running: /usr/bin/autoconf --force +autoreconf: running: /usr/bin/autoheader --force +autoreconf: running: automake --add-missing --copy --force-missing +configure.ac:31: installing './compile' +configure.ac:34: installing './config.guess' +configure.ac:34: installing './config.sub' +configure.ac:16: installing './install-sh' +configure.ac:16: installing './missing' +Makefile.am: installing './INSTALL' +libcafekbd/Makefile.am: installing './depcomp' +autoreconf: Leaving directory '.' +Skipping configure process. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +checking for a BSD-compatible install... /usr/bin/install -c +checking whether sleep supports fractional seconds... yes +checking filesystem timestamp resolution... 0.01 +checking whether build environment is sane... yes +checking for a race-free mkdir -p... /usr/bin/mkdir -p +checking for gawk... no +checking for mawk... mawk +checking whether make sets $(MAKE)... yes +checking whether make supports nested variables... yes +checking xargs -n works... yes +checking whether make supports the include directive... yes (GNU style) +checking for gcc... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the C compiler works... yes +checking for C compiler default output file name... a.out +checking for suffix of executables... +checking whether we are cross compiling... no +checking for suffix of object files... o +checking whether the compiler supports GNU C... yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... rm: cannot remove 'conftest.plist': Is a directory +yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... gcc3 +checking whether C compiler accepts -Werror=unknown-warning-option... no +checking whether C compiler accepts -Wall... yes +checking whether C compiler accepts -Wmissing-prototypes... yes +checking whether C compiler accepts -Wbad-function-cast... yes +checking whether C compiler accepts -Wcast-align... yes +checking whether C compiler accepts -Wextra... yes +checking whether C compiler accepts -Wformat-nonliteral... yes +checking whether C compiler accepts -Wmissing-declarations... yes +checking whether C compiler accepts -Wnested-externs... yes +checking whether C compiler accepts -Wpointer-arith... yes +checking whether C compiler accepts -Wredundant-decls... yes +checking whether C compiler accepts -Wshadow... yes +checking whether C compiler accepts -Wstrict-prototypes... yes +checking whether C compiler accepts -Wunused-macros... yes +checking whether C compiler accepts -Werror=format-security... yes +checking whether C compiler accepts -fstrict-aliasing... yes +checking flags to pass to the C compiler /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing +checking for gcc... (cached) /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer +checking whether the compiler supports GNU C... (cached) yes +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer accepts -g... (cached) yes +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to enable C11 features... (cached) none needed +checking whether /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer understands -c and -o together... (cached) yes +checking dependency style of /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... (cached) gcc3 +checking build system type... x86_64-pc-linux-gnu +checking host system type... x86_64-pc-linux-gnu +checking how to print strings... printf +checking for a sed that does not truncate output... /usr/bin/sed +checking for grep that handles long lines and -e... /usr/bin/grep +checking for egrep... /usr/bin/grep -E +checking for fgrep... /usr/bin/grep -F +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld +checking if the linker (/usr/bin/ld) is GNU ld... yes +checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B +checking the name lister (/usr/bin/nm -B) interface... rm: cannot remove 'conftest.plist': Is a directory +BSD nm +checking whether ln -s works... yes +checking the maximum length of command line arguments... 3145728 +checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop +checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop +checking for /usr/bin/ld option to reload object files... -r +checking for file... file +checking for objdump... objdump +checking how to recognize dependent libraries... pass_all +checking for dlltool... no +checking how to associate runtime and link libraries... printf %s\n +checking for ranlib... ranlib +checking for ar... ar +checking for archiver @FILE support... rm: cannot remove 'conftest.plist': Is a directory +@ +checking for strip... strip +checking command to parse /usr/bin/nm -B output from /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer object... rm: cannot remove 'conftest.plist': Is a directory +ok +checking for sysroot... no +checking for a working dd... /usr/bin/dd +checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1 +checking for mt... no +checking if : is a manifest tool... no +checking for stdio.h... yes +checking for stdlib.h... yes +checking for string.h... yes +checking for inttypes.h... yes +checking for stdint.h... yes +checking for strings.h... yes +checking for sys/stat.h... yes +checking for sys/types.h... yes +checking for unistd.h... yes +checking for dlfcn.h... yes +checking for objdir... .libs +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -fno-rtti -fno-exceptions... no +checking for /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer option to produce PIC... -fPIC -DPIC +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer PIC flag -fPIC -DPIC works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer static flag -static works... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... yes +checking if /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer supports -c -o file.o... (cached) yes +checking whether the /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes +checking whether -lc should be explicitly linked in... no +checking dynamic linker characteristics... GNU/Linux ld.so +checking how to hardcode library paths into programs... immediate +checking whether stripping libraries is possible... yes +checking if libtool supports shared libraries... yes +checking whether to build shared libraries... yes +checking whether to build static libraries... yes +checking whether NLS is requested... yes +checking for msgfmt... /usr/bin/msgfmt +checking for gmsgfmt... /usr/bin/msgfmt +checking for xgettext... /usr/bin/xgettext +checking for msgmerge... /usr/bin/msgmerge +checking for ld used by /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer... /usr/bin/ld -m elf_x86_64 +checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes +checking for shared library run path origin... done +checking how to run the C preprocessor... /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer -E +checking for egrep -e... (cached) /usr/bin/grep -E +checking for CFPreferencesCopyAppValue... no +checking for CFLocaleCopyCurrent... no +checking for GNU gettext in libc... yes +checking whether to use NLS... yes +checking where the gettext function comes from... libc +checking for glib-compile-resources... /usr/bin/glib-compile-resources +checking for xmllint... /usr/bin/xmllint +checking for setlocale... yes +checking for pkg-config... /usr/bin/pkg-config +checking pkg-config is at least version 0.9.0... yes +checking for glib-2.0 >= 2.50.0... yes +checking for gmodule-2.0... yes +checking for gio-2.0 >= 2.25.0... yes +checking for cdk-3.0 >= 3.22.0... yes +checking for ctk+-3.0 >= 3.22.0 cdk-x11-3.0 >= 3.22.0... yes +checking for libxklavier >= 5.2... yes +checking for X... libraries , headers +checking for gethostbyname... yes +checking for connect... yes +checking for remove... yes +checking for shmat... yes +checking for IceConnectionNumber in -lICE... yes +checking for pkg-config... (cached) /usr/bin/pkg-config +checking pkg-config is at least version 0.16... yes +checking for library containing sqrt... -lm +checking for gobject-introspection... yes +checking that generated files are newer than configure... done +configure: creating ./config.status +config.status: creating Makefile +config.status: creating libcafekbd.pc +config.status: creating libcafekbdui.pc +config.status: creating po/Makefile.in +config.status: creating libcafekbd/Makefile +config.status: creating libcafekbd/org.cafe.peripherals-keyboard-xkb.gschema.xml +config.status: creating test/Makefile +config.status: creating config.h +config.status: executing depfiles commands +config.status: executing libtool commands +config.status: executing po-directories commands +config.status: creating po/POTFILES +config.status: creating po/Makefile + +Configuration: + + prefix: /usr + exec_prefix: ${prefix} + libdir: ${exec_prefix}/lib + bindir: ${exec_prefix}/bin + sbindir: ${exec_prefix}/sbin + sysconfdir: ${prefix}/etc + datadir: ${datarootdir} + source code location: . + compiler: /usr/share/clang/scan-build-19/bin/../libexec/ccc-analyzer + cflags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + Warning flags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wunused-macros -Werror=format-security -fstrict-aliasing + +scan-build: Analysis run complete. +scan-build: Removing directory '/tmp/scan-build-2025-02-06-165410-11857-1' because it contains no reports. +scan-build: No bugs found. +scan-build: Using '/usr/lib/llvm-19/bin/clang' for static analysis +make all-recursive +make[1]: Entering directory '/rootdir' +Making all in po +make[2]: Entering directory '/rootdir/po' +make libcafekbd.pot-update +make[3]: Entering directory '/rootdir/po' +sed -e '/^#/d' remove-potcdate.sin > t-remove-potcdate.sed +mv t-remove-potcdate.sed remove-potcdate.sed +package_gnu=""; \ +test -n "$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L .. -maxdepth 1 -type f \ + -size -10000000c -exec grep 'GNU libcafekbd' \ + /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU libcafekbd' ../* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ +}; \ +if test "$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ +else \ + package_prefix=''; \ +fi; \ +if test -n '' || test 'https://github.com/cafe-desktop/libcafekbd' = '@'PACKAGE_BUGREPORT'@'; then \ + msgid_bugs_address=''; \ +else \ + msgid_bugs_address='https://github.com/cafe-desktop/libcafekbd'; \ +fi; \ +case `/usr/bin/xgettext --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ + *) \ + /usr/bin/xgettext --default-domain=libcafekbd --directory=.. \ + --add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: \ + --files-from=./POTFILES.in \ + --copyright-holder='CAFE Desktop Environment team' \ + --package-name="${package_prefix}libcafekbd" \ + --package-version='2.0.0' \ + --msgid-bugs-address="$msgid_bugs_address" \ + ;; \ +esac +test ! -f libcafekbd.po || { \ + if test -f ./libcafekbd.pot-header; then \ + sed -e '1,/^#$/d' < libcafekbd.po > libcafekbd.1po && \ + cat ./libcafekbd.pot-header libcafekbd.1po > libcafekbd.po; \ + rm -f libcafekbd.1po; \ + fi; \ + if test -f ./libcafekbd.pot; then \ + sed -f remove-potcdate.sed < ./libcafekbd.pot > libcafekbd.1po && \ + sed -f remove-potcdate.sed < libcafekbd.po > libcafekbd.2po && \ + if cmp libcafekbd.1po libcafekbd.2po >/dev/null 2>&1; then \ + rm -f libcafekbd.1po libcafekbd.2po libcafekbd.po; \ + else \ + rm -f libcafekbd.1po libcafekbd.2po ./libcafekbd.pot && \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ + else \ + mv libcafekbd.po ./libcafekbd.pot; \ + fi; \ +} +make[3]: Leaving directory '/rootdir/po' +test ! -f ./libcafekbd.pot || \ + test -z "af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo" || make af.gmo am.gmo an.gmo ar.gmo as.gmo ast.gmo az.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo br.gmo bs.gmo ca.gmo ca@valencia.gmo cmn.gmo crh.gmo cs.gmo csb.gmo cv.gmo cy.gmo da.gmo de.gmo de_CH.gmo dz.gmo el.gmo en_AU.gmo en_CA.gmo en_GB.gmo eo.gmo es.gmo es_419.gmo es_AR.gmo es_CL.gmo es_CO.gmo es_CR.gmo es_DO.gmo es_EC.gmo es_ES.gmo es_MX.gmo es_NI.gmo es_PA.gmo es_PE.gmo es_PR.gmo es_SV.gmo es_US.gmo es_UY.gmo es_VE.gmo et.gmo eu.gmo fa.gmo fi.gmo fil.gmo fo.gmo fr.gmo fr_CA.gmo frp.gmo fur.gmo fy.gmo ga.gmo gd.gmo gl.gmo gu.gmo ha.gmo he.gmo hi.gmo hr.gmo hu.gmo hy.gmo ia.gmo id.gmo ie.gmo ig.gmo is.gmo it.gmo ja.gmo jv.gmo ka.gmo kab.gmo kk.gmo km.gmo kn.gmo ko.gmo ks.gmo ku.gmo ku_IQ.gmo ky.gmo la.gmo lb.gmo li.gmo lo.gmo lt.gmo lv.gmo mai.gmo mg.gmo mi.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo my.gmo nah.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nqo.gmo nso.gmo oc.gmo om.gmo or.gmo pa.gmo pl.gmo pms.gmo ps.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo rw.gmo sc.gmo sco.gmo si.gmo sk.gmo sl.gmo so.gmo sq.gmo sr.gmo sr@latin.gmo sv.gmo sw.gmo ta.gmo te.gmo tg.gmo th.gmo tk.gmo tl.gmo tr.gmo ts.gmo tt.gmo ug.gmo uk.gmo ur.gmo ur_PK.gmo uz.gmo vi.gmo wa.gmo xh.gmo yi.gmo yo.gmo zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo +make[3]: Entering directory '/rootdir/po' +/usr/bin/msgmerge --update --quiet --lang=am am.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=af af.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=an an.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=as as.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ar ar.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ast ast.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=az az.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bg bg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=be be.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn bn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=br br.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bs bs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=bn_IN bn_IN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca ca.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ca@valencia ca@valencia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cmn cmn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=crh crh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cs cs.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=csb csb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cv cv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=cy cy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=da da.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de_CH de_CH.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=de de.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=dz dz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=el el.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_AU en_AU.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_CA en_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=en_GB en_GB.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eo eo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es es.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_419 es_419.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_AR es_AR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CL es_CL.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CO es_CO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_CR es_CR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_DO es_DO.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_EC es_EC.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_ES es_ES.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_MX es_MX.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_NI es_NI.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PA es_PA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PE es_PE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_PR es_PR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_SV es_SV.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_US es_US.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_UY es_UY.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=es_VE es_VE.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=eu eu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=et et.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fa fa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fi fi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fil fil.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fo fo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr fr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fr_CA fr_CA.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=frp frp.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fur fur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=fy fy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ga ga.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gd gd.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gl gl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=gu gu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ha ha.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=he he.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hi hi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hr hr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hu hu.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=hy hy.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ia ia.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=id id.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ie ie.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ig ig.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=is is.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=it it.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=jv jv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ja ja.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ka ka.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kab kab.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kn kn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=kk kk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ko ko.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=km km.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ks ks.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ky ky.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku ku.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=la la.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ku_IQ ku_IQ.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lb lb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=li li.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lo lo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lt lt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=lv lv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mai mai.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mg mg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mi mi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mk mk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ml ml.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mn mn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=mr mr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ms ms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=my my.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nah nah.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nb nb.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nds nds.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ne ne.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nl nl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nn nn.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nqo nqo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=nso nso.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=oc oc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=or or.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=om om.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pa pa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pl pl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pms pms.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ps ps.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt pt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=pt_BR pt_BR.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ro ro.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ru ru.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sc sc.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sco sco.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=rw rw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=si si.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sk sk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sl sl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sq sq.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=so so.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr sr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sv sv.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sr@latin sr@latin.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=sw sw.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=te te.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ta ta.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=th th.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tg tg.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tk tk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tl tl.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tr tr.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ts ts.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=tt tt.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ug ug.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uk uk.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur ur.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=ur_PK ur_PK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=uz uz.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=vi vi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=xh xh.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yo yo.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=yi yi.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=wa wa.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_CN zh_CN.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_HK zh_HK.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zh_TW zh_TW.po libcafekbd.pot +/usr/bin/msgmerge --update --quiet --lang=zu zu.po libcafekbd.pot +rm -f af.gmo && /usr/bin/msgfmt -c --statistics --verbose -o af.gmo af.po +af.po: 7 translated messages, 84 untranslated messages. +rm -f am.gmo && /usr/bin/msgfmt -c --statistics --verbose -o am.gmo am.po +rm -f an.gmo && /usr/bin/msgfmt -c --statistics --verbose -o an.gmo an.po +rm -f as.gmo && /usr/bin/msgfmt -c --statistics --verbose -o as.gmo as.po +am.po: 54 translated messages, 37 untranslated messages. +rm -f ar.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ar.gmo ar.po +an.po:7: warning: header field 'Last-Translator' still has the initial default value +an.po: 0 translated messages, 91 untranslated messages. +rm -f az.gmo && /usr/bin/msgfmt -c --statistics --verbose -o az.gmo az.po +as.po: 41 translated messages, 50 untranslated messages. +rm -f ast.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ast.gmo ast.po +rm -f be.gmo && /usr/bin/msgfmt -c --statistics --verbose -o be.gmo be.po +ar.po: 50 translated messages, 41 untranslated messages. +az.po: 9 translated messages, 82 untranslated messages. +ast.po: 47 translated messages, 44 untranslated messages. +rm -f bg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bg.gmo bg.po +be.po: rm -f br.gmo && /usr/bin/msgfmt -c --statistics --verbose -o br.gmo br.po +46 translated messages, 45 untranslated messages. +bg.po: 54 translated messages, 37 untranslated messages. +rm -f bn_IN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn_IN.gmo bn_IN.po +rm -f bn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bn.gmo bn.po +rm -f bs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o bs.gmo bs.po +br.po: 20 translated messages, 71 untranslated messages. +bn_IN.po: 41 translated messages, 50 untranslated messages. +rm -f ca.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca.gmo ca.po +bs.po: 25 translated messages, 66 untranslated messages. +bn.po: 43 translated messages, 48 untranslated messages. +rm -f ca@valencia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ca@valencia.gmo ca@valencia.po +rm -f cmn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cmn.gmo cmn.po +rm -f crh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o crh.gmo crh.po +ca.po: 87 translated messages, 4 untranslated messages. +ca@valencia.po: 54 translated messages, 37 untranslated messages. +rm -f cs.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cs.gmo cs.po +cmn.po: 46 translated messages, 45 untranslated messages. +rm -f csb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o csb.gmo csb.po +crh.po: 11 translated messages, 80 untranslated messages. +rm -f cv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cv.gmo cv.po +rm -f cy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o cy.gmo cy.po +cs.po: 81 translated messages, 10 untranslated messages. +rm -f da.gmo && /usr/bin/msgfmt -c --statistics --verbose -o da.gmo da.po +cv.po: 0 translated messages, 91 untranslated messages. +csb.po:7: warning: header field 'Last-Translator' still has the initial default value +cy.po: csb.po: 26 translated messages, 65 untranslated messages. +0 translated messages, 91 untranslated messages. +da.po: 91 translated messages. +rm -f de.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de.gmo de.po +rm -f de_CH.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de_CH.gmo de_CH.po +rm -f dz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o dz.gmo dz.po +rm -f en_AU.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_AU.gmo en_AU.po +rm -f el.gmo && /usr/bin/msgfmt -c --statistics --verbose -o el.gmo el.po +de.po: de_CH.po: 0 translated messages, 91 untranslated messages. +76 translated messages, 15 untranslated messages. +en_AU.po: 54 translated messages, 37 untranslated messages. +el.po: 54 translated messages, 37 untranslated messages. +dz.po: 39 translated messages, 52 untranslated messages. +rm -f en_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_CA.gmo en_CA.po +rm -f en_GB.gmo && /usr/bin/msgfmt -c --statistics --verbose -o en_GB.gmo en_GB.po +rm -f eo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eo.gmo eo.po +rm -f es.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es.gmo es.po +rm -f es_419.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_419.gmo es_419.po +eo.po: 52 translated messages, 39 untranslated messages. +en_GB.po: 54 translated messages, 37 untranslated messages. +en_CA.po: 10 translated messages, 81 untranslated messages. +es_419.po: 0 translated messages, 91 untranslated messages. +es.po: 89 translated messages, 2 untranslated messages. +rm -f es_AR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_AR.gmo es_AR.po +rm -f es_CO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CO.gmo es_CO.po +rm -f es_CL.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CL.gmo es_CL.po +rm -f es_DO.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_DO.gmo es_DO.po +rm -f es_CR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_CR.gmo es_CR.po +es_AR.po: 21 translated messages, 70 untranslated messages. +es_CO.po: 49 translated messages, 42 untranslated messages. +es_CL.po: 3 translated messages, 88 untranslated messages. +es_DO.po: 1 translated message, 90 untranslated messages. +rm -f es_EC.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_EC.gmo es_EC.po +rm -f es_ES.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_ES.gmo es_ES.po +es_CR.po: 1 translated message, 90 untranslated messages. +rm -f es_MX.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_MX.gmo es_MX.po +rm -f es_NI.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_NI.gmo es_NI.po +es_EC.po: 1 translated message, 90 untranslated messages. +es_MX.po: 1 translated message, 90 untranslated messages. +es_ES.po: 1 translated message, 90 untranslated messages. +rm -f es_PA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PA.gmo es_PA.po +es_NI.po: 1 translated message, 90 untranslated messages. +rm -f es_PE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PE.gmo es_PE.po +rm -f es_PR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_PR.gmo es_PR.po +rm -f es_SV.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_SV.gmo es_SV.po +es_PA.po: 1 translated message, 90 untranslated messages. +rm -f es_US.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_US.gmo es_US.po +es_PE.po: 1 translated message, 90 untranslated messages. +es_SV.po: 1 translated message, 90 untranslated messages. +es_PR.po: 1 translated message, 90 untranslated messages. +rm -f es_UY.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_UY.gmo es_UY.po +es_US.po: 0 translated messages, 91 untranslated messages. +rm -f es_VE.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es_VE.gmo es_VE.po +rm -f et.gmo && /usr/bin/msgfmt -c --statistics --verbose -o et.gmo et.po +rm -f eu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o eu.gmo eu.po +rm -f fa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fa.gmo fa.po +es_UY.po: 1 translated message, 90 untranslated messages. +es_VE.po: 1 translated message, 90 untranslated messages. +et.po: 54 translated messages, 37 untranslated messages. +rm -f fi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fi.gmo fi.po +rm -f fil.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fil.gmo fil.po +eu.po: 54 translated messages, 37 untranslated messages. +fa.po: 11 translated messages, 80 untranslated messages. +rm -f fo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fo.gmo fo.po +fi.po: 48 translated messages, 43 untranslated messages. +fil.po: 0 translated messages, 91 untranslated messages. +rm -f fr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr.gmo fr.po +rm -f fr_CA.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr_CA.gmo fr_CA.po +rm -f frp.gmo && /usr/bin/msgfmt -c --statistics --verbose -o frp.gmo frp.po +fo.po: 0 translated messages, 91 untranslated messages. +rm -f fur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fur.gmo fur.po +fr.po: 67 translated messages, 24 untranslated messages. +fr_CA.po: 3 translated messages, 88 untranslated messages. +frp.po: 7 translated messages, 84 untranslated messages. +fur.po: 4 translated messages, 87 untranslated messages. +rm -f fy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fy.gmo fy.po +rm -f ga.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ga.gmo ga.po +rm -f gd.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gd.gmo gd.po +rm -f gl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gl.gmo gl.po +fy.po: 4 translated messages, 87 untranslated messages. +rm -f gu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o gu.gmo gu.po +gd.po: 0 translated messages, 91 untranslated messages. +ga.po: 41 translated messages, 50 untranslated messages. +gl.po: 89 translated messages, 2 untranslated messages. +rm -f ha.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ha.gmo ha.po +gu.po: 43 translated messages, 48 untranslated messages. +rm -f he.gmo && /usr/bin/msgfmt -c --statistics --verbose -o he.gmo he.po +rm -f hr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hr.gmo hr.po +rm -f hi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hi.gmo hi.po +rm -f hu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hu.gmo hu.po +ha.po: 5 translated messages, 86 untranslated messages. +hi.po: 45 translated messages, 46 untranslated messages. +hr.po: 54 translated messages, 37 untranslated messages. +he.po: 54 translated messages, 37 untranslated messages. +hu.po: 54 translated messages, 37 untranslated messages. +rm -f ia.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ia.gmo ia.po +rm -f ie.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ie.gmo ie.po +rm -f hy.gmo && /usr/bin/msgfmt -c --statistics --verbose -o hy.gmo hy.po +rm -f id.gmo && /usr/bin/msgfmt -c --statistics --verbose -o id.gmo id.po +rm -f ig.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ig.gmo ig.po +ie.po: 45 translated messages, 46 untranslated messages. +ia.po: id.po: hy.po: 54 translated messages, 37 untranslated messages. +3 translated messages, 88 untranslated messages. +91 translated messages. +ig.po: 5 translated messages, 86 untranslated messages. +rm -f ja.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ja.gmo ja.po +rm -f is.gmo && /usr/bin/msgfmt -c --statistics --verbose -o is.gmo is.po +rm -f jv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o jv.gmo jv.po +rm -f it.gmo && /usr/bin/msgfmt -c --statistics --verbose -o it.gmo it.po +rm -f ka.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ka.gmo ka.po +ja.po: 54 translated messages, 37 untranslated messages. +is.po: 12 translated messages, 79 untranslated messages. +jv.po: 2 translated messages, 89 untranslated messages. +it.po: 91 translated messages. +ka.po: 37 translated messages, 54 untranslated messages. +rm -f kab.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kab.gmo kab.po +rm -f kk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kk.gmo kk.po +rm -f km.gmo && /usr/bin/msgfmt -c --statistics --verbose -o km.gmo km.po +rm -f kn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o kn.gmo kn.po +rm -f ko.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ko.gmo ko.po +km.po:7: warning: header field 'Last-Translator' still has the initial default value +kk.po: km.po: 0 translated messages, 91 untranslated messages. +24 translated messages, 67 untranslated messages. +kab.po: 4 translated messages, 87 untranslated messages. +kn.po: 43 translated messages, 48 untranslated messages. +ko.po: rm -f ks.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ks.gmo ks.po +54 translated messages, 37 untranslated messages. +rm -f ku_IQ.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku_IQ.gmo ku_IQ.po +rm -f ku.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ku.gmo ku.po +rm -f ky.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ky.gmo ky.po +rm -f la.gmo && /usr/bin/msgfmt -c --statistics --verbose -o la.gmo la.po +ks.po: 3 translated messages, 88 untranslated messages. +ku.po: 10 translated messages, 81 untranslated messages. +ku_IQ.po: 16 translated messages, 75 untranslated messages. +ky.po: 26 translated messages, 65 untranslated messages. +rm -f lb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lb.gmo lb.po +la.po: 2 translated messages, 89 untranslated messages. +rm -f li.gmo && /usr/bin/msgfmt -c --statistics --verbose -o li.gmo li.po +rm -f lo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lo.gmo lo.po +rm -f lt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lt.gmo lt.po +lb.po:7: warning: header field 'Last-Translator' still has the initial default value +lb.po: 0 translated messages, 91 untranslated messages. +rm -f lv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o lv.gmo lv.po +li.po:7: warning: header field 'Last-Translator' still has the initial default value +li.po: 0 translated messages, 91 untranslated messages. +lo.po:7: warning: header field 'Last-Translator' still has the initial default value +lo.po: 0 translated messages, 91 untranslated messages. +lt.po: 91 translated messages. +lv.po: 49 translated messages, 42 untranslated messages. +rm -f mai.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mai.gmo mai.po +rm -f mg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mg.gmo mg.po +rm -f mi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mi.gmo mi.po +rm -f ml.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ml.gmo ml.po +rm -f mk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mk.gmo mk.po +mai.po: 18 translated messages, 73 untranslated messages. +mg.po: 10 translated messages, 81 untranslated messages. +ml.po: 41 translated messages, 50 untranslated messages. +mi.po:7: warning: header field 'Last-Translator' still has the initial default value +mi.po: 0 translated messages, 91 untranslated messages. +mk.po: 39 translated messages, 52 untranslated messages. +rm -f mr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mr.gmo mr.po +rm -f mn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o mn.gmo mn.po +rm -f ms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ms.gmo ms.po +rm -f my.gmo && /usr/bin/msgfmt -c --statistics --verbose -o my.gmo my.po +mn.po: 10 translated messages, 81 untranslated messages. +mr.po: 47 translated messages, 44 untranslated messages. +rm -f nah.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nah.gmo nah.po +my.po:7: warning: header field 'Last-Translator' still has the initial default value +ms.po: 91 translated messages. +my.po: 0 translated messages, 91 untranslated messages. +nah.po: rm -f nb.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nb.gmo nb.po +0 translated messages, 91 untranslated messages. +rm -f ne.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ne.gmo ne.po +rm -f nds.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nds.gmo nds.po +rm -f nl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nl.gmo nl.po +rm -f nn.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nn.gmo nn.po +nb.po: 91 translated messages. +ne.po: 13 translated messages, 78 untranslated messages. +nds.po: 12 translated messages, 79 untranslated messages. +nl.po: 91 translated messages. +rm -f nqo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nqo.gmo nqo.po +rm -f nso.gmo && /usr/bin/msgfmt -c --statistics --verbose -o nso.gmo nso.po +rm -f oc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o oc.gmo oc.po +nn.po: 40 translated messages, 51 untranslated messages. +rm -f om.gmo && /usr/bin/msgfmt -c --statistics --verbose -o om.gmo om.po +nqo.po: 0 translated messages, 91 untranslated messages. +oc.po: 68 translated messages, 23 untranslated messagesrm -f or.gmo && /usr/bin/msgfmt -c --statistics --verbose -o or.gmo or.po +. +nso.po: 3 translated messages, 88 untranslated messages. +om.po: 0 translated messages, 91 untranslated messages. +rm -f pa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pa.gmo pa.po +rm -f pl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pl.gmo pl.po +rm -f pms.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pms.gmo pms.po +or.po: 41 translated messages, 50 untranslated messages. +pa.po: 46 translated messages, 45 untranslated messages. +rm -f ps.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ps.gmo ps.po +pl.po: 55 translated messages, 36 untranslated messages. +rm -f pt_BR.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt_BR.gmo pt_BR.po +rm -f pt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o pt.gmo pt.po +pms.po: 3 translated messages, 88 untranslated messages. +ps.po: 6 translated messages, 85 untranslated messages. +rm -f ro.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ro.gmo ro.po +pt_BR.po: 58 translated messages, 33 untranslated messages. +pt.po: 84 translated messages, 7 untranslated messages. +rm -f ru.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ru.gmo ru.po +ro.po: 54 translated messages, 37 untranslated messages. +rm -f rw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o rw.gmo rw.po +rm -f sco.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sco.gmo sco.po +rm -f sc.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sc.gmo sc.po +rm -f si.gmo && /usr/bin/msgfmt -c --statistics --verbose -o si.gmo si.po +ru.po: 89 translated messages, 2 untranslated messages. +rm -f sk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sk.gmo sk.po +si.po: rw.po: 36 translated messages10 translated messages, 81 untranslated messages. +, 55 untranslated messages. +sc.po: 2 translated messages, 89 untranslated messages. +sco.po: 0 translated messages, 91 untranslated messages. +rm -f sl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sl.gmo sl.po +rm -f so.gmo && /usr/bin/msgfmt -c --statistics --verbose -o so.gmo so.po +rm -f sq.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sq.gmo sq.po +sk.po: 54 translated messages, 37 untranslated messages. +rm -f sr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr.gmo sr.po +sl.po: 55 translated messages, 36 untranslated messages. +rm -f sr@latin.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sr@latin.gmo sr@latin.po +so.po: 0 translated messages, 91 untranslated messages. +sq.po: 52 translated messages, 39 untranslated messages. +rm -f sv.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sv.gmo sv.po +rm -f sw.gmo && /usr/bin/msgfmt -c --statistics --verbose -o sw.gmo sw.po +sr.po: 91 translated messages. +sr@latin.po: 46 translated messages, 45 untranslated messages. +rm -f ta.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ta.gmo ta.po +sv.po: 80 translated messages, 11 untranslated messages. +rm -f te.gmo && /usr/bin/msgfmt -c --statistics --verbose -o te.gmo te.po +sw.po: 0 translated messages, 91 untranslated messages. +rm -f tg.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tg.gmo tg.po +te.po: ta.po: 46 translated messages, 45 untranslated messages. +41 translated messages, 50 untranslated messages. +rm -f tk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tk.gmo tk.po +rm -f th.gmo && /usr/bin/msgfmt -c --statistics --verbose -o th.gmo th.po +tg.po: 0 translated messages, 91 untranslated messages. +rm -f tl.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tl.gmo tl.po +rm -f tr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tr.gmo tr.po +tk.po: 7 translated messages, 84 untranslated messages. +th.po: 45 translated messages, 46 untranslated messages. +rm -f ts.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ts.gmo ts.po +tl.po: 0 translated messages, 91 untranslated messages. +tr.po: ts.po: rm -f ug.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ug.gmo ug.po +0 translated messages, 91 untranslated messages. +58 translated messages, 33 untranslated messages. +rm -f tt.gmo && /usr/bin/msgfmt -c --statistics --verbose -o tt.gmo tt.po +rm -f ur.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur.gmo ur.po +rm -f uk.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uk.gmo uk.po +rm -f ur_PK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o ur_PK.gmo ur_PK.po +ug.po: tt.po:7: warning: 6 translated messages, 85 untranslated messages. +header field 'Last-Translator' still has the initial default value +tt.po: 0 translated messages, 91 untranslated messages. +ur.po: 7 translated messages, 84 untranslated messages. +uk.po: 58 translated messages, 33 untranslated messages. +ur_PK.po:7: warning: rm -f vi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o vi.gmo vi.po +header field 'Last-Translator' still has the initial default value +ur_PK.po: 0 translated messages, 91 untranslated messages. +rm -f uz.gmo && /usr/bin/msgfmt -c --statistics --verbose -o uz.gmo uz.po +rm -f wa.gmo && /usr/bin/msgfmt -c --statistics --verbose -o wa.gmo wa.po +rm -f yi.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yi.gmo yi.po +rm -f xh.gmo && /usr/bin/msgfmt -c --statistics --verbose -o xh.gmo xh.po +vi.po: 52 translated messages, 39 untranslated messages. +uz.po: 26 translated messages, 65 untranslated messages. +wa.po: 9 translated messages, 82 untranslated messages. +yi.po:7: warning: header field 'Last-Translator' still has the initial default value +yi.po: 0 translated messages, 91 untranslated messages. +xh.po: 8 translated messages, 83 untranslated messages. +rm -f zh_HK.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_HK.gmo zh_HK.po +rm -f zh_CN.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_CN.gmo zh_CN.po +rm -f yo.gmo && /usr/bin/msgfmt -c --statistics --verbose -o yo.gmo yo.po +rm -f zu.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zu.gmo zu.po +rm -f zh_TW.gmo && /usr/bin/msgfmt -c --statistics --verbose -o zh_TW.gmo zh_TW.po +zh_HK.po: 47 translated messages, 44 untranslated messages. +yo.po: 5 translated messages, 86 untranslated messages. +zh_CN.po: 63 translated messages, 28 untranslated messages. +zu.po: 3 translated messages, 88 untranslated messages. +zh_TW.po: 91 translated messages. +make[3]: Leaving directory '/rootdir/po' +touch stamp-po +make[2]: Leaving directory '/rootdir/po' +Making all in libcafekbd +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml + GEN cafekbd-indicator-marshal.h + GEN cafekbd-keyboard-drawing-marshal.h +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +INFO: Reading ./cafekbd-indicator-marshal.list... +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... + GEN cafekbd-indicator-marshal.c + GEN cafekbd-keyboard-drawing-marshal.c +INFO: Reading ./cafekbd-indicator-marshal.list... +INFO: Reading ./cafekbd-keyboard-drawing-marshal.list... +make all-am +make[3]: Entering directory '/rootdir/libcafekbd' + CC libcafekbd_la-cafekbd-desktop-config.lo + CC libcafekbd_la-cafekbd-keyboard-config.lo + CC libcafekbd_la-cafekbd-util.lo + CC libcafekbdui_la-cafekbd-indicator-config.lo + CC libcafekbdui_la-cafekbd-indicator.lo +cafekbd-desktop-config.c: In function 'cafekbd_desktop_config_load_from_gsettings': +cafekbd-desktop-config.c:176:38: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 176 | || config->default_group >= + | ^~ +cafekbd-indicator.c: In function 'cafekbd_indicator_extract_layout_name': +cafekbd-indicator.c:293:19: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 293 | if (group < g_strv_length (short_group_names)) { + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_prepare_drawing': +cafekbd-indicator.c:418:31: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 418 | if (group + 1 == + | ^~ +cafekbd-indicator.c: In function 'cafekbd_indicator_update_tooltips': +cafekbd-indicator.c:446:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 446 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-indicator.c:450:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 450 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-indicator.c: In function 'cafekbd_indicator_kbd_cfg_callback': +cafekbd-indicator.c:61:44: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 61 | CafekbdIndicator * gki = (CafekbdIndicator*)cur->data; + | ^~~ +cafekbd-indicator.c:561:9: note: in expansion of macro 'ForAllIndicators' + 561 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-indicator.c:539:55: note: shadowed declaration is here + 539 | cafekbd_indicator_kbd_cfg_callback (CafekbdIndicator *gki G_GNUC_UNUSED) +cafekbd-indicator.c: In function 'cafekbd_indicator_start_listen': +cafekbd-indicator.c:647:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 647 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:650:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 650 | (CdkFilterFunc) + | ^ +cafekbd-indicator.c: In function 'cafekbd_indicator_stop_listen': +cafekbd-indicator.c:663:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 663 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-indicator.c:667:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 667 | (CdkFilterFunc) cafekbd_indicator_filter_x_evt, NULL); + | ^ +cafekbd-indicator-config.c: In function 'cafekbd_indicator_config_get_images_file': +cafekbd-indicator-config.c:152:59: warning: comparison of integer expressions of different signedness: 'guint' {aka 'unsigned int'} and 'int' [-Wsign-compare] + 152 | (g_strv_length (kbd_config->layouts_variants) > group)) { + | ^ + CC libcafekbdui_la-cafekbd-status.lo +cafekbd-status.c: In function 'cafekbd_status_render_cairo': +cafekbd-status.c:214:23: warning: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 214 | if (group + 1 == xkl_engine_get_num_groups (globals.engine)) { + | ^~ +cafekbd-status.c: In function 'cafekbd_status_prepare_drawing': +cafekbd-status.c:376:51: warning: cast between incompatible function types from 'void (*)(void *)' to 'void (*)(guchar *, void *)' {aka 'void (*)(unsigned char *, void *)'} [-Wcast-function-type] + 376 | (GdkPixbufDestroyNotify) + | ^ +cafekbd-status.c: In function 'cafekbd_status_update_tooltips': +cafekbd-status.c:395:29: warning: comparison of integer expressions of different signedness: 'gint32' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 395 | || state->group >= g_strv_length (globals.full_group_names)) + | ^~ +cafekbd-status.c:399:32: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] + 399 | globals.full_group_names[state->group]); + | ^~~~~~~ +cafekbd-status.c: In function 'cafekbd_status_kbd_cfg_callback': +cafekbd-status.c:77:41: warning: declaration of 'gki' shadows a parameter [-Wshadow] + 77 | CafekbdStatus * gki = (CafekbdStatus*)cur->data; + | ^~~ +cafekbd-status.c:508:9: note: in expansion of macro 'ForAllIndicators' + 508 | ForAllIndicators () { + | ^~~~~~~~~~~~~~~~ +cafekbd-status.c:484:49: note: shadowed declaration is here + 484 | cafekbd_status_kbd_cfg_callback (CafekbdStatus *gki G_GNUC_UNUSED) +cafekbd-status.c: In function 'cafekbd_status_start_listen': +cafekbd-status.c:594:38: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 594 | cdk_window_add_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:597:32: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 597 | (CdkFilterFunc) cafekbd_status_filter_x_evt, + | ^ +cafekbd-status.c: In function 'cafekbd_status_stop_listen': +cafekbd-status.c:610:41: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 610 | cdk_window_remove_filter (NULL, (CdkFilterFunc) + | ^ +cafekbd-status.c:614:14: warning: cast between incompatible function types from 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *)'} to 'CdkFilterReturn (*)(CdkXEvent *, CdkEvent *, void *)' {aka 'CdkFilterReturn (*)(void *, union _CdkEvent *, void *)'} [-Wcast-function-type] + 614 | (CdkFilterFunc) cafekbd_status_filter_x_evt, NULL); + | ^ + CC libcafekbdui_la-cafekbd-indicator-marshal.lo +cafekbd-indicator-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-indicator-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ + CC libcafekbdui_la-cafekbd-keyboard-drawing-marshal.lo +cafekbd-keyboard-drawing-marshal.c:30:9: warning: macro "g_marshal_value_peek_char" is not used [-Wunused-macros] + 30 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:42:9: warning: macro "g_marshal_value_peek_string" is not used [-Wunused-macros] + 42 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:45:9: warning: macro "g_marshal_value_peek_pointer" is not used [-Wunused-macros] + 45 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:47:9: warning: macro "g_marshal_value_peek_variant" is not used [-Wunused-macros] + 47 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:37:9: warning: macro "g_marshal_value_peek_uint64" is not used [-Wunused-macros] + 37 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:35:9: warning: macro "g_marshal_value_peek_ulong" is not used [-Wunused-macros] + 35 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:36:9: warning: macro "g_marshal_value_peek_int64" is not used [-Wunused-macros] + 36 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:33:9: warning: macro "g_marshal_value_peek_uint" is not used [-Wunused-macros] + 33 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:38:9: warning: macro "g_marshal_value_peek_enum" is not used [-Wunused-macros] + 38 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:29:9: warning: macro "g_marshal_value_peek_boolean" is not used [-Wunused-macros] + 29 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:32:9: warning: macro "g_marshal_value_peek_int" is not used [-Wunused-macros] + 32 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int + | ^~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:31:9: warning: macro "g_marshal_value_peek_uchar" is not used [-Wunused-macros] + 31 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:41:9: warning: macro "g_marshal_value_peek_double" is not used [-Wunused-macros] + 41 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:34:9: warning: macro "g_marshal_value_peek_long" is not used [-Wunused-macros] + 34 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:46:9: warning: macro "g_marshal_value_peek_object" is not used [-Wunused-macros] + 46 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:44:9: warning: macro "g_marshal_value_peek_boxed" is not used [-Wunused-macros] + 44 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:40:9: warning: macro "g_marshal_value_peek_float" is not used [-Wunused-macros] + 40 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:43:9: warning: macro "g_marshal_value_peek_param" is not used [-Wunused-macros] + 43 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-marshal.c:39:9: warning: macro "g_marshal_value_peek_flags" is not used [-Wunused-macros] + 39 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + CC libcafekbdui_la-cafekbd-keyboard-drawing.lo +cafekbd-keyboard-drawing.c: In function 'draw_polygon': +cafekbd-keyboard-drawing.c:322:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'} [-Wsign-compare] + 322 | for (i = 0; i < num_points; i++) { + | ^ +cafekbd-keyboard-drawing.c: In function 'process_indicators_state_notify': +cafekbd-keyboard-drawing.c:2131:23: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'long unsigned int' [-Wsign-compare] + 2131 | for (i = 0; i <= drawing->xkb->indicators->phys_indicators; i++) + | ^~ +cafekbd-keyboard-drawing.c: In function 'cafekbd_keyboard_drawing_get_type': +cafekbd-keyboard-drawing.c:2394:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawingClass *)' {aka 'void (*)(struct _CafekbdKeyboardDrawingClass *)'} to 'void (*)(void *, void *)' [-Wcast-function-type] + 2394 | (GClassInitFunc) cafekbd_keyboard_drawing_class_init, + | ^ +cafekbd-keyboard-drawing.c:2399:25: warning: cast between incompatible function types from 'void (*)(CafekbdKeyboardDrawing *)' {aka 'void (*)(struct _CafekbdKeyboardDrawing *)'} to 'void (*)(GTypeInstance *, void *)' {aka 'void (*)(struct _GTypeInstance *, void *)'} [-Wcast-function-type] + 2399 | (GInstanceInitFunc) cafekbd_keyboard_drawing_init, + | ^ + GEN org.cafe.peripherals-keyboard-xkb.gschema.valid + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:114:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 114 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbd.la + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspectq8aoqnje/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectq8aoqnje/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectq8aoqnje/Cafekbd-1.0.c:239:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 239 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspectq8aoqnje/Cafekbd-1.0.c:246:11: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 246 | break; + | ^~~~~ +/rootdir/libcafekbd/tmp-introspectq8aoqnje/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +5 warnings generated. + GICOMP Cafekbd-1.0.gir +make[3]: Leaving directory '/rootdir/libcafekbd' +make[2]: Leaving directory '/rootdir/libcafekbd' +Making all in test +make[2]: Entering directory '/rootdir/test' + CC cafekbd_indicator_test-cafekbd-indicator-test.o + CC cafekbd_keyboard_drawing_test-cafekbd-keyboard-drawing-test.o + CC cafekbd_status_test-cafekbd-status-test.o + CCLD cafekbd-indicator-test +cafekbd-keyboard-drawing-test.c:187:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 187 | g_print ("kbdraw %s\n", VERSION); + | ^~~~~~~ +cafekbd-keyboard-drawing-test.c:194:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 194 | g_printerr ("--groups: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:199:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 199 | g_printerr ("--levels: invalid argument\n"); + | ^~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:225:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 225 | cafekbd_keyboard_drawing_set_track_modifiers + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:228:3: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 228 | cafekbd_keyboard_drawing_set_track_config + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cafekbd-keyboard-drawing-test.c:248:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 248 | names.keycodes = keycodes; + | ^~~~~~~~ +cafekbd-keyboard-drawing-test.c:256:21: warning: This statement is never executed [alpha.deadcode.UnreachableCode] + 256 | names.geometry = geometry; + | ^~~~~~~~ +7 warnings generated. + CCLD cafekbd-keyboard-drawing-test + CCLD cafekbd-status-test +make[2]: Leaving directory '/rootdir/test' +make[2]: Entering directory '/rootdir' +make[2]: Leaving directory '/rootdir' +make[1]: Leaving directory '/rootdir' +scan-build: Analysis run complete. +scan-build: 11 bugs found. +scan-build: Run 'scan-view /rootdir/html-report/2025-02-06-165420-14522-1' to examine bug reports. +Making check in po +make[1]: Entering directory '/rootdir/po' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/po' +Making check in libcafekbd +make[1]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + GEN cafekbd-keyboard-drawing-resources.h +make check-am +make[2]: Entering directory '/rootdir/libcafekbd' +/usr/bin/glib-compile-resources --generate-dependencies --sourcedir . ./org.cafe.peripherals.keyboard.gresource.xml +./show-layout.ui + GEN cafekbd-keyboard-drawing-resources.c + CC libcafekbdui_la-cafekbd-keyboard-drawing-resources.lo +cafekbd-keyboard-drawing-resources.c:113:9: warning: macro "__G_CONSTRUCTOR_H__" is not used [-Wunused-macros] + 113 | #define __G_CONSTRUCTOR_H__ + | ^~~~~~~~~~~~~~~~~~~ + CCLD libcafekbdui.la + GISCAN Cafekbd-1.0.gir +/rootdir/libcafekbd/tmp-introspectdvb8b8x7/Cafekbd-1.0.c:89:13: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectdvb8b8x7/Cafekbd-1.0.c:89:13: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] + 89 | ret = fread (&byte, 1, 1, input); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +/rootdir/libcafekbd/tmp-introspectdvb8b8x7/Cafekbd-1.0.c:812:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference] + 812 | g_printerr ("%s\n", error->message); + | ^~~~~~~~~~~~~~ +3 warnings generated. + GICOMP Cafekbd-1.0.gir +make[2]: Leaving directory '/rootdir/libcafekbd' +make[1]: Leaving directory '/rootdir/libcafekbd' +Making check in test +make[1]: Entering directory '/rootdir/test' +make[1]: Nothing to be done for 'check'. +make[1]: Leaving directory '/rootdir/test' +make[1]: Entering directory '/rootdir' +make[1]: Leaving directory '/rootdir' + Listing... 0% Listing... 0% Listing... 0% adduser/testing,now 3.137 all [installed,automatic] +advaita-icon-theme/unknown,now 3.25.0-1 all [installed,automatic] +apt/testing,now 2.9.26 amd64 [installed,automatic] +aptitude-common/testing,now 0.8.13-6.1 all [installed,automatic] +aptitude/testing,now 0.8.13-6.1 amd64 [installed] +at-spi2-common/testing,now 2.55.0.1-1 all [installed,automatic] +at-spi2-core/testing,now 2.55.0.1-1 amd64 [installed,automatic] +autoconf-archive/testing,now 20220903-3 all [installed] +autoconf/testing,now 2.72-3 all [installed,automatic] +automake/testing,now 1:1.17-3 all [installed,automatic] +autopoint/testing,now 0.23.1-1 all [installed] +autotools-dev/testing,now 20220109.1 all [installed,automatic] +base-files/testing,now 13.6 amd64 [installed,automatic] +base-passwd/testing,now 3.6.6 amd64 [installed,automatic] +bash/testing,now 5.2.37-1 amd64 [installed,automatic] +binfmt-support/testing,now 2.2.2-7 amd64 [installed,automatic] +binutils-common/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils-gold-x86-64-linux-gnu/testing,now 2.44-1 amd64 [installed,automatic] +binutils-gold/testing,now 2.44-1 amd64 [installed,automatic] +binutils-x86-64-linux-gnu/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +binutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +bsdutils/testing,now 1:2.40.4-2 amd64 [installed,automatic] +build-essential/testing,now 12.12 amd64 [installed,automatic] +bzip2-doc/testing,now 1.0.8-6 all [installed,automatic] +bzip2/testing,now 1.0.8-6 amd64 [installed,automatic] +ca-certificates/testing,now 20241223 all [installed,automatic] +clang-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +clang-tools/testing,now 1:19.0-63 amd64 [installed] +clang/testing,now 1:19.0-63 amd64 [installed] +coreutils/testing,now 9.5-1+b1 amd64 [installed,automatic] +cpp-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-14/testing,now 14.2.0-12 amd64 [installed,automatic] +cpp-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cpp/testing,now 4:14.2.0-1 amd64 [installed,automatic] +cppcheck/testing,now 2.16.0-1 amd64 [installed] +ctk-update-icon-cache/unknown,now 3.25.6-1 amd64 [installed,automatic] +dash/testing,now 0.5.12-12 amd64 [installed,automatic] +dbus-bin/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-daemon/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus-session-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-system-bus-common/testing,now 1.16.0-1 all [installed,automatic] +dbus-user-session/testing,now 1.16.0-1 amd64 [installed,automatic] +dbus/testing,now 1.16.0-1 amd64 [installed,automatic] +dconf-gsettings-backend/testing,now 0.40.0-5 amd64 [installed,automatic] +dconf-service/testing,now 0.40.0-5 amd64 [installed,automatic] +debconf/testing,now 1.5.89 all [installed,automatic] +debian-archive-keyring/testing,now 2023.4 all [installed,automatic] +debianutils/testing,now 5.21 amd64 [installed,automatic] +diffutils/testing,now 1:3.10-2 amd64 [installed,automatic] +dirmngr/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +dmsetup/testing,now 2:1.02.201-1 amd64 [installed,automatic] +dpkg-dev/testing,now 1.22.14 all [installed,automatic] +dpkg/testing,now 1.22.14 amd64 [installed,automatic] +e2fsprogs/testing,now 1.47.2-1 amd64 [installed,automatic] +expect/testing,now 5.45.4-3+b1 amd64 [installed] +fakeroot/testing,now 1.37-1 amd64 [installed,automatic] +file/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +findutils/testing,now 4.10.0-3 amd64 [installed,automatic] +fontconfig-config/testing,now 2.15.0-2 amd64 [installed,automatic] +fontconfig/testing,now 2.15.0-2 amd64 [installed,automatic] +fonts-dejavu-core/testing,now 2.37-8 all [installed,automatic] +fonts-dejavu-mono/testing,now 2.37-8 all [installed,automatic] +g++-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-14/testing,now 14.2.0-12 amd64 [installed,automatic] +g++-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +g++/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc-14-base/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14-x86-64-linux-gnu/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-14/testing,now 14.2.0-12 amd64 [installed,automatic] +gcc-x86-64-linux-gnu/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gcc/testing,now 4:14.2.0-1 amd64 [installed,automatic] +gettext-base/testing,now 0.23.1-1 amd64 [installed,automatic] +gettext/testing,now 0.23.1-1 amd64 [installed] +gir1.2-atk-1.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-atspi-2.0/testing,now 2.55.0.1-1 amd64 [installed,automatic] +gir1.2-ctk-3.0/unknown,now 3.25.6-1 amd64 [installed] +gir1.2-freedesktop-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-freedesktop/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-gdkpixbuf-2.0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +gir1.2-girepository-2.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-girepository-2.0/testing,now 1.82.0-4 amd64 [installed,automatic] +gir1.2-glib-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-glib-2.0/testing,now 2.82.4-2 amd64 [installed,automatic] +gir1.2-harfbuzz-0.0/testing,now 10.2.0-1 amd64 [installed,automatic] +gir1.2-pango-1.0/testing,now 1.56.1-1 amd64 [installed,automatic] +gir1.2-xkl-1.0/testing,now 5.4-5+b2 amd64 [installed,automatic] +girepository-tools/testing,now 2.82.4-2 amd64 [installed,automatic] +git-man/testing,now 1:2.47.2-0.1 all [installed,automatic] +git/testing,now 1:2.47.2-0.1 amd64 [installed] +gnupg-l10n/testing,now 2.2.46-1 all [installed,automatic] +gnupg-utils/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gnupg/testing,now 2.2.46-1 all [installed,automatic] +gobject-introspection-bin/testing,now 1.82.0-4 amd64 [installed,automatic] +gobject-introspection/testing,now 1.82.0-4 amd64 [installed] +gpg-agent/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg-wks-client/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpg/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgconf/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgsm/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +gpgv/testing,now 2.2.46-1+b1 amd64 [installed,automatic] +grep/testing,now 3.11-4 amd64 [installed,automatic] +gsettings-desktop-schemas/testing,now 47.1-1 all [installed,automatic] +gzip/testing,now 1.13-1 amd64 [installed,automatic] +hicolor-icon-theme/testing,now 0.18-2 all [installed,automatic] +hostname/testing,now 3.25 amd64 [installed,automatic] +icu-devtools/testing,now 72.1-6 amd64 [installed,automatic] +init-system-helpers/testing,now 1.68 all [installed,automatic] +krb5-locales/testing,now 1.21.3-4 all [installed,automatic] +less/testing,now 643-1 amd64 [installed,automatic] +lib32gcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +lib32stdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libacl1/testing,now 2.3.2-2+b1 amd64 [installed,automatic] +libalgorithm-diff-perl/testing,now 1.201-1 all [installed,automatic] +libalgorithm-diff-xs-perl/testing,now 0.04-8+b4 amd64 [installed,automatic] +libalgorithm-merge-perl/testing,now 0.08-5 all [installed,automatic] +libapparmor1/testing,now 3.1.7-1+b3 amd64 [installed,automatic] +libapt-pkg6.0t64/testing,now 2.9.26 amd64 [installed,automatic] +libasan8/testing,now 14.2.0-12 amd64 [installed,automatic] +libassuan9/testing,now 3.0.1-2 amd64 [installed,automatic] +libatk-bridge2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk-bridge2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatk1.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatomic1/testing,now 14.2.0-12 amd64 [installed,automatic] +libatspi2.0-0t64/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libatspi2.0-dev/testing,now 2.55.0.1-1 amd64 [installed,automatic] +libattr1/testing,now 1:2.5.2-2 amd64 [installed,automatic] +libaudit-common/testing,now 1:4.0.2-2 all [installed,automatic] +libaudit1/testing,now 1:4.0.2-2+b1 amd64 [installed,automatic] +libavahi-client3/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common-data/testing,now 0.8-16 amd64 [installed,automatic] +libavahi-common3/testing,now 0.8-16 amd64 [installed,automatic] +libbinutils/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libblkid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libblkid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libboost-iostreams1.83.0/testing,now 1.83.0-4 amd64 [installed,automatic] +libbrotli-dev/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbrotli1/testing,now 1.1.0-2+b6 amd64 [installed,automatic] +libbsd0/testing,now 0.12.2-2 amd64 [installed,automatic] +libbz2-1.0/testing,now 1.0.8-6 amd64 [installed,automatic] +libbz2-dev/testing,now 1.0.8-6 amd64 [installed,automatic] +libc-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc-dev-bin/testing,now 2.40-6 amd64 [installed,automatic] +libc6-dev/testing,now 2.40-6 amd64 [installed,automatic] +libc6-i386/testing,now 2.40-6 amd64 [installed,automatic] +libc6/testing,now 2.40-6 amd64 [installed,automatic] +libcairo-gobject2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo-script-interpreter2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2-dev/testing,now 1.18.2-2 amd64 [installed,automatic] +libcairo2/testing,now 1.18.2-2 amd64 [installed,automatic] +libcap-dev/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcap-ng0/testing,now 0.8.5-4 amd64 [installed,automatic] +libcap2/testing,now 1:2.66-5+b1 amd64 [installed,automatic] +libcbor0.10/testing,now 0.10.2-2 amd64 [installed,automatic] +libcc1-0/testing,now 14.2.0-12 amd64 [installed,automatic] +libclang-common-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-cpp19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang-rt-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libclang1-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +libcolord2/testing,now 1.4.7-1+b2 amd64 [installed,automatic] +libcom-err2/testing,now 1.47.2-1 amd64 [installed,automatic] +libcrypt-dev/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcrypt1/testing,now 1:4.4.38-1 amd64 [installed,automatic] +libcryptsetup12/testing,now 2:2.7.5-1 amd64 [installed,automatic] +libctf-nobfd0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctf0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libctk-3-0/unknown,now 3.25.6-1 amd64 [installed] +libctk-3-bin/unknown,now 3.25.6-1 amd64 [installed,automatic] +libctk-3-common/unknown,now 3.25.6-1 all [installed] +libctk-3-dev/unknown,now 3.25.6-1 amd64 [installed] +libcups2t64/testing,now 2.4.10-2+b1 amd64 [installed,automatic] +libcurl3t64-gnutls/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcurl4t64/testing,now 8.11.1-1+b1 amd64 [installed,automatic] +libcwidget4/testing,now 0.5.18-6+b2 amd64 [installed,automatic] +libdatrie-dev/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdatrie1/testing,now 0.2.13-3+b1 amd64 [installed,automatic] +libdav1d7/testing,now 1.5.1-1 amd64 [installed,automatic] +libdb5.3t64/testing,now 5.3.28+dfsg2-9 amd64 [installed,automatic] +libdbus-1-3/testing,now 1.16.0-1 amd64 [installed,automatic] +libdbus-1-dev/testing,now 1.16.0-1 amd64 [installed,automatic] +libdconf1/testing,now 0.40.0-5 amd64 [installed,automatic] +libdebconfclient0/testing,now 0.277 amd64 [installed,automatic] +libdeflate-dev/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdeflate0/testing,now 1.23-1+b1 amd64 [installed,automatic] +libdevmapper1.02.1/testing,now 2:1.02.201-1 amd64 [installed,automatic] +libdpkg-perl/testing,now 1.22.14 all [installed,automatic] +libdrm-amdgpu1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-common/testing,now 2.4.123-1 all [installed,automatic] +libdrm-intel1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm-radeon1/testing,now 2.4.123-1 amd64 [installed,automatic] +libdrm2/testing,now 2.4.123-1 amd64 [installed,automatic] +libedit2/testing,now 3.1-20250104-1 amd64 [installed,automatic] +libegl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libegl-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1-mesa-dev/testing,now 24.2.8-1 amd64 [installed,automatic] +libegl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libelf1t64/testing,now 0.192-4 amd64 [installed,automatic] +libepoxy-dev/testing,now 1.5.10-2 amd64 [installed,automatic] +libepoxy0/testing,now 1.5.10-2 amd64 [installed,automatic] +liberror-perl/testing,now 0.17029-2 all [installed,automatic] +libexpat1-dev/testing,now 2.6.4-1 amd64 [installed,automatic] +libexpat1/testing,now 2.6.4-1 amd64 [installed,automatic] +libext2fs2t64/testing,now 1.47.2-1 amd64 [installed,automatic] +libfakeroot/testing,now 1.37-1 amd64 [installed,automatic] +libffi-dev/testing,now 3.4.6-1 amd64 [installed,automatic] +libffi8/testing,now 3.4.6-1 amd64 [installed,automatic] +libfido2-1/testing,now 1.15.0-1+b1 amd64 [installed,automatic] +libfile-fcntllock-perl/testing,now 0.22-4+b4 amd64 [installed,automatic] +libfontconfig-dev/testing,now 2.15.0-2 amd64 [installed,automatic] +libfontconfig1/testing,now 2.15.0-2 amd64 [installed,automatic] +libfreetype-dev/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfreetype6/testing,now 2.13.3+dfsg-1 amd64 [installed,automatic] +libfribidi-dev/testing,now 1.0.16-1 amd64 [installed,automatic] +libfribidi0/testing,now 1.0.16-1 amd64 [installed,automatic] +libgbm1/testing,now 24.2.8-1 amd64 [installed,automatic] +libgc1/testing,now 1:8.2.8-1 amd64 [installed,automatic] +libgcc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcc-s1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgcrypt20/testing,now 1.11.0-7 amd64 [installed,automatic] +libgdbm-compat4t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdbm6t64/testing,now 1.24-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-0/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf-2.0-dev/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-bin/testing,now 2.42.12+dfsg-2 amd64 [installed,automatic] +libgdk-pixbuf2.0-common/testing,now 2.42.12+dfsg-2 all [installed,automatic] +libgio-2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libgio-2.0-dev/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository-1.0-1/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-1.0-dev/testing,now 1.82.0-4 amd64 [installed,automatic] +libgirepository-2.0-0/testing,now 2.82.4-2 amd64 [installed,automatic] +libgirepository1.0-dev/testing,now 1.82.0-4 amd64 [installed] +libgl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgl1-mesa-dri/testing,now 24.2.8-1 amd64 [installed,automatic] +libgl1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglapi-mesa/testing,now 24.2.8-1 amd64 [installed,automatic] +libgles-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles1/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgles2/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglib2.0-0t64/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-data/testing,now 2.82.4-2 all [installed,automatic] +libglib2.0-dev-bin/testing,now 2.82.4-2 amd64 [installed,automatic] +libglib2.0-dev/testing,now 2.82.4-2 amd64 [installed] +libglvnd-core-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglvnd0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libglx-mesa0/testing,now 24.2.8-1 amd64 [installed,automatic] +libglx0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libgmp10/testing,now 2:6.3.0+dfsg-3 amd64 [installed,automatic] +libgnutls30t64/testing,now 3.8.8-2 amd64 [installed,automatic] +libgomp1/testing,now 14.2.0-12 amd64 [installed,automatic] +libgpg-error-l10n/testing,now 1.51-3 all [installed,automatic] +libgpg-error0/testing,now 1.51-3 amd64 [installed,automatic] +libgpm2/testing,now 1.20.7-11+b2 amd64 [installed,automatic] +libgprofng0/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libgraphite2-3/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgraphite2-dev/testing,now 1.3.14-2+b1 amd64 [installed,automatic] +libgssapi-krb5-2/testing,now 1.21.3-4 amd64 [installed,automatic] +libharfbuzz-cairo0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-dev/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-gobject0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-icu0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz-subset0/testing,now 10.2.0-1 amd64 [installed,automatic] +libharfbuzz0b/testing,now 10.2.0-1 amd64 [installed,automatic] +libhogweed6t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libhwasan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libice-dev/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libice6/testing,now 2:1.1.1-1 amd64 [installed,automatic] +libicu-dev/testing,now 72.1-6 amd64 [installed,automatic] +libicu72/testing,now 72.1-6 amd64 [installed,automatic] +libidn2-0/testing,now 2.3.7-2+b1 amd64 [installed,automatic] +libisl23/testing,now 0.27-1 amd64 [installed,automatic] +libitm1/testing,now 14.2.0-12 amd64 [installed,automatic] +libjansson4/testing,now 2.14-2+b3 amd64 [installed,automatic] +libjbig-dev/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjbig0/testing,now 2.1-6.1+b2 amd64 [installed,automatic] +libjpeg-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo-dev/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjpeg62-turbo/testing,now 1:2.1.5-3+b1 amd64 [installed,automatic] +libjson-c5/testing,now 0.18+ds-1 amd64 [installed,automatic] +libk5crypto3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkeyutils1/testing,now 1.6.3-4 amd64 [installed,automatic] +libkmod2/testing,now 33+20240816-2 amd64 [installed,automatic] +libkrb5-3/testing,now 1.21.3-4 amd64 [installed,automatic] +libkrb5support0/testing,now 1.21.3-4 amd64 [installed,automatic] +libksba8/testing,now 1.6.7-2+b1 amd64 [installed,automatic] +liblcms2-2/testing,now 2.16-2 amd64 [installed,automatic] +libldap-common/testing,now 2.6.9+dfsg-1 all [installed,automatic] +libldap2/testing,now 2.6.9+dfsg-1 amd64 [installed,automatic] +liblerc-dev/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +liblerc4/testing,now 4.0.0+ds-5 amd64 [installed,automatic] +libllvm19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +liblocale-gettext-perl/testing,now 1.07-7+b1 amd64 [installed,automatic] +liblsan0/testing,now 14.2.0-12 amd64 [installed,automatic] +libltdl-dev/testing,now 2.5.4-3 amd64 [installed,automatic] +libltdl7/testing,now 2.5.4-3 amd64 [installed,automatic] +liblz4-1/testing,now 1.10.0-3 amd64 [installed,automatic] +liblzma-dev/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzma5/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +liblzo2-2/testing,now 2.10-3+b1 amd64 [installed,automatic] +libmagic-mgc/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmagic1t64/testing,now 1:5.45-3+b1 amd64 [installed,automatic] +libmd0/testing,now 1.1.0-2+b1 amd64 [installed,automatic] +libmount-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +libmount1/testing,now 2.40.4-2 amd64 [installed,automatic] +libmpc3/testing,now 1.3.1-1+b3 amd64 [installed,automatic] +libmpfr6/testing,now 4.2.1-1+b2 amd64 [installed,automatic] +libncurses-dev/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncurses6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libncursesw6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libnettle8t64/testing,now 3.10-1+b1 amd64 [installed,automatic] +libnghttp2-14/testing,now 1.64.0-1 amd64 [installed,automatic] +libnghttp3-9/testing,now 1.6.0-2 amd64 [installed,automatic] +libngtcp2-16/testing,now 1.9.1-1 amd64 [installed,automatic] +libngtcp2-crypto-gnutls8/testing,now 1.9.1-1 amd64 [installed,automatic] +libnpth0t64/testing,now 1.8-2 amd64 [installed,automatic] +libnss-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libobjc-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libobjc4/testing,now 14.2.0-12 amd64 [installed,automatic] +libopengl-dev/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libopengl0/testing,now 1.7.0-1+b2 amd64 [installed,automatic] +libp11-kit0/testing,now 0.25.5-3 amd64 [installed,automatic] +libpam-modules-bin/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-modules/testing,now 1.7.0-2 amd64 [installed,automatic] +libpam-runtime/testing,now 1.7.0-2 all [installed,automatic] +libpam-systemd/testing,now 257.2-3 amd64 [installed,automatic] +libpam0g/testing,now 1.7.0-2 amd64 [installed,automatic] +libpango-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpango1.0-dev/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangocairo-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoft2-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpangoxft-1.0-0/testing,now 1.56.1-1 amd64 [installed,automatic] +libpciaccess0/testing,now 0.17-3+b3 amd64 [installed,automatic] +libpcre2-16-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-32-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-8-0/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-dev/testing,now 10.44-5 amd64 [installed,automatic] +libpcre2-posix3/testing,now 10.44-5 amd64 [installed,automatic] +libperl5.40/testing,now 5.40.0-8 amd64 [installed,automatic] +libpfm4/testing,now 4.13.0+git83-g91970fe-1 amd64 [installed,automatic] +libpipeline1/testing,now 1.5.8-1 amd64 [installed,automatic] +libpixman-1-0/testing,now 0.44.0-3 amd64 [installed,automatic] +libpixman-1-dev/testing,now 0.44.0-3 amd64 [installed,automatic] +libpkgconf3/testing,now 1.8.1-4 amd64 [installed,automatic] +libpng-dev/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng-tools/testing,now 1.6.44-3 amd64 [installed,automatic] +libpng16-16t64/testing,now 1.6.44-3 amd64 [installed,automatic] +libproc2-0/testing,now 2:4.0.4-7 amd64 [installed,automatic] +libpsl5t64/testing,now 0.21.2-1.1+b1 amd64 [installed,automatic] +libpython3-stdlib/testing,now 3.13.1-2 amd64 [installed,automatic] +libpython3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libpython3.13-stdlib/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +libquadmath0/testing,now 14.2.0-12 amd64 [installed,automatic] +libreadline8t64/testing,now 8.2-6 amd64 [installed,automatic] +librsvg2-2/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librsvg2-common/testing,now 2.59.1+dfsg-1 amd64 [installed,automatic] +librtmp1/testing,now 2.4+20151223.gitfa8646d.1-2+b5 amd64 [installed,automatic] +libsasl2-2/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules-db/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libsasl2-modules/testing,now 2.1.28+dfsg1-8+b1 amd64 [installed,automatic] +libseccomp2/testing,now 2.5.5-2 amd64 [installed,automatic] +libselinux1-dev/testing,now 3.7-3.1 amd64 [installed,automatic] +libselinux1/testing,now 3.7-3.1 amd64 [installed,automatic] +libsemanage-common/testing,now 3.7-2.1 all [installed,automatic] +libsemanage2/testing,now 3.7-2.1 amd64 [installed,automatic] +libsensors-config/testing,now 1:3.6.0-10 all [installed,automatic] +libsensors5/testing,now 1:3.6.0-10+b1 amd64 [installed,automatic] +libsepol-dev/testing,now 3.7-1 amd64 [installed,automatic] +libsepol2/testing,now 3.7-1 amd64 [installed,automatic] +libsframe1/testing,now 2.43.90.20250127-1 amd64 [installed,automatic] +libsharpyuv-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsharpyuv0/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libsigc++-2.0-0v5/testing,now 2.12.1-3 amd64 [installed,automatic] +libsm-dev/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsm6/testing,now 2:1.2.4-1 amd64 [installed,automatic] +libsmartcols1/testing,now 2.40.4-2 amd64 [installed,automatic] +libsqlite3-0/testing,now 3.46.1-1 amd64 [installed,automatic] +libss2/testing,now 1.47.2-1 amd64 [installed,automatic] +libssh2-1t64/testing,now 1.11.1-1 amd64 [installed,automatic] +libssl3t64/testing,now 3.4.0-2 amd64 [installed,automatic] +libstdc++-14-dev/testing,now 14.2.0-12 amd64 [installed,automatic] +libstdc++6/testing,now 14.2.0-12 amd64 [installed,automatic] +libsysprof-capture-4-dev/testing,now 47.2-1 amd64 [installed,automatic] +libsystemd-dev/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd-shared/testing,now 257.2-3 amd64 [installed,automatic] +libsystemd0/testing,now 257.2-3 amd64 [installed,automatic] +libtasn1-6/testing,now 4.19.0-3+b3 amd64 [installed,automatic] +libtcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +libthai-data/testing,now 0.1.29-2 all [installed,automatic] +libthai-dev/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libthai0/testing,now 0.1.29-2+b1 amd64 [installed,automatic] +libtiff-dev/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiff6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtiffxx6/testing,now 4.5.1+git230720-5 amd64 [installed,automatic] +libtinfo6/testing,now 6.5-2+b1 amd64 [installed,automatic] +libtinyxml2-10/testing,now 10.0.0+dfsg-2+b2 amd64 [installed,automatic] +libtool/testing,now 2.5.4-3 all [installed] +libtsan2/testing,now 14.2.0-12 amd64 [installed,automatic] +libubsan1/testing,now 14.2.0-12 amd64 [installed,automatic] +libudev1/testing,now 257.2-3 amd64 [installed,automatic] +libunistring5/testing,now 1.3-1 amd64 [installed,automatic] +libuuid1/testing,now 2.40.4-2 amd64 [installed,automatic] +libvulkan1/testing,now 1.4.304.0-1 amd64 [installed,automatic] +libwayland-bin/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-client0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-cursor0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-dev/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-egl1/testing,now 1.23.1-1 amd64 [installed,automatic] +libwayland-server0/testing,now 1.23.1-1 amd64 [installed,automatic] +libwebp-dev/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebp7/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdecoder3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpdemux2/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libwebpmux3/testing,now 1.5.0-0.1 amd64 [installed,automatic] +libx11-6/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-data/testing,now 2:1.8.10-2 all [installed,automatic] +libx11-dev/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libx11-xcb1/testing,now 2:1.8.10-2 amd64 [installed,automatic] +libxapian30/testing,now 1.4.25-2 amd64 [installed,automatic] +libxau-dev/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxau6/testing,now 1:1.0.11-1 amd64 [installed,automatic] +libxaw7/testing,now 2:1.0.16-1 amd64 [installed,automatic] +libxcb-dri2-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-dri3-0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-glx0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-present0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-randr0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-render0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-shm0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-sync1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb-xfixes0/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1-dev/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcb1/testing,now 1.17.0-2+b1 amd64 [installed,automatic] +libxcomposite-dev/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcomposite1/testing,now 1:0.4.6-1 amd64 [installed,automatic] +libxcursor-dev/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxcursor1/testing,now 1:1.2.3-1 amd64 [installed,automatic] +libxdamage-dev/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdamage1/testing,now 1:1.1.6-1+b2 amd64 [installed,automatic] +libxdmcp-dev/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxdmcp6/testing,now 1:1.1.5-1 amd64 [installed,automatic] +libxext-dev/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxext6/testing,now 2:1.3.4-1+b3 amd64 [installed,automatic] +libxfixes-dev/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxfixes3/testing,now 1:6.0.0-2+b4 amd64 [installed,automatic] +libxft-dev/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxft2/testing,now 2.3.6-1+b4 amd64 [installed,automatic] +libxi-dev/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxi6/testing,now 2:1.8.2-1 amd64 [installed,automatic] +libxinerama-dev/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxinerama1/testing,now 2:1.1.4-3+b3 amd64 [installed,automatic] +libxkbcommon-dev/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbcommon0/testing,now 1.7.0-2 amd64 [installed,automatic] +libxkbfile1/testing,now 1:1.1.0-1+b4 amd64 [installed,automatic] +libxklavier-dev/testing,now 5.4-5+b2 amd64 [installed] +libxklavier16/testing,now 5.4-5+b2 amd64 [installed,automatic] +libxml2-dev/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxml2-utils/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed] +libxml2/testing,now 2.12.7+dfsg+really2.9.14-0.2+b1 amd64 [installed,automatic] +libxmu6/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxmuu1/testing,now 2:1.1.3-3+b4 amd64 [installed,automatic] +libxpm4/testing,now 1:3.5.17-1+b3 amd64 [installed,automatic] +libxrandr-dev/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrandr2/testing,now 2:1.5.4-1+b3 amd64 [installed,automatic] +libxrender-dev/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxrender1/testing,now 1:0.9.10-1.1+b4 amd64 [installed,automatic] +libxshmfence1/testing,now 1.3-1+b3 amd64 [installed,automatic] +libxt6t64/testing,now 1:1.2.1-1.2+b2 amd64 [installed,automatic] +libxtst-dev/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxtst6/testing,now 2:1.2.5-1 amd64 [installed,automatic] +libxxf86vm1/testing,now 1:1.1.4-1+b4 amd64 [installed,automatic] +libxxhash0/testing,now 0.8.2-2+b2 amd64 [installed,automatic] +libyaml-0-2/testing,now 0.2.5-2 amd64 [installed,automatic] +libz3-4/testing,now 4.13.3-1 amd64 [installed,automatic] +libz3-dev/testing,now 4.13.3-1 amd64 [installed,automatic] +libzstd-dev/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +libzstd1/testing,now 1.5.6+dfsg-2 amd64 [installed,automatic] +linux-libc-dev/testing,now 6.12.11-1 all [installed,automatic] +linux-sysctl-defaults/testing,now 4.11 all [installed,automatic] +llvm-19-dev/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-linker-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-runtime/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19-tools/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +llvm-19/testing,now 1:19.1.6-1+b1 amd64 [installed,automatic] +login.defs/testing,now 1:4.16.0-7 all [installed,automatic] +login/testing,now 1:4.16.0-2+really2.40.4-2 amd64 [installed,automatic] +logsave/testing,now 1.47.2-1 amd64 [installed,automatic] +m4/testing,now 1.4.19-5 amd64 [installed,automatic] +make/testing,now 4.4.1-1 amd64 [installed] +manpages-dev/testing,now 6.9.1-1 all [installed,automatic] +manpages/testing,now 6.9.1-1 all [installed,automatic] +mawk/testing,now 1.3.4.20240905-1 amd64 [installed,automatic] +media-types/testing,now 10.1.0 all [installed,automatic] +mesa-libgallium/testing,now 24.2.8-1 amd64 [installed,automatic] +mesa-vulkan-drivers/testing,now 24.2.8-1 amd64 [installed,automatic] +mount/testing,now 2.40.4-2 amd64 [installed,automatic] +native-architecture/testing,now 0.2.5 all [installed,automatic] +ncurses-base/testing,now 6.5-2 all [installed,automatic] +ncurses-bin/testing,now 6.5-2+b1 amd64 [installed,automatic] +netbase/testing,now 6.4 all [installed,automatic] +openssh-client/testing,now 1:9.9p1-3 amd64 [installed,automatic] +openssl-provider-legacy/testing,now 3.4.0-2 amd64 [installed,automatic] +openssl/testing,now 3.4.0-2 amd64 [installed,automatic] +pango1.0-tools/testing,now 1.56.1-1 amd64 [installed,automatic] +passwd/testing,now 1:4.16.0-7 amd64 [installed,automatic] +patch/testing,now 2.7.6-7 amd64 [installed,automatic] +perl-base/testing,now 5.40.0-8 amd64 [installed,automatic] +perl-modules-5.40/testing,now 5.40.0-8 all [installed,automatic] +perl/testing,now 5.40.0-8 amd64 [installed,automatic] +pinentry-curses/testing,now 1.3.1-2 amd64 [installed,automatic] +pkgconf-bin/testing,now 1.8.1-4 amd64 [installed,automatic] +pkgconf/testing,now 1.8.1-4 amd64 [installed,automatic] +procps/testing,now 2:4.0.4-7 amd64 [installed,automatic] +psmisc/testing,now 23.7-1 amd64 [installed,automatic] +publicsuffix/testing,now 20250108.1153-0.1 all [installed,automatic] +python3-autocommand/testing,now 2.2.2-3 all [installed,automatic] +python3-inflect/testing,now 7.3.1-2 all [installed,automatic] +python3-jaraco.context/testing,now 6.0.0-1 all [installed,automatic] +python3-jaraco.functools/testing,now 4.1.0-1 all [installed,automatic] +python3-jaraco.text/testing,now 4.0.0-1 all [installed,automatic] +python3-mako/testing,now 1.3.8-2 all [installed,automatic] +python3-markdown/testing,now 3.7-2 all [installed,automatic] +python3-markupsafe/testing,now 2.1.5-1+b2 amd64 [installed,automatic] +python3-minimal/testing,now 3.13.1-2 amd64 [installed,automatic] +python3-more-itertools/testing,now 10.6.0-1 all [installed,automatic] +python3-packaging/testing,now 24.2-1 all [installed,automatic] +python3-pkg-resources/testing,now 75.6.0-1 all [installed,automatic] +python3-pygments/testing,now 2.18.0+dfsg-2 all [installed,automatic] +python3-setuptools/testing,now 75.6.0-1 all [installed,automatic] +python3-typeguard/testing,now 4.4.1-1 all [installed,automatic] +python3-typing-extensions/testing,now 4.12.2-2 all [installed,automatic] +python3-yaml/testing,now 6.0.2-1+b1 amd64 [installed,automatic] +python3-zipp/testing,now 3.21.0-1 all [installed,automatic] +python3.13-minimal/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3.13/testing,now 3.13.1-3+b1 amd64 [installed,automatic] +python3/testing,now 3.13.1-2 amd64 [installed,automatic] +readline-common/testing,now 8.2-6 all [installed,automatic] +rpcsvc-proto/testing,now 1.4.3-1 amd64 [installed,automatic] +sed/testing,now 4.9-2 amd64 [installed,automatic] +sensible-utils/testing,now 0.0.24 all [installed,automatic] +sgml-base/testing,now 1.31 all [installed,automatic] +shared-mime-info/testing,now 2.4-5+b2 amd64 [installed,automatic] +sqv/testing,now 1.2.1-5 amd64 [installed,automatic] +systemd-cryptsetup/testing,now 257.2-3 amd64 [installed,automatic] +systemd-sysv/testing,now 257.2-3 amd64 [installed,automatic] +systemd-timesyncd/testing,now 257.2-3 amd64 [installed,automatic] +systemd/testing,now 257.2-3 amd64 [installed,automatic] +sysvinit-utils/testing,now 3.13-1 amd64 [installed,automatic] +tar/testing,now 1.35+dfsg-3.1 amd64 [installed,automatic] +tcl-expect/testing,now 5.45.4-3+b1 amd64 [installed,automatic] +tcl8.6/testing,now 8.6.16+dfsg-1 amd64 [installed,automatic] +tzdata/testing,now 2024b-6 all [installed,automatic] +util-linux/testing,now 2.40.4-2 amd64 [installed,automatic] +uuid-dev/testing,now 2.40.4-2 amd64 [installed,automatic] +wayland-protocols/testing,now 1.39-1 all [installed,automatic] +wget/testing,now 1.24.5-2+b1 amd64 [installed] +x11-common/testing,now 1:7.7+24 all [installed,automatic] +x11-xkb-utils/testing,now 7.7+9 amd64 [installed,automatic] +x11proto-dev/testing,now 2024.1-1 all [installed,automatic] +xauth/testing,now 1:1.1.2-1.1 amd64 [installed,automatic] +xdg-user-dirs/testing,now 0.18-2 amd64 [installed,automatic] +xkb-data/testing,now 2.42-1 all [installed,automatic] +xml-core/testing,now 0.19 all [installed,automatic] +xorg-sgml-doctools/testing,now 1:1.11-1.1 all [installed,automatic] +xtrans-dev/testing,now 1.4.0-1 all [installed,automatic] +xz-utils/testing,now 5.6.3-1+b1 amd64 [installed,automatic] +zlib1g-dev/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +zlib1g/testing,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed,automatic] +Errors detected in the build 0 +Warnings detected in the logs 96 +cppcheck defects detected in the logs 28 +TOTAL warnings detected in the logs 124