mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
DtSvc/DtCodelibs: remove register keyword
This commit is contained in:
parent
57ce407976
commit
11ad65226d
9 changed files with 41 additions and 41 deletions
|
@ -279,8 +279,8 @@ _SHXbuf::filegen()
|
||||||
|
|
||||||
for (i = 1; i < vec.size(); i++)
|
for (i = 1; i < vec.size(); i++)
|
||||||
{
|
{
|
||||||
register char *ref = filebuf;
|
char *ref = filebuf;
|
||||||
register char *ptr = &bufptr[long(vec[i])];
|
char *ptr = &bufptr[long(vec[i])];
|
||||||
while (*ref == *ptr && *ref != '\0' && *ptr != '\0')
|
while (*ref == *ptr && *ref != '\0' && *ptr != '\0')
|
||||||
ref++, ptr++;
|
ref++, ptr++;
|
||||||
|
|
||||||
|
@ -292,7 +292,7 @@ _SHXbuf::filegen()
|
||||||
// make room.
|
// make room.
|
||||||
for (i = vec.size(); i > 0; --i)
|
for (i = vec.size(); i > 0; --i)
|
||||||
{
|
{
|
||||||
register char *val = vec[i - 1];
|
char *val = vec[i - 1];
|
||||||
vec[i] = val;
|
vec[i] = val;
|
||||||
}
|
}
|
||||||
vec[0] = (char *)buf.size();
|
vec[0] = (char *)buf.size();
|
||||||
|
|
|
@ -44,8 +44,8 @@ _mb_schr(const char *str, wchar_t ch)
|
||||||
#else
|
#else
|
||||||
char *
|
char *
|
||||||
_mb_schr(str, ch)
|
_mb_schr(str, ch)
|
||||||
register unsigned char *str;
|
unsigned char *str;
|
||||||
register wchar_t ch;
|
wchar_t ch;
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
wchar_t __nlh_char[1];
|
wchar_t __nlh_char[1];
|
||||||
|
|
|
@ -209,7 +209,7 @@ pushvar(_StringIO &in, char *buff)
|
||||||
static boolean
|
static boolean
|
||||||
pushenv(_StringIO &in, char const *name)
|
pushenv(_StringIO &in, char const *name)
|
||||||
{
|
{
|
||||||
register char *str = getenv(name);
|
char *str = getenv(name);
|
||||||
if (str == NULL || *str == '\0')
|
if (str == NULL || *str == '\0')
|
||||||
return FALSE;
|
return FALSE;
|
||||||
else
|
else
|
||||||
|
|
|
@ -41,7 +41,7 @@ char *strupper(char *str)
|
||||||
|
|
||||||
if (str != NULL)
|
if (str != NULL)
|
||||||
{
|
{
|
||||||
for (register char *s = str; *s != '\0'; s++)
|
for (char *s = str; *s != '\0'; s++)
|
||||||
if ((len = mblen(s, MB_CUR_MAX)) > 1)
|
if ((len = mblen(s, MB_CUR_MAX)) > 1)
|
||||||
s += len;
|
s += len;
|
||||||
else
|
else
|
||||||
|
@ -57,7 +57,7 @@ char *strlower(char *str)
|
||||||
|
|
||||||
if (str != NULL)
|
if (str != NULL)
|
||||||
{
|
{
|
||||||
for (register char *s = str; *s != '\0'; s++)
|
for (char *s = str; *s != '\0'; s++)
|
||||||
if ((len = mblen(s, MB_CUR_MAX)) > 1)
|
if ((len = mblen(s, MB_CUR_MAX)) > 1)
|
||||||
s += len;
|
s += len;
|
||||||
else
|
else
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
#include <codelibs/stringx.h>
|
#include <codelibs/stringx.h>
|
||||||
|
|
||||||
char *
|
char *
|
||||||
strend(register const char *str)
|
strend(const char *str)
|
||||||
{
|
{
|
||||||
if (str == NULL)
|
if (str == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -38,9 +38,9 @@
|
||||||
|
|
||||||
/**************************************************
|
/**************************************************
|
||||||
// This is quick but does a pretty crummy job
|
// This is quick but does a pretty crummy job
|
||||||
unsigned strhash(register const unsigned char *key)
|
unsigned strhash(const unsigned char *key)
|
||||||
{
|
{
|
||||||
register unsigned hash = 0;
|
unsigned hash = 0;
|
||||||
while (*key != '\0')
|
while (*key != '\0')
|
||||||
hash = (hash << 3) + *key++;
|
hash = (hash << 3) + *key++;
|
||||||
return hash;
|
return hash;
|
||||||
|
@ -55,10 +55,10 @@ unsigned strhash(register const unsigned char *key)
|
||||||
// This is from the "dragon" Compilers book.
|
// This is from the "dragon" Compilers book.
|
||||||
// It is much better than the above but somewhat slower.
|
// It is much better than the above but somewhat slower.
|
||||||
//
|
//
|
||||||
unsigned strhash(register const char *p)
|
unsigned strhash(const char *p)
|
||||||
{
|
{
|
||||||
register unsigned h = 0;
|
unsigned h = 0;
|
||||||
register unsigned g;
|
unsigned g;
|
||||||
wchar_t __nlh_char[1];
|
wchar_t __nlh_char[1];
|
||||||
|
|
||||||
if (p != NULL)
|
if (p != NULL)
|
||||||
|
@ -77,10 +77,10 @@ unsigned strhash(register const char *p)
|
||||||
// Same as above but case insensitive. Returns the same value as the
|
// Same as above but case insensitive. Returns the same value as the
|
||||||
// above function if there are no upper case letters in the string.
|
// above function if there are no upper case letters in the string.
|
||||||
//
|
//
|
||||||
unsigned strhashi(register const char *p)
|
unsigned strhashi(const char *p)
|
||||||
{
|
{
|
||||||
register unsigned h = 0;
|
unsigned h = 0;
|
||||||
register unsigned g;
|
unsigned g;
|
||||||
wchar_t __nlh_char[1];
|
wchar_t __nlh_char[1];
|
||||||
|
|
||||||
if (p != NULL)
|
if (p != NULL)
|
||||||
|
@ -110,12 +110,12 @@ unsigned strhashi(register const char *p)
|
||||||
|
|
||||||
unsigned int
|
unsigned int
|
||||||
hashfunc(buf, len)
|
hashfunc(buf, len)
|
||||||
register unsigned char *buf;
|
unsigned char *buf;
|
||||||
register int len;
|
int len;
|
||||||
{
|
{
|
||||||
register unsigned int in;
|
unsigned int in;
|
||||||
register unsigned int xor;
|
unsigned int xor;
|
||||||
register unsigned int t;
|
unsigned int t;
|
||||||
|
|
||||||
xor = len << 8;
|
xor = len << 8;
|
||||||
in = 0;
|
in = 0;
|
||||||
|
|
|
@ -32,11 +32,11 @@
|
||||||
#include "stringio.h"
|
#include "stringio.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
_StringIO::doit(register int commit)
|
_StringIO::doit(int commit)
|
||||||
{
|
{
|
||||||
register wchar_t ch;
|
wchar_t ch;
|
||||||
register int cu = curr;
|
int cu = curr;
|
||||||
register char *ccp;
|
char *ccp;
|
||||||
wchar_t __nlh_char[1];
|
wchar_t __nlh_char[1];
|
||||||
|
|
||||||
for (; cu >= 0; cu--)
|
for (; cu >= 0; cu--)
|
||||||
|
|
|
@ -36,18 +36,18 @@
|
||||||
#include <codelibs/stringx.h>
|
#include <codelibs/stringx.h>
|
||||||
|
|
||||||
char *
|
char *
|
||||||
strtokx(register char *&ptr, register const char *sep)
|
strtokx(char *&ptr, const char *sep)
|
||||||
{
|
{
|
||||||
if (ptr == NULL)
|
if (ptr == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
// find the beginning of the token
|
// find the beginning of the token
|
||||||
register char *ret = ptr;
|
char *ret = ptr;
|
||||||
while (*ret != '\0' && _mb_schr(sep, *ret) != NULL)
|
while (*ret != '\0' && _mb_schr(sep, *ret) != NULL)
|
||||||
ADVANCE(ret);
|
ADVANCE(ret);
|
||||||
|
|
||||||
// find the end of the token
|
// find the end of the token
|
||||||
register char *end = ret;
|
char *end = ret;
|
||||||
while (*end != '\0' && _mb_schr(sep, *end) == NULL)
|
while (*end != '\0' && _mb_schr(sep, *end) == NULL)
|
||||||
ADVANCE(end);
|
ADVANCE(end);
|
||||||
|
|
||||||
|
|
|
@ -63,9 +63,9 @@ static int match_class(const char *, char);
|
||||||
|
|
||||||
/* INLINE */
|
/* INLINE */
|
||||||
static int
|
static int
|
||||||
next_char(register const char *pattern, const char **cpp = NULL)
|
next_char(const char *pattern, const char **cpp = NULL)
|
||||||
{
|
{
|
||||||
register int ret;
|
int ret;
|
||||||
wchar_t __nlh_char[1];
|
wchar_t __nlh_char[1];
|
||||||
|
|
||||||
ret = pattern ? (int)CHARAT(pattern) : '\0';
|
ret = pattern ? (int)CHARAT(pattern) : '\0';
|
||||||
|
@ -98,10 +98,10 @@ strwcmp(const char *pattern, const char *string)
|
||||||
// stwpat returns a pointer to the first meta-character if the string
|
// stwpat returns a pointer to the first meta-character if the string
|
||||||
// is a pattern, else NULL
|
// is a pattern, else NULL
|
||||||
char *
|
char *
|
||||||
strwpat(register const char *pattern)
|
strwpat(const char *pattern)
|
||||||
{
|
{
|
||||||
register int ch;
|
int ch;
|
||||||
register char *prev_pattern = (char *)pattern;
|
char *prev_pattern = (char *)pattern;
|
||||||
wchar_t __nlh_char[1];
|
wchar_t __nlh_char[1];
|
||||||
|
|
||||||
while ((ch = next_char(pattern, &pattern)) != '\0')
|
while ((ch = next_char(pattern, &pattern)) != '\0')
|
||||||
|
@ -113,7 +113,7 @@ strwpat(register const char *pattern)
|
||||||
case '?':
|
case '?':
|
||||||
return prev_pattern;
|
return prev_pattern;
|
||||||
case '[': {
|
case '[': {
|
||||||
register const char *eop = next_patt(prev_pattern, 0);
|
const char *eop = next_patt(prev_pattern, 0);
|
||||||
if (CHARAT(eop) == ']')
|
if (CHARAT(eop) == ']')
|
||||||
return prev_pattern;
|
return prev_pattern;
|
||||||
break;
|
break;
|
||||||
|
@ -131,7 +131,7 @@ strwpat(register const char *pattern)
|
||||||
* the beginning of string.
|
* the beginning of string.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
match(register const char *pattern, register const char *string, int depth)
|
match(const char *pattern, const char *string, int depth)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("%smatch(\"%s\", \"%s\")\n", TABS, pattern, string);
|
printf("%smatch(\"%s\", \"%s\")\n", TABS, pattern, string);
|
||||||
|
@ -143,7 +143,7 @@ match(register const char *pattern, register const char *string, int depth)
|
||||||
while ((ch = next_char(pattern, &cp)) != '\0')
|
while ((ch = next_char(pattern, &cp)) != '\0')
|
||||||
{
|
{
|
||||||
const char *laststr = string;
|
const char *laststr = string;
|
||||||
register int testchar = (int)CHARADV(string);
|
int testchar = (int)CHARADV(string);
|
||||||
|
|
||||||
switch (ch)
|
switch (ch)
|
||||||
{
|
{
|
||||||
|
@ -184,7 +184,7 @@ match(register const char *pattern, register const char *string, int depth)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
match_class(register const char *clss, register char testchar)
|
match_class(const char *clss, char testchar)
|
||||||
/*
|
/*
|
||||||
* pattern is a pointer to the leading [ of
|
* pattern is a pointer to the leading [ of
|
||||||
* a shell-type class. testchar is the character to match against
|
* a shell-type class. testchar is the character to match against
|
||||||
|
@ -195,7 +195,7 @@ match_class(register const char *clss, register char testchar)
|
||||||
wchar_t __nlh_char[1];
|
wchar_t __nlh_char[1];
|
||||||
|
|
||||||
/* find end of class, ie an un-escaped ']' */
|
/* find end of class, ie an un-escaped ']' */
|
||||||
register const char *eop = next_patt(clss, 0);
|
const char *eop = next_patt(clss, 0);
|
||||||
ADVANCE(clss);
|
ADVANCE(clss);
|
||||||
|
|
||||||
if (CHARAT(eop) != ']')
|
if (CHARAT(eop) != ']')
|
||||||
|
@ -209,7 +209,7 @@ match_class(register const char *clss, register char testchar)
|
||||||
|
|
||||||
while (clss < eop)
|
while (clss < eop)
|
||||||
{
|
{
|
||||||
register int ch = next_char(clss, &clss);
|
int ch = next_char(clss, &clss);
|
||||||
char const *clss_end = clss;
|
char const *clss_end = clss;
|
||||||
int sep = next_char(clss_end, &clss_end);
|
int sep = next_char(clss_end, &clss_end);
|
||||||
int ch2 = next_char(clss_end, &clss_end);
|
int ch2 = next_char(clss_end, &clss_end);
|
||||||
|
@ -252,7 +252,7 @@ match_class(register const char *clss, register char testchar)
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
next_patt(register const char *pattern, int advance)
|
next_patt(const char *pattern, int advance)
|
||||||
{
|
{
|
||||||
wchar_t __nlh_char[1];
|
wchar_t __nlh_char[1];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue