Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam
2026-04-23 11:58:17 +01:00
22 changed files with 225 additions and 78 deletions

17
tmux.c
View File

@@ -281,6 +281,23 @@ get_timer(void)
return ((ts.tv_sec * 1000ULL) + (ts.tv_nsec / 1000000ULL));
}
char *
clean_name(const char *name, const char* forbid)
{
char *copy, *cp, *new_name;
if (*name == '\0' || !utf8_isvalid(name))
return (NULL);
copy = xstrdup(name);
for (cp = copy; *cp != '\0'; cp++) {
if (strchr(forbid, *cp) != NULL)
*cp = '_';
}
utf8_stravis(&new_name, copy, VIS_OCTAL|VIS_CSTYLE|VIS_TAB|VIS_NL);
free(copy);
return (new_name);
}
const char *
sig2name(int signo)
{