Do some more aarch64 fixups

This commit is contained in:
Justine Tunney 2023-05-09 23:35:10 -07:00
parent 86d9323a43
commit 59766efd3e
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
17 changed files with 63 additions and 89 deletions

View file

@ -30,13 +30,17 @@
* @param ti comes from ttyident() and null means no-op
*/
int ttysendtitle(int ttyfd, const char *title, const struct TtyIdent *ti) {
int res;
if (ti) {
char *p;
if (ti->id == kTtyIdScreen) {
return ttysend(ttyfd, gc(xstrcat("\eP\e]0;", title, "\a\e\\")));
res = ttysend(ttyfd, (p = xstrcat("\eP\e]0;", title, "\a\e\\")));
} else {
return ttysend(ttyfd, gc(xstrcat("\e]0;", title, "\a")));
res = ttysend(ttyfd, (p = xstrcat("\e]0;", title, "\a")));
}
free(p);
} else {
return 0;
res = 0;
}
return res;
}