count from 1 (not 0) for the column number / character index - gopher-validator - Simple gopher menu validator.
 (HTM) git clone git://bitreich.org/gopher-validator git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/gopher-validator
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Tags
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 512e7771a14a5b12fcbd24d96497fcf5cc999722
 (DIR) parent ea7e95bed480772aa6a83526d0a8f7d34dd08656
 (HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
       Date:   Sat, 24 Aug 2019 11:33:17 +0200
       
       count from 1 (not 0) for the column number / character index
       
       Diffstat:
         M gopher-validator.c                  |       4 ++--
       
       1 file changed, 2 insertions(+), 2 deletions(-)
       ---
 (DIR) diff --git a/gopher-validator.c b/gopher-validator.c
       @@ -387,7 +387,7 @@ checkdir(FILE *fp)
                                        break;
                                if (r == -1) {
                                        warning("%zu:%d: username: first invalid byte, not UTF-8\n",
       -                                        linenr, i);
       +                                        linenr, i + 1);
                                        break;
                                }
                                if ((wc = wcwidth(w)) == -1)
       @@ -398,7 +398,7 @@ checkdir(FILE *fp)
                                   User_Name field contain only printable characters". */
                                if (!iswprint(w)) {
                                        error("%zu:%d: first non-printable character in username field\n",
       -                                      linenr, i);
       +                                      linenr, i + 1);
                                        break;
                                }
                        }