for (i = 1; i < vec.size(); i++)
{
- register char *ref = filebuf;
- register char *ptr = &bufptr[long(vec[i])];
+ char *ref = filebuf;
+ char *ptr = &bufptr[long(vec[i])];
while (*ref == *ptr && *ref != '\0' && *ptr != '\0')
ref++, ptr++;
// make room.
for (i = vec.size(); i > 0; --i)
{
- register char *val = vec[i - 1];
+ char *val = vec[i - 1];
vec[i] = val;
}
vec[0] = (char *)buf.size();
#else
char *
_mb_schr(str, ch)
-register unsigned char *str;
-register wchar_t ch;
+unsigned char *str;
+wchar_t ch;
#endif
{
wchar_t __nlh_char[1];
static boolean
pushenv(_StringIO &in, char const *name)
{
- register char *str = getenv(name);
+ char *str = getenv(name);
if (str == NULL || *str == '\0')
return FALSE;
else
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)
s += len;
else
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)
s += len;
else
#include <codelibs/stringx.h>
char *
-strend(register const char *str)
+strend(const char *str)
{
if (str == NULL)
return NULL;
/**************************************************
// 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')
hash = (hash << 3) + *key++;
return hash;
// This is from the "dragon" Compilers book.
// 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;
- register unsigned g;
+ unsigned h = 0;
+ unsigned g;
wchar_t __nlh_char[1];
if (p != NULL)
// Same as above but case insensitive. Returns the same value as the
// 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;
- register unsigned g;
+ unsigned h = 0;
+ unsigned g;
wchar_t __nlh_char[1];
if (p != NULL)
unsigned int
hashfunc(buf, len)
-register unsigned char *buf;
-register int len;
+unsigned char *buf;
+int len;
{
- register unsigned int in;
- register unsigned int xor;
- register unsigned int t;
+ unsigned int in;
+ unsigned int xor;
+ unsigned int t;
xor = len << 8;
in = 0;
#include "stringio.h"
int
-_StringIO::doit(register int commit)
+_StringIO::doit(int commit)
{
- register wchar_t ch;
- register int cu = curr;
- register char *ccp;
+ wchar_t ch;
+ int cu = curr;
+ char *ccp;
wchar_t __nlh_char[1];
for (; cu >= 0; cu--)
#include <codelibs/stringx.h>
char *
-strtokx(register char *&ptr, register const char *sep)
+strtokx(char *&ptr, const char *sep)
{
if (ptr == NULL)
return NULL;
// find the beginning of the token
- register char *ret = ptr;
+ char *ret = ptr;
while (*ret != '\0' && _mb_schr(sep, *ret) != NULL)
ADVANCE(ret);
// find the end of the token
- register char *end = ret;
+ char *end = ret;
while (*end != '\0' && _mb_schr(sep, *end) == NULL)
ADVANCE(end);
/* INLINE */
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];
ret = pattern ? (int)CHARAT(pattern) : '\0';
// stwpat returns a pointer to the first meta-character if the string
// is a pattern, else NULL
char *
-strwpat(register const char *pattern)
+strwpat(const char *pattern)
{
- register int ch;
- register char *prev_pattern = (char *)pattern;
+ int ch;
+ char *prev_pattern = (char *)pattern;
wchar_t __nlh_char[1];
while ((ch = next_char(pattern, &pattern)) != '\0')
case '?':
return prev_pattern;
case '[': {
- register const char *eop = next_patt(prev_pattern, 0);
+ const char *eop = next_patt(prev_pattern, 0);
if (CHARAT(eop) == ']')
return prev_pattern;
break;
* the beginning of string.
*/
static int
-match(register const char *pattern, register const char *string, int depth)
+match(const char *pattern, const char *string, int depth)
{
#ifdef DEBUG
printf("%smatch(\"%s\", \"%s\")\n", TABS, pattern, string);
while ((ch = next_char(pattern, &cp)) != '\0')
{
const char *laststr = string;
- register int testchar = (int)CHARADV(string);
+ int testchar = (int)CHARADV(string);
switch (ch)
{
}
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
* a shell-type class. testchar is the character to match against
wchar_t __nlh_char[1];
/* 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);
if (CHARAT(eop) != ']')
while (clss < eop)
{
- register int ch = next_char(clss, &clss);
+ int ch = next_char(clss, &clss);
char const *clss_end = clss;
int sep = next_char(clss_end, &clss_end);
int ch2 = next_char(clss_end, &clss_end);
}
static const char *
-next_patt(register const char *pattern, int advance)
+next_patt(const char *pattern, int advance)
{
wchar_t __nlh_char[1];