| 206 |
int ch; |
int ch; |
| 207 |
|
|
| 208 |
snprintf(msg, sizeof(msg), |
snprintf(msg, sizeof(msg), |
| 209 |
"\rChoose character set in 3 seconds [UTF-8, GBK]: [U/g]"); |
"\rChoose character set in 5 seconds, (U)UTF-8, (G)GBK [U]: "); |
| 210 |
|
|
| 211 |
while (!SYS_server_exit) |
while (!SYS_server_exit) |
| 212 |
{ |
{ |
| 213 |
ch = press_any_key_ex(msg, 3); |
ch = press_any_key_ex(msg, 5); |
| 214 |
switch (toupper(ch)) |
switch (toupper(ch)) |
| 215 |
{ |
{ |
| 216 |
case KEY_NULL: |
case KEY_NULL: |
| 234 |
} |
} |
| 235 |
|
|
| 236 |
snprintf(msg, sizeof(msg), |
snprintf(msg, sizeof(msg), |
| 237 |
"\rChoose wide-character display in 3 seconds [Fixed, Dynamic]: [F/d]"); |
"\r请在5秒内选择宽字符显示规则, (D)动态, (F)固定? [D]: "); |
| 238 |
|
|
| 239 |
while (!SYS_server_exit) |
while (!SYS_server_exit) |
| 240 |
{ |
{ |
| 241 |
ch = press_any_key_ex(msg, 3); |
ch = press_any_key_ex(msg, 5); |
| 242 |
switch (toupper(ch)) |
switch (toupper(ch)) |
| 243 |
{ |
{ |
| 244 |
case KEY_NULL: |
case KEY_NULL: |
| 245 |
return -1; |
return -1; |
| 246 |
case KEY_TIMEOUT: |
case KEY_TIMEOUT: |
| 247 |
case CR: |
case CR: |
|
case 'F': |
|
|
UTF8_fixed_width = 1; |
|
|
break; |
|
| 248 |
case 'D': |
case 'D': |
| 249 |
UTF8_fixed_width = 0; |
UTF8_fixed_width = 0; |
| 250 |
break; |
break; |
| 251 |
|
case 'F': |
| 252 |
|
UTF8_fixed_width = 1; |
| 253 |
|
break; |
| 254 |
default: |
default: |
| 255 |
continue; |
continue; |
| 256 |
} |
} |