comparison cli-chansession.c @ 857:c19acba28590

use oldstyle comments
author Matt Johnston <matt@ucc.asn.au>
date Thu, 14 Nov 2013 22:03:30 +0800
parents 4095b6d7c9fc
children 80af450dae76
comparison
equal deleted inserted replaced
856:f56c41030c15 857:c19acba28590
431 encrypt_packet(); 431 encrypt_packet();
432 TRACE(("leave cli_send_chansess_request")) 432 TRACE(("leave cli_send_chansess_request"))
433 433
434 } 434 }
435 435
436 // returns 1 if the character should be consumed, 0 to pass through 436 /* returns 1 if the character should be consumed, 0 to pass through */
437 static int 437 static int
438 do_escape(unsigned char c) { 438 do_escape(unsigned char c) {
439 switch (c) { 439 switch (c) {
440 case '.': 440 case '.':
441 dropbear_exit("Terminated"); 441 dropbear_exit("Terminated");
442 return 1; 442 return 1;
443 break; 443 break;
444 case 0x1a: 444 case 0x1a:
445 // ctrl-z 445 /* ctrl-z */
446 cli_tty_cleanup(); 446 cli_tty_cleanup();
447 kill(getpid(), SIGTSTP); 447 kill(getpid(), SIGTSTP);
448 // after continuation 448 /* after continuation */
449 cli_tty_setup(); 449 cli_tty_setup();
450 cli_ses.winchange = 1; 450 cli_ses.winchange = 1;
451 return 1; 451 return 1;
452 break; 452 break;
453 } 453 }
457 static 457 static
458 void cli_escape_handler(struct Channel* UNUSED(channel), unsigned char* buf, int *len) { 458 void cli_escape_handler(struct Channel* UNUSED(channel), unsigned char* buf, int *len) {
459 char c; 459 char c;
460 int skip_char = 0; 460 int skip_char = 0;
461 461
462 // only handle escape characters if they are read one at a time. simplifies 462 /* only handle escape characters if they are read one at a time. simplifies
463 // the code and avoids nasty people putting ~. at the start of a line to paste 463 the code and avoids nasty people putting ~. at the start of a line to paste */
464 if (*len != 1) { 464 if (*len != 1) {
465 cli_ses.last_char = 0x0; 465 cli_ses.last_char = 0x0;
466 return; 466 return;
467 } 467 }
468 468