Skip to content

Commit

Permalink
Removed register keyword.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemstra committed Nov 2, 2023
1 parent c69e347 commit 5f340b0
Show file tree
Hide file tree
Showing 21 changed files with 177 additions and 177 deletions.
2 changes: 1 addition & 1 deletion basics/npixel.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@

inline NPixel::NPixel(const Pixel& pix)
{
register unsigned32 newColor = *((unsigned32 *)(&pix));
unsigned32 newColor = *((unsigned32 *)(&pix));
#ifdef __bigEndian
itsColor = newColor; // Simple copy
#else
Expand Down
48 changes: 24 additions & 24 deletions fpx/buffdesc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ static void Shift8BitsRight (unsigned char* buffer, long size)
// Copy a byte and erase its ancient address be 2 bytes on the right (don't move the rest)
static void MoveByteRightBy2(unsigned char* buffer, long size)
{
register unsigned char* next;
unsigned char* next;
next = buffer + 2;
while (size--) {
*next = *buffer;
Expand All @@ -121,7 +121,7 @@ static void MoveByteRightBy2(unsigned char* buffer, long size)
// Copy a byte and erase its ancient address be 2 bytes on the left (don't move the rest)
static void MoveByteLeftBy2(unsigned char* buffer, long size)
{
register unsigned char* next;
unsigned char* next;
next = buffer - 2;
while (size--) {
*next = *buffer;
Expand Down Expand Up @@ -451,16 +451,16 @@ void FPXBufferDesc::UpdateBuffer ()
// If the pixels are stored in a local buffer, they have to be transfered from the
// image descriptor to the buffer
if (localBuffer) {
register long i, j;
long i, j;

register long incLine0 = FPXdesc->components[0].lineStride;
register long incLine1 = FPXdesc->components[1].lineStride;
register long incLine2 = FPXdesc->components[2].lineStride;
register long incLine3 = FPXdesc->components[3].lineStride;
register long incCol0 = FPXdesc->components[0].columnStride;
register long incCol1 = FPXdesc->components[1].columnStride;
register long incCol2 = FPXdesc->components[2].columnStride;
register long incCol3 = FPXdesc->components[3].columnStride;
long incLine0 = FPXdesc->components[0].lineStride;
long incLine1 = FPXdesc->components[1].lineStride;
long incLine2 = FPXdesc->components[2].lineStride;
long incLine3 = FPXdesc->components[3].lineStride;
long incCol0 = FPXdesc->components[0].columnStride;
long incCol1 = FPXdesc->components[1].columnStride;
long incCol2 = FPXdesc->components[2].columnStride;
long incCol3 = FPXdesc->components[3].columnStride;

unsigned char* pt0;
unsigned char* pt1;
Expand All @@ -469,7 +469,7 @@ void FPXBufferDesc::UpdateBuffer ()

unsigned char* pix;
long nbChan = FPXdesc->numberOfComponents;
register long incCol;
long incCol;

if (nbChan == 1) {
pix = buffer + 3;
Expand Down Expand Up @@ -526,16 +526,16 @@ void FPXBufferDesc::UpdateDescriptor ()
// If the pixels are stored in a local buffer, they have to be transfered to the
// image descriptor
if (localBuffer) {
register long i, j;
long i, j;

register long incLine0 = FPXdesc->components[0].lineStride;
register long incLine1 = FPXdesc->components[1].lineStride;
register long incLine2 = FPXdesc->components[2].lineStride;
register long incLine3 = FPXdesc->components[3].lineStride;
register long incCol0 = FPXdesc->components[0].columnStride;
register long incCol1 = FPXdesc->components[1].columnStride;
register long incCol2 = FPXdesc->components[2].columnStride;
register long incCol3 = FPXdesc->components[3].columnStride;
long incLine0 = FPXdesc->components[0].lineStride;
long incLine1 = FPXdesc->components[1].lineStride;
long incLine2 = FPXdesc->components[2].lineStride;
long incLine3 = FPXdesc->components[3].lineStride;
long incCol0 = FPXdesc->components[0].columnStride;
long incCol1 = FPXdesc->components[1].columnStride;
long incCol2 = FPXdesc->components[2].columnStride;
long incCol3 = FPXdesc->components[3].columnStride;

unsigned char* pt0;
unsigned char* pt1;
Expand All @@ -544,7 +544,7 @@ void FPXBufferDesc::UpdateDescriptor ()

unsigned char* pix;
long nbChan = FPXdesc->numberOfComponents;
register long incCol;
long incCol;

if (nbChan == 1) {
pix = buffer + 3;
Expand Down Expand Up @@ -915,7 +915,7 @@ Boolean IsASupportedDescriptor(FPXImageDesc& desc, long width)
// Check to see if all pixels in a tile are same and return the pixel value
Boolean IsTileAllSamePixel(Pixel *entireTile, short width, short height, Pixel* singleColorPixel)
{
register unsigned long numofpixel = width * height;
unsigned long numofpixel = width * height;

*singleColorPixel = entireTile[0];
for ( unsigned long i = 1; i< numofpixel; i++ )
Expand Down Expand Up @@ -1545,7 +1545,7 @@ Boolean CreateThumbnail(unsigned char* buf, FPXBaselineColorSpace baseSpace,
// Create window DIB default palette, which is grayscale ramp of 256 RGBQUAD
void SetDefaultPalette(unsigned char *palBuffer)
{
register unsigned long *all;
unsigned long *all;

// Set the grayscale ramp of RGBQUADs
all = (unsigned long *)(palBuffer);
Expand Down
10 changes: 5 additions & 5 deletions fpx/coltwist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ void PColorTwist::UsePortfolioLut(void)

void PColorTwist::ApplyToBuffer(unsigned char* buffer, long size)
{
register int c1, c2, c3;
int c1, c2, c3;
float alpha_scale;
unsigned char *red_pixel,*green_pixel,*blue_pixel;
unsigned char *alpha_pixel;
Expand Down Expand Up @@ -373,8 +373,8 @@ void PColorTwist::ApplyToBuffer(unsigned char* buffer, long size)
// This routine assumes that T44 is equal to 1 and that a pixel is 4 bytes wide.
void PColorTwist::ApplyRGBtoYCCLut(unsigned char* buffer, long size)
{
register int c1, c2, c3;
register int rInt, gInt, bInt; // PTCH_LUTCLIP - allow values > 255 from LUT
int c1, c2, c3;
int rInt, gInt, bInt; // PTCH_LUTCLIP - allow values > 255 from LUT
float alpha_scale;
unsigned char *red_pixel, *green_pixel, *blue_pixel;
unsigned char *alpha_pixel;
Expand Down Expand Up @@ -418,7 +418,7 @@ void PColorTwist::ApplyRGBtoYCCLut(unsigned char* buffer, long size)
/**
Boolean PColorTwist::ApplyToPixelBuffer(Pixel* pixels, FPXBaselineColorSpace colorSpace, long size)
{
register int c1, c2, c3;
int c1, c2, c3;
unsigned char *red_pixel,*green_pixel,*blue_pixel;
switch (colorSpace) {
Expand Down Expand Up @@ -475,7 +475,7 @@ Boolean PColorTwist::ApplyToPixelBuffer(Pixel* pixels, FPXBaselineColorSpace col
**/
Boolean PColorTwist::ApplyToPixelBuffer(Pixel* pixels, FPXBaselineColorSpace colorSpace, long size)
{
register int c1, c2, c3;
int c1, c2, c3;
unsigned char *red_pixel,*green_pixel,*blue_pixel;
unsigned char *alpha_pixel;
unsigned char clampLimit;
Expand Down
2 changes: 1 addition & 1 deletion fpx/pres_fpx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ FPXStatus PResolutionFlashPix::Read ()
// Write the tile header of a sub-image :
FPXStatus PResolutionFlashPix::Write()
{
register int TILE_WIDTH = fatherFile->tileWidth;
int TILE_WIDTH = fatherFile->tileWidth;
FPXStatus status = FPX_OK;

// If nothing has never been writen or read from this resolution level,
Expand Down
12 changes: 6 additions & 6 deletions fpx/ptil_fpx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ FPXStatus PTileFlashPix::WriteRawTile (FPXCompressionOption compressOption,
//
FPXStatus PTileFlashPix::Write()
{
register long TILE_WIDTH = fatherSubImage->fatherFile->tileWidth;
long TILE_WIDTH = fatherSubImage->fatherFile->tileWidth;
long sizeCompressed; // Size of data after compression

ptr_Compresseur monCompresseur;
Expand Down Expand Up @@ -728,7 +728,7 @@ FPXStatus PTileFlashPix::ReadRawPixels()
ptr_Compresseur monDecompresseur;
PFlashPixFile *fileFPX;
Pixel *entireTile;
register long TILE_WIDTH = fatherSubImage->fatherFile->tileWidth;
long TILE_WIDTH = fatherSubImage->fatherFile->tileWidth;
Boolean wasLocked = false;
FPXStatus status = FPX_OK;
OLEHeaderStream *subStreamData = NULL;
Expand Down Expand Up @@ -863,8 +863,8 @@ FPXStatus PTileFlashPix::ReadRawPixels()
LockDecompress (); // Flag decompress buffer in use
AllocDecompress(tileSize); // Allocate a buffer for compressed data

if (!decompressBuffer) // If no buffer allocatedÎ
decompressorIsMissing = true; // Îdecompression failed
if (!decompressBuffer) // If no buffer allocated
decompressorIsMissing = true; // decompression failed
else {
// Read pixels data (at last...)
if (subStreamData->Seek( posPixelFic) == false) {
Expand Down Expand Up @@ -965,8 +965,8 @@ FPXStatus PTileFlashPix::ReadRawPixels()
LockDecompress (); // Flag decompress buffer in use
AllocDecompress(tileSize); // Allocate a buffer for compressed data

if (!decompressBuffer) // If no buffer allocatedÎ
decompressorIsMissing = true; // Îdecompression failed
if (!decompressBuffer) // If no buffer allocated
decompressorIsMissing = true; // decompression failed
else {
// Read pixels data (at last...)
if (subStreamData->Seek(posPixelFic) == false) {
Expand Down
18 changes: 9 additions & 9 deletions jpeg/chen_dct.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,17 @@ void IDct_Chen(DB_STATE *db_state,
int *x)
{
#ifdef VECTOR_DEFINITION
register int a[4];
register int b[4];
register int c[4];
int a[4];
int b[4];
int c[4];
#else
register long int a0,a1,a2,a3;
register long int b0,b1,b2,b3;
register long int c0,c1,c2,c3;
register int nif_a0; /* same as a0, but an s int...used in SHIFT_AND_BOUND() macro */
long int a0,a1,a2,a3;
long int b0,b1,b2,b3;
long int c0,c1,c2,c3;
int nif_a0; /* same as a0, but an s int...used in SHIFT_AND_BOUND() macro */
#endif
register int i;
register int *aptr;
int i;
int *aptr;

for(aptr=x, i=0; i<8; i++, aptr++) {
b0 = *aptr;
Expand Down
10 changes: 5 additions & 5 deletions jpeg/dbuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ DECODER_STRUCT *decoder );
/* Shift data, check Bound then write them to current output row */
#define WRITE_ROW(buf,tmp,data0,data1,data2,data3,data4,data5,data6,data7)\
if (db_state->db_ncomps > 1) {\
register int *p;\
int *p;\
p = (int *)buf;\
if (db_state->db_do_bound) {\
SHIFT_AND_BOUND(tmp, data0, *p++);\
Expand All @@ -280,7 +280,7 @@ if (db_state->db_ncomps > 1) {\
*p++ = data7 + 128;\
}\
} else {\
register int *p;\
int *p;\
p = buf;\
if (db_state->db_do_bound >= 8) {\
SHIFT_AND_BOUND(tmp, data0, *p++);\
Expand Down Expand Up @@ -311,7 +311,7 @@ if (db_state->db_ncomps > 1) {\
/* Shift data, check Bound then write them to current output row */
#define WRITE_ROWS(buf,data)\
if (db_state->db_ncomps > 1) {\
register int *p, i, val;\
int *p, i, val;\
if (db_state->db_do_bound) {\
SHIFT_AND_BOUND(val, data, val);\
} else val = data + 128;\
Expand All @@ -327,8 +327,8 @@ if (db_state->db_ncomps > 1) {\
*p++ = val;\
}\
} else {\
register unsigned char *p, val;\
register int i, j;\
unsigned char *p, val;\
int i, j;\
SHIFT_AND_BOUND(i, data, val);\
if (db_state->db_do_bound > 8) db_state->db_do_bound = 8;\
for (i = 8; i > 0; i--) {\
Expand Down
4 changes: 2 additions & 2 deletions jpeg/dhuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ int Decode_Huffman(
DB_STATE *db_state,
DHUFF_TABLE *huff_table)
{
register HUFFMAN_ELEM *huff_elem;
register int n, code, *p;
HUFFMAN_ELEM *huff_elem;
int n, code, *p;
HUFFMAN_TREE *huff_tree;

huff_elem = huff_table->huffelem + DB_Get_Byte(db_state);
Expand Down
2 changes: 1 addition & 1 deletion jpeg/djpeg.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ unsigned char *data,
int nrows,
int nbytes_per_row)
{
register int i,j;
int i,j;
unsigned char *in_ptr,*out_ptr;

in_ptr=data;
Expand Down
10 changes: 5 additions & 5 deletions jpeg/dscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ Decode_AC_Winograd(
int *quant_vec,
int *out)
{
register int *index;
register int r, s, n;
int *index;
int r, s, n;

bzero(out + 1, sizeof(int)*63);
index = izigzag_index;
Expand Down Expand Up @@ -222,8 +222,8 @@ Decode_AC_Pruned_Winograd(
int *quant_vec,
int *out)
{
register int *index;
register int r, s, n;
int *index;
int r, s, n;

index = izigzag_index;
/* Quantize DC coeff */
Expand Down Expand Up @@ -469,7 +469,7 @@ int Decode_Scan(
int method, /* 0 = Chen, 1 = Winograd, 2 = Pruned Winograd */
int interleave)
{
register long nMCU;
long nMCU;
int *dp_last_dc;

if ((dp_last_dc =(int *) FPX_malloc( 4 * sizeof(int)))==NULL) {
Expand Down
2 changes: 1 addition & 1 deletion jpeg/win_dct.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ int *out) /* winograd quantization table */

void Dct(int *x)
{
register int *jptr, r0,r1,r2,r3,r4,r5,r6,r7, tmp, i;
int *jptr, r0,r1,r2,r3,r4,r5,r6,r7, tmp, i;

/* Do Rows */
for (jptr = x, i = 8; i > 0; i--, jptr += 8) {
Expand Down
6 changes: 3 additions & 3 deletions jpeg/winograd.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ EFUNC*/

void IDct_Winograd( DB_STATE *db_state, int *x)
{
register int *lptr, r0,r1,r2,r3,r4,r5,r6,r7, tmp, i;
int *lptr, r0,r1,r2,r3,r4,r5,r6,r7, tmp, i;

/** Do columns **/
for(lptr=x, i = 8; i > 0; i--, lptr++) {
Expand Down Expand Up @@ -292,7 +292,7 @@ EFUNC*/

void IDct_Pruned_Winograd( DB_STATE *db_state, int *x)
{
register int *lptr, r0,r1,r2,r3,r4,r5,r6,r7, tmp, i;
int *lptr, r0,r1,r2,r3,r4,r5,r6,r7, tmp, i;

/** Do columns **/
for(lptr=x, i = 4; i > 0; i--, lptr++) {
Expand Down Expand Up @@ -370,7 +370,7 @@ void IDct_Pruned_Winograd( DB_STATE *db_state, int *x)
/*** DC-component only ***/
void IDct_DC_Winograd( DB_STATE *db_state, int *x )
{
register int i,tmp;
int i,tmp;

for (i=64; i > 0 ;i--)
SHIFT_AND_BOUND(tmp,SCALEE(*x),*db_state->db_MCUptr++);
Expand Down
4 changes: 2 additions & 2 deletions oless/props/utils.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,8 @@ const unsigned char g_TypeSizesB[] =
STDAPI PropVariantCopy ( PROPVARIANT * pDest, const PROPVARIANT * pvarg )
{
HRESULT hr = S_OK;
register unsigned char TypeInfo;
register int iBaseType;
unsigned char TypeInfo;
int iBaseType;

// handle the simple types quickly
iBaseType = pvarg->vt & ~VT_VECTOR;
Expand Down
Loading

0 comments on commit 5f340b0

Please sign in to comment.