From dcebf9c7f954a55350b68d0ead1935612c4e2e05 Mon Sep 17 00:00:00 2001 From: Berke Güzel Date: Thu, 15 Oct 2026 13:04:01 +0300 Subject: Rename the library to wsap_vtcore ncurses installs and defines struct term. In a file that includes both headers, an ncurses TERMINAL * and this library's terminal are silently the same type. The name wsap_vtcore avoids the clash. The public header is now . Every global symbol uses the wsap_vtcore_ prefix, every macro uses WSAP_VTCORE_, and the shared library is libwsap_vtcore.so.0. The default terminal name is now "wsap_vtcore". The ISA override variable is WSAP_VTCORE_ISA. No other behavior changes. The amalgamation writes wsap_vtcore.c and wsap_vtcore.h. Co-Authored-By: Claude Haiku 5.5 --- src/osc/misc.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/osc/misc.c') diff --git a/src/osc/misc.c b/src/osc/misc.c index 74b35cf..243c2ec 100644 --- a/src/osc/misc.c +++ b/src/osc/misc.c @@ -3,9 +3,9 @@ #include #include -static void osc7_cwd(struct term *t, const char *uri) +static void osc7_cwd(struct wsap_vtcore *t, const char *uri) { - if (!term_has_prefix_ci(uri, "file://")) + if (!wsap_vtcore_has_prefix_ci(uri, "file://")) return; const char *p = uri + 7; const char *slash = strchr(p, '/'); @@ -16,8 +16,8 @@ static void osc7_cwd(struct term *t, const char *uri) char *d = cwd; while (*path) { int hi, lo; - if (*path == '%' && (hi = term_hex_nib(path[1])) >= 0 && - (lo = term_hex_nib(path[2])) >= 0) { + if (*path == '%' && (hi = wsap_vtcore_hex_nib(path[1])) >= 0 && + (lo = wsap_vtcore_hex_nib(path[2])) >= 0) { *d++ = (char)(hi * 16 + lo); path += 3; } else { @@ -29,7 +29,7 @@ static void osc7_cwd(struct term *t, const char *uri) t->cwd = cwd; } -static void osc777_notify(struct term *t, const char *params) +static void osc777_notify(struct wsap_vtcore *t, const char *params) { if (strncmp(params, "notify;", 7)) return; @@ -43,7 +43,7 @@ static void osc777_notify(struct term *t, const char *params) *wsep = ';'; } -void term_osc_misc_dispatch(struct term *t, long code, const char *params) +void wsap_vtcore_osc_misc_dispatch(struct wsap_vtcore *t, long code, const char *params) { if (!params) return; @@ -57,7 +57,7 @@ void term_osc_misc_dispatch(struct term *t, long code, const char *params) break; case 22: free(t->pointer_shape); - t->pointer_shape = *params ? term_strdup(params) : NULL; + t->pointer_shape = *params ? wsap_vtcore_strdup(params) : NULL; break; case 777: if (t->cb.notify) -- cgit v1.2.3