diff --git a/toonz/sources/common/trop/quickput.cpp b/toonz/sources/common/trop/quickput.cpp index 041e6d2e..af70c07a 100644 --- a/toonz/sources/common/trop/quickput.cpp +++ b/toonz/sources/common/trop/quickput.cpp @@ -3941,9 +3941,9 @@ void doQuickResampleFilter_optimized( UINT32 gColUpTmp; UINT32 bColUpTmp; - register unsigned char rCol; - register unsigned char gCol; - register unsigned char bCol; + unsigned char rCol; + unsigned char gCol; + unsigned char bCol; int xI; int yI; @@ -4209,9 +4209,9 @@ void doQuickResampleFilter_optimized( int xWeight1; int xWeight0; - register unsigned char rCol; - register unsigned char gCol; - register unsigned char bCol; + unsigned char rCol; + unsigned char gCol; + unsigned char bCol; int xL; int yI; diff --git a/toonz/sources/common/tvectorimage/drawutil.cpp b/toonz/sources/common/tvectorimage/drawutil.cpp index b9e82ffe..92510eb7 100644 --- a/toonz/sources/common/tvectorimage/drawutil.cpp +++ b/toonz/sources/common/tvectorimage/drawutil.cpp @@ -248,7 +248,7 @@ for(UINT i=0; igetEdgeCount(); i++) void lefttRotateBits(UCHAR *buf, int bufferSize) { UINT *buffer = (UINT *)buf; - register UINT app; + UINT app; for (int i = 0; i < bufferSize; i++, buffer++) { app = *buffer; *buffer = app << 8 | app >> 24; diff --git a/toonz/sources/common/tvrender/qtofflinegl.cpp b/toonz/sources/common/tvrender/qtofflinegl.cpp index 60fbece0..750802fd 100644 --- a/toonz/sources/common/tvrender/qtofflinegl.cpp +++ b/toonz/sources/common/tvrender/qtofflinegl.cpp @@ -51,7 +51,7 @@ void swapRedBlueChannels(void *buffer, int bufferSize) // Flips The Red And Blue void rightRotateBits(UCHAR *buf, int bufferSize) { UINT *buffer = (UINT *)buf; - register UINT app; + UINT app; for (int i = 0; i < bufferSize; i++, buffer++) { app = *buffer; *buffer = app >> 8 | app << 24; @@ -61,7 +61,7 @@ void rightRotateBits(UCHAR *buf, int bufferSize) void rightRotateBits(UCHAR *buf, int bufferSize) { UINT *buffer = (UINT *)buf; - register UINT app; + UINT app; for (int i = 0; i < bufferSize; i++, buffer++) { app = *buffer; *buffer = (app >> 16 & 0x000000ff) | (app << 16 & 0x00ff0000) | (app & 0xff00ff00); diff --git a/toonz/sources/common/tvrender/tinbetween.cpp b/toonz/sources/common/tvrender/tinbetween.cpp index f9d2c399..4dcf7bd3 100644 --- a/toonz/sources/common/tvrender/tinbetween.cpp +++ b/toonz/sources/common/tvrender/tinbetween.cpp @@ -156,11 +156,11 @@ inline bool isTooComplex(UINT n1, UINT n2, UINT maxSubsetNumber = 100) if (n > (one << ((sizeof(UINT) * 8 - 1) / r))) return true; - register UINT product1 = n; //product1 = n*(n-1)* ...(n-r+1) - for (register UINT i = 1; i < r; i++) + UINT product1 = n; //product1 = n*(n-1)* ...(n-r+1) + for (UINT i = 1; i < r; i++) product1 *= --n; - register UINT rFact = r; + UINT rFact = r; while (r > 1) rFact *= --r; diff --git a/toonz/sources/common/tvrender/tofflinegl.cpp b/toonz/sources/common/tvrender/tofflinegl.cpp index 42737a3e..c1df1fab 100644 --- a/toonz/sources/common/tvrender/tofflinegl.cpp +++ b/toonz/sources/common/tvrender/tofflinegl.cpp @@ -447,7 +447,7 @@ public: void rightRotateBits(UCHAR *buf, int bufferSize) { UINT *buffer = (UINT *)buf; - register UINT app; + UINT app; for (int i = 0; i < bufferSize; i++, buffer++) { app = *buffer; *buffer = app >> 8 | app << 24; @@ -457,7 +457,7 @@ public: void rightRotateBits(UCHAR *buf, int bufferSize) { UINT *buffer = (UINT *)buf; - register UINT app; + UINT app; for (int i = 0; i < bufferSize; i++, buffer++) { app = *buffer; *buffer = (app >> 16 & 0x000000ff) | (app << 16 & 0x00ff0000) | (app & 0xff00ff00); diff --git a/toonz/sources/image/compatibility/inforegion.c b/toonz/sources/image/compatibility/inforegion.c index ec3712d7..837400c1 100644 --- a/toonz/sources/image/compatibility/inforegion.c +++ b/toonz/sources/image/compatibility/inforegion.c @@ -6,7 +6,7 @@ /*---------------------------------------------------------------------------*/ void getInfoRegion( - register INFO_REGION *region, + INFO_REGION *region, int x1_out, int y1_out, int x2_out, int y2_out, int scale, int width_in, int height_in) { @@ -17,11 +17,11 @@ void getInfoRegion( * ca cui prendere (leggere) la regione voluta (output). */ - register int x1_in, y1_in, x2_in, y2_in; + int x1_in, y1_in, x2_in, y2_in; #define SWAP(a, b) \ { \ - register int tmp; \ + int tmp; \ tmp = a; \ a = b; \ b = tmp; \ @@ -142,7 +142,7 @@ int get_info_region(EXT_INFO_REGION *region, #define SWAP(a, b) \ { \ - register int tmp; \ + int tmp; \ tmp = a; \ a = b; \ b = tmp; \ diff --git a/toonz/sources/image/compatibility/inforegion.h b/toonz/sources/image/compatibility/inforegion.h index fd3dbd37..0df4f2f4 100644 --- a/toonz/sources/image/compatibility/inforegion.h +++ b/toonz/sources/image/compatibility/inforegion.h @@ -42,7 +42,7 @@ int get_info_region(EXT_INFO_REGION *region, int width_in, int height_in, int orientation); void getInfoRegion( - register INFO_REGION *region, + INFO_REGION *region, int x1_out, int y1_out, int x2_out, diff --git a/toonz/sources/image/quantel/filequantelP.h b/toonz/sources/image/quantel/filequantelP.h index 31629fc6..eaf8fd35 100644 --- a/toonz/sources/image/quantel/filequantelP.h +++ b/toonz/sources/image/quantel/filequantelP.h @@ -110,29 +110,27 @@ } #define QUANTEL_FILL_LINE_OF_RGB(xmarg, xsize, rbuf, gbuf, bbuf, RGBbuf) \ - { \ - register int i; \ - \ - QUANTEL_FILL_LINE_OF_BLACK(rbuf, gbuf, bbuf, xmarg) \ - for (i = xmarg; i < xsize + xmarg; i++) { \ - rbuf[i] = (USHORT)RGBbuf->r; \ - gbuf[i] = (USHORT)RGBbuf->g; \ - bbuf[i] = (USHORT)RGBbuf->b; \ - RGBbuf++; \ - } \ - QUANTEL_FILL_LINE_OF_BLACK(rbuf + i, gbuf + i, bbuf + i, xmarg) \ + { \ + int i; \ + QUANTEL_FILL_LINE_OF_BLACK(rbuf, gbuf, bbuf, xmarg) \ + for (i = xmarg; i < xsize + xmarg; i++) { \ + rbuf[i] = (USHORT)RGBbuf->r; \ + gbuf[i] = (USHORT)RGBbuf->g; \ + bbuf[i] = (USHORT)RGBbuf->b; \ + RGBbuf++; \ + } \ + QUANTEL_FILL_LINE_OF_BLACK(rbuf + i, gbuf + i, bbuf + i, xmarg) \ } -#define QUANTEL_FILL_LINE_OF_RGB2(xmarg, rbuf, gbuf, bbuf, RGBbuf) \ - { \ - register i, _dx; \ - \ +#define QUANTEL_FILL_LINE_OF_RGB2(xmarg, rbuf, gbuf, bbuf, RGBbuf) \ + { \ + int i; \ QUANTEL_FILL_LINE_OF_BLACK(rbuf, gbuf, bbuf, xmarg) \ for (i = xmarg; i < (QUANTEL_XSIZE - xmarg); i++) { \ - rbuf[i] = (USHORT)RGBbuf->r; \ - gbuf[i] = (USHORT)RGBbuf->g; \ - bbuf[i] = (USHORT)RGBbuf->b; \ - RGBbuf++; \ + rbuf[i] = (USHORT)RGBbuf->r; \ + gbuf[i] = (USHORT)RGBbuf->g; \ + bbuf[i] = (USHORT)RGBbuf->b; \ + RGBbuf++; \ } \ QUANTEL_FILL_LINE_OF_BLACK(rbuf + i, gbuf + i, bbuf + i, xmarg) \ } diff --git a/toonz/sources/image/sgi/filesgi.cpp b/toonz/sources/image/sgi/filesgi.cpp index 007321d3..f5abd4b1 100644 --- a/toonz/sources/image/sgi/filesgi.cpp +++ b/toonz/sources/image/sgi/filesgi.cpp @@ -103,21 +103,21 @@ const int IMAGERGB_HEADER_SIZE = sizeof(IMAGERGB); #define _IOERR 0x20 #endif -static USHORT *ibufalloc(register IMAGERGB *image, int bpp); -static void cvtshorts(USHORT buffer[], register TINT32 n); -static void cvtTINT32s(TUINT32 *buffer, register TINT32 n); +static USHORT *ibufalloc(IMAGERGB *image, int bpp); +static void cvtshorts(USHORT buffer[], TINT32 n); +static void cvtTINT32s(TUINT32 *buffer, TINT32 n); static void cvtimage(IMAGERGB *image); static void img_rle_expand(USHORT *rlebuf, int ibpp, USHORT *expbuf, int obpp); -static int img_getrowsize(register IMAGERGB *image); +static int img_getrowsize(IMAGERGB *image); static TUINT32 img_optseek(IMAGERGB *image, TUINT32 offset); static TINT32 rgb_img_read(IMAGERGB *image, char *buffer, TINT32 count); static int img_badrow(IMAGERGB *image, int y, int z); static TUINT32 img_seek(IMAGERGB *image, UINT y, UINT z, UINT offs); static TINT32 RGB_img_write(IMAGERGB *image, char *buffer, TINT32 count); -static void img_setrowsize(register IMAGERGB *image, UINT cnt, UINT y, UINT z); +static void img_setrowsize(IMAGERGB *image, UINT cnt, UINT y, UINT z); static TINT32 img_rle_compact(USHORT *expbuf, int ibpp, USHORT *rlebuf, int obpp, int cnt); -static int iflush(register IMAGERGB *image); +static int iflush(IMAGERGB *image); /*-------------------------------------------------------------------------*/ @@ -205,10 +205,9 @@ static IMAGERGB *iopen(int fd, OpenMode openMode, unsigned int type, unsigned int dim, unsigned int xsize, unsigned int ysize, unsigned int zsize, short dorev) { - register IMAGERGB *image; + IMAGERGB *image; extern int errno; int tablesize, f = fd; - register int i, max; image = (IMAGERGB *)malloc((int)sizeof(IMAGERGB)); @@ -281,8 +280,8 @@ static IMAGERGB *iopen(int fd, OpenMode openMode, if (openMode == OpenWrite) { //WRITE - max = image->ysize * image->zsize; - for (i = 0; i < max; i++) { + int max = image->ysize * image->zsize; + for (int i = 0; i < max; i++) { image->rowstart[i] = 0; image->rowsize[i] = -1; } @@ -337,7 +336,7 @@ static IMAGERGB *iopen(int fd, OpenMode openMode, /*-------------------------------------------------------------------------*/ -static USHORT *ibufalloc(register IMAGERGB *image, int bpp) +static USHORT *ibufalloc(IMAGERGB *image, int bpp) { return (USHORT *)malloc(IBUFSIZE(image->xsize) * bpp); } @@ -347,14 +346,11 @@ static USHORT *ibufalloc(register IMAGERGB *image, int bpp) Inverte gli short del buffer */ -static void cvtshorts(unsigned short buffer[], register TINT32 n) +static void cvtshorts(unsigned short buffer[], TINT32 n) { - register short i; - register TINT32 nshorts = n >> 1; - register unsigned short swrd; - - for (i = 0; i < nshorts; i++) { - swrd = *buffer; + TINT32 nshorts = n >> 1; + for (int i = 0; i < nshorts; i++) { + unsigned short swrd = *buffer; *buffer++ = (swrd >> 8) | (swrd << 8); } return; @@ -368,12 +364,9 @@ static void cvtshorts(unsigned short buffer[], register TINT32 n) static void cvtTINT32s(TUINT32 buffer[], TINT32 n) { - register short i; - register TINT32 nTINT32s = n >> 2; - register TUINT32 lwrd; - - for (i = 0; i < nTINT32s; i++) { - lwrd = buffer[i]; + TINT32 nTINT32s = n >> 2; + for (int i = 0; i < nTINT32s; i++) { + TUINT32 lwrd = buffer[i]; buffer[i] = ((lwrd >> 24) | (lwrd >> 8 & 0xff00) | (lwrd << 8 & 0xff0000) | @@ -424,27 +417,27 @@ static void img_rle_expand(unsigned short *rlebuf, int ibpp, unsigned short *expbuf, int obpp) { if (ibpp == 1 && obpp == 1) { - register unsigned char *iptr = (unsigned char *)rlebuf; - register unsigned char *optr = (unsigned char *)expbuf; - register unsigned short pixel, count; + unsigned char *iptr = (unsigned char *)rlebuf; + unsigned char *optr = (unsigned char *)expbuf; + unsigned short pixel, count; EXPAND_CODE(unsigned char); } else if (ibpp == 1 && obpp == 2) { - register unsigned char *iptr = (unsigned char *)rlebuf; - register unsigned short *optr = expbuf; - register unsigned short pixel, count; + unsigned char *iptr = (unsigned char *)rlebuf; + unsigned short *optr = expbuf; + unsigned short pixel, count; EXPAND_CODE(unsigned short); } else if (ibpp == 2 && obpp == 1) { - register unsigned short *iptr = rlebuf; - register unsigned char *optr = (unsigned char *)expbuf; - register unsigned short pixel, count; + unsigned short *iptr = rlebuf; + unsigned char *optr = (unsigned char *)expbuf; + unsigned short pixel, count; EXPAND_CODE(unsigned char); } else if (ibpp == 2 && obpp == 2) { - register unsigned short *iptr = rlebuf; - register unsigned short *optr = expbuf; - register unsigned short pixel, count; + unsigned short *iptr = rlebuf; + unsigned short *optr = expbuf; + unsigned short pixel, count; EXPAND_CODE(unsigned short); } else @@ -457,7 +450,7 @@ static void img_rle_expand(unsigned short *rlebuf, int ibpp, */ /*-----------------------------------------------------------------------------*/ -static int img_getrowsize(register IMAGERGB *image) +static int img_getrowsize(IMAGERGB *image) { switch (image->dim) { case 1: @@ -571,7 +564,7 @@ static TUINT32 img_seek(IMAGERGB *image, static int new_getrow(IMAGERGB *image, void *buffer, UINT y, UINT z) { - register short cnt; + short cnt; if (!(image->flags & (_IORW | _IOREAD))) return -1; @@ -655,7 +648,7 @@ static TINT32 RGB_img_write(IMAGERGB *image, char *buffer, TINT32 count) /*-----------------------------------------------------------------------------*/ -static void img_setrowsize(register IMAGERGB *image, UINT cnt, UINT y, UINT z) +static void img_setrowsize(IMAGERGB *image, UINT cnt, UINT y, UINT z) { TINT32 *sizeptr = 0; @@ -717,42 +710,42 @@ static TINT32 img_rle_compact(unsigned short *expbuf, int ibpp, unsigned short * int obpp, int cnt) { if (ibpp == 1 && obpp == 1) { - register unsigned char *iptr = (unsigned char *)expbuf; - register unsigned char *ibufend = iptr + cnt; - register unsigned char *sptr; - register unsigned char *optr = (unsigned char *)rlebuf; - register TUINT32 todo, cc; - register TINT32 count; + unsigned char *iptr = (unsigned char *)expbuf; + unsigned char *ibufend = iptr + cnt; + unsigned char *sptr; + unsigned char *optr = (unsigned char *)rlebuf; + TUINT32 todo, cc; + TINT32 count; COMPACT_CODE(unsigned char); return optr - (unsigned char *)rlebuf; } else if (ibpp == 1 && obpp == 2) { - register unsigned char *iptr = (unsigned char *)expbuf; - register unsigned char *ibufend = iptr + cnt; - register unsigned char *sptr; - register unsigned short *optr = rlebuf; - register TUINT32 todo, cc; - register TINT32 count; + unsigned char *iptr = (unsigned char *)expbuf; + unsigned char *ibufend = iptr + cnt; + unsigned char *sptr; + unsigned short *optr = rlebuf; + TUINT32 todo, cc; + TINT32 count; COMPACT_CODE(unsigned short); return optr - rlebuf; } else if (ibpp == 2 && obpp == 1) { - register unsigned short *iptr = expbuf; - register unsigned short *ibufend = iptr + cnt; - register unsigned short *sptr; - register unsigned char *optr = (unsigned char *)rlebuf; - register TUINT32 todo, cc; - register TINT32 count; + unsigned short *iptr = expbuf; + unsigned short *ibufend = iptr + cnt; + unsigned short *sptr; + unsigned char *optr = (unsigned char *)rlebuf; + TUINT32 todo, cc; + TINT32 count; COMPACT_CODE(unsigned char); return optr - (unsigned char *)rlebuf; } else if (ibpp == 2 && obpp == 2) { - register unsigned short *iptr = expbuf; - register unsigned short *ibufend = iptr + cnt; - register unsigned short *sptr; - register unsigned short *optr = rlebuf; - register unsigned short todo, cc; - register TINT32 count; + unsigned short *iptr = expbuf; + unsigned short *ibufend = iptr + cnt; + unsigned short *sptr; + unsigned short *optr = rlebuf; + unsigned short todo, cc; + TINT32 count; COMPACT_CODE(unsigned short); return optr - rlebuf; @@ -881,7 +874,7 @@ static int new_putrow(IMAGERGB *image, void *buffer, UINT y, UINT z) /*----------------------------------------------------------------------------*/ -static int iflush(register IMAGERGB *image) +static int iflush(IMAGERGB *image) { unsigned short *base; diff --git a/toonz/sources/image/tzp/avl.c b/toonz/sources/image/tzp/avl.c index 8e4999b5..a8201b7d 100644 --- a/toonz/sources/image/tzp/avl.c +++ b/toonz/sources/image/tzp/avl.c @@ -94,7 +94,7 @@ typedef struct avl_path PATH; #ifdef VAX #define SET_STRCMP(cmp, str1, str2) \ { \ - register char *p1, *p2; \ + char *p1, *p2; \ for (p1 = (str1), p2 = (str2); *p1 && *p1 == *p2; p1++, p2++) \ ; \ (cmp) = *(unsigned char *)p1 - *(unsigned char *)p2; \ diff --git a/toonz/sources/sound/aiff/tsio_aiff.cpp b/toonz/sources/sound/aiff/tsio_aiff.cpp index 9bebd857..b1d5bcb4 100644 --- a/toonz/sources/sound/aiff/tsio_aiff.cpp +++ b/toonz/sources/sound/aiff/tsio_aiff.cpp @@ -242,7 +242,7 @@ ostream &operator<<(ostream &os, const TSSNDChunk &ssndChunk) void flipLong(unsigned char *ptrc) { - register unsigned char val; + unsigned char val; val = *(ptrc); *(ptrc) = *(ptrc + 3);