strncat is slow and error-prone, use the git strbuf API instead.
We can steal much of our logic from git/pretty.c::strbuf_add_tabexpand,
but maybe keep the invalid characters for now *shrug*.
---
ui-ssdiff.c | 58 +++--
1 file changed, 25
Hah, bad timing, I just rewrote this myself and was about to push. But
thanks anyway!
___
CGit mailing list
CGit@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/cgit
The following invocation of strncat uses a bogus size and
caused segfaults on my system:
strncat(new_title, ctx.page.title, sizeof(new_title) - strlen(new_title) - 1);
Since str*cat functions are all bug-prone and slow (need to
search for '\0' at every invocation), switch to the safer and
We need to use a non-breaking space entity to preserve
spacing for browsers without CSS support.
---
html.c| 46 ++
html.h| 1 +
ui-diff.c | 5 +
3 files changed, 48 insertions(+), 4 deletions(-)
diff --git a/html.c b/html.c
index
Text-based browsers without CSS support show all the decorations
bunched together without spacing. Rely on a whitespace instead
of CSS support.
---
cgit.css | 1 -
ui-log.c | 5 +
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/cgit.css b/cgit.css
index 9f70d14..6fcd984 100644
Text-based browsers (and some GUI browsers such as dillo) display
the pageheader as:
"summaryrefslogtreecommitdiff"
This is difficult-to-read. Improve accessibility for users who
cannot run memory-hungry browsers by using whitespace instead of
relying on CSS.
---
cgit.css| 1 -
Here are a few changes to improve rendering for people with
low-end machines using text-based browsers (w3m, lynx) or
lightweight GUI browsers such as dillo, which has incomplete CSS
support.
The only incompatible (with existing CSS customisations) change
might be the one to use instead of for