Mercurial > vim
annotate src/po/sjiscorr.c @ 25802:5ef704de7709 v8.2.3436
patch 8.2.3436: check for optional bool type has confusing return type
Commit: https://github.com/vim/vim/commit/a29856fcdc41541c607437629c1c1f45951100a4
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Sep 13 21:36:27 2021 +0200
patch 8.2.3436: check for optional bool type has confusing return type
Problem: Check for optional bool type has confusing return type.
Solution: Explicitly return OK.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 13 Sep 2021 21:45:04 +0200 |
parents | b79453d0d01c |
children | 45c0a5330758 |
rev | line source |
---|---|
7 | 1 /* |
2 * Simplistic program to correct SJIS inside strings. When a trail byte is a | |
3 * backslash it needs to be doubled. | |
4 * Public domain. | |
5 */ | |
6 #include <stdio.h> | |
7 #include <string.h> | |
8 | |
9 int | |
7856
226ed297307f
commit https://github.com/vim/vim/commit/d14e00ea67afbaa8cb4a7e6b1eb306da6a2d5adb
Christian Brabandt <cb@256bit.org>
parents:
7837
diff
changeset
|
10 main(int argc, char **argv) |
7 | 11 { |
12 char buffer[BUFSIZ]; | |
13 char *p; | |
14 | |
15 while (fgets(buffer, BUFSIZ, stdin) != NULL) | |
16 { | |
17 for (p = buffer; *p != 0; p++) | |
18 { | |
14187
b79453d0d01c
patch 8.1.0111: .po files do not use recommended names
Christian Brabandt <cb@256bit.org>
parents:
7856
diff
changeset
|
19 if (strncmp(p, "charset=utf-8", 13) == 0 |
b79453d0d01c
patch 8.1.0111: .po files do not use recommended names
Christian Brabandt <cb@256bit.org>
parents:
7856
diff
changeset
|
20 || strncmp(p, "charset=UTF-8", 13) == 0) |
7 | 21 { |
22 fputs("charset=cp932", stdout); | |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
23 p += 12; |
7 | 24 } |
6351 | 25 else if (strncmp(p, "# Original translations", 23) == 0) |
7 | 26 { |
27 fputs("# generated from ja.po, DO NOT EDIT", stdout); | |
28 while (p[1] != '\n') | |
29 ++p; | |
30 } | |
31 else if (*(unsigned char *)p == 0x81 && p[1] == '_') | |
32 { | |
33 putchar('\\'); | |
34 ++p; | |
35 } | |
36 else | |
37 { | |
38 if (*p & 0x80) | |
39 { | |
40 putchar(*p++); | |
41 if (*p == '\\') | |
42 putchar(*p); | |
43 } | |
44 putchar(*p); | |
45 } | |
46 } | |
47 } | |
48 } |