From 41e0f335b5e2ab65cf47191a5b1c32adee2c24c3 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Thu, 30 Jan 2020 20:17:34 +0900 Subject: Removed explicit usage of the 'register' keyword. Signed-off-by: Michele Calgaro (cherry picked from commit aa98dbfe80580169f3df12489a77e8b904a1d9b9) --- dcop/KDE-ICE/Xtrans.c | 4 ++-- dcop/KDE-ICE/iceauth.c | 4 ++-- dcop/KDE-ICE/misc.c | 16 ++++++++-------- dcop/dcopidl/scanner.cc | 38 +++++++++++++++++++------------------- dcop/dcopserver.cpp | 6 +++--- 5 files changed, 34 insertions(+), 34 deletions(-) (limited to 'dcop') diff --git a/dcop/KDE-ICE/Xtrans.c b/dcop/KDE-ICE/Xtrans.c index b954d4b3b..e34574248 100644 --- a/dcop/KDE-ICE/Xtrans.c +++ b/dcop/KDE-ICE/Xtrans.c @@ -1261,7 +1261,7 @@ static int TRANS(ReadV) (XtransConnInfo ciptr, struct iovec *iov, int iovcnt) len = iov->iov_len; base = iov->iov_base; while (len > 0) { - register int nbytes; + int nbytes; nbytes = TRANS(Read) (ciptr, base, len); if (nbytes < 0 && total == 0) return -1; if (nbytes <= 0) return total; @@ -1293,7 +1293,7 @@ static int TRANS(WriteV) (XtransConnInfo ciptr, struct iovec *iov, int iovcnt) len = iov->iov_len; base = iov->iov_base; while (len > 0) { - register int nbytes; + int nbytes; nbytes = TRANS(Write) (ciptr, base, len); if (nbytes < 0 && total == 0) return -1; if (nbytes <= 0) return total; diff --git a/dcop/KDE-ICE/iceauth.c b/dcop/KDE-ICE/iceauth.c index 72297ceb5..74db91367 100644 --- a/dcop/KDE-ICE/iceauth.c +++ b/dcop/KDE-ICE/iceauth.c @@ -45,7 +45,7 @@ extern Time_t time (); #define Time_t time_t #endif -static int binaryEqual (register const char *a, register const char *b, register unsigned len); +static int binaryEqual (register const char *a, const char *b, unsigned len); static int was_called_state; @@ -264,7 +264,7 @@ char **errorStringRet; * local routines */ -static int binaryEqual (register const char *a, register const char *b, register unsigned len) +static int binaryEqual (register const char *a, const char *b, unsigned len) { while (len--) if (*a++ != *b++) diff --git a/dcop/KDE-ICE/misc.c b/dcop/KDE-ICE/misc.c index 0dbbf24b7..4658b8d14 100644 --- a/dcop/KDE-ICE/misc.c +++ b/dcop/KDE-ICE/misc.c @@ -233,12 +233,12 @@ IceConn iceConn; Status _IceRead (iceConn, nbytes, ptr) -register IceConn iceConn; +IceConn iceConn; unsigned long nbytes; -register char *ptr; +char *ptr; { - register unsigned long nleft; + unsigned long nleft; nleft = nbytes; while (nleft > 0) @@ -335,8 +335,8 @@ register char *ptr; void _IceReadSkip (iceConn, nbytes) -register IceConn iceConn; -register unsigned long nbytes; +IceConn iceConn; +unsigned long nbytes; { char temp[512]; @@ -359,12 +359,12 @@ register unsigned long nbytes; void _IceWrite (iceConn, nbytes, ptr) -register IceConn iceConn; +IceConn iceConn; unsigned long nbytes; -register char *ptr; +char *ptr; { - register unsigned long nleft; + unsigned long nleft; nleft = nbytes; while (nleft > 0) diff --git a/dcop/dcopidl/scanner.cc b/dcop/dcopidl/scanner.cc index da3481c04..55a20aba3 100644 --- a/dcop/dcopidl/scanner.cc +++ b/dcop/dcopidl/scanner.cc @@ -1209,9 +1209,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 148 "scanner.ll" @@ -1270,7 +1270,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)]; while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; @@ -1909,9 +1909,9 @@ ECHO; */ 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] ) @@ -2014,8 +2014,8 @@ 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); @@ -2024,7 +2024,7 @@ static int yy_get_next_buffer (void) 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); while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; @@ -2045,9 +2045,9 @@ 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; + int yy_is_jam; - register YY_CHAR yy_c = 1; + YY_CHAR yy_c = 1; while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; @@ -2062,9 +2062,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); @@ -2074,10 +2074,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 ) @@ -2694,7 +2694,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]; } @@ -2703,7 +2703,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/dcop/dcopserver.cpp b/dcop/dcopserver.cpp index 15066047a..60866484c 100644 --- a/dcop/dcopserver.cpp +++ b/dcop/dcopserver.cpp @@ -118,7 +118,7 @@ static Bool HostBasedAuthProc ( char* /*hostname*/) extern "C" { extern IceWriteHandler _kde_IceWriteHandler; extern IceIOErrorHandler _kde_IceIOErrorHandler; -void DCOPIceWriteChar(register IceConn iceConn, unsigned long nbytes, char *ptr); +void DCOPIceWriteChar(IceConn iceConn, unsigned long nbytes, char *ptr); } static TQCString readQCString(TQDataStream &ds) @@ -237,7 +237,7 @@ static unsigned long writeIceData(IceConn iceConn, unsigned long nbytes, char *p return 0; } -void DCOPIceWriteChar(register IceConn iceConn, unsigned long nbytes, char *ptr) +void DCOPIceWriteChar(IceConn iceConn, unsigned long nbytes, char *ptr) { DCOPConnection* conn = the_server->findConn( iceConn ); #ifdef DCOP_DEBUG @@ -384,7 +384,7 @@ tqWarning("[dcopserver] slotOutputRead() more data to send."); } } -static void DCOPIceSendData(register IceConn _iceConn, +static void DCOPIceSendData(IceConn _iceConn, const TQByteArray &_data) { if (_iceConn->outbufptr > _iceConn->outbuf) -- cgit v1.2.1