| 183 | } |
| 184 | |
| 185 | static void limit_buffer(CEdit& edit, int nlines) |
| 186 | { |
| 187 | int n = edit.GetLineCount() - nlines; |
| 188 | if (n <= 0) return; |
| 189 | int len = edit.GetWindowTextLength()+1; |
| 190 | LPTSTR buf = new TCHAR[len+1]; |
| 191 | edit.GetWindowText(buf, len); |
| 192 | LPTSTR s; |
| 193 | for (s = buf; *s && n; s++) |
| 194 | if (*s == 10) n--; |
| 195 | edit.SetWindowText(s); |
| 196 | delete[] buf; |
| 197 | } |
| 198 | |
| 199 | void CEvalView::Append(LPCTSTR lpszText, BOOL mark) |
| 200 | { |