Changeset af9a7c5 in mainline for generic/src/console/kconsole.c
- Timestamp:
- 2005-12-12T15:38:44Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 93b84b3
- Parents:
- c0b7f00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/src/console/kconsole.c
rc0b7f00 raf9a7c5 239 239 char *current = history[histposition]; 240 240 int i; 241 char mod; /* Command Modifier */ 241 242 char c; 242 243 … … 310 311 } 311 312 if (c == 0x1b) { 313 mod = _getc(input); 312 314 c = _getc(input); 313 if (c!= 0x5b) 315 316 if (mod != 0x5b && mod != 0x4f) 314 317 continue; 315 c = _getc(input); 316 if (c == 0x44) { /* Left */ 318 319 if (c == 0x33 && _getc(input) == 0x7e) { 320 if (position == curlen) 321 continue; 322 for (i=position+1; i<curlen;i++) { 323 putchar(current[i]); 324 current[i-1] = current[i]; 325 } 326 putchar(' '); 327 rdln_print_c('\b',curlen-position); 328 curlen--; 329 } 330 else if (c == 0x48) { /* Home */ 331 rdln_print_c('\b',position); 332 position = 0; 333 } 334 else if (c == 0x46) { 335 for (i=position;i<curlen;i++) 336 putchar(current[i]); 337 position = curlen; 338 } 339 else if (c == 0x44) { /* Left */ 317 340 if (position > 0) { 318 341 putchar('\b'); … … 321 344 continue; 322 345 } 323 if (c == 0x43) { /* Right */346 else if (c == 0x43) { /* Right */ 324 347 if (position < curlen) { 325 348 putchar(current[position]); … … 328 351 continue; 329 352 } 330 if (c == 0x41 || c == 0x42) { /* Up,down */ 353 else if (c == 0x41 || c == 0x42) { 354 /* Up,down */ 331 355 rdln_print_c('\b',position); 332 356 rdln_print_c(' ',curlen);
Note:
See TracChangeset
for help on using the changeset viewer.