diff options
| author | Berke Güzel <wenekar1@gmail.com> | 2026-10-15 13:04:01 +0300 |
|---|---|---|
| committer | Berke Güzel <wenekar1@gmail.com> | 2026-10-15 13:04:01 +0300 |
| commit | dcebf9c7f954a55350b68d0ead1935612c4e2e05 (patch) | |
| tree | 3eb3e9f6154c6760bcb89a565f8ddc8f8b66cb90 /src/osc/misc.c | |
| parent | bd8222e615134c3ec5e7a07b6b1fa97c9bd4a471 (diff) | |
Rename the library to wsap_vtcore
ncurses installs <term.h> 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 <wsap_vtcore/wsap_vtcore.h>. 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 <noreply@anthropic.com>
Diffstat (limited to 'src/osc/misc.c')
| -rw-r--r-- | src/osc/misc.c | 14 |
1 files changed, 7 insertions, 7 deletions
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 <stdlib.h> #include <string.h> -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) |
