regexp *
tpt_regcomp(char *exp)
{
- register regexp *r;
- register char *scan;
- register char *longest;
- register int len;
+ regexp *r;
+ char *scan;
+ char *longest;
+ int len;
int flags;
if (exp == NULL)
int *flagp
)
{
- register char *ret;
- register char *br;
- register char *ender;
- register int parno;
+ char *ret;
+ char *br;
+ char *ender;
+ int parno;
int flags;
*flagp = HASWIDTH; /* Tentatively. */
static char *
regbranch(int *flagp)
{
- register char *ret;
- register char *chain;
- register char *latest;
+ char *ret;
+ char *chain;
+ char *latest;
int flags;
*flagp = WORST; /* Tentatively. */
static char *
regpiece(int *flagp)
{
- register char *ret;
- register char op;
- register char *next;
+ char *ret;
+ char op;
+ char *next;
int flags;
ret = regatom(&flags);
static char *
regatom(int *flagp)
{
- register char *ret;
+ char *ret;
int flags;
*flagp = WORST; /* Tentatively. */
*flagp |= HASWIDTH|SIMPLE;
break;
case '[': {
- register int class;
- register int classend;
+ int class;
+ int classend;
if (*regparse == '^') { /* Complement of range. */
ret = regnode(ANYBUT);
*flagp |= HASWIDTH|SIMPLE;
break;
default: {
- register int len;
- register char ender;
+ int len;
+ char ender;
regparse--;
len = strcspn(regparse, META);
static char * /* Location. */
regnode(char op)
{
- register char *ret;
- register char *ptr;
+ char *ret;
+ char *ptr;
ret = regcode;
if (ret == ®dummy) {
static void
reginsert(char op, char *opnd)
{
- register char *src;
- register char *dst;
- register char *place;
+ char *src;
+ char *dst;
+ char *place;
if (regcode == ®dummy) {
regsize += 3;
static void
regtail(char *p, char *val)
{
- register char *scan;
- register char *temp;
- register int offset;
+ char *scan;
+ char *temp;
+ int offset;
if (p == ®dummy)
return;
- regexec - match a regexp against a string
*/
int
+<<<<<<< ca7d34b7ff5f017e3228714bb583266f7cdf946f
tpt_regexec(register regexp *prog, register char *string)
+=======
+tpt_regexec(prog, string)
+regexp *prog;
+char *string;
+>>>>>>> dtdocbook: remove register keyword
{
- register char *s;
+ char *s;
/* Be paranoid... */
if (prog == NULL || string == NULL) {
static int /* 0 failure, 1 success */
regtry(regexp *prog, char *string)
{
- register int i;
- register char **sp;
- register char **ep;
+ int i;
+ char **sp;
+ char **ep;
reginput = string;
regstartp = prog->startp;
static int /* 0 failure, 1 success */
regmatch(char *prog)
{
- register char *scan; /* Current node. */
+ char *scan; /* Current node. */
char *next; /* Next node. */
scan = prog;
reginput++;
break;
case EXACTLY: {
- register int len;
- register char *opnd;
+ int len;
+ char *opnd;
opnd = OPERAND(scan);
/* Inline the first character, for speed. */
case OPEN+7:
case OPEN+8:
case OPEN+9: {
- register int no;
- register char *save;
+ int no;
+ char *save;
no = OP(scan) - OPEN;
save = reginput;
case CLOSE+7:
case CLOSE+8:
case CLOSE+9: {
- register int no;
- register char *save;
+ int no;
+ char *save;
no = OP(scan) - CLOSE;
save = reginput;
}
break;
case BRANCH: {
- register char *save;
+ char *save;
if (OP(next) != BRANCH) /* No choice. */
next = OPERAND(scan); /* Avoid recursion. */
break;
case STAR:
case PLUS: {
- register char nextch;
- register int no;
- register char *save;
- register int min;
+ char nextch;
+ int no;
+ char *save;
+ int min;
/*
* Lookahead to avoid useless match attempts
static int
regrepeat(char *p)
{
- register int count = 0;
- register char *scan;
- register char *opnd;
+ int count = 0;
+ char *scan;
+ char *opnd;
scan = reginput;
opnd = OPERAND(p);
- regnext - dig the "next" pointer out of a node
*/
static char *
+<<<<<<< ca7d34b7ff5f017e3228714bb583266f7cdf946f
regnext(register char *p)
+=======
+regnext(p)
+char *p;
+>>>>>>> dtdocbook: remove register keyword
{
- register int offset;
+ int offset;
if (p == ®dummy)
return(NULL);
void
regdump(regexp *r)
{
- register char *s;
- register char op = EXACTLY; /* Arbitrary non-END op. */
- register char *next;
+ char *s;
+ char op = EXACTLY; /* Arbitrary non-END op. */
+ char *next;
s = r->program + 1;
static char *
regprop(char *op)
{
- register char *p;
+ char *p;
static char buf[50];
(void) strcpy(buf, ":");
static int
strcspn(char *s1, char *s2)
{
- register char *scan1;
- register char *scan2;
- register int count;
+ char *scan1;
+ char *scan2;
+ int count;
count = 0;
for (scan1 = s1; *scan1 != '\0'; scan1++) {
void
tpt_regsub(regexp *prog, char *source, char *dest)
{
- register char *src;
- register char *dst;
- register char c;
- register int no;
- register int len;
+ char *src;
+ char *dst;
+ char c;
+ int no;
+ int len;
extern char *strncpy();
if (prog == NULL || source == NULL || dest == NULL) {
multiple(ncomp, nexec, nsub)
int ncomp, nexec, nsub;
{
- register int i;
+ int i;
extern char *strchr();
errreport = 1;
{
regexp *r;
char dbuf[BUFSIZ];
- register int i;
+ int i;
errseen = NULL;
r = tpt_regcomp(fields.re);
static char switchar = '\0';
#endif
static int sp = 1;
- register int c;
- register char *cp;
+ int c;
+ char *cp;
char *message;
#ifdef SWITCHAR
if (switchar == '\0') {
*/
VOID destack()
{
- register int ecode = 0; /* Error code (0=o.k.). */
+ int ecode = 0; /* Error code (0=o.k.). */
UNCH *eparm2 = NULL; /* Second parameter of error message. */
- register int minmsgsw; /* 1=message if tag omitted; 0=no message. */
+ int minmsgsw; /* 1=message if tag omitted; 0=no message. */
/* If element has a content model (i.e., not a keyword) and there
are required tags left, and no CONREF attribute was specified,
regexp *
TclRegComp(char *exp)
{
- register regexp *r;
- register char *scan;
- register char *longest;
- register int len;
+ regexp *r;
+ char *scan;
+ char *longest;
+ int len;
int flags;
struct regcomp_state state;
struct regcomp_state *rcstate= &state;
static char *
reg(int paren /* Parenthesized? */, int *flagp, struct regcomp_state *rcstate)
{
- register char *ret;
- register char *br;
- register char *ender;
- register int parno = 0;
+ char *ret;
+ char *br;
+ char *ender;
+ int parno = 0;
int flags;
*flagp = HASWIDTH; /* Tentatively. */
static char *
regbranch(int *flagp, struct regcomp_state *rcstate)
{
- register char *ret;
- register char *chain;
- register char *latest;
+ char *ret;
+ char *chain;
+ char *latest;
int flags;
*flagp = WORST; /* Tentatively. */
static char *
regpiece(int *flagp, struct regcomp_state *rcstate)
{
- register char *ret;
- register char op;
- register char *next;
+ char *ret;
+ char op;
+ char *next;
int flags;
ret = regatom(&flags,rcstate);
static char *
regatom(int *flagp, struct regcomp_state *rcstate)
{
- register char *ret;
+ char *ret;
int flags;
*flagp = WORST; /* Tentatively. */
*flagp |= HASWIDTH|SIMPLE;
break;
case '[': {
- register int clss;
- register int classend;
+ int clss;
+ int classend;
if (*rcstate->regparse == '^') { /* Complement of range. */
ret = regnode(ANYBUT,rcstate);
*flagp |= HASWIDTH|SIMPLE;
break;
default: {
- register int len;
- register char ender;
+ int len;
+ char ender;
rcstate->regparse--;
len = strcspn(rcstate->regparse, META);
static char * /* Location. */
regnode(int op, struct regcomp_state *rcstate)
{
- register char *ret;
- register char *ptr;
+ char *ret;
+ char *ptr;
ret = rcstate->regcode;
if (ret == ®dummy) {
static void
reginsert(int op, char *opnd, struct regcomp_state *rcstate)
{
- register char *src;
- register char *dst;
- register char *place;
+ char *src;
+ char *dst;
+ char *place;
if (rcstate->regcode == ®dummy) {
rcstate->regsize += 3;
static void
regtail(char *p, char *val)
{
- register char *scan;
- register char *temp;
- register int offset;
+ char *scan;
+ char *temp;
+ int offset;
if (p == ®dummy)
return;
- TclRegExec - match a regexp against a string
*/
int
-TclRegExec(register regexp *prog, register char *string, char *start)
+TclRegExec(regexp *prog, char *string, char *start)
{
- register char *s;
+ char *s;
struct regexec_state state;
struct regexec_state *restate= &state;
static int /* 0 failure, 1 success */
regtry(regexp *prog, char *string, struct regexec_state *restate)
{
- register int i;
- register char **sp;
- register char **ep;
+ int i;
+ char **sp;
+ char **ep;
restate->reginput = string;
restate->regstartp = prog->startp;
static int /* 0 failure, 1 success */
regmatch(char *prog, struct regexec_state *restate)
{
- register char *scan; /* Current node. */
+ char *scan; /* Current node. */
char *next; /* Next node. */
scan = prog;
restate->reginput++;
break;
case EXACTLY: {
- register int len;
- register char *opnd;
+ int len;
+ char *opnd;
opnd = OPERAND(scan);
/* Inline the first character, for speed. */
case OPEN+7:
case OPEN+8:
case OPEN+9: {
- register int no;
- register char *save;
+ int no;
+ char *save;
doOpen:
no = OP(scan) - OPEN;
case CLOSE+7:
case CLOSE+8:
case CLOSE+9: {
- register int no;
- register char *save;
+ int no;
+ char *save;
doClose:
no = OP(scan) - CLOSE;
}
}
case BRANCH: {
- register char *save;
+ char *save;
if (OP(next) != BRANCH) { /* No choice. */
next = OPERAND(scan); /* Avoid recursion. */
}
case STAR:
case PLUS: {
- register char nextch;
- register int no;
- register char *save;
- register int min;
+ char nextch;
+ int no;
+ char *save;
+ int min;
/*
* Lookahead to avoid useless match attempts
static int
regrepeat(char *p, struct regexec_state *restate)
{
- register int count = 0;
- register char *scan;
- register char *opnd;
+ int count = 0;
+ char *scan;
+ char *opnd;
scan = restate->reginput;
opnd = OPERAND(p);
- regnext - dig the "next" pointer out of a node
*/
static char *
-regnext(register char *p)
+regnext(char *p)
{
- register int offset;
+ int offset;
if (p == ®dummy)
return(NULL);
void
regdump(regexp *r)
{
- register char *s;
- register char op = EXACTLY; /* Arbitrary non-END op. */
- register char *next;
+ char *s;
+ char op = EXACTLY; /* Arbitrary non-END op. */
+ char *next;
s = r->program + 1;
static char *
regprop(char *op)
{
- register char *p;
+ char *p;
static char buf[50];
(void) strcpy(buf, ":");
static int
strcspn(char *s1, char *s2)
{
- register char *scan1;
- register char *scan2;
- register int count;
+ char *scan1;
+ char *scan2;
+ int count;
count = 0;
for (scan1 = s1; *scan1 != '\0'; scan1++) {
Tcl_Interp *
Tcl_CreateInterp(void)
{
- register Interp *iPtr;
- register Command *cmdPtr;
- register CmdInfo *cmdInfoPtr;
+ Interp *iPtr;
+ Command *cmdPtr;
+ CmdInfo *cmdInfoPtr;
Tcl_Channel chan;
int i;
int argc;
int argSize = NUM_ARGS;
- register char *src; /* Points to current character
+ char *src; /* Points to current character
* in cmd. */
char termChar; /* Return when this character is found
* (either ']' or '\0'). Zero means
int flags; /* Interp->evalFlags value when the
* procedure was called. */
int result; /* Return value. */
- register Interp *iPtr = (Interp *) interp;
+ Interp *iPtr = (Interp *) interp;
Tcl_HashEntry *hPtr;
Command *cmdPtr;
char *termPtr; /* Contains character just after the
* all of offending command is included
* in errorInfo. "" means that the
* command is all there. */
- register Trace *tracePtr;
+ Trace *tracePtr;
int oldCount = iPtr->cmdCount; /* Used to tell whether any commands
* at all were executed. */
*/
while (1) {
- register char c = *src;
+ char c = *src;
if ((CHAR_TYPE(c) != TCL_SPACE) && (c != ';') && (c != '\n')) {
break;
if ((result == TCL_ERROR) && !(iPtr->flags & ERR_ALREADY_LOGGED)) {
int numChars;
- register char *p;
+ char *p;
/*
* Compute the line number where the error occurred.
ClientData clientData /* Arbitrary one-word value to pass to proc. */
)
{
- register Trace *tracePtr;
- register Interp *iPtr = (Interp *) interp;
+ Trace *tracePtr;
+ Interp *iPtr = (Interp *) interp;
tracePtr = (Trace *) ckalloc(sizeof(Trace));
tracePtr->level = level;
* Tcl_CreateTrace). */
)
{
- register Interp *iPtr = (Interp *) interp;
- register Trace *tracePtr = (Trace *) trace;
- register Trace *tracePtr2;
+ Interp *iPtr = (Interp *) interp;
+ Trace *tracePtr = (Trace *) trace;
+ Trace *tracePtr2;
if (iPtr->tracePtr == tracePtr) {
iPtr->tracePtr = tracePtr->nextPtr;
char *message /* Message to record. */
)
{
- register Interp *iPtr = (Interp *) interp;
+ Interp *iPtr = (Interp *) interp;
/*
* If an error is already being logged, then the new errorInfo
char *command /* Command to evaluate. */
)
{
- register Interp *iPtr = (Interp *) interp;
+ Interp *iPtr = (Interp *) interp;
int result;
CallFrame *savedVarFramePtr;
for (i = 0; i < caseArgc; i += 2) {
int patArgc, j;
char **patArgv;
- register char *p;
+ char *p;
if (i == (caseArgc-1)) {
interp->result = "extra case pattern with no body";
char **argv /* Argument strings. */
)
{
- register char *format; /* Used to read characters from the format
+ char *format; /* Used to read characters from the format
* string. */
char newFormat[40]; /* A new format specifier is generated here. */
int width; /* Field width from field specifier, or 0 if
}
argIndex = 2;
for (format = argv[1]; *format != 0; ) {
- register char *newPtr = newFormat;
+ char *newPtr = newFormat;
width = precision = noPercent = useShort = 0;
whichValue = PTR_VALUE;
*/
if (*format != '%') {
- register char *p;
+ char *p;
ptrValue = p = format;
while ((*format != '%') && (*format != 0)) {
char **argv /* Argument strings. */
)
{
- register Interp *iPtr = (Interp *) interp;
+ Interp *iPtr = (Interp *) interp;
size_t length;
int c;
Arg *argPtr;
*/
if (noCase) {
- register char *p;
+ char *p;
Tcl_DStringInit(&patternDString);
Tcl_DStringAppend(&patternDString, argPtr[0], -1);
char *string, *pattern, *p, *firstChar, *newValue, **argPtr;
int match, flags, code, numMatches;
char *start, *end, *subStart, *subEnd;
- register char *src, c;
+ char *src, c;
Tcl_DString stringDString, patternDString;
if (argc < 5) {
char **argv /* Argument strings. */
)
{
- register Command *cmdPtr;
+ Command *cmdPtr;
Interp *iPtr = (Interp *) interp;
Tcl_HashEntry *hPtr;
int new;
} Field;
Field fields[MAX_FIELDS]; /* Info about all the fields in the
* format string. */
- register Field *curField;
+ Field *curField;
int numFields = 0; /* Number of fields actually
* specified. */
int suppress; /* Current field is assignment-
* Malloced; NULL means not allocated
* yet. */
int numScanned; /* sscanf's result. */
- register char *fmt;
+ char *fmt;
int i, widthSpecified, length, code;
/*
# define STATIC_SIZE 5
char copyBuf[STATIC_SIZE], *fmtCopy;
- register char *dst;
+ char *dst;
if (argc < 3) {
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
)
{
char *splitChars;
- register char *p, *p2;
+ char *p, *p2;
char *elementStart;
if (argc == 2) {
)
{
size_t length;
- register char *p;
+ char *p;
int match, c, first;
int left = 0, right = 0;
return TCL_OK;
} else if ((c == 't') && (strncmp(argv[1], "tolower", length) == 0)
&& (length >= 3)) {
- register char *p;
+ char *p;
if (argc != 3) {
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
return TCL_OK;
} else if ((c == 't') && (strncmp(argv[1], "toupper", length) == 0)
&& (length >= 3)) {
- register char *p;
+ char *p;
if (argc != 3) {
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
} else if ((c == 't') && (strncmp(argv[1], "trim", length) == 0)
&& (length == 4)) {
char *trimChars;
- register char *p, *checkPtr;
+ char *p, *checkPtr;
left = right = 1;
static int
LookupWord(char *buff)
{
- register char *p;
- register char *q;
- register TABLE *tp;
+ char *p;
+ char *q;
+ TABLE *tp;
int i;
int abbrev;
static int
TclDatelex(void)
{
- register char c;
- register char *p;
+ char c;
+ char *p;
char buff[20];
int Count;
int sign;
int TclDateparse()
#endif
{
- register YYSTYPE *TclDatepvt; /* top of value stack for $vars */
+ YYSTYPE *TclDatepvt; /* top of value stack for $vars */
#if defined(__cplusplus) || defined(lint)
/*
#endif
{
- register YYSTYPE *TclDate_pv; /* top of value stack */
- register int *TclDate_ps; /* top of state stack */
- register int TclDate_state; /* current state */
- register int TclDate_n; /* internal state number info */
+ YYSTYPE *TclDate_pv; /* top of value stack */
+ int *TclDate_ps; /* top of state stack */
+ int TclDate_state; /* current state */
+ int TclDate_n; /* internal state number info */
goto TclDatestack; /* moved from 6 lines above to here to please C++ */
/*
*/
if ( TclDatedebug )
{
- register int TclDate_i;
+ int TclDate_i;
printf( "State %d, token ", TclDate_state );
if ( TclDatechar == 0 )
#if YYDEBUG
if ( TclDatedebug && TclDatetmp )
{
- register int TclDate_i;
+ int TclDate_i;
printf( "Received token " );
if ( TclDatechar == 0 )
#if YYDEBUG
if ( TclDatedebug && TclDatetmp )
{
- register int TclDate_i;
+ int TclDate_i;
printf( "Received token " );
if ( TclDatechar == 0 )
** look through exception table
*/
{
- register int *TclDatexi = TclDateexca;
+ int *TclDatexi = TclDateexca;
while ( ( *TclDatexi != -1 ) ||
( TclDatexi[1] != TclDate_state ) )
*/
if ( TclDatedebug )
{
- register int TclDate_i;
+ int TclDate_i;
printf( "Error recovery discards " );
if ( TclDatechar == 0 )
*/
{
/* length of production doubled with extra bit */
- register int TclDate_len = TclDater2[ TclDate_n ];
+ int TclDate_len = TclDater2[ TclDate_n ];
if ( !( TclDate_len & 01 ) )
{
)
{
int i;
- register CONST char *p1, *p2;
+ CONST char *p1, *p2;
for (i = 0, p1 = environ[i]; p1 != NULL; i++, p1 = environ[i]) {
for (p2 = name; *p2 == *p1; p1++, p2++) {
*/
if (name2 == NULL) {
- register EnvInterp *eiPtr, *prevPtr;
+ EnvInterp *eiPtr, *prevPtr;
if ((flags & (TCL_TRACE_UNSETS|TCL_TRACE_DESTROYED))
!= (TCL_TRACE_UNSETS|TCL_TRACE_DESTROYED)) {
ClientData clientData /* Arbitrary data to pass to proc. */
)
{
- register FileHandler *filePtr;
+ FileHandler *filePtr;
if (!fileEventSourceCreated) {
fileEventSourceCreated = 1;
ClientData clientData /* Arbitrary data to pass to proc. */
)
{
- register TimerHandler *timerHandlerPtr, *tPtr2, *prevPtr;
+ TimerHandler *timerHandlerPtr, *tPtr2, *prevPtr;
static int id = 0;
if (!timerEventSourceCreated) {
* Tcl_DeleteTimerHandler. */
)
{
- register TimerHandler *timerHandlerPtr, *prevPtr;
+ TimerHandler *timerHandlerPtr, *prevPtr;
for (timerHandlerPtr = firstTimerHandlerPtr, prevPtr = NULL;
timerHandlerPtr != NULL; prevPtr = timerHandlerPtr,
ClientData clientData /* Arbitrary value to pass to proc. */
)
{
- register IdleHandler *idlePtr;
+ IdleHandler *idlePtr;
idlePtr = (IdleHandler *) ckalloc(sizeof(IdleHandler));
idlePtr->proc = proc;
ClientData clientData /* Arbitrary value to pass to proc. */
)
{
- register IdleHandler *idlePtr, *prevPtr;
+ IdleHandler *idlePtr, *prevPtr;
IdleHandler *nextPtr;
for (prevPtr = NULL, idlePtr = idleList; idlePtr != NULL;
ExprLex(
Tcl_Interp *interp, /* Interpreter to use for error
* reporting. */
- register ExprInfo *infoPtr, /* Describes the state of the parse. */
- register Value *valuePtr /* Where to store value, if that is
+ ExprInfo *infoPtr, /* Describes the state of the parse. */
+ Value *valuePtr /* Where to store value, if that is
* what's parsed from string. Caller
* must have initialized pv field
* correctly. */
)
{
- register char *p;
+ char *p;
char *var, *term;
int result;
ExprGetValue(
Tcl_Interp *interp, /* Interpreter to use for error
* reporting. */
- register ExprInfo *infoPtr, /* Describes the state of the parse
+ ExprInfo *infoPtr, /* Describes the state of the parse
* just before the value (i.e. ExprLex
* will be called to get first token
* of value). */
ExprMakeString(
Tcl_Interp *interp, /* Interpreter to use for precision
* information. */
- register Value *valuePtr /* Value to be converted. */
+ Value *valuePtr /* Value to be converted. */
)
{
int shortfall;
ExprMathFunc(
Tcl_Interp *interp, /* Interpreter to use for error
* reporting. */
- register ExprInfo *infoPtr, /* Describes the state of the parse.
+ ExprInfo *infoPtr, /* Describes the state of the parse.
* infoPtr->expr must point to the
* first character of the function's
* name. */
- register Value *valuePtr /* Where to store value, if that is
+ Value *valuePtr /* Where to store value, if that is
* what's parsed from string. Caller
* must have initialized pv field
* correctly. */
* not even be initialized. */
)
{
- register char *p;
+ char *p;
/*
* Handle tilde substitutions, if needed.
)
{
int quoted, level;
- register char *p;
+ char *p;
quoted = 0;
level = 0;
void
Tcl_InitHashTable(
- register Tcl_HashTable *tablePtr, /* Pointer to table record, which
+ Tcl_HashTable *tablePtr, /* Pointer to table record, which
* is supplied by the caller. */
int keyType /* Type of keys to use in table:
* TCL_STRING_KEYS, TCL_ONE_WORD_KEYS,
Tcl_HashEntry *entryPtr
)
{
- register Tcl_HashEntry *prevPtr;
+ Tcl_HashEntry *prevPtr;
if (*entryPtr->bucketPtr == entryPtr) {
*entryPtr->bucketPtr = entryPtr->nextPtr;
void
Tcl_DeleteHashTable(
- register Tcl_HashTable *tablePtr /* Table to delete. */
+ Tcl_HashTable *tablePtr /* Table to delete. */
)
{
- register Tcl_HashEntry *hPtr, *nextPtr;
+ Tcl_HashEntry *hPtr, *nextPtr;
int i;
/*
Tcl_HashEntry *
Tcl_NextHashEntry(
- register Tcl_HashSearch *searchPtr /* Place to store information about
+ Tcl_HashSearch *searchPtr /* Place to store information about
* progress through the table. Must
* have been initialized by calling
* Tcl_FirstHashEntry. */
#define NUM_COUNTERS 10
int count[NUM_COUNTERS], overflow, i, j;
double average, tmp;
- register Tcl_HashEntry *hPtr;
+ Tcl_HashEntry *hPtr;
char *result, *p;
/*
static unsigned int
HashString(
- register char *string /* String from which to compute hash value. */
+ char *string /* String from which to compute hash value. */
)
{
- register unsigned int result;
- register int c;
+ unsigned int result;
+ int c;
/*
* I tried a zillion different hash functions and asked many other
char *key /* Key to use to find matching entry. */
)
{
- register Tcl_HashEntry *hPtr;
- register char *p1, *p2;
+ Tcl_HashEntry *hPtr;
+ char *p1, *p2;
int index;
index = HashString(key) & tablePtr->mask;
* entry was created. */
)
{
- register Tcl_HashEntry *hPtr;
- register char *p1, *p2;
+ Tcl_HashEntry *hPtr;
+ char *p1, *p2;
int index;
index = HashString(key) & tablePtr->mask;
static Tcl_HashEntry *
OneWordFind(
Tcl_HashTable *tablePtr, /* Table in which to lookup entry. */
- register char *key /* Key to use to find matching entry. */
+ char *key /* Key to use to find matching entry. */
)
{
- register Tcl_HashEntry *hPtr;
+ Tcl_HashEntry *hPtr;
int index;
index = RANDOM_INDEX(tablePtr, key);
static Tcl_HashEntry *
OneWordCreate(
Tcl_HashTable *tablePtr, /* Table in which to lookup entry. */
- register char *key, /* Key to use to find or create matching
+ char *key, /* Key to use to find or create matching
* entry. */
int *newPtr /* Store info here telling whether a new
* entry was created. */
)
{
- register Tcl_HashEntry *hPtr;
+ Tcl_HashEntry *hPtr;
int index;
index = RANDOM_INDEX(tablePtr, key);
char *key /* Key to use to find matching entry. */
)
{
- register Tcl_HashEntry *hPtr;
+ Tcl_HashEntry *hPtr;
int *arrayPtr = (int *) key;
- register int *iPtr1, *iPtr2;
+ int *iPtr1, *iPtr2;
int index, count;
for (index = 0, count = tablePtr->keyType, iPtr1 = arrayPtr;
static Tcl_HashEntry *
ArrayCreate(
Tcl_HashTable *tablePtr, /* Table in which to lookup entry. */
- register char *key, /* Key to use to find or create matching
+ char *key, /* Key to use to find or create matching
* entry. */
int *newPtr /* Store info here telling whether a new
* entry was created. */
)
{
- register Tcl_HashEntry *hPtr;
+ Tcl_HashEntry *hPtr;
int *arrayPtr = (int *) key;
- register int *iPtr1, *iPtr2;
+ int *iPtr1, *iPtr2;
int index, count;
for (index = 0, count = tablePtr->keyType, iPtr1 = arrayPtr;
static void
RebuildTable(
- register Tcl_HashTable *tablePtr /* Table to enlarge. */
+ Tcl_HashTable *tablePtr /* Table to enlarge. */
)
{
int oldSize, count, index;
Tcl_HashEntry **oldBuckets;
- register Tcl_HashEntry **oldChainPtr, **newChainPtr;
- register Tcl_HashEntry *hPtr;
+ Tcl_HashEntry **oldChainPtr, **newChainPtr;
+ Tcl_HashEntry *hPtr;
oldSize = tablePtr->numBuckets;
oldBuckets = tablePtr->buckets;
} else if (tablePtr->keyType == TCL_ONE_WORD_KEYS) {
index = RANDOM_INDEX(tablePtr, hPtr->key.oneWordValue);
} else {
- register int *iPtr;
+ int *iPtr;
int count;
for (index = 0, count = tablePtr->keyType,
static void
InitHistory(
- register Interp *iPtr /* Interpreter to initialize. */
+ Interp *iPtr /* Interpreter to initialize. */
)
{
int i;
* instead of Tcl_Eval. */
)
{
- register Interp *iPtr = (Interp *) interp;
- register HistoryEvent *eventPtr;
+ Interp *iPtr = (Interp *) interp;
+ HistoryEvent *eventPtr;
int length, result;
if (iPtr->numEvents == 0) {
char **argv /* Argument strings. */
)
{
- register Interp *iPtr = (Interp *) interp;
- register HistoryEvent *eventPtr;
+ Interp *iPtr = (Interp *) interp;
+ HistoryEvent *eventPtr;
size_t length;
int c;
static void
InsertRev(
Interp *iPtr, /* Interpreter to use. */
- register HistoryRev *revPtr /* Revision to add to iPtr's list. */
+ HistoryRev *revPtr /* Revision to add to iPtr's list. */
)
{
- register HistoryRev *curPtr;
- register HistoryRev *prevPtr;
+ HistoryRev *curPtr;
+ HistoryRev *prevPtr;
for (curPtr = iPtr->revPtr, prevPtr = NULL; curPtr != NULL;
prevPtr = curPtr, curPtr = curPtr->nextPtr) {
static void
RevCommand(
- register Interp *iPtr, /* Interpreter in which to perform the
+ Interp *iPtr, /* Interpreter in which to perform the
* substitution. */
char *string /* String to substitute. */
)
{
- register HistoryRev *revPtr;
+ HistoryRev *revPtr;
if ((iPtr->evalFirst == NULL) || (iPtr->revDisables > 0)) {
return;
static void
RevResult(
- register Interp *iPtr, /* Interpreter in which to perform the
+ Interp *iPtr, /* Interpreter in which to perform the
* substitution. */
char *string /* String to substitute. */
)
{
- register HistoryRev *revPtr;
+ HistoryRev *revPtr;
char *evalFirst, *evalLast;
char *argv[2];
static void
DoRevs(
- register Interp *iPtr /* Interpreter whose history is to
+ Interp *iPtr /* Interpreter whose history is to
* be modified. */
)
{
- register HistoryRev *revPtr;
- register HistoryEvent *eventPtr;
+ HistoryRev *revPtr;
+ HistoryEvent *eventPtr;
char *newCommand, *p;
unsigned int size;
int bytesSeen, count;
static HistoryEvent *
GetEvent(
- register Interp *iPtr, /* Interpreter in which to look. */
+ Interp *iPtr, /* Interpreter in which to look. */
char *string /* Description of event. */
)
{
int eventNum, index;
- register HistoryEvent *eventPtr;
+ HistoryEvent *eventPtr;
int length;
/*
static int
SubsAndEval(
- register Interp *iPtr, /* Interpreter in which to execute
+ Interp *iPtr, /* Interpreter in which to execute
* new command. */
char *cmd, /* Command in which to substitute. */
char *old, /* String to search for in command. */
static char *
GetWords(
- register Interp *iPtr, /* Tcl interpreter in which to place
+ Interp *iPtr, /* Tcl interpreter in which to place
* an error message if needed. */
char *command, /* Command string. */
char *words /* Description of which words to extract
{
char *result;
char *start, *end, *dst;
- register char *next;
+ char *next;
int first; /* First word desired. -1 means last word
* only. */
int last; /* Last word desired. -1 means use everything
FileForRedirect(
Tcl_Interp *interp, /* Intepreter to use for error
* reporting. */
- register char *spec, /* Points to character just after
+ char *spec, /* Points to character just after
* redirection character. */
int atOk, /* Non-zero means '@' notation is
* OK, zero means it isn't. */
pid_t *pidPtr /* Array of pids to detach. */
)
{
- register Detached *detPtr;
+ Detached *detPtr;
int i;
for (i = 0; i < numPids; i++) {
void
Tcl_ReapDetachedProcs(void)
{
- register Detached *detPtr;
+ Detached *detPtr;
Detached *nextPtr, *prevPtr;
int status;
pid_t pid;
* from src, unless NULL. */
)
{
- register char *p = src+1;
+ char *p = src+1;
char result;
int count;
* fully-substituted result of parse. */
)
{
- register char *src, *dst, c;
+ char *src, *dst, c;
src = string;
dst = pvPtr->next;
int flags, /* Flags to pass to nested Tcl_Eval. */
char **termPtr, /* Store address of terminating character
* here. */
- register ParseValue *pvPtr /* Information about where to place
+ ParseValue *pvPtr /* Information about where to place
* result of command. */
)
{
char *string, /* Character just after opening bracket. */
char **termPtr, /* Store address of terminating character
* here. */
- register ParseValue *pvPtr /* Information about where to place
+ ParseValue *pvPtr /* Information about where to place
* result of command. */
)
{
int level;
- register char *src, *dst, *end;
- register char c;
+ char *src, *dst, *end;
+ char c;
src = string;
dst = pvPtr->next;
int *argcPtr, /* Filled in with actual number of words
* parsed. */
char **argv, /* Store addresses of individual words here. */
- register ParseValue *pvPtr /* Information about where to place
+ ParseValue *pvPtr /* Information about where to place
* fully-substituted word. */
)
{
- register char *src, *dst;
- register char c;
+ char *src, *dst;
+ char c;
int type, result, argc;
char *oldBuffer; /* Used to detect when pvPtr's buffer gets
* reallocated, so we can adjust all of the
void
TclExpandParseValue(
- register ParseValue *pvPtr, /* Information about buffer that
+ ParseValue *pvPtr, /* Information about buffer that
* must be expanded. If the clientData
* in the structure is non-zero, it
* means that the current buffer is
* If NULL then ignored. */
)
{
- register char *p;
+ char *p;
int count;
if (semiPtr != NULL) {
* quoted string (e.g. '"' or ')'). */
)
{
- register char *p = string;
+ char *p = string;
int count;
while (*p != term) {
char *string /* Pointer to dollar-sign character. */
)
{
- register char *p = string+1;
+ char *p = string+1;
if (*p == '{') {
for (p++; (*p != '}') && (*p != 0); p++) {
char *
Tcl_ParseVar(
Tcl_Interp *interp, /* Context for looking up variable. */
- register char *string, /* String containing variable name.
+ char *string, /* String containing variable name.
* First character must be "$". */
char **termPtr /* If non-NULL, points to word to fill
* in with character just after last
)
{
char *name1, *name1End, c, *result;
- register char *name2;
+ char *name2;
#define NUM_CHARS 200
char copyStorage[NUM_CHARS];
ParseValue pv;
char **argv /* Argument strings. */
)
{
- register Interp *iPtr = (Interp *) interp;
- register Proc *procPtr;
+ Interp *iPtr = (Interp *) interp;
+ Proc *procPtr;
int result, argCount, i;
char **argArray = NULL;
Arg *lastArgPtr;
- register Arg *argPtr = NULL; /* Initialization not needed, but
+ Arg *argPtr = NULL; /* Initialization not needed, but
* prevents compiler warning. */
if (argc != 4) {
* if global frame indicated). */
)
{
- register Interp *iPtr = (Interp *) interp;
+ Interp *iPtr = (Interp *) interp;
int curLevel, level, result;
CallFrame *framePtr;
char **argv /* Argument strings. */
)
{
- register Interp *iPtr = (Interp *) interp;
+ Interp *iPtr = (Interp *) interp;
int result;
CallFrame *savedVarFramePtr, *framePtr;
char **argv /* Argument values. */
)
{
- register Proc *procPtr = (Proc *) clientData;
- register Arg *argPtr;
- register Interp *iPtr;
+ Proc *procPtr = (Proc *) clientData;
+ Arg *argPtr;
+ Interp *iPtr;
char **args;
CallFrame frame;
char *value;
static void
CleanupProc(
- register Proc *procPtr /* Procedure to be deleted. */
+ Proc *procPtr /* Procedure to be deleted. */
)
{
- register Arg *argPtr;
+ Arg *argPtr;
ckfree((char *) procPtr->command);
for (argPtr = procPtr->argPtr; argPtr != NULL; ) {
Tcl_Interp *interp, /* Interpreter to use for error reporting.
* If NULL, then no error message is left
* after errors. */
- register char *list, /* String containing Tcl list with zero
+ char *list, /* String containing Tcl list with zero
* or more elements (possibly in braces). */
char **elementPtr, /* Fill in with location of first significant
* character in first element of list. */
* in braces. */
)
{
- register char *p;
+ char *p;
int openBraces = 0;
int inQuotes = 0;
int size;
TclCopyAndCollapse(
int count, /* Total number of characters to copy
* from src. */
- register char *src, /* Copy from here... */
- register char *dst /* ... to here. */
+ char *src, /* Copy from here... */
+ char *dst /* ... to here. */
)
{
- register char c;
+ char c;
int numRead;
for (c = *src; count > 0; src++, c = *src, count--) {
)
{
char **argv;
- register char *p;
+ char *p;
int size, i, result, elSize, brace;
char *element;
)
{
int flags, nestingLevel;
- register char *p;
+ char *p;
/*
* This procedure and Tcl_ConvertElement together do two things:
int
Tcl_ConvertElement(
- register char *src, /* Source information for list element. */
+ char *src, /* Source information for list element. */
char *dst, /* Place to put list-ified element. */
int flags /* Flags produced by Tcl_ScanElement. */
)
{
- register char *p = dst;
+ char *p = dst;
/*
* See the comment block at the beginning of the Tcl_ScanElement
int localFlags[LOCAL_SIZE], *flagPtr;
int numChars;
char *result;
- register char *dst;
+ char *dst;
int i;
/*
)
{
int totalSize, i;
- register char *p;
+ char *p;
char *result;
for (totalSize = 1, i = 0; i < argc; i++) {
int
Tcl_StringMatch(
- register char *string, /* String. */
- register char *pattern /* Pattern, which may contain
- * special characters. */
+ char *string, /* String. */
+ char *pattern /* Pattern, which may contain
)
{
char c2;
* of a Tcl_FreeProc such as free. */
)
{
- register Interp *iPtr = (Interp *) interp;
+ Interp *iPtr = (Interp *) interp;
int length;
Tcl_FreeProc *oldFreeProc = iPtr->freeProc;
char *oldResult = iPtr->result;
Tcl_AppendResult TCL_VARARGS_DEF(Tcl_Interp *,arg1)
{
va_list argList;
- register Interp *iPtr;
+ Interp *iPtr;
char *string;
int newSpace;
* add to result. */
)
{
- register Interp *iPtr = (Interp *) interp;
+ Interp *iPtr = (Interp *) interp;
int size, flags;
char *dst;
static void
SetupAppendBuffer(
- register Interp *iPtr, /* Interpreter whose result is being set up. */
+ Interp *iPtr, /* Interpreter whose result is being set up. */
int newSpace /* Make sure that at least this many bytes
* of new information may be added. */
)
Tcl_Interp *interp /* Interpreter for which to clear result. */
)
{
- register Interp *iPtr = (Interp *) interp;
+ Interp *iPtr = (Interp *) interp;
Tcl_FreeResult(iPtr);
iPtr->result = iPtr->resultSpace;
* compiled regular expression. */
)
{
- register Interp *iPtr = (Interp *) interp;
+ Interp *iPtr = (Interp *) interp;
int i, length;
regexp *result;
void
Tcl_DStringInit(
- register Tcl_DString *dsPtr /* Pointer to structure for
+ Tcl_DString *dsPtr /* Pointer to structure for
* dynamic string. */
)
{
char *
Tcl_DStringAppend(
- register Tcl_DString *dsPtr, /* Structure describing dynamic
+ Tcl_DString *dsPtr, /* Structure describing dynamic
* string. */
char *string, /* String to append. If length is
* -1 then this must be
char *
Tcl_DStringAppendElement(
- register Tcl_DString *dsPtr, /* Structure describing dynamic
+ Tcl_DString *dsPtr, /* Structure describing dynamic
* string. */
char *string /* String to append. Must be
* null-terminated. */
void
Tcl_DStringSetLength(
- register Tcl_DString *dsPtr, /* Structure describing dynamic
+ Tcl_DString *dsPtr, /* Structure describing dynamic
* string. */
int length /* New length for dynamic string. */
)
void
Tcl_DStringFree(
- register Tcl_DString *dsPtr /* Structure describing dynamic
+ Tcl_DString *dsPtr /* Structure describing dynamic
* string. */
)
{
* characters. */
)
{
- register char *p;
+ char *p;
sprintf(dst, ((Interp *) interp)->pdFormat, value);
/*
int flags /* Information about what happened. */
)
{
- register Interp *iPtr = (Interp *) interp;
+ Interp *iPtr = (Interp *) interp;
char *value, *end;
int prec;
* PART1_NOT_PARSED. */
)
{
- register Var *varPtr;
- register Interp *iPtr = (Interp *) interp;
+ Var *varPtr;
+ Interp *iPtr = (Interp *) interp;
int length, listFlags;
Var *arrayPtr;
char *result;
)
{
Var *varPtr, *arrayPtr;
- register VarTrace *tracePtr;
+ VarTrace *tracePtr;
varPtr = LookupVar(interp, part1, part2, (flags | TCL_LEAVE_ERR_MSG),
"trace", CRT_PART1|CRT_PART2, &arrayPtr);
ClientData clientData /* Arbitrary argument to pass to proc. */
)
{
- register VarTrace *tracePtr;
+ VarTrace *tracePtr;
VarTrace *prevPtr;
Var *varPtr, *arrayPtr;
Interp *iPtr = (Interp *) interp;
* first trace. */
)
{
- register VarTrace *tracePtr;
+ VarTrace *tracePtr;
Var *varPtr, *arrayPtr;
varPtr = LookupVar(interp, part1, part2,
int
Tcl_SetCmd(
ClientData dummy, /* Not used. */
- register Tcl_Interp *interp, /* Current interpreter. */
+ Tcl_Interp *interp, /* Current interpreter. */
int argc, /* Number of arguments. */
char **argv /* Argument strings. */
)
int
Tcl_UnsetCmd(
ClientData dummy, /* Not used. */
- register Tcl_Interp *interp, /* Current interpreter. */
+ Tcl_Interp *interp, /* Current interpreter. */
int argc, /* Number of arguments. */
char **argv /* Argument strings. */
)
int
Tcl_AppendCmd(
ClientData dummy, /* Not used. */
- register Tcl_Interp *interp, /* Current interpreter. */
+ Tcl_Interp *interp, /* Current interpreter. */
int argc, /* Number of arguments. */
char **argv /* Argument strings. */
)
int
Tcl_LappendCmd(
ClientData dummy, /* Not used. */
- register Tcl_Interp *interp, /* Current interpreter. */
+ Tcl_Interp *interp, /* Current interpreter. */
int argc, /* Number of arguments. */
char **argv /* Argument strings. */
)
int
Tcl_ArrayCmd(
ClientData dummy, /* Not used. */
- register Tcl_Interp *interp, /* Current interpreter. */
+ Tcl_Interp *interp, /* Current interpreter. */
int argc, /* Number of arguments. */
char **argv /* Argument strings. */
)
{
int result;
CallFrame *framePtr;
- register char *p;
+ char *p;
result = TclGetFrame(interp, frameName, &framePtr);
if (result == -1) {
char **argv /* Argument strings. */
)
{
- register Interp *iPtr = (Interp *) interp;
+ Interp *iPtr = (Interp *) interp;
if (argc < 2) {
Tcl_AppendResult((Tcl_Interp *) iPtr, "wrong # args: should be \"",
char **argv /* Argument strings. */
)
{
- register Interp *iPtr = (Interp *) interp;
+ Interp *iPtr = (Interp *) interp;
int result;
CallFrame *framePtr;
- register char *p;
+ char *p;
if (argc < 3) {
upvarSyntax:
static char *
CallTraces(
Interp *iPtr, /* Interpreter containing variable. */
- register Var *arrayPtr, /* Pointer to array variable that
+ Var *arrayPtr, /* Pointer to array variable that
* contains the variable, or NULL if
* the variable isn't an element of an
* array. */
* to callbacks. */
)
{
- register VarTrace *tracePtr;
+ VarTrace *tracePtr;
ActiveVarTrace active;
char *result, *openParen, *p;
Tcl_DString nameCopy;
static Var *
NewVar(void)
{
- register Var *varPtr;
+ Var *varPtr;
varPtr = (Var *) ckalloc(sizeof(Var));
varPtr->valueLength = 0;
static void
DeleteSearches(
- register Var *arrayVarPtr /* Variable whose searches are
+ Var *arrayVarPtr /* Variable whose searches are
* to be deleted. */
)
{
{
Tcl_HashSearch search;
Tcl_HashEntry *hPtr;
- register Var *varPtr;
+ Var *varPtr;
Var *upvarPtr;
int flags;
ActiveVarTrace *activePtr;
)
{
Tcl_HashSearch search;
- register Tcl_HashEntry *hPtr;
- register Var *elPtr;
+ Tcl_HashEntry *hPtr;
+ Var *elPtr;
ActiveVarTrace *activePtr;
DeleteSearches(varPtr);