Removed explicit usage of the 'register' keyword.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/23/head
Michele Calgaro 5 years ago
parent 630dcedfb3
commit 99e56ba8db
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -95,7 +95,7 @@ void poly()
int head = 0; int head = 0;
int tail = -maxcurves + 2; int tail = -maxcurves + 2;
<a href="ntqpointarray.html">TQPointArray</a> *a = new <a href="ntqpointarray.html">TQPointArray</a>[ maxcurves ]; <a href="ntqpointarray.html">TQPointArray</a> *a = new <a href="ntqpointarray.html">TQPointArray</a>[ maxcurves ];
register TQPointArray *p; TQPointArray *p;
<a name="x1760"></a> <a href="ntqrect.html">TQRect</a> r = d-&gt;<a href="ntqwidget.html#rect">rect</a>(); // desktop rectangle <a name="x1760"></a> <a href="ntqrect.html">TQRect</a> r = d-&gt;<a href="ntqwidget.html#rect">rect</a>(); // desktop rectangle
int i; int i;

@ -106,7 +106,7 @@ float noise3(float vec[3])
{ {
int bx0, bx1, by0, by1, bz0, bz1, b00, b10, b01, b11; int bx0, bx1, by0, by1, bz0, bz1, b00, b10, b01, b11;
float rx0, rx1, ry0, ry1, rz0, rz1, *q, sy, sz, a, b, c, d, t, u, v; float rx0, rx1, ry0, ry1, rz0, rz1, *q, sy, sz, a, b, c, d, t, u, v;
register int i, j; int i, j;
if (start) { if (start) {
start = 0; start = 0;

@ -53,7 +53,7 @@ void poly()
int head = 0; int head = 0;
int tail = -maxcurves + 2; int tail = -maxcurves + 2;
TQPointArray *a = new TQPointArray[ maxcurves ]; TQPointArray *a = new TQPointArray[ maxcurves ];
register TQPointArray *p; TQPointArray *p;
TQRect r = d->rect(); // desktop rectangle TQRect r = d->rect(); // desktop rectangle
int i; int i;

@ -694,16 +694,16 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
else /* mmx _not supported - Use modified C routine */ else /* mmx _not supported - Use modified C routine */
#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ #endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
{ {
register png_uint_32 i; png_uint_32 i;
png_uint_32 initial_val = png_pass_start[png_ptr->pass]; png_uint_32 initial_val = png_pass_start[png_ptr->pass];
/* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */ /* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */
register int stride = png_pass_inc[png_ptr->pass]; int stride = png_pass_inc[png_ptr->pass];
/* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */ /* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */
register int rep_bytes = png_pass_width[png_ptr->pass]; int rep_bytes = png_pass_width[png_ptr->pass];
/* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */ /* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */
png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */ png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */
int diff = (int) (png_ptr->width & 7); /* amount lost */ int diff = (int) (png_ptr->width & 7); /* amount lost */
register png_uint_32 final_val = len; /* GRR bugfix */ png_uint_32 final_val = len; /* GRR bugfix */
srcptr = png_ptr->row_buf + 1 + initial_val; srcptr = png_ptr->row_buf + 1 + initial_val;
dstptr = row + initial_val; dstptr = row + initial_val;
@ -848,16 +848,16 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
else /* mmx _not supported - Use modified C routine */ else /* mmx _not supported - Use modified C routine */
#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ #endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
{ {
register png_uint_32 i; png_uint_32 i;
png_uint_32 initial_val = BPP2 * png_pass_start[png_ptr->pass]; png_uint_32 initial_val = BPP2 * png_pass_start[png_ptr->pass];
/* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */ /* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */
register int stride = BPP2 * png_pass_inc[png_ptr->pass]; int stride = BPP2 * png_pass_inc[png_ptr->pass];
/* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */ /* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */
register int rep_bytes = BPP2 * png_pass_width[png_ptr->pass]; int rep_bytes = BPP2 * png_pass_width[png_ptr->pass];
/* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */ /* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */
png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */ png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */
int diff = (int) (png_ptr->width & 7); /* amount lost */ int diff = (int) (png_ptr->width & 7); /* amount lost */
register png_uint_32 final_val = BPP2 * len; /* GRR bugfix */ png_uint_32 final_val = BPP2 * len; /* GRR bugfix */
srcptr = png_ptr->row_buf + 1 + initial_val; srcptr = png_ptr->row_buf + 1 + initial_val;
dstptr = row + initial_val; dstptr = row + initial_val;
@ -1016,16 +1016,16 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
else /* mmx _not supported - Use modified C routine */ else /* mmx _not supported - Use modified C routine */
#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ #endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
{ {
register png_uint_32 i; png_uint_32 i;
png_uint_32 initial_val = BPP3 * png_pass_start[png_ptr->pass]; png_uint_32 initial_val = BPP3 * png_pass_start[png_ptr->pass];
/* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */ /* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */
register int stride = BPP3 * png_pass_inc[png_ptr->pass]; int stride = BPP3 * png_pass_inc[png_ptr->pass];
/* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */ /* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */
register int rep_bytes = BPP3 * png_pass_width[png_ptr->pass]; int rep_bytes = BPP3 * png_pass_width[png_ptr->pass];
/* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */ /* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */
png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */ png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */
int diff = (int) (png_ptr->width & 7); /* amount lost */ int diff = (int) (png_ptr->width & 7); /* amount lost */
register png_uint_32 final_val = BPP3 * len; /* GRR bugfix */ png_uint_32 final_val = BPP3 * len; /* GRR bugfix */
srcptr = png_ptr->row_buf + 1 + initial_val; srcptr = png_ptr->row_buf + 1 + initial_val;
dstptr = row + initial_val; dstptr = row + initial_val;
@ -1191,16 +1191,16 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
else /* mmx _not supported - Use modified C routine */ else /* mmx _not supported - Use modified C routine */
#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ #endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
{ {
register png_uint_32 i; png_uint_32 i;
png_uint_32 initial_val = BPP4 * png_pass_start[png_ptr->pass]; png_uint_32 initial_val = BPP4 * png_pass_start[png_ptr->pass];
/* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */ /* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */
register int stride = BPP4 * png_pass_inc[png_ptr->pass]; int stride = BPP4 * png_pass_inc[png_ptr->pass];
/* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */ /* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */
register int rep_bytes = BPP4 * png_pass_width[png_ptr->pass]; int rep_bytes = BPP4 * png_pass_width[png_ptr->pass];
/* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */ /* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */
png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */ png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */
int diff = (int) (png_ptr->width & 7); /* amount lost */ int diff = (int) (png_ptr->width & 7); /* amount lost */
register png_uint_32 final_val = BPP4 * len; /* GRR bugfix */ png_uint_32 final_val = BPP4 * len; /* GRR bugfix */
srcptr = png_ptr->row_buf + 1 + initial_val; srcptr = png_ptr->row_buf + 1 + initial_val;
dstptr = row + initial_val; dstptr = row + initial_val;
@ -1383,16 +1383,16 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
else /* mmx _not supported - Use modified C routine */ else /* mmx _not supported - Use modified C routine */
#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ #endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
{ {
register png_uint_32 i; png_uint_32 i;
png_uint_32 initial_val = BPP6 * png_pass_start[png_ptr->pass]; png_uint_32 initial_val = BPP6 * png_pass_start[png_ptr->pass];
/* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */ /* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */
register int stride = BPP6 * png_pass_inc[png_ptr->pass]; int stride = BPP6 * png_pass_inc[png_ptr->pass];
/* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */ /* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */
register int rep_bytes = BPP6 * png_pass_width[png_ptr->pass]; int rep_bytes = BPP6 * png_pass_width[png_ptr->pass];
/* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */ /* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */
png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */ png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */
int diff = (int) (png_ptr->width & 7); /* amount lost */ int diff = (int) (png_ptr->width & 7); /* amount lost */
register png_uint_32 final_val = BPP6 * len; /* GRR bugfix */ png_uint_32 final_val = BPP6 * len; /* GRR bugfix */
srcptr = png_ptr->row_buf + 1 + initial_val; srcptr = png_ptr->row_buf + 1 + initial_val;
dstptr = row + initial_val; dstptr = row + initial_val;
@ -1424,16 +1424,16 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
{ {
png_bytep srcptr; png_bytep srcptr;
png_bytep dstptr; png_bytep dstptr;
register png_uint_32 i; png_uint_32 i;
png_uint_32 initial_val = BPP8 * png_pass_start[png_ptr->pass]; png_uint_32 initial_val = BPP8 * png_pass_start[png_ptr->pass];
/* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */ /* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */
register int stride = BPP8 * png_pass_inc[png_ptr->pass]; int stride = BPP8 * png_pass_inc[png_ptr->pass];
/* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */ /* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */
register int rep_bytes = BPP8 * png_pass_width[png_ptr->pass]; int rep_bytes = BPP8 * png_pass_width[png_ptr->pass];
/* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */ /* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */
png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */ png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */
int diff = (int) (png_ptr->width & 7); /* amount lost */ int diff = (int) (png_ptr->width & 7); /* amount lost */
register png_uint_32 final_val = BPP8 * len; /* GRR bugfix */ png_uint_32 final_val = BPP8 * len; /* GRR bugfix */
srcptr = png_ptr->row_buf + 1 + initial_val; srcptr = png_ptr->row_buf + 1 + initial_val;
dstptr = row + initial_val; dstptr = row + initial_val;

@ -375,10 +375,10 @@ end8:
} }
else /* mmx not supported - use modified C routine */ else /* mmx not supported - use modified C routine */
{ {
register unsigned int incr1, initial_val, final_val; unsigned int incr1, initial_val, final_val;
png_size_t pixel_bytes; png_size_t pixel_bytes;
png_uint_32 i; png_uint_32 i;
register int disp = png_pass_inc[png_ptr->pass]; int disp = png_pass_inc[png_ptr->pass];
int offset_table[7] = {0, 4, 0, 2, 0, 1, 0}; int offset_table[7] = {0, 4, 0, 2, 0, 1, 0};
pixel_bytes = (png_ptr->row_info.pixel_depth >> 3); pixel_bytes = (png_ptr->row_info.pixel_depth >> 3);
@ -487,10 +487,10 @@ end16:
} }
else /* mmx not supported - use modified C routine */ else /* mmx not supported - use modified C routine */
{ {
register unsigned int incr1, initial_val, final_val; unsigned int incr1, initial_val, final_val;
png_size_t pixel_bytes; png_size_t pixel_bytes;
png_uint_32 i; png_uint_32 i;
register int disp = png_pass_inc[png_ptr->pass]; int disp = png_pass_inc[png_ptr->pass];
int offset_table[7] = {0, 4, 0, 2, 0, 1, 0}; int offset_table[7] = {0, 4, 0, 2, 0, 1, 0};
pixel_bytes = (png_ptr->row_info.pixel_depth >> 3); pixel_bytes = (png_ptr->row_info.pixel_depth >> 3);
@ -618,10 +618,10 @@ end24:
} }
else /* mmx not supported - use modified C routine */ else /* mmx not supported - use modified C routine */
{ {
register unsigned int incr1, initial_val, final_val; unsigned int incr1, initial_val, final_val;
png_size_t pixel_bytes; png_size_t pixel_bytes;
png_uint_32 i; png_uint_32 i;
register int disp = png_pass_inc[png_ptr->pass]; int disp = png_pass_inc[png_ptr->pass];
int offset_table[7] = {0, 4, 0, 2, 0, 1, 0}; int offset_table[7] = {0, 4, 0, 2, 0, 1, 0};
pixel_bytes = (png_ptr->row_info.pixel_depth >> 3); pixel_bytes = (png_ptr->row_info.pixel_depth >> 3);
@ -758,10 +758,10 @@ end32:
} }
else /* mmx _not supported - Use modified C routine */ else /* mmx _not supported - Use modified C routine */
{ {
register unsigned int incr1, initial_val, final_val; unsigned int incr1, initial_val, final_val;
png_size_t pixel_bytes; png_size_t pixel_bytes;
png_uint_32 i; png_uint_32 i;
register int disp = png_pass_inc[png_ptr->pass]; int disp = png_pass_inc[png_ptr->pass];
int offset_table[7] = {0, 4, 0, 2, 0, 1, 0}; int offset_table[7] = {0, 4, 0, 2, 0, 1, 0};
pixel_bytes = (png_ptr->row_info.pixel_depth >> 3); pixel_bytes = (png_ptr->row_info.pixel_depth >> 3);
@ -916,10 +916,10 @@ end48:
} }
else /* mmx _not supported - Use modified C routine */ else /* mmx _not supported - Use modified C routine */
{ {
register unsigned int incr1, initial_val, final_val; unsigned int incr1, initial_val, final_val;
png_size_t pixel_bytes; png_size_t pixel_bytes;
png_uint_32 i; png_uint_32 i;
register int disp = png_pass_inc[png_ptr->pass]; int disp = png_pass_inc[png_ptr->pass];
int offset_table[7] = {0, 4, 0, 2, 0, 1, 0}; int offset_table[7] = {0, 4, 0, 2, 0, 1, 0};
pixel_bytes = (png_ptr->row_info.pixel_depth >> 3); pixel_bytes = (png_ptr->row_info.pixel_depth >> 3);
@ -947,8 +947,8 @@ end48:
png_size_t pixel_bytes; png_size_t pixel_bytes;
int offset_table[7] = {0, 4, 0, 2, 0, 1, 0}; int offset_table[7] = {0, 4, 0, 2, 0, 1, 0};
unsigned int i; unsigned int i;
register int disp = png_pass_inc[png_ptr->pass]; // get the offset int disp = png_pass_inc[png_ptr->pass]; // get the offset
register unsigned int incr1, initial_val, final_val; unsigned int incr1, initial_val, final_val;
pixel_bytes = (png_ptr->row_info.pixel_depth >> 3); pixel_bytes = (png_ptr->row_info.pixel_depth >> 3);
sptr = png_ptr->row_buf + 1 + offset_table[png_ptr->pass]* sptr = png_ptr->row_buf + 1 + offset_table[png_ptr->pass]*

@ -360,8 +360,8 @@ static int vxprintf(
} }
bufpt = &buf[etBUFSIZE-1]; bufpt = &buf[etBUFSIZE-1];
{ {
register char *cset; /* Use registers for speed */ char *cset; /* Use registers for speed */
register int base; int base;
cset = infop->charset; cset = infop->charset;
base = infop->base; base = infop->base;
do{ /* Convert to ascii */ do{ /* Convert to ascii */
@ -602,7 +602,7 @@ static int vxprintf(
** the output. ** the output.
*/ */
if( !flag_leftjustify ){ if( !flag_leftjustify ){
register int nspace; int nspace;
nspace = width-length; nspace = width-length;
if( nspace>0 ){ if( nspace>0 ){
count += nspace; count += nspace;
@ -618,7 +618,7 @@ static int vxprintf(
count += length; count += length;
} }
if( flag_leftjustify ){ if( flag_leftjustify ){
register int nspace; int nspace;
nspace = width-length; nspace = width-length;
if( nspace>0 ){ if( nspace>0 ){
count += nspace; count += nspace;

@ -500,14 +500,14 @@ int sqliteHashNoCase(const char *z, int n){
** there is no consistency, we will define our own. ** there is no consistency, we will define our own.
*/ */
int sqliteStrICmp(const char *zLeft, const char *zRight){ int sqliteStrICmp(const char *zLeft, const char *zRight){
register unsigned char *a, *b; unsigned char *a, *b;
a = (unsigned char *)zLeft; a = (unsigned char *)zLeft;
b = (unsigned char *)zRight; b = (unsigned char *)zRight;
while( *a!=0 && UpperToLower[*a]==UpperToLower[*b]){ a++; b++; } while( *a!=0 && UpperToLower[*a]==UpperToLower[*b]){ a++; b++; }
return *a - *b; return *a - *b;
} }
int sqliteStrNICmp(const char *zLeft, const char *zRight, int N){ int sqliteStrNICmp(const char *zLeft, const char *zRight, int N){
register unsigned char *a, *b; unsigned char *a, *b;
a = (unsigned char *)zLeft; a = (unsigned char *)zLeft;
b = (unsigned char *)zRight; b = (unsigned char *)zRight;
while( N-- > 0 && *a!=0 && UpperToLower[*a]==UpperToLower[*b]){ a++; b++; } while( N-- > 0 && *a!=0 && UpperToLower[*a]==UpperToLower[*b]){ a++; b++; }
@ -941,7 +941,7 @@ static int sqlite_utf8_to_int(const unsigned char *z){
*/ */
int int
sqliteGlobCompare(const unsigned char *zPattern, const unsigned char *zString){ sqliteGlobCompare(const unsigned char *zPattern, const unsigned char *zString){
register int c; int c;
int invert; int invert;
int seen; int seen;
int c2; int c2;
@ -1030,7 +1030,7 @@ sqliteGlobCompare(const unsigned char *zPattern, const unsigned char *zString){
*/ */
int int
sqliteLikeCompare(const unsigned char *zPattern, const unsigned char *zString){ sqliteLikeCompare(const unsigned char *zPattern, const unsigned char *zString){
register int c; int c;
int c2; int c2;
while( (c = UpperToLower[*zPattern])!=0 ){ while( (c = UpperToLower[*zPattern])!=0 ){

@ -260,8 +260,8 @@ local unsigned long crc32_little(crc, buf, len)
const unsigned char FAR *buf; const unsigned char FAR *buf;
unsigned len; unsigned len;
{ {
register u4 c; u4 c;
register const u4 FAR *buf4; const u4 FAR *buf4;
c = (u4)crc; c = (u4)crc;
c = ~c; c = ~c;
@ -300,8 +300,8 @@ local unsigned long crc32_big(crc, buf, len)
const unsigned char FAR *buf; const unsigned char FAR *buf;
unsigned len; unsigned len;
{ {
register u4 c; u4 c;
register const u4 FAR *buf4; const u4 FAR *buf4;
c = REV((u4)crc); c = REV((u4)crc);
c = ~c; c = ~c;

@ -862,9 +862,9 @@ local uInt longest_match(s, cur_match)
IPos cur_match; /* current match */ IPos cur_match; /* current match */
{ {
unsigned chain_length = s->max_chain_length;/* max hash chain length */ unsigned chain_length = s->max_chain_length;/* max hash chain length */
register Bytef *scan = s->window + s->strstart; /* current string */ Bytef *scan = s->window + s->strstart; /* current string */
register Bytef *match; /* matched string */ Bytef *match; /* matched string */
register int len; /* length of current match */ int len; /* length of current match */
int best_len = s->prev_length; /* best match length so far */ int best_len = s->prev_length; /* best match length so far */
int nice_match = s->nice_match; /* stop if match long enough */ int nice_match = s->nice_match; /* stop if match long enough */
IPos limit = s->strstart > (IPos)MAX_DIST(s) ? IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
@ -879,13 +879,13 @@ local uInt longest_match(s, cur_match)
/* Compare two bytes at a time. Note: this is not always beneficial. /* Compare two bytes at a time. Note: this is not always beneficial.
* Try with and without -DUNALIGNED_OK to check. * Try with and without -DUNALIGNED_OK to check.
*/ */
register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1; Bytef *strend = s->window + s->strstart + MAX_MATCH - 1;
register ush scan_start = *(ushf*)scan; ush scan_start = *(ushf*)scan;
register ush scan_end = *(ushf*)(scan+best_len-1); ush scan_end = *(ushf*)(scan+best_len-1);
#else #else
register Bytef *strend = s->window + s->strstart + MAX_MATCH; Bytef *strend = s->window + s->strstart + MAX_MATCH;
register Byte scan_end1 = scan[best_len-1]; Byte scan_end1 = scan[best_len-1];
register Byte scan_end = scan[best_len]; Byte scan_end = scan[best_len];
#endif #endif
/* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
@ -1004,10 +1004,10 @@ local uInt longest_match_fast(s, cur_match)
deflate_state *s; deflate_state *s;
IPos cur_match; /* current match */ IPos cur_match; /* current match */
{ {
register Bytef *scan = s->window + s->strstart; /* current string */ Bytef *scan = s->window + s->strstart; /* current string */
register Bytef *match; /* matched string */ Bytef *match; /* matched string */
register int len; /* length of current match */ int len; /* length of current match */
register Bytef *strend = s->window + s->strstart + MAX_MATCH; Bytef *strend = s->window + s->strstart + MAX_MATCH;
/* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
* It is easy to get rid of this optimization if necessary. * It is easy to get rid of this optimization if necessary.
@ -1094,8 +1094,8 @@ local void check_match(s, start, match, length)
local void fill_window(s) local void fill_window(s)
deflate_state *s; deflate_state *s;
{ {
register unsigned n, m; unsigned n, m;
register Posf *p; Posf *p;
unsigned more; /* Amount of free space at the end of the window. */ unsigned more; /* Amount of free space at the end of the window. */
uInt wsize = s->w_size; uInt wsize = s->w_size;

@ -1143,7 +1143,7 @@ local unsigned bi_reverse(code, len)
unsigned code; /* the value to invert */ unsigned code; /* the value to invert */
int len; /* its bit length */ int len; /* its bit length */
{ {
register unsigned res = 0; unsigned res = 0;
do { do {
res |= code & 1; res |= code & 1;
code >>= 1, res <<= 1; code >>= 1, res <<= 1;

@ -549,7 +549,7 @@ TQAccelPrivate::~TQAccelPrivate()
static TQAccelItem *find_id( TQAccelList &list, int id ) static TQAccelItem *find_id( TQAccelList &list, int id )
{ {
register TQAccelItem *item = list.first(); TQAccelItem *item = list.first();
while ( item && item->id != id ) while ( item && item->id != id )
item = list.next(); item = list.next();
return item; return item;
@ -557,7 +557,7 @@ static TQAccelItem *find_id( TQAccelList &list, int id )
static TQAccelItem *find_key( TQAccelList &list, const TQKeySequence &key ) static TQAccelItem *find_key( TQAccelList &list, const TQKeySequence &key )
{ {
register TQAccelItem *item = list.first(); TQAccelItem *item = list.first();
while ( item && !( item->key == key ) ) while ( item && !( item->key == key ) )
item = list.next(); item = list.next();
return item; return item;

@ -1421,7 +1421,7 @@ TQStyle& TQApplication::style()
if ( is_app_running && !is_app_closing && (*app_pal != app_pal_copy) ) { if ( is_app_running && !is_app_closing && (*app_pal != app_pal_copy) ) {
TQEvent e( TQEvent::ApplicationPaletteChange ); TQEvent e( TQEvent::ApplicationPaletteChange );
TQWidgetIntDictIt it( *((TQWidgetIntDict*)TQWidget::mapper) ); TQWidgetIntDictIt it( *((TQWidgetIntDict*)TQWidget::mapper) );
register TQWidget *w; TQWidget *w;
while ( (w=it.current()) ) { // for all widgets... while ( (w=it.current()) ) { // for all widgets...
++it; ++it;
sendEvent( w, &e ); sendEvent( w, &e );
@ -1467,7 +1467,7 @@ void TQApplication::setStyle( TQStyle *style )
if (old) { if (old) {
if ( is_app_running && !is_app_closing ) { if ( is_app_running && !is_app_closing ) {
TQWidgetIntDictIt it( *((TQWidgetIntDict*)TQWidget::mapper) ); TQWidgetIntDictIt it( *((TQWidgetIntDict*)TQWidget::mapper) );
register TQWidget *w; TQWidget *w;
while ( (w=it.current()) ) { // for all widgets... while ( (w=it.current()) ) { // for all widgets...
++it; ++it;
if ( !w->testWFlags(WType_Desktop) && // except desktop if ( !w->testWFlags(WType_Desktop) && // except desktop
@ -1494,7 +1494,7 @@ void TQApplication::setStyle( TQStyle *style )
if (old) { if (old) {
if ( is_app_running && !is_app_closing ) { if ( is_app_running && !is_app_closing ) {
TQWidgetIntDictIt it( *((TQWidgetIntDict*)TQWidget::mapper) ); TQWidgetIntDictIt it( *((TQWidgetIntDict*)TQWidget::mapper) );
register TQWidget *w; TQWidget *w;
while ( (w=it.current()) ) { // for all widgets... while ( (w=it.current()) ) { // for all widgets...
++it; ++it;
if ( !w->testWFlags(WType_Desktop) ) { // except desktop if ( !w->testWFlags(WType_Desktop) ) { // except desktop
@ -2080,7 +2080,7 @@ void TQApplication::setPalette( const TQPalette &palette, bool informWidgets,
if ( !oldpal || ( *oldpal != pal ) ) { if ( !oldpal || ( *oldpal != pal ) ) {
TQEvent e( TQEvent::ApplicationPaletteChange ); TQEvent e( TQEvent::ApplicationPaletteChange );
TQWidgetIntDictIt it( *((TQWidgetIntDict*)TQWidget::mapper) ); TQWidgetIntDictIt it( *((TQWidgetIntDict*)TQWidget::mapper) );
register TQWidget *w; TQWidget *w;
while ( (w=it.current()) ) { // for all widgets... while ( (w=it.current()) ) { // for all widgets...
++it; ++it;
if ( all || (!className && w->isTopLevel() ) || w->inherits(className) ) // matching class if ( all || (!className && w->isTopLevel() ) || w->inherits(className) ) // matching class
@ -2170,7 +2170,7 @@ void TQApplication::setFont( const TQFont &font, bool informWidgets,
if ( informWidgets && is_app_running && !is_app_closing ) { if ( informWidgets && is_app_running && !is_app_closing ) {
TQEvent e( TQEvent::ApplicationFontChange ); TQEvent e( TQEvent::ApplicationFontChange );
TQWidgetIntDictIt it( *((TQWidgetIntDict*)TQWidget::mapper) ); TQWidgetIntDictIt it( *((TQWidgetIntDict*)TQWidget::mapper) );
register TQWidget *w; TQWidget *w;
while ( (w=it.current()) ) { // for all widgets... while ( (w=it.current()) ) { // for all widgets...
++it; ++it;
if ( all || (!className && w->isTopLevel() ) || w->inherits(className) ) // matching class if ( all || (!className && w->isTopLevel() ) || w->inherits(className) ) // matching class
@ -2780,7 +2780,7 @@ bool TQApplication::internalNotify( TQObject *receiver, TQEvent * e)
{ {
if ( eventFilters ) { if ( eventFilters ) {
TQObjectListIt it( *eventFilters ); TQObjectListIt it( *eventFilters );
register TQObject *obj; TQObject *obj;
while ( (obj=it.current()) != 0 ) { // send to all filters while ( (obj=it.current()) != 0 ) { // send to all filters
++it; // until one returns TRUE ++it; // until one returns TRUE
if ( obj->eventFilter(receiver,e) ) if ( obj->eventFilter(receiver,e) )

@ -2894,7 +2894,7 @@ void TQApplication::setOverrideCursor( const TQCursor &cursor, bool replace )
cursorStack->append( app_cursor ); cursorStack->append( app_cursor );
TQWidgetIntDictIt it( *((TQWidgetIntDict*)TQWidget::mapper) ); TQWidgetIntDictIt it( *((TQWidgetIntDict*)TQWidget::mapper) );
register TQWidget *w; TQWidget *w;
while ( (w=it.current()) ) { // for all widgets that have while ( (w=it.current()) ) { // for all widgets that have
if ( w->testWState( WState_OwnCursor ) ) if ( w->testWState( WState_OwnCursor ) )
tqt_x11_enforce_cursor( w ); tqt_x11_enforce_cursor( w );
@ -2922,7 +2922,7 @@ void TQApplication::restoreOverrideCursor()
app_cursor = cursorStack->last(); app_cursor = cursorStack->last();
if ( TQWidget::mapper != 0 && !closingDown() ) { if ( TQWidget::mapper != 0 && !closingDown() ) {
TQWidgetIntDictIt it( *((TQWidgetIntDict*)TQWidget::mapper) ); TQWidgetIntDictIt it( *((TQWidgetIntDict*)TQWidget::mapper) );
register TQWidget *w; TQWidget *w;
while ( (w=it.current()) ) { // set back to original cursors while ( (w=it.current()) ) { // set back to original cursors
if ( w->testWState( WState_OwnCursor ) ) if ( w->testWState( WState_OwnCursor ) )
tqt_x11_enforce_cursor( w ); tqt_x11_enforce_cursor( w );
@ -2986,7 +2986,7 @@ void TQApplication::setGlobalMouseTracking( bool enable )
} }
if ( tellAllWidgets ) { if ( tellAllWidgets ) {
TQWidgetIntDictIt it( *((TQWidgetIntDict*)TQWidget::mapper) ); TQWidgetIntDictIt it( *((TQWidgetIntDict*)TQWidget::mapper) );
register TQWidget *w; TQWidget *w;
while ( (w=it.current()) ) { while ( (w=it.current()) ) {
if ( app_tracking > 0 ) { // switch on if ( app_tracking > 0 ) { // switch on
if ( !w->testWState(WState_MouseTracking) ) { if ( !w->testWState(WState_MouseTracking) ) {

@ -502,7 +502,7 @@ void TQCursor::update() const
{ {
if ( !initialized ) if ( !initialized )
initialize(); initialize();
register TQCursorData *d = data; // cheat const! TQCursorData *d = data; // cheat const!
if ( d->hcurs ) // already loaded if ( d->hcurs ) // already loaded
return; return;

@ -211,7 +211,7 @@ static inline void getTime( timeval &t ) // get time of day
static void repairTimer( const timeval &time ) // repair broken timer static void repairTimer( const timeval &time ) // repair broken timer
{ {
timeval diff = watchtime - time; timeval diff = watchtime - time;
register TimerInfo *t = timerList->first(); TimerInfo *t = timerList->first();
while ( t ) { // repair all timers while ( t ) { // repair all timers
t->timeout = t->timeout - diff; t->timeout = t->timeout - diff;
t = timerList->next(); t = timerList->next();
@ -308,7 +308,7 @@ int qStartTimer( int interval, TQObject *obj )
bool qKillTimer( int id ) bool qKillTimer( int id )
{ {
register TimerInfo *t; TimerInfo *t;
if ( !timerList || id <= 0 || if ( !timerList || id <= 0 ||
id > (int)timerBitVec->size() || !timerBitVec->testBit( id-1 ) ) id > (int)timerBitVec->size() || !timerBitVec->testBit( id-1 ) )
return FALSE; // not init'd or invalid timer return FALSE; // not init'd or invalid timer
@ -325,7 +325,7 @@ bool qKillTimer( int id )
bool qKillTimer( TQObject *obj ) bool qKillTimer( TQObject *obj )
{ {
register TimerInfo *t; TimerInfo *t;
if ( !timerList ) // not initialized if ( !timerList ) // not initialized
return FALSE; return FALSE;
t = timerList->first(); t = timerList->first();
@ -530,7 +530,7 @@ int TQEventLoop::activateTimers()
timeval currentTime; timeval currentTime;
int n_act = 0, maxCount = timerList->count(); int n_act = 0, maxCount = timerList->count();
TimerInfo *begin = 0; TimerInfo *begin = 0;
register TimerInfo *t; TimerInfo *t;
for ( ;; ) { for ( ;; ) {
if ( ! maxCount-- ) if ( ! maxCount-- )

@ -239,7 +239,7 @@ static void repairTimer( const timeval &time ) // repair broken timer
tqt_timerListMutex->lock(); tqt_timerListMutex->lock();
#endif #endif
timeval diff = watchtime - time; timeval diff = watchtime - time;
register TimerInfo *t = timerList->first(); TimerInfo *t = timerList->first();
while ( t ) { // repair all timers while ( t ) { // repair all timers
t->timeout = t->timeout - diff; t->timeout = t->timeout - diff;
t = timerList->next(); t = timerList->next();
@ -374,7 +374,7 @@ bool qKillTimer( int id )
#if defined(TQT_THREAD_SUPPORT) #if defined(TQT_THREAD_SUPPORT)
if (tqt_timerListMutex) tqt_timerListMutex->lock(); if (tqt_timerListMutex) tqt_timerListMutex->lock();
#endif #endif
register TimerInfo *t; TimerInfo *t;
if ( (!timerList) || (id <= 0) || (id > (int)timerBitVec->size()) || (!timerBitVec->testBit( id-1 )) ) { if ( (!timerList) || (id <= 0) || (id > (int)timerBitVec->size()) || (!timerBitVec->testBit( id-1 )) ) {
#if defined(TQT_THREAD_SUPPORT) #if defined(TQT_THREAD_SUPPORT)
if (tqt_timerListMutex) tqt_timerListMutex->unlock(); if (tqt_timerListMutex) tqt_timerListMutex->unlock();
@ -407,7 +407,7 @@ bool qKillTimer( TQObject *obj )
#if defined(TQT_THREAD_SUPPORT) #if defined(TQT_THREAD_SUPPORT)
if (tqt_timerListMutex) tqt_timerListMutex->lock(); if (tqt_timerListMutex) tqt_timerListMutex->lock();
#endif #endif
register TimerInfo *t; TimerInfo *t;
if ( !timerList ) { // not initialized if ( !timerList ) { // not initialized
#if defined(TQT_THREAD_SUPPORT) #if defined(TQT_THREAD_SUPPORT)
if (tqt_timerListMutex) tqt_timerListMutex->unlock(); if (tqt_timerListMutex) tqt_timerListMutex->unlock();
@ -645,7 +645,7 @@ int TQEventLoop::activateTimers()
timeval currentTime; timeval currentTime;
int n_act = 0, maxCount = timerList->count(); int n_act = 0, maxCount = timerList->count();
TimerInfo *begin = 0; TimerInfo *begin = 0;
register TimerInfo *t; TimerInfo *t;
for ( ;; ) { for ( ;; ) {
if ( ! maxCount-- ) { if ( ! maxCount-- ) {

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

@ -736,7 +736,7 @@ TQObject::~TQObject()
} }
if ( parentObj ) // remove it from parent object if ( parentObj ) // remove it from parent object
parentObj->removeChild( this ); parentObj->removeChild( this );
register TQObject *obj; TQObject *obj;
if ( senderObjects ) { // disconnect from senders if ( senderObjects ) { // disconnect from senders
TQSenderObjectList *tmp = senderObjects; TQSenderObjectList *tmp = senderObjects;
senderObjects = 0; senderObjects = 0;
@ -753,7 +753,7 @@ TQObject::~TQObject()
TQConnectionList* clist = (*connections)[i]; // for each signal... TQConnectionList* clist = (*connections)[i]; // for each signal...
if ( !clist ) if ( !clist )
continue; continue;
register TQConnection *c; TQConnection *c;
TQConnectionListIt cit(*clist); TQConnectionListIt cit(*clist);
while( (c=cit.current()) ) { // for each connected slot... while( (c=cit.current()) ) { // for each connected slot...
++cit; ++cit;
@ -879,7 +879,7 @@ void *tqt_inheritedBy( TQMetaObject *superClass, const TQObject *object )
{ {
if (!object) if (!object)
return 0; return 0;
register TQMetaObject *mo = object->metaObject(); TQMetaObject *mo = object->metaObject();
while (mo) { while (mo) {
if (mo == superClass) if (mo == superClass)
return (void*)object; return (void*)object;
@ -1266,7 +1266,7 @@ bool TQObject::activate_filters( TQEvent *e )
if ( !eventFilters ) // no event filter if ( !eventFilters ) // no event filter
return FALSE; return FALSE;
TQObjectListIt it( *eventFilters ); TQObjectListIt it( *eventFilters );
register TQObject *obj = it.current(); TQObject *obj = it.current();
while ( obj ) { // send to all filters while ( obj ) { // send to all filters
++it; // until one returns TRUE ++it; // until one returns TRUE
if ( obj->eventFilter(this,e) ) { if ( obj->eventFilter(this,e) ) {
@ -2466,7 +2466,7 @@ bool TQObject::disconnectInternal( const TQObject *sender, int signal_index,
bool success = FALSE; bool success = FALSE;
TQConnectionList *clist; TQConnectionList *clist;
register TQConnection *c; TQConnection *c;
if ( signal_index == -1 ) { if ( signal_index == -1 ) {
for ( int i = 0; i < (int) s->connections->size(); i++ ) { for ( int i = 0; i < (int) s->connections->size(); i++ ) {
clist = (*s->connections)[i]; // for all signals... clist = (*s->connections)[i]; // for all signals...
@ -3060,7 +3060,7 @@ void TQObject::dumpObjectInfo()
if ( ( clist = connections->at( i ) ) ) { if ( ( clist = connections->at( i ) ) ) {
tqDebug( "\t%s", metaObject()->signal( i, TRUE )->name ); tqDebug( "\t%s", metaObject()->signal( i, TRUE )->name );
n++; n++;
register TQConnection *c; TQConnection *c;
TQConnectionListIt cit(*clist); TQConnectionListIt cit(*clist);
while ( (c=cit.current()) ) { while ( (c=cit.current()) ) {
++cit; ++cit;

@ -303,7 +303,7 @@ static void init_gc_array()
static void cleanup_gc_array( Display *dpy ) static void cleanup_gc_array( Display *dpy )
{ {
register TQGC *p = gc_array; TQGC *p = gc_array;
int i = gc_array_size; int i = gc_array_size;
if ( gc_array_init ) { if ( gc_array_init ) {
while ( i-- ) { while ( i-- ) {
@ -328,7 +328,7 @@ static GC alloc_gc( Display *dpy, int scrn, Drawable hd, bool monochrome=FALSE,
XSetGraphicsExposures( dpy, gc, False ); XSetGraphicsExposures( dpy, gc, False );
return gc; return gc;
} }
register TQGC *p = gc_array; TQGC *p = gc_array;
int i = gc_array_size; int i = gc_array_size;
if ( !gc_array_init ) // not initialized if ( !gc_array_init ) // not initialized
init_gc_array(); init_gc_array();
@ -364,7 +364,7 @@ static void free_gc( Display *dpy, GC gc, bool privateGC = FALSE )
XFreeGC( dpy, gc ); XFreeGC( dpy, gc );
return; return;
} }
register TQGC *p = gc_array; TQGC *p = gc_array;
int i = gc_array_size; int i = gc_array_size;
if ( gc_array_init ) { if ( gc_array_init ) {
while ( i-- ) { while ( i-- ) {

@ -290,7 +290,7 @@ extern const uchar *qt_get_bitflip_array(); // defined in qimage.cpp
static uchar *flip_bits( const uchar *bits, int len ) static uchar *flip_bits( const uchar *bits, int len )
{ {
register const uchar *p = bits; const uchar *p = bits;
const uchar *end = p + len; const uchar *end = p + len;
uchar *newdata = new uchar[len]; uchar *newdata = new uchar[len];
uchar *b = newdata; uchar *b = newdata;
@ -958,7 +958,7 @@ TQImage TQPixmap::convertToImage() const
image.setColor( 0, tqRgb(255,255,255) ); image.setColor( 0, tqRgb(255,255,255) );
image.setColor( 1, tqRgb(0,0,0) ); image.setColor( 1, tqRgb(0,0,0) );
} else if ( !trucol ) { // pixmap with colormap } else if ( !trucol ) { // pixmap with colormap
register uchar *p; uchar *p;
uchar *end; uchar *end;
uchar use[256]; // pixel-in-use table uchar use[256]; // pixel-in-use table
uchar pix[256]; // pixel translation table uchar pix[256]; // pixel translation table

@ -190,8 +190,8 @@ TQPointArray::TQPointArray( int nPoints, const TQCOORD *points )
void TQPointArray::translate( int dx, int dy ) void TQPointArray::translate( int dx, int dy )
{ {
register TQPoint *p = data(); TQPoint *p = data();
register int i = size(); int i = size();
TQPoint pt( dx, dy ); TQPoint pt( dx, dy );
while ( i-- ) { while ( i-- ) {
*p += pt; *p += pt;
@ -440,7 +440,7 @@ TQRect TQPointArray::boundingRect() const
{ {
if ( isEmpty() ) if ( isEmpty() )
return TQRect( 0, 0, 0, 0 ); // null rectangle return TQRect( 0, 0, 0, 0 ); // null rectangle
register TQPoint *pd = data(); TQPoint *pd = data();
int minx, maxx, miny, maxy; int minx, maxx, miny, maxy;
minx = maxx = pd->x(); minx = maxx = pd->x();
miny = maxy = pd->y(); miny = maxy = pd->y();
@ -937,7 +937,7 @@ TQPointArray TQPointArray::cubicBezier() const
if ( m < 2 ) // at least two points if ( m < 2 ) // at least two points
m = 2; m = 2;
TQPointArray p( m ); // p = Bezier point array TQPointArray p( m ); // p = Bezier point array
register TQPointData *pd = p.data(); TQPointData *pd = p.data();
float x0 = xvec[0], y0 = yvec[0]; float x0 = xvec[0], y0 = yvec[0];
float dt = 1.0F/m; float dt = 1.0F/m;
@ -1018,7 +1018,7 @@ TQPointArray TQPointArray::cubicBezier() const
TQDataStream &operator<<( TQDataStream &s, const TQPointArray &a ) TQDataStream &operator<<( TQDataStream &s, const TQPointArray &a )
{ {
register uint i; uint i;
uint len = a.size(); uint len = a.size();
s << len; // write size of array s << len; // write size of array
for ( i=0; i<len; i++ ) // write each point for ( i=0; i<len; i++ ) // write each point
@ -1037,7 +1037,7 @@ TQDataStream &operator<<( TQDataStream &s, const TQPointArray &a )
TQDataStream &operator>>( TQDataStream &s, TQPointArray &a ) TQDataStream &operator>>( TQDataStream &s, TQPointArray &a )
{ {
register uint i; uint i;
uint len; uint len;
s >> len; // read size of array s >> len; // read size of array
if ( !a.resize( len ) ) // no memory if ( !a.resize( len ) ) // no memory

@ -407,8 +407,8 @@ static bool
miInsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE, miInsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE,
int scanline, ScanLineListBlock **SLLBlock, int *iSLLBlock) int scanline, ScanLineListBlock **SLLBlock, int *iSLLBlock)
{ {
register EdgeTableEntry *start, *prev; EdgeTableEntry *start, *prev;
register ScanLineList *pSLL, *pPrevSLL; ScanLineList *pSLL, *pPrevSLL;
ScanLineListBlock *tmpSLLBlock; ScanLineListBlock *tmpSLLBlock;
/* /*
@ -505,7 +505,7 @@ typedef struct {
static void static void
miFreeStorage(ScanLineListBlock *pSLLBlock) miFreeStorage(ScanLineListBlock *pSLLBlock)
{ {
register ScanLineListBlock *tmpSLLBlock; ScanLineListBlock *tmpSLLBlock;
while (pSLLBlock) while (pSLLBlock)
{ {
@ -519,8 +519,8 @@ static bool
miCreateETandAET(int count, DDXPointPtr pts, EdgeTable *ET, miCreateETandAET(int count, DDXPointPtr pts, EdgeTable *ET,
EdgeTableEntry *AET, EdgeTableEntry *pETEs, ScanLineListBlock *pSLLBlock) EdgeTableEntry *AET, EdgeTableEntry *pETEs, ScanLineListBlock *pSLLBlock)
{ {
register DDXPointPtr top, bottom; DDXPointPtr top, bottom;
register DDXPointPtr PrevPt, CurrPt; DDXPointPtr PrevPt, CurrPt;
int iSLLBlock = 0; int iSLLBlock = 0;
int dy; int dy;
@ -609,8 +609,8 @@ miCreateETandAET(int count, DDXPointPtr pts, EdgeTable *ET,
static void static void
miloadAET(EdgeTableEntry *AET, EdgeTableEntry *ETEs) miloadAET(EdgeTableEntry *AET, EdgeTableEntry *ETEs)
{ {
register EdgeTableEntry *pPrevAET; EdgeTableEntry *pPrevAET;
register EdgeTableEntry *tmp; EdgeTableEntry *tmp;
pPrevAET = AET; pPrevAET = AET;
AET = AET->next; AET = AET->next;
@ -656,9 +656,9 @@ miloadAET(EdgeTableEntry *AET, EdgeTableEntry *ETEs)
static void static void
micomputeWAET(EdgeTableEntry *AET) micomputeWAET(EdgeTableEntry *AET)
{ {
register EdgeTableEntry *pWETE; EdgeTableEntry *pWETE;
register int inside = 1; int inside = 1;
register int isInside = 0; int isInside = 0;
AET->nextWETE = 0; AET->nextWETE = 0;
pWETE = AET; pWETE = AET;
@ -694,10 +694,10 @@ micomputeWAET(EdgeTableEntry *AET)
static int static int
miInsertionSort(EdgeTableEntry *AET) miInsertionSort(EdgeTableEntry *AET)
{ {
register EdgeTableEntry *pETEchase; EdgeTableEntry *pETEchase;
register EdgeTableEntry *pETEinsert; EdgeTableEntry *pETEinsert;
register EdgeTableEntry *pETEchaseBackTMP; EdgeTableEntry *pETEchaseBackTMP;
register int changed = 0; int changed = 0;
AET = AET->next; AET = AET->next;
while (AET) while (AET)
@ -769,12 +769,12 @@ void TQPolygonScanner::scan( const TQPointArray& pa, bool winding, int index, in
DDXPointPtr ptsIn = (DDXPointPtr)pa.data(); DDXPointPtr ptsIn = (DDXPointPtr)pa.data();
ptsIn += index; ptsIn += index;
register EdgeTableEntry *pAET; /* the Active Edge Table */ EdgeTableEntry *pAET; /* the Active Edge Table */
register int y; /* the current scanline */ int y; /* the current scanline */
register int nPts = 0; /* number of pts in buffer */ int nPts = 0; /* number of pts in buffer */
register EdgeTableEntry *pWETE; /* Winding Edge Table */ EdgeTableEntry *pWETE; /* Winding Edge Table */
register ScanLineList *pSLL; /* Current ScanLineList */ ScanLineList *pSLL; /* Current ScanLineList */
register DDXPointPtr ptsOut; /* ptr to output buffers */ DDXPointPtr ptsOut; /* ptr to output buffers */
int *width; int *width;
DDXPointRec FirstPoint[NUMPTSTOBUFFER]; /* the output buffers */ DDXPointRec FirstPoint[NUMPTSTOBUFFER]; /* the output buffers */
int FirstWidth[NUMPTSTOBUFFER]; int FirstWidth[NUMPTSTOBUFFER];

@ -89,8 +89,8 @@ struct TQRegionPrivate {
static void UnionRegion(TQRegionPrivate *reg1, TQRegionPrivate *reg2, TQRegionPrivate *newReg); static void UnionRegion(TQRegionPrivate *reg1, TQRegionPrivate *reg2, TQRegionPrivate *newReg);
static void IntersectRegion(TQRegionPrivate *reg1, TQRegionPrivate *reg2, register TQRegionPrivate *newReg); static void IntersectRegion(TQRegionPrivate *reg1, TQRegionPrivate *reg2, TQRegionPrivate *newReg);
static void miRegionOp(register TQRegionPrivate *newReg, TQRegionPrivate *reg1, TQRegionPrivate *reg2, static void miRegionOp(TQRegionPrivate *newReg, TQRegionPrivate *reg1, TQRegionPrivate *reg2,
void (*overlapFunc)(...), void (*overlapFunc)(...),
void (*nonOverlap1Func)(...), void (*nonOverlap1Func)(...),
void (*nonOverlap2Func)(...)); void (*nonOverlap2Func)(...));
@ -300,7 +300,7 @@ typedef void (*voidProcp)(...);
static static
void UnionRectWithRegion(register const TQRect *rect, TQRegionPrivate *source, TQRegionPrivate *dest) void UnionRectWithRegion(const TQRect *rect, TQRegionPrivate *source, TQRegionPrivate *dest)
{ {
TQRegionPrivate region; TQRegionPrivate region;
@ -333,7 +333,7 @@ void UnionRectWithRegion(register const TQRect *rect, TQRegionPrivate *source, T
static void static void
miSetExtents (TQRegionPrivate *pReg) miSetExtents (TQRegionPrivate *pReg)
{ {
register TQRect *pBox, TQRect *pBox,
*pBoxEnd, *pBoxEnd,
*pExtents; *pExtents;
@ -383,10 +383,10 @@ miSetExtents (TQRegionPrivate *pReg)
static static
int int
OffsetRegion(register TQRegionPrivate *pRegion, register int x, register int y) OffsetRegion(TQRegionPrivate *pRegion, int x, int y)
{ {
register int nbox; int nbox;
register TQRect *pbox; TQRect *pbox;
pbox = pRegion->rects.data(); pbox = pRegion->rects.data();
nbox = pRegion->numRects; nbox = pRegion->numRects;
@ -419,12 +419,12 @@ OffsetRegion(register TQRegionPrivate *pRegion, register int x, register int y)
/* static void*/ /* static void*/
static static
int int
miIntersectO (register TQRegionPrivate *pReg, register TQRect *r1, TQRect *r1End, miIntersectO (TQRegionPrivate *pReg, TQRect *r1, TQRect *r1End,
register TQRect *r2, TQRect *r2End, int y1, int y2) TQRect *r2, TQRect *r2End, int y1, int y2)
{ {
register int x1; int x1;
register int x2; int x2;
register TQRect *pNextRect; TQRect *pNextRect;
pNextRect = pReg->rects.data() + pReg->numRects; pNextRect = pReg->rects.data() + pReg->numRects;
@ -474,7 +474,7 @@ miIntersectO (register TQRegionPrivate *pReg, register TQRect *r1, TQRect *r1End
static static
void void
IntersectRegion(TQRegionPrivate *reg1, TQRegionPrivate *reg2, register TQRegionPrivate *newReg) IntersectRegion(TQRegionPrivate *reg1, TQRegionPrivate *reg2, TQRegionPrivate *newReg)
{ {
/* check for trivial reject */ /* check for trivial reject */
if ( (!(reg1->numRects)) || (!(reg2->numRects)) || if ( (!(reg1->numRects)) || (!(reg2->numRects)) ||
@ -519,14 +519,14 @@ IntersectRegion(TQRegionPrivate *reg1, TQRegionPrivate *reg2, register TQRegionP
/* static int*/ /* static int*/
static static
int int
miCoalesce (register TQRegionPrivate *pReg, int prevStart, int curStart) miCoalesce (TQRegionPrivate *pReg, int prevStart, int curStart)
//Region pReg; /* Region to coalesce */ //Region pReg; /* Region to coalesce */
//prevStart; /* Index of start of previous band */ //prevStart; /* Index of start of previous band */
//curStart; /* Index of start of current band */ //curStart; /* Index of start of current band */
{ {
register TQRect *pPrevBox; /* Current box in previous band */ TQRect *pPrevBox; /* Current box in previous band */
register TQRect *pCurBox; /* Current box in current band */ TQRect *pCurBox; /* Current box in current band */
register TQRect *pRegEnd; /* End of region */ TQRect *pRegEnd; /* End of region */
int curNumRects; /* Number of rectangles in current int curNumRects; /* Number of rectangles in current
* band */ * band */
int prevNumRects; /* Number of rectangles in previous int prevNumRects; /* Number of rectangles in previous
@ -670,11 +670,11 @@ miCoalesce (register TQRegionPrivate *pReg, int prevStart, int curStart)
*/ */
/* static void*/ /* static void*/
static void static void
miRegionOp(register TQRegionPrivate *newReg, TQRegionPrivate *reg1, TQRegionPrivate *reg2, miRegionOp(TQRegionPrivate *newReg, TQRegionPrivate *reg1, TQRegionPrivate *reg2,
void (*overlapFunc)(...), void (*overlapFunc)(...),
void (*nonOverlap1Func)(...), void (*nonOverlap1Func)(...),
void (*nonOverlap2Func)(...)) void (*nonOverlap2Func)(...))
//register Region newReg; /* Place to store result */ //Region newReg; /* Place to store result */
//Region reg1; /* First region in operation */ //Region reg1; /* First region in operation */
//Region reg2; /* 2d region in operation */ //Region reg2; /* 2d region in operation */
//void (*overlapFunc)(); /* Function to call for over- //void (*overlapFunc)(); /* Function to call for over-
@ -686,18 +686,18 @@ miRegionOp(register TQRegionPrivate *newReg, TQRegionPrivate *reg1, TQRegionPriv
//* overlapping bands in region //* overlapping bands in region
//* 2 */ //* 2 */
{ {
register TQRect *r1; /* Pointer into first region */ TQRect *r1; /* Pointer into first region */
register TQRect *r2; /* Pointer into 2d region */ TQRect *r2; /* Pointer into 2d region */
TQRect *r1End; /* End of 1st region */ TQRect *r1End; /* End of 1st region */
TQRect *r2End; /* End of 2d region */ TQRect *r2End; /* End of 2d region */
register int ybot; /* Bottom of intersection */ int ybot; /* Bottom of intersection */
register int ytop; /* Top of intersection */ int ytop; /* Top of intersection */
int prevBand; /* Index of start of int prevBand; /* Index of start of
* previous band in newReg */ * previous band in newReg */
int curBand; /* Index of start of current int curBand; /* Index of start of current
* band in newReg */ * band in newReg */
register TQRect *r1BandEnd; /* End of current band in r1 */ TQRect *r1BandEnd; /* End of current band in r1 */
register TQRect *r2BandEnd; /* End of current band in r2 */ TQRect *r2BandEnd; /* End of current band in r2 */
int top; /* Top of non-overlapping int top; /* Top of non-overlapping
* band */ * band */
int bot; /* Bottom of non-overlapping int bot; /* Bottom of non-overlapping
@ -951,10 +951,10 @@ miRegionOp(register TQRegionPrivate *newReg, TQRegionPrivate *reg1, TQRegionPriv
/* static void*/ /* static void*/
static static
int int
miUnionNonO (register TQRegionPrivate *pReg, register TQRect * r, miUnionNonO (TQRegionPrivate *pReg, TQRect * r,
TQRect * rEnd, register int y1, register int y2) TQRect * rEnd, int y1, int y2)
{ {
register TQRect * pNextRect; TQRect * pNextRect;
pNextRect = pReg->rects.data() + pReg->numRects; pNextRect = pReg->rects.data() + pReg->numRects;
@ -993,10 +993,10 @@ miUnionNonO (register TQRegionPrivate *pReg, register TQRect * r,
/* static void*/ /* static void*/
static static
int int
miUnionO (register TQRegionPrivate *pReg, register TQRect *r1, TQRect *r1End, miUnionO (TQRegionPrivate *pReg, TQRect *r1, TQRect *r1End,
register TQRect *r2, TQRect *r2End, register int y1, register int y2) TQRect *r2, TQRect *r2End, int y1, int y2)
{ {
register TQRect *pNextRect; TQRect *pNextRect;
pNextRect = pReg->rects.data() + pReg->numRects; pNextRect = pReg->rects.data() + pReg->numRects;
@ -1121,10 +1121,10 @@ static void UnionRegion(TQRegionPrivate *reg1, TQRegionPrivate *reg2, TQRegionPr
/* static void*/ /* static void*/
static static
int int
miSubtractNonO1 (register TQRegionPrivate *pReg, register TQRect *r, miSubtractNonO1 (TQRegionPrivate *pReg, TQRect *r,
TQRect *rEnd, register int y1, register int y2) TQRect *rEnd, int y1, int y2)
{ {
register TQRect *pNextRect; TQRect *pNextRect;
pNextRect = pReg->rects.data() + pReg->numRects; pNextRect = pReg->rects.data() + pReg->numRects;
@ -1160,11 +1160,11 @@ miSubtractNonO1 (register TQRegionPrivate *pReg, register TQRect *r,
/* static void*/ /* static void*/
static static
int int
miSubtractO (register TQRegionPrivate *pReg, register TQRect *r1, TQRect *r1End, miSubtractO (TQRegionPrivate *pReg, TQRect *r1, TQRect *r1End,
register TQRect *r2, TQRect *r2End, register int y1, register int y2) TQRect *r2, TQRect *r2End, int y1, int y2)
{ {
register TQRect *pNextRect; TQRect *pNextRect;
register int x1; int x1;
x1 = r1->left(); x1 = r1->left();
@ -1285,7 +1285,7 @@ miSubtractO (register TQRegionPrivate *pReg, register TQRect *r1, TQRect *r1End,
*----------------------------------------------------------------------- *-----------------------------------------------------------------------
*/ */
static void SubtractRegion(TQRegionPrivate *regM, TQRegionPrivate *regS, register TQRegionPrivate *regD) static void SubtractRegion(TQRegionPrivate *regM, TQRegionPrivate *regS, TQRegionPrivate *regD)
{ {
/* check for trivial reject */ /* check for trivial reject */
if ( (!(regM->numRects)) || (!(regS->numRects)) || if ( (!(regM->numRects)) || (!(regS->numRects)) ||
@ -1361,13 +1361,13 @@ static bool PointInRegion( TQRegionPrivate *pRegion, int x, int y )
return FALSE; return FALSE;
} }
static bool RectInRegion(register TQRegionPrivate *region, static bool RectInRegion(TQRegionPrivate *region,
int rx, int ry, unsigned int rwidth, unsigned int rheight) int rx, int ry, unsigned int rwidth, unsigned int rheight)
{ {
register TQRect *pbox; TQRect *pbox;
register TQRect *pboxEnd; TQRect *pboxEnd;
TQRect rect(rx, ry, rwidth, rheight); TQRect rect(rx, ry, rwidth, rheight);
register TQRect *prect = &rect; TQRect *prect = &rect;
int partIn, partOut; int partIn, partOut;
/* this is (just) a useful optimization */ /* this is (just) a useful optimization */
@ -1800,8 +1800,8 @@ static void
InsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE, int scanline, InsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE, int scanline,
ScanLineListBlock **SLLBlock, int *iSLLBlock) ScanLineListBlock **SLLBlock, int *iSLLBlock)
{ {
register EdgeTableEntry *start, *prev; EdgeTableEntry *start, *prev;
register ScanLineList *pSLL, *pPrevSLL; ScanLineList *pSLL, *pPrevSLL;
ScanLineListBlock *tmpSLLBlock; ScanLineListBlock *tmpSLLBlock;
/* /*
@ -1881,12 +1881,12 @@ InsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE, int scanline,
*/ */
static void static void
CreateETandAET(register int count, register TQPoint *pts, CreateETandAET(int count, TQPoint *pts,
EdgeTable *ET, EdgeTableEntry *AET, register EdgeTableEntry *pETEs, EdgeTable *ET, EdgeTableEntry *AET, EdgeTableEntry *pETEs,
ScanLineListBlock *pSLLBlock) ScanLineListBlock *pSLLBlock)
{ {
register TQPoint *top, *bottom; TQPoint *top, *bottom;
register TQPoint *PrevPt, *CurrPt; TQPoint *PrevPt, *CurrPt;
int iSLLBlock = 0; int iSLLBlock = 0;
int dy; int dy;
@ -1969,10 +1969,10 @@ CreateETandAET(register int count, register TQPoint *pts,
*/ */
static void static void
loadAET(register EdgeTableEntry *AET, register EdgeTableEntry *ETEs) loadAET(EdgeTableEntry *AET, EdgeTableEntry *ETEs)
{ {
register EdgeTableEntry *pPrevAET; EdgeTableEntry *pPrevAET;
register EdgeTableEntry *tmp; EdgeTableEntry *tmp;
pPrevAET = AET; pPrevAET = AET;
AET = AET->next; AET = AET->next;
@ -2016,11 +2016,11 @@ loadAET(register EdgeTableEntry *AET, register EdgeTableEntry *ETEs)
* *
*/ */
static void static void
computeWAET(register EdgeTableEntry *AET) computeWAET(EdgeTableEntry *AET)
{ {
register EdgeTableEntry *pWETE; EdgeTableEntry *pWETE;
register int inside = 1; int inside = 1;
register int isInside = 0; int isInside = 0;
AET->nextWETE = (EdgeTableEntry *)NULL; AET->nextWETE = (EdgeTableEntry *)NULL;
pWETE = AET; pWETE = AET;
@ -2054,12 +2054,12 @@ computeWAET(register EdgeTableEntry *AET)
*/ */
static int static int
InsertionSort(register EdgeTableEntry *AET) InsertionSort(EdgeTableEntry *AET)
{ {
register EdgeTableEntry *pETEchase; EdgeTableEntry *pETEchase;
register EdgeTableEntry *pETEinsert; EdgeTableEntry *pETEinsert;
register EdgeTableEntry *pETEchaseBackTMP; EdgeTableEntry *pETEchaseBackTMP;
register int changed = 0; int changed = 0;
AET = AET->next; AET = AET->next;
while (AET) while (AET)
@ -2090,9 +2090,9 @@ InsertionSort(register EdgeTableEntry *AET)
* Clean up our act. * Clean up our act.
*/ */
static void static void
FreeStorage(register ScanLineListBlock *pSLLBlock) FreeStorage(ScanLineListBlock *pSLLBlock)
{ {
register ScanLineListBlock *tmpSLLBlock; ScanLineListBlock *tmpSLLBlock;
while (pSLLBlock) while (pSLLBlock)
{ {
@ -2110,15 +2110,15 @@ FreeStorage(register ScanLineListBlock *pSLLBlock)
* stack by the calling procedure. * stack by the calling procedure.
* *
*/ */
static int PtsToRegion(register int numFullPtBlocks, register int iCurPtBlock, static int PtsToRegion(int numFullPtBlocks, int iCurPtBlock,
POINTBLOCK *FirstPtBlock, TQRegionPrivate *reg) POINTBLOCK *FirstPtBlock, TQRegionPrivate *reg)
{ {
register TQRect *rects; TQRect *rects;
register TQPoint *pts; TQPoint *pts;
register POINTBLOCK *CurPtBlock; POINTBLOCK *CurPtBlock;
register int i; int i;
register TQRect *extents; TQRect *extents;
register int numRects; int numRects;
extents = &reg->extents; extents = &reg->extents;
@ -2182,12 +2182,12 @@ static TQRegionPrivate *PolygonRegion(TQPoint *Pts, int Count, int rule)
//int rule; /* winding rule */ //int rule; /* winding rule */
{ {
TQRegionPrivate *region; TQRegionPrivate *region;
register EdgeTableEntry *pAET; /* Active Edge Table */ EdgeTableEntry *pAET; /* Active Edge Table */
register int y; /* current scanline */ int y; /* current scanline */
register int iPts = 0; /* number of pts in buffer */ int iPts = 0; /* number of pts in buffer */
register EdgeTableEntry *pWETE; /* Winding Edge Table Entry*/ EdgeTableEntry *pWETE; /* Winding Edge Table Entry*/
register ScanLineList *pSLL; /* current scanLineList */ ScanLineList *pSLL; /* current scanLineList */
register TQPoint *pts; /* output buffer */ TQPoint *pts; /* output buffer */
EdgeTableEntry *pPrevAET; /* ptr to previous AET */ EdgeTableEntry *pPrevAET; /* ptr to previous AET */
EdgeTable ET; /* header node for ET */ EdgeTable ET; /* header node for ET */
EdgeTableEntry AET; /* header node for AET */ EdgeTableEntry AET; /* header node for AET */

@ -4093,7 +4093,7 @@ TQTextParagraph::~TQTextParagraph()
{ {
delete str; delete str;
if ( hasdoc ) { if ( hasdoc ) {
register TQTextDocument *doc = document(); TQTextDocument *doc = document();
if ( this == doc->minwParag ) { if ( this == doc->minwParag ) {
doc->minwParag = 0; doc->minwParag = 0;
doc->minw = 0; doc->minw = 0;

@ -1044,7 +1044,7 @@ void TQWidget::destroyMapper()
TQWidgetIntDictIt it( *((TQWidgetIntDict*)mapper) ); TQWidgetIntDictIt it( *((TQWidgetIntDict*)mapper) );
TQWidgetMapper * myMapper = mapper; TQWidgetMapper * myMapper = mapper;
mapper = 0; mapper = 0;
register TQWidget *w; TQWidget *w;
while ( (w=it.current()) ) { // remove parents widgets while ( (w=it.current()) ) { // remove parents widgets
++it; ++it;
if ( !w->parentObj ) // widget is a parent if ( !w->parentObj ) // widget is a parent
@ -4172,7 +4172,7 @@ void TQWidget::showChildren( bool spontaneous )
{ {
if ( children() ) { if ( children() ) {
TQObjectListIt it(*children()); TQObjectListIt it(*children());
register TQObject *object; TQObject *object;
TQWidget *widget; TQWidget *widget;
while ( it ) { while ( it ) {
object = it.current(); object = it.current();
@ -4197,7 +4197,7 @@ void TQWidget::hideChildren( bool spontaneous )
{ {
if ( children() ) { if ( children() ) {
TQObjectListIt it(*children()); TQObjectListIt it(*children());
register TQObject *object; TQObject *object;
TQWidget *widget; TQWidget *widget;
while ( it ) { while ( it ) {
object = it.current(); object = it.current();

@ -794,7 +794,7 @@ void TQWidget::destroy( bool destroyWindow, bool destroySubWindows )
clearWState( WState_Created ); clearWState( WState_Created );
if ( children() ) { if ( children() ) {
TQObjectListIt it(*children()); TQObjectListIt it(*children());
register TQObject *obj; TQObject *obj;
while ( (obj=it.current()) ) { // destroy all widget children while ( (obj=it.current()) ) { // destroy all widget children
++it; ++it;
if ( obj->isWidgetType() ) if ( obj->isWidgetType() )
@ -2476,7 +2476,7 @@ void TQWidget::scroll( int dx, int dy, const TQRect& r )
if ( !valid_rect && children() ) { // scroll children if ( !valid_rect && children() ) { // scroll children
TQPoint pd( dx, dy ); TQPoint pd( dx, dy );
TQObjectListIt it(*children()); TQObjectListIt it(*children());
register TQObject *object; TQObject *object;
while ( it ) { // move all children while ( it ) { // move all children
object = it.current(); object = it.current();
if ( object->isWidgetType() ) { if ( object->isWidgetType() ) {

@ -724,8 +724,8 @@ TQRegion TQWMatrix::operator * (const TQRegion &r ) const
return r; return r;
TQMemArray<TQRect> rects = r.rects(); TQMemArray<TQRect> rects = r.rects();
TQRegion result; TQRegion result;
register TQRect *rect = rects.data(); TQRect *rect = rects.data();
register int i = rects.size(); int i = rects.size();
if ( _m12 == 0.0F && _m21 == 0.0F && _m11 > 1.0F && _m22 > 1.0F ) { if ( _m12 == 0.0F && _m21 == 0.0F && _m11 > 1.0F && _m22 > 1.0F ) {
// simple case, no rotation // simple case, no rotation
while ( i ) { while ( i ) {

@ -1248,9 +1248,9 @@ extern int yylex (void);
*/ */
YY_DECL YY_DECL
{ {
register yy_state_type yy_current_state; yy_state_type yy_current_state;
register char *yy_cp, *yy_bp; char *yy_cp, *yy_bp;
register int yy_act; int yy_act;
#line 113 "moc.l" #line 113 "moc.l"
@ -1300,7 +1300,7 @@ YY_DECL
yy_match: yy_match:
do do
{ {
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
if ( yy_accept[yy_current_state] ) if ( yy_accept[yy_current_state] )
{ {
(yy_last_accepting_state) = yy_current_state; (yy_last_accepting_state) = yy_current_state;
@ -2448,9 +2448,9 @@ case YY_STATE_EOF(IN_CLASSINFO):
*/ */
static int yy_get_next_buffer (void) static int yy_get_next_buffer (void)
{ {
register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
register char *source = (yytext_ptr); char *source = (yytext_ptr);
register int number_to_move, i; int number_to_move, i;
int ret_val; int ret_val;
if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
@ -2582,15 +2582,15 @@ static int yy_get_next_buffer (void)
static yy_state_type yy_get_previous_state (void) static yy_state_type yy_get_previous_state (void)
{ {
register yy_state_type yy_current_state; yy_state_type yy_current_state;
register char *yy_cp; char *yy_cp;
yy_current_state = (yy_start); yy_current_state = (yy_start);
yy_current_state += YY_AT_BOL(); yy_current_state += YY_AT_BOL();
for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
{ {
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
if ( yy_accept[yy_current_state] ) if ( yy_accept[yy_current_state] )
{ {
(yy_last_accepting_state) = yy_current_state; (yy_last_accepting_state) = yy_current_state;
@ -2615,10 +2615,10 @@ static int yy_get_next_buffer (void)
*/ */
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
{ {
register int yy_is_jam; int yy_is_jam;
register char *yy_cp = (yy_c_buf_p); char *yy_cp = (yy_c_buf_p);
register YY_CHAR yy_c = 1; YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] ) if ( yy_accept[yy_current_state] )
{ {
(yy_last_accepting_state) = yy_current_state; (yy_last_accepting_state) = yy_current_state;
@ -2636,9 +2636,9 @@ static int yy_get_next_buffer (void)
return yy_is_jam ? 0 : yy_current_state; return yy_is_jam ? 0 : yy_current_state;
} }
static void yyunput (int c, register char * yy_bp ) static void yyunput (int c, char * yy_bp )
{ {
register char *yy_cp; char *yy_cp;
yy_cp = (yy_c_buf_p); yy_cp = (yy_c_buf_p);
@ -2648,10 +2648,10 @@ static int yy_get_next_buffer (void)
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
{ /* need to shift things up to make room */ { /* need to shift things up to make room */
/* +2 for EOB chars. */ /* +2 for EOB chars. */
register int number_to_move = (yy_n_chars) + 2; int number_to_move = (yy_n_chars) + 2;
register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
register char *source = char *source =
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
@ -3266,7 +3266,7 @@ int yylex_destroy (void)
#ifndef yytext_ptr #ifndef yytext_ptr
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
{ {
register int i; int i;
for ( i = 0; i < n; ++i ) for ( i = 0; i < n; ++i )
s1[i] = s2[i]; s1[i] = s2[i];
} }
@ -3275,7 +3275,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
#ifdef YY_NEED_STRLEN #ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char * s ) static int yy_flex_strlen (yyconst char * s )
{ {
register int n; int n;
for ( n = 0; s[n]; ++n ) for ( n = 0; s[n]; ++n )
; ;

@ -5359,7 +5359,7 @@ void TQTable::repaintSelections( TQTableSelection *oldSelection,
} }
if ( updateHorizontal && numCols() > 0 && left >= 0 && !isRowSelection( selectionMode() ) ) { if ( updateHorizontal && numCols() > 0 && left >= 0 && !isRowSelection( selectionMode() ) ) {
register int *s = &topHeader->states.data()[left]; int *s = &topHeader->states.data()[left];
for ( i = left; i <= right; ++i ) { for ( i = left; i <= right; ++i ) {
if ( !isColumnSelected( i ) ) if ( !isColumnSelected( i ) )
*s = TQTableHeader::Normal; *s = TQTableHeader::Normal;
@ -5373,7 +5373,7 @@ void TQTable::repaintSelections( TQTableSelection *oldSelection,
} }
if ( updateVertical && numRows() > 0 && top >= 0 ) { if ( updateVertical && numRows() > 0 && top >= 0 ) {
register int *s = &leftHeader->states.data()[top]; int *s = &leftHeader->states.data()[top];
for ( i = top; i <= bottom; ++i ) { for ( i = top; i <= bottom; ++i ) {
if ( !isRowSelected( i ) ) if ( !isRowSelected( i ) )
*s = TQTableHeader::Normal; *s = TQTableHeader::Normal;
@ -6641,7 +6641,7 @@ void TQTableHeader::setSectionStateToAll( SectionState state )
if ( isRowSelection( table->selectionMode() ) && orientation() == Horizontal ) if ( isRowSelection( table->selectionMode() ) && orientation() == Horizontal )
return; return;
register int *d = (int *) states.data(); int *d = (int *) states.data();
int n = count(); int n = count();
while (n >= 4) { while (n >= 4) {
@ -7053,7 +7053,7 @@ void TQTableHeader::updateSelections()
int b = sectionAt( endPos ); int b = sectionAt( endPos );
int start = TQMIN( a, b ); int start = TQMIN( a, b );
int end = TQMAX( a, b ); int end = TQMAX( a, b );
register int *s = states.data(); int *s = states.data();
for ( int i = 0; i < count(); ++i ) { for ( int i = 0; i < count(); ++i ) {
if ( i < start || i > end ) if ( i < start || i > end )
*s = oldStates.data()[ i ]; *s = oldStates.data()[ i ];
@ -7079,8 +7079,8 @@ void TQTableHeader::updateSelections()
void TQTableHeader::saveStates() void TQTableHeader::saveStates()
{ {
oldStates.resize( count() ); oldStates.resize( count() );
register int *s = states.data(); int *s = states.data();
register int *s2 = oldStates.data(); int *s2 = oldStates.data();
for ( int i = 0; i < count(); ++i ) { for ( int i = 0; i < count(); ++i ) {
*s2 = *s; *s2 = *s;
++s2; ++s2;

@ -372,7 +372,7 @@ bool TQBitArray::toggleBit( uint index )
return FALSE; return FALSE;
} }
#endif #endif
register uchar *p = (uchar *)data() + (index>>3); uchar *p = (uchar *)data() + (index>>3);
uchar b = (1 << (index & 7)); // bit position uchar b = (1 << (index & 7)); // bit position
uchar c = *p & b; // read bit uchar c = *p & b; // read bit
*p ^= b; // toggle bit *p ^= b; // toggle bit
@ -436,8 +436,8 @@ bool TQBitArray::toggleBit( uint index )
TQBitArray &TQBitArray::operator&=( const TQBitArray &a ) TQBitArray &TQBitArray::operator&=( const TQBitArray &a )
{ {
resize( TQMAX(size(), a.size()) ); resize( TQMAX(size(), a.size()) );
register uchar *a1 = (uchar *)data(); uchar *a1 = (uchar *)data();
register uchar *a2 = (uchar *)a.data(); uchar *a2 = (uchar *)a.data();
int n = TQMIN( TQByteArray::size(), a.TQByteArray::size() ); int n = TQMIN( TQByteArray::size(), a.TQByteArray::size() );
int p = TQMAX( TQByteArray::size(), a.TQByteArray::size() ) - n; int p = TQMAX( TQByteArray::size(), a.TQByteArray::size() ) - n;
while ( n-- > 0 ) while ( n-- > 0 )
@ -467,8 +467,8 @@ TQBitArray &TQBitArray::operator&=( const TQBitArray &a )
TQBitArray &TQBitArray::operator|=( const TQBitArray &a ) TQBitArray &TQBitArray::operator|=( const TQBitArray &a )
{ {
resize( TQMAX(size(), a.size()) ); resize( TQMAX(size(), a.size()) );
register uchar *a1 = (uchar *)data(); uchar *a1 = (uchar *)data();
register uchar *a2 = (uchar *)a.data(); uchar *a2 = (uchar *)a.data();
int n = TQMIN( TQByteArray::size(), a.TQByteArray::size() ); int n = TQMIN( TQByteArray::size(), a.TQByteArray::size() );
while ( n-- > 0 ) while ( n-- > 0 )
*a1++ |= *a2++; *a1++ |= *a2++;
@ -495,8 +495,8 @@ TQBitArray &TQBitArray::operator|=( const TQBitArray &a )
TQBitArray &TQBitArray::operator^=( const TQBitArray &a ) TQBitArray &TQBitArray::operator^=( const TQBitArray &a )
{ {
resize( TQMAX(size(), a.size()) ); resize( TQMAX(size(), a.size()) );
register uchar *a1 = (uchar *)data(); uchar *a1 = (uchar *)data();
register uchar *a2 = (uchar *)a.data(); uchar *a2 = (uchar *)a.data();
int n = TQMIN( TQByteArray::size(), a.TQByteArray::size() ); int n = TQMIN( TQByteArray::size(), a.TQByteArray::size() );
while ( n-- > 0 ) while ( n-- > 0 )
*a1++ ^= *a2++; *a1++ ^= *a2++;
@ -517,8 +517,8 @@ TQBitArray &TQBitArray::operator^=( const TQBitArray &a )
TQBitArray TQBitArray::operator~() const TQBitArray TQBitArray::operator~() const
{ {
TQBitArray a( size() ); TQBitArray a( size() );
register uchar *a1 = (uchar *)data(); uchar *a1 = (uchar *)data();
register uchar *a2 = (uchar *)a.data(); uchar *a2 = (uchar *)a.data();
int n = TQByteArray::size(); int n = TQByteArray::size();
while ( n-- ) while ( n-- )
*a2++ = ~*a1++; *a2++ = ~*a1++;

@ -72,8 +72,8 @@
void *tqmemmove( void *dst, const void *src, uint len ) void *tqmemmove( void *dst, const void *src, uint len )
{ {
register char *d; char *d;
register char *s; char *s;
if ( dst > src ) { if ( dst > src ) {
d = (char *)dst + len - 1; d = (char *)dst + len - 1;
s = (char *)src + len - 1; s = (char *)src + len - 1;
@ -218,8 +218,8 @@ char *tqstrncpy( char *dst, const char *src, uint len )
int tqstricmp( const char *str1, const char *str2 ) int tqstricmp( const char *str1, const char *str2 )
{ {
register const uchar *s1 = (const uchar *)str1; const uchar *s1 = (const uchar *)str1;
register const uchar *s2 = (const uchar *)str2; const uchar *s2 = (const uchar *)str2;
int res; int res;
uchar c; uchar c;
if ( !s1 || !s2 ) if ( !s1 || !s2 )
@ -252,8 +252,8 @@ int tqstricmp( const char *str1, const char *str2 )
int tqstrnicmp( const char *str1, const char *str2, uint len ) int tqstrnicmp( const char *str1, const char *str2, uint len )
{ {
register const uchar *s1 = (const uchar *)str1; const uchar *s1 = (const uchar *)str1;
register const uchar *s2 = (const uchar *)str2; const uchar *s2 = (const uchar *)str2;
int res; int res;
uchar c; uchar c;
if ( !s1 || !s2 ) if ( !s1 || !s2 )
@ -273,8 +273,8 @@ static bool crc_tbl_init = FALSE;
static void createCRC16Table() // build CRC16 lookup table static void createCRC16Table() // build CRC16 lookup table
{ {
register uint i; uint i;
register uint j; uint j;
uint v0, v1, v2, v3; uint v0, v1, v2, v3;
for ( i = 0; i < 16; i++ ) { for ( i = 0; i < 16; i++ ) {
v0 = i & 1; v0 = i & 1;
@ -322,7 +322,7 @@ TQ_UINT16 tqChecksum( const char *data, uint len )
crc_tbl_init = TRUE; crc_tbl_init = TRUE;
} }
} }
register TQ_UINT16 crc = 0xffff; TQ_UINT16 crc = 0xffff;
uchar c; uchar c;
uchar *p = (uchar *)data; uchar *p = (uchar *)data;
while ( len-- ) { while ( len-- ) {
@ -940,7 +940,7 @@ int TQCString::find( char c, int index, bool cs ) const
{ {
if ( (uint)index >= size() ) // index outside string if ( (uint)index >= size() ) // index outside string
return -1; return -1;
register const char *d; const char *d;
if ( cs ) { // case sensitive if ( cs ) { // case sensitive
d = strchr( data()+index, c ); d = strchr( data()+index, c );
} else { } else {
@ -1056,8 +1056,8 @@ int TQCString::find( const char *str, int index, bool cs, uint l ) const
int TQCString::findRev( char c, int index, bool cs ) const int TQCString::findRev( char c, int index, bool cs ) const
{ {
register const char *b = data(); const char *b = data();
register const char *d; const char *d;
if ( index < 0 ) if ( index < 0 )
index = length(); index = length();
if ( (uint)index >= size() ) if ( (uint)index >= size() )
@ -1290,7 +1290,7 @@ TQCString TQCString::mid( uint index, uint len ) const
} else { } else {
if ( len > slen-index ) if ( len > slen-index )
len = slen - index; len = slen - index;
register char *p = data()+index; char *p = data()+index;
TQCString s( len+1 ); TQCString s( len+1 );
strncpy( s.data(), p, len ); strncpy( s.data(), p, len );
*(s.data()+len) = '\0'; *(s.data()+len) = '\0';
@ -1390,7 +1390,7 @@ TQCString TQCString::rightJustify( uint width, char fill, bool truncate ) const
TQCString TQCString::lower() const TQCString TQCString::lower() const
{ {
TQCString s( data() ); TQCString s( data() );
register char *p = s.data(); char *p = s.data();
if ( p ) { if ( p ) {
while ( *p ) { while ( *p ) {
*p = tolower( (uchar) *p ); *p = tolower( (uchar) *p );
@ -1416,7 +1416,7 @@ TQCString TQCString::lower() const
TQCString TQCString::upper() const TQCString TQCString::upper() const
{ {
TQCString s( data() ); TQCString s( data() );
register char *p = s.data(); char *p = s.data();
if ( p ) { if ( p ) {
while ( *p ) { while ( *p ) {
*p = toupper(*p); *p = toupper(*p);
@ -1448,7 +1448,7 @@ TQCString TQCString::stripWhiteSpace() const
if ( isEmpty() ) // nothing to do if ( isEmpty() ) // nothing to do
return copy(); return copy();
register char *s = data(); char *s = data();
TQCString result = s; TQCString result = s;
int reslen = result.length(); int reslen = result.length();
if ( !isspace((uchar) s[0]) && !isspace((uchar) s[reslen-1]) ) if ( !isspace((uchar) s[0]) && !isspace((uchar) s[reslen-1]) )
@ -2107,7 +2107,7 @@ TQCString &TQCString::setNum( long n )
{ {
detach(); detach();
char buf[20]; char buf[20];
register char *p = &buf[19]; char *p = &buf[19];
bool neg; bool neg;
if ( n < 0 ) { if ( n < 0 ) {
neg = TRUE; neg = TRUE;
@ -2137,7 +2137,7 @@ TQCString &TQCString::setNum( ulong n )
{ {
detach(); detach();
char buf[20]; char buf[20];
register char *p = &buf[19]; char *p = &buf[19];
*p = '\0'; *p = '\0';
do { do {
*--p = ((int)(n%10)) + '0'; *--p = ((int)(n%10)) + '0';
@ -2195,7 +2195,7 @@ TQCString &TQCString::setNum( double n, char f, int prec )
tqWarning( "TQCString::setNum: Invalid format char '%c'", f ); tqWarning( "TQCString::setNum: Invalid format char '%c'", f );
#endif #endif
char format[20]; char format[20];
register char *fs = format; // generate format string char *fs = format; // generate format string
*fs++ = '%'; // "%.<prec>l<f>" *fs++ = '%'; // "%.<prec>l<f>"
if ( prec > 99 ) if ( prec > 99 )
prec = 99; prec = 99;

@ -493,7 +493,7 @@ extern "C" long long __strtoll( const char *, char**, int );
static TQ_INT64 read_int_ascii( TQDataStream *s ) static TQ_INT64 read_int_ascii( TQDataStream *s )
{ {
register int n = 0; int n = 0;
char buf[40]; char buf[40];
for ( ;; ) { for ( ;; ) {
buf[n] = s->device()->getch(); buf[n] = s->device()->getch();
@ -575,7 +575,7 @@ TQDataStream &TQDataStream::operator>>( TQ_INT16 &i )
} else if ( noswap ) { // no conversion needed } else if ( noswap ) { // no conversion needed
dev->readBlock( (char *)&i, sizeof(TQ_INT16) ); dev->readBlock( (char *)&i, sizeof(TQ_INT16) );
} else { // swap bytes } else { // swap bytes
register uchar *p = (uchar *)(&i); uchar *p = (uchar *)(&i);
char b[2]; char b[2];
if (dev->readBlock( b, 2 ) >= 2) { if (dev->readBlock( b, 2 ) >= 2) {
*p++ = b[1]; *p++ = b[1];
@ -687,7 +687,7 @@ TQDataStream &TQDataStream::operator>>( TQ_LONG &i )
} else if ( noswap ) { // no conversion needed } else if ( noswap ) { // no conversion needed
dev->readBlock( (char *)&i, sizeof(TQ_LONG) ); dev->readBlock( (char *)&i, sizeof(TQ_LONG) );
} else { // swap bytes } else { // swap bytes
register uchar *p = (uchar *)(&i); uchar *p = (uchar *)(&i);
char b[sizeof(TQ_LONG)]; char b[sizeof(TQ_LONG)];
if (dev->readBlock( b, sizeof(TQ_LONG) ) >= (int)sizeof(TQ_LONG)) { if (dev->readBlock( b, sizeof(TQ_LONG) ) >= (int)sizeof(TQ_LONG)) {
for ( int j = sizeof(TQ_LONG); j; ) { for ( int j = sizeof(TQ_LONG); j; ) {
@ -701,7 +701,7 @@ TQDataStream &TQDataStream::operator>>( TQ_LONG &i )
static double read_double_ascii( TQDataStream *s ) static double read_double_ascii( TQDataStream *s )
{ {
register int n = 0; int n = 0;
char buf[80]; char buf[80];
for ( ;; ) { for ( ;; ) {
buf[n] = s->device()->getch(); buf[n] = s->device()->getch();
@ -759,7 +759,7 @@ TQDataStream &TQDataStream::operator>>( double &f )
} else if ( noswap ) { // no conversion needed } else if ( noswap ) { // no conversion needed
dev->readBlock( (char *)&f, sizeof(double) ); dev->readBlock( (char *)&f, sizeof(double) );
} else { // swap bytes } else { // swap bytes
register uchar *p = (uchar *)(&f); uchar *p = (uchar *)(&f);
char b[8]; char b[8];
if (dev->readBlock( b, 8 ) >= 8) { if (dev->readBlock( b, 8 ) >= 8) {
*p++ = b[7]; *p++ = b[7];
@ -841,7 +841,7 @@ TQDataStream &TQDataStream::readRawBytes( char *s, uint len )
{ {
CHECK_STREAM_PRECOND CHECK_STREAM_PRECOND
if ( printable ) { // printable data if ( printable ) { // printable data
register TQ_INT8 *p = (TQ_INT8*)s; TQ_INT8 *p = (TQ_INT8*)s;
if ( version() < 4 ) { if ( version() < 4 ) {
while ( len-- ) { while ( len-- ) {
TQ_INT32 tmp; TQ_INT32 tmp;
@ -918,7 +918,7 @@ TQDataStream &TQDataStream::operator<<( TQ_INT16 i )
} else if ( noswap ) { // no conversion needed } else if ( noswap ) { // no conversion needed
dev->writeBlock( (char *)&i, sizeof(TQ_INT16) ); dev->writeBlock( (char *)&i, sizeof(TQ_INT16) );
} else { // swap bytes } else { // swap bytes
register uchar *p = (uchar *)(&i); uchar *p = (uchar *)(&i);
char b[2]; char b[2];
b[1] = *p++; b[1] = *p++;
b[0] = *p; b[0] = *p;
@ -944,7 +944,7 @@ TQDataStream &TQDataStream::operator<<( TQ_INT32 i )
} else if ( noswap ) { // no conversion needed } else if ( noswap ) { // no conversion needed
dev->writeBlock( (char *)&i, sizeof(TQ_INT32) ); dev->writeBlock( (char *)&i, sizeof(TQ_INT32) );
} else { // swap bytes } else { // swap bytes
register uchar *p = (uchar *)(&i); uchar *p = (uchar *)(&i);
char b[4]; char b[4];
b[3] = *p++; b[3] = *p++;
b[2] = *p++; b[2] = *p++;
@ -987,7 +987,7 @@ TQDataStream &TQDataStream::operator<<( TQ_INT64 i )
} else if ( noswap ) { // no conversion needed } else if ( noswap ) { // no conversion needed
dev->writeBlock( (char *)&i, sizeof(TQ_INT64) ); dev->writeBlock( (char *)&i, sizeof(TQ_INT64) );
} else { // swap bytes } else { // swap bytes
register uchar *p = (uchar *)(&i); uchar *p = (uchar *)(&i);
char b[8]; char b[8];
b[7] = *p++; b[7] = *p++;
b[6] = *p++; b[6] = *p++;
@ -1027,7 +1027,7 @@ TQDataStream &TQDataStream::operator<<( TQ_LONG i )
} else if ( noswap ) { // no conversion needed } else if ( noswap ) { // no conversion needed
dev->writeBlock( (char *)&i, sizeof(TQ_LONG) ); dev->writeBlock( (char *)&i, sizeof(TQ_LONG) );
} else { // swap bytes } else { // swap bytes
register uchar *p = (uchar *)(&i); uchar *p = (uchar *)(&i);
char b[sizeof(TQ_LONG)]; char b[sizeof(TQ_LONG)];
for ( int j = sizeof(TQ_LONG); j; ) for ( int j = sizeof(TQ_LONG); j; )
b[--j] = *p++; b[--j] = *p++;
@ -1064,7 +1064,7 @@ TQDataStream &TQDataStream::operator<<( float f )
if ( noswap ) { // no conversion needed if ( noswap ) { // no conversion needed
dev->writeBlock( (char *)&g, sizeof(float) ); dev->writeBlock( (char *)&g, sizeof(float) );
} else { // swap bytes } else { // swap bytes
register uchar *p = (uchar *)(&g); uchar *p = (uchar *)(&g);
char b[4]; char b[4];
b[3] = *p++; b[3] = *p++;
b[2] = *p++; b[2] = *p++;
@ -1094,7 +1094,7 @@ TQDataStream &TQDataStream::operator<<( double f )
} else if ( noswap ) { // no conversion needed } else if ( noswap ) { // no conversion needed
dev->writeBlock( (char *)&f, sizeof(double) ); dev->writeBlock( (char *)&f, sizeof(double) );
} else { // swap bytes } else { // swap bytes
register uchar *p = (uchar *)(&f); uchar *p = (uchar *)(&f);
char b[8]; char b[8];
b[7] = *p++; b[7] = *p++;
b[6] = *p++; b[6] = *p++;
@ -1163,11 +1163,11 @@ TQDataStream &TQDataStream::writeRawBytes( const char *s, uint len )
CHECK_STREAM_PRECOND CHECK_STREAM_PRECOND
if ( printable ) { // write printable if ( printable ) { // write printable
if ( version() < 4 ) { if ( version() < 4 ) {
register char *p = (char *)s; char *p = (char *)s;
while ( len-- ) while ( len-- )
*this << *p++; *this << *p++;
} else { } else {
register TQ_INT8 *p = (TQ_INT8*)s; TQ_INT8 *p = (TQ_INT8*)s;
while ( len-- ) while ( len-- )
*this << *p++; *this << *p++;
} }

@ -324,17 +324,17 @@ bool TQGArray::fill( const char *d, int len, uint sz )
if ( sz == 1 ) // 8 bit elements if ( sz == 1 ) // 8 bit elements
memset( data(), *d, len ); memset( data(), *d, len );
else if ( sz == 4 ) { // 32 bit elements else if ( sz == 4 ) { // 32 bit elements
register TQ_INT32 *x = (TQ_INT32*)data(); TQ_INT32 *x = (TQ_INT32*)data();
TQ_INT32 v = *((TQ_INT32*)d); TQ_INT32 v = *((TQ_INT32*)d);
while ( len-- ) while ( len-- )
*x++ = v; *x++ = v;
} else if ( sz == 2 ) { // 16 bit elements } else if ( sz == 2 ) { // 16 bit elements
register TQ_INT16 *x = (TQ_INT16*)data(); TQ_INT16 *x = (TQ_INT16*)data();
TQ_INT16 v = *((TQ_INT16*)d); TQ_INT16 v = *((TQ_INT16*)d);
while ( len-- ) while ( len-- )
*x++ = v; *x++ = v;
} else { // any other size elements } else { // any other size elements
register char *x = data(); char *x = data();
while ( len-- ) { // more complicated while ( len-- ) { // more complicated
memcpy( x, d, sz ); memcpy( x, d, sz );
x += sz; x += sz;
@ -400,7 +400,7 @@ TQGArray &TQGArray::duplicate( const TQGArray &a )
if ( a.shd == shd ) { // a.duplicate(a) ! if ( a.shd == shd ) { // a.duplicate(a) !
if ( shd->count > 1 ) { if ( shd->count > 1 ) {
shd->count--; shd->count--;
register array_data *n = newData(); array_data *n = newData();
TQ_CHECK_PTR( n ); TQ_CHECK_PTR( n );
if ( (n->len=shd->len) ) { if ( (n->len=shd->len) ) {
n->data = NEW(char,n->len); n->data = NEW(char,n->len);
@ -605,11 +605,11 @@ int TQGArray::find( const char *d, uint index, uint sz ) const
#endif #endif
return -1; return -1;
} }
register uint i; uint i;
uint ii; uint ii;
switch ( sz ) { switch ( sz ) {
case 1: { // 8 bit elements case 1: { // 8 bit elements
register char *x = data() + index; char *x = data() + index;
char v = *d; char v = *d;
for ( i=index; i<shd->len; i++ ) { for ( i=index; i<shd->len; i++ ) {
if ( *x++ == v ) if ( *x++ == v )
@ -619,7 +619,7 @@ int TQGArray::find( const char *d, uint index, uint sz ) const
} }
break; break;
case 2: { // 16 bit elements case 2: { // 16 bit elements
register TQ_INT16 *x = (TQ_INT16*)(data() + index); TQ_INT16 *x = (TQ_INT16*)(data() + index);
TQ_INT16 v = *((TQ_INT16*)d); TQ_INT16 v = *((TQ_INT16*)d);
for ( i=index; i<shd->len; i+=2 ) { for ( i=index; i<shd->len; i+=2 ) {
if ( *x++ == v ) if ( *x++ == v )
@ -629,7 +629,7 @@ int TQGArray::find( const char *d, uint index, uint sz ) const
} }
break; break;
case 4: { // 32 bit elements case 4: { // 32 bit elements
register TQ_INT32 *x = (TQ_INT32*)(data() + index); TQ_INT32 *x = (TQ_INT32*)(data() + index);
TQ_INT32 v = *((TQ_INT32*)d); TQ_INT32 v = *((TQ_INT32*)d);
for ( i=index; i<shd->len; i+=4 ) { for ( i=index; i<shd->len; i+=4 ) {
if ( *x++ == v ) if ( *x++ == v )
@ -659,11 +659,11 @@ int TQGArray::find( const char *d, uint index, uint sz ) const
int TQGArray::contains( const char *d, uint sz ) const int TQGArray::contains( const char *d, uint sz ) const
{ {
register uint i = shd->len; uint i = shd->len;
int count = 0; int count = 0;
switch ( sz ) { switch ( sz ) {
case 1: { // 8 bit elements case 1: { // 8 bit elements
register char *x = data(); char *x = data();
char v = *d; char v = *d;
while ( i-- ) { while ( i-- ) {
if ( *x++ == v ) if ( *x++ == v )
@ -672,7 +672,7 @@ int TQGArray::contains( const char *d, uint sz ) const
} }
break; break;
case 2: { // 16 bit elements case 2: { // 16 bit elements
register TQ_INT16 *x = (TQ_INT16*)data(); TQ_INT16 *x = (TQ_INT16*)data();
TQ_INT16 v = *((TQ_INT16*)d); TQ_INT16 v = *((TQ_INT16*)d);
i /= 2; i /= 2;
while ( i-- ) { while ( i-- ) {
@ -682,7 +682,7 @@ int TQGArray::contains( const char *d, uint sz ) const
} }
break; break;
case 4: { // 32 bit elements case 4: { // 32 bit elements
register TQ_INT32 *x = (TQ_INT32*)data(); TQ_INT32 *x = (TQ_INT32*)data();
TQ_INT32 v = *((TQ_INT32*)d); TQ_INT32 v = *((TQ_INT32*)d);
i /= 4; i /= 4;
while ( i-- ) { while ( i-- ) {

@ -589,7 +589,7 @@ bool TQGCache::makeRoomFor( int cost, int priority )
return FALSE; // than maximum cost return FALSE; // than maximum cost
if ( priority == -1 ) if ( priority == -1 )
priority = 32767; priority = 32767;
register TQCacheItem *ci = lruList->last(); TQCacheItem *ci = lruList->last();
int cntCost = 0; int cntCost = 0;
int dumps = 0; // number of items to dump int dumps = 0; // number of items to dump
while ( cntCost < cost && ci && ci->skipPriority <= priority ) { while ( cntCost < cost && ci && ci->skipPriority <= priority ) {

@ -95,7 +95,7 @@ int TQGDict::hashKeyString( const TQString &key )
tqWarning( "TQGDict::hashKeyString: Invalid null key" ); tqWarning( "TQGDict::hashKeyString: Invalid null key" );
#endif #endif
int i; int i;
register uint h=0; uint h=0;
uint g; uint g;
const TQChar *p = key.unicode(); const TQChar *p = key.unicode();
if ( cases ) { // case sensitive if ( cases ) { // case sensitive
@ -129,8 +129,8 @@ int TQGDict::hashKeyAscii( const char *key )
if ( key == 0 ) if ( key == 0 )
tqWarning( "TQGDict::hashAsciiKey: Invalid null key" ); tqWarning( "TQGDict::hashAsciiKey: Invalid null key" );
#endif #endif
register const char *k = key; const char *k = key;
register uint h=0; uint h=0;
uint g; uint g;
if ( cases ) { // case sensitive if ( cases ) { // case sensitive
while ( *k ) { while ( *k ) {
@ -1080,8 +1080,8 @@ TQPtrCollection::Item TQGDictIterator::toFirst()
curNode = 0; curNode = 0;
return 0; return 0;
} }
register uint i = 0; uint i = 0;
register TQBaseBucket **v = dict->vec; TQBaseBucket **v = dict->vec;
while ( !(*v++) ) while ( !(*v++) )
i++; i++;
curNode = dict->vec[i]; curNode = dict->vec[i];
@ -1125,8 +1125,8 @@ TQPtrCollection::Item TQGDictIterator::operator++()
return 0; return 0;
curNode = curNode->getNext(); curNode = curNode->getNext();
if ( !curNode ) { // no next bucket if ( !curNode ) { // no next bucket
register uint i = curIndex + 1; // look from next vec element uint i = curIndex + 1; // look from next vec element
register TQBaseBucket **v = &dict->vec[i]; TQBaseBucket **v = &dict->vec[i];
while ( i < dict->size() && !(*v++) ) while ( i < dict->size() && !(*v++) )
i++; i++;
if ( i == dict->size() ) { // nothing found if ( i == dict->size() ) { // nothing found

@ -350,7 +350,7 @@ TQLNode *TQGList::locate( uint index )
curNode = firstNode; curNode = firstNode;
curIndex = 0; curIndex = 0;
} }
register TQLNode *node; TQLNode *node;
int distance = index - curIndex; // node distance to cur node int distance = index - curIndex; // node distance to cur node
bool forward; // direction to traverse bool forward; // direction to traverse
@ -405,7 +405,7 @@ void TQGList::inSort( TQPtrCollection::Item d )
//mutex->lock(); //mutex->lock();
#endif #endif
int index = 0; int index = 0;
register TQLNode *n = firstNode; TQLNode *n = firstNode;
while ( n && compareItems(n->data,d) < 0 ){ // find position in list while ( n && compareItems(n->data,d) < 0 ){ // find position in list
n = n->next; n = n->next;
index++; index++;
@ -426,7 +426,7 @@ void TQGList::prepend( TQPtrCollection::Item d )
#if defined(TQT_THREAD_SUPPORT) #if defined(TQT_THREAD_SUPPORT)
//mutex->lock(); //mutex->lock();
#endif #endif
register TQLNode *n = new TQLNode( newItem(d) ); TQLNode *n = new TQLNode( newItem(d) );
TQ_CHECK_PTR( n ); TQ_CHECK_PTR( n );
n->prev = 0; n->prev = 0;
if ( (n->next = firstNode) ) // list is not empty if ( (n->next = firstNode) ) // list is not empty
@ -451,7 +451,7 @@ void TQGList::append( TQPtrCollection::Item d )
#if defined(TQT_THREAD_SUPPORT) #if defined(TQT_THREAD_SUPPORT)
//mutex->lock(); //mutex->lock();
#endif #endif
register TQLNode *n = new TQLNode( newItem(d) ); TQLNode *n = new TQLNode( newItem(d) );
TQ_CHECK_PTR( n ); TQ_CHECK_PTR( n );
n->next = 0; n->next = 0;
if ( (n->prev = lastNode) ) { // list is not empty if ( (n->prev = lastNode) ) { // list is not empty
@ -500,7 +500,7 @@ bool TQGList::insertAt( uint index, TQPtrCollection::Item d )
return FALSE; return FALSE;
} }
TQLNode *prevNode = nextNode->prev; TQLNode *prevNode = nextNode->prev;
register TQLNode *n = new TQLNode( newItem(d) ); TQLNode *n = new TQLNode( newItem(d) );
TQ_CHECK_PTR( n ); TQ_CHECK_PTR( n );
nextNode->prev = n; nextNode->prev = n;
Q_ASSERT( (!((curIndex > 0) && (!prevNode))) ); Q_ASSERT( (!((curIndex > 0) && (!prevNode))) );
@ -564,7 +564,7 @@ TQLNode *TQGList::unlink()
#endif #endif
return 0; return 0;
} }
register TQLNode *n = curNode; // unlink this node TQLNode *n = curNode; // unlink this node
if ( n == firstNode ) { // removing first node ? if ( n == firstNode ) { // removing first node ?
if ( (firstNode = n->next) ) { if ( (firstNode = n->next) ) {
firstNode->prev = 0; firstNode->prev = 0;
@ -881,7 +881,7 @@ void TQGList::clear()
#if defined(TQT_THREAD_SUPPORT) #if defined(TQT_THREAD_SUPPORT)
//mutex->lock(); //mutex->lock();
#endif #endif
register TQLNode *n = firstNode; TQLNode *n = firstNode;
firstNode = lastNode = curNode = 0; // initialize list firstNode = lastNode = curNode = 0; // initialize list
numNodes = 0; numNodes = 0;
@ -914,7 +914,7 @@ int TQGList::findRef( TQPtrCollection::Item d, bool fromStart )
#if defined(TQT_THREAD_SUPPORT) #if defined(TQT_THREAD_SUPPORT)
//mutex->lock(); //mutex->lock();
#endif #endif
register TQLNode *n; TQLNode *n;
int index; int index;
if ( fromStart ) { // start from first node if ( fromStart ) { // start from first node
n = firstNode; n = firstNode;
@ -946,7 +946,7 @@ int TQGList::find( TQPtrCollection::Item d, bool fromStart )
#if defined(TQT_THREAD_SUPPORT) #if defined(TQT_THREAD_SUPPORT)
//mutex->lock(); //mutex->lock();
#endif #endif
register TQLNode *n; TQLNode *n;
int index; int index;
if ( fromStart ) { // start from first node if ( fromStart ) { // start from first node
n = firstNode; n = firstNode;
@ -977,7 +977,7 @@ uint TQGList::containsRef( TQPtrCollection::Item d ) const
#if defined(TQT_THREAD_SUPPORT) #if defined(TQT_THREAD_SUPPORT)
//mutex->lock(); //mutex->lock();
#endif #endif
register TQLNode *n = firstNode; TQLNode *n = firstNode;
uint count = 0; uint count = 0;
while ( n ) { // for all nodes... while ( n ) { // for all nodes...
if ( n->data == d ) // count # exact matches if ( n->data == d ) // count # exact matches
@ -1000,7 +1000,7 @@ uint TQGList::contains( TQPtrCollection::Item d ) const
#if defined(TQT_THREAD_SUPPORT) #if defined(TQT_THREAD_SUPPORT)
//mutex->lock(); //mutex->lock();
#endif #endif
register TQLNode *n = firstNode; TQLNode *n = firstNode;
uint count = 0; uint count = 0;
TQGList *that = (TQGList*)this; // mutable for compareItems() TQGList *that = (TQGList*)this; // mutable for compareItems()
while ( n ) { // for all nodes... while ( n ) { // for all nodes...
@ -1167,7 +1167,7 @@ void TQGList::toVector( TQGVector *vector ) const
#endif #endif
return; return;
} }
register TQLNode *n = firstNode; TQLNode *n = firstNode;
uint i = 0; uint i = 0;
while ( n ) { while ( n ) {
vector->insert( i, n->data ); vector->insert( i, n->data );

@ -388,8 +388,8 @@ void TQGVector::sort() // sort vector
{ {
if ( count() == 0 ) // no elements if ( count() == 0 ) // no elements
return; return;
register Item *start = &vec[0]; Item *start = &vec[0];
register Item *end = &vec[len-1]; Item *end = &vec[len-1];
Item tmp; Item tmp;
for (;;) { // put all zero elements behind for (;;) { // put all zero elements behind
while ( start < end && *start != 0 ) while ( start < end && *start != 0 )

@ -163,8 +163,8 @@ static char *_qdtoa(double d, int mode, int ndigits, int *decpt,
int *sign, char **rve, char **digits_str); int *sign, char **rve, char **digits_str);
static double qstrtod(const char *s00, char const **se, bool *ok); static double qstrtod(const char *s00, char const **se, bool *ok);
#endif #endif
static TQ_LLONG qstrtoll(const char *nptr, const char **endptr, register int base, bool *ok); static TQ_LLONG qstrtoll(const char *nptr, const char **endptr, int base, bool *ok);
static TQ_ULLONG qstrtoull(const char *nptr, const char **endptr, register int base, bool *ok); static TQ_ULLONG qstrtoull(const char *nptr, const char **endptr, int base, bool *ok);
static inline bool compareBits(double d1, double d2) static inline bool compareBits(double d1, double d2)
{ {
@ -3797,13 +3797,13 @@ TQ_ULLONG TQLocalePrivate::stringToUnsLongLong(TQString num, int base,
* Ignores `locale' stuff. Assumes that the upper and lower case * Ignores `locale' stuff. Assumes that the upper and lower case
* alphabets and digits are each contiguous. * alphabets and digits are each contiguous.
*/ */
static TQ_ULLONG qstrtoull(const char *nptr, const char **endptr, register int base, bool *ok) static TQ_ULLONG qstrtoull(const char *nptr, const char **endptr, int base, bool *ok)
{ {
register const char *s = nptr; const char *s = nptr;
register TQ_ULLONG acc; TQ_ULLONG acc;
register unsigned char c; unsigned char c;
register TQ_ULLONG qbase, cutoff; TQ_ULLONG qbase, cutoff;
register int neg, any, cutlim; int neg, any, cutlim;
if (ok != 0) if (ok != 0)
*ok = TRUE; *ok = TRUE;
@ -3878,13 +3878,13 @@ static TQ_ULLONG qstrtoull(const char *nptr, const char **endptr, register int b
* Ignores `locale' stuff. Assumes that the upper and lower case * Ignores `locale' stuff. Assumes that the upper and lower case
* alphabets and digits are each contiguous. * alphabets and digits are each contiguous.
*/ */
static TQ_LLONG qstrtoll(const char *nptr, const char **endptr, register int base, bool *ok) static TQ_LLONG qstrtoll(const char *nptr, const char **endptr, int base, bool *ok)
{ {
register const char *s; const char *s;
register TQ_ULLONG acc; TQ_ULLONG acc;
register unsigned char c; unsigned char c;
register TQ_ULLONG qbase, cutoff; TQ_ULLONG qbase, cutoff;
register int neg, any, cutlim; int neg, any, cutlim;
if (ok != 0) if (ok != 0)
*ok = TRUE; *ok = TRUE;

@ -576,7 +576,7 @@ bool TQChar::isSymbol() const
int TQChar::digitValue() const int TQChar::digitValue() const
{ {
#ifndef TQT_NO_UNICODETABLES #ifndef TQT_NO_UNICODETABLES
register int pos = TQUnicodeTables::decimal_info[row()]; int pos = TQUnicodeTables::decimal_info[row()];
if( !pos ) if( !pos )
return -1; return -1;
return TQUnicodeTables::decimal_info[(pos<<8) + cell()]; return TQUnicodeTables::decimal_info[(pos<<8) + cell()];
@ -654,7 +654,7 @@ static TQString shared_decomp;
const TQString &TQChar::decomposition() const const TQString &TQChar::decomposition() const
{ {
#ifndef TQT_NO_UNICODETABLES #ifndef TQT_NO_UNICODETABLES
register int pos = TQUnicodeTables::decomposition_info[row()]; int pos = TQUnicodeTables::decomposition_info[row()];
if(!pos) return TQString::null; if(!pos) return TQString::null;
pos = TQUnicodeTables::decomposition_info[(pos<<8)+cell()]; pos = TQUnicodeTables::decomposition_info[(pos<<8)+cell()];
@ -681,7 +681,7 @@ const TQString &TQChar::decomposition() const
TQChar::Decomposition TQChar::decompositionTag() const TQChar::Decomposition TQChar::decompositionTag() const
{ {
#ifndef TQT_NO_UNICODETABLES #ifndef TQT_NO_UNICODETABLES
register int pos = TQUnicodeTables::decomposition_info[row()]; int pos = TQUnicodeTables::decomposition_info[row()];
if(!pos) return TQChar::Single; if(!pos) return TQChar::Single;
pos = TQUnicodeTables::decomposition_info[(pos<<8)+cell()]; pos = TQUnicodeTables::decomposition_info[(pos<<8)+cell()];
@ -961,7 +961,7 @@ private:
TQLigature::TQLigature( TQChar c ) TQLigature::TQLigature( TQChar c )
{ {
register int pos = TQUnicodeTables::ligature_info[c.row()]; int pos = TQUnicodeTables::ligature_info[c.row()];
if( !pos ) if( !pos )
ligatures = 0; ligatures = 0;
else else
@ -2528,7 +2528,7 @@ TQString TQString::multiArg( int numArgs, const TQString& a1, const TQString& a2
int digitUsed[10]; int digitUsed[10];
int argForDigit[10]; int argForDigit[10];
}; };
register const TQChar *uc = d->unicode; const TQChar *uc = d->unicode;
const TQString *args[4]; const TQString *args[4];
const int len = (int) length(); const int len = (int) length();
const int end = len - 1; const int end = len - 1;
@ -3018,7 +3018,7 @@ int TQString::find( TQChar c, int index, bool cs ) const
index += l; index += l;
if ( (uint)index >= l ) if ( (uint)index >= l )
return -1; return -1;
register const TQChar *uc = unicode()+index; const TQChar *uc = unicode()+index;
const TQChar *end = unicode() + l; const TQChar *end = unicode() + l;
if ( cs ) { if ( cs ) {
while ( uc < end && *uc != c ) while ( uc < end && *uc != c )
@ -3041,7 +3041,7 @@ int TQString::find( TQChar c, int index, bool cs ) const
static void bm_init_skiptable( const TQString &pattern, uint *skiptable, bool cs ) static void bm_init_skiptable( const TQString &pattern, uint *skiptable, bool cs )
{ {
int i = 0; int i = 0;
register uint *st = skiptable; uint *st = skiptable;
int l = pattern.length(); int l = pattern.length();
while ( i++ < 0x100/8 ) { while ( i++ < 0x100/8 ) {
*(st++) = l; *(st++) = l;
@ -3078,7 +3078,7 @@ static int bm_find( const TQString &str, int index, const TQString &pattern, uin
const uint pl = pattern.length(); const uint pl = pattern.length();
const uint pl_minus_one = pl - 1; const uint pl_minus_one = pl - 1;
register const TQChar *current = uc + index + pl_minus_one; const TQChar *current = uc + index + pl_minus_one;
const TQChar *end = uc + l; const TQChar *end = uc + l;
if ( cs ) { if ( cs ) {
while ( current < end ) { while ( current < end ) {
@ -3269,7 +3269,7 @@ int TQString::findRev( TQChar c, int index, bool cs ) const
if ( (uint)index >= l ) if ( (uint)index >= l )
return -1; return -1;
const TQChar *end = unicode(); const TQChar *end = unicode();
register const TQChar *uc = end + index; const TQChar *uc = end + index;
if ( cs ) { if ( cs ) {
while ( uc >= end && *uc != c ) while ( uc >= end && *uc != c )
uc--; uc--;
@ -3836,7 +3836,7 @@ TQString TQString::mid( uint index, uint len ) const
len = slen - index; len = slen - index;
if ( index == 0 && len == slen ) if ( index == 0 && len == slen )
return *this; return *this;
register const TQChar *p = unicode()+index; const TQChar *p = unicode()+index;
TQString s( len, TRUE ); TQString s( len, TRUE );
memcpy( s.d->unicode, p, len * sizeof(TQChar) ); memcpy( s.d->unicode, p, len * sizeof(TQChar) );
s.d->len = len; s.d->len = len;
@ -3938,7 +3938,7 @@ TQString TQString::rightJustify( uint width, TQChar fill, bool truncate ) const
TQString TQString::lower() const TQString TQString::lower() const
{ {
int l = length(); int l = length();
register TQChar *p = d->unicode; TQChar *p = d->unicode;
while ( l ) { while ( l ) {
if ( *p != ::lower(*p) ) { if ( *p != ::lower(*p) ) {
TQString s( *this ); TQString s( *this );
@ -3971,7 +3971,7 @@ TQString TQString::lower() const
TQString TQString::upper() const TQString TQString::upper() const
{ {
int l = length(); int l = length();
register TQChar *p = d->unicode; TQChar *p = d->unicode;
while ( l ) { while ( l ) {
if ( *p != ::upper(*p) ) { if ( *p != ::upper(*p) ) {
TQString s( *this ); TQString s( *this );
@ -4012,7 +4012,7 @@ TQString TQString::stripWhiteSpace() const
{ {
if ( isEmpty() ) // nothing to do if ( isEmpty() ) // nothing to do
return *this; return *this;
register const TQChar *s = unicode(); const TQChar *s = unicode();
if ( !s->isSpace() && !s[length()-1].isSpace() ) if ( !s->isSpace() && !s[length()-1].isSpace() )
return *this; return *this;

@ -1869,7 +1869,7 @@ TQTextStream &TQTextStream::output_int( int format, unsigned long long n, bool n
static const char hexdigits_upper[] = "0123456789ABCDEF"; static const char hexdigits_upper[] = "0123456789ABCDEF";
CHECK_STREAM_PRECOND CHECK_STREAM_PRECOND
char buf[76]; char buf[76];
register char *p; char *p;
int len; int len;
const char *hexdigits; const char *hexdigits;
@ -2099,7 +2099,7 @@ TQTextStream &TQTextStream::operator<<( double f )
f_char = (flags() & uppercase) ? 'E' : 'e'; f_char = (flags() & uppercase) ? 'E' : 'e';
else else
f_char = (flags() & uppercase) ? 'G' : 'g'; f_char = (flags() & uppercase) ? 'G' : 'g';
register char *fs = format; // generate format string char *fs = format; // generate format string
*fs++ = '%'; // "%.<prec>l<f_char>" *fs++ = '%'; // "%.<prec>l<f_char>"
*fs++ = '.'; *fs++ = '.';
int prec = precision(); int prec = precision();

@ -101,7 +101,7 @@ inline TQChar::Category category( const TQChar &c )
if ( c.unicode() > 0xff ) return TQChar::Letter_Uppercase; //######## if ( c.unicode() > 0xff ) return TQChar::Letter_Uppercase; //########
return (TQChar::Category)TQUnicodeTables::unicode_info[c.unicode()]; return (TQChar::Category)TQUnicodeTables::unicode_info[c.unicode()];
#else #else
register int uc = ((int)TQUnicodeTables::unicode_info[c.row()]) << 8; int uc = ((int)TQUnicodeTables::unicode_info[c.row()]) << 8;
uc += c.cell(); uc += c.cell();
return (TQChar::Category)TQUnicodeTables::unicode_info[uc]; return (TQChar::Category)TQUnicodeTables::unicode_info[uc];
#endif // TQT_NO_UNICODETABLES #endif // TQT_NO_UNICODETABLES
@ -112,8 +112,8 @@ inline TQChar lower( const TQChar &c )
#ifndef TQT_NO_UNICODETABLES #ifndef TQT_NO_UNICODETABLES
int row = c.row(); int row = c.row();
int cell = c.cell(); int cell = c.cell();
register int ci = TQUnicodeTables::case_info[row]; int ci = TQUnicodeTables::case_info[row];
register int uc = ((int)TQUnicodeTables::unicode_info[c.row()]) << 8; int uc = ((int)TQUnicodeTables::unicode_info[c.row()]) << 8;
uc += c.cell(); uc += c.cell();
if (TQUnicodeTables::unicode_info[uc] != TQChar::Letter_Uppercase || !ci) if (TQUnicodeTables::unicode_info[uc] != TQChar::Letter_Uppercase || !ci)
return c; return c;
@ -131,8 +131,8 @@ inline TQChar upper( const TQChar &c )
#ifndef TQT_NO_UNICODETABLES #ifndef TQT_NO_UNICODETABLES
int row = c.row(); int row = c.row();
int cell = c.cell(); int cell = c.cell();
register int ci = TQUnicodeTables::case_info[row]; int ci = TQUnicodeTables::case_info[row];
register int uc = ((int)TQUnicodeTables::unicode_info[c.row()]) << 8; int uc = ((int)TQUnicodeTables::unicode_info[c.row()]) << 8;
uc += c.cell(); uc += c.cell();
if (TQUnicodeTables::unicode_info[uc] != TQChar::Letter_Lowercase || !ci) if (TQUnicodeTables::unicode_info[uc] != TQChar::Letter_Lowercase || !ci)
return c; return c;
@ -148,7 +148,7 @@ inline TQChar upper( const TQChar &c )
inline TQChar::Direction direction( const TQChar &c ) inline TQChar::Direction direction( const TQChar &c )
{ {
#ifndef TQT_NO_UNICODETABLES #ifndef TQT_NO_UNICODETABLES
register int pos = TQUnicodeTables::direction_info[c.row()]; int pos = TQUnicodeTables::direction_info[c.row()];
return (TQChar::Direction) (TQUnicodeTables::direction_info[(pos<<8)+c.cell()] & 0x1f); return (TQChar::Direction) (TQUnicodeTables::direction_info[(pos<<8)+c.cell()] & 0x1f);
#else #else
Q_UNUSED(c); Q_UNUSED(c);
@ -159,7 +159,7 @@ inline TQChar::Direction direction( const TQChar &c )
inline bool mirrored( const TQChar &c ) inline bool mirrored( const TQChar &c )
{ {
#ifndef TQT_NO_UNICODETABLES #ifndef TQT_NO_UNICODETABLES
register int pos = TQUnicodeTables::direction_info[c.row()]; int pos = TQUnicodeTables::direction_info[c.row()];
return TQUnicodeTables::direction_info[(pos<<8)+c.cell()] > 128; return TQUnicodeTables::direction_info[(pos<<8)+c.cell()] > 128;
#else #else
Q_UNUSED(c); Q_UNUSED(c);
@ -187,7 +187,7 @@ inline TQChar mirroredChar( const TQChar &ch )
inline TQChar::Joining joining( const TQChar &ch ) inline TQChar::Joining joining( const TQChar &ch )
{ {
#ifndef TQT_NO_UNICODETABLES #ifndef TQT_NO_UNICODETABLES
register int pos = TQUnicodeTables::direction_info[ch.row()]; int pos = TQUnicodeTables::direction_info[ch.row()];
return (TQChar::Joining) ((TQUnicodeTables::direction_info[(pos<<8)+ch.cell()] >> 5) &0x3); return (TQChar::Joining) ((TQUnicodeTables::direction_info[(pos<<8)+ch.cell()] >> 5) &0x3);
#else #else
Q_UNUSED(ch); Q_UNUSED(ch);
@ -225,7 +225,7 @@ inline int lineBreakClass( const TQChar &ch )
return ch.row() ? TQUnicodeTables::LineBreak_AL return ch.row() ? TQUnicodeTables::LineBreak_AL
: TQUnicodeTables::latin1_line_break_info[ch.cell()]; : TQUnicodeTables::latin1_line_break_info[ch.cell()];
#else #else
register int pos = ((int)TQUnicodeTables::line_break_info[ch.row()] << 8) + ch.cell(); int pos = ((int)TQUnicodeTables::line_break_info[ch.row()] << 8) + ch.cell();
return TQUnicodeTables::line_break_info[pos]; return TQUnicodeTables::line_break_info[pos];
#endif #endif
} }

@ -597,7 +597,7 @@ TQAction::~TQAction()
*/ */
void TQAction::setIconSet( const TQIconSet& icon ) void TQAction::setIconSet( const TQIconSet& icon )
{ {
register TQIconSet *i = d->iconset; TQIconSet *i = d->iconset;
if ( !icon.isNull() ) if ( !icon.isNull() )
d->iconset = new TQIconSet( icon ); d->iconset = new TQIconSet( icon );
else else

@ -371,7 +371,7 @@ void TQButtonGroup::buttonPressed()
// introduce a TQButtonListIt if calling anything // introduce a TQButtonListIt if calling anything
int id = -1; int id = -1;
TQButton *bt = (TQButton *)sender(); // object that sent the signal TQButton *bt = (TQButton *)sender(); // object that sent the signal
for ( register TQButtonItem *i=buttons->first(); i; i=buttons->next() ) for ( TQButtonItem *i=buttons->first(); i; i=buttons->next() )
if ( bt == i->button ) { // button was clicked if ( bt == i->button ) { // button was clicked
id = i->id; id = i->id;
break; break;
@ -391,7 +391,7 @@ void TQButtonGroup::buttonReleased()
// introduce a TQButtonListIt if calling anything // introduce a TQButtonListIt if calling anything
int id = -1; int id = -1;
TQButton *bt = (TQButton *)sender(); // object that sent the signal TQButton *bt = (TQButton *)sender(); // object that sent the signal
for ( register TQButtonItem *i=buttons->first(); i; i=buttons->next() ) for ( TQButtonItem *i=buttons->first(); i; i=buttons->next() )
if ( bt == i->button ) { // button was clicked if ( bt == i->button ) { // button was clicked
id = i->id; id = i->id;
break; break;
@ -414,7 +414,7 @@ void TQButtonGroup::buttonClicked()
#if defined(QT_CHECK_NULL) #if defined(QT_CHECK_NULL)
Q_ASSERT( bt ); Q_ASSERT( bt );
#endif #endif
for ( register TQButtonItem *i=buttons->first(); i; i=buttons->next() ) { for ( TQButtonItem *i=buttons->first(); i; i=buttons->next() ) {
if ( bt == i->button ) { // button was clicked if ( bt == i->button ) { // button was clicked
id = i->id; id = i->id;
break; break;

@ -396,7 +396,7 @@ void TQLCDNumber::setNumDigits( int numDigits )
bool doDisplay = ndigits == 0; bool doDisplay = ndigits == 0;
if ( numDigits == ndigits ) // no change if ( numDigits == ndigits ) // no change
return; return;
register int i; int i;
int dif; int dif;
if ( numDigits > ndigits ) { // expand if ( numDigits > ndigits ) { // expand
dif = numDigits - ndigits; dif = numDigits - ndigits;

@ -785,7 +785,7 @@ void TQMenuBar::hidePopups()
bool anyVisible = FALSE; bool anyVisible = FALSE;
#endif #endif
TQMenuItemListIt it(*mitems); TQMenuItemListIt it(*mitems);
register TQMenuItem *mi; TQMenuItem *mi;
while ( (mi=it.current()) ) { while ( (mi=it.current()) ) {
++it; ++it;
if ( mi->popup() && mi->popup()->isVisible() ) { if ( mi->popup() && mi->popup()->isVisible() ) {
@ -1337,7 +1337,7 @@ void TQMenuBar::keyPressEvent( TQKeyEvent *e )
} }
if ( dx ) { // highlight next/prev if ( dx ) { // highlight next/prev
register int i = actItem; int i = actItem;
int c = mitems->count(); int c = mitems->count();
int n = c; int n = c;
while ( n-- ) { while ( n-- ) {
@ -1362,7 +1362,7 @@ void TQMenuBar::keyPressEvent( TQKeyEvent *e )
TQMenuItem* currentSelected = 0; TQMenuItem* currentSelected = 0;
TQMenuItem* firstAfterCurrent = 0; TQMenuItem* firstAfterCurrent = 0;
register TQMenuItem *m; TQMenuItem *m;
int indx = 0; int indx = 0;
int clashCount = 0; int clashCount = 0;
while ( (m=it.current()) ) { while ( (m=it.current()) ) {
@ -1534,7 +1534,7 @@ void TQMenuBar::setupAccelerators()
autoaccel = 0; autoaccel = 0;
TQMenuItemListIt it(*mitems); TQMenuItemListIt it(*mitems);
register TQMenuItem *mi; TQMenuItem *mi;
while ( (mi=it.current()) ) { while ( (mi=it.current()) ) {
++it; ++it;
if ( !mi->isEnabledAndVisible() ) // ### when we have a good solution for the accel vs. focus widget problem, remove that. That is only a workaround if ( !mi->isEnabledAndVisible() ) // ### when we have a good solution for the accel vs. focus widget problem, remove that. That is only a workaround

@ -260,7 +260,7 @@ int TQMenuData::insertAny( const TQString *text, const TQPixmap *pixmap,
if ( id < 0 ) // -2, -3 etc. if ( id < 0 ) // -2, -3 etc.
id = get_seq_id(); id = get_seq_id();
register TQMenuItem *mi = new TQMenuItem; TQMenuItem *mi = new TQMenuItem;
TQ_CHECK_PTR( mi ); TQ_CHECK_PTR( mi );
mi->ident = id; mi->ident = id;
if ( widget != 0 ) { if ( widget != 0 ) {
@ -842,7 +842,7 @@ void TQMenuData::removeItemAt( int index )
void TQMenuData::clear() void TQMenuData::clear()
{ {
register TQMenuItem *mi = mitems->first(); TQMenuItem *mi = mitems->first();
while ( mi ) { while ( mi ) {
if ( mi->popup_menu ) if ( mi->popup_menu )
menuDelPopup( mi->popup_menu ); menuDelPopup( mi->popup_menu );
@ -1041,7 +1041,7 @@ void TQMenuData::changeItem( int id, const TQPixmap &pixmap )
TQMenuData *parent; TQMenuData *parent;
TQMenuItem *mi = findItem( id, &parent ); TQMenuItem *mi = findItem( id, &parent );
if ( mi ) { // item found if ( mi ) { // item found
register TQPixmap *i = mi->pixmap_data; TQPixmap *i = mi->pixmap_data;
bool fast_refresh = i != 0 && bool fast_refresh = i != 0 &&
i->width() == pixmap.width() && i->width() == pixmap.width() &&
i->height() == pixmap.height() && i->height() == pixmap.height() &&
@ -1103,7 +1103,7 @@ void TQMenuData::changeItemIconSet( int id, const TQIconSet &icon )
TQMenuData *parent; TQMenuData *parent;
TQMenuItem *mi = findItem( id, &parent ); TQMenuItem *mi = findItem( id, &parent );
if ( mi ) { // item found if ( mi ) { // item found
register TQIconSet *i = mi->iconset_data; TQIconSet *i = mi->iconset_data;
bool fast_refresh = i != 0; bool fast_refresh = i != 0;
if ( !icon.isNull() ) if ( !icon.isNull() )
mi->iconset_data = new TQIconSet( icon ); mi->iconset_data = new TQIconSet( icon );

@ -631,7 +631,7 @@ void TQPopupMenu::popup( const TQPoint &pos, int indexAtPoint )
h = height(); h = height();
if(indexAtPoint >= 0) { if(indexAtPoint >= 0) {
if(off_top) { //scroll to it if(off_top) { //scroll to it
register TQMenuItem *mi = NULL; TQMenuItem *mi = NULL;
TQMenuItemListIt it(*mitems); TQMenuItemListIt it(*mitems);
for(int tmp_y = 0; tmp_y < off_top && (mi=it.current()); ) { for(int tmp_y = 0; tmp_y < off_top && (mi=it.current()); ) {
TQSize sz = style().sizeFromContents(TQStyle::CT_PopupMenuItem, this, TQSize sz = style().sizeFromContents(TQStyle::CT_PopupMenuItem, this,
@ -794,7 +794,7 @@ void TQPopupMenu::hilitSig( int id )
void TQPopupMenu::setFirstItemActive() void TQPopupMenu::setFirstItemActive()
{ {
TQMenuItemListIt it(*mitems); TQMenuItemListIt it(*mitems);
register TQMenuItem *mi; TQMenuItem *mi;
int ai = 0; int ai = 0;
if(d->scroll.scrollable) if(d->scroll.scrollable)
ai = d->scroll.topScrollableIndex; ai = d->scroll.topScrollableIndex;
@ -817,7 +817,7 @@ void TQPopupMenu::setFirstItemActive()
void TQPopupMenu::hideAllPopups() void TQPopupMenu::hideAllPopups()
{ {
register TQMenuData *top = this; // find top level popup TQMenuData *top = this; // find top level popup
if ( !preventAnimation ) if ( !preventAnimation )
TQTimer::singleShot( 10, this, SLOT(allowAnimation()) ); TQTimer::singleShot( 10, this, SLOT(allowAnimation()) );
preventAnimation = TRUE; preventAnimation = TRUE;
@ -851,7 +851,7 @@ void TQPopupMenu::hidePopups()
preventAnimation = TRUE; preventAnimation = TRUE;
TQMenuItemListIt it(*mitems); TQMenuItemListIt it(*mitems);
register TQMenuItem *mi; TQMenuItem *mi;
while ( (mi=it.current()) ) { while ( (mi=it.current()) ) {
++it; ++it;
if ( mi->popup() && mi->popup()->parentMenu == this ) //avoid circularity if ( mi->popup() && mi->popup()->parentMenu == this ) //avoid circularity
@ -873,7 +873,7 @@ void TQPopupMenu::hidePopups()
bool TQPopupMenu::tryMenuBar( TQMouseEvent *e ) bool TQPopupMenu::tryMenuBar( TQMouseEvent *e )
{ {
register TQMenuData *top = this; // find top level TQMenuData *top = this; // find top level
while ( top->parentMenu ) while ( top->parentMenu )
top = top->parentMenu; top = top->parentMenu;
#ifndef TQT_NO_MENUBAR #ifndef TQT_NO_MENUBAR
@ -909,7 +909,7 @@ bool TQPopupMenu::tryMouseEvent( TQPopupMenu *p, TQMouseEvent * e)
void TQPopupMenu::byeMenuBar() void TQPopupMenu::byeMenuBar()
{ {
#ifndef TQT_NO_MENUBAR #ifndef TQT_NO_MENUBAR
register TQMenuData *top = this; // find top level TQMenuData *top = this; // find top level
while ( top->parentMenu ) while ( top->parentMenu )
top = top->parentMenu; top = top->parentMenu;
#endif #endif
@ -1075,7 +1075,7 @@ TQSize TQPopupMenu::updateSize(bool force_update, bool do_resize)
int height = 0; int height = 0;
int max_width = 0, max_height = 0; int max_width = 0, max_height = 0;
TQFontMetrics fm = fontMetrics(); TQFontMetrics fm = fontMetrics();
register TQMenuItem *mi; TQMenuItem *mi;
maxPMWidth = 0; maxPMWidth = 0;
int maxWidgetWidth = 0; int maxWidgetWidth = 0;
tab = 0; tab = 0;
@ -1258,7 +1258,7 @@ TQSize TQPopupMenu::updateSize(bool force_update, bool do_resize)
void TQPopupMenu::updateAccel( TQWidget *parent ) void TQPopupMenu::updateAccel( TQWidget *parent )
{ {
TQMenuItemListIt it(*mitems); TQMenuItemListIt it(*mitems);
register TQMenuItem *mi; TQMenuItem *mi;
if ( parent ) { if ( parent ) {
delete autoaccel; delete autoaccel;
@ -1349,7 +1349,7 @@ void TQPopupMenu::enableAccel( bool enable )
autoaccel->setEnabled( enable ); autoaccel->setEnabled( enable );
accelDisabled = !enable; // rememeber when updateAccel accelDisabled = !enable; // rememeber when updateAccel
TQMenuItemListIt it(*mitems); TQMenuItemListIt it(*mitems);
register TQMenuItem *mi; TQMenuItem *mi;
while ( (mi=it.current()) ) { // do the same for sub popups while ( (mi=it.current()) ) { // do the same for sub popups
++it; ++it;
if ( mi->popup() ) // call recursively if ( mi->popup() ) // call recursively
@ -1651,7 +1651,7 @@ void TQPopupMenu::mousePressEvent( TQMouseEvent *e )
} }
return; return;
} }
register TQMenuItem *mi = mitems->at(item); TQMenuItem *mi = mitems->at(item);
if ( item != actItem ) // new item activated if ( item != actItem ) // new item activated
setActiveItem( item ); setActiveItem( item );
@ -1702,7 +1702,7 @@ void TQPopupMenu::mouseReleaseEvent( TQMouseEvent *e )
else else
byeMenuBar(); byeMenuBar();
} else { // selected menu item! } else { // selected menu item!
register TQMenuItem *mi = mitems->at(actItem); TQMenuItem *mi = mitems->at(actItem);
if ( mi ->widget() ) { if ( mi ->widget() ) {
TQWidget* widgetAt = TQApplication::widgetAt( e->globalPos(), TRUE ); TQWidget* widgetAt = TQApplication::widgetAt( e->globalPos(), TRUE );
if ( widgetAt && widgetAt != this ) { if ( widgetAt && widgetAt != this ) {
@ -1815,7 +1815,7 @@ void TQPopupMenu::mouseMoveEvent( TQMouseEvent *e )
if ( (e->state() & TQt::MouseButtonMask) && !mouseBtDn ) if ( (e->state() & TQt::MouseButtonMask) && !mouseBtDn )
mouseBtDn = TRUE; // so mouseReleaseEvent will pop down mouseBtDn = TRUE; // so mouseReleaseEvent will pop down
register TQMenuItem *mi = mitems->at( item ); TQMenuItem *mi = mitems->at( item );
if ( mi->widget() ) { if ( mi->widget() ) {
TQWidget* widgetAt = TQApplication::widgetAt( e->globalPos(), TRUE ); TQWidget* widgetAt = TQApplication::widgetAt( e->globalPos(), TRUE );
@ -2034,7 +2034,7 @@ void TQPopupMenu::keyPressEvent( TQKeyEvent *e )
TQMenuItem* currentSelected = 0; TQMenuItem* currentSelected = 0;
TQMenuItem* firstAfterCurrent = 0; TQMenuItem* firstAfterCurrent = 0;
register TQMenuItem *m; TQMenuItem *m;
mi = 0; mi = 0;
int indx = 0; int indx = 0;
int clashCount = 0; int clashCount = 0;
@ -2101,7 +2101,7 @@ void TQPopupMenu::keyPressEvent( TQKeyEvent *e )
} }
#ifndef TQT_NO_MENUBAR #ifndef TQT_NO_MENUBAR
if ( !ok_key ) { // send to menu bar if ( !ok_key ) { // send to menu bar
register TQMenuData *top = this; // find top level TQMenuData *top = this; // find top level
while ( top->parentMenu ) while ( top->parentMenu )
top = top->parentMenu; top = top->parentMenu;
if ( top->isMenuBar ) { if ( top->isMenuBar ) {
@ -2118,7 +2118,7 @@ void TQPopupMenu::keyPressEvent( TQKeyEvent *e )
} else if ( dy < 0 ) { } else if ( dy < 0 ) {
TQMenuItemListIt it(*mitems); TQMenuItemListIt it(*mitems);
it.toLast(); it.toLast();
register TQMenuItem *mi; TQMenuItem *mi;
int ai = count() - 1; int ai = count() - 1;
while ( (mi=it.current()) ) { while ( (mi=it.current()) ) {
--it; --it;
@ -2134,7 +2134,7 @@ void TQPopupMenu::keyPressEvent( TQKeyEvent *e )
} }
if ( dy ) { // highlight next/prev if ( dy ) { // highlight next/prev
register int i = actItem; int i = actItem;
int c = mitems->count(); int c = mitems->count();
for(int n = c; n; n--) { for(int n = c; n; n--) {
i = i + dy; i = i + dy;
@ -2520,7 +2520,7 @@ void TQPopupMenu::connectModal( TQPopupMenu* receiver, bool doConnect )
receiver, SLOT(modalActivation(int)) ); receiver, SLOT(modalActivation(int)) );
TQMenuItemListIt it(*mitems); TQMenuItemListIt it(*mitems);
register TQMenuItem *mi; TQMenuItem *mi;
while ( (mi=it.current()) ) { while ( (mi=it.current()) ) {
++it; ++it;
if ( mi->popup() && mi->popup() != receiver if ( mi->popup() && mi->popup() != receiver
@ -2641,12 +2641,12 @@ bool TQPopupMenu::customWhatsThis() const
*/ */
bool TQPopupMenu::focusNextPrevChild( bool next ) bool TQPopupMenu::focusNextPrevChild( bool next )
{ {
register TQMenuItem *mi; TQMenuItem *mi;
int dy = next? 1 : -1; int dy = next? 1 : -1;
if ( dy && actItem < 0 ) { if ( dy && actItem < 0 ) {
setFirstItemActive(); setFirstItemActive();
} else if ( dy ) { // highlight next/prev } else if ( dy ) { // highlight next/prev
register int i = actItem; int i = actItem;
int c = mitems->count(); int c = mitems->count();
int n = c; int n = c;
while ( n-- ) { while ( n-- ) {

@ -876,7 +876,7 @@ void MainWindow::helpRegister()
TQProcess process( command + " www.trolltech.com/products/download/eval/evaluation.html" ); TQProcess process( command + " www.trolltech.com/products/download/eval/evaluation.html" );
if ( !process.start() ) if ( !process.start() )
TQMessageBox::information( this, "Register TQt", "Launching your web browser failed.\n" TQMessageBox::information( this, "Register TQt", "Launching your web browser failed.\n"
"To register TQt, point your browser to www.trolltech.com/products/download/eval/evaluation.html" ); "To TQt, point your browser to www.trolltech.com/products/download/eval/evaluation.html" );
#endif #endif
} }

Loading…
Cancel
Save