Mercurial > vim
comparison src/ex_eval.c @ 273:2463194c8cdd
updated for version 7.0073
author | vimboss |
---|---|
date | Thu, 19 May 2005 21:00:46 +0000 |
parents | f6e567606d47 |
children | f811be6fa9b5 |
comparison
equal
deleted
inserted
replaced
272:ddada568db54 | 273:2463194c8cdd |
---|---|
482 || (VIM_ISDIGIT(p[2]) | 482 || (VIM_ISDIGIT(p[2]) |
483 && (p[3] == ':' | 483 && (p[3] == ':' |
484 || (VIM_ISDIGIT(p[3]) | 484 || (VIM_ISDIGIT(p[3]) |
485 && p[4] == ':')))))) | 485 && p[4] == ':')))))) |
486 { | 486 { |
487 if (*p == NUL || p == mesg) /* 'E123' missing or at beginning */ | 487 if (*p == NUL || p == mesg) |
488 STRCAT(val, mesg); | 488 STRCAT(val, mesg); /* 'E123' missing or at beginning */ |
489 else | 489 else |
490 { | 490 { |
491 /* '"filename" E123: message text' */ | 491 /* '"filename" E123: message text' */ |
492 if (mesg[0] != '"' || p-2 < &mesg[1] || | 492 if (mesg[0] != '"' || p-2 < &mesg[1] || |
493 p[-2] != '"' || p[-1] != ' ') | 493 p[-2] != '"' || p[-1] != ' ') |
523 | 523 |
524 if (debug_break_level > 0) | 524 if (debug_break_level > 0) |
525 msg_silent = FALSE; /* display messages */ | 525 msg_silent = FALSE; /* display messages */ |
526 ++no_wait_return; | 526 ++no_wait_return; |
527 msg_scroll = TRUE; /* always scroll up, don't overwrite */ | 527 msg_scroll = TRUE; /* always scroll up, don't overwrite */ |
528 msg_str((char_u *)_("Exception thrown: %s"), excp->value); | 528 smsg((char_u *)_("Exception thrown: %s"), excp->value); |
529 msg_puts((char_u *)"\n"); /* don't overwrite this either */ | 529 msg_puts((char_u *)"\n"); /* don't overwrite this either */ |
530 cmdline_row = msg_row; | 530 cmdline_row = msg_row; |
531 --no_wait_return; | 531 --no_wait_return; |
532 if (debug_break_level > 0) | 532 if (debug_break_level > 0) |
533 msg_silent = save_msg_silent; | 533 msg_silent = save_msg_silent; |
569 saved_IObuff = vim_strsave(IObuff); | 569 saved_IObuff = vim_strsave(IObuff); |
570 if (debug_break_level > 0) | 570 if (debug_break_level > 0) |
571 msg_silent = FALSE; /* display messages */ | 571 msg_silent = FALSE; /* display messages */ |
572 ++no_wait_return; | 572 ++no_wait_return; |
573 msg_scroll = TRUE; /* always scroll up, don't overwrite */ | 573 msg_scroll = TRUE; /* always scroll up, don't overwrite */ |
574 msg_str(was_finished | 574 smsg(was_finished |
575 ? (char_u *)_("Exception finished: %s") | 575 ? (char_u *)_("Exception finished: %s") |
576 : (char_u *)_("Exception discarded: %s"), | 576 : (char_u *)_("Exception discarded: %s"), |
577 excp->value); | 577 excp->value); |
578 msg_puts((char_u *)"\n"); /* don't overwrite this either */ | 578 msg_puts((char_u *)"\n"); /* don't overwrite this either */ |
579 cmdline_row = msg_row; | 579 cmdline_row = msg_row; |
614 caught_stack = excp; | 614 caught_stack = excp; |
615 set_vim_var_string(VV_EXCEPTION, excp->value, -1); | 615 set_vim_var_string(VV_EXCEPTION, excp->value, -1); |
616 if (*excp->throw_name != NUL) | 616 if (*excp->throw_name != NUL) |
617 { | 617 { |
618 if (excp->throw_lnum != 0) | 618 if (excp->throw_lnum != 0) |
619 sprintf((char *)IObuff, _("%s, line %ld"), excp->throw_name, | 619 vim_snprintf((char *)IObuff, IOSIZE, _("%s, line %ld"), |
620 (long)excp->throw_lnum); | 620 excp->throw_name, (long)excp->throw_lnum); |
621 else | 621 else |
622 STRCPY(IObuff, excp->throw_name); | 622 vim_snprintf((char *)IObuff, IOSIZE, "%s", excp->throw_name); |
623 set_vim_var_string(VV_THROWPOINT, IObuff, -1); | 623 set_vim_var_string(VV_THROWPOINT, IObuff, -1); |
624 } | 624 } |
625 else | 625 else |
626 /* throw_name not set on an exception from a command that was typed. */ | 626 /* throw_name not set on an exception from a command that was typed. */ |
627 set_vim_var_string(VV_THROWPOINT, NULL, -1); | 627 set_vim_var_string(VV_THROWPOINT, NULL, -1); |
632 | 632 |
633 if (debug_break_level > 0) | 633 if (debug_break_level > 0) |
634 msg_silent = FALSE; /* display messages */ | 634 msg_silent = FALSE; /* display messages */ |
635 ++no_wait_return; | 635 ++no_wait_return; |
636 msg_scroll = TRUE; /* always scroll up, don't overwrite */ | 636 msg_scroll = TRUE; /* always scroll up, don't overwrite */ |
637 msg_str((char_u *)_("Exception caught: %s"), excp->value); | 637 smsg((char_u *)_("Exception caught: %s"), excp->value); |
638 msg_puts((char_u *)"\n"); /* don't overwrite this either */ | 638 msg_puts((char_u *)"\n"); /* don't overwrite this either */ |
639 cmdline_row = msg_row; | 639 cmdline_row = msg_row; |
640 --no_wait_return; | 640 --no_wait_return; |
641 if (debug_break_level > 0) | 641 if (debug_break_level > 0) |
642 msg_silent = save_msg_silent; | 642 msg_silent = save_msg_silent; |
657 { | 657 { |
658 set_vim_var_string(VV_EXCEPTION, caught_stack->value, -1); | 658 set_vim_var_string(VV_EXCEPTION, caught_stack->value, -1); |
659 if (*caught_stack->throw_name != NUL) | 659 if (*caught_stack->throw_name != NUL) |
660 { | 660 { |
661 if (caught_stack->throw_lnum != 0) | 661 if (caught_stack->throw_lnum != 0) |
662 sprintf((char *)IObuff, | 662 vim_snprintf((char *)IObuff, IOSIZE, |
663 _("%s, line %ld"), caught_stack->throw_name, | 663 _("%s, line %ld"), caught_stack->throw_name, |
664 (long)caught_stack->throw_lnum); | 664 (long)caught_stack->throw_lnum); |
665 else | 665 else |
666 STRCPY(IObuff, caught_stack->throw_name); | 666 vim_snprintf((char *)IObuff, IOSIZE, "%s", |
667 caught_stack->throw_name); | |
667 set_vim_var_string(VV_THROWPOINT, IObuff, -1); | 668 set_vim_var_string(VV_THROWPOINT, IObuff, -1); |
668 } | 669 } |
669 else | 670 else |
670 /* throw_name not set on an exception from a command that was | 671 /* throw_name not set on an exception from a command that was |
671 * typed. */ | 672 * typed. */ |
740 break; | 741 break; |
741 | 742 |
742 default: | 743 default: |
743 if (pending & CSTP_THROW) | 744 if (pending & CSTP_THROW) |
744 { | 745 { |
745 sprintf((char *)IObuff, (char *)mesg, _("Exception")); | 746 vim_snprintf((char *)IObuff, IOSIZE, |
747 (char *)mesg, _("Exception")); | |
746 mesg = vim_strnsave(IObuff, (int)STRLEN(IObuff) + 4); | 748 mesg = vim_strnsave(IObuff, (int)STRLEN(IObuff) + 4); |
747 STRCAT(mesg, ": %s"); | 749 STRCAT(mesg, ": %s"); |
748 s = (char *)((except_T *)value)->value; | 750 s = (char *)((except_T *)value)->value; |
749 } | 751 } |
750 else if ((pending & CSTP_ERROR) && (pending & CSTP_INTERRUPT)) | 752 else if ((pending & CSTP_ERROR) && (pending & CSTP_INTERRUPT)) |
758 save_msg_silent = msg_silent; | 760 save_msg_silent = msg_silent; |
759 if (debug_break_level > 0) | 761 if (debug_break_level > 0) |
760 msg_silent = FALSE; /* display messages */ | 762 msg_silent = FALSE; /* display messages */ |
761 ++no_wait_return; | 763 ++no_wait_return; |
762 msg_scroll = TRUE; /* always scroll up, don't overwrite */ | 764 msg_scroll = TRUE; /* always scroll up, don't overwrite */ |
763 msg_str(mesg, (char_u *)s); | 765 smsg(mesg, (char_u *)s); |
764 msg_puts((char_u *)"\n"); /* don't overwrite this either */ | 766 msg_puts((char_u *)"\n"); /* don't overwrite this either */ |
765 cmdline_row = msg_row; | 767 cmdline_row = msg_row; |
766 --no_wait_return; | 768 --no_wait_return; |
767 if (debug_break_level > 0) | 769 if (debug_break_level > 0) |
768 msg_silent = save_msg_silent; | 770 msg_silent = save_msg_silent; |