Ejemplo n.º 1
0
/*---------------------------------------------------------------------*

Name            puttext  - places a character block on screen

Usage           int puttext(int left, int top, int right, int bottom, void *buffer)

Prototype in    conio.h

Description     Places the contents of memory pointed to by buffer into
                the rectangle defined by its screen coordinate arguments.

Return value    On success, one is returned;  zero on failure.

*---------------------------------------------------------------------*/
int puttext(int left, int top, int right, int bottom, void *buffer)
{
        int y, size;

        if (!__validatexy(left, top, right, bottom))
                return 0;

        size = right-left+1;
        for (y = top; y <= bottom; y++)
        {
                __screenio(__vptr(left, y), buffer, size);
                (char *)buffer += size*2;
        }
        return 1;
}
Ejemplo n.º 2
0
int _RTLENTRY _EXPFUNC puttext(int left, int top, int right, int bottom, void *buffer)
{
        int y, size;

        if (!__validatexy(left, top, right, bottom))
                return 0;

        size = right-left+1;
        for (y = top; y <= bottom; y++)
        {
                __putline(left, y, buffer, size);
                buffer = (void *)((char *)buffer + size*2);
        }
        return 1;
}