* by '[', sENDREORDER by ']' and sEXPRSTART by '|' the following applies:
* '[]...' valid, but useless; no output
* '[|...] valid, but useless; only one string
- * '[|...|...] valid and usefull
+ * '[|...|...] valid and useful
* '[...|...] invalid, first string doesn't start with '|'
* '[|...|] invalid
*/
* Scraps code from the staging buffer by resetting "stgidx" to "index".
*
* Global references: stgidx (altered)
- * staging (reffered to only)
+ * staging (referred to only)
*/
void
stgdel(int index, cell code_index)
len =
strexpand(str, (unsigned char *)sequences_cmp[i].find, sizeof str,
SCPACK_TABLE);
- assert(len <= sizeof str);
- assert(len == (int)strlen(str) + 1);
+ assert(len <= (int)(sizeof(str)));
+ assert(len == (int)(strlen(str) + 1));
sequences[i].find = (char *)malloc(len);
if (sequences[i].find)
strcpy(sequences[i].find, str);
len =
strexpand(str, (unsigned char *)sequences_cmp[i].replace, sizeof str,
SCPACK_TABLE);
- assert(len <= sizeof str);
- assert(len == (int)strlen(str) + 1);
+ assert(len <= (int)(sizeof(str)));
+ assert(len == (int)(strlen(str) + 1));
sequences[i].replace = (char *)malloc(len);
if (sequences[i].replace)
strcpy(sequences[i].replace, str);
{
case '%': /* new "symbol" */
pattern++;
- assert(isdigit(*pattern));
+ assert(sc_isdigit(*pattern));
var = atoi(pattern) - 1;
assert(var >= 0 && var < _maxoptvars);
assert(alphanum(*start));
* that the same symbol may occur multiple times in the pattern) plus
* line endings and startings ('\t' to start a line and '\n\0' to end one)
*/
- assert(!!repl_length);
+ assert(repl_length != NULL);
*repl_length = 0;
lptr = pattern;
while (*lptr)
{
case '%':
lptr++; /* skip '%' */
- assert(isdigit(*lptr));
+ assert(sc_isdigit(*lptr));
var = atoi(lptr) - 1;
assert(var >= 0 && var < _maxoptvars);
assert(symbols[var][0] != '\0'); /* variable should be defined */
case '%':
/* write out the symbol */
pattern++;
- assert(isdigit(*pattern));
+ assert(sc_isdigit(*pattern));
var = atoi(pattern) - 1;
assert(var >= 0 && var < _maxoptvars);
assert(symbols[var][0] != '\0'); /* variable should be defined */
char symbols[_maxoptvars][_aliasmax + 1];
int seq, match_length, repl_length;
- assert(!!sequences);
+ assert(sequences != NULL);
while (start < end)
{
if ((sc_debug & sNOOPTIMIZE) != 0 || sc_status != statWRITE)
seq++;
} /* if */
} /* while */
- assert(!sequences[seq].find);
+ assert(sequences[seq].find == NULL);
filewrite(start);
} /* if */
assert(start < end);