84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * Copyright 2010 Nexenta Systems, Inc. All rights reserved.
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * Copyright (c) 1992 Diomidis Spinellis.
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * Copyright (c) 1992, 1993
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * The Regents of the University of California. All rights reserved.
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * This code is derived from software contributed to Berkeley by
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * Diomidis Spinellis of Imperial College, University of London.
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * Redistribution and use in source and binary forms, with or without
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * modification, are permitted provided that the following conditions
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * 1. Redistributions of source code must retain the above copyright
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * notice, this list of conditions and the following disclaimer.
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * 2. Redistributions in binary form must reproduce the above copyright
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * notice, this list of conditions and the following disclaimer in the
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * documentation and/or other materials provided with the distribution.
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * 4. Neither the name of the University nor the names of its contributors
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * may be used to endorse or promote products derived from this software
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * without specific prior written permission.
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * SUCH DAMAGE.
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amorestatic char *compile_addr(char *, struct s_addr *);
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amorestatic char *compile_ccl(char **, char *);
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amorestatic char *compile_delimited(char *, char *, int);
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amorestatic char *compile_flags(char *, struct s_subst *);
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amorestatic char *compile_subst(char *, struct s_subst *);
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amorestatic char *compile_text(void);
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amorestatic char *compile_tr(char *, struct s_tr **);
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amorestatic char *duptoeol(char *, const char *);
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amorestatic void fixuplabel(struct s_command *, struct s_command *);
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amorestatic void uselabel(void);
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * Command specification. This is used to drive the command parser.
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore/* The compiled program. */
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * Compile the program into prog.
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * Initialise appends.
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore else if ((appends = malloc(sizeof (struct s_appends) * appendnum)) ==
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore if ((match = malloc((maxnsub + 1) * sizeof (regmatch_t))) == NULL)
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore while (*p && isspace((unsigned char)*p)) \
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amorestatic struct s_command **
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore static char lbuf[_POSIX2_LINE_MAX + 1]; /* To save stack */
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore if ((p = cu_fgets(lbuf, sizeof (lbuf), NULL)) == NULL) {
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore else if (*p == ';') {
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore if ((*link = cmd = malloc(sizeof (struct s_command))) == NULL)
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore /* First parse the addresses */
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore/* Valid characters to start an address */
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore#define addrchar(c) (strchr("0123456789/\\$", (c)))
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore if ((cmd->a1 = malloc(sizeof (struct s_addr))) == NULL)
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore if (*p == ',') {
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore if ((cmd->a2 = malloc(sizeof (struct s_addr)))
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore fatal(_("command %c expects up to %d address(es), "
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * Short-circuit command processing, since end of
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * group is really just a noop.
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore /*FALLTHROUGH*/
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore case EMPTY: /* d D g G h H l n N p P q x = \0 */
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore if (*p == ';') {
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore fatal(_("extra characters at the end of %c "
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore if (*p != '\\')
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore "at the end of %c command"),
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore if (*p == '\0')
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore O_WRONLY|O_APPEND|O_CREAT|O_TRUNC, 0666)) == -1)
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore if (*p == '\0')
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore if (*p == '\0')
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore "be delimited by newline or backslash"));
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore if ((cmd->u.s = calloc(1, sizeof (struct s_subst))) ==
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore fatal(_("unterminated substitute pattern"));
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore /* Compile RE with no case sensitivity temporarily */
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore /* Recompile RE with case sens. from "I" flag if any */
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore cmd->u.s->re = compile_re(re, cmd->u.s->icase);
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore if (*p == ';') {
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore if (*p == ';') {
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore "transform command"));
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * Get a delimited string. P points to the delimeter of the string; d points
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * to a buffer area. Newline and delimiter escapes are processed; other
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * escapes are ignored.
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * Returns a pointer to the first character after the final delimiter or NULL
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * in the case of a non-terminated string. The character array d is filled
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * with the processed string.
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amorecompile_delimited(char *p, char *d, int is_tr)
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore if (c == '\0')
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore else if (c == '\\')
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore fatal(_("\\ can not be used as a string delimiter"));
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore else if (c == '\n')
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore fatal(_("newline can not be used as a string delimiter"));
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore if (*p == '[' && *p != c) {
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore } else if (*p == c) {
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore return (p + 1);
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore/* compile_ccl: expand a POSIX character class */
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore if (*s == '^')
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore if (*s == ']')
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore for (; *s && (*t = *s) != ']'; s++, t++)
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore if (*s == '[' &&
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore ((d = *(s+1)) == '.' || d == ':' || d == '=')) {
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore *++t = *++s, t++, s++;
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore for (c = *s; (*t = *s) != ']' || c != d; s++, t++)
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore if ((c = *s) == '\0')
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore return ((*s == ']') ? *sp = ++s, ++t : NULL);
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * Compiles the regular expression in RE and returns a pointer to the compiled
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * regular expression.
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * Cflags are passed to regcomp.
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore if ((rep = malloc(sizeof (regex_t))) == NULL)
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore fatal(_("RE error: %s"), strregerror(eval, rep));
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * Compile the substitution string of a regular expression and set res to
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * point to a saved copy of it. Nsub is the number of parenthesized regular
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * expressions.
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore c = *p++; /* Terminator character */
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore if (c == '\0')
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore for (; *p; p++) {
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * If this is a continuation from the last
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * buffer, we won't have a character to
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore if (*p == '\0') {
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * This escaped character is continued
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * in the next part of the line. Note
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * this fact, then cause the loop to
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * exit w/ normal EOL case and reenter
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * above with the new buffer.
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore } else if (strchr("123456789", *p) != NULL) {
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore "the RE: \\%c"), *p);
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore } else if (*p == c) {
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore } else if (*p == '\n') {
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore "substitute pattern"));
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore /* NOTREACHED */
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore } while (cu_fgets(p = lbuf, sizeof (lbuf), &more));
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore fatal(_("unterminated substitute in regular expression"));
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * Compile the flags of the s command
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore switch (*p) {
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore "'g' in substitute flags"));
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore "'g' in substitute flags"));
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore fatal(_("overflow in the 'N' substitute flag"));
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore if (*p != ' ') {
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore if (*p == '\n')
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore O_WRONLY|O_APPEND|O_CREAT|O_TRUNC, 0666)) == -1)
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore fatal(_("bad flag in substitute command: '%c'"), *p);
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * Compile a translation set of strings into a lookup table.
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore if ((*py = y = malloc(sizeof (*y))) == NULL)
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore fatal(_("transform pattern can not be delimited by "
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore "newline or backslash"));
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore fatal(_("unterminated transform source string"));
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore fatal(_("unterminated transform target string"));
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore fatal(_("transform strings are not the same length"));
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * The single-byte encoding case is easy: generate a
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * lookup table.
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore for (i = 0; i <= UCHAR_MAX; i++)
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore y->bytetab[i] = (char)i;
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * Multi-byte encoding case: generate a lookup table as
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * above, but only for single-byte characters. The first
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * bytes of multi-byte characters have their lookup table
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * entries set to 0, which causes do_tr() to search through
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * an auxiliary vector of multi-byte mappings.
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore for (i = 0; i <= UCHAR_MAX; i++)
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore y->bytetab[i] = (btowc(i) != WEOF) ? (uchar_t)i : 0;
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore if (oclen == (size_t)-1 || oclen == (size_t)-2)
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore if (nclen == (size_t)-1 || nclen == (size_t)-2)
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore (void) memcpy(y->multis[i].from, op, oclen);
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * Compile the text following an a or i command.
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore while (cu_fgets(lbuf, sizeof (lbuf), NULL)) {
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore if (*p == '\\' && p[1] != '\0' && *++p == '\n')
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * Get an address and return a pointer to the first character after
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * it. Fill the structure pointed to according to the address.
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore switch (*p) {
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore /* FALLTHROUGH */
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore fatal(_("unterminated regular expression"));
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore /* Check for case insensitive regexp flag */
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore if (*p == 'I') {
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore return (p + 1);
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore /* FALLTHROUGH */
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore /* Line number */
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore case '0': case '1': case '2': case '3': case '4':
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore case '5': case '6': case '7': case '8': case '9':
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * duptoeol --
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * Return a copy of all the characters up to \n or \0.
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore for (start = s; *s != '\0' && *s != '\n'; ++s)
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore warnx(_("%lu: %s: whitespace after %s"), linenum, fname, ctype);
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * Convert goto label names to addresses, and count a and r commands, in
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * the given subset of the script. Free the memory used by labels in b
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * and t commands (but not by :).
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * TODO: Remove } nodes
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amorefixuplabel(struct s_command *cp, struct s_command *end)
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore /* Resolve branch target. */
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore /* Do interior commands. */
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * Associate the given command label for later lookup.
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore for (h = 0, p = (uchar_t *)cp->t; (c = *p) != 0; p++)
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore h = (h << 5) + h + c;
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore for (lh = *lhp; lh != NULL; lh = lh->lh_next)
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore if (lh->lh_hash == h && strcmp(cp->t, lh->lh_cmd->t) == 0)
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * Find the label contained in the command l in the command linked
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * list cp. L is excluded from the search. Return NULL if not found.
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amorestatic struct s_command *
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore for (h = 0, p = (uchar_t *)name; (c = *p) != 0; p++)
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore h = (h << 5) + h + c;
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore for (lh = labels[h & LHMASK]; lh != NULL; lh = lh->lh_next) {
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore if (lh->lh_hash == h && strcmp(name, lh->lh_cmd->t) == 0) {
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * Warn about any unused labels. As a side effect, release the label hash
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore * table space.
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore for (i = 0; i < LHSZ; i++) {
84441f85b19f6b8080883f30109e58e43c893709Garrett D'Amore for (lh = labels[i]; lh != NULL; lh = next) {