From aa98dbfe80580169f3df12489a77e8b904a1d9b9 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 --- tdehtml/css/cssproperties.c | 14 +++++++------- tdehtml/css/cssvalues.c | 14 +++++++------- tdehtml/css/makeprop | 2 +- tdehtml/css/makevalues | 2 +- tdehtml/css/parser.cpp | 16 ++++++++-------- tdehtml/css/tokenizer.cpp | 8 ++++---- 6 files changed, 28 insertions(+), 28 deletions(-) (limited to 'tdehtml/css') diff --git a/tdehtml/css/cssproperties.c b/tdehtml/css/cssproperties.c index bbaeb0d02..1f4ba882b 100644 --- a/tdehtml/css/cssproperties.c +++ b/tdehtml/css/cssproperties.c @@ -39,7 +39,7 @@ struct props { int id; }; -static const struct props * findProp (register const char *str, register unsigned int len); +static const struct props * findProp (register const char *str, unsigned int len); /* maximum key range = 469, duplicates = 0 */ #ifdef __GNUC__ @@ -50,7 +50,7 @@ inline #endif #endif static unsigned int -hash_prop (register const char *str, register unsigned int len) +hash_prop (register const char *str, unsigned int len) { static const unsigned short asso_values[] = { @@ -81,7 +81,7 @@ hash_prop (register const char *str, register unsigned int len) 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472 }; - register int hval = len; + int hval = len; switch (hval) { @@ -189,7 +189,7 @@ hash_prop (register const char *str, register unsigned int len) __inline #endif const struct props * -findProp (register const char *str, register unsigned int len) +findProp (register const char *str, unsigned int len) { enum { @@ -516,15 +516,15 @@ findProp (register const char *str, register unsigned int len) if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) { - register int key = hash_prop (str, len); + int key = hash_prop (str, len); if (key <= MAX_HASH_VALUE && key >= 0) { - register int index = lookup[key]; + int index = lookup[key]; if (index >= 0) { - register const char *s = wordlist_prop[index].name; + const char *s = wordlist_prop[index].name; if (*str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0') return &wordlist_prop[index]; diff --git a/tdehtml/css/cssvalues.c b/tdehtml/css/cssvalues.c index 2bd3746ec..9114aa513 100644 --- a/tdehtml/css/cssvalues.c +++ b/tdehtml/css/cssvalues.c @@ -39,7 +39,7 @@ struct css_value { int id; }; -static const css_value* findValue (register const char *str, register unsigned int len); +static const css_value* findValue (register const char *str, unsigned int len); /* maximum key range = 2876, duplicates = 0 */ #ifdef __GNUC__ @@ -50,7 +50,7 @@ inline #endif #endif static unsigned int -hash_val (register const char *str, register unsigned int len) +hash_val (register const char *str, unsigned int len) { static const unsigned short asso_values[] = { @@ -81,7 +81,7 @@ hash_val (register const char *str, register unsigned int len) 2876, 2876, 2876, 2876, 2876, 2876, 2876, 2876, 2876, 2876, 2876, 2876, 2876, 2876, 2876, 2876, 2876 }; - register int hval = 0; + int hval = 0; switch (len) { @@ -177,7 +177,7 @@ hash_val (register const char *str, register unsigned int len) __inline #endif const struct css_value * -findValue (register const char *str, register unsigned int len) +findValue (register const char *str, unsigned int len) { enum { @@ -1036,15 +1036,15 @@ findValue (register const char *str, register unsigned int len) if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) { - register int key = hash_val (str, len); + int key = hash_val (str, len); if (key <= MAX_HASH_VALUE && key >= 0) { - register int index = lookup[key]; + int index = lookup[key]; if (index >= 0) { - register const char *s = wordlist_value[index].name; + const char *s = wordlist_value[index].name; if (*str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0') return &wordlist_value[index]; diff --git a/tdehtml/css/makeprop b/tdehtml/css/makeprop index a1a30ac97..a23f0b54f 100644 --- a/tdehtml/css/makeprop +++ b/tdehtml/css/makeprop @@ -23,7 +23,7 @@ # grep "^[^\#]" cssproperties.in > cssproperties.strip -echo -e '%{\n/* This file is automatically generated from cssproperties.in by makeprop, do not edit */\n/* Copyright 1999 W. Bastian */\n#include "cssproperties.h"\n%}\nstruct props {\n const char *name;\n int id;\n};\n\nstatic const struct props * findProp (register const char *str, register unsigned int len);\n\n%%' > cssproperties.gperf +echo -e '%{\n/* This file is automatically generated from cssproperties.in by makeprop, do not edit */\n/* Copyright 1999 W. Bastian */\n#include "cssproperties.h"\n%}\nstruct props {\n const char *name;\n int id;\n};\n\nstatic const struct props * findProp (register const char *str, unsigned int len);\n\n%%' > cssproperties.gperf cat cssproperties.strip | awk '{ do { prop = $0; gsub("-", "_"); print prop ", CSS_PROP_" toupper($0) } while (getline) }' >> cssproperties.gperf echo '%%' >> cssproperties.gperf echo -e '/* This file is automatically generated from cssproperties.in by makeprop, do not edit */\n/* Copyright 1998 W. Bastian */\n\n#ifndef CSSPROPERTIES_H\n#define CSSPROPERTIES_H\n\nDOM::DOMString getPropertyName(unsigned short id) KDE_NO_EXPORT;\n' > cssproperties.h diff --git a/tdehtml/css/makevalues b/tdehtml/css/makevalues index 0f81f1612..eb496a563 100755 --- a/tdehtml/css/makevalues +++ b/tdehtml/css/makevalues @@ -24,7 +24,7 @@ # grep "^[^\#]" cssvalues.in > cssvalues.strip -echo -e '%{\n/* This file is automatically generated from cssvalues.in by makevalues, do not edit */\n/* Copyright 1999 W. Bastian */\n#include "cssvalues.h"\n%}\nstruct css_value {\n const char *name;\n int id;\n};\n\nstatic const css_value* findValue (register const char *str, register unsigned int len);\n\n%%' > cssvalues.gperf +echo -e '%{\n/* This file is automatically generated from cssvalues.in by makevalues, do not edit */\n/* Copyright 1999 W. Bastian */\n#include "cssvalues.h"\n%}\nstruct css_value {\n const char *name;\n int id;\n};\n\nstatic const css_value* findValue (register const char *str, unsigned int len);\n\n%%' > cssvalues.gperf cat cssvalues.strip | awk '{ do { prop = $0; gsub("-", "_"); print prop ", CSS_VAL_" toupper($0) } while (getline) }' >> cssvalues.gperf echo '%%' >> cssvalues.gperf echo -e '/* This file is automatically generated from cssvalues.in by diff --git a/tdehtml/css/parser.cpp b/tdehtml/css/parser.cpp index 3e8ee89fd..6fa18f17c 100644 --- a/tdehtml/css/parser.cpp +++ b/tdehtml/css/parser.cpp @@ -385,7 +385,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]; \ } \ @@ -1122,7 +1122,7 @@ yystrlen (yystr) const char *yystr; # endif { - register const char *yys = yystr; + const char *yys = yystr; while (*yys++ != '\0') continue; @@ -1147,8 +1147,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; @@ -1338,8 +1338,8 @@ YYSTYPE yylval; /* Number of syntax errors so far. */ int yynerrs; - register int yystate; - register int yyn; + int yystate; + int yyn; int yyresult; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; @@ -1357,12 +1357,12 @@ int yynerrs; /* The state stack. */ short int yyssa[YYINITDEPTH]; short int *yyss = yyssa; - register short int *yyssp; + short int *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs = yyvsa; - register YYSTYPE *yyvsp; + YYSTYPE *yyvsp; diff --git a/tdehtml/css/tokenizer.cpp b/tdehtml/css/tokenizer.cpp index 48fd174d1..687cd4ba0 100644 --- a/tdehtml/css/tokenizer.cpp +++ b/tdehtml/css/tokenizer.cpp @@ -592,9 +592,9 @@ static yyconst short int yy_chk[1695] = YY_DECL { - register yy_state_type yy_current_state; - register unsigned short *yy_cp, *yy_bp; - register int yy_act; + yy_state_type yy_current_state; + unsigned short *yy_cp, *yy_bp; + int yy_act; #line 25 "tokenizer.flex" @@ -617,7 +617,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; -- cgit v1.2.1