diff --git a/src/support.h b/src/support.h
index 089a6863a541cda36c20d286a1d848020c2368e4..3377f9a8099ed6e97e89399c8f7e65d0a120cf1a 100644 (file)
--- a/src/support.h
+++ b/src/support.h
#ifndef SUPPORT_H
#define SUPPORT_H
+#include <glib.h>
+
#ifdef HAVE_LIBGEN_H
#include <libgen.h>
#endif
char *strcasestr(const char *haystack, const char *needle);
typedef struct {
- int offset;
+ gsize offset;
GTime t; /* GTime is equivalent to time_t */
} scroll_state_t;
char *strscroll(char *str, char *separator, int width, scroll_state_t *st);
void charset_init(gboolean disable);
-char *utf8_to_locale(char *str);
-char *locale_to_utf8(char *str);
+char *utf8_to_locale(const char *str);
+char *locale_to_utf8(const char *str);
+
+/**
+ * Returns the number of terminal cells occupied by this string.
+ */
+size_t my_strlen(const char *str);
-/* number of characters in str */
-size_t my_strlen(char *str);
/* number of bytes in str */
size_t my_strsize(char *str);