cawf: Fix buffer scope
Change-Id: I03f9066c20da142034626b07d0b07c446075b8af
This commit is contained in:
parent
c14bb31e67
commit
c6748a4a93
1 changed files with 6 additions and 6 deletions
|
@ -1129,14 +1129,14 @@ regexp *r;
|
||||||
/*
|
/*
|
||||||
- regprop - printable representation of opcode
|
- regprop - printable representation of opcode
|
||||||
*/
|
*/
|
||||||
|
STATIC unsigned char regprop_buf[50];
|
||||||
STATIC unsigned char *
|
STATIC unsigned char *
|
||||||
regprop(op)
|
regprop(op)
|
||||||
unsigned char *op;
|
unsigned char *op;
|
||||||
{
|
{
|
||||||
register unsigned char *p;
|
register unsigned char *p;
|
||||||
STATIC unsigned char buf[50];
|
|
||||||
|
|
||||||
(void) strcpy(buf, ":");
|
(void) strcpy(regprop_buf, ":");
|
||||||
|
|
||||||
switch (OP(op)) {
|
switch (OP(op)) {
|
||||||
case BOL:
|
case BOL:
|
||||||
|
@ -1178,7 +1178,7 @@ unsigned char *op;
|
||||||
case OPEN+7:
|
case OPEN+7:
|
||||||
case OPEN+8:
|
case OPEN+8:
|
||||||
case OPEN+9:
|
case OPEN+9:
|
||||||
sprintf(buf+strlen(buf), "OPEN%d", OP(op)-OPEN);
|
sprintf(regprop_buf+strlen(regprop_buf), "OPEN%d", OP(op)-OPEN);
|
||||||
p = NULL;
|
p = NULL;
|
||||||
break;
|
break;
|
||||||
case CLOSE+1:
|
case CLOSE+1:
|
||||||
|
@ -1190,7 +1190,7 @@ unsigned char *op;
|
||||||
case CLOSE+7:
|
case CLOSE+7:
|
||||||
case CLOSE+8:
|
case CLOSE+8:
|
||||||
case CLOSE+9:
|
case CLOSE+9:
|
||||||
sprintf(buf+strlen(buf), "CLOSE%d", OP(op)-CLOSE);
|
sprintf(regprop_buf+strlen(regprop_buf), "CLOSE%d", OP(op)-CLOSE);
|
||||||
p = NULL;
|
p = NULL;
|
||||||
break;
|
break;
|
||||||
case STAR:
|
case STAR:
|
||||||
|
@ -1204,8 +1204,8 @@ unsigned char *op;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (p != NULL)
|
if (p != NULL)
|
||||||
(void) strcat(buf, p);
|
(void) strcat(regprop_buf, p);
|
||||||
return(buf);
|
return(regprop_buf);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue