Introduction
Introduction Statistics Contact Development Disclaimer Help
tFix compilation with other versions of pango - ledit - Text editor (WIP)
git clone git://lumidify.org/ledit.git (fast, but not encrypted)
git clone https://lumidify.org/git/ledit.git (encrypted, but very slow)
Log
Files
Refs
README
LICENSE
---
commit aadae71b088e1d224e1f6615524d0cc0d51eae7a
parent beb7f21a8ff254c0869395c85d3166c42f48e532
Author: lumidify <[email protected]>
Date: Mon, 14 Feb 2022 14:09:58 +0100
Fix compilation with other versions of pango
Diffstat:
M keys_basic_config.h | 4 ++--
M ledit.c | 1 +
M memory.h | 6 +++++-
M view.c | 1 +
M window.c | 1 +
5 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/keys_basic_config.h b/keys_basic_config.h
t@@ -9,14 +9,14 @@
enum key_type {
KEY_INVALID = 0,
- KEY_NONE = 2,
+ KEY_NONE = 2, /* FIXME: perhaps rather KEY_EMPTY? */
KEY_MOTION_CHAR = 4,
KEY_MOTION_LINE = 8,
KEY_MOTION = 4|8,
KEY_MOTIONALLOWED = 16,
KEY_NUMBER = 32,
KEY_NUMBERALLOWED = 64,
- KEY_ENSURE_CURSOR_SHOWN = 128, /* jump to cursor if it is off screen */
+ KEY_ENSURE_CURSOR_SHOWN = 128, /* jump to cursor if it is off screen *…
KEY_ANY = 0xFF
};
diff --git a/ledit.c b/ledit.c
t@@ -314,6 +314,7 @@ ledit_emergencydump(void) {
failure doesn't interfere with the abort in the assertion
that calls this function. */
char *template = malloc(len1 + len2 + 1);
+ /* FIXME: print error here */
if (!template)
return;
strcpy(template, orig);
diff --git a/memory.h b/memory.h
t@@ -7,17 +7,21 @@
/*
* These functions all wrap the regular functions but exit on error.
*/
-
char *ledit_strdup(const char *s);
char *ledit_strndup(const char *s, size_t n);
void *ledit_malloc(size_t size);
void *ledit_calloc(size_t nmemb, size_t size);
void *ledit_realloc(void *ptr, size_t size);
+
/*
* This is different than the normal strcat - it allocates memory for
* a new string to hold the concatenation of str1 and str2.
*/
char *ledit_strcat(const char *str1, const char *str2);
+
+/*
+ * This is like OpenBSD's reallocarray but exits on error.
+ */
void *ledit_reallocarray(void *optr, size_t nmemb, size_t size);
/*
diff --git a/view.c b/view.c
t@@ -8,6 +8,7 @@
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <pango/pangoxft.h>
+#include <pango/pango-utils.h> /* for PANGO_VERSION_CHECK */
#include <X11/extensions/Xdbe.h>
#include "util.h"
diff --git a/window.c b/window.c
t@@ -10,6 +10,7 @@
#include <X11/Xutil.h>
#include <X11/cursorfont.h>
#include <pango/pangoxft.h>
+#include <pango/pango-utils.h> /* for PANGO_VERSION_CHECK */
#include <X11/extensions/Xdbe.h>
#include "util.h"
You are viewing proxied material from lumidify.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.