char * recomment(char *str)
{
    char *p = str;
    char *pval = (char *)malloc(sizeof(char) * FILE_MAX_CHAR);
    char *pval1 = pval;

    do
    {
        if (*p == '/')
        {
            p++;

            if (*p == '*')
            {
                delmulitLine(p);
            }
            else if (*p == '/')
            {
                delLine(p);
            }
            else
            {
                *(++pval1) = '/';
                *(++pval1) = *p;
            }
        }
        else
        {
            *(++pval1) = *p;
        }

    }while(p++);

    return pval;
}
Example #2
0
void Screen::scrollInternal( void ) {

    if ( scrollRegion_top == 0 && scrollRegion_bottom == (terminalLines - 1) ) {

        // Classic scrolling behavior - lines at the top get pushed into to
        // scroll buffer.

        topOffset += BYTES_PER_LINE;
        if ( topOffset == bufferSize ) topOffset = 0;

        // Clear the newly opened line in the virtual buffer.
        // In theory we could do this with the clear method but that has far
        // higher overhead because it is general purpose.

        uint16_t far *tmp = (uint16_t *)(buffer + ScrOffset( 0, cursor_y ));

        uint16_t fillWord = (curAttr<<8) | 0x20;
        fillUsingWord( tmp, fillWord, 80 );

    }

    else {

        // They are using a scroll region - do not add to our private
        // backscroll buffer.

        delLine( scrollRegion_top );

    }

    // Stop updating the real screen - scrolling is slow.
    updateRealScreen = 0;
    virtualUpdated = 1;

}
Example #3
0
i4
delCom()
{
	register POS	*ps;


	if (vfrealx == endxFrm + 1 + IIVFsfaSpaceForAttr)
	{
		IIUGerr(E_VF0035_Can_not_delete_right, UG_ERR_ERROR, 0);
		return;
	}
	if (globy == endFrame)
	{
		IIUGerr(E_VF0036_Cant_delete_the_last, UG_ERR_ERROR, 0);
		return;
	}
	ps = onPos(globy, globx);
	if (ps != NULL)
		delFeat(ps, TRUE, FALSE);
	else
		delLine(globy);
}