logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git

0001-HACK-Avoid-wide-string-literals-for-now.patch (795B)


  1. From 358e4526a4ed8c5780d4fa43403c5c6e3d92f8bb Mon Sep 17 00:00:00 2001
  2. From: Michael Forney <mforney@mforney.org>
  3. Date: Fri, 31 Jan 2020 23:34:52 -0800
  4. Subject: [PATCH] [HACK] Avoid wide string literals for now
  5. ---
  6. vis-digraph.c | 3 ++-
  7. 1 file changed, 2 insertions(+), 1 deletion(-)
  8. diff --git a/vis-digraph.c b/vis-digraph.c
  9. index 35a5a17..0c23387 100644
  10. --- a/vis-digraph.c
  11. +++ b/vis-digraph.c
  12. @@ -1962,8 +1962,9 @@ int main(int argc, char *argv[]) {
  13. setlocale(LC_ALL, "");
  14. if (argc == 1) {
  15. + static const wchar_t fmt[] = {'%', 's', ' ', '%', 'l', 'c', ' ', '%', 's', '\n', '\0'};
  16. for (const Digraph *d = digraphs; d->name[0]; d++)
  17. - wprintf(L"%s %lc %s\n", d->name, d->rune, d->description);
  18. + wprintf(fmt, d->name, d->rune, d->description);
  19. return 0;
  20. }
  21. --
  22. 2.25.0