|
|
| File: [Development] / inventor / libimage / pix.c (download)
Revision 1.1.1.1 (vendor branch), Tue Aug 15 12:56:29 2000 UTC (17 years, 2 months ago) by naaman
Initial check-in based on 2.1.5 (SGI IRIX) source tree. |
/*
* getpix and putpix -
*
* Paul Haeberli - 1984
*
*/
#include <stdio.h>
#include "image.h"
#undef getpix
#undef putpix
int getpix(IMAGE *image)
{
if(--(image)->cnt>=0)
return (int)(*(image)->ptr++);
else
return ifilbuf(image);
}
unsigned int putpix(IMAGE *image, unsigned int pix)
{
if(--(image)->cnt>=0)
return (unsigned int)(*(image)->ptr++ = pix);
else
return iflsbuf(image,pix);
}