Removed explicit usage of the 'register' keyword.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/39/head
Michele Calgaro 4 年前
父节点 dcbadd8017
当前提交 90c6a46c9c
签署人:: MicheleC
GPG 密钥 ID: 2A75B7CA8ADED5CF

@ -215,7 +215,7 @@ void DetailledPrintStyle::print( const TDEABC::Addressee::List &contacts, PrintP
marginRight = 0,
marginBottom = 0;
register int left, top, width, height;
int left, top, width, height;
painter.begin( printer );
printer->setFullPage( true ); // use whole page

@ -373,7 +373,7 @@ union yyalloc
# define YYCOPY(To, From, Count) \
do \
{ \
register YYSIZE_T yyi; \
YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(To)[yyi] = (From)[yyi]; \
} \
@ -839,7 +839,7 @@ yystrlen (yystr)
const char *yystr;
# endif
{
register const char *yys = yystr;
const char *yys = yystr;
while (*yys++ != '\0')
continue;
@ -864,8 +864,8 @@ yystpcpy (yydest, yysrc)
const char *yysrc;
# endif
{
register char *yyd = yydest;
register const char *yys = yysrc;
char *yyd = yydest;
const char *yys = yysrc;
while ((*yyd++ = *yys++) != '\0')
continue;
@ -995,8 +995,8 @@ yyparse ()
#endif
{
register int yystate;
register int yyn;
int yystate;
int yyn;
int yyresult;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
@ -1014,12 +1014,12 @@ yyparse ()
/* The state stack. */
short yyssa[YYINITDEPTH];
short *yyss = yyssa;
register short *yyssp;
short *yyssp;
/* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE *yyvs = yyvsa;
register YYSTYPE *yyvsp;
YYSTYPE *yyvsp;

@ -2571,8 +2571,8 @@ static int day_from_wday(int day, int wday, int num)
static void initialize()
{
register struct holiday *hp;
register int dy;
struct holiday *hp;
int dy;
initialized = 1;
for (hp=holidays, dy=0; dy < 366; dy++, hp++)
{
@ -2594,8 +2594,8 @@ static void initialize()
char *parse_holidays(const char *holidayfile, int year, short force)
{
register struct holiday *hp;
register int dy;
struct holiday *hp;
int dy;
short piped = 0;
if (!initialized)
initialize();

@ -634,8 +634,8 @@ static int day_from_wday(int day, int wday, int num)
static void initialize()
{
register struct holiday *hp;
register int dy;
struct holiday *hp;
int dy;
initialized = 1;
for (hp=holidays, dy=0; dy < 366; dy++, hp++)
{
@ -657,8 +657,8 @@ static void initialize()
char *parse_holidays(const char *holidayfile, int year, short force)
{
register struct holiday *hp;
register int dy;
struct holiday *hp;
int dy;
short piped = 0;
if (!initialized)
initialize();

@ -714,9 +714,9 @@ YY_MALLOC_DECL
YY_DECL
{
register yy_state_type yy_current_state;
register char *yy_cp = NULL, *yy_bp = NULL;
register int yy_act;
yy_state_type yy_current_state;
char *yy_cp = NULL, *yy_bp = NULL;
int yy_act;
#line 13 "scanholiday.lex"
@ -764,7 +764,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;
@ -1293,9 +1293,9 @@ case YY_STATE_EOF(INITIAL):
static int yy_get_next_buffer()
{
register char *dest = yy_current_buffer->yy_ch_buf;
register char *source = yytext_ptr;
register int number_to_move, i;
char *dest = yy_current_buffer->yy_ch_buf;
char *source = yytext_ptr;
int number_to_move, i;
int ret_val;
if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
@ -1425,15 +1425,15 @@ static int yy_get_next_buffer()
static yy_state_type yy_get_previous_state()
{
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;
@ -1465,10 +1465,10 @@ static yy_state_type yy_try_NUL_trans( yy_current_state )
yy_state_type yy_current_state;
#endif
{
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;
@ -1489,14 +1489,14 @@ yy_state_type yy_current_state;
#ifndef YY_NO_UNPUT
#ifdef YY_USE_PROTOS
static void yyunput( int c, register char *yy_bp )
static void yyunput( int c, char *yy_bp )
#else
static void yyunput( c, yy_bp )
int c;
register char *yy_bp;
char *yy_bp;
#endif
{
register char *yy_cp = yy_c_buf_p;
char *yy_cp = yy_c_buf_p;
/* undo effects of setting up yytext */
*yy_cp = yy_hold_char;
@ -1504,10 +1504,10 @@ register char *yy_bp;
if ( yy_cp < yy_current_buffer->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->yy_ch_buf[
int number_to_move = yy_n_chars + 2;
char *dest = &yy_current_buffer->yy_ch_buf[
yy_current_buffer->yy_buf_size + 2];
register char *source =
char *source =
&yy_current_buffer->yy_ch_buf[number_to_move];
while ( source > yy_current_buffer->yy_ch_buf )
@ -1965,7 +1965,7 @@ yyconst char *s2;
int n;
#endif
{
register int i;
int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
@ -1979,7 +1979,7 @@ static int yy_flex_strlen( s )
yyconst char *s;
#endif
{
register int n;
int n;
for ( n = 0; s[n]; ++n )
;

@ -35,8 +35,8 @@ __stpcpy (dest, src)
char *dest;
const char *src;
{
register char *d = dest;
register const char *s = src;
char *d = dest;
const char *s = src;
do
*d++ = *s;

@ -191,10 +191,10 @@ void KXFace::BigPush(Prob *p)
BigAdd(tmp + p->p_offset);
}
int KXFace::BigPop(register const Prob *p)
int KXFace::BigPop(const Prob *p)
{
static unsigned char tmp;
register int i;
int i;
BigDiv(0, &tmp);
i = 0;
@ -212,11 +212,11 @@ int KXFace::BigPop(register const Prob *p)
/* Divide B by a storing the result in B and the remainder in the word
* pointer to by r
*/
void KXFace::BigDiv(register unsigned char a, register unsigned char *r)
void KXFace::BigDiv(unsigned char a, unsigned char *r)
{
register int i;
register unsigned char *w;
register COMP c, d;
int i;
unsigned char *w;
COMP c, d;
a &= WORDMASK;
if ((a == 1) || (B.b_words == 0))
@ -254,11 +254,11 @@ void KXFace::BigDiv(register unsigned char a, register unsigned char *r)
/* Multiply a by B storing the result in B
*/
void KXFace::BigMul(register unsigned char a)
void KXFace::BigMul(unsigned char a)
{
register int i;
register unsigned char *w;
register COMP c;
int i;
unsigned char *w;
COMP c;
a &= WORDMASK;
if ((a == 1) || (B.b_words == 0))
@ -297,9 +297,9 @@ void KXFace::BigMul(register unsigned char a)
*/
void KXFace::BigAdd(unsigned char a)
{
register int i;
register unsigned char *w;
register COMP c;
int i;
unsigned char *w;
COMP c;
a &= WORDMASK;
if (a == 0)
@ -329,8 +329,8 @@ void KXFace::BigClear()
TQCString KXFace::WriteFace()
{
register char *s;
register int i, j, bits, digits, words;
char *s;
int i, j, bits, digits, words;
int digsperword = DIGSPERWORD;
int wordsperline = WORDSPERLINE;
TQCString t( "#define noname_width 48\n#define noname_height 48\nstatic char noname_bits[] = {\n " );
@ -379,7 +379,7 @@ TQCString KXFace::WriteFace()
void KXFace::UnCompAll(char *fbuf)
{
register char *p;
char *p;
BigClear();
BigRead(fbuf);
@ -418,12 +418,12 @@ void KXFace::UnCompress(char *f, int wid, int hei, int lev)
}
}
void KXFace::BigWrite(register char *fbuf)
void KXFace::BigWrite(char *fbuf)
{
static unsigned char tmp;
static char buf[DIGITS];
register char *s;
register int i;
char *s;
int i;
s = buf;
while (B.b_words > 0)
@ -449,9 +449,9 @@ void KXFace::BigWrite(register char *fbuf)
*(fbuf++) = '\0';
}
void KXFace::BigRead(register char *fbuf)
void KXFace::BigRead(char *fbuf)
{
register int c;
int c;
while (*fbuf != '\0')
{
@ -465,8 +465,8 @@ void KXFace::BigRead(register char *fbuf)
void KXFace::ReadFace(char *fbuf)
{
register int c, i;
register char *s, *t;
int c, i;
char *s, *t;
t = s = fbuf;
for(i = strlen(s); i > 0; i--)
@ -521,9 +521,9 @@ void KXFace::ReadFace(char *fbuf)
void KXFace::GenFace()
{
static char newp[PIXELS];
register char *f1;
register char *f2;
register int i;
char *f1;
char *f2;
int i;
f1 = newp;
f2 = F;
@ -539,9 +539,9 @@ void KXFace::UnGenFace()
}
// static
void KXFace::Gen(register char *f)
void KXFace::Gen(char *f)
{
register int m, l, k, j, i, h;
int m, l, k, j, i, h;
for (j = 0; j < HEIGHT; j++)
{
@ -649,7 +649,7 @@ void KXFace::CompAll(char *fbuf)
BigWrite(fbuf);
}
void KXFace::Compress(register char *f, register int wid, register int hei, register int lev)
void KXFace::Compress(char *f, int wid, int hei, int lev)
{
if (AllWhite(f, wid, hei))
{
@ -691,10 +691,10 @@ int KXFace::AllBlack(char *f, int wid, int hei)
return (*f || *(f + 1) || *(f + WIDTH) || *(f + WIDTH + 1));
}
int KXFace::Same(register char *f, register int wid, register int hei)
int KXFace::Same(char *f, int wid, int hei)
{
register char val, *row;
register int x;
char val, *row;
int x;
val = *f;
while (hei--)

@ -566,26 +566,26 @@ namespace KPIM {
void RevPush(const Prob *p);
void BigPush(Prob *p);
int BigPop(register const Prob *p);
void BigDiv(register unsigned char a, register unsigned char *r);
void BigMul(register unsigned char a);
void BigDiv(unsigned char a, unsigned char *r);
void BigMul(unsigned char a);
void BigAdd(unsigned char a);
void BigClear();
TQCString WriteFace();
void UnCompAll(char *fbuf);
void UnCompress(register char *f, register int wid, register int hei, register int lev);
void BigWrite(register char *fbuf);
void BigRead(register char *fbuf);
void UnCompress(char *f, int wid, int hei, int lev);
void BigWrite(char *fbuf);
void BigRead(char *fbuf);
void ReadFace(char *fbuf);
void GenFace();
void UnGenFace();
void Gen(register char *f);
void Gen(char *f);
void PopGreys(char *f, int wid, int hei);
void CompAll(char *fbuf);
void Compress(register char *f, register int wid, register int hei, register int lev);
void Compress(char *f, int wid, int hei, int lev);
int AllWhite(char *f, int wid, int hei);
int AllBlack(char *f, int wid, int hei);
int Same(register char *f, register int wid, register int hei);
int Same(char *f, int wid, int hei);
void PushGreys(char *f, int wid, int hei);

@ -6,7 +6,7 @@
SOAP_FMAC2
-soap_match_tag(struct soap *soap, const char *tag1, const char *tag2)
+soap_match_tag(struct soap *soap, const char *tag1, const char *tag2_)
{ register const char *s, *t;
{ const char *s, *t;
- if (!tag1 || !tag2 || !*tag2)
+ if (!tag1 || !tag2_ || !*tag2_)
return SOAP_OK;

文件差异内容过多而无法显示 加载差异

文件差异内容过多而无法显示 加载差异
正在加载...
取消
保存