SMOLNET PORTAL home about changes
index: setlocale() because we use multibyte functions - stagit-gopher - static git page generator for gopher
(URL) git clone git://git.codemadness.org/stagit-gopher (git://git.codemadness.org)
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit bbd27612e48b51f37e4e70566ded2007fe48724f
(DIR) parent 9731204482dd309c3de1a1a5055d838f1ec6f899
(URL) Author: Hiltjo Posthuma <hiltjo@codemadness.org> (mailto://) application/vnd.lotus-organizer
Date: Sat, 25 Nov 2017 15:10:31 +0100
index: setlocale() because we use multibyte functions
Diffstat:
M stagit-gopher-index.c | 3 +++
1 file changed, 3 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/stagit-gopher-index.c b/stagit-gopher-index.c
@@ -3,6 +3,7 @@
#include <err.h>
#include <errno.h>
#include <inttypes.h>
+#include <locale.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
@@ -222,6 +223,8 @@ main(int argc, char *argv[])
if (pledge("stdio rpath", NULL) == -1)
err(1, "pledge");
+ setlocale(LC_CTYPE, "");
+
git_libgit2_init();
for (i = 1; i < argc; i++) {
Response: application/gopher-menu
Original URLgopher://codemadness.org/1/git/stagit-gopher/commit/bbd27...
Content-Typeapplication/gopher-menu; charset=utf-8