patch 8.1.1885: comments in libvterm are inconsistent
Problem: Comments in libvterm are inconsistent.
Solution: Use // comments. Als update the table of combining characters.
diff --git a/src/libvterm/bin/vterm-dump.c b/src/libvterm/bin/vterm-dump.c
index a299d9c..7d39165 100644
--- a/src/libvterm/bin/vterm-dump.c
+++ b/src/libvterm/bin/vterm-dump.c
@@ -21,7 +21,7 @@
unsigned char *b = (unsigned char *)bytes;
int i;
- for(i = 0; i < len; /* none */) {
+ for(i = 0; i < len; ) {
if(b[i] < 0x20) // C0
break;
else if(b[i] < 0x80) // ASCII
@@ -51,7 +51,7 @@
return i;
}
-/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
+// 0 1 2 3 4 5 6 7 8 9 A B C D E F
static const char *name_c0[] = {
"NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL", "BS", "HT", "LF", "VT", "FF", "CR", "LS0", "LS1",
"DLE", "DC1", "DC2", "DC3", "DC4", "NAK", "SYN", "ETB", "CAN", "EM", "SUB", "ESC", "FS", "GS", "RS", "US",
@@ -91,14 +91,14 @@
return len;
}
-/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
+// 0 1 2 3 4 5 6 7 8 9 A B C D E F
static const char *name_csi_plain[] = {
"ICH", "CUU", "CUD", "CUF", "CUB", "CNL", "CPL", "CHA", "CUP", "CHT", "ED", "EL", "IL", "DL", "EF", "EA",
"DCH", "SSE", "CPR", "SU", "SD", "NP", "PP", "CTC", "ECH", "CVT", "CBT", "SRS", "PTX", "SDS", "SIMD",NULL,
"HPA", "HPR", "REP", "DA", "VPA", "VPR", "HVP", "TBC", "SM", "MC", "HPB", "VPB", "RM", "SGR", "DSR", "DAQ",
};
-/*0 4 8 B */
+//0 4 8 B
static const int newline_csi_plain[] = {
0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
@@ -111,7 +111,7 @@
if(!leader && !intermed && command < 0x70)
name = name_csi_plain[command - 0x40];
else if(leader && streq(leader, "?") && !intermed) {
- /* DEC */
+ // DEC
switch(command) {
case 'h': name = "DECSM"; break;
case 'l': name = "DECRM"; break;
@@ -172,13 +172,13 @@
}
static VTermParserCallbacks parser_cbs = {
- &parser_text, /* text */
- &parser_control, /* control */
- &parser_escape, /* escape */
- &parser_csi, /* csi */
- &parser_osc, /* osc */
- &parser_dcs, /* dcs */
- NULL /* resize */
+ &parser_text, // text
+ &parser_control, // control
+ &parser_escape, // escape
+ &parser_csi, // csi
+ &parser_osc, // osc
+ &parser_dcs, // dcs
+ NULL // resize
};
int main(int argc, char *argv[])
@@ -214,7 +214,7 @@
special_end = "}\x1b[m";
}
- /* Size matters not for the parser */
+ // Size matters not for the parser
vt = vterm_new(25, 80);
vterm_set_utf8(vt, 1);
vterm_parser_set_callbacks(vt, &parser_cbs, NULL);