1From 321eb9b1ca1b230063259dc43be8a2ab2f3bfee9 Mon Sep 17 00:00:00 2001 2From: Khem Raj <raj.khem@gmail.com> 3Date: Tue, 17 Jan 2023 22:16:36 -0800 4Subject: [PATCH] Remove 'register' storage class classifier 5 6This is gone with c++17 7 8Upstream-Status: Pending 9Signed-off-by: Khem Raj <raj.khem@gmail.com> 10--- 11 src/frontend/atak.cc | 4 ++-- 12 src/frontend/lexpgn.cc | 34 +++++++++++++++++----------------- 13 src/frontend/util.cc | 2 +- 14 3 files changed, 20 insertions(+), 20 deletions(-) 15 16diff --git a/src/frontend/atak.cc b/src/frontend/atak.cc 17index ef19d87..640e150 100644 18--- a/src/frontend/atak.cc 19+++ b/src/frontend/atak.cc 20@@ -37,7 +37,7 @@ short SqAtakd (short sq, short side) 21 * 22 **************************************************************************/ 23 { 24- register BitBoard *a, b, *c, d, blocker; 25+ BitBoard *a, b, *c, d, blocker; 26 int t; 27 28 a = board.b[side]; 29@@ -89,7 +89,7 @@ BitBoard AttackTo (int sq, int side) 30 * 31 ***************************************************************************/ 32 { 33- register BitBoard *a, b, *c, e, blocker; 34+ BitBoard *a, b, *c, e, blocker; 35 int t; 36 37 a = board.b[side]; 38diff --git a/src/frontend/lexpgn.cc b/src/frontend/lexpgn.cc 39index 475899d..971aa13 100644 40--- a/src/frontend/lexpgn.cc 41+++ b/src/frontend/lexpgn.cc 42@@ -2431,9 +2431,9 @@ extern int yylex (void); 43 */ 44 YY_DECL 45 { 46- register yy_state_type yy_current_state; 47- register char *yy_cp, *yy_bp; 48- register int yy_act; 49+ yy_state_type yy_current_state; 50+ char *yy_cp, *yy_bp; 51+ int yy_act; 52 53 #line 153 "lexpgn.ll" 54 55@@ -3118,9 +3118,9 @@ case YY_STATE_EOF(RAV): 56 */ 57 static int yy_get_next_buffer (void) 58 { 59- register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; 60- register char *source = (yytext_ptr); 61- register int number_to_move, i; 62+ char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; 63+ char *source = (yytext_ptr); 64+ int number_to_move, i; 65 int ret_val; 66 67 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) 68@@ -3252,8 +3252,8 @@ static int yy_get_next_buffer (void) 69 70 static yy_state_type yy_get_previous_state (void) 71 { 72- register yy_state_type yy_current_state; 73- register char *yy_cp; 74+ yy_state_type yy_current_state; 75+ char *yy_cp; 76 77 yy_current_state = (yy_start); 78 yy_current_state += YY_AT_BOL(); 79@@ -3278,8 +3278,8 @@ static int yy_get_next_buffer (void) 80 */ 81 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) 82 { 83- register int yy_is_jam; 84- register char *yy_cp = (yy_c_buf_p); 85+ int yy_is_jam; 86+ char *yy_cp = (yy_c_buf_p); 87 88 yy_current_state = yy_nxt[yy_current_state][1]; 89 yy_is_jam = (yy_current_state <= 0); 90@@ -3296,9 +3296,9 @@ static int yy_get_next_buffer (void) 91 return yy_is_jam ? 0 : yy_current_state; 92 } 93 94- static void yyunput (int c, register char * yy_bp ) 95+ static void yyunput (int c, char * yy_bp ) 96 { 97- register char *yy_cp; 98+ char *yy_cp; 99 100 yy_cp = (yy_c_buf_p); 101 102@@ -3308,10 +3308,10 @@ static int yy_get_next_buffer (void) 103 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) 104 { /* need to shift things up to make room */ 105 /* +2 for EOB chars. */ 106- register yy_size_t number_to_move = (yy_n_chars) + 2; 107- register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ 108+ yy_size_t number_to_move = (yy_n_chars) + 2; 109+ char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ 110 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; 111- register char *source = 112+ char *source = 113 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; 114 115 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) 116@@ -3925,7 +3925,7 @@ int yylex_destroy (void) 117 #ifndef yytext_ptr 118 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) 119 { 120- register int i; 121+ int i; 122 for ( i = 0; i < n; ++i ) 123 s1[i] = s2[i]; 124 } 125@@ -3934,7 +3934,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) 126 #ifdef YY_NEED_STRLEN 127 static int yy_flex_strlen (yyconst char * s ) 128 { 129- register int n; 130+ int n; 131 for ( n = 0; s[n]; ++n ) 132 ; 133 134diff --git a/src/frontend/util.cc b/src/frontend/util.cc 135index 5d3efe2..f7f7f1d 100644 136--- a/src/frontend/util.cc 137+++ b/src/frontend/util.cc 138@@ -75,7 +75,7 @@ void UpdateFriends (void) 139 * 140 ***************************************************************************/ 141 { 142- register BitBoard *w, *b; 143+ BitBoard *w, *b; 144 145 w = board.b[white]; 146 b = board.b[black]; 147-- 1482.39.1 149 150