diff options
Diffstat (limited to 'src/kernel/qimage.cpp')
-rw-r--r-- | src/kernel/qimage.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/src/kernel/qimage.cpp b/src/kernel/qimage.cpp index 00608e79e..e08ddc119 100644 --- a/src/kernel/qimage.cpp +++ b/src/kernel/qimage.cpp @@ -1392,7 +1392,7 @@ struct TQRgbMap { static bool convert_32_to_8( const TQImage *src, TQImage *dst, int conversion_flags, TQRgb* palette=0, int palette_count=0 ) { - register TQRgb *p; + TQRgb *p; uchar *b; bool do_quant = FALSE; int y, x; @@ -1702,7 +1702,7 @@ static bool convert_8_to_32( const TQImage *src, TQImage *dst ) return FALSE; // create failed dst->setAlphaBuffer( src->hasAlphaBuffer() ); for ( int y=0; y<dst->height(); y++ ) { // for each scan line... - register uint *p = (uint *)dst->scanLine(y); + uint *p = (uint *)dst->scanLine(y); uchar *b = src->scanLine(y); uint *end = p + dst->width(); while ( p < end ) @@ -1718,7 +1718,7 @@ static bool convert_1_to_32( const TQImage *src, TQImage *dst ) return FALSE; // could not create dst->setAlphaBuffer( src->hasAlphaBuffer() ); for ( int y=0; y<dst->height(); y++ ) { // for each scan line... - register uint *p = (uint *)dst->scanLine(y); + uint *p = (uint *)dst->scanLine(y); uchar *b = src->scanLine(y); int x; if ( src->bitOrder() == TQImage::BigEndian ) { @@ -1756,7 +1756,7 @@ static bool convert_1_to_8( const TQImage *src, TQImage *dst ) dst->setColor( 1, 0xff000000 ); } for ( int y=0; y<dst->height(); y++ ) { // for each scan line... - register uchar *p = dst->scanLine(y); + uchar *p = dst->scanLine(y); uchar *b = src->scanLine(y); int x; if ( src->bitOrder() == TQImage::BigEndian ) { @@ -1833,7 +1833,7 @@ static bool dither_to_1( const TQImage *src, TQImage *dst, int bmwidth = (w+7)/8; if ( !(line1 && line2) ) return FALSE; - register uchar *p; + uchar *p; uchar *end; int *b1, *b2; int wbytes = w * (d/8); @@ -2083,7 +2083,7 @@ static bool convert_16_to_32( const TQImage *src, TQImage *dst ) return FALSE; // create failed dst->setAlphaBuffer( src->hasAlphaBuffer() ); for ( int y=0; y<dst->height(); y++ ) { // for each scan line... - register uint *p = (uint *)dst->scanLine(y); + uint *p = (uint *)dst->scanLine(y); ushort *s = (ushort*)src->scanLine(y); uint *end = p + dst->width(); while ( p < end ) @@ -2099,7 +2099,7 @@ static bool convert_32_to_16( const TQImage *src, TQImage *dst ) return FALSE; // create failed dst->setAlphaBuffer( src->hasAlphaBuffer() ); for ( int y=0; y<dst->height(); y++ ) { // for each scan line... - register ushort *p = (ushort *)dst->scanLine(y); + ushort *p = (ushort *)dst->scanLine(y); uint *s = (uint*)src->scanLine(y); ushort *end = p + dst->width(); while ( p < end ) @@ -2363,7 +2363,7 @@ TQImage TQImage::convertBitOrder( Endian bitOrder ) const int bpl = (width() + 7) / 8; for ( int y = 0; y < data->h; y++ ) { - register uchar *p = jumpTable()[y]; + uchar *p = jumpTable()[y]; uchar *end = p + bpl; uchar *b = image.jumpTable()[y]; while ( p < end ) @@ -2454,14 +2454,14 @@ void pnmscale(const TQImage& src, TQImage& dst) { TQRgb* xelrow = 0; TQRgb* tempxelrow = 0; - register TQRgb* xP; - register TQRgb* nxP; + TQRgb* xP; + TQRgb* nxP; int rows, cols, rowsread, newrows, newcols; - register int row, col, needtoreadrow; + int row, col, needtoreadrow; const uchar maxval = 255; double xscale, yscale; long sxscale, syscale; - register long fracrowtofill, fracrowleft; + long fracrowtofill, fracrowleft; long* as; long* rs; long* gs; @@ -2551,11 +2551,11 @@ void pnmscale(const TQImage& src, TQImage& dst) xelrow = (TQRgb*)src.scanLine(rowsread++); needtoreadrow = 0; } - register long a=0; + long a=0; for ( col = 0, xP = xelrow, nxP = tempxelrow; col < cols; ++col, ++xP, ++nxP ) { - register long r, g, b; + long r, g, b; if ( as ) { r = rs[col] + fracrowtofill * tqRed( *xP ) * tqAlpha( *xP ) / 255; @@ -2601,9 +2601,9 @@ void pnmscale(const TQImage& src, TQImage& dst) /* shortcut X scaling if possible */ memcpy(dst.scanLine(rowswritten++), tempxelrow, newcols*4); } else { - register long a, r, g, b; - register long fraccoltofill, fraccolleft = 0; - register int needcol; + long a, r, g, b; + long fraccoltofill, fraccolleft = 0; + int needcol; nxP = (TQRgb*)dst.scanLine(rowswritten++); fraccoltofill = SCALE; @@ -3692,7 +3692,7 @@ static void swapPixel01( TQImage *image ) // 1-bpp: swap 0 and 1 pixels { int i; if ( image->depth() == 1 && image->numColors() == 2 ) { - register uint *p = (uint *)image->bits(); + uint *p = (uint *)image->bits(); int nbytes = image->numBytes(); for ( i=0; i<nbytes/4; i++ ) { *p = ~*p; @@ -3942,7 +3942,7 @@ static TQImageHandler *get_image_handler( const char *format ) { // get pointer to handler tqt_init_image_handlers(); tqt_init_image_plugins(); - register TQImageHandler *p = imageHandlers->first(); + TQImageHandler *p = imageHandlers->first(); while ( p ) { // traverse list if ( p->format == format ) return p; @@ -4776,7 +4776,7 @@ bool read_dib( TQDataStream& s, int offset, int startpos, TQImage& image ) TQ_CHECK_PTR( buf ); if ( comp == BMP_RLE4 ) { // run length compression int x=0, y=0, b, c, i; - register uchar *p = line[h-1]; + uchar *p = line[h-1]; uchar *endp = line[h-1]+w; while ( y < h ) { if ( (b=d->getch()) == EOF ) @@ -4841,7 +4841,7 @@ bool read_dib( TQDataStream& s, int offset, int startpos, TQImage& image ) while ( --h >= 0 ) { if ( d->readBlock((char*)buf,buflen) != buflen ) break; - register uchar *p = line[h]; + uchar *p = line[h]; uchar *b = buf; for ( int i=0; i<w/2; i++ ) { // convert nibbles to bytes *p++ = *b >> 4; @@ -4857,7 +4857,7 @@ bool read_dib( TQDataStream& s, int offset, int startpos, TQImage& image ) else if ( nbits == 8 ) { // 8 bit BMP image if ( comp == BMP_RLE8 ) { // run length compression int x=0, y=0, b; - register uchar *p = line[h-1]; + uchar *p = line[h-1]; const uchar *endp = line[h-1]+w; while ( y < h ) { if ( (b=d->getch()) == EOF ) @@ -4920,7 +4920,7 @@ bool read_dib( TQDataStream& s, int offset, int startpos, TQImage& image ) } else if ( nbits == 16 || nbits == 24 || nbits == 32 ) { // 16,24,32 bit BMP image - register TQRgb *p; + TQRgb *p; TQRgb *end; uchar *buf24 = new uchar[bpl]; int bpl24 = ((w*nbits+31)/32)*4; @@ -5051,7 +5051,7 @@ bool qt_write_dib( TQDataStream& s, TQImage image ) uchar *buf = new uchar[bpl_bmp]; uchar *b, *end; - register uchar *p; + uchar *p; memset( buf, 0, bpl_bmp ); for ( y=image.height()-1; y>=0; y-- ) { // write the image bits @@ -5237,7 +5237,7 @@ static void read_pbm_image( TQImageIO *iio ) // read PBM image data } } } else { // read ascii data - register uchar *p; + uchar *p; int n; for ( y=0; y<h; y++ ) { p = image.scanLine( y ); @@ -5503,7 +5503,7 @@ static void read_async_image( TQImageIO *iio ) X bitmap image read/write functions *****************************************************************************/ -static inline int hex2byte( register char *p ) +static inline int hex2byte( char *p ) { return ( (isdigit((uchar) *p) ? *p - '0' : toupper((uchar) *p) - 'A' + 10) << 4 ) | ( isdigit((uchar) *(p+1)) ? *(p+1) - '0' : toupper((uchar) *(p+1)) - 'A' + 10 ); @@ -5621,7 +5621,7 @@ static void write_xbm_image( TQImageIO *iio ) } } int bcnt = 0; - register char *p = buf; + char *p = buf; int bpl = (w+7)/8; for (int y = 0; y < h; ++y) { uchar *b = image.scanLine(y); |