summaryrefslogtreecommitdiff
path: root/legacy/embryo
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2012-09-07 10:12:50 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-09-07 10:12:50 +0000
commite26ae30eb863c5e442b4ffbf13c31389a8646dea (patch)
treefeaf6d4987d36b9b5dfc006d1ce1a4b1f41ecbb2 /legacy/embryo
parent74f1f5eed11ef75dcb11b4f7517277ab19bd9997 (diff)
vincent - try this on windows.
SVN revision: 76293
Diffstat (limited to 'legacy/embryo')
-rw-r--r--legacy/embryo/src/bin/embryo_cc_sc.h6
-rw-r--r--legacy/embryo/src/bin/embryo_cc_sc1.c8
-rw-r--r--legacy/embryo/src/bin/embryo_cc_sc2.c56
-rw-r--r--legacy/embryo/src/bin/embryo_cc_sc6.c16
-rw-r--r--legacy/embryo/src/bin/embryo_cc_sc7.c6
5 files changed, 49 insertions, 43 deletions
diff --git a/legacy/embryo/src/bin/embryo_cc_sc.h b/legacy/embryo/src/bin/embryo_cc_sc.h
index bedd59eac8..9eaf6b86e0 100644
--- a/legacy/embryo/src/bin/embryo_cc_sc.h
+++ b/legacy/embryo/src/bin/embryo_cc_sc.h
@@ -664,4 +664,10 @@ extern FILE *outf; /* file written to */
664 664
665extern jmp_buf errbuf; /* target of longjmp() on a fatal error */ 665extern jmp_buf errbuf; /* target of longjmp() on a fatal error */
666 666
667#define sc_isspace(x) isspace ((int)((unsigned char)x))
668#define sc_isalpha(x) isalpha ((int)((unsigned char)x))
669#define sc_isdigit(x) isdigit ((int)((unsigned char)x))
670#define sc_isupper(x) isupper ((int)((unsigned char)x))
671#define sc_isxdigit(x) isxdigit((int)((unsigned char)x))
672
667#endif 673#endif
diff --git a/legacy/embryo/src/bin/embryo_cc_sc1.c b/legacy/embryo/src/bin/embryo_cc_sc1.c
index 3a5b3d9424..9ee3ad80fa 100644
--- a/legacy/embryo/src/bin/embryo_cc_sc1.c
+++ b/legacy/embryo/src/bin/embryo_cc_sc1.c
@@ -489,7 +489,7 @@ sc_addtag(char *name)
489 489
490 /* tagname currently unknown, add it */ 490 /* tagname currently unknown, add it */
491 tag = last + 1; /* guaranteed not to exist already */ 491 tag = last + 1; /* guaranteed not to exist already */
492 if (isupper(*name)) 492 if (sc_isupper(*name))
493 tag |= (int)FIXEDTAG; 493 tag |= (int)FIXEDTAG;
494 append_constval(&tagname_tab, name, (cell) tag, 0); 494 append_constval(&tagname_tab, name, (cell) tag, 0);
495 return tag; 495 return tag;
@@ -1949,7 +1949,7 @@ tag2str(char *dest, int tag)
1949 tag &= TAGMASK; 1949 tag &= TAGMASK;
1950 assert(tag >= 0); 1950 assert(tag >= 0);
1951 sprintf(dest, "0%x", tag); 1951 sprintf(dest, "0%x", tag);
1952 return isdigit(dest[1]) ? &dest[1] : dest; 1952 return sc_isdigit(dest[1]) ? &dest[1] : dest;
1953} 1953}
1954 1954
1955char * 1955char *
@@ -1995,7 +1995,7 @@ parse_funcname(char *fname, int *tag1, int *tag2, char *opname)
1995 } /* if */ 1995 } /* if */
1996 assert(!unary || *tag1 == 0); 1996 assert(!unary || *tag1 == 0);
1997 assert(*ptr != '\0'); 1997 assert(*ptr != '\0');
1998 for (name = opname; !isdigit(*ptr);) 1998 for (name = opname; !sc_isdigit(*ptr);)
1999 *name++ = *ptr++; 1999 *name++ = *ptr++;
2000 *name = '\0'; 2000 *name = '\0';
2001 *tag2 = (int)strtol(ptr, NULL, 16); 2001 *tag2 = (int)strtol(ptr, NULL, 16);
@@ -2010,7 +2010,7 @@ funcdisplayname(char *dest, char *funcname)
2010 constvalue *tagsym[2]; 2010 constvalue *tagsym[2];
2011 int unary; 2011 int unary;
2012 2012
2013 if (isalpha(*funcname) || *funcname == '_' || *funcname == PUBLIC_CHAR 2013 if (sc_isalpha(*funcname) || *funcname == '_' || *funcname == PUBLIC_CHAR
2014 || *funcname == '\0') 2014 || *funcname == '\0')
2015 { 2015 {
2016 if (dest != funcname) 2016 if (dest != funcname)
diff --git a/legacy/embryo/src/bin/embryo_cc_sc2.c b/legacy/embryo/src/bin/embryo_cc_sc2.c
index 04cb537128..f72703a64e 100644
--- a/legacy/embryo/src/bin/embryo_cc_sc2.c
+++ b/legacy/embryo/src/bin/embryo_cc_sc2.c
@@ -443,9 +443,9 @@ dtoi(cell * val, char *curptr)
443 443
444 *val = 0; 444 *val = 0;
445 ptr = curptr; 445 ptr = curptr;
446 if (!isdigit(*ptr)) /* should start with digit */ 446 if (!sc_isdigit(*ptr)) /* should start with digit */
447 return 0; 447 return 0;
448 while (isdigit(*ptr) || *ptr == '_') 448 while (sc_isdigit(*ptr) || *ptr == '_')
449 { 449 {
450 if (*ptr != '_') 450 if (*ptr != '_')
451 *val = (*val * 10) + (*ptr - '0'); 451 *val = (*val * 10) + (*ptr - '0');
@@ -453,7 +453,7 @@ dtoi(cell * val, char *curptr)
453 } /* while */ 453 } /* while */
454 if (alphanum(*ptr)) /* number must be delimited by non-alphanumerical */ 454 if (alphanum(*ptr)) /* number must be delimited by non-alphanumerical */
455 return 0; 455 return 0;
456 if (*ptr == '.' && isdigit(*(ptr + 1))) 456 if (*ptr == '.' && sc_isdigit(*(ptr + 1)))
457 return 0; /* but a fractional part must not be present */ 457 return 0; /* but a fractional part must not be present */
458 return (int)(ptr - curptr); 458 return (int)(ptr - curptr);
459} 459}
@@ -471,18 +471,18 @@ htoi(cell * val, char *curptr)
471 471
472 *val = 0; 472 *val = 0;
473 ptr = curptr; 473 ptr = curptr;
474 if (!isdigit(*ptr)) /* should start with digit */ 474 if (!sc_isdigit(*ptr)) /* should start with digit */
475 return 0; 475 return 0;
476 if (*ptr == '0' && *(ptr + 1) == 'x') 476 if (*ptr == '0' && *(ptr + 1) == 'x')
477 { /* C style hexadecimal notation */ 477 { /* C style hexadecimal notation */
478 ptr += 2; 478 ptr += 2;
479 while (isxdigit(*ptr) || *ptr == '_') 479 while (sc_isxdigit(*ptr) || *ptr == '_')
480 { 480 {
481 if (*ptr != '_') 481 if (*ptr != '_')
482 { 482 {
483 assert(isxdigit(*ptr)); 483 assert(sc_isxdigit(*ptr));
484 *val = *val << 4; 484 *val = *val << 4;
485 if (isdigit(*ptr)) 485 if (sc_isdigit(*ptr))
486 *val += (*ptr - '0'); 486 *val += (*ptr - '0');
487 else 487 else
488 *val += (tolower(*ptr) - 'a' + 10); 488 *val += (tolower(*ptr) - 'a' + 10);
@@ -554,9 +554,9 @@ ftoi(cell * val, char *curptr)
554 fnum = 0.0; 554 fnum = 0.0;
555 dnum = 0L; 555 dnum = 0L;
556 ptr = curptr; 556 ptr = curptr;
557 if (!isdigit(*ptr)) /* should start with digit */ 557 if (!sc_isdigit(*ptr)) /* should start with digit */
558 return 0; 558 return 0;
559 while (isdigit(*ptr) || *ptr == '_') 559 while (sc_isdigit(*ptr) || *ptr == '_')
560 { 560 {
561 if (*ptr != '_') 561 if (*ptr != '_')
562 { 562 {
@@ -568,12 +568,12 @@ ftoi(cell * val, char *curptr)
568 if (*ptr != '.') 568 if (*ptr != '.')
569 return 0; /* there must be a period */ 569 return 0; /* there must be a period */
570 ptr++; 570 ptr++;
571 if (!isdigit(*ptr)) /* there must be at least one digit after the dot */ 571 if (!sc_isdigit(*ptr)) /* there must be at least one digit after the dot */
572 return 0; 572 return 0;
573 ffrac = 0.0; 573 ffrac = 0.0;
574 fmult = 1.0; 574 fmult = 1.0;
575 ignore = FALSE; 575 ignore = FALSE;
576 while (isdigit(*ptr) || *ptr == '_') 576 while (sc_isdigit(*ptr) || *ptr == '_')
577 { 577 {
578 if (*ptr != '_') 578 if (*ptr != '_')
579 { 579 {
@@ -605,10 +605,10 @@ ftoi(cell * val, char *curptr)
605 { 605 {
606 sign = 1; 606 sign = 1;
607 } /* if */ 607 } /* if */
608 if (!isdigit(*ptr)) /* 'e' should be followed by a digit */ 608 if (!sc_isdigit(*ptr)) /* 'e' should be followed by a digit */
609 return 0; 609 return 0;
610 exp = 0; 610 exp = 0;
611 while (isdigit(*ptr)) 611 while (sc_isdigit(*ptr))
612 { 612 {
613 exp = (exp * 10) + (*ptr - '0'); 613 exp = (exp * 10) + (*ptr - '0');
614 ptr++; 614 ptr++;
@@ -1109,7 +1109,7 @@ command(void)
1109 lptr++; 1109 lptr++;
1110 for (i = 0; 1110 for (i = 0;
1111 (i < (int)(sizeof(name))) && 1111 (i < (int)(sizeof(name))) &&
1112 (isalpha(*lptr)); 1112 (sc_isalpha(*lptr));
1113 i++, lptr++) 1113 i++, lptr++)
1114 name[i] = *lptr; 1114 name[i] = *lptr;
1115 name[i] = '\0'; 1115 name[i] = '\0';
@@ -1171,7 +1171,7 @@ command(void)
1171 1171
1172 while (*lptr <= ' ' && *lptr != '\0') 1172 while (*lptr <= ' ' && *lptr != '\0')
1173 lptr++; 1173 lptr++;
1174 for (i = 0; i < 40 && (isalpha(*lptr) || *lptr == '.'); i++, lptr++) 1174 for (i = 0; i < 40 && (sc_isalpha(*lptr) || *lptr == '.'); i++, lptr++)
1175 name[i] = (char)tolower(*lptr); 1175 name[i] = (char)tolower(*lptr);
1176 name[i] = '\0'; 1176 name[i] = '\0';
1177 stgwrite("\t"); 1177 stgwrite("\t");
@@ -1253,7 +1253,7 @@ command(void)
1253 } /* while */ 1253 } /* while */
1254 end = lptr; 1254 end = lptr;
1255 /* check pattern to match */ 1255 /* check pattern to match */
1256 if (!isalpha(*start) && *start != '_') 1256 if (!sc_isalpha(*start) && *start != '_')
1257 { 1257 {
1258 error(74); /* pattern must start with an alphabetic character */ 1258 error(74); /* pattern must start with an alphabetic character */
1259 break; 1259 break;
@@ -1272,7 +1272,7 @@ command(void)
1272 } /* while */ 1272 } /* while */
1273 pattern[count] = '\0'; 1273 pattern[count] = '\0';
1274 /* special case, erase trailing variable, because it could match anything */ 1274 /* special case, erase trailing variable, because it could match anything */
1275 if (count >= 2 && isdigit(pattern[count - 1]) 1275 if (count >= 2 && sc_isdigit(pattern[count - 1])
1276 && pattern[count - 2] == '%') 1276 && pattern[count - 2] == '%')
1277 pattern[count - 2] = '\0'; 1277 pattern[count - 2] = '\0';
1278 /* find substitution string */ 1278 /* find substitution string */
@@ -1313,7 +1313,7 @@ command(void)
1313 substitution[count] = '\0'; 1313 substitution[count] = '\0';
1314 /* check whether the definition already exists */ 1314 /* check whether the definition already exists */
1315 for (prefixlen = 0, start = pattern; 1315 for (prefixlen = 0, start = pattern;
1316 isalpha(*start) || isdigit(*start) || *start == '_'; 1316 sc_isalpha(*start) || sc_isdigit(*start) || *start == '_';
1317 prefixlen++, start++) 1317 prefixlen++, start++)
1318 /* nothing */ ; 1318 /* nothing */ ;
1319 assert(prefixlen > 0); 1319 assert(prefixlen > 0);
@@ -1484,7 +1484,7 @@ substpattern(char *line, size_t buffersize, char *pattern, char *substitution)
1484 memset(args, 0, sizeof args); 1484 memset(args, 0, sizeof args);
1485 1485
1486 /* check the length of the prefix */ 1486 /* check the length of the prefix */
1487 for (prefixlen = 0, s = pattern; isalpha(*s) || isdigit(*s) || *s == '_'; 1487 for (prefixlen = 0, s = pattern; sc_isalpha(*s) || sc_isdigit(*s) || *s == '_';
1488 prefixlen++, s++) 1488 prefixlen++, s++)
1489 /* nothing */ ; 1489 /* nothing */ ;
1490 assert(prefixlen > 0); 1490 assert(prefixlen > 0);
@@ -1501,7 +1501,7 @@ substpattern(char *line, size_t buffersize, char *pattern, char *substitution)
1501 if (*p == '%') 1501 if (*p == '%')
1502 { 1502 {
1503 p++; /* skip '%' */ 1503 p++; /* skip '%' */
1504 if (isdigit(*p)) 1504 if (sc_isdigit(*p))
1505 { 1505 {
1506 arg = *p - '0'; 1506 arg = *p - '0';
1507 assert(arg >= 0 && arg <= 9); 1507 assert(arg >= 0 && arg <= 9);
@@ -1596,7 +1596,7 @@ substpattern(char *line, size_t buffersize, char *pattern, char *substitution)
1596 /* calculate the length of the substituted string */ 1596 /* calculate the length of the substituted string */
1597 for (e = substitution, len = 0; *e != '\0'; e++) 1597 for (e = substitution, len = 0; *e != '\0'; e++)
1598 { 1598 {
1599 if (*e == '%' && isdigit(*(e + 1))) 1599 if (*e == '%' && sc_isdigit(*(e + 1)))
1600 { 1600 {
1601 arg = *(e + 1) - '0'; 1601 arg = *(e + 1) - '0';
1602 assert(arg >= 0 && arg <= 9); 1602 assert(arg >= 0 && arg <= 9);
@@ -1620,7 +1620,7 @@ substpattern(char *line, size_t buffersize, char *pattern, char *substitution)
1620 strdel(line, (int)(s - line)); 1620 strdel(line, (int)(s - line));
1621 for (e = substitution, s = line; *e != '\0'; e++) 1621 for (e = substitution, s = line; *e != '\0'; e++)
1622 { 1622 {
1623 if (*e == '%' && isdigit(*(e + 1))) 1623 if (*e == '%' && sc_isdigit(*(e + 1)))
1624 { 1624 {
1625 arg = *(e + 1) - '0'; 1625 arg = *(e + 1) - '0';
1626 assert(arg >= 0 && arg <= 9); 1626 assert(arg >= 0 && arg <= 9);
@@ -1660,7 +1660,7 @@ substallpatterns(char *line, int buffersize)
1660 /* find the start of a prefix (skip all non-alphabetic characters), 1660 /* find the start of a prefix (skip all non-alphabetic characters),
1661 * also skip strings 1661 * also skip strings
1662 */ 1662 */
1663 while (!isalpha(*start) && *start != '_' && *start != '\0') 1663 while (!sc_isalpha(*start) && *start != '_' && *start != '\0')
1664 { 1664 {
1665 /* skip strings */ 1665 /* skip strings */
1666 if (is_startstring(start)) 1666 if (is_startstring(start))
@@ -1676,7 +1676,7 @@ substallpatterns(char *line, int buffersize)
1676 /* get the prefix (length), look for a matching definition */ 1676 /* get the prefix (length), look for a matching definition */
1677 prefixlen = 0; 1677 prefixlen = 0;
1678 end = start; 1678 end = start;
1679 while (isalpha(*end) || isdigit(*end) || *end == '_') 1679 while (sc_isalpha(*end) || sc_isdigit(*end) || *end == '_')
1680 { 1680 {
1681 prefixlen++; 1681 prefixlen++;
1682 end++; 1682 end++;
@@ -2318,7 +2318,7 @@ litchar(char **lptr, int rawmode)
2318 cptr += 1; 2318 cptr += 1;
2319 break; 2319 break;
2320 default: 2320 default:
2321 if (isdigit(*cptr)) 2321 if (sc_isdigit(*cptr))
2322 { /* \ddd */ 2322 { /* \ddd */
2323 c = 0; 2323 c = 0;
2324 while (*cptr >= '0' && *cptr <= '9') /* decimal! */ 2324 while (*cptr >= '0' && *cptr <= '9') /* decimal! */
@@ -2346,7 +2346,7 @@ litchar(char **lptr, int rawmode)
2346static int 2346static int
2347alpha(char c) 2347alpha(char c)
2348{ 2348{
2349 return (isalpha(c) || c == '_' || c == PUBLIC_CHAR); 2349 return (sc_isalpha(c) || c == '_' || c == PUBLIC_CHAR);
2350} 2350}
2351 2351
2352/* alphanum 2352/* alphanum
@@ -2356,7 +2356,7 @@ alpha(char c)
2356int 2356int
2357alphanum(char c) 2357alphanum(char c)
2358{ 2358{
2359 return (alpha(c) || isdigit(c)); 2359 return (alpha(c) || sc_isdigit(c));
2360} 2360}
2361 2361
2362/* The local variable table must be searched backwards, so that the deepest 2362/* The local variable table must be searched backwards, so that the deepest
@@ -2476,7 +2476,7 @@ delete_symbols(symbol * root, int level, int delete_labels,
2476 /* for user defined operators, also remove the "prototyped" flag, as 2476 /* for user defined operators, also remove the "prototyped" flag, as
2477 * user-defined operators *must* be declared before use 2477 * user-defined operators *must* be declared before use
2478 */ 2478 */
2479 if (sym->ident == iFUNCTN && !isalpha(*sym->name) 2479 if (sym->ident == iFUNCTN && !sc_isalpha(*sym->name)
2480 && *sym->name != '_' && *sym->name != PUBLIC_CHAR) 2480 && *sym->name != '_' && *sym->name != PUBLIC_CHAR)
2481 sym->usage &= ~uPROTOTYPED; 2481 sym->usage &= ~uPROTOTYPED;
2482 root = sym; /* skip the symbol */ 2482 root = sym; /* skip the symbol */
diff --git a/legacy/embryo/src/bin/embryo_cc_sc6.c b/legacy/embryo/src/bin/embryo_cc_sc6.c
index 417a8a1193..3525d27da5 100644
--- a/legacy/embryo/src/bin/embryo_cc_sc6.c
+++ b/legacy/embryo/src/bin/embryo_cc_sc6.c
@@ -134,7 +134,7 @@ align32(long *v)
134static char * 134static char *
135skipwhitespace(char *str) 135skipwhitespace(char *str)
136{ 136{
137 while (isspace(*str)) 137 while (sc_isspace(*str))
138 str++; 138 str++;
139 return str; 139 return str;
140} 140}
@@ -272,7 +272,7 @@ do_dump(FILE * fbin, char *params, cell opcode __UNUSED__)
272 if (fbin) 272 if (fbin)
273 write_encoded(fbin, &p, 1); 273 write_encoded(fbin, &p, 1);
274 num++; 274 num++;
275 while (isspace(*params)) 275 while (sc_isspace(*params))
276 params++; 276 params++;
277 } /* while */ 277 } /* while */
278 return num * sizeof(cell); 278 return num * sizeof(cell);
@@ -286,7 +286,7 @@ do_call(FILE * fbin, char *params, cell opcode)
286 symbol *sym; 286 symbol *sym;
287 ucell p; 287 ucell p;
288 288
289 for (i = 0; !isspace(*params); i++, params++) 289 for (i = 0; !sc_isspace(*params); i++, params++)
290 { 290 {
291 assert(*params != '\0'); 291 assert(*params != '\0');
292 assert(i < sNAMEMAX); 292 assert(i < sNAMEMAX);
@@ -339,10 +339,10 @@ do_file(FILE * fbin, char *params, cell opcode)
339 p = hex2long(params, &params); 339 p = hex2long(params, &params);
340 340
341 /* remove leading and trailing white space from the filename */ 341 /* remove leading and trailing white space from the filename */
342 while (isspace(*params)) 342 while (sc_isspace(*params))
343 params++; 343 params++;
344 len = strlen(params); 344 len = strlen(params);
345 while (len > 0 && isspace(params[len - 1])) 345 while (len > 0 && sc_isspace(params[len - 1]))
346 len--; 346 len--;
347 params[len++] = '\0'; /* zero-terminate */ 347 params[len++] = '\0'; /* zero-terminate */
348 while (len % sizeof(cell) != 0) 348 while (len % sizeof(cell) != 0)
@@ -368,7 +368,7 @@ do_symbol(FILE * fbin, char *params, cell opcode)
368 int len; 368 int len;
369 unsigned char mclass, type; 369 unsigned char mclass, type;
370 370
371 for (endptr = params; !isspace(*endptr) && endptr != '\0'; endptr++) 371 for (endptr = params; !sc_isspace(*endptr) && endptr != '\0'; endptr++)
372 /* nothing */ ; 372 /* nothing */ ;
373 assert(*endptr == ' '); 373 assert(*endptr == ' ');
374 374
@@ -1003,7 +1003,7 @@ assemble(FILE * fout, FILE * fin)
1003 /* get to the end of the instruction (make use of the '\n' that fgets() 1003 /* get to the end of the instruction (make use of the '\n' that fgets()
1004 * added at the end of the line; this way we will *always* drop on a 1004 * added at the end of the line; this way we will *always* drop on a
1005 * whitespace character) */ 1005 * whitespace character) */
1006 for (params = instr; *params != '\0' && !isspace(*params); 1006 for (params = instr; *params != '\0' && !sc_isspace(*params);
1007 params++) 1007 params++)
1008 /* nothing */ ; 1008 /* nothing */ ;
1009 assert(params > instr); 1009 assert(params > instr);
@@ -1039,7 +1039,7 @@ assemble(FILE * fout, FILE * fin)
1039 /* get to the end of the instruction (make use of the '\n' that fgets() 1039 /* get to the end of the instruction (make use of the '\n' that fgets()
1040 * added at the end of the line; this way we will *always* drop on a 1040 * added at the end of the line; this way we will *always* drop on a
1041 * whitespace character) */ 1041 * whitespace character) */
1042 for (params = instr; *params != '\0' && !isspace(*params); 1042 for (params = instr; *params != '\0' && !sc_isspace(*params);
1043 params++) 1043 params++)
1044 /* nothing */ ; 1044 /* nothing */ ;
1045 assert(params > instr); 1045 assert(params > instr);
diff --git a/legacy/embryo/src/bin/embryo_cc_sc7.c b/legacy/embryo/src/bin/embryo_cc_sc7.c
index 910c522585..b51f2ea9c4 100644
--- a/legacy/embryo/src/bin/embryo_cc_sc7.c
+++ b/legacy/embryo/src/bin/embryo_cc_sc7.c
@@ -471,7 +471,7 @@ matchsequence(char *start, char *end, char *pattern,
471 { 471 {
472 case '%': /* new "symbol" */ 472 case '%': /* new "symbol" */
473 pattern++; 473 pattern++;
474 assert(isdigit(*pattern)); 474 assert(sc_isdigit(*pattern));
475 var = atoi(pattern) - 1; 475 var = atoi(pattern) - 1;
476 assert(var >= 0 && var < _maxoptvars); 476 assert(var >= 0 && var < _maxoptvars);
477 assert(alphanum(*start)); 477 assert(alphanum(*start));
@@ -542,7 +542,7 @@ replacesequence(char *pattern, char symbols[_maxoptvars][_aliasmax + 1],
542 { 542 {
543 case '%': 543 case '%':
544 lptr++; /* skip '%' */ 544 lptr++; /* skip '%' */
545 assert(isdigit(*lptr)); 545 assert(sc_isdigit(*lptr));
546 var = atoi(lptr) - 1; 546 var = atoi(lptr) - 1;
547 assert(var >= 0 && var < _maxoptvars); 547 assert(var >= 0 && var < _maxoptvars);
548 assert(symbols[var][0] != '\0'); /* variable should be defined */ 548 assert(symbols[var][0] != '\0'); /* variable should be defined */
@@ -575,7 +575,7 @@ replacesequence(char *pattern, char symbols[_maxoptvars][_aliasmax + 1],
575 case '%': 575 case '%':
576 /* write out the symbol */ 576 /* write out the symbol */
577 pattern++; 577 pattern++;
578 assert(isdigit(*pattern)); 578 assert(sc_isdigit(*pattern));
579 var = atoi(pattern) - 1; 579 var = atoi(pattern) - 1;
580 assert(var >= 0 && var < _maxoptvars); 580 assert(var >= 0 && var < _maxoptvars);
581 assert(symbols[var][0] != '\0'); /* variable should be defined */ 581 assert(symbols[var][0] != '\0'); /* variable should be defined */