summaryrefslogtreecommitdiffstats
path: root/tdespell2/plugins
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2020-01-30 20:17:34 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2020-01-30 23:14:04 +0900
commitaa98dbfe80580169f3df12489a77e8b904a1d9b9 (patch)
tree483608a6346be3fa4d8f95d35a05952c81221b91 /tdespell2/plugins
parentf29aa92d38e9e1f353ed48f7952150437db8c890 (diff)
downloadtdelibs-aa98dbfe80580169f3df12489a77e8b904a1d9b9.tar.gz
tdelibs-aa98dbfe80580169f3df12489a77e8b904a1d9b9.zip
Removed explicit usage of the 'register' keyword.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'tdespell2/plugins')
-rw-r--r--tdespell2/plugins/ispell/correct.cpp40
-rw-r--r--tdespell2/plugins/ispell/good.cpp14
-rw-r--r--tdespell2/plugins/ispell/hash.cpp4
-rw-r--r--tdespell2/plugins/ispell/lookup.cpp20
-rw-r--r--tdespell2/plugins/ispell/makedent.cpp26
-rw-r--r--tdespell2/plugins/ispell/tgood.cpp24
6 files changed, 64 insertions, 64 deletions
diff --git a/tdespell2/plugins/ispell/correct.cpp b/tdespell2/plugins/ispell/correct.cpp
index 65e98fa6d..a417ee777 100644
--- a/tdespell2/plugins/ispell/correct.cpp
+++ b/tdespell2/plugins/ispell/correct.cpp
@@ -244,8 +244,8 @@ int compoundflag = COMPOUND_CONTROLLED;
int
ISpellChecker::casecmp (char *a, char *b, int canonical)
{
- register ichar_t * ap;
- register ichar_t * bp;
+ ichar_t * ap;
+ ichar_t * bp;
ichar_t inta[INPUTWORDLEN + 4 * MAXAFFIXLEN + 4];
ichar_t intb[INPUTWORDLEN + 4 * MAXAFFIXLEN + 4];
@@ -290,7 +290,7 @@ ISpellChecker::casecmp (char *a, char *b, int canonical)
void
ISpellChecker::makepossibilities (ichar_t *word)
{
- register int i;
+ int i;
for (i = 0; i < MAXPOSSIBLE; i++)
m_possibilities[i][0] = 0;
@@ -332,8 +332,8 @@ ISpellChecker::makepossibilities (ichar_t *word)
int
ISpellChecker::insert (ichar_t *word)
{
- register int i;
- register char * realword;
+ int i;
+ char * realword;
realword = ichartosstr (word, 0);
for (i = 0; i < m_pcount; i++)
@@ -381,9 +381,9 @@ ISpellChecker::wrongcapital (ichar_t *word)
void
ISpellChecker::wrongletter (ichar_t *word)
{
- register int i;
- register int j;
- register int n;
+ int i;
+ int j;
+ int n;
ichar_t savechar;
ichar_t newword[INPUTWORDLEN + MAXAFFIXLEN];
@@ -420,8 +420,8 @@ void
ISpellChecker::extraletter (ichar_t *word)
{
ichar_t newword[INPUTWORDLEN + MAXAFFIXLEN];
- register ichar_t * p;
- register ichar_t * r;
+ ichar_t * p;
+ ichar_t * r;
if (icharlen (word) < 2)
return;
@@ -445,9 +445,9 @@ void
ISpellChecker::missingletter (ichar_t *word)
{
ichar_t newword[INPUTWORDLEN + MAXAFFIXLEN + 1];
- register ichar_t * p;
- register ichar_t * r;
- register int i;
+ ichar_t * p;
+ ichar_t * r;
+ int i;
icharcpy (newword + 1, word);
for (p = word, r = newword; *p != 0; )
@@ -489,7 +489,7 @@ void ISpellChecker::missingspace (ichar_t *word)
ichar_t newword[INPUTWORDLEN + MAXAFFIXLEN + 1];
int nfirsthalf; /* No. words saved in 1st half */
int nsecondhalf; /* No. words saved in 2nd half */
- register ichar_t * p;
+ ichar_t * p;
ichar_t secondhalf[MAX_CAPS][INPUTWORDLEN + MAXAFFIXLEN];
int secondno; /* Index into second */
@@ -547,8 +547,8 @@ int
ISpellChecker::compoundgood (ichar_t *word, int pfxopts)
{
ichar_t newword[INPUTWORDLEN + MAXAFFIXLEN];
- register ichar_t * p;
- register ichar_t savech;
+ ichar_t * p;
+ ichar_t savech;
long secondcap; /* Capitalization of 2nd half */
/*
@@ -606,8 +606,8 @@ void
ISpellChecker::transposedletter (ichar_t *word)
{
ichar_t newword[INPUTWORDLEN + MAXAFFIXLEN];
- register ichar_t * p;
- register ichar_t temp;
+ ichar_t * p;
+ ichar_t temp;
icharcpy (newword, word);
for (p = newword; p[1] != 0; p++)
@@ -752,12 +752,12 @@ ISpellChecker::save_root_cap (ichar_t *word, ichar_t *pattern,
int * nsaved)
{
#ifndef NO_CAPITALIZATION_SUPPORT
- register struct dent * dent;
+ struct dent * dent;
#endif /* NO_CAPITALIZATION_SUPPORT */
int firstisupper;
ichar_t newword[INPUTWORDLEN + 4 * MAXAFFIXLEN + 4];
#ifndef NO_CAPITALIZATION_SUPPORT
- register ichar_t * p;
+ ichar_t * p;
int len;
int i;
int limit;
diff --git a/tdespell2/plugins/ispell/good.cpp b/tdespell2/plugins/ispell/good.cpp
index 351106d99..42ba79515 100644
--- a/tdespell2/plugins/ispell/good.cpp
+++ b/tdespell2/plugins/ispell/good.cpp
@@ -247,9 +247,9 @@ static int entryhasaffixes (struct dent *dent, struct success *hit)
*/
int ISpellChecker::cap_ok (ichar_t *word, struct success *hit, int len)
{
- register ichar_t * dword;
- register ichar_t * w;
- register struct dent * dent;
+ ichar_t * dword;
+ ichar_t * w;
+ struct dent * dent;
ichar_t dentword[INPUTWORDLEN + MAXAFFIXLEN];
int preadd;
int prestrip;
@@ -388,10 +388,10 @@ int ISpellChecker::good (ichar_t *w, int ignoreflagbits, int dummy, int pfxopts,
#endif
{
ichar_t nword[INPUTWORDLEN + MAXAFFIXLEN];
- register ichar_t * p;
- register ichar_t * q;
- register int n;
- register struct dent * dp;
+ ichar_t * p;
+ ichar_t * q;
+ int n;
+ struct dent * dp;
/*
** Make an uppercase copy of the word we are checking.
diff --git a/tdespell2/plugins/ispell/hash.cpp b/tdespell2/plugins/ispell/hash.cpp
index 03bd880bb..07693c14f 100644
--- a/tdespell2/plugins/ispell/hash.cpp
+++ b/tdespell2/plugins/ispell/hash.cpp
@@ -180,8 +180,8 @@
*/
int ISpellChecker::hash (ichar_t *s, int hashtblsize)
{
- register long h = 0;
- register int i;
+ long h = 0;
+ int i;
#ifdef ICHAR_IS_CHAR
for (i = 4; i-- && *s != 0; )
diff --git a/tdespell2/plugins/ispell/lookup.cpp b/tdespell2/plugins/ispell/lookup.cpp
index b815ebd98..773cd88cb 100644
--- a/tdespell2/plugins/ispell/lookup.cpp
+++ b/tdespell2/plugins/ispell/lookup.cpp
@@ -266,13 +266,13 @@ int ISpellChecker::linit (char *hashname)
{
FILE* fpHash;
- register int i;
- register struct dent * dp;
+ int i;
+ struct dent * dp;
struct flagent * entry;
struct flagptr * ind;
int nextchar, x;
int viazero;
- register ichar_t * cp;
+ ichar_t * cp;
if ((fpHash = fopen (hashname, "rb")) == NULL)
{
@@ -571,7 +571,7 @@ int ISpellChecker::linit (char *hashname)
*/
void ISpellChecker::initckch (char *wchars)
{
- register ichar_t c;
+ ichar_t c;
char num[4];
for (c = 0; c < static_cast<ichar_t>(SET_SIZE+ m_hashheader.nstrchars); ++c)
@@ -656,7 +656,7 @@ void ISpellChecker::initckch (char *wchars)
*/
void ISpellChecker::clearindex (struct flagptr *indexp)
{
- register int i;
+ int i;
for (i = 0; i < SET_SIZE + m_hashheader.nstrchars; i++, indexp++)
{
if (indexp->numents == 0 && indexp->pu.fp != NULL)
@@ -669,10 +669,10 @@ void ISpellChecker::clearindex (struct flagptr *indexp)
#ifdef INDEXDUMP
static void dumpindex (indexp, depth)
- register struct flagptr * indexp;
- register int depth;
+ struct flagptr * indexp;
+ int depth;
{
- register int i;
+ int i;
int j;
int k;
char stripbuf[INPUTWORDLEN + 4 * MAXAFFIXLEN + 4];
@@ -733,8 +733,8 @@ static void dumpindex (indexp, depth)
*/
struct dent * ISpellChecker::ispell_lookup (ichar_t *s, int dotree)
{
- register struct dent * dp;
- register char * s1;
+ struct dent * dp;
+ char * s1;
char schar[INPUTWORDLEN + MAXAFFIXLEN];
dp = &m_hashtbl[hash (s, m_hashsize)];
diff --git a/tdespell2/plugins/ispell/makedent.cpp b/tdespell2/plugins/ispell/makedent.cpp
index 9c168dc17..ebe128dd3 100644
--- a/tdespell2/plugins/ispell/makedent.cpp
+++ b/tdespell2/plugins/ispell/makedent.cpp
@@ -259,7 +259,7 @@ other abi documents
long
ISpellChecker::whatcap (ichar_t *word)
{
- register ichar_t * p;
+ ichar_t * p;
for (p = word; *p; p++)
{
@@ -311,7 +311,7 @@ ISpellChecker::whatcap (ichar_t *word)
*/
int ISpellChecker::addvheader ( struct dent *dp)
{
- register struct dent * tdent; /* Copy of entry */
+ struct dent * tdent; /* Copy of entry */
/*
** Add a second entry with the correct capitalization, and then make
@@ -502,11 +502,11 @@ ISpellChecker::stringcharlen (char *bufp, int canonical)
static char * sp[MAXSTRINGCHARS];
static int inited = 0;
#endif /* SLOWMULTIPLY */
- register char * bufcur;
- register char * stringcur;
- register int stringno;
- register int lowstringno;
- register int highstringno;
+ char * bufcur;
+ char * stringcur;
+ int stringno;
+ int lowstringno;
+ int highstringno;
int dupwanted;
#ifdef SLOWMULTIPLY
@@ -641,7 +641,7 @@ int l1_isstringch(char *ptr, int len, int canon) {
int
ISpellChecker::strtoichar (ichar_t *out, char *in, int outlen, int canonical)
{
- register int len = 1; /* Length of next character */
+ int len = 1; /* Length of next character */
outlen /= sizeof (ichar_t); /* Convert to an ichar_t count */
for ( ; --outlen > 0 && *in != '\0'; in += len)
@@ -674,9 +674,9 @@ ISpellChecker::strtoichar (ichar_t *out, char *in, int outlen, int canonical)
int
ISpellChecker::ichartostr ( char *out, ichar_t *in, int outlen, int canonical)
{
- register int ch; /* Next character to store */
- register int i; /* Index into duplicates list */
- register char * scharp; /* Pointer into a string char */
+ int ch; /* Next character to store */
+ int i; /* Index into duplicates list */
+ char * scharp; /* Pointer into a string char */
while (--outlen > 0 && (ch = *in++) != 0)
{
@@ -796,7 +796,7 @@ icharcpy (ichar_t *out, ichar_t *in)
int
icharlen (ichar_t * in)
{
- register int len; /* Length so far */
+ int len; /* Length so far */
for (len = 0; *in++ != 0; len++)
;
@@ -862,7 +862,7 @@ ISpellChecker::findfiletype (const char *name, int searchnames, int *deformatter
{
char * cp; /* Pointer into suffix list */
int cplen; /* Length of current suffix */
- register int i; /* Index into type table */
+ int i; /* Index into type table */
int len; /* Length of the name */
/*
diff --git a/tdespell2/plugins/ispell/tgood.cpp b/tdespell2/plugins/ispell/tgood.cpp
index 06fbc99ef..859eee62f 100644
--- a/tdespell2/plugins/ispell/tgood.cpp
+++ b/tdespell2/plugins/ispell/tgood.cpp
@@ -243,7 +243,7 @@
void ISpellChecker::chk_aff (ichar_t *word, ichar_t *ucword,
int len, int ignoreflagbits, int allhits, int pfxopts, int sfxopts)
{
- register ichar_t * cp; /* Pointer to char to index on */
+ ichar_t * cp; /* Pointer to char to index on */
struct flagptr * ind; /* Flag index table to test */
pfx_list_chk (word, ucword, len, pfxopts, sfxopts, &m_pflagindex[0],
@@ -293,13 +293,13 @@ void ISpellChecker::pfx_list_chk (ichar_t *word, ichar_t *ucword, int len, int o
int sfxopts, struct flagptr * ind, int ignoreflagbits, int allhits)
{
int cond; /* Condition number */
- register ichar_t * cp; /* Pointer into end of ucword */
+ ichar_t * cp; /* Pointer into end of ucword */
struct dent * dent; /* Dictionary entry we found */
int entcount; /* Number of entries to process */
- register struct flagent *
+ struct flagent *
flent; /* Current table entry */
int preadd; /* Length added to tword2 as prefix */
- register int tlen; /* Length of tword */
+ int tlen; /* Length of tword */
ichar_t tword[INPUTWORDLEN + 4 * MAXAFFIXLEN + 4]; /* Tmp cpy */
ichar_t tword2[sizeof tword]; /* 2nd copy for ins_root_cap */
@@ -414,7 +414,7 @@ ISpellChecker::chk_suf (ichar_t *word, ichar_t *ucword,
int len, int optflags, struct flagent *pfxent,
int ignoreflagbits, int allhits)
{
- register ichar_t * cp; /* Pointer to char to index on */
+ ichar_t * cp; /* Pointer to char to index on */
struct flagptr * ind; /* Flag index table to test */
suf_list_chk (word, ucword, len, &m_sflagindex[0], optflags, pfxent,
@@ -458,14 +458,14 @@ void ISpellChecker::suf_list_chk (ichar_t *word, ichar_t *ucword,
int len, struct flagptr *ind, int optflags,
struct flagent *pfxent, int ignoreflagbits, int allhits)
{
- register ichar_t * cp; /* Pointer into end of ucword */
+ ichar_t * cp; /* Pointer into end of ucword */
int cond; /* Condition number */
struct dent * dent; /* Dictionary entry we found */
int entcount; /* Number of entries to process */
- register struct flagent *
+ struct flagent *
flent; /* Current table entry */
int preadd; /* Length added to tword2 as prefix */
- register int tlen; /* Length of tword */
+ int tlen; /* Length of tword */
ichar_t tword[INPUTWORDLEN + 4 * MAXAFFIXLEN + 4]; /* Tmp cpy */
ichar_t tword2[sizeof tword]; /* 2nd copy for ins_root_cap */
@@ -599,7 +599,7 @@ int ISpellChecker::expand_pre (char *croot, ichar_t *rootword, MASKTYPE mask[],
{
int entcount; /* No. of entries to process */
int explength; /* Length of expansions */
- register struct flagent *
+ struct flagent *
flent; /* Current table entry */
for (flent = m_pflaglist, entcount = m_numpflags, explength = 0;
@@ -630,7 +630,7 @@ int ISpellChecker::pr_pre_expansion ( char *croot, ichar_t *rootword,
char *extra)
{
int cond; /* Current condition number */
- register ichar_t * nextc; /* Next case choice */
+ ichar_t * nextc; /* Next case choice */
int tlen; /* Length of tword */
ichar_t tword[INPUTWORDLEN + MAXAFFIXLEN]; /* Temp */
@@ -728,7 +728,7 @@ int ISpellChecker::expand_suf (char *croot, ichar_t *rootword, MASKTYPE mask[],
{
int entcount; /* No. of entries to process */
int explength; /* Length of expansions */
- register struct flagent *
+ struct flagent *
flent; /* Current table entry */
for (flent = m_sflaglist, entcount = m_numsflags, explength = 0;
@@ -761,7 +761,7 @@ int ISpellChecker::pr_suf_expansion (char *croot, ichar_t *rootword,
struct flagent *flent, int option, char *extra)
{
int cond; /* Current condition number */
- register ichar_t * nextc; /* Next case choice */
+ ichar_t * nextc; /* Next case choice */
int tlen; /* Length of tword */
ichar_t tword[INPUTWORDLEN + MAXAFFIXLEN]; /* Temp */