Removed explicit usage of the 'register' keyword.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit d69788cef6)
pull/38/head
Michele Calgaro 4 years ago
parent 9f27244d5e
commit da681e86b1

@ -646,9 +646,9 @@ extern int rtflex (void);
*/ */
YY_DECL YY_DECL
{ {
register yy_state_type yy_current_state; yy_state_type yy_current_state;
register char *yy_cp, *yy_bp; char *yy_cp, *yy_bp;
register int yy_act; int yy_act;
#line 46 "rtf.ll" #line 46 "rtf.ll"
@ -697,7 +697,7 @@ YY_DECL
yy_match: yy_match:
do do
{ {
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
if ( yy_accept[yy_current_state] ) if ( yy_accept[yy_current_state] )
{ {
(yy_last_accepting_state) = yy_current_state; (yy_last_accepting_state) = yy_current_state;
@ -930,9 +930,9 @@ case YY_STATE_EOF(INITIAL):
*/ */
static int yy_get_next_buffer (void) static int yy_get_next_buffer (void)
{ {
register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
register char *source = (yytext_ptr); char *source = (yytext_ptr);
register int number_to_move, i; int number_to_move, i;
int ret_val; int ret_val;
if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
@ -1056,14 +1056,14 @@ static int yy_get_next_buffer (void)
static yy_state_type yy_get_previous_state (void) static yy_state_type yy_get_previous_state (void)
{ {
register yy_state_type yy_current_state; yy_state_type yy_current_state;
register char *yy_cp; char *yy_cp;
yy_current_state = (yy_start); yy_current_state = (yy_start);
for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
{ {
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
if ( yy_accept[yy_current_state] ) if ( yy_accept[yy_current_state] )
{ {
(yy_last_accepting_state) = yy_current_state; (yy_last_accepting_state) = yy_current_state;
@ -1088,10 +1088,10 @@ static int yy_get_next_buffer (void)
*/ */
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
{ {
register int yy_is_jam; int yy_is_jam;
register char *yy_cp = (yy_c_buf_p); char *yy_cp = (yy_c_buf_p);
register YY_CHAR yy_c = 1; YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] ) if ( yy_accept[yy_current_state] )
{ {
(yy_last_accepting_state) = yy_current_state; (yy_last_accepting_state) = yy_current_state;
@ -1664,7 +1664,7 @@ int rtflex_destroy (void)
#ifndef yytext_ptr #ifndef yytext_ptr
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
{ {
register int i; int i;
for ( i = 0; i < n; ++i ) for ( i = 0; i < n; ++i )
s1[i] = s2[i]; s1[i] = s2[i];
} }
@ -1673,7 +1673,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
#ifdef YY_NEED_STRLEN #ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char * s ) static int yy_flex_strlen (yyconst char * s )
{ {
register int n; int n;
for ( n = 0; s[n]; ++n ) for ( n = 0; s[n]; ++n )
; ;

@ -173,7 +173,7 @@ MD5Final(unsigned char digest[16], struct MD5Context *ctx)
void void
MD5Transform(uint32 buf[4], uint32 const in[16]) MD5Transform(uint32 buf[4], uint32 const in[16])
{ {
register uint32 a, b, c, d; uint32 a, b, c, d;
a = buf[0]; a = buf[0];
b = buf[1]; b = buf[1];

@ -590,9 +590,9 @@ YY_MALLOC_DECL
YY_DECL YY_DECL
{ {
register yy_state_type yy_current_state; yy_state_type yy_current_state;
register char *yy_cp, *yy_bp; char *yy_cp, *yy_bp;
register int yy_act; int yy_act;
#line 46 "rtf.ll" #line 46 "rtf.ll"
@ -639,7 +639,7 @@ YY_DECL
yy_match: yy_match:
do do
{ {
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
if ( yy_accept[yy_current_state] ) if ( yy_accept[yy_current_state] )
{ {
yy_last_accepting_state = yy_current_state; yy_last_accepting_state = yy_current_state;
@ -874,9 +874,9 @@ case YY_STATE_EOF(INITIAL):
static int yy_get_next_buffer() static int yy_get_next_buffer()
{ {
register char *dest = yy_current_buffer->yy_ch_buf; char *dest = yy_current_buffer->yy_ch_buf;
register char *source = yytext_ptr; char *source = yytext_ptr;
register int number_to_move, i; int number_to_move, i;
int ret_val; int ret_val;
if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
@ -1006,14 +1006,14 @@ static int yy_get_next_buffer()
static yy_state_type yy_get_previous_state() static yy_state_type yy_get_previous_state()
{ {
register yy_state_type yy_current_state; yy_state_type yy_current_state;
register char *yy_cp; char *yy_cp;
yy_current_state = yy_start; yy_current_state = yy_start;
for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
{ {
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
if ( yy_accept[yy_current_state] ) if ( yy_accept[yy_current_state] )
{ {
yy_last_accepting_state = yy_current_state; yy_last_accepting_state = yy_current_state;
@ -1045,10 +1045,10 @@ static yy_state_type yy_try_NUL_trans( yy_current_state )
yy_state_type yy_current_state; yy_state_type yy_current_state;
#endif #endif
{ {
register int yy_is_jam; int yy_is_jam;
register char *yy_cp = yy_c_buf_p; char *yy_cp = yy_c_buf_p;
register YY_CHAR yy_c = 1; YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] ) if ( yy_accept[yy_current_state] )
{ {
yy_last_accepting_state = yy_current_state; yy_last_accepting_state = yy_current_state;
@ -1069,14 +1069,14 @@ yy_state_type yy_current_state;
#ifndef YY_NO_UNPUT #ifndef YY_NO_UNPUT
#ifdef YY_USE_PROTOS #ifdef YY_USE_PROTOS
static void yyunput( int c, register char *yy_bp ) static void yyunput( int c, char *yy_bp )
#else #else
static void yyunput( c, yy_bp ) static void yyunput( c, yy_bp )
int c; int c;
register char *yy_bp; char *yy_bp;
#endif #endif
{ {
register char *yy_cp = yy_c_buf_p; char *yy_cp = yy_c_buf_p;
/* undo effects of setting up yytext */ /* undo effects of setting up yytext */
*yy_cp = yy_hold_char; *yy_cp = yy_hold_char;
@ -1084,10 +1084,10 @@ register char *yy_bp;
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
{ /* need to shift things up to make room */ { /* need to shift things up to make room */
/* +2 for EOB chars. */ /* +2 for EOB chars. */
register int number_to_move = yy_n_chars + 2; int number_to_move = yy_n_chars + 2;
register char *dest = &yy_current_buffer->yy_ch_buf[ char *dest = &yy_current_buffer->yy_ch_buf[
yy_current_buffer->yy_buf_size + 2]; yy_current_buffer->yy_buf_size + 2];
register char *source = char *source =
&yy_current_buffer->yy_ch_buf[number_to_move]; &yy_current_buffer->yy_ch_buf[number_to_move];
while ( source > yy_current_buffer->yy_ch_buf ) while ( source > yy_current_buffer->yy_ch_buf )
@ -1548,7 +1548,7 @@ yyconst char *s2;
int n; int n;
#endif #endif
{ {
register int i; int i;
for ( i = 0; i < n; ++i ) for ( i = 0; i < n; ++i )
s1[i] = s2[i]; s1[i] = s2[i];
} }
@ -1562,7 +1562,7 @@ static int yy_flex_strlen( s )
yyconst char *s; yyconst char *s;
#endif #endif
{ {
register int n; int n;
for ( n = 0; s[n]; ++n ) for ( n = 0; s[n]; ++n )
; ;

@ -117,7 +117,7 @@ ForwMachine::~ForwMachine()
* @param forward user@host to forward the talk */ * @param forward user@host to forward the talk */
int ForwMachine::getNames(char * forward) int ForwMachine::getNames(char * forward)
{ /* taken from old get_names.c */ { /* taken from old get_names.c */
register char *cp; char *cp;
/* strip out the machine name of the target */ /* strip out the machine name of the target */
for (cp = forward; *cp && !strchr("@:!.", *cp); cp++) for (cp = forward; *cp && !strchr("@:!.", *cp); cp++)

@ -62,7 +62,7 @@
*/ */
NEW_CTL_MSG * KTalkdTable::find_match(NEW_CTL_MSG *request) NEW_CTL_MSG * KTalkdTable::find_match(NEW_CTL_MSG *request)
{ {
register TABLE_ENTRY *ptr; TABLE_ENTRY *ptr;
time_t current_time; time_t current_time;
(void) gettimeofday(&tp, &txp); (void) gettimeofday(&tp, &txp);
@ -92,7 +92,7 @@ NEW_CTL_MSG * KTalkdTable::find_match(NEW_CTL_MSG *request)
*/ */
NEW_CTL_MSG * KTalkdTable::find_request(NEW_CTL_MSG *request) NEW_CTL_MSG * KTalkdTable::find_request(NEW_CTL_MSG *request)
{ {
register TABLE_ENTRY *ptr; TABLE_ENTRY *ptr;
time_t current_time; time_t current_time;
(void) gettimeofday(&tp, &txp); (void) gettimeofday(&tp, &txp);
@ -124,7 +124,7 @@ NEW_CTL_MSG * KTalkdTable::find_request(NEW_CTL_MSG *request)
void KTalkdTable::insert_table(NEW_CTL_MSG *request, NEW_CTL_RESPONSE *response, ForwMachine * fwm) void KTalkdTable::insert_table(NEW_CTL_MSG *request, NEW_CTL_RESPONSE *response, ForwMachine * fwm)
{ {
register TABLE_ENTRY *ptr; TABLE_ENTRY *ptr;
time_t current_time; time_t current_time;
gettimeofday(&tp, &txp); gettimeofday(&tp, &txp);
@ -167,7 +167,7 @@ int KTalkdTable::new_id()
*/ */
int KTalkdTable::delete_invite(uint32_t id_num) int KTalkdTable::delete_invite(uint32_t id_num)
{ {
register TABLE_ENTRY *ptr; TABLE_ENTRY *ptr;
ptr = table; ptr = table;
ktalk_debug("delete_invite(%d)", id_num); ktalk_debug("delete_invite(%d)", id_num);
@ -189,7 +189,7 @@ int KTalkdTable::delete_invite(uint32_t id_num)
/* /*
* Classic delete from a double-linked list * Classic delete from a double-linked list
*/ */
void KTalkdTable::delete_entry(register TABLE_ENTRY *ptr) void KTalkdTable::delete_entry(TABLE_ENTRY *ptr)
{ {
if (table == ptr) if (table == ptr)
table = ptr->next; table = ptr->next;
@ -202,7 +202,7 @@ void KTalkdTable::delete_entry(register TABLE_ENTRY *ptr)
KTalkdTable::~KTalkdTable() KTalkdTable::~KTalkdTable()
{ {
register TABLE_ENTRY *ptr; TABLE_ENTRY *ptr;
ptr = table; ptr = table;
ktalk_debug("final_clean()"); ktalk_debug("final_clean()");
for (ptr = table; ptr != 0L; ptr = ptr->next) { for (ptr = table; ptr != 0L; ptr = ptr->next) {

@ -920,10 +920,10 @@ mktemp(path)
static static
_gettemp(path, doopen) _gettemp(path, doopen)
char *path; char *path;
register int *doopen; int *doopen;
{ {
extern int errno; extern int errno;
register char *start, *trv; char *start, *trv;
struct stat sbuf; struct stat sbuf;
u_int pid; u_int pid;

Loading…
Cancel
Save