terminal: move unifont-internal.h to unifont.h
authorDavid Herrmann <dh.herrmann@gmail.com>
Wed, 1 Oct 2014 09:23:02 +0000 (11:23 +0200)
committerDavid Herrmann <dh.herrmann@gmail.com>
Thu, 2 Oct 2014 06:40:43 +0000 (08:40 +0200)
All the definitions are for outside users, so drop the -internal suffix.
Internal definitions are in unifont-def.h and unifont.c, no need to share
those.

Makefile.am
src/libsystemd-terminal/test-unifont.c
src/libsystemd-terminal/unifont-internal.h [deleted file]
src/libsystemd-terminal/unifont.c
src/libsystemd-terminal/unifont.h [new file with mode: 0644]

index 9e087bd9fb5d0509ec8b54a6dbd09b3957012739..da36a8c1c20ebe692abbe8bbe7d9c48bf88dcaf0 100644 (file)
@@ -3059,7 +3059,8 @@ libsystemd_terminal_la_SOURCES = \
        src/libsystemd-terminal/term-parser.c \
        src/libsystemd-terminal/term-screen.c \
        src/libsystemd-terminal/term-wcwidth.c \
-       src/libsystemd-terminal/unifont-internal.h \
+       src/libsystemd-terminal/unifont.h \
+       src/libsystemd-terminal/unifont-def.h \
        src/libsystemd-terminal/unifont.c
 
 libsystemd_terminal_la_LIBADD = \
index 2c415941fb1fa8cc847190946dfd1752b205e270..cfeef61a4712389dd686b9ff0784f3e31eb188d8 100644 (file)
@@ -30,7 +30,7 @@
 #include <string.h>
 #include "macro.h"
 #include "unifont-def.h"
-#include "unifont-internal.h"
+#include "unifont.h"
 #include "util.h"
 
 static void render(char *w, const unifont_glyph *g) {
diff --git a/src/libsystemd-terminal/unifont-internal.h b/src/libsystemd-terminal/unifont-internal.h
deleted file mode 100644 (file)
index c39512d..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
-  This file is part of systemd.
-
-  Copyright (C) 2014 David Herrmann <dh.herrmann@gmail.com>
-
-  systemd 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.1 of the License, or
-  (at your option) any later version.
-
-  systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
-***/
-
-#pragma once
-
-#include <stdbool.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include "util.h"
-
-typedef struct unifont unifont;
-typedef struct unifont_glyph unifont_glyph;
-
-/*
- * Unifont
- * The unifont API provides a glyph-lookup for bitmap fonts which can be used
- * as fallback if no system-font is available or if you don't want to deal with
- * full font renderers.
- */
-
-struct unifont_glyph {
-        unsigned int width;
-        unsigned int height;
-        unsigned int stride;
-        unsigned int cwidth;
-        const void *data;       /* unaligned! */
-};
-
-int unifont_new(unifont **out);
-unifont *unifont_ref(unifont *u);
-unifont *unifont_unref(unifont *u);
-
-DEFINE_TRIVIAL_CLEANUP_FUNC(unifont*, unifont_unref);
-
-unsigned int unifont_get_stride(unifont *u);
-int unifont_lookup(unifont *u, unifont_glyph *out, uint32_t ucs4);
index 9e0f718665fb8b2eda2ac2434dc7efe1d10fbb40..aa91794410ffe92e37e729535619e6926d4426ab 100644 (file)
@@ -37,7 +37,7 @@
 #include <unistd.h>
 #include "macro.h"
 #include "unifont-def.h"
-#include "unifont-internal.h"
+#include "unifont.h"
 #include "util.h"
 
 struct unifont {
diff --git a/src/libsystemd-terminal/unifont.h b/src/libsystemd-terminal/unifont.h
new file mode 100644 (file)
index 0000000..c39512d
--- /dev/null
@@ -0,0 +1,54 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright (C) 2014 David Herrmann <dh.herrmann@gmail.com>
+
+  systemd 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.1 of the License, or
+  (at your option) any later version.
+
+  systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
+***/
+
+#pragma once
+
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include "util.h"
+
+typedef struct unifont unifont;
+typedef struct unifont_glyph unifont_glyph;
+
+/*
+ * Unifont
+ * The unifont API provides a glyph-lookup for bitmap fonts which can be used
+ * as fallback if no system-font is available or if you don't want to deal with
+ * full font renderers.
+ */
+
+struct unifont_glyph {
+        unsigned int width;
+        unsigned int height;
+        unsigned int stride;
+        unsigned int cwidth;
+        const void *data;       /* unaligned! */
+};
+
+int unifont_new(unifont **out);
+unifont *unifont_ref(unifont *u);
+unifont *unifont_unref(unifont *u);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(unifont*, unifont_unref);
+
+unsigned int unifont_get_stride(unifont *u);
+int unifont_lookup(unifont *u, unifont_glyph *out, uint32_t ucs4);