summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2020-01-30 20:17:54 +0900
committerMichele Calgaro <[email protected]>2020-01-30 23:52:58 +0900
commitc37a71d4eaf3f87c9f0756e07ba50e793a7788cb (patch)
tree5e2afa4f21d61ee572c2e4952d5757ed9a8dc38b
parent9cf581443e326038a0556b89bda656bf1c8dcce9 (diff)
downloadkvirc-c37a71d4eaf3f87c9f0756e07ba50e793a7788cb.tar.gz
kvirc-c37a71d4eaf3f87c9f0756e07ba50e793a7788cb.zip
Removed explicit usage of the 'register' keyword.
Signed-off-by: Michele Calgaro <[email protected]> (cherry picked from commit a3a62f5b63dd4d8a1f06ede0daeac790ad475b2b)
-rw-r--r--src/kvilib/core/kvi_memmove.cpp18
-rw-r--r--src/kvilib/core/kvi_strasm.h14
-rw-r--r--src/kvilib/core/kvi_string.cpp126
-rw-r--r--src/kvilib/ext/kvi_md5.cpp2
-rw-r--r--src/kvilib/irc/kvi_ircmask.cpp4
-rw-r--r--src/kvilib/net/kvi_netutils.cpp12
-rw-r--r--src/kvirc/kernel/kvi_irclink.cpp2
-rw-r--r--src/kvirc/kernel/kvi_ircsocket.cpp2
-rw-r--r--src/kvirc/sparser/kvi_sp_ctcp.cpp4
-rw-r--r--src/kvirc/ui/kvi_input.cpp2
-rw-r--r--src/kvirc/ui/kvi_ircview.cpp12
-rw-r--r--src/kvirc/ui/kvi_selectors.cpp2
-rw-r--r--src/modules/perlcore/ppport.h2
13 files changed, 101 insertions, 101 deletions
diff --git a/src/kvilib/core/kvi_memmove.cpp b/src/kvilib/core/kvi_memmove.cpp
index 1beb920a..504cf6c8 100644
--- a/src/kvilib/core/kvi_memmove.cpp
+++ b/src/kvilib/core/kvi_memmove.cpp
@@ -174,8 +174,8 @@
__range_valid(dst_ptr);
__range_valid(src_ptr);
__range_valid(len >= 0);
- register char *dst;
- register const char *src;
+ char *dst;
+ const char *src;
if(dst_ptr > src_ptr){
dst = (char *)dst_ptr + len - 1;
src = (const char *)src_ptr + len - 1;
@@ -194,8 +194,8 @@
__range_valid(src_ptr);
__range_valid(len >= 0);
__range_valid((len & 1) == 0);
- register short *dst;
- register const short *src;
+ short *dst;
+ const short *src;
if(dst_ptr > src_ptr){
dst = (short *) (((char *)dst_ptr) + len - 2);
src = (const short *) (((const char *)src_ptr) + len - 2);
@@ -221,8 +221,8 @@
__range_valid(dst_ptr);
__range_valid(src_ptr);
__range_valid(len >= 0);
- register const char *src = (const char *)src_ptr;
- register char *dst = (char *)dst_ptr;
+ const char *src = (const char *)src_ptr;
+ char *dst = (char *)dst_ptr;
while(len--)*dst++ = *src++;
}
@@ -232,8 +232,8 @@
__range_valid(src_ptr);
__range_valid(len >= 0);
__range_valid((len & 1) == 0);
- register const short *src = (const short *)src_ptr;
- register short *dst = (short *)dst_ptr;
+ const short *src = (const short *)src_ptr;
+ short *dst = (short *)dst_ptr;
while(len > 0){
*dst++ = *src++;
len -= 2;
@@ -246,7 +246,7 @@
{
__range_valid(dst_ptr);
__range_valid(len >= 0);
- register char *dst = (char *)dst_ptr;
+ char *dst = (char *)dst_ptr;
while(len--)*dst++ = c;
}
diff --git a/src/kvilib/core/kvi_strasm.h b/src/kvilib/core/kvi_strasm.h
index 5d3b19ca..11e3b2df 100644
--- a/src/kvilib/core/kvi_strasm.h
+++ b/src/kvilib/core/kvi_strasm.h
@@ -39,7 +39,7 @@ extern inline bool kvi_strEqualCS(const char * str1,const char * str2)
// When inlining, GCC can optimize to load esi and edi
// directly with the strings , without pushing and getting it
// from the stack...
- register bool eax;
+ bool eax;
__asm__ __volatile__ (
" cld\n"
"1:\n"
@@ -61,7 +61,7 @@ extern inline bool kvi_strEqualCS(const char * str1,const char * str2)
extern inline bool kvi_strEqualCSN(const char * str1,const char * str2,int len)
{
- register bool eax;
+ bool eax;
__asm__ __volatile__ (
"1:\n"
" decl %3\n"
@@ -99,8 +99,8 @@ extern inline bool kvi_strEqualNoLocaleCI(const char *str1,const char *str2)
// Trivial implementation
// Ignores completely locales....only A-Z chars are transformed to a-z
// Anyway...it will work for IRC :)
- register int reg;
- register bool eax;
+ int reg;
+ bool eax;
__asm__ __volatile__ (
"1:\n"
" movb (%2),%%al\n"
@@ -137,8 +137,8 @@ extern inline bool kvi_strEqualNoLocaleCI(const char *str1,const char *str2)
extern inline bool kvi_strEqualNoLocaleCIN(const char *str1,const char *str2,int len)
{
- register int reg;
- register bool eax;
+ int reg;
+ bool eax;
__asm__ __volatile__ (
"1:\n"
" decl %4\n"
@@ -178,7 +178,7 @@ extern inline bool kvi_strEqualNoLocaleCIN(const char *str1,const char *str2,int
extern inline int kvi_strLen(const char * str)
{
- register int ecx;
+ int ecx;
__asm__ __volatile__(
" cld\n"
" repne\n"
diff --git a/src/kvilib/core/kvi_string.cpp b/src/kvilib/core/kvi_string.cpp
index a02d6c72..c133f20f 100644
--- a/src/kvilib/core/kvi_string.cpp
+++ b/src/kvilib/core/kvi_string.cpp
@@ -62,7 +62,7 @@ kvi_wslen_t kvi_wstrlen(const kvi_wchar_t * str)
#define WVSNPRINTF_BODY \
\
- register kvi_wchar_t *p; \
+ kvi_wchar_t *p; \
long int argValue; \
unsigned long argUValue; \
\
@@ -204,7 +204,7 @@ bool kvi_qstringEqualCI(const TQString &s1,const TQString &s2)
return false;
}
-bool kvi_matchStringCI(register const char * exp,register const char * str)
+bool kvi_matchStringCI(const char * exp,const char * str)
{
// a
// .
@@ -264,7 +264,7 @@ check_recovery:
}
-bool kvi_matchStringCS(register const char * exp,register const char * str)
+bool kvi_matchStringCS(const char * exp,const char * str)
{
// a
// .
@@ -325,7 +325,7 @@ check_recovery:
-bool kvi_matchStringWithTerminator(register const char * exp,register const char * str,char terminator,const char ** r1,const char ** r2)
+bool kvi_matchStringWithTerminator(const char * exp,const char * str,char terminator,const char ** r1,const char ** r2)
{
#define NOT_AT_END(__str) (*__str && (*__str != terminator))
@@ -396,7 +396,7 @@ check_recovery:
#undef NOT_AT_END
}
-bool kvi_matchWildExpr(register const char *m1,register const char *m2)
+bool kvi_matchWildExpr(const char *m1,const char *m2)
{
//Matches two regular expressions containging wildcards (* and ?)
@@ -492,7 +492,7 @@ bool kvi_matchWildExpr(register const char *m1,register const char *m2)
WARNING: Don't remove: working code but actually unused in KVIrc
Later it might become useful
-bool kvi_matchWildExprCS(register const char *m1,register const char *m2)
+bool kvi_matchWildExprCS(const char *m1,const char *m2)
{
if(!(m1 && m2 && (*m1)))return false;
const char * savePos1 = 0;
@@ -541,7 +541,7 @@ bool kvi_matchWildExprCS(register const char *m1,register const char *m2)
}
*/
-bool kvi_matchWildExprWithTerminator(register const char *m1,register const char *m2,char terminator,
+bool kvi_matchWildExprWithTerminator(const char *m1,const char *m2,char terminator,
const char ** r1,const char ** r2)
{
//Matches two regular expressions containging wildcards
@@ -664,7 +664,7 @@ int kvi_vsnprintf(char *buffer,int len,const char *fmt,kvi_va_list list)
__range_valid(buffer);
__range_valid(len > 0); //printing 0 characters is senseless
- register char *p;
+ char *p;
char *argString;
long argValue;
unsigned long argUValue;
@@ -781,7 +781,7 @@ int kvi_irc_vsnprintf(char *buffer,const char *fmt,kvi_va_list list,bool *bTrunc
__range_valid(fmt);
__range_valid(buffer);
if( !( buffer && fmt) ) return false;
- register char *p;
+ char *p;
char *argString;
long argValue;
unsigned long argUValue;
@@ -892,8 +892,8 @@ bool kvi_strEqualCS(const char *str1,const char *str2)
__range_valid(str1);
__range_valid(str2);
if( !( str1 && str2 ) ) return false;
- register unsigned char *s1 = (unsigned char *)str1;
- register unsigned char *s2 = (unsigned char *)str2;
+ unsigned char *s1 = (unsigned char *)str1;
+ unsigned char *s2 = (unsigned char *)str2;
while(*s1)if(*s1++ != *s2++)return false;
return (*s1 == *s2);
}
@@ -904,8 +904,8 @@ bool kvi_strEqualCSN(const char *str1,const char *str2,int len)
__range_valid(str2);
__range_valid(len >= 0);
if( !( str1 && str2 && (len >= 0) ) ) return false;
- register unsigned char *s1 = (unsigned char *)str1;
- register unsigned char *s2 = (unsigned char *)str2;
+ unsigned char *s1 = (unsigned char *)str1;
+ unsigned char *s2 = (unsigned char *)str2;
while(len-- && *s1)if(*s1++ != *s2++)return false;
return (len < 0);
}
@@ -918,8 +918,8 @@ bool kvi_strEqualCIN(const char *str1,const char *str2,int len)
__range_valid(str2);
__range_valid(len >= 0);
if( !( str1 && str2 && (len >= 0) ) ) return false;
- register unsigned char *s1 = (unsigned char *)str1;
- register unsigned char *s2 = (unsigned char *)str2;
+ unsigned char *s1 = (unsigned char *)str1;
+ unsigned char *s2 = (unsigned char *)str2;
while(len-- && *s1)if(tolower(*s1++) != tolower(*s2++))return false;
return (len < 0);
}
@@ -929,8 +929,8 @@ bool kvi_strEqualCI(const char *str1,const char *str2)
__range_valid(str1);
__range_valid(str2);
if( !( str1 && str2) ) return false;
- register unsigned char *s1 = (unsigned char *)str1;
- register unsigned char *s2 = (unsigned char *)str2;
+ unsigned char *s1 = (unsigned char *)str1;
+ unsigned char *s2 = (unsigned char *)str2;
while(*s1)if(tolower(*s1++) != tolower(*s2++))return false;
return (*s1 == *s2);
}
@@ -945,8 +945,8 @@ int kvi_strcmpCI(const char *str1,const char *str2)
__range_valid(str1);
__range_valid(str2);
if( !( str1 && str2) ) return false;
- register unsigned char *s1 = (unsigned char *)str1;
- register unsigned char *s2 = (unsigned char *)str2;
+ unsigned char *s1 = (unsigned char *)str1;
+ unsigned char *s2 = (unsigned char *)str2;
int diff;
unsigned char rightchar;
while(!(diff=(rightchar=tolower(*s1++)) - tolower(*s2++)))if(!rightchar)break;
@@ -963,8 +963,8 @@ int kvi_strcmpCI(const char *str1,const char *str2)
// //abcd abce
// __range_valid(str1);
// __range_valid(str2);
-// register unsigned char *s1 = (unsigned char *)str1;
-// register unsigned char *s2 = (unsigned char *)str2;
+// unsigned char *s1 = (unsigned char *)str1;
+// unsigned char *s2 = (unsigned char *)str2;
// int diff;
// unsigned char rightchar;
// while(len--)
@@ -981,8 +981,8 @@ int kvi_strcmpCS(const char *str1,const char *str2)
__range_valid(str1);
__range_valid(str2);
if( !( str1 && str2) ) return false;
- register unsigned char *s1 = (unsigned char *)str1;
- register unsigned char *s2 = (unsigned char *)str2;
+ unsigned char *s1 = (unsigned char *)str1;
+ unsigned char *s2 = (unsigned char *)str2;
int diff;
while(!(diff=(*s1)-(*s2++)))if(!*s1++)break;
return diff; //diff is nonzero or end of both was reached (it is positive if *s2 > *s1
@@ -993,8 +993,8 @@ int kvi_strMatchRevCS(const char *str1, const char *str2, int index)
__range_valid(str1);
__range_valid(str2);
if( !( str1 && str2) ) return false;
- register char *s1=(char *)str1;
- register char *s2=(char *)str2;
+ char *s1=(char *)str1;
+ char *s2=(char *)str2;
int curlen=(int)strlen(str1);
int diff;
@@ -1135,7 +1135,7 @@ KviStr::KviStr(char c,int fillLen)
__range_valid(fillLen >= 0);
m_len = fillLen;
m_ptr = (char *)kvi_malloc(m_len+1);
- register char *p=m_ptr;
+ char *p=m_ptr;
while(fillLen--)*p++=c;
*p='\0';
}
@@ -1151,7 +1151,7 @@ KviStr::KviStr(const kvi_wchar_t * unicode)
} else {
m_len = kvi_wstrlen(unicode);
m_ptr = (char *)kvi_malloc(m_len + 1);
- register char * p = m_ptr;
+ char * p = m_ptr;
while(*unicode)*p++ = *unicode++;
*p = 0;
}
@@ -1161,7 +1161,7 @@ KviStr::KviStr(const kvi_wchar_t * unicode,int len)
{
m_len = len;
m_ptr = (char *)kvi_malloc(m_len + 1);
- register char * p = m_ptr;
+ char * p = m_ptr;
char * end = p + len;
while(p != end)
{
@@ -1671,7 +1671,7 @@ unsigned char iso88591_toUpper_map[256]=
void KviStr::toUpperISO88591()
{
- register char *p=m_ptr;
+ char *p=m_ptr;
while(*p)
{
*p=(char)iso88591_toUpper_map[(unsigned char)*p];
@@ -1681,7 +1681,7 @@ void KviStr::toUpperISO88591()
void KviStr::toUpper()
{
- register char *p=m_ptr;
+ char *p=m_ptr;
while(*p)
{
*p=toupper(*p);
@@ -1727,7 +1727,7 @@ unsigned char iso88591_toLower_map[256]=
void KviStr::toLowerISO88591()
{
- register char *p=m_ptr;
+ char *p=m_ptr;
while(*p)
{
*p=(char)iso88591_toLower_map[(unsigned char)*p];
@@ -1738,7 +1738,7 @@ void KviStr::toLowerISO88591()
void KviStr::toLower()
{
- register char *p=m_ptr;
+ char *p=m_ptr;
while(*p)
{
*p=tolower(*p);
@@ -2161,7 +2161,7 @@ KviStr & KviStr::transliterate(const char * szToFind,const char * szReplacement)
int KviStr::occurences(char c,bool caseS) const
{
- register char *p = m_ptr;
+ char *p = m_ptr;
int cnt=0;
if(caseS){
while(*p){
@@ -2181,7 +2181,7 @@ int KviStr::occurences(char c,bool caseS) const
int KviStr::occurences(const char *str,bool caseS) const
{
__range_valid(str);
- register char *p = m_ptr;
+ char *p = m_ptr;
int cnt=0;
int len = (int)strlen(str);
if(caseS){
@@ -2205,7 +2205,7 @@ int KviStr::occurences(const char *str,bool caseS) const
bool KviStr::contains(char c,bool caseS) const
{
- register char *p = m_ptr;
+ char *p = m_ptr;
if(caseS)
{
while(*p)
@@ -2227,7 +2227,7 @@ bool KviStr::contains(char c,bool caseS) const
bool KviStr::contains(const char *str,bool caseS) const
{
__range_valid(str);
- register char *p = m_ptr;
+ char *p = m_ptr;
int len = (int)strlen(str);
if(caseS)
{
@@ -2259,8 +2259,8 @@ KviStr & KviStr::setNum(long num)
char numberBuffer[30];
bool bNegative = false;
long tmp;
- register char *p;
- register char *pNumBuf = numberBuffer;
+ char *p;
+ char *pNumBuf = numberBuffer;
// somebody can explain me why -(-2147483648) = -2147483648 ? (2^31)
// it is like signed char x = 128 ---> 10000000 that is signed -0 (!?)
@@ -2320,8 +2320,8 @@ KviStr & KviStr::setNum(unsigned long num)
{
char numberBuffer[30];
unsigned long tmp;
- register char *p;
- register char *pNumBuf = numberBuffer;
+ char *p;
+ char *pNumBuf = numberBuffer;
//write the number in a temporary buffer (at least '0')
do {
@@ -2342,7 +2342,7 @@ long KviStr::toLong(bool *bOk) const
{
long result = 0;
if(bOk)*bOk = false;
- register char *p=m_ptr;
+ char *p=m_ptr;
bool bNeg = false;
while(isspace(*p))p++; //skip spaces
if(*p == '-'){
@@ -2369,7 +2369,7 @@ unsigned long KviStr::toULong(bool *bOk) const
{
unsigned long result = 0;
if(bOk)*bOk = false;
- register char *p=m_ptr;
+ char *p=m_ptr;
while(isspace(*p))p++; //skip spaces
if(isdigit(*p)){ //point to something interesting ?
do{
@@ -2558,7 +2558,7 @@ KviStr & KviStr::setLen(int len)
KviStr & KviStr::stripLeftWhiteSpace()
{
- register char *p=m_ptr;
+ char *p=m_ptr;
while(isspace(*p))p++;
m_len -= (p-m_ptr);
kvi_memmove(m_ptr,p,m_len+1);
@@ -2569,7 +2569,7 @@ KviStr & KviStr::stripLeftWhiteSpace()
KviStr & KviStr::stripLeft(char c)
{
__range_valid(c != '\0');
- register char *p=m_ptr;
+ char *p=m_ptr;
while(*p == c)p++;
m_len -= (p-m_ptr);
kvi_memmove(m_ptr,p,m_len+1);
@@ -2581,7 +2581,7 @@ bool KviStr::getToken(KviStr & str,char sep)
{
__range_valid(str.m_ptr);
__range_valid(str.m_ptr != m_ptr);
- register char *p=m_ptr;
+ char *p=m_ptr;
//skip to the end
while(*p && (*p != sep))p++;
//0123456789
@@ -2601,7 +2601,7 @@ bool KviStr::getLine(KviStr &str)
__range_valid(str.m_ptr);
__range_valid(str.m_ptr != m_ptr);
if(m_len == 0)return false;
- register char *p=m_ptr;
+ char *p=m_ptr;
//skip to the end
while(*p && (*p != '\n'))p++;
//0123456789
@@ -2618,7 +2618,7 @@ bool KviStr::getLine(KviStr &str)
KviStr KviStr::getToken(char sep)
{
- register char *p=m_ptr;
+ char *p=m_ptr;
while(*p && (*p != sep))p++;
KviStr ret(m_ptr,p);
while(*p && (*p == sep))p++;
@@ -2660,7 +2660,7 @@ KviStr & KviStr::sprintf(const char *fmt,...)
int KviStr::find(const char *str,int idx,bool caseS) const
{
if(idx >= m_len)return -1;
- register char *p=m_ptr + idx;
+ char *p=m_ptr + idx;
int len = (int)strlen(str);
if(caseS){
for(;;){
@@ -2685,7 +2685,7 @@ int KviStr::find(const char *str,int idx,bool caseS) const
int KviStr::find(char c,int idx) const
{
if(idx >= m_len)return -1;
- register char *p=m_ptr + idx;
+ char *p=m_ptr + idx;
while(*p && (*p != c))p++;
return (*p ? p-m_ptr : -1);
}
@@ -2694,7 +2694,7 @@ int KviStr::find(char c,int idx) const
int KviStr::findRev(const char *str,int idx,bool caseS) const
{
if((m_len + idx) < 0)return -1;
- register char *p=m_ptr + m_len + idx;
+ char *p=m_ptr + m_len + idx;
int len = (int)strlen(str);
if(caseS)
{
@@ -2720,7 +2720,7 @@ int KviStr::findRev(const char *str,int idx,bool caseS) const
int KviStr::findFirstIdx(char c) const
{
- register char *p=m_ptr;
+ char *p=m_ptr;
while(*p && (*p != c))p++;
return (*p ? p-m_ptr : -1);
}
@@ -2743,7 +2743,7 @@ int KviStr::findFirstIdx(const char *str,bool caseS) const
// since a single UNICODE char may use one or more bytes...
__range_valid(str);
- register char *p=m_ptr;
+ char *p=m_ptr;
int len = (int)strlen(str);
if(caseS){
for(;;){
@@ -2771,7 +2771,7 @@ int KviStr::findLastIdx(char c) const
//Empty string ?
if(m_len < 1)return -1;
//p points to the last character in the string
- register char *p=((m_ptr+m_len)-1);
+ char *p=((m_ptr+m_len)-1);
//go back until we find a match or we run to the first char in the string.
while((*p != c) && (p > m_ptr))p--;
//if *p == c --> matched , else we are at the beginning of the string.
@@ -2793,7 +2793,7 @@ int KviStr::findLastIdx(const char *str,bool caseS) const
//Too long ?
if(m_len < len)return -1;
//p points to the last character in the string
- register char *p=((m_ptr+m_len)-1);
+ char *p=((m_ptr+m_len)-1);
if(caseS){
for(;;){
//go back until we find a character that mathes or we run to the first char.
@@ -2833,8 +2833,8 @@ KviStr & KviStr::stripWhiteSpace()
// abcd 0
// ^ ^
// left right
- register char *left=m_ptr;
- register char *right=m_ptr+m_len-1;
+ char *left=m_ptr;
+ char *right=m_ptr+m_len-1;
// skip initial spaces
while(isspace(*left))left++;
if(*left){
@@ -2860,7 +2860,7 @@ KviStr & KviStr::stripRightWhiteSpace()
{
if(*m_ptr)
{
- register char *right=m_ptr+m_len-1;
+ char *right=m_ptr+m_len-1;
const char *start=right;
while((right >= m_ptr) && isspace( *right ))right--;
if(right != start)
@@ -2877,7 +2877,7 @@ KviStr & KviStr::stripRight(char c)
{
if(*m_ptr)
{
- register char *right=m_ptr+m_len-1;
+ char *right=m_ptr+m_len-1;
const char *start=right;
while((right >= m_ptr) && (*right == c))right--;
if(right != start)
@@ -2896,8 +2896,8 @@ KviStr & KviStr::stripSpace()
// abcd 0
// ^ ^
// left right
- register char *left=m_ptr;
- register char *right=m_ptr+m_len-1;
+ char *left=m_ptr;
+ char *right=m_ptr+m_len-1;
// skip initial spaces
while((*left == ' ') || (*left == '\t'))left++;
if(*left){
@@ -2921,7 +2921,7 @@ KviStr & KviStr::stripSpace()
bool KviStr::isNum() const
{
- register char *p=m_ptr;
+ char *p=m_ptr;
while(isspace(*p))p++;
if(*p=='-')p++;
if(!isdigit(*p))return false;
@@ -2932,7 +2932,7 @@ bool KviStr::isNum() const
bool KviStr::isUnsignedNum() const
{
- register char *p=m_ptr;
+ char *p=m_ptr;
while(isspace(*p))p++;
if(!isdigit(*p))return false;
while(isdigit(*p))p++;
@@ -2948,7 +2948,7 @@ KviStr & KviStr::emptyString()
}
-bool KviStr::ext_contains(register const char * data,const char * item,bool caseS)
+bool KviStr::ext_contains(const char * data,const char * item,bool caseS)
{
if(item && data)
{
diff --git a/src/kvilib/ext/kvi_md5.cpp b/src/kvilib/ext/kvi_md5.cpp
index cbf01500..0477473f 100644
--- a/src/kvilib/ext/kvi_md5.cpp
+++ b/src/kvilib/ext/kvi_md5.cpp
@@ -100,7 +100,7 @@
static void MD5Transform(kvi_u32_t buf[4],const kvi_u32_t in[16])
{
- register kvi_u32_t a, b, c, d;
+ kvi_u32_t a, b, c, d;
a = buf[0];
b = buf[1];
diff --git a/src/kvilib/irc/kvi_ircmask.cpp b/src/kvilib/irc/kvi_ircmask.cpp
index acc2de83..9b0030ae 100644
--- a/src/kvilib/irc/kvi_ircmask.cpp
+++ b/src/kvilib/irc/kvi_ircmask.cpp
@@ -98,7 +98,7 @@ const char * KviIrcMask::setMask(const char *szMask,char c)
__range_valid(szMask);
//0123456789
- register const char *p=szMask;
+ const char *p=szMask;
//Run over nick....
while(*p && (*p != '!'))p++;
int len = p - szMask;
@@ -154,7 +154,7 @@ const char * KviIrcMask::setUserhostMask(const char *szMask)
__range_valid(szMask);
//nick[*]=<+!->[email protected]
//0123456789
- register const char *p=szMask;
+ const char *p=szMask;
// Run over nick....
while(*p && (*p != '*') && (*p != '=') && (!isspace(*p)))p++;
// extract it
diff --git a/src/kvilib/net/kvi_netutils.cpp b/src/kvilib/net/kvi_netutils.cpp
index 3ff5d9b0..b4bcd88d 100644
--- a/src/kvilib/net/kvi_netutils.cpp
+++ b/src/kvilib/net/kvi_netutils.cpp
@@ -150,15 +150,15 @@ bool kvi_stringIpToBinaryIp(const char *szIp,struct in_addr *address)
{
- register unsigned long val;
+ unsigned long val;
- register int base, n;
+ int base, n;
- register char c;
+ char c;
unsigned int parts[4];
- register unsigned int *pp = parts;
+ unsigned int *pp = parts;
if(!szIp)return false;
@@ -650,9 +650,9 @@ static unsigned int i2a(char* dest,unsigned int x)
{
- register unsigned int tmp=x;
+ unsigned int tmp=x;
- register unsigned int len=0;
+ unsigned int len=0;
if (x>=100) { *dest++=tmp/100+'0'; tmp=tmp%100; ++len; }
diff --git a/src/kvirc/kernel/kvi_irclink.cpp b/src/kvirc/kernel/kvi_irclink.cpp
index 132da95e..8759fbd1 100644
--- a/src/kvirc/kernel/kvi_irclink.cpp
+++ b/src/kvirc/kernel/kvi_irclink.cpp
@@ -222,7 +222,7 @@ void KviIrcLink::processData(char * buffer,int len)
return;
}
- register char *p=buffer;
+ char *p=buffer;
char *beginOfCurData = buffer;
int bufLen = 0;
char *messageBuffer = (char *)kvi_malloc(1);
diff --git a/src/kvirc/kernel/kvi_ircsocket.cpp b/src/kvirc/kernel/kvi_ircsocket.cpp
index cf312b2e..cfcc11de 100644
--- a/src/kvirc/kernel/kvi_ircsocket.cpp
+++ b/src/kvirc/kernel/kvi_ircsocket.cpp
@@ -1442,7 +1442,7 @@ void KviIrcSocket::readData(int)
/*
void KviIrcSocket::processData(char * buffer,int)
{
- register char *p=buffer;
+ char *p=buffer;
char *beginOfCurData = buffer;
int bufLen = 0;
char *messageBuffer = (char *)kvi_malloc(1);
diff --git a/src/kvirc/sparser/kvi_sp_ctcp.cpp b/src/kvirc/sparser/kvi_sp_ctcp.cpp
index 93b1b2ca..a965a97b 100644
--- a/src/kvirc/sparser/kvi_sp_ctcp.cpp
+++ b/src/kvirc/sparser/kvi_sp_ctcp.cpp
@@ -470,7 +470,7 @@ void KviServerParser::encodeCtcpParameter(const char * parametr,TQString &result
// subset of rules and places it in the supplied buffer
//
KviTQCString buffer;
- register const char* param=parametr;
+ const char* param=parametr;
if(!param)
{
if(bSpaceBreaks)
@@ -735,7 +735,7 @@ const char * KviServerParser::extractCtcpParameter(const char * p_msg_ptr,TQStri
//
KviTQCString buffer;
- register const char* msg_ptr=p_msg_ptr;
+ const char* msg_ptr=p_msg_ptr;
int bInString = 0;
if(!msg_ptr) return 0;
while(*msg_ptr == ' ')msg_ptr++; // skip leading spaces
diff --git a/src/kvirc/ui/kvi_input.cpp b/src/kvirc/ui/kvi_input.cpp
index 7658aafa..cc2dcae5 100644
--- a/src/kvirc/ui/kvi_input.cpp
+++ b/src/kvirc/ui/kvi_input.cpp
@@ -713,7 +713,7 @@ void KviInputEditor::extractNextBlock(int idx,TQFontMetrics & fm,int curXPos,int
void KviInputEditor::runUpToTheFirstVisibleChar()
{
- register int idx = 0;
+ int idx = 0;
while(idx < m_iFirstVisibleChar)
{
unsigned short c = m_szTextBuffer[idx].unicode();
diff --git a/src/kvirc/ui/kvi_ircview.cpp b/src/kvirc/ui/kvi_ircview.cpp
index ec65b9c3..d0bac367 100644
--- a/src/kvirc/ui/kvi_ircview.cpp
+++ b/src/kvirc/ui/kvi_ircview.cpp
@@ -1908,7 +1908,7 @@ const kvi_wchar_t * KviIrcView::getTextLine(int iMsgType,
int iCurChunk = 0;
int blockLen;
- register const kvi_wchar_t *p= data_ptr;
+ const kvi_wchar_t *p= data_ptr;
//Alloc the first attribute
line_ptr->uChunkCount = 1;
@@ -1964,8 +1964,8 @@ const kvi_wchar_t * KviIrcView::getTextLine(int iMsgType,
iTextIdx = iTimeStampLength; // the rest of the string will begin 11 chars later
// throw away const: we WANT to set the chars :D
- register TQChar * data_ptr_aux = (TQChar *)line_ptr->szText.unicode();
- register TQChar * stamp_ptr_aux = (TQChar *)szTimestamp.unicode();
+ TQChar * data_ptr_aux = (TQChar *)line_ptr->szText.unicode();
+ TQChar * stamp_ptr_aux = (TQChar *)szTimestamp.unicode();
for(int i=0;i<iTimeStampLength;i++)
*data_ptr_aux++ = *stamp_ptr_aux++;
@@ -2958,7 +2958,7 @@ void KviIrcView::paintEvent(TQPaintEvent *p)
for(int i=0;i < pCurTextLine->iBlockCount;i++)
{
- register KviIrcViewWrappedBlock * block = &(pCurTextLine->pBlocks[i]);
+ KviIrcViewWrappedBlock * block = &(pCurTextLine->pBlocks[i]);
// Play with the attributes
if(block->pChunk)
@@ -3481,7 +3481,7 @@ void KviIrcView::calculateLineWraps(KviIrcViewLine *ptr,int maxWidth)
for(;;)
{
//Calculate the block_width
- register const TQChar * p = unicode + ptr->pBlocks[ptr->iBlockCount].block_start;
+ const TQChar * p = unicode + ptr->pBlocks[ptr->iBlockCount].block_start;
int curBlockLen = 0;
int curBlockWidth = 0;
@@ -3633,7 +3633,7 @@ bool KviIrcView::checkSelectionBlock(KviIrcViewLine * line,int left,int bottom,i
// Yahoo!!!!
//
const TQChar * unicode = line->szText.unicode();
- register const TQChar * p = unicode + line->pBlocks[bufIndex].block_start;
+ const TQChar * p = unicode + line->pBlocks[bufIndex].block_start;
int top = bottom-m_iFontLineSpacing;
int right = ((line->pBlocks[bufIndex].block_width >= 0) ? \
diff --git a/src/kvirc/ui/kvi_selectors.cpp b/src/kvirc/ui/kvi_selectors.cpp
index f63392eb..22335ca2 100644
--- a/src/kvirc/ui/kvi_selectors.cpp
+++ b/src/kvirc/ui/kvi_selectors.cpp
@@ -786,7 +786,7 @@ KviCahnnelListSelector::~KviCahnnelListSelector()
void KviCahnnelListSelector::commit()
{
m_pOption->clear();
- register KviChanListViewItem* pItem;
+ KviChanListViewItem* pItem;
KviTalListViewItemIterator it( m_pListView);
while ( it.current() ) {
pItem = (KviChanListViewItem*)( it.current() );
diff --git a/src/modules/perlcore/ppport.h b/src/modules/perlcore/ppport.h
index 2a802132..611ecf12 100644
--- a/src/modules/perlcore/ppport.h
+++ b/src/modules/perlcore/ppport.h
@@ -525,7 +525,7 @@ SV *sv;
((SvFLAGS(sv) & (SVf_POK|SVf_UTF8)) == (SVf_POK) \
? ((lp = SvCUR(sv)), SvPVX(sv)) : my_sv_2pvbyte(aTHX_ sv, &lp))
static char *
- my_sv_2pvbyte(pTHX_ register SV *sv, STRLEN *lp)
+ my_sv_2pvbyte(pTHX_ SV *sv, STRLEN *lp)
{
sv_utf8_downgrade(sv,0);
return SvPV(sv,*lp);