diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-01-30 20:17:32 +0900 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2021-02-01 23:39:38 +0100 |
commit | 961eb3f6e276b4a3609328a3076ef790026e9c03 (patch) | |
tree | f27de88e666ac3e067e01b15ac60a103eb3c559f | |
parent | b08a6d71ba872e67b75a822fcd44670126975818 (diff) | |
download | qt3-961eb3f6e276b4a3609328a3076ef790026e9c03.tar.gz qt3-961eb3f6e276b4a3609328a3076ef790026e9c03.zip |
Removed explicit usage of the 'register' keyword.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
48 files changed, 408 insertions, 408 deletions
diff --git a/doc/html/desktop-example.html b/doc/html/desktop-example.html index cc054de..4c91df1 100644 --- a/doc/html/desktop-example.html +++ b/doc/html/desktop-example.html @@ -95,7 +95,7 @@ void poly() int head = 0; int tail = -maxcurves + 2; <a href="qpointarray.html">QPointArray</a> *a = new <a href="qpointarray.html">QPointArray</a>[ maxcurves ]; - register QPointArray *p; + QPointArray *p; <a name="x1760"></a> <a href="qrect.html">QRect</a> r = d-><a href="qwidget.html#rect">rect</a>(); // desktop rectangle int i; diff --git a/examples/demo/opengl/fbm.c b/examples/demo/opengl/fbm.c index 47d5a61..dff1ccb 100644 --- a/examples/demo/opengl/fbm.c +++ b/examples/demo/opengl/fbm.c @@ -106,7 +106,7 @@ float noise3(float vec[3]) { 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; - register int i, j; + int i, j; if (start) { start = 0; diff --git a/examples/desktop/desktop.cpp b/examples/desktop/desktop.cpp index 2b6fb30..ea4111c 100644 --- a/examples/desktop/desktop.cpp +++ b/examples/desktop/desktop.cpp @@ -53,7 +53,7 @@ void poly() int head = 0; int tail = -maxcurves + 2; QPointArray *a = new QPointArray[ maxcurves ]; - register QPointArray *p; + QPointArray *p; QRect r = d->rect(); // desktop rectangle int i; diff --git a/src/3rdparty/libpng/pnggccrd.c b/src/3rdparty/libpng/pnggccrd.c index 8d81c31..b218d34 100644 --- a/src/3rdparty/libpng/pnggccrd.c +++ b/src/3rdparty/libpng/pnggccrd.c @@ -694,16 +694,16 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask) else /* mmx _not supported - Use modified C routine */ #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.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}; */ - 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_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */ 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; 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 */ #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.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}; */ - 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_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */ 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; 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 */ #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.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}; */ - 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_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */ 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; 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 */ #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.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}; */ - 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_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */ 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; 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 */ #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.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}; */ - 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_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */ 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; 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 dstptr; - register png_uint_32 i; + png_uint_32 i; png_uint_32 initial_val = BPP8 * png_pass_start[png_ptr->pass]; /* 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}; */ - 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_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */ 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; dstptr = row + initial_val; diff --git a/src/3rdparty/libpng/pngvcrd.c b/src/3rdparty/libpng/pngvcrd.c index 4f513eb..c75ebd0 100644 --- a/src/3rdparty/libpng/pngvcrd.c +++ b/src/3rdparty/libpng/pngvcrd.c @@ -375,10 +375,10 @@ end8: } 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_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}; pixel_bytes = (png_ptr->row_info.pixel_depth >> 3); @@ -487,10 +487,10 @@ end16: } 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_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}; pixel_bytes = (png_ptr->row_info.pixel_depth >> 3); @@ -618,10 +618,10 @@ end24: } 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_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}; pixel_bytes = (png_ptr->row_info.pixel_depth >> 3); @@ -758,10 +758,10 @@ end32: } 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_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}; pixel_bytes = (png_ptr->row_info.pixel_depth >> 3); @@ -916,10 +916,10 @@ end48: } 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_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}; pixel_bytes = (png_ptr->row_info.pixel_depth >> 3); @@ -947,8 +947,8 @@ end48: png_size_t pixel_bytes; int offset_table[7] = {0, 4, 0, 2, 0, 1, 0}; unsigned int i; - register int disp = png_pass_inc[png_ptr->pass]; // get the offset - register unsigned int incr1, initial_val, final_val; + int disp = png_pass_inc[png_ptr->pass]; // get the offset + unsigned int incr1, initial_val, final_val; pixel_bytes = (png_ptr->row_info.pixel_depth >> 3); sptr = png_ptr->row_buf + 1 + offset_table[png_ptr->pass]* diff --git a/src/3rdparty/sqlite/printf.c b/src/3rdparty/sqlite/printf.c index 620578d..dd7c1d1 100644 --- a/src/3rdparty/sqlite/printf.c +++ b/src/3rdparty/sqlite/printf.c @@ -360,8 +360,8 @@ static int vxprintf( } bufpt = &buf[etBUFSIZE-1]; { - register char *cset; /* Use registers for speed */ - register int base; + char *cset; /* Use registers for speed */ + int base; cset = infop->charset; base = infop->base; do{ /* Convert to ascii */ @@ -602,7 +602,7 @@ static int vxprintf( ** the output. */ if( !flag_leftjustify ){ - register int nspace; + int nspace; nspace = width-length; if( nspace>0 ){ count += nspace; @@ -618,7 +618,7 @@ static int vxprintf( count += length; } if( flag_leftjustify ){ - register int nspace; + int nspace; nspace = width-length; if( nspace>0 ){ count += nspace; diff --git a/src/3rdparty/sqlite/util.c b/src/3rdparty/sqlite/util.c index 16b3b46..6dc07ec 100644 --- a/src/3rdparty/sqlite/util.c +++ b/src/3rdparty/sqlite/util.c @@ -500,14 +500,14 @@ int sqliteHashNoCase(const char *z, int n){ ** there is no consistency, we will define our own. */ int sqliteStrICmp(const char *zLeft, const char *zRight){ - register unsigned char *a, *b; + unsigned char *a, *b; a = (unsigned char *)zLeft; b = (unsigned char *)zRight; while( *a!=0 && UpperToLower[*a]==UpperToLower[*b]){ a++; b++; } return *a - *b; } int sqliteStrNICmp(const char *zLeft, const char *zRight, int N){ - register unsigned char *a, *b; + unsigned char *a, *b; a = (unsigned char *)zLeft; b = (unsigned char *)zRight; 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 sqliteGlobCompare(const unsigned char *zPattern, const unsigned char *zString){ - register int c; + int c; int invert; int seen; int c2; @@ -1030,7 +1030,7 @@ sqliteGlobCompare(const unsigned char *zPattern, const unsigned char *zString){ */ int sqliteLikeCompare(const unsigned char *zPattern, const unsigned char *zString){ - register int c; + int c; int c2; while( (c = UpperToLower[*zPattern])!=0 ){ diff --git a/src/3rdparty/zlib/crc32.c b/src/3rdparty/zlib/crc32.c index b39c7e1..bbf30e3 100644 --- a/src/3rdparty/zlib/crc32.c +++ b/src/3rdparty/zlib/crc32.c @@ -260,8 +260,8 @@ local unsigned long crc32_little(crc, buf, len) const unsigned char FAR *buf; unsigned len; { - register u4 c; - register const u4 FAR *buf4; + u4 c; + const u4 FAR *buf4; c = (u4)crc; c = ~c; @@ -300,8 +300,8 @@ local unsigned long crc32_big(crc, buf, len) const unsigned char FAR *buf; unsigned len; { - register u4 c; - register const u4 FAR *buf4; + u4 c; + const u4 FAR *buf4; c = REV((u4)crc); c = ~c; diff --git a/src/3rdparty/zlib/deflate.c b/src/3rdparty/zlib/deflate.c index 0fc53bc..16e30ce 100644 --- a/src/3rdparty/zlib/deflate.c +++ b/src/3rdparty/zlib/deflate.c @@ -862,9 +862,9 @@ local uInt longest_match(s, cur_match) IPos cur_match; /* current match */ { unsigned chain_length = s->max_chain_length;/* max hash chain length */ - register Bytef *scan = s->window + s->strstart; /* current string */ - register Bytef *match; /* matched string */ - register int len; /* length of current match */ + Bytef *scan = s->window + s->strstart; /* current string */ + Bytef *match; /* matched string */ + int len; /* length of current match */ int best_len = s->prev_length; /* best match length so far */ int nice_match = s->nice_match; /* stop if match long enough */ 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. * Try with and without -DUNALIGNED_OK to check. */ - register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1; - register ush scan_start = *(ushf*)scan; - register ush scan_end = *(ushf*)(scan+best_len-1); + Bytef *strend = s->window + s->strstart + MAX_MATCH - 1; + ush scan_start = *(ushf*)scan; + ush scan_end = *(ushf*)(scan+best_len-1); #else - register Bytef *strend = s->window + s->strstart + MAX_MATCH; - register Byte scan_end1 = scan[best_len-1]; - register Byte scan_end = scan[best_len]; + Bytef *strend = s->window + s->strstart + MAX_MATCH; + Byte scan_end1 = scan[best_len-1]; + Byte scan_end = scan[best_len]; #endif /* 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; IPos cur_match; /* current match */ { - register Bytef *scan = s->window + s->strstart; /* current string */ - register Bytef *match; /* matched string */ - register int len; /* length of current match */ - register Bytef *strend = s->window + s->strstart + MAX_MATCH; + Bytef *scan = s->window + s->strstart; /* current string */ + Bytef *match; /* matched string */ + int len; /* length of current match */ + Bytef *strend = s->window + s->strstart + MAX_MATCH; /* 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. @@ -1094,8 +1094,8 @@ local void check_match(s, start, match, length) local void fill_window(s) deflate_state *s; { - register unsigned n, m; - register Posf *p; + unsigned n, m; + Posf *p; unsigned more; /* Amount of free space at the end of the window. */ uInt wsize = s->w_size; diff --git a/src/3rdparty/zlib/trees.c b/src/3rdparty/zlib/trees.c index 52c820f..c46b8dc 100644 --- a/src/3rdparty/zlib/trees.c +++ b/src/3rdparty/zlib/trees.c @@ -1143,7 +1143,7 @@ local unsigned bi_reverse(code, len) unsigned code; /* the value to invert */ int len; /* its bit length */ { - register unsigned res = 0; + unsigned res = 0; do { res |= code & 1; code >>= 1, res <<= 1; diff --git a/src/kernel/qaccel.cpp b/src/kernel/qaccel.cpp index 53814dc..fc582f7 100644 --- a/src/kernel/qaccel.cpp +++ b/src/kernel/qaccel.cpp @@ -549,7 +549,7 @@ QAccelPrivate::~QAccelPrivate() static QAccelItem *find_id( QAccelList &list, int id ) { - register QAccelItem *item = list.first(); + QAccelItem *item = list.first(); while ( item && item->id != id ) item = list.next(); return item; @@ -557,7 +557,7 @@ static QAccelItem *find_id( QAccelList &list, int id ) static QAccelItem *find_key( QAccelList &list, const QKeySequence &key ) { - register QAccelItem *item = list.first(); + QAccelItem *item = list.first(); while ( item && !( item->key == key ) ) item = list.next(); return item; diff --git a/src/kernel/qapplication.cpp b/src/kernel/qapplication.cpp index d87d2e5..f784c7e 100644 --- a/src/kernel/qapplication.cpp +++ b/src/kernel/qapplication.cpp @@ -1421,7 +1421,7 @@ QStyle& QApplication::style() if ( is_app_running && !is_app_closing && (*app_pal != app_pal_copy) ) { QEvent e( QEvent::ApplicationPaletteChange ); QWidgetIntDictIt it( *((QWidgetIntDict*)QWidget::mapper) ); - register QWidget *w; + QWidget *w; while ( (w=it.current()) ) { // for all widgets... ++it; sendEvent( w, &e ); @@ -1467,7 +1467,7 @@ void QApplication::setStyle( QStyle *style ) if (old) { if ( is_app_running && !is_app_closing ) { QWidgetIntDictIt it( *((QWidgetIntDict*)QWidget::mapper) ); - register QWidget *w; + QWidget *w; while ( (w=it.current()) ) { // for all widgets... ++it; if ( !w->testWFlags(WType_Desktop) && // except desktop @@ -1494,7 +1494,7 @@ void QApplication::setStyle( QStyle *style ) if (old) { if ( is_app_running && !is_app_closing ) { QWidgetIntDictIt it( *((QWidgetIntDict*)QWidget::mapper) ); - register QWidget *w; + QWidget *w; while ( (w=it.current()) ) { // for all widgets... ++it; if ( !w->testWFlags(WType_Desktop) ) { // except desktop @@ -2080,7 +2080,7 @@ void QApplication::setPalette( const QPalette &palette, bool informWidgets, if ( !oldpal || ( *oldpal != pal ) ) { QEvent e( QEvent::ApplicationPaletteChange ); QWidgetIntDictIt it( *((QWidgetIntDict*)QWidget::mapper) ); - register QWidget *w; + QWidget *w; while ( (w=it.current()) ) { // for all widgets... ++it; if ( all || (!className && w->isTopLevel() ) || w->inherits(className) ) // matching class @@ -2170,7 +2170,7 @@ void QApplication::setFont( const QFont &font, bool informWidgets, if ( informWidgets && is_app_running && !is_app_closing ) { QEvent e( QEvent::ApplicationFontChange ); QWidgetIntDictIt it( *((QWidgetIntDict*)QWidget::mapper) ); - register QWidget *w; + QWidget *w; while ( (w=it.current()) ) { // for all widgets... ++it; if ( all || (!className && w->isTopLevel() ) || w->inherits(className) ) // matching class @@ -2780,7 +2780,7 @@ bool QApplication::internalNotify( QObject *receiver, QEvent * e) { if ( eventFilters ) { QObjectListIt it( *eventFilters ); - register QObject *obj; + QObject *obj; while ( (obj=it.current()) != 0 ) { // send to all filters ++it; // until one returns TRUE if ( obj->eventFilter(receiver,e) ) diff --git a/src/kernel/qapplication_x11.cpp b/src/kernel/qapplication_x11.cpp index a40ca02..cd2b439 100644 --- a/src/kernel/qapplication_x11.cpp +++ b/src/kernel/qapplication_x11.cpp @@ -2894,7 +2894,7 @@ void QApplication::setOverrideCursor( const QCursor &cursor, bool replace ) cursorStack->append( app_cursor ); QWidgetIntDictIt it( *((QWidgetIntDict*)QWidget::mapper) ); - register QWidget *w; + QWidget *w; while ( (w=it.current()) ) { // for all widgets that have if ( w->testWState( WState_OwnCursor ) ) qt_x11_enforce_cursor( w ); @@ -2922,7 +2922,7 @@ void QApplication::restoreOverrideCursor() app_cursor = cursorStack->last(); if ( QWidget::mapper != 0 && !closingDown() ) { QWidgetIntDictIt it( *((QWidgetIntDict*)QWidget::mapper) ); - register QWidget *w; + QWidget *w; while ( (w=it.current()) ) { // set back to original cursors if ( w->testWState( WState_OwnCursor ) ) qt_x11_enforce_cursor( w ); @@ -2986,7 +2986,7 @@ void QApplication::setGlobalMouseTracking( bool enable ) } if ( tellAllWidgets ) { QWidgetIntDictIt it( *((QWidgetIntDict*)QWidget::mapper) ); - register QWidget *w; + QWidget *w; while ( (w=it.current()) ) { if ( app_tracking > 0 ) { // switch on if ( !w->testWState(WState_MouseTracking) ) { diff --git a/src/kernel/qcursor_x11.cpp b/src/kernel/qcursor_x11.cpp index de246a5..465f55f 100644 --- a/src/kernel/qcursor_x11.cpp +++ b/src/kernel/qcursor_x11.cpp @@ -502,7 +502,7 @@ void QCursor::update() const { if ( !initialized ) initialize(); - register QCursorData *d = data; // cheat const! + QCursorData *d = data; // cheat const! if ( d->hcurs ) // already loaded return; diff --git a/src/kernel/qeventloop_unix.cpp b/src/kernel/qeventloop_unix.cpp index 80c8f29..1559287 100644 --- a/src/kernel/qeventloop_unix.cpp +++ b/src/kernel/qeventloop_unix.cpp @@ -211,7 +211,7 @@ static inline void getTime( timeval &t ) // get time of day static void repairTimer( const timeval &time ) // repair broken timer { timeval diff = watchtime - time; - register TimerInfo *t = timerList->first(); + TimerInfo *t = timerList->first(); while ( t ) { // repair all timers t->timeout = t->timeout - diff; t = timerList->next(); @@ -308,7 +308,7 @@ int qStartTimer( int interval, QObject *obj ) bool qKillTimer( int id ) { - register TimerInfo *t; + TimerInfo *t; if ( !timerList || id <= 0 || id > (int)timerBitVec->size() || !timerBitVec->testBit( id-1 ) ) return FALSE; // not init'd or invalid timer @@ -325,7 +325,7 @@ bool qKillTimer( int id ) bool qKillTimer( QObject *obj ) { - register TimerInfo *t; + TimerInfo *t; if ( !timerList ) // not initialized return FALSE; t = timerList->first(); @@ -530,7 +530,7 @@ int QEventLoop::activateTimers() timeval currentTime; int n_act = 0, maxCount = timerList->count(); TimerInfo *begin = 0; - register TimerInfo *t; + TimerInfo *t; for ( ;; ) { if ( ! maxCount-- ) diff --git a/src/kernel/qeventloop_unix_glib.cpp b/src/kernel/qeventloop_unix_glib.cpp index c41acce..24f5783 100644 --- a/src/kernel/qeventloop_unix_glib.cpp +++ b/src/kernel/qeventloop_unix_glib.cpp @@ -239,7 +239,7 @@ static void repairTimer( const timeval &time ) // repair broken timer qt_timerListMutex->lock(); #endif timeval diff = watchtime - time; - register TimerInfo *t = timerList->first(); + TimerInfo *t = timerList->first(); while ( t ) { // repair all timers t->timeout = t->timeout - diff; t = timerList->next(); @@ -374,7 +374,7 @@ bool qKillTimer( int id ) #if defined(QT_THREAD_SUPPORT) if (qt_timerListMutex) qt_timerListMutex->lock(); #endif - register TimerInfo *t; + TimerInfo *t; if ( (!timerList) || (id <= 0) || (id > (int)timerBitVec->size()) || (!timerBitVec->testBit( id-1 )) ) { #if defined(QT_THREAD_SUPPORT) if (qt_timerListMutex) qt_timerListMutex->unlock(); @@ -407,7 +407,7 @@ bool qKillTimer( QObject *obj ) #if defined(QT_THREAD_SUPPORT) if (qt_timerListMutex) qt_timerListMutex->lock(); #endif - register TimerInfo *t; + TimerInfo *t; if ( !timerList ) { // not initialized #if defined(QT_THREAD_SUPPORT) if (qt_timerListMutex) qt_timerListMutex->unlock(); @@ -645,7 +645,7 @@ int QEventLoop::activateTimers() timeval currentTime; int n_act = 0, maxCount = timerList->count(); TimerInfo *begin = 0; - register TimerInfo *t; + TimerInfo *t; for ( ;; ) { if ( ! maxCount-- ) { diff --git a/src/kernel/qimage.cpp b/src/kernel/qimage.cpp index 4bb9947..676a969 100644 --- a/src/kernel/qimage.cpp +++ b/src/kernel/qimage.cpp @@ -1392,7 +1392,7 @@ struct QRgbMap { static bool convert_32_to_8( const QImage *src, QImage *dst, int conversion_flags, QRgb* palette=0, int palette_count=0 ) { - register QRgb *p; + QRgb *p; uchar *b; bool do_quant = FALSE; int y, x; @@ -1702,7 +1702,7 @@ static bool convert_8_to_32( const QImage *src, QImage *dst ) return FALSE; // create failed dst->setAlphaBuffer( src->hasAlphaBuffer() ); for ( int y=0; y<dst->height(); y++ ) { // for each scan line... - register uint *p = (uint *)dst->scanLine(y); + uint *p = (uint *)dst->scanLine(y); uchar *b = src->scanLine(y); uint *end = p + dst->width(); while ( p < end ) @@ -1718,7 +1718,7 @@ static bool convert_1_to_32( const QImage *src, QImage *dst ) return FALSE; // could not create dst->setAlphaBuffer( src->hasAlphaBuffer() ); for ( int y=0; y<dst->height(); y++ ) { // for each scan line... - register uint *p = (uint *)dst->scanLine(y); + uint *p = (uint *)dst->scanLine(y); uchar *b = src->scanLine(y); int x; if ( src->bitOrder() == QImage::BigEndian ) { @@ -1756,7 +1756,7 @@ static bool convert_1_to_8( const QImage *src, QImage *dst ) dst->setColor( 1, 0xff000000 ); } for ( int y=0; y<dst->height(); y++ ) { // for each scan line... - register uchar *p = dst->scanLine(y); + uchar *p = dst->scanLine(y); uchar *b = src->scanLine(y); int x; if ( src->bitOrder() == QImage::BigEndian ) { @@ -1833,7 +1833,7 @@ static bool dither_to_1( const QImage *src, QImage *dst, int bmwidth = (w+7)/8; if ( !(line1 && line2) ) return FALSE; - register uchar *p; + uchar *p; uchar *end; int *b1, *b2; int wbytes = w * (d/8); @@ -2083,7 +2083,7 @@ static bool convert_16_to_32( const QImage *src, QImage *dst ) return FALSE; // create failed dst->setAlphaBuffer( src->hasAlphaBuffer() ); for ( int y=0; y<dst->height(); y++ ) { // for each scan line... - register uint *p = (uint *)dst->scanLine(y); + uint *p = (uint *)dst->scanLine(y); ushort *s = (ushort*)src->scanLine(y); uint *end = p + dst->width(); while ( p < end ) @@ -2099,7 +2099,7 @@ static bool convert_32_to_16( const QImage *src, QImage *dst ) return FALSE; // create failed dst->setAlphaBuffer( src->hasAlphaBuffer() ); for ( int y=0; y<dst->height(); y++ ) { // for each scan line... - register ushort *p = (ushort *)dst->scanLine(y); + ushort *p = (ushort *)dst->scanLine(y); uint *s = (uint*)src->scanLine(y); ushort *end = p + dst->width(); while ( p < end ) @@ -2363,7 +2363,7 @@ QImage QImage::convertBitOrder( Endian bitOrder ) const int bpl = (width() + 7) / 8; for ( int y = 0; y < data->h; y++ ) { - register uchar *p = jumpTable()[y]; + uchar *p = jumpTable()[y]; uchar *end = p + bpl; uchar *b = image.jumpTable()[y]; while ( p < end ) @@ -2454,14 +2454,14 @@ void pnmscale(const QImage& src, QImage& dst) { QRgb* xelrow = 0; QRgb* tempxelrow = 0; - register QRgb* xP; - register QRgb* nxP; + QRgb* xP; + QRgb* nxP; int rows, cols, rowsread, newrows, newcols; - register int row, col, needtoreadrow; + int row, col, needtoreadrow; const uchar maxval = 255; double xscale, yscale; long sxscale, syscale; - register long fracrowtofill, fracrowleft; + long fracrowtofill, fracrowleft; long* as; long* rs; long* gs; @@ -2551,11 +2551,11 @@ void pnmscale(const QImage& src, QImage& dst) xelrow = (QRgb*)src.scanLine(rowsread++); needtoreadrow = 0; } - register long a=0; + long a=0; for ( col = 0, xP = xelrow, nxP = tempxelrow; col < cols; ++col, ++xP, ++nxP ) { - register long r, g, b; + long r, g, b; if ( as ) { r = rs[col] + fracrowtofill * qRed( *xP ) * qAlpha( *xP ) / 255; @@ -2601,9 +2601,9 @@ void pnmscale(const QImage& src, QImage& dst) /* shortcut X scaling if possible */ memcpy(dst.scanLine(rowswritten++), tempxelrow, newcols*4); } else { - register long a, r, g, b; - register long fraccoltofill, fraccolleft = 0; - register int needcol; + long a, r, g, b; + long fraccoltofill, fraccolleft = 0; + int needcol; nxP = (QRgb*)dst.scanLine(rowswritten++); fraccoltofill = SCALE; @@ -3692,7 +3692,7 @@ static void swapPixel01( QImage *image ) // 1-bpp: swap 0 and 1 pixels { int i; if ( image->depth() == 1 && image->numColors() == 2 ) { - register uint *p = (uint *)image->bits(); + uint *p = (uint *)image->bits(); int nbytes = image->numBytes(); for ( i=0; i<nbytes/4; i++ ) { *p = ~*p; @@ -3942,7 +3942,7 @@ static QImageHandler *get_image_handler( const char *format ) { // get pointer to handler qt_init_image_handlers(); qt_init_image_plugins(); - register QImageHandler *p = imageHandlers->first(); + QImageHandler *p = imageHandlers->first(); while ( p ) { // traverse list if ( p->format == format ) return p; @@ -4776,7 +4776,7 @@ bool read_dib( QDataStream& s, int offset, int startpos, QImage& image ) Q_CHECK_PTR( buf ); if ( comp == BMP_RLE4 ) { // run length compression int x=0, y=0, b, c, i; - register uchar *p = line[h-1]; + uchar *p = line[h-1]; uchar *endp = line[h-1]+w; while ( y < h ) { if ( (b=d->getch()) == EOF ) @@ -4841,7 +4841,7 @@ bool read_dib( QDataStream& s, int offset, int startpos, QImage& image ) while ( --h >= 0 ) { if ( d->readBlock((char*)buf,buflen) != buflen ) break; - register uchar *p = line[h]; + uchar *p = line[h]; uchar *b = buf; for ( int i=0; i<w/2; i++ ) { // convert nibbles to bytes *p++ = *b >> 4; @@ -4857,7 +4857,7 @@ bool read_dib( QDataStream& s, int offset, int startpos, QImage& image ) else if ( nbits == 8 ) { // 8 bit BMP image if ( comp == BMP_RLE8 ) { // run length compression int x=0, y=0, b; - register uchar *p = line[h-1]; + uchar *p = line[h-1]; const uchar *endp = line[h-1]+w; while ( y < h ) { if ( (b=d->getch()) == EOF ) @@ -4920,7 +4920,7 @@ bool read_dib( QDataStream& s, int offset, int startpos, QImage& image ) } else if ( nbits == 16 || nbits == 24 || nbits == 32 ) { // 16,24,32 bit BMP image - register QRgb *p; + QRgb *p; QRgb *end; uchar *buf24 = new uchar[bpl]; int bpl24 = ((w*nbits+31)/32)*4; @@ -5051,7 +5051,7 @@ bool qt_write_dib( QDataStream& s, QImage image ) uchar *buf = new uchar[bpl_bmp]; uchar *b, *end; - register uchar *p; + uchar *p; memset( buf, 0, bpl_bmp ); for ( y=image.height()-1; y>=0; y-- ) { // write the image bits @@ -5237,7 +5237,7 @@ static void read_pbm_image( QImageIO *iio ) // read PBM image data } } } else { // read ascii data - register uchar *p; + uchar *p; int n; for ( y=0; y<h; y++ ) { p = image.scanLine( y ); @@ -5503,7 +5503,7 @@ static void read_async_image( QImageIO *iio ) X bitmap image read/write functions *****************************************************************************/ -static inline int hex2byte( register char *p ) +static inline int hex2byte( char *p ) { return ( (isdigit((uchar) *p) ? *p - '0' : toupper((uchar) *p) - 'A' + 10) << 4 ) | ( isdigit((uchar) *(p+1)) ? *(p+1) - '0' : toupper((uchar) *(p+1)) - 'A' + 10 ); @@ -5621,7 +5621,7 @@ static void write_xbm_image( QImageIO *iio ) } } int bcnt = 0; - register char *p = buf; + char *p = buf; int bpl = (w+7)/8; for (int y = 0; y < h; ++y) { uchar *b = image.scanLine(y); diff --git a/src/kernel/qobject.cpp b/src/kernel/qobject.cpp index b48531e..6bd6224 100644 --- a/src/kernel/qobject.cpp +++ b/src/kernel/qobject.cpp @@ -736,7 +736,7 @@ QObject::~QObject() } if ( parentObj ) // remove it from parent object parentObj->removeChild( this ); - register QObject *obj; + QObject *obj; if ( senderObjects ) { // disconnect from senders QSenderObjectList *tmp = senderObjects; senderObjects = 0; @@ -753,7 +753,7 @@ QObject::~QObject() QConnectionList* clist = (*connections)[i]; // for each signal... if ( !clist ) continue; - register QConnection *c; + QConnection *c; QConnectionListIt cit(*clist); while( (c=cit.current()) ) { // for each connected slot... ++cit; @@ -879,7 +879,7 @@ void *qt_inheritedBy( QMetaObject *superClass, const QObject *object ) { if (!object) return 0; - register QMetaObject *mo = object->metaObject(); + QMetaObject *mo = object->metaObject(); while (mo) { if (mo == superClass) return (void*)object; @@ -1266,7 +1266,7 @@ bool QObject::activate_filters( QEvent *e ) if ( !eventFilters ) // no event filter return FALSE; QObjectListIt it( *eventFilters ); - register QObject *obj = it.current(); + QObject *obj = it.current(); while ( obj ) { // send to all filters ++it; // until one returns TRUE if ( obj->eventFilter(this,e) ) { @@ -2466,7 +2466,7 @@ bool QObject::disconnectInternal( const QObject *sender, int signal_index, bool success = FALSE; QConnectionList *clist; - register QConnection *c; + QConnection *c; if ( signal_index == -1 ) { for ( int i = 0; i < (int) s->connections->size(); i++ ) { clist = (*s->connections)[i]; // for all signals... @@ -3060,7 +3060,7 @@ void QObject::dumpObjectInfo() if ( ( clist = connections->at( i ) ) ) { qDebug( "\t%s", metaObject()->signal( i, TRUE )->name ); n++; - register QConnection *c; + QConnection *c; QConnectionListIt cit(*clist); while ( (c=cit.current()) ) { ++cit; diff --git a/src/kernel/qpainter_x11.cpp b/src/kernel/qpainter_x11.cpp index b939848..4c33e2d 100644 --- a/src/kernel/qpainter_x11.cpp +++ b/src/kernel/qpainter_x11.cpp @@ -303,7 +303,7 @@ static void init_gc_array() static void cleanup_gc_array( Display *dpy ) { - register QGC *p = gc_array; + QGC *p = gc_array; int i = gc_array_size; if ( gc_array_init ) { while ( i-- ) { @@ -328,7 +328,7 @@ static GC alloc_gc( Display *dpy, int scrn, Drawable hd, bool monochrome=FALSE, XSetGraphicsExposures( dpy, gc, False ); return gc; } - register QGC *p = gc_array; + QGC *p = gc_array; int i = gc_array_size; if ( !gc_array_init ) // not initialized init_gc_array(); @@ -364,7 +364,7 @@ static void free_gc( Display *dpy, GC gc, bool privateGC = FALSE ) XFreeGC( dpy, gc ); return; } - register QGC *p = gc_array; + QGC *p = gc_array; int i = gc_array_size; if ( gc_array_init ) { while ( i-- ) { diff --git a/src/kernel/qpixmap_x11.cpp b/src/kernel/qpixmap_x11.cpp index 28d2926..79464de 100644 --- a/src/kernel/qpixmap_x11.cpp +++ b/src/kernel/qpixmap_x11.cpp @@ -290,7 +290,7 @@ extern const uchar *qt_get_bitflip_array(); // defined in qimage.cpp static uchar *flip_bits( const uchar *bits, int len ) { - register const uchar *p = bits; + const uchar *p = bits; const uchar *end = p + len; uchar *newdata = new uchar[len]; uchar *b = newdata; @@ -958,7 +958,7 @@ QImage QPixmap::convertToImage() const image.setColor( 0, qRgb(255,255,255) ); image.setColor( 1, qRgb(0,0,0) ); } else if ( !trucol ) { // pixmap with colormap - register uchar *p; + uchar *p; uchar *end; uchar use[256]; // pixel-in-use table uchar pix[256]; // pixel translation table diff --git a/src/kernel/qpointarray.cpp b/src/kernel/qpointarray.cpp index d1c7569..b7f5b2c 100644 --- a/src/kernel/qpointarray.cpp +++ b/src/kernel/qpointarray.cpp @@ -190,8 +190,8 @@ QPointArray::QPointArray( int nPoints, const QCOORD *points ) void QPointArray::translate( int dx, int dy ) { - register QPoint *p = data(); - register int i = size(); + QPoint *p = data(); + int i = size(); QPoint pt( dx, dy ); while ( i-- ) { *p += pt; @@ -440,7 +440,7 @@ QRect QPointArray::boundingRect() const { if ( isEmpty() ) return QRect( 0, 0, 0, 0 ); // null rectangle - register QPoint *pd = data(); + QPoint *pd = data(); int minx, maxx, miny, maxy; minx = maxx = pd->x(); miny = maxy = pd->y(); @@ -937,7 +937,7 @@ QPointArray QPointArray::cubicBezier() const if ( m < 2 ) // at least two points m = 2; QPointArray p( m ); // p = Bezier point array - register QPointData *pd = p.data(); + QPointData *pd = p.data(); float x0 = xvec[0], y0 = yvec[0]; float dt = 1.0F/m; @@ -1018,7 +1018,7 @@ QPointArray QPointArray::cubicBezier() const QDataStream &operator<<( QDataStream &s, const QPointArray &a ) { - register uint i; + uint i; uint len = a.size(); s << len; // write size of array for ( i=0; i<len; i++ ) // write each point @@ -1037,7 +1037,7 @@ QDataStream &operator<<( QDataStream &s, const QPointArray &a ) QDataStream &operator>>( QDataStream &s, QPointArray &a ) { - register uint i; + uint i; uint len; s >> len; // read size of array if ( !a.resize( len ) ) // no memory diff --git a/src/kernel/qpolygonscanner.cpp b/src/kernel/qpolygonscanner.cpp index 86f9ca0..31766dd 100644 --- a/src/kernel/qpolygonscanner.cpp +++ b/src/kernel/qpolygonscanner.cpp @@ -407,8 +407,8 @@ static bool miInsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE, int scanline, ScanLineListBlock **SLLBlock, int *iSLLBlock) { - register EdgeTableEntry *start, *prev; - register ScanLineList *pSLL, *pPrevSLL; + EdgeTableEntry *start, *prev; + ScanLineList *pSLL, *pPrevSLL; ScanLineListBlock *tmpSLLBlock; /* @@ -505,7 +505,7 @@ typedef struct { static void miFreeStorage(ScanLineListBlock *pSLLBlock) { - register ScanLineListBlock *tmpSLLBlock; + ScanLineListBlock *tmpSLLBlock; while (pSLLBlock) { @@ -519,8 +519,8 @@ static bool miCreateETandAET(int count, DDXPointPtr pts, EdgeTable *ET, EdgeTableEntry *AET, EdgeTableEntry *pETEs, ScanLineListBlock *pSLLBlock) { - register DDXPointPtr top, bottom; - register DDXPointPtr PrevPt, CurrPt; + DDXPointPtr top, bottom; + DDXPointPtr PrevPt, CurrPt; int iSLLBlock = 0; int dy; @@ -609,8 +609,8 @@ miCreateETandAET(int count, DDXPointPtr pts, EdgeTable *ET, static void miloadAET(EdgeTableEntry *AET, EdgeTableEntry *ETEs) { - register EdgeTableEntry *pPrevAET; - register EdgeTableEntry *tmp; + EdgeTableEntry *pPrevAET; + EdgeTableEntry *tmp; pPrevAET = AET; AET = AET->next; @@ -656,9 +656,9 @@ miloadAET(EdgeTableEntry *AET, EdgeTableEntry *ETEs) static void micomputeWAET(EdgeTableEntry *AET) { - register EdgeTableEntry *pWETE; - register int inside = 1; - register int isInside = 0; + EdgeTableEntry *pWETE; + int inside = 1; + int isInside = 0; AET->nextWETE = 0; pWETE = AET; @@ -694,10 +694,10 @@ micomputeWAET(EdgeTableEntry *AET) static int miInsertionSort(EdgeTableEntry *AET) { - register EdgeTableEntry *pETEchase; - register EdgeTableEntry *pETEinsert; - register EdgeTableEntry *pETEchaseBackTMP; - register int changed = 0; + EdgeTableEntry *pETEchase; + EdgeTableEntry *pETEinsert; + EdgeTableEntry *pETEchaseBackTMP; + int changed = 0; AET = AET->next; while (AET) @@ -769,12 +769,12 @@ void QPolygonScanner::scan( const QPointArray& pa, bool winding, int index, int DDXPointPtr ptsIn = (DDXPointPtr)pa.data(); ptsIn += index; - register EdgeTableEntry *pAET; /* the Active Edge Table */ - register int y; /* the current scanline */ - register int nPts = 0; /* number of pts in buffer */ - register EdgeTableEntry *pWETE; /* Winding Edge Table */ - register ScanLineList *pSLL; /* Current ScanLineList */ - register DDXPointPtr ptsOut; /* ptr to output buffers */ + EdgeTableEntry *pAET; /* the Active Edge Table */ + int y; /* the current scanline */ + int nPts = 0; /* number of pts in buffer */ + EdgeTableEntry *pWETE; /* Winding Edge Table */ + ScanLineList *pSLL; /* Current ScanLineList */ + DDXPointPtr ptsOut; /* ptr to output buffers */ int *width; DDXPointRec FirstPoint[NUMPTSTOBUFFER]; /* the output buffers */ int FirstWidth[NUMPTSTOBUFFER]; diff --git a/src/kernel/qregion_x11.cpp b/src/kernel/qregion_x11.cpp index 7b04a15..29e54de 100644 --- a/src/kernel/qregion_x11.cpp +++ b/src/kernel/qregion_x11.cpp @@ -89,8 +89,8 @@ struct QRegionPrivate { static void UnionRegion(QRegionPrivate *reg1, QRegionPrivate *reg2, QRegionPrivate *newReg); -static void IntersectRegion(QRegionPrivate *reg1, QRegionPrivate *reg2, register QRegionPrivate *newReg); -static void miRegionOp(register QRegionPrivate *newReg, QRegionPrivate *reg1, QRegionPrivate *reg2, +static void IntersectRegion(QRegionPrivate *reg1, QRegionPrivate *reg2, QRegionPrivate *newReg); +static void miRegionOp(QRegionPrivate *newReg, QRegionPrivate *reg1, QRegionPrivate *reg2, void (*overlapFunc)(...), void (*nonOverlap1Func)(...), void (*nonOverlap2Func)(...)); @@ -300,7 +300,7 @@ typedef void (*voidProcp)(...); static -void UnionRectWithRegion(register const QRect *rect, QRegionPrivate *source, QRegionPrivate *dest) +void UnionRectWithRegion(const QRect *rect, QRegionPrivate *source, QRegionPrivate *dest) { QRegionPrivate region; @@ -333,7 +333,7 @@ void UnionRectWithRegion(register const QRect *rect, QRegionPrivate *source, QRe static void miSetExtents (QRegionPrivate *pReg) { - register QRect *pBox, + QRect *pBox, *pBoxEnd, *pExtents; @@ -383,10 +383,10 @@ miSetExtents (QRegionPrivate *pReg) static int -OffsetRegion(register QRegionPrivate *pRegion, register int x, register int y) +OffsetRegion(QRegionPrivate *pRegion, int x, int y) { - register int nbox; - register QRect *pbox; + int nbox; + QRect *pbox; pbox = pRegion->rects.data(); nbox = pRegion->numRects; @@ -419,12 +419,12 @@ OffsetRegion(register QRegionPrivate *pRegion, register int x, register int y) /* static void*/ static int -miIntersectO (register QRegionPrivate *pReg, register QRect *r1, QRect *r1End, - register QRect *r2, QRect *r2End, int y1, int y2) +miIntersectO (QRegionPrivate *pReg, QRect *r1, QRect *r1End, + QRect *r2, QRect *r2End, int y1, int y2) { - register int x1; - register int x2; - register QRect *pNextRect; + int x1; + int x2; + QRect *pNextRect; pNextRect = pReg->rects.data() + pReg->numRects; @@ -474,7 +474,7 @@ miIntersectO (register QRegionPrivate *pReg, register QRect *r1, QRect *r1End, static void -IntersectRegion(QRegionPrivate *reg1, QRegionPrivate *reg2, register QRegionPrivate *newReg) +IntersectRegion(QRegionPrivate *reg1, QRegionPrivate *reg2, QRegionPrivate *newReg) { /* check for trivial reject */ if ( (!(reg1->numRects)) || (!(reg2->numRects)) || @@ -519,14 +519,14 @@ IntersectRegion(QRegionPrivate *reg1, QRegionPrivate *reg2, register QRegionPriv /* static int*/ static int -miCoalesce (register QRegionPrivate *pReg, int prevStart, int curStart) +miCoalesce (QRegionPrivate *pReg, int prevStart, int curStart) //Region pReg; /* Region to coalesce */ //prevStart; /* Index of start of previous band */ //curStart; /* Index of start of current band */ { - register QRect *pPrevBox; /* Current box in previous band */ - register QRect *pCurBox; /* Current box in current band */ - register QRect *pRegEnd; /* End of region */ + QRect *pPrevBox; /* Current box in previous band */ + QRect *pCurBox; /* Current box in current band */ + QRect *pRegEnd; /* End of region */ int curNumRects; /* Number of rectangles in current * band */ int prevNumRects; /* Number of rectangles in previous @@ -670,11 +670,11 @@ miCoalesce (register QRegionPrivate *pReg, int prevStart, int curStart) */ /* static void*/ static void -miRegionOp(register QRegionPrivate *newReg, QRegionPrivate *reg1, QRegionPrivate *reg2, +miRegionOp(QRegionPrivate *newReg, QRegionPrivate *reg1, QRegionPrivate *reg2, void (*overlapFunc)(...), void (*nonOverlap1Func)(...), void (*nonOverlap2Func)(...)) - //register Region newReg; /* Place to store result */ + //Region newReg; /* Place to store result */ //Region reg1; /* First region in operation */ //Region reg2; /* 2d region in operation */ //void (*overlapFunc)(); /* Function to call for over- @@ -686,18 +686,18 @@ miRegionOp(register QRegionPrivate *newReg, QRegionPrivate *reg1, QRegionPrivate //* overlapping bands in region //* 2 */ { - register QRect *r1; /* Pointer into first region */ - register QRect *r2; /* Pointer into 2d region */ + QRect *r1; /* Pointer into first region */ + QRect *r2; /* Pointer into 2d region */ QRect *r1End; /* End of 1st region */ QRect *r2End; /* End of 2d region */ - register int ybot; /* Bottom of intersection */ - register int ytop; /* Top of intersection */ + int ybot; /* Bottom of intersection */ + int ytop; /* Top of intersection */ int prevBand; /* Index of start of * previous band in newReg */ int curBand; /* Index of start of current * band in newReg */ - register QRect *r1BandEnd; /* End of current band in r1 */ - register QRect *r2BandEnd; /* End of current band in r2 */ + QRect *r1BandEnd; /* End of current band in r1 */ + QRect *r2BandEnd; /* End of current band in r2 */ int top; /* Top of non-overlapping * band */ int bot; /* Bottom of non-overlapping @@ -951,10 +951,10 @@ miRegionOp(register QRegionPrivate *newReg, QRegionPrivate *reg1, QRegionPrivate /* static void*/ static int -miUnionNonO (register QRegionPrivate *pReg, register QRect * r, - QRect * rEnd, register int y1, register int y2) +miUnionNonO (QRegionPrivate *pReg, QRect * r, + QRect * rEnd, int y1, int y2) { - register QRect * pNextRect; + QRect * pNextRect; pNextRect = pReg->rects.data() + pReg->numRects; @@ -993,10 +993,10 @@ miUnionNonO (register QRegionPrivate *pReg, register QRect * r, /* static void*/ static int -miUnionO (register QRegionPrivate *pReg, register QRect *r1, QRect *r1End, - register QRect *r2, QRect *r2End, register int y1, register int y2) +miUnionO (QRegionPrivate *pReg, QRect *r1, QRect *r1End, + QRect *r2, QRect *r2End, int y1, int y2) { - register QRect *pNextRect; + QRect *pNextRect; pNextRect = pReg->rects.data() + pReg->numRects; @@ -1121,10 +1121,10 @@ static void UnionRegion(QRegionPrivate *reg1, QRegionPrivate *reg2, QRegionPriva /* static void*/ static int -miSubtractNonO1 (register QRegionPrivate *pReg, register QRect *r, - QRect *rEnd, register int y1, register int y2) +miSubtractNonO1 (QRegionPrivate *pReg, QRect *r, + QRect *rEnd, int y1, int y2) { - register QRect *pNextRect; + QRect *pNextRect; pNextRect = pReg->rects.data() + pReg->numRects; @@ -1160,11 +1160,11 @@ miSubtractNonO1 (register QRegionPrivate *pReg, register QRect *r, /* static void*/ static int -miSubtractO (register QRegionPrivate *pReg, register QRect *r1, QRect *r1End, - register QRect *r2, QRect *r2End, register int y1, register int y2) +miSubtractO (QRegionPrivate *pReg, QRect *r1, QRect *r1End, + QRect *r2, QRect *r2End, int y1, int y2) { - register QRect *pNextRect; - register int x1; + QRect *pNextRect; + int x1; x1 = r1->left(); @@ -1285,7 +1285,7 @@ miSubtractO (register QRegionPrivate *pReg, register QRect *r1, QRect *r1End, *----------------------------------------------------------------------- */ -static void SubtractRegion(QRegionPrivate *regM, QRegionPrivate *regS, register QRegionPrivate *regD) +static void SubtractRegion(QRegionPrivate *regM, QRegionPrivate *regS, QRegionPrivate *regD) { /* check for trivial reject */ if ( (!(regM->numRects)) || (!(regS->numRects)) || @@ -1361,13 +1361,13 @@ static bool PointInRegion( QRegionPrivate *pRegion, int x, int y ) return FALSE; } -static bool RectInRegion(register QRegionPrivate *region, +static bool RectInRegion(QRegionPrivate *region, int rx, int ry, unsigned int rwidth, unsigned int rheight) { - register QRect *pbox; - register QRect *pboxEnd; + QRect *pbox; + QRect *pboxEnd; QRect rect(rx, ry, rwidth, rheight); - register QRect *prect = ▭ + QRect *prect = ▭ int partIn, partOut; /* this is (just) a useful optimization */ @@ -1800,8 +1800,8 @@ static void InsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE, int scanline, ScanLineListBlock **SLLBlock, int *iSLLBlock) { - register EdgeTableEntry *start, *prev; - register ScanLineList *pSLL, *pPrevSLL; + EdgeTableEntry *start, *prev; + ScanLineList *pSLL, *pPrevSLL; ScanLineListBlock *tmpSLLBlock; /* @@ -1881,12 +1881,12 @@ InsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE, int scanline, */ static void -CreateETandAET(register int count, register QPoint *pts, - EdgeTable *ET, EdgeTableEntry *AET, register EdgeTableEntry *pETEs, +CreateETandAET(int count, QPoint *pts, + EdgeTable *ET, EdgeTableEntry *AET, EdgeTableEntry *pETEs, ScanLineListBlock *pSLLBlock) { - register QPoint *top, *bottom; - register QPoint *PrevPt, *CurrPt; + QPoint *top, *bottom; + QPoint *PrevPt, *CurrPt; int iSLLBlock = 0; int dy; @@ -1969,10 +1969,10 @@ CreateETandAET(register int count, register QPoint *pts, */ static void -loadAET(register EdgeTableEntry *AET, register EdgeTableEntry *ETEs) +loadAET(EdgeTableEntry *AET, EdgeTableEntry *ETEs) { - register EdgeTableEntry *pPrevAET; - register EdgeTableEntry *tmp; + EdgeTableEntry *pPrevAET; + EdgeTableEntry *tmp; pPrevAET = AET; AET = AET->next; @@ -2016,11 +2016,11 @@ loadAET(register EdgeTableEntry *AET, register EdgeTableEntry *ETEs) * */ static void -computeWAET(register EdgeTableEntry *AET) +computeWAET(EdgeTableEntry *AET) { - register EdgeTableEntry *pWETE; - register int inside = 1; - register int isInside = 0; + EdgeTableEntry *pWETE; + int inside = 1; + int isInside = 0; AET->nextWETE = (EdgeTableEntry *)NULL; pWETE = AET; @@ -2054,12 +2054,12 @@ computeWAET(register EdgeTableEntry *AET) */ static int -InsertionSort(register EdgeTableEntry *AET) +InsertionSort(EdgeTableEntry *AET) { - register EdgeTableEntry *pETEchase; - register EdgeTableEntry *pETEinsert; - register EdgeTableEntry *pETEchaseBackTMP; - register int changed = 0; + EdgeTableEntry *pETEchase; + EdgeTableEntry *pETEinsert; + EdgeTableEntry *pETEchaseBackTMP; + int changed = 0; AET = AET->next; while (AET) @@ -2090,9 +2090,9 @@ InsertionSort(register EdgeTableEntry *AET) * Clean up our act. */ static void -FreeStorage(register ScanLineListBlock *pSLLBlock) +FreeStorage(ScanLineListBlock *pSLLBlock) { - register ScanLineListBlock *tmpSLLBlock; + ScanLineListBlock *tmpSLLBlock; while (pSLLBlock) { @@ -2110,15 +2110,15 @@ FreeStorage(register ScanLineListBlock *pSLLBlock) * stack by the calling procedure. * */ -static int PtsToRegion(register int numFullPtBlocks, register int iCurPtBlock, +static int PtsToRegion(int numFullPtBlocks, int iCurPtBlock, POINTBLOCK *FirstPtBlock, QRegionPrivate *reg) { - register QRect *rects; - register QPoint *pts; - register POINTBLOCK *CurPtBlock; - register int i; - register QRect *extents; - register int numRects; + QRect *rects; + QPoint *pts; + POINTBLOCK *CurPtBlock; + int i; + QRect *extents; + int numRects; extents = ®->extents; @@ -2182,12 +2182,12 @@ static QRegionPrivate *PolygonRegion(QPoint *Pts, int Count, int rule) //int rule; /* winding rule */ { QRegionPrivate *region; - register EdgeTableEntry *pAET; /* Active Edge Table */ - register int y; /* current scanline */ - register int iPts = 0; /* number of pts in buffer */ - register EdgeTableEntry *pWETE; /* Winding Edge Table Entry*/ - register ScanLineList *pSLL; /* current scanLineList */ - register QPoint *pts; /* output buffer */ + EdgeTableEntry *pAET; /* Active Edge Table */ + int y; /* current scanline */ + int iPts = 0; /* number of pts in buffer */ + EdgeTableEntry *pWETE; /* Winding Edge Table Entry*/ + ScanLineList *pSLL; /* current scanLineList */ + QPoint *pts; /* output buffer */ EdgeTableEntry *pPrevAET; /* ptr to previous AET */ EdgeTable ET; /* header node for ET */ EdgeTableEntry AET; /* header node for AET */ diff --git a/src/kernel/qrichtext.cpp b/src/kernel/qrichtext.cpp index 71095a3..661f149 100644 --- a/src/kernel/qrichtext.cpp +++ b/src/kernel/qrichtext.cpp @@ -4093,7 +4093,7 @@ QTextParagraph::~QTextParagraph() { delete str; if ( hasdoc ) { - register QTextDocument *doc = document(); + QTextDocument *doc = document(); if ( this == doc->minwParag ) { doc->minwParag = 0; doc->minw = 0; diff --git a/src/kernel/qwidget.cpp b/src/kernel/qwidget.cpp index 461c7f3..e7d27a9 100644 --- a/src/kernel/qwidget.cpp +++ b/src/kernel/qwidget.cpp @@ -1044,7 +1044,7 @@ void QWidget::destroyMapper() QWidgetIntDictIt it( *((QWidgetIntDict*)mapper) ); QWidgetMapper * myMapper = mapper; mapper = 0; - register QWidget *w; + QWidget *w; while ( (w=it.current()) ) { // remove parents widgets ++it; if ( !w->parentObj ) // widget is a parent @@ -4172,7 +4172,7 @@ void QWidget::showChildren( bool spontaneous ) { if ( children() ) { QObjectListIt it(*children()); - register QObject *object; + QObject *object; QWidget *widget; while ( it ) { object = it.current(); @@ -4197,7 +4197,7 @@ void QWidget::hideChildren( bool spontaneous ) { if ( children() ) { QObjectListIt it(*children()); - register QObject *object; + QObject *object; QWidget *widget; while ( it ) { object = it.current(); diff --git a/src/kernel/qwidget_x11.cpp b/src/kernel/qwidget_x11.cpp index ddad9cd..1eb4bcb 100644 --- a/src/kernel/qwidget_x11.cpp +++ b/src/kernel/qwidget_x11.cpp @@ -794,7 +794,7 @@ void QWidget::destroy( bool destroyWindow, bool destroySubWindows ) clearWState( WState_Created ); if ( children() ) { QObjectListIt it(*children()); - register QObject *obj; + QObject *obj; while ( (obj=it.current()) ) { // destroy all widget children ++it; if ( obj->isWidgetType() ) @@ -2476,7 +2476,7 @@ void QWidget::scroll( int dx, int dy, const QRect& r ) if ( !valid_rect && children() ) { // scroll children QPoint pd( dx, dy ); QObjectListIt it(*children()); - register QObject *object; + QObject *object; while ( it ) { // move all children object = it.current(); if ( object->isWidgetType() ) { diff --git a/src/kernel/qwmatrix.cpp b/src/kernel/qwmatrix.cpp index aaefddd..6b13811 100644 --- a/src/kernel/qwmatrix.cpp +++ b/src/kernel/qwmatrix.cpp @@ -724,8 +724,8 @@ QRegion QWMatrix::operator * (const QRegion &r ) const return r; QMemArray<QRect> rects = r.rects(); QRegion result; - register QRect *rect = rects.data(); - register int i = rects.size(); + QRect *rect = rects.data(); + int i = rects.size(); if ( _m12 == 0.0F && _m21 == 0.0F && _m11 > 1.0F && _m22 > 1.0F ) { // simple case, no rotation while ( i ) { diff --git a/src/moc/moc_lex.cpp b/src/moc/moc_lex.cpp index 44aa983..2899133 100644 --- a/src/moc/moc_lex.cpp +++ b/src/moc/moc_lex.cpp @@ -1248,9 +1248,9 @@ extern int yylex (void); */ YY_DECL { - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; #line 113 "moc.l" @@ -1300,7 +1300,7 @@ YY_DECL yy_match: 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] ) { (yy_last_accepting_state) = yy_current_state; @@ -2448,9 +2448,9 @@ case YY_STATE_EOF(IN_CLASSINFO): */ static int yy_get_next_buffer (void) { - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = (yytext_ptr); - register int number_to_move, i; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = (yytext_ptr); + int number_to_move, i; int ret_val; 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) { - register yy_state_type yy_current_state; - register char *yy_cp; + yy_state_type yy_current_state; + char *yy_cp; yy_current_state = (yy_start); yy_current_state += YY_AT_BOL(); 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] ) { (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 ) { - register int yy_is_jam; - register char *yy_cp = (yy_c_buf_p); + int yy_is_jam; + char *yy_cp = (yy_c_buf_p); - register YY_CHAR yy_c = 1; + YY_CHAR yy_c = 1; if ( yy_accept[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; } - 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); @@ -2648,10 +2648,10 @@ static int yy_get_next_buffer (void) if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ - register int number_to_move = (yy_n_chars) + 2; - register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + int number_to_move = (yy_n_chars) + 2; + char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; - register char *source = + char *source = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) @@ -3266,7 +3266,7 @@ int yylex_destroy (void) #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) { - register int i; + int i; for ( i = 0; i < n; ++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 static int yy_flex_strlen (yyconst char * s ) { - register int n; + int n; for ( n = 0; s[n]; ++n ) ; diff --git a/src/table/qtable.cpp b/src/table/qtable.cpp index 9a9a66b..19fadea 100644 --- a/src/table/qtable.cpp +++ b/src/table/qtable.cpp @@ -5359,7 +5359,7 @@ void QTable::repaintSelections( QTableSelection *oldSelection, } 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 ) { if ( !isColumnSelected( i ) ) *s = QTableHeader::Normal; @@ -5373,7 +5373,7 @@ void QTable::repaintSelections( QTableSelection *oldSelection, } 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 ) { if ( !isRowSelected( i ) ) *s = QTableHeader::Normal; @@ -6641,7 +6641,7 @@ void QTableHeader::setSectionStateToAll( SectionState state ) if ( isRowSelection( table->selectionMode() ) && orientation() == Horizontal ) return; - register int *d = (int *) states.data(); + int *d = (int *) states.data(); int n = count(); while (n >= 4) { @@ -7053,7 +7053,7 @@ void QTableHeader::updateSelections() int b = sectionAt( endPos ); int start = QMIN( a, b ); int end = QMAX( a, b ); - register int *s = states.data(); + int *s = states.data(); for ( int i = 0; i < count(); ++i ) { if ( i < start || i > end ) *s = oldStates.data()[ i ]; @@ -7079,8 +7079,8 @@ void QTableHeader::updateSelections() void QTableHeader::saveStates() { oldStates.resize( count() ); - register int *s = states.data(); - register int *s2 = oldStates.data(); + int *s = states.data(); + int *s2 = oldStates.data(); for ( int i = 0; i < count(); ++i ) { *s2 = *s; ++s2; diff --git a/src/tools/qbitarray.cpp b/src/tools/qbitarray.cpp index bdbeaa2..d3922bf 100644 --- a/src/tools/qbitarray.cpp +++ b/src/tools/qbitarray.cpp @@ -372,7 +372,7 @@ bool QBitArray::toggleBit( uint index ) return FALSE; } #endif - register uchar *p = (uchar *)data() + (index>>3); + uchar *p = (uchar *)data() + (index>>3); uchar b = (1 << (index & 7)); // bit position uchar c = *p & b; // read bit *p ^= b; // toggle bit @@ -436,8 +436,8 @@ bool QBitArray::toggleBit( uint index ) QBitArray &QBitArray::operator&=( const QBitArray &a ) { resize( QMAX(size(), a.size()) ); - register uchar *a1 = (uchar *)data(); - register uchar *a2 = (uchar *)a.data(); + uchar *a1 = (uchar *)data(); + uchar *a2 = (uchar *)a.data(); int n = QMIN( QByteArray::size(), a.QByteArray::size() ); int p = QMAX( QByteArray::size(), a.QByteArray::size() ) - n; while ( n-- > 0 ) @@ -467,8 +467,8 @@ QBitArray &QBitArray::operator&=( const QBitArray &a ) QBitArray &QBitArray::operator|=( const QBitArray &a ) { resize( QMAX(size(), a.size()) ); - register uchar *a1 = (uchar *)data(); - register uchar *a2 = (uchar *)a.data(); + uchar *a1 = (uchar *)data(); + uchar *a2 = (uchar *)a.data(); int n = QMIN( QByteArray::size(), a.QByteArray::size() ); while ( n-- > 0 ) *a1++ |= *a2++; @@ -495,8 +495,8 @@ QBitArray &QBitArray::operator|=( const QBitArray &a ) QBitArray &QBitArray::operator^=( const QBitArray &a ) { resize( QMAX(size(), a.size()) ); - register uchar *a1 = (uchar *)data(); - register uchar *a2 = (uchar *)a.data(); + uchar *a1 = (uchar *)data(); + uchar *a2 = (uchar *)a.data(); int n = QMIN( QByteArray::size(), a.QByteArray::size() ); while ( n-- > 0 ) *a1++ ^= *a2++; @@ -517,8 +517,8 @@ QBitArray &QBitArray::operator^=( const QBitArray &a ) QBitArray QBitArray::operator~() const { QBitArray a( size() ); - register uchar *a1 = (uchar *)data(); - register uchar *a2 = (uchar *)a.data(); + uchar *a1 = (uchar *)data(); + uchar *a2 = (uchar *)a.data(); int n = QByteArray::size(); while ( n-- ) *a2++ = ~*a1++; diff --git a/src/tools/qcstring.cpp b/src/tools/qcstring.cpp index 9abf9e7..9a07a84 100644 --- a/src/tools/qcstring.cpp +++ b/src/tools/qcstring.cpp @@ -72,8 +72,8 @@ void *qmemmove( void *dst, const void *src, uint len ) { - register char *d; - register char *s; + char *d; + char *s; if ( dst > src ) { d = (char *)dst + len - 1; s = (char *)src + len - 1; @@ -218,8 +218,8 @@ char *qstrncpy( char *dst, const char *src, uint len ) int qstricmp( const char *str1, const char *str2 ) { - register const uchar *s1 = (const uchar *)str1; - register const uchar *s2 = (const uchar *)str2; + const uchar *s1 = (const uchar *)str1; + const uchar *s2 = (const uchar *)str2; int res; uchar c; if ( !s1 || !s2 ) @@ -252,8 +252,8 @@ int qstricmp( const char *str1, const char *str2 ) int qstrnicmp( const char *str1, const char *str2, uint len ) { - register const uchar *s1 = (const uchar *)str1; - register const uchar *s2 = (const uchar *)str2; + const uchar *s1 = (const uchar *)str1; + const uchar *s2 = (const uchar *)str2; int res; uchar c; if ( !s1 || !s2 ) @@ -273,8 +273,8 @@ static bool crc_tbl_init = FALSE; static void createCRC16Table() // build CRC16 lookup table { - register uint i; - register uint j; + uint i; + uint j; uint v0, v1, v2, v3; for ( i = 0; i < 16; i++ ) { v0 = i & 1; @@ -322,7 +322,7 @@ Q_UINT16 qChecksum( const char *data, uint len ) crc_tbl_init = TRUE; } } - register Q_UINT16 crc = 0xffff; + Q_UINT16 crc = 0xffff; uchar c; uchar *p = (uchar *)data; while ( len-- ) { @@ -940,7 +940,7 @@ int QCString::find( char c, int index, bool cs ) const { if ( (uint)index >= size() ) // index outside string return -1; - register const char *d; + const char *d; if ( cs ) { // case sensitive d = strchr( data()+index, c ); } else { @@ -1056,8 +1056,8 @@ int QCString::find( const char *str, int index, bool cs, uint l ) const int QCString::findRev( char c, int index, bool cs ) const { - register const char *b = data(); - register const char *d; + const char *b = data(); + const char *d; if ( index < 0 ) index = length(); if ( (uint)index >= size() ) @@ -1290,7 +1290,7 @@ QCString QCString::mid( uint index, uint len ) const } else { if ( len > slen-index ) len = slen - index; - register char *p = data()+index; + char *p = data()+index; QCString s( len+1 ); strncpy( s.data(), p, len ); *(s.data()+len) = '\0'; @@ -1390,7 +1390,7 @@ QCString QCString::rightJustify( uint width, char fill, bool truncate ) const QCString QCString::lower() const { QCString s( data() ); - register char *p = s.data(); + char *p = s.data(); if ( p ) { while ( *p ) { *p = tolower( (uchar) *p ); @@ -1416,7 +1416,7 @@ QCString QCString::lower() const QCString QCString::upper() const { QCString s( data() ); - register char *p = s.data(); + char *p = s.data(); if ( p ) { while ( *p ) { *p = toupper(*p); @@ -1448,7 +1448,7 @@ QCString QCString::stripWhiteSpace() const if ( isEmpty() ) // nothing to do return copy(); - register char *s = data(); + char *s = data(); QCString result = s; int reslen = result.length(); if ( !isspace((uchar) s[0]) && !isspace((uchar) s[reslen-1]) ) @@ -2107,7 +2107,7 @@ QCString &QCString::setNum( long n ) { detach(); char buf[20]; - register char *p = &buf[19]; + char *p = &buf[19]; bool neg; if ( n < 0 ) { neg = TRUE; @@ -2137,7 +2137,7 @@ QCString &QCString::setNum( ulong n ) { detach(); char buf[20]; - register char *p = &buf[19]; + char *p = &buf[19]; *p = '\0'; do { *--p = ((int)(n%10)) + '0'; @@ -2195,7 +2195,7 @@ QCString &QCString::setNum( double n, char f, int prec ) qWarning( "QCString::setNum: Invalid format char '%c'", f ); #endif char format[20]; - register char *fs = format; // generate format string + char *fs = format; // generate format string *fs++ = '%'; // "%.<prec>l<f>" if ( prec > 99 ) prec = 99; diff --git a/src/tools/qdatastream.cpp b/src/tools/qdatastream.cpp index 2cdd5f7..f36afeb 100644 --- a/src/tools/qdatastream.cpp +++ b/src/tools/qdatastream.cpp @@ -493,7 +493,7 @@ extern "C" long long __strtoll( const char *, char**, int ); static Q_INT64 read_int_ascii( QDataStream *s ) { - register int n = 0; + int n = 0; char buf[40]; for ( ;; ) { buf[n] = s->device()->getch(); @@ -575,7 +575,7 @@ QDataStream &QDataStream::operator>>( Q_INT16 &i ) } else if ( noswap ) { // no conversion needed dev->readBlock( (char *)&i, sizeof(Q_INT16) ); } else { // swap bytes - register uchar *p = (uchar *)(&i); + uchar *p = (uchar *)(&i); char b[2]; if (dev->readBlock( b, 2 ) >= 2) { *p++ = b[1]; @@ -687,7 +687,7 @@ QDataStream &QDataStream::operator>>( Q_LONG &i ) } else if ( noswap ) { // no conversion needed dev->readBlock( (char *)&i, sizeof(Q_LONG) ); } else { // swap bytes - register uchar *p = (uchar *)(&i); + uchar *p = (uchar *)(&i); char b[sizeof(Q_LONG)]; if (dev->readBlock( b, sizeof(Q_LONG) ) >= (int)sizeof(Q_LONG)) { for ( int j = sizeof(Q_LONG); j; ) { @@ -701,7 +701,7 @@ QDataStream &QDataStream::operator>>( Q_LONG &i ) static double read_double_ascii( QDataStream *s ) { - register int n = 0; + int n = 0; char buf[80]; for ( ;; ) { buf[n] = s->device()->getch(); @@ -759,7 +759,7 @@ QDataStream &QDataStream::operator>>( double &f ) } else if ( noswap ) { // no conversion needed dev->readBlock( (char *)&f, sizeof(double) ); } else { // swap bytes - register uchar *p = (uchar *)(&f); + uchar *p = (uchar *)(&f); char b[8]; if (dev->readBlock( b, 8 ) >= 8) { *p++ = b[7]; @@ -841,7 +841,7 @@ QDataStream &QDataStream::readRawBytes( char *s, uint len ) { CHECK_STREAM_PRECOND if ( printable ) { // printable data - register Q_INT8 *p = (Q_INT8*)s; + Q_INT8 *p = (Q_INT8*)s; if ( version() < 4 ) { while ( len-- ) { Q_INT32 tmp; @@ -918,7 +918,7 @@ QDataStream &QDataStream::operator<<( Q_INT16 i ) } else if ( noswap ) { // no conversion needed dev->writeBlock( (char *)&i, sizeof(Q_INT16) ); } else { // swap bytes - register uchar *p = (uchar *)(&i); + uchar *p = (uchar *)(&i); char b[2]; b[1] = *p++; b[0] = *p; @@ -944,7 +944,7 @@ QDataStream &QDataStream::operator<<( Q_INT32 i ) } else if ( noswap ) { // no conversion needed dev->writeBlock( (char *)&i, sizeof(Q_INT32) ); } else { // swap bytes - register uchar *p = (uchar *)(&i); + uchar *p = (uchar *)(&i); char b[4]; b[3] = *p++; b[2] = *p++; @@ -987,7 +987,7 @@ QDataStream &QDataStream::operator<<( Q_INT64 i ) } else if ( noswap ) { // no conversion needed dev->writeBlock( (char *)&i, sizeof(Q_INT64) ); } else { // swap bytes - register uchar *p = (uchar *)(&i); + uchar *p = (uchar *)(&i); char b[8]; b[7] = *p++; b[6] = *p++; @@ -1027,7 +1027,7 @@ QDataStream &QDataStream::operator<<( Q_LONG i ) } else if ( noswap ) { // no conversion needed dev->writeBlock( (char *)&i, sizeof(Q_LONG) ); } else { // swap bytes - register uchar *p = (uchar *)(&i); + uchar *p = (uchar *)(&i); char b[sizeof(Q_LONG)]; for ( int j = sizeof(Q_LONG); j; ) b[--j] = *p++; @@ -1064,7 +1064,7 @@ QDataStream &QDataStream::operator<<( float f ) if ( noswap ) { // no conversion needed dev->writeBlock( (char *)&g, sizeof(float) ); } else { // swap bytes - register uchar *p = (uchar *)(&g); + uchar *p = (uchar *)(&g); char b[4]; b[3] = *p++; b[2] = *p++; @@ -1094,7 +1094,7 @@ QDataStream &QDataStream::operator<<( double f ) } else if ( noswap ) { // no conversion needed dev->writeBlock( (char *)&f, sizeof(double) ); } else { // swap bytes - register uchar *p = (uchar *)(&f); + uchar *p = (uchar *)(&f); char b[8]; b[7] = *p++; b[6] = *p++; @@ -1163,11 +1163,11 @@ QDataStream &QDataStream::writeRawBytes( const char *s, uint len ) CHECK_STREAM_PRECOND if ( printable ) { // write printable if ( version() < 4 ) { - register char *p = (char *)s; + char *p = (char *)s; while ( len-- ) *this << *p++; } else { - register Q_INT8 *p = (Q_INT8*)s; + Q_INT8 *p = (Q_INT8*)s; while ( len-- ) *this << *p++; } diff --git a/src/tools/qgarray.cpp b/src/tools/qgarray.cpp index 8a27510..495d89a 100644 --- a/src/tools/qgarray.cpp +++ b/src/tools/qgarray.cpp @@ -324,17 +324,17 @@ bool QGArray::fill( const char *d, int len, uint sz ) if ( sz == 1 ) // 8 bit elements memset( data(), *d, len ); else if ( sz == 4 ) { // 32 bit elements - register Q_INT32 *x = (Q_INT32*)data(); + Q_INT32 *x = (Q_INT32*)data(); Q_INT32 v = *((Q_INT32*)d); while ( len-- ) *x++ = v; } else if ( sz == 2 ) { // 16 bit elements - register Q_INT16 *x = (Q_INT16*)data(); + Q_INT16 *x = (Q_INT16*)data(); Q_INT16 v = *((Q_INT16*)d); while ( len-- ) *x++ = v; } else { // any other size elements - register char *x = data(); + char *x = data(); while ( len-- ) { // more complicated memcpy( x, d, sz ); x += sz; @@ -400,7 +400,7 @@ QGArray &QGArray::duplicate( const QGArray &a ) if ( a.shd == shd ) { // a.duplicate(a) ! if ( shd->count > 1 ) { shd->count--; - register array_data *n = newData(); + array_data *n = newData(); Q_CHECK_PTR( n ); if ( (n->len=shd->len) ) { n->data = NEW(char,n->len); @@ -605,11 +605,11 @@ int QGArray::find( const char *d, uint index, uint sz ) const #endif return -1; } - register uint i; + uint i; uint ii; switch ( sz ) { case 1: { // 8 bit elements - register char *x = data() + index; + char *x = data() + index; char v = *d; for ( i=index; i<shd->len; i++ ) { if ( *x++ == v ) @@ -619,7 +619,7 @@ int QGArray::find( const char *d, uint index, uint sz ) const } break; case 2: { // 16 bit elements - register Q_INT16 *x = (Q_INT16*)(data() + index); + Q_INT16 *x = (Q_INT16*)(data() + index); Q_INT16 v = *((Q_INT16*)d); for ( i=index; i<shd->len; i+=2 ) { if ( *x++ == v ) @@ -629,7 +629,7 @@ int QGArray::find( const char *d, uint index, uint sz ) const } break; case 4: { // 32 bit elements - register Q_INT32 *x = (Q_INT32*)(data() + index); + Q_INT32 *x = (Q_INT32*)(data() + index); Q_INT32 v = *((Q_INT32*)d); for ( i=index; i<shd->len; i+=4 ) { if ( *x++ == v ) @@ -659,11 +659,11 @@ int QGArray::find( const char *d, uint index, uint sz ) const int QGArray::contains( const char *d, uint sz ) const { - register uint i = shd->len; + uint i = shd->len; int count = 0; switch ( sz ) { case 1: { // 8 bit elements - register char *x = data(); + char *x = data(); char v = *d; while ( i-- ) { if ( *x++ == v ) @@ -672,7 +672,7 @@ int QGArray::contains( const char *d, uint sz ) const } break; case 2: { // 16 bit elements - register Q_INT16 *x = (Q_INT16*)data(); + Q_INT16 *x = (Q_INT16*)data(); Q_INT16 v = *((Q_INT16*)d); i /= 2; while ( i-- ) { @@ -682,7 +682,7 @@ int QGArray::contains( const char *d, uint sz ) const } break; case 4: { // 32 bit elements - register Q_INT32 *x = (Q_INT32*)data(); + Q_INT32 *x = (Q_INT32*)data(); Q_INT32 v = *((Q_INT32*)d); i /= 4; while ( i-- ) { diff --git a/src/tools/qgcache.cpp b/src/tools/qgcache.cpp index 3c70d9f..51542e7 100644 --- a/src/tools/qgcache.cpp +++ b/src/tools/qgcache.cpp @@ -589,7 +589,7 @@ bool QGCache::makeRoomFor( int cost, int priority ) return FALSE; // than maximum cost if ( priority == -1 ) priority = 32767; - register QCacheItem *ci = lruList->last(); + QCacheItem *ci = lruList->last(); int cntCost = 0; int dumps = 0; // number of items to dump while ( cntCost < cost && ci && ci->skipPriority <= priority ) { diff --git a/src/tools/qgdict.cpp b/src/tools/qgdict.cpp index b9c1810..1ad6da9 100644 --- a/src/tools/qgdict.cpp +++ b/src/tools/qgdict.cpp @@ -95,7 +95,7 @@ int QGDict::hashKeyString( const QString &key ) qWarning( "QGDict::hashKeyString: Invalid null key" ); #endif int i; - register uint h=0; + uint h=0; uint g; const QChar *p = key.unicode(); if ( cases ) { // case sensitive @@ -129,8 +129,8 @@ int QGDict::hashKeyAscii( const char *key ) if ( key == 0 ) qWarning( "QGDict::hashAsciiKey: Invalid null key" ); #endif - register const char *k = key; - register uint h=0; + const char *k = key; + uint h=0; uint g; if ( cases ) { // case sensitive while ( *k ) { @@ -1080,8 +1080,8 @@ QPtrCollection::Item QGDictIterator::toFirst() curNode = 0; return 0; } - register uint i = 0; - register QBaseBucket **v = dict->vec; + uint i = 0; + QBaseBucket **v = dict->vec; while ( !(*v++) ) i++; curNode = dict->vec[i]; @@ -1125,8 +1125,8 @@ QPtrCollection::Item QGDictIterator::operator++() return 0; curNode = curNode->getNext(); if ( !curNode ) { // no next bucket - register uint i = curIndex + 1; // look from next vec element - register QBaseBucket **v = &dict->vec[i]; + uint i = curIndex + 1; // look from next vec element + QBaseBucket **v = &dict->vec[i]; while ( i < dict->size() && !(*v++) ) i++; if ( i == dict->size() ) { // nothing found diff --git a/src/tools/qglist.cpp b/src/tools/qglist.cpp index fb94427..ef4c051 100644 --- a/src/tools/qglist.cpp +++ b/src/tools/qglist.cpp @@ -350,7 +350,7 @@ QLNode *QGList::locate( uint index ) curNode = firstNode; curIndex = 0; } - register QLNode *node; + QLNode *node; int distance = index - curIndex; // node distance to cur node bool forward; // direction to traverse @@ -405,7 +405,7 @@ void QGList::inSort( QPtrCollection::Item d ) //mutex->lock(); #endif int index = 0; - register QLNode *n = firstNode; + QLNode *n = firstNode; while ( n && compareItems(n->data,d) < 0 ){ // find position in list n = n->next; index++; @@ -426,7 +426,7 @@ void QGList::prepend( QPtrCollection::Item d ) #if defined(QT_THREAD_SUPPORT) //mutex->lock(); #endif - register QLNode *n = new QLNode( newItem(d) ); + QLNode *n = new QLNode( newItem(d) ); Q_CHECK_PTR( n ); n->prev = 0; if ( (n->next = firstNode) ) // list is not empty @@ -451,7 +451,7 @@ void QGList::append( QPtrCollection::Item d ) #if defined(QT_THREAD_SUPPORT) //mutex->lock(); #endif - register QLNode *n = new QLNode( newItem(d) ); + QLNode *n = new QLNode( newItem(d) ); Q_CHECK_PTR( n ); n->next = 0; if ( (n->prev = lastNode) ) { // list is not empty @@ -500,7 +500,7 @@ bool QGList::insertAt( uint index, QPtrCollection::Item d ) return FALSE; } QLNode *prevNode = nextNode->prev; - register QLNode *n = new QLNode( newItem(d) ); + QLNode *n = new QLNode( newItem(d) ); Q_CHECK_PTR( n ); nextNode->prev = n; Q_ASSERT( (!((curIndex > 0) && (!prevNode))) ); @@ -564,7 +564,7 @@ QLNode *QGList::unlink() #endif return 0; } - register QLNode *n = curNode; // unlink this node + QLNode *n = curNode; // unlink this node if ( n == firstNode ) { // removing first node ? if ( (firstNode = n->next) ) { firstNode->prev = 0; @@ -881,7 +881,7 @@ void QGList::clear() #if defined(QT_THREAD_SUPPORT) //mutex->lock(); #endif - register QLNode *n = firstNode; + QLNode *n = firstNode; firstNode = lastNode = curNode = 0; // initialize list numNodes = 0; @@ -914,7 +914,7 @@ int QGList::findRef( QPtrCollection::Item d, bool fromStart ) #if defined(QT_THREAD_SUPPORT) //mutex->lock(); #endif - register QLNode *n; + QLNode *n; int index; if ( fromStart ) { // start from first node n = firstNode; @@ -946,7 +946,7 @@ int QGList::find( QPtrCollection::Item d, bool fromStart ) #if defined(QT_THREAD_SUPPORT) //mutex->lock(); #endif - register QLNode *n; + QLNode *n; int index; if ( fromStart ) { // start from first node n = firstNode; @@ -977,7 +977,7 @@ uint QGList::containsRef( QPtrCollection::Item d ) const #if defined(QT_THREAD_SUPPORT) //mutex->lock(); #endif - register QLNode *n = firstNode; + QLNode *n = firstNode; uint count = 0; while ( n ) { // for all nodes... if ( n->data == d ) // count # exact matches @@ -1000,7 +1000,7 @@ uint QGList::contains( QPtrCollection::Item d ) const #if defined(QT_THREAD_SUPPORT) //mutex->lock(); #endif - register QLNode *n = firstNode; + QLNode *n = firstNode; uint count = 0; QGList *that = (QGList*)this; // mutable for compareItems() while ( n ) { // for all nodes... @@ -1167,7 +1167,7 @@ void QGList::toVector( QGVector *vector ) const #endif return; } - register QLNode *n = firstNode; + QLNode *n = firstNode; uint i = 0; while ( n ) { vector->insert( i, n->data ); diff --git a/src/tools/qgvector.cpp b/src/tools/qgvector.cpp index 154d07d..c468896 100644 --- a/src/tools/qgvector.cpp +++ b/src/tools/qgvector.cpp @@ -388,8 +388,8 @@ void QGVector::sort() // sort vector { if ( count() == 0 ) // no elements return; - register Item *start = &vec[0]; - register Item *end = &vec[len-1]; + Item *start = &vec[0]; + Item *end = &vec[len-1]; Item tmp; for (;;) { // put all zero elements behind while ( start < end && *start != 0 ) diff --git a/src/tools/qlocale.cpp b/src/tools/qlocale.cpp index a20ea83..e610d63 100644 --- a/src/tools/qlocale.cpp +++ b/src/tools/qlocale.cpp @@ -163,8 +163,8 @@ static char *_qdtoa(double d, int mode, int ndigits, int *decpt, int *sign, char **rve, char **digits_str); static double qstrtod(const char *s00, char const **se, bool *ok); #endif -static Q_LLONG qstrtoll(const char *nptr, const char **endptr, register int base, bool *ok); -static Q_ULLONG qstrtoull(const char *nptr, const char **endptr, register int base, bool *ok); +static Q_LLONG qstrtoll(const char *nptr, const char **endptr, int base, bool *ok); +static Q_ULLONG qstrtoull(const char *nptr, const char **endptr, int base, bool *ok); static inline bool compareBits(double d1, double d2) { @@ -3797,13 +3797,13 @@ Q_ULLONG QLocalePrivate::stringToUnsLongLong(QString num, int base, * Ignores `locale' stuff. Assumes that the upper and lower case * alphabets and digits are each contiguous. */ -static Q_ULLONG qstrtoull(const char *nptr, const char **endptr, register int base, bool *ok) +static Q_ULLONG qstrtoull(const char *nptr, const char **endptr, int base, bool *ok) { - register const char *s = nptr; - register Q_ULLONG acc; - register unsigned char c; - register Q_ULLONG qbase, cutoff; - register int neg, any, cutlim; + const char *s = nptr; + Q_ULLONG acc; + unsigned char c; + Q_ULLONG qbase, cutoff; + int neg, any, cutlim; if (ok != 0) *ok = TRUE; @@ -3878,13 +3878,13 @@ static Q_ULLONG qstrtoull(const char *nptr, const char **endptr, register int ba * Ignores `locale' stuff. Assumes that the upper and lower case * alphabets and digits are each contiguous. */ -static Q_LLONG qstrtoll(const char *nptr, const char **endptr, register int base, bool *ok) +static Q_LLONG qstrtoll(const char *nptr, const char **endptr, int base, bool *ok) { - register const char *s; - register Q_ULLONG acc; - register unsigned char c; - register Q_ULLONG qbase, cutoff; - register int neg, any, cutlim; + const char *s; + Q_ULLONG acc; + unsigned char c; + Q_ULLONG qbase, cutoff; + int neg, any, cutlim; if (ok != 0) *ok = TRUE; diff --git a/src/tools/qstring.cpp b/src/tools/qstring.cpp index 143f80c..62c5af0 100644 --- a/src/tools/qstring.cpp +++ b/src/tools/qstring.cpp @@ -576,7 +576,7 @@ bool QChar::isSymbol() const int QChar::digitValue() const { #ifndef QT_NO_UNICODETABLES - register int pos = QUnicodeTables::decimal_info[row()]; + int pos = QUnicodeTables::decimal_info[row()]; if( !pos ) return -1; return QUnicodeTables::decimal_info[(pos<<8) + cell()]; @@ -654,7 +654,7 @@ static QString shared_decomp; const QString &QChar::decomposition() const { #ifndef QT_NO_UNICODETABLES - register int pos = QUnicodeTables::decomposition_info[row()]; + int pos = QUnicodeTables::decomposition_info[row()]; if(!pos) return QString::null; pos = QUnicodeTables::decomposition_info[(pos<<8)+cell()]; @@ -681,7 +681,7 @@ const QString &QChar::decomposition() const QChar::Decomposition QChar::decompositionTag() const { #ifndef QT_NO_UNICODETABLES - register int pos = QUnicodeTables::decomposition_info[row()]; + int pos = QUnicodeTables::decomposition_info[row()]; if(!pos) return QChar::Single; pos = QUnicodeTables::decomposition_info[(pos<<8)+cell()]; @@ -961,7 +961,7 @@ private: QLigature::QLigature( QChar c ) { - register int pos = QUnicodeTables::ligature_info[c.row()]; + int pos = QUnicodeTables::ligature_info[c.row()]; if( !pos ) ligatures = 0; else @@ -2528,7 +2528,7 @@ QString QString::multiArg( int numArgs, const QString& a1, const QString& a2, int digitUsed[10]; int argForDigit[10]; }; - register const QChar *uc = d->unicode; + const QChar *uc = d->unicode; const QString *args[4]; const int len = (int) length(); const int end = len - 1; @@ -3018,7 +3018,7 @@ int QString::find( QChar c, int index, bool cs ) const index += l; if ( (uint)index >= l ) return -1; - register const QChar *uc = unicode()+index; + const QChar *uc = unicode()+index; const QChar *end = unicode() + l; if ( cs ) { while ( uc < end && *uc != c ) @@ -3041,7 +3041,7 @@ int QString::find( QChar c, int index, bool cs ) const static void bm_init_skiptable( const QString &pattern, uint *skiptable, bool cs ) { int i = 0; - register uint *st = skiptable; + uint *st = skiptable; int l = pattern.length(); while ( i++ < 0x100/8 ) { *(st++) = l; @@ -3078,7 +3078,7 @@ static int bm_find( const QString &str, int index, const QString &pattern, uint const uint pl = pattern.length(); const uint pl_minus_one = pl - 1; - register const QChar *current = uc + index + pl_minus_one; + const QChar *current = uc + index + pl_minus_one; const QChar *end = uc + l; if ( cs ) { while ( current < end ) { @@ -3269,7 +3269,7 @@ int QString::findRev( QChar c, int index, bool cs ) const if ( (uint)index >= l ) return -1; const QChar *end = unicode(); - register const QChar *uc = end + index; + const QChar *uc = end + index; if ( cs ) { while ( uc >= end && *uc != c ) uc--; @@ -3836,7 +3836,7 @@ QString QString::mid( uint index, uint len ) const len = slen - index; if ( index == 0 && len == slen ) return *this; - register const QChar *p = unicode()+index; + const QChar *p = unicode()+index; QString s( len, TRUE ); memcpy( s.d->unicode, p, len * sizeof(QChar) ); s.d->len = len; @@ -3938,7 +3938,7 @@ QString QString::rightJustify( uint width, QChar fill, bool truncate ) const QString QString::lower() const { int l = length(); - register QChar *p = d->unicode; + QChar *p = d->unicode; while ( l ) { if ( *p != ::lower(*p) ) { QString s( *this ); @@ -3971,7 +3971,7 @@ QString QString::lower() const QString QString::upper() const { int l = length(); - register QChar *p = d->unicode; + QChar *p = d->unicode; while ( l ) { if ( *p != ::upper(*p) ) { QString s( *this ); @@ -4012,7 +4012,7 @@ QString QString::stripWhiteSpace() const { if ( isEmpty() ) // nothing to do return *this; - register const QChar *s = unicode(); + const QChar *s = unicode(); if ( !s->isSpace() && !s[length()-1].isSpace() ) return *this; diff --git a/src/tools/qtextstream.cpp b/src/tools/qtextstream.cpp index eb56eec..ede0163 100644 --- a/src/tools/qtextstream.cpp +++ b/src/tools/qtextstream.cpp @@ -1869,7 +1869,7 @@ QTextStream &QTextStream::output_int( int format, unsigned long long n, bool neg static const char hexdigits_upper[] = "0123456789ABCDEF"; CHECK_STREAM_PRECOND char buf[76]; - register char *p; + char *p; int len; const char *hexdigits; @@ -2099,7 +2099,7 @@ QTextStream &QTextStream::operator<<( double f ) f_char = (flags() & uppercase) ? 'E' : 'e'; else 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++ = '.'; int prec = precision(); diff --git a/src/tools/qunicodetables_p.h b/src/tools/qunicodetables_p.h index ae8136f..8a587d7 100644 --- a/src/tools/qunicodetables_p.h +++ b/src/tools/qunicodetables_p.h @@ -101,7 +101,7 @@ inline QChar::Category category( const QChar &c ) if ( c.unicode() > 0xff ) return QChar::Letter_Uppercase; //######## return (QChar::Category)QUnicodeTables::unicode_info[c.unicode()]; #else - register int uc = ((int)QUnicodeTables::unicode_info[c.row()]) << 8; + int uc = ((int)QUnicodeTables::unicode_info[c.row()]) << 8; uc += c.cell(); return (QChar::Category)QUnicodeTables::unicode_info[uc]; #endif // QT_NO_UNICODETABLES @@ -112,8 +112,8 @@ inline QChar lower( const QChar &c ) #ifndef QT_NO_UNICODETABLES int row = c.row(); int cell = c.cell(); - register int ci = QUnicodeTables::case_info[row]; - register int uc = ((int)QUnicodeTables::unicode_info[c.row()]) << 8; + int ci = QUnicodeTables::case_info[row]; + int uc = ((int)QUnicodeTables::unicode_info[c.row()]) << 8; uc += c.cell(); if (QUnicodeTables::unicode_info[uc] != QChar::Letter_Uppercase || !ci) return c; @@ -131,8 +131,8 @@ inline QChar upper( const QChar &c ) #ifndef QT_NO_UNICODETABLES int row = c.row(); int cell = c.cell(); - register int ci = QUnicodeTables::case_info[row]; - register int uc = ((int)QUnicodeTables::unicode_info[c.row()]) << 8; + int ci = QUnicodeTables::case_info[row]; + int uc = ((int)QUnicodeTables::unicode_info[c.row()]) << 8; uc += c.cell(); if (QUnicodeTables::unicode_info[uc] != QChar::Letter_Lowercase || !ci) return c; @@ -148,7 +148,7 @@ inline QChar upper( const QChar &c ) inline QChar::Direction direction( const QChar &c ) { #ifndef QT_NO_UNICODETABLES - register int pos = QUnicodeTables::direction_info[c.row()]; + int pos = QUnicodeTables::direction_info[c.row()]; return (QChar::Direction) (QUnicodeTables::direction_info[(pos<<8)+c.cell()] & 0x1f); #else Q_UNUSED(c); @@ -159,7 +159,7 @@ inline QChar::Direction direction( const QChar &c ) inline bool mirrored( const QChar &c ) { #ifndef QT_NO_UNICODETABLES - register int pos = QUnicodeTables::direction_info[c.row()]; + int pos = QUnicodeTables::direction_info[c.row()]; return QUnicodeTables::direction_info[(pos<<8)+c.cell()] > 128; #else Q_UNUSED(c); @@ -187,7 +187,7 @@ inline QChar mirroredChar( const QChar &ch ) inline QChar::Joining joining( const QChar &ch ) { #ifndef QT_NO_UNICODETABLES - register int pos = QUnicodeTables::direction_info[ch.row()]; + int pos = QUnicodeTables::direction_info[ch.row()]; return (QChar::Joining) ((QUnicodeTables::direction_info[(pos<<8)+ch.cell()] >> 5) &0x3); #else Q_UNUSED(ch); @@ -225,7 +225,7 @@ inline int lineBreakClass( const QChar &ch ) return ch.row() ? QUnicodeTables::LineBreak_AL : QUnicodeTables::latin1_line_break_info[ch.cell()]; #else - register int pos = ((int)QUnicodeTables::line_break_info[ch.row()] << 8) + ch.cell(); + int pos = ((int)QUnicodeTables::line_break_info[ch.row()] << 8) + ch.cell(); return QUnicodeTables::line_break_info[pos]; #endif } diff --git a/src/widgets/qaction.cpp b/src/widgets/qaction.cpp index 3dd6b27..3f58a88 100644 --- a/src/widgets/qaction.cpp +++ b/src/widgets/qaction.cpp @@ -597,7 +597,7 @@ QAction::~QAction() */ void QAction::setIconSet( const QIconSet& icon ) { - register QIconSet *i = d->iconset; + QIconSet *i = d->iconset; if ( !icon.isNull() ) d->iconset = new QIconSet( icon ); else diff --git a/src/widgets/qbuttongroup.cpp b/src/widgets/qbuttongroup.cpp index 8737804..c2d7e2e 100644 --- a/src/widgets/qbuttongroup.cpp +++ b/src/widgets/qbuttongroup.cpp @@ -371,7 +371,7 @@ void QButtonGroup::buttonPressed() // introduce a QButtonListIt if calling anything int id = -1; QButton *bt = (QButton *)sender(); // object that sent the signal - for ( register QButtonItem *i=buttons->first(); i; i=buttons->next() ) + for ( QButtonItem *i=buttons->first(); i; i=buttons->next() ) if ( bt == i->button ) { // button was clicked id = i->id; break; @@ -391,7 +391,7 @@ void QButtonGroup::buttonReleased() // introduce a QButtonListIt if calling anything int id = -1; QButton *bt = (QButton *)sender(); // object that sent the signal - for ( register QButtonItem *i=buttons->first(); i; i=buttons->next() ) + for ( QButtonItem *i=buttons->first(); i; i=buttons->next() ) if ( bt == i->button ) { // button was clicked id = i->id; break; @@ -414,7 +414,7 @@ void QButtonGroup::buttonClicked() #if defined(QT_CHECK_NULL) Q_ASSERT( bt ); #endif - for ( register QButtonItem *i=buttons->first(); i; i=buttons->next() ) { + for ( QButtonItem *i=buttons->first(); i; i=buttons->next() ) { if ( bt == i->button ) { // button was clicked id = i->id; break; diff --git a/src/widgets/qlcdnumber.cpp b/src/widgets/qlcdnumber.cpp index 4398907..76e9288 100644 --- a/src/widgets/qlcdnumber.cpp +++ b/src/widgets/qlcdnumber.cpp @@ -396,7 +396,7 @@ void QLCDNumber::setNumDigits( int numDigits ) bool doDisplay = ndigits == 0; if ( numDigits == ndigits ) // no change return; - register int i; + int i; int dif; if ( numDigits > ndigits ) { // expand dif = numDigits - ndigits; diff --git a/src/widgets/qmenubar.cpp b/src/widgets/qmenubar.cpp index e832fd4..2d158ad 100644 --- a/src/widgets/qmenubar.cpp +++ b/src/widgets/qmenubar.cpp @@ -785,7 +785,7 @@ void QMenuBar::hidePopups() bool anyVisible = FALSE; #endif QMenuItemListIt it(*mitems); - register QMenuItem *mi; + QMenuItem *mi; while ( (mi=it.current()) ) { ++it; if ( mi->popup() && mi->popup()->isVisible() ) { @@ -1337,7 +1337,7 @@ void QMenuBar::keyPressEvent( QKeyEvent *e ) } if ( dx ) { // highlight next/prev - register int i = actItem; + int i = actItem; int c = mitems->count(); int n = c; while ( n-- ) { @@ -1362,7 +1362,7 @@ void QMenuBar::keyPressEvent( QKeyEvent *e ) QMenuItem* currentSelected = 0; QMenuItem* firstAfterCurrent = 0; - register QMenuItem *m; + QMenuItem *m; int indx = 0; int clashCount = 0; while ( (m=it.current()) ) { @@ -1534,7 +1534,7 @@ void QMenuBar::setupAccelerators() autoaccel = 0; QMenuItemListIt it(*mitems); - register QMenuItem *mi; + QMenuItem *mi; while ( (mi=it.current()) ) { ++it; if ( !mi->isEnabledAndVisible() ) // ### when we have a good solution for the accel vs. focus widget problem, remove that. That is only a workaround diff --git a/src/widgets/qmenudata.cpp b/src/widgets/qmenudata.cpp index 518ea6b..a0ff49d 100644 --- a/src/widgets/qmenudata.cpp +++ b/src/widgets/qmenudata.cpp @@ -260,7 +260,7 @@ int QMenuData::insertAny( const QString *text, const QPixmap *pixmap, if ( id < 0 ) // -2, -3 etc. id = get_seq_id(); - register QMenuItem *mi = new QMenuItem; + QMenuItem *mi = new QMenuItem; Q_CHECK_PTR( mi ); mi->ident = id; if ( widget != 0 ) { @@ -842,7 +842,7 @@ void QMenuData::removeItemAt( int index ) void QMenuData::clear() { - register QMenuItem *mi = mitems->first(); + QMenuItem *mi = mitems->first(); while ( mi ) { if ( mi->popup_menu ) menuDelPopup( mi->popup_menu ); @@ -1041,7 +1041,7 @@ void QMenuData::changeItem( int id, const QPixmap &pixmap ) QMenuData *parent; QMenuItem *mi = findItem( id, &parent ); if ( mi ) { // item found - register QPixmap *i = mi->pixmap_data; + QPixmap *i = mi->pixmap_data; bool fast_refresh = i != 0 && i->width() == pixmap.width() && i->height() == pixmap.height() && @@ -1103,7 +1103,7 @@ void QMenuData::changeItemIconSet( int id, const QIconSet &icon ) QMenuData *parent; QMenuItem *mi = findItem( id, &parent ); if ( mi ) { // item found - register QIconSet *i = mi->iconset_data; + QIconSet *i = mi->iconset_data; bool fast_refresh = i != 0; if ( !icon.isNull() ) mi->iconset_data = new QIconSet( icon ); diff --git a/src/widgets/qpopupmenu.cpp b/src/widgets/qpopupmenu.cpp index 46e5220..bcb3666 100644 --- a/src/widgets/qpopupmenu.cpp +++ b/src/widgets/qpopupmenu.cpp @@ -631,7 +631,7 @@ void QPopupMenu::popup( const QPoint &pos, int indexAtPoint ) h = height(); if(indexAtPoint >= 0) { if(off_top) { //scroll to it - register QMenuItem *mi = NULL; + QMenuItem *mi = NULL; QMenuItemListIt it(*mitems); for(int tmp_y = 0; tmp_y < off_top && (mi=it.current()); ) { QSize sz = style().sizeFromContents(QStyle::CT_PopupMenuItem, this, @@ -794,7 +794,7 @@ void QPopupMenu::hilitSig( int id ) void QPopupMenu::setFirstItemActive() { QMenuItemListIt it(*mitems); - register QMenuItem *mi; + QMenuItem *mi; int ai = 0; if(d->scroll.scrollable) ai = d->scroll.topScrollableIndex; @@ -817,7 +817,7 @@ void QPopupMenu::setFirstItemActive() void QPopupMenu::hideAllPopups() { - register QMenuData *top = this; // find top level popup + QMenuData *top = this; // find top level popup if ( !preventAnimation ) QTimer::singleShot( 10, this, SLOT(allowAnimation()) ); preventAnimation = TRUE; @@ -851,7 +851,7 @@ void QPopupMenu::hidePopups() preventAnimation = TRUE; QMenuItemListIt it(*mitems); - register QMenuItem *mi; + QMenuItem *mi; while ( (mi=it.current()) ) { ++it; if ( mi->popup() && mi->popup()->parentMenu == this ) //avoid circularity @@ -873,7 +873,7 @@ void QPopupMenu::hidePopups() bool QPopupMenu::tryMenuBar( QMouseEvent *e ) { - register QMenuData *top = this; // find top level + QMenuData *top = this; // find top level while ( top->parentMenu ) top = top->parentMenu; #ifndef QT_NO_MENUBAR @@ -909,7 +909,7 @@ bool QPopupMenu::tryMouseEvent( QPopupMenu *p, QMouseEvent * e) void QPopupMenu::byeMenuBar() { #ifndef QT_NO_MENUBAR - register QMenuData *top = this; // find top level + QMenuData *top = this; // find top level while ( top->parentMenu ) top = top->parentMenu; #endif @@ -1075,7 +1075,7 @@ QSize QPopupMenu::updateSize(bool force_update, bool do_resize) int height = 0; int max_width = 0, max_height = 0; QFontMetrics fm = fontMetrics(); - register QMenuItem *mi; + QMenuItem *mi; maxPMWidth = 0; int maxWidgetWidth = 0; tab = 0; @@ -1258,7 +1258,7 @@ QSize QPopupMenu::updateSize(bool force_update, bool do_resize) void QPopupMenu::updateAccel( QWidget *parent ) { QMenuItemListIt it(*mitems); - register QMenuItem *mi; + QMenuItem *mi; if ( parent ) { delete autoaccel; @@ -1349,7 +1349,7 @@ void QPopupMenu::enableAccel( bool enable ) autoaccel->setEnabled( enable ); accelDisabled = !enable; // rememeber when updateAccel QMenuItemListIt it(*mitems); - register QMenuItem *mi; + QMenuItem *mi; while ( (mi=it.current()) ) { // do the same for sub popups ++it; if ( mi->popup() ) // call recursively @@ -1651,7 +1651,7 @@ void QPopupMenu::mousePressEvent( QMouseEvent *e ) } return; } - register QMenuItem *mi = mitems->at(item); + QMenuItem *mi = mitems->at(item); if ( item != actItem ) // new item activated setActiveItem( item ); @@ -1702,7 +1702,7 @@ void QPopupMenu::mouseReleaseEvent( QMouseEvent *e ) else byeMenuBar(); } else { // selected menu item! - register QMenuItem *mi = mitems->at(actItem); + QMenuItem *mi = mitems->at(actItem); if ( mi ->widget() ) { QWidget* widgetAt = QApplication::widgetAt( e->globalPos(), TRUE ); if ( widgetAt && widgetAt != this ) { @@ -1815,7 +1815,7 @@ void QPopupMenu::mouseMoveEvent( QMouseEvent *e ) if ( (e->state() & Qt::MouseButtonMask) && !mouseBtDn ) mouseBtDn = TRUE; // so mouseReleaseEvent will pop down - register QMenuItem *mi = mitems->at( item ); + QMenuItem *mi = mitems->at( item ); if ( mi->widget() ) { QWidget* widgetAt = QApplication::widgetAt( e->globalPos(), TRUE ); @@ -2034,7 +2034,7 @@ void QPopupMenu::keyPressEvent( QKeyEvent *e ) QMenuItem* currentSelected = 0; QMenuItem* firstAfterCurrent = 0; - register QMenuItem *m; + QMenuItem *m; mi = 0; int indx = 0; int clashCount = 0; @@ -2101,7 +2101,7 @@ void QPopupMenu::keyPressEvent( QKeyEvent *e ) } #ifndef QT_NO_MENUBAR if ( !ok_key ) { // send to menu bar - register QMenuData *top = this; // find top level + QMenuData *top = this; // find top level while ( top->parentMenu ) top = top->parentMenu; if ( top->isMenuBar ) { @@ -2118,7 +2118,7 @@ void QPopupMenu::keyPressEvent( QKeyEvent *e ) } else if ( dy < 0 ) { QMenuItemListIt it(*mitems); it.toLast(); - register QMenuItem *mi; + QMenuItem *mi; int ai = count() - 1; while ( (mi=it.current()) ) { --it; @@ -2134,7 +2134,7 @@ void QPopupMenu::keyPressEvent( QKeyEvent *e ) } if ( dy ) { // highlight next/prev - register int i = actItem; + int i = actItem; int c = mitems->count(); for(int n = c; n; n--) { i = i + dy; @@ -2520,7 +2520,7 @@ void QPopupMenu::connectModal( QPopupMenu* receiver, bool doConnect ) receiver, SLOT(modalActivation(int)) ); QMenuItemListIt it(*mitems); - register QMenuItem *mi; + QMenuItem *mi; while ( (mi=it.current()) ) { ++it; if ( mi->popup() && mi->popup() != receiver @@ -2641,12 +2641,12 @@ bool QPopupMenu::customWhatsThis() const */ bool QPopupMenu::focusNextPrevChild( bool next ) { - register QMenuItem *mi; + QMenuItem *mi; int dy = next? 1 : -1; if ( dy && actItem < 0 ) { setFirstItemActive(); } else if ( dy ) { // highlight next/prev - register int i = actItem; + int i = actItem; int c = mitems->count(); int n = c; while ( n-- ) { diff --git a/tools/designer/designer/mainwindow.cpp b/tools/designer/designer/mainwindow.cpp index 4a786ed..f221bb3 100644 --- a/tools/designer/designer/mainwindow.cpp +++ b/tools/designer/designer/mainwindow.cpp @@ -876,7 +876,7 @@ void MainWindow::helpRegister() QProcess process( command + " www.trolltech.com/products/download/eval/evaluation.html" ); if ( !process.start() ) QMessageBox::information( this, "Register Qt", "Launching your web browser failed.\n" - "To register Qt, point your browser to www.trolltech.com/products/download/eval/evaluation.html" ); + "To Qt, point your browser to www.trolltech.com/products/download/eval/evaluation.html" ); #endif } |