comparison src/libvterm/bin/vterm-ctrl.c @ 13770:2449b6ce1456 v8.0.1757

patch 8.0.1757: unnecessary changes in libvterm commit https://github.com/vim/vim/commit/b691de05f69905fe417f583083d7e3cc16eb865e Author: Bram Moolenaar <Bram@vim.org> Date: Tue Apr 24 18:39:14 2018 +0200 patch 8.0.1757: unnecessary changes in libvterm Problem: Unnecessary changes in libvterm. Solution: Bring back // comments and trailing comma in enums.
author Christian Brabandt <cb@256bit.org>
date Tue, 24 Apr 2018 18:45:07 +0200
parents 9f857e6310b6
children 811a12a78164
comparison
equal deleted inserted replaced
13769:804c3b21ce59 13770:2449b6ce1456
33 } 33 }
34 34
35 typedef enum { 35 typedef enum {
36 OFF, 36 OFF,
37 ON, 37 ON,
38 QUERY 38 QUERY,
39 } BoolQuery; 39 } BoolQuery;
40 40
41 static BoolQuery getboolq(int *argip, int argc, char *argv[]) 41 static BoolQuery getboolq(int *argip, int argc, char *argv[])
42 { 42 {
43 const char *choices[] = {"off", "on", "query", NULL}; 43 const char *choices[] = {"off", "on", "query", NULL};
103 static char *read_csi() 103 static char *read_csi()
104 { 104 {
105 unsigned char csi[32]; 105 unsigned char csi[32];
106 int i = 0; 106 int i = 0;
107 107
108 await_c1(0x9B); /* CSI */ 108 await_c1(0x9B); // CSI
109 109
110 /* TODO: This really should be a more robust CSI parser 110 /* TODO: This really should be a more robust CSI parser
111 */ 111 */
112 for(; i < sizeof(csi)-1; i++) { 112 for(; i < sizeof(csi)-1; i++) {
113 int c = csi[i] = getchar(); 113 int c = csi[i] = getchar();
114 if(c >= 0x40 && c <= 0x7e) 114 if(c >= 0x40 && c <= 0x7e)
115 break; 115 break;
116 } 116 }
117 csi[++i] = 0; 117 csi[++i] = 0;
118 118
119 /* TODO: returns longer than 32? */ 119 // TODO: returns longer than 32?
120 120
121 return strdup((char *)csi); 121 return strdup((char *)csi);
122 } 122 }
123 123
124 static char *read_dcs() 124 static char *read_dcs()
129 129
130 await_c1(0x90); 130 await_c1(0x90);
131 131
132 for(i = 0; i < sizeof(dcs)-1; ) { 132 for(i = 0; i < sizeof(dcs)-1; ) {
133 char c = getchar(); 133 char c = getchar();
134 if(c == 0x9c) /* ST */ 134 if(c == 0x9c) // ST
135 break; 135 break;
136 if(in_esc && c == 0x5c) 136 if(in_esc && c == 0x5c)
137 break; 137 break;
138 if(!in_esc && c == 0x1b) 138 if(!in_esc && c == 0x1b)
139 in_esc = TRUE; 139 in_esc = TRUE;
299 } 299 }
300 else if(streq(arg, "curblink")) { 300 else if(streq(arg, "curblink")) {
301 do_dec_mode(12, getboolq(&argi, argc, argv), "curblink"); 301 do_dec_mode(12, getboolq(&argi, argc, argv), "curblink");
302 } 302 }
303 else if(streq(arg, "curshape")) { 303 else if(streq(arg, "curshape")) {
304 /* TODO: This ought to query the current value of DECSCUSR because it */ 304 // TODO: This ought to query the current value of DECSCUSR because it
305 /* may need blinking on or off */ 305 // may need blinking on or off
306 const char *choices[] = {"block", "under", "bar", "query", NULL}; 306 const char *choices[] = {"block", "under", "bar", "query", NULL};
307 int shape = getchoice(&argi, argc, argv, choices); 307 int shape = getchoice(&argi, argc, argv, choices);
308 switch(shape) { 308 switch(shape) {
309 case 3: /* query */ 309 case 3: // query
310 shape = query_rqss_numeric(" q"); 310 shape = query_rqss_numeric(" q");
311 switch(shape) { 311 switch(shape) {
312 case 1: case 2: 312 case 1: case 2:
313 printf("curshape block\n"); 313 printf("curshape block\n");
314 break; 314 break;