コード例 #1
0
ファイル: positiondata.cpp プロジェクト: Sriep/pipewrap
bool PositionData::next()
{
    if (eof() || linesRead > totalLines - skip) return false;
    popline();
    pushline();
    return true;
}
コード例 #2
0
ファイル: undo.c プロジェクト: OS2World/APP-EDITOR-Vile
/* clean the copied flag on the line we're the copy of */
void
freeundostacks(BUFFER *bp, int both)
{
    LINE *lp;

    TRACE((T_CALLED "freeundostacks(%p,%d)\n", (void *) bp, both));
    while ((lp = popline(FORWSTK(bp), TRUE)) != NULL) {
	lfree(lp, bp);
    }
    if (both) {
	while ((lp = popline(BACKSTK(bp), TRUE)) != NULL) {
	    lfree(lp, bp);
	}
	bp->b_udtail = 0;
	bp->b_udlastsep = 0;
	bp->b_udcount = 0;
    }
    returnVoid();
}