comparison src/input.cc @ 5743:a527e0f77aa5

[project @ 2006-04-06 08:20:21 by jwe]
author jwe
date Thu, 06 Apr 2006 08:20:23 +0000
parents 426719471ac6
children 1c36a2e82266
comparison
equal deleted inserted replaced
5742:2cd0af543e7a 5743:a527e0f77aa5
543 read_as_string++; 543 read_as_string++;
544 544
545 std::string nm; 545 std::string nm;
546 int line = -1; 546 int line = -1;
547 547
548 // We look at curr_caller_function because curr_function is always 548 if (debug)
549 // "keyboard". 549 {
550 550 octave_user_function *caller = octave_call_stack::caller_script ();
551 if (debug && curr_caller_function) 551
552 { 552 if (caller)
553 nm = curr_caller_function->fcn_file_name (); 553 {
554 554 nm = caller->fcn_file_name ();
555 if (nm.empty ()) 555
556 nm = curr_caller_function->name (); 556 if (nm.empty ())
557 557 nm = caller->name ();
558 if (curr_statement) 558
559 line = curr_statement->line (); 559 if (curr_statement)
560 line = curr_statement->line ();
561 }
560 } 562 }
561 563
562 OSSTREAM buf; 564 OSSTREAM buf;
563 565
564 if (! nm.empty ()) 566 if (! nm.empty ())
632 { 634 {
633 tree::break_next = true; 635 tree::break_next = true;
634 636
635 tree::last_line = 0; 637 tree::last_line = 0;
636 638
637 tree::break_function = curr_function; 639 tree::break_function = octave_call_stack::current ();
638 640
639 return retval; 641 return retval;
640 } 642 }
641 else if (match_sans_spaces_semi ("dbnext", input_buf)) 643 else if (match_sans_spaces_semi ("dbnext", input_buf))
642 { 644 {
643 tree::break_next = true; 645 tree::break_next = true;
644 646
645 tree::last_line = curr_statement->line (); 647 tree::last_line = curr_statement->line ();
646 648
647 tree::break_function = curr_function; 649 tree::break_function = octave_call_stack::current ();
648 650
649 return retval; 651 return retval;
650 } 652 }
651 } 653 }
652 654