comparison liboctave/cmd-hist.cc @ 4802:b3f20980be32

[project @ 2004-02-25 05:14:19 by jwe]
author jwe
date Wed, 25 Feb 2004 05:14:19 +0000
parents b79da8779a0e
children 4c8a2e4e0717
comparison
equal deleted inserted replaced
4801:b022780ac0b4 4802:b3f20980be32
85 85
86 int do_is_stifled (void); 86 int do_is_stifled (void);
87 87
88 void do_set_mark (int); 88 void do_set_mark (int);
89 89
90 void do_goto_mark (void); 90 int do_goto_mark (void);
91 91
92 void do_read (const std::string&, bool); 92 void do_read (const std::string&, bool);
93 93
94 void do_read_range (const std::string&, int, int, bool); 94 void do_read_range (const std::string&, int, int, bool);
95 95
185 gnu_history::do_set_mark (int n) 185 gnu_history::do_set_mark (int n)
186 { 186 {
187 mark = n; 187 mark = n;
188 } 188 }
189 189
190 void 190 int
191 gnu_history::do_goto_mark (void) 191 gnu_history::do_goto_mark (void)
192 { 192 {
193 if (mark) 193 if (mark)
194 { 194 {
195 char *line = ::octave_history_goto_mark (mark); 195 char *line = ::octave_history_goto_mark (mark);
204 204
205 mark = 0; 205 mark = 0;
206 206
207 // XXX FIXME XXX -- for operate_and_get_next. 207 // XXX FIXME XXX -- for operate_and_get_next.
208 command_editor::restore_startup_hook (); 208 command_editor::restore_startup_hook ();
209
210 return 0;
209 } 211 }
210 212
211 void 213 void
212 gnu_history::do_read (const std::string& f, bool must_exist) 214 gnu_history::do_read (const std::string& f, bool must_exist)
213 { 215 {
526 { 528 {
527 if (instance_ok ()) 529 if (instance_ok ())
528 instance->do_set_mark (n); 530 instance->do_set_mark (n);
529 } 531 }
530 532
531 void 533 int
532 command_history::goto_mark (void) 534 command_history::goto_mark (void)
533 { 535 {
534 if (instance_ok ()) 536 return (instance_ok ())
535 instance->do_goto_mark (); 537 ? instance->do_goto_mark () : 0;
536 } 538 }
537 539
538 void 540 void
539 command_history::read (bool must_exist) 541 command_history::read (bool must_exist)
540 { 542 {
707 void 709 void
708 command_history::do_set_mark (int) 710 command_history::do_set_mark (int)
709 { 711 {
710 } 712 }
711 713
712 void 714 int
713 command_history::do_goto_mark (void) 715 command_history::do_goto_mark (void)
714 { 716 {
717 return 0;
715 } 718 }
716 719
717 void 720 void
718 command_history::do_read (const std::string& f, bool) 721 command_history::do_read (const std::string& f, bool)
719 { 722 {