Mercurial > vim
annotate src/po/sjiscorr.c @ 23648:b7d3c79075c5 v8.2.2366
patch 8.2.2366: when using ":sleep" the cursor is always displayed
Commit: https://github.com/vim/vim/commit/e2edc2ed4a9a229870b1e1811b0ecf045b84e429
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 16 20:21:23 2021 +0100
patch 8.2.2366: when using ":sleep" the cursor is always displayed
Problem: When using ":sleep" the cursor is always displayed.
Solution: Do not display the cursor when using ":sleep!". (Jeremy Lerner,
closes #7688)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 16 Jan 2021 20:30:04 +0100 |
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 } |