opkg

statically linked package installer
git clone anongit@rnpnr.xyz:opkg.git
Log | Files | Refs | Feed | Submodules | README | LICENSE

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 ---
      7  vis-digraph.c | 3 ++-
      8  1 file changed, 2 insertions(+), 1 deletion(-)
      9 
     10 diff --git a/vis-digraph.c b/vis-digraph.c
     11 index 35a5a17..0c23387 100644
     12 --- a/vis-digraph.c
     13 +++ b/vis-digraph.c
     14 @@ -1962,8 +1962,9 @@ int main(int argc, char *argv[]) {
     15  	setlocale(LC_ALL, "");
     16  
     17  	if (argc == 1) {
     18 +		static const wchar_t fmt[] = {'%', 's', ' ', '%', 'l', 'c', ' ', '%', 's', '\n', '\0'};
     19  		for (const Digraph *d = digraphs; d->name[0]; d++)
     20 -			wprintf(L"%s %lc %s\n", d->name, d->rune, d->description);
     21 +			wprintf(fmt, d->name, d->rune, d->description);
     22  		return 0;
     23  	}
     24  
     25 -- 
     26 2.25.0
     27