JPEGView/Source/C/CopyTo32.c
Aaron Giles 92bdb55672 JPEGView 3.3 for Macintosh
These are the sources for the final official release of JPEGView for the
Mac, back in 1994.
2015-02-05 00:18:10 -08:00

1 line
934 B
C

/*********************************************************/
/* This source code copyright (c) 1991-2001, Aaron Giles */
/* See the Read Me file for licensing information. */
/* Contact email: mac@aarongiles.com */
/*********************************************************/
// void CopyTo32(ulong *srcRow, void *dstRow, uchar *iTable, ColorSpec *cTable,
// DitherErrorsPtr eBuffer, DitherErrorsPtr oBuffer,
// short *rgnBuffer, uchar *errorMap, short columns)
#if applec
#pragma unused(iTable, cTable, eBuffer, oBuffer, errorMap)
#endif
ulong *src = srcRow;
ulong *dst = (ulong *)dstRow;
long rgnCol;
if (!(rgnCol = *rgnBuffer++)) rgnCol -= *rgnBuffer++;
while (columns--) {
if (rgnCol > 0) {
dst++, src++;
if (!--rgnCol) rgnCol = rgnBuffer[-1] - rgnBuffer[0], rgnBuffer++;
} else {
*dst++ = *src++;
if (!++rgnCol) rgnCol = rgnBuffer[0] - rgnBuffer[-1], rgnBuffer++;
}
}