From 73d574b71a10d4661ada20275cafde75aff6c1ba Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Thu, 12 Sep 2024 13:33:18 +0200 Subject: teco_string_get_coord() returns character offsets now (refs #5) * This is used for error messages (TECO macro stackframes), so it's important to display columns in characters. * Program counters are in bytes and therefore everywhere gsize. This is by glib convention. --- src/string-utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/string-utils.h') diff --git a/src/string-utils.h b/src/string-utils.h index 806140e..ebe25d5 100644 --- a/src/string-utils.h +++ b/src/string-utils.h @@ -162,7 +162,7 @@ void undo__teco_string_truncate(teco_string_t *, gsize); gchar *teco_string_echo(const gchar *str, gsize len); -void teco_string_get_coord(const gchar *str, guint pos, guint *line, guint *column); +void teco_string_get_coord(const gchar *str, gsize off, guint *pos, guint *line, guint *column); typedef gsize (*teco_string_diff_t)(const teco_string_t *a, const gchar *b, gsize b_len); gsize teco_string_diff(const teco_string_t *a, const gchar *b, gsize b_len); -- cgit v1.2.3