void Segtor<T, NBLK>::Set(int i, const T& x, int count) { ASSERT(i >= 0 && count >= 0); DoIndex(i + count - 1); Iterator q(*this, i); while(count--) *q++ = x; }
void HashBase::Shrink() { hash.Shrink(); if((int)HashBound(hash.GetCount()) < mcount) { ClearIndex(); DoIndex(); } else link.Shrink(); }
void wxVideoTerminal::DoEraseInDisplay(int type_of) { //wxLogDebug("DoEraseInDisplay(type_of=%d)", type_of); // inclussive wxPoint begin(0, m_topscreen_row); wxPoint end(m_screen_size.GetWidth()-1, m_botscreen_row-1); wxPoint cursor(m_screen_cur.x, m_topscreen_row+m_screen_cur.y); int i; int old_screen_y; switch (type_of) { case 0: if (cursor != begin) { begin = cursor; break; } case 2: old_screen_y = m_screen_cur.y; m_screen_cur.y = m_screen_size.GetHeight()-1; for (i=0;i<m_screen_size.GetHeight();++i) DoIndex(); m_screen_cur.y = old_screen_y; return; case 1: end = cursor; break; default: return; }; int j; for (j=begin.y+1;j<end.y; ++j) m_lines[j].Zap(0, m_screen_size.GetWidth()); if (begin.y == end.y) m_lines[begin.y].Zap(begin.x, end.x+1); else { m_lines[begin.y].Zap(begin.x, m_screen_size.GetWidth() ); m_lines[end.y].Zap(0, end.x+1); } }
void wxVideoTerminal::TryEscapeSequence(wxChar chr) { switch (chr) { case '[': m_stream_state = STATE_ESCAPE_LB; return; case ']': m_stream_state = STATE_XTERM_HACK; return; case '(': m_stream_state = STATE_CHARSET_G0; return; case ')': m_stream_state = STATE_CHARSET_G1; return; case 'D': // IND DoIndex(); break; case 'M': // RI DoReverseIndex(); break; case 'E': // NEL DoLinefeed(); break; case '7':// DECSC DoStoreCursor(); break; case '8': // DECRC DoRestoreCursor(); break; case 'I': // RLF DoReverseLinefeed(); break; } m_stream_state = STATE_STREAM; }
void HashBase::Add(unsigned _hash) { hash.Add(_hash & ~UNSIGNED_HIBIT); DoIndex(); }
void wxVideoTerminal::DoLinefeed() { DoIndex(); m_screen_cur.x = 0; }