Mercurial > hg > octave-lyh
comparison src/pager.cc @ 2475:1d7925d6bede
[project @ 1996-11-07 04:36:00 by jwe]
author | jwe |
---|---|
date | Thu, 07 Nov 1996 04:46:54 +0000 |
parents | 00998e1442ae |
children | 4de4cebed088 |
comparison
equal
deleted
inserted
replaced
2474:b8c53143581b | 2475:1d7925d6bede |
---|---|
100 { | 100 { |
101 if (pid > 0) | 101 if (pid > 0) |
102 { | 102 { |
103 if (WIFEXITED (status) || WIFSIGNALLED (status)) | 103 if (WIFEXITED (status) || WIFSIGNALLED (status)) |
104 { | 104 { |
105 octave_pager_pid = -1; | 105 if (external_pager) |
106 clear_external_pager (); | |
106 | 107 |
107 // Don't call error() here because we don't want to set | 108 // Don't call error() here because we don't want to set |
108 // the error state. | 109 // the error state. |
109 | 110 |
110 warning ("connection to external pager lost --"); | 111 // XXX FIXME XXX -- something is wrong with the way that |
111 warning ("pending computations and output have been discarded"); | 112 // we are cleaning up the pager in the event of a SIGCHLD. |
113 // If this message is printed with warning(), we eventually | |
114 // crash. | |
115 | |
116 cout | |
117 << "warning: connection to external pager (pid = " | |
118 << pid << ") lost --" << endl | |
119 << "warning: pending computations and output have been discarded" | |
120 << endl; | |
112 } | 121 } |
113 } | 122 } |
114 } | 123 } |
115 | 124 |
116 static void | 125 static void |
207 || (really_flush_to_pager | 216 || (really_flush_to_pager |
208 && Vpage_screen_output | 217 && Vpage_screen_output |
209 && ! Vpage_output_immediately | 218 && ! Vpage_output_immediately |
210 && ! more_than_a_screenful (buf))); | 219 && ! more_than_a_screenful (buf))); |
211 | 220 |
221 seekoff (0, ios::beg); | |
222 | |
212 do_sync (buf, bypass_pager); | 223 do_sync (buf, bypass_pager); |
213 | 224 |
214 octave_diary << buf; | 225 octave_diary << buf; |
215 | |
216 seekoff (0, ios::beg); | |
217 } | 226 } |
218 | 227 |
219 return 0; | 228 return 0; |
220 } | 229 } |
221 | 230 |