Transformation Rules Applied to File:GetInput.java

Showing full text of file after each rule

Rules AppliedJavaKeywordRule app0.txt PPspaceRule PPifndefRule PPRule PPdefineRule.DefineReplacementRule MissingFunctionTypeRule snippets0b.txt CommaInForRule OneDeclarationPerLineRule ArrayDeclaration0Rule AddBracesRule LabelRemoverRule ConflictingVariableDeclarationRule StaticFunctionsRule CharToShortRule MultipleAssignmentRule snippets0e.txt readline.lsnippet ArrayDeclarationRule StringRule stringfunctions.txt DeclarationAssignmentRule invalidStatement2.txt BooleanFunctionRule ForceToBooleanRule ForceToBoolean2Rule strings2.txt snippets2.txt snippets2a.txt snippets3.txt ElseIfRule PrintfRule stdin.txt IOExceptionRule UninitializedVariableRule InsertClassRule ImportRule (Final Version)
JavaKeywordRule
app0.txt
PPspaceRule
PPifndefRule
PPRule
PPdefineRule.DefineReplacementRule
MissingFunctionTypeRule
snippets0b.txt
CommaInForRule
OneDeclarationPerLineRule
ArrayDeclaration0Rule
AddBracesRule
LabelRemoverRule
ConflictingVariableDeclarationRule
StaticFunctionsRule
CharToShortRule
MultipleAssignmentRule
snippets0e.txt
readline.lsnippet
ArrayDeclarationRule
StringRule
stringfunctions.txt
DeclarationAssignmentRule
invalidStatement2.txt
BooleanFunctionRule
ForceToBooleanRule
ForceToBoolean2Rule
strings2.txt
snippets2.txt
snippets2a.txt
snippets3.txt
ElseIfRule
PrintfRule
stdin.txt
IOExceptionRule
UninitializedVariableRule
InsertClassRule
ImportRule
final
#ifndef lint
static char sccsid[] = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
#endif
# include	
# include	
# define	reg	register
# define	LINE	70
static char buf[257];
getinp(char * prompt, char * * list) {
    regint i,
     n_match,
     match;
    char * sp;
    int plen;
    for (;;) {
        inter:for (;;) {
            printf(prompt);
            for (sp = buf;( * sp = getchar()) != '\n';) if ( * sp == - 1) continue;
            else if (sp != buf || * sp != ' ') sp++;
            break;
        }
        if (buf[0] == '?' && buf[1] == '\n') {
            printf("Valid inputs are: ");
            for (i = 0, match = 18;list[i];i++) {
                if ((match += (n_match = strlen(list[i]))) > LINE) {
                    printf("\n\t");
                    match = n_match + 8;
                }
                if ( * list[i] == '\0') {
                    match += 8;
                    printf("");
                }
                else printf(list[i]);
                if (list[i + 1]) printf(", ");
                else putchar('\n');
                match += 2;
            }
            continue;
        }
         * sp = '\0';
        for (sp = buf; * sp;sp++) if (isupper( * sp)) * sp = tolower( * sp);
        for (i = n_match = 0;list[i];i++) if (comp(list[i])) {
            n_match++;
            match = i;
        }
        if (n_match == 1) return match;
        else if (buf[0] != '\0') printf("Illegal response: \"%s\".  Use '?' to get list of valid answers\n", buf);
    }
}
static comp(char * s1) {
    regchar * sp,
     * tsp,
     c;
    if (buf[0] != '\0') for (sp = buf, tsp = s1; * sp;) {
        c = isupper( * tsp) ? tolower( * tsp):* tsp;
        tsp++;
        if (c != * sp++) return 0;
    }
    else if ( * s1 != '\0') return 0;
    return 1;
}
#ifndef lint
static char sccsid[] = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
#endif
# include	
# include	
# define	reg	register
# define	LINE	70
static char buf[257];
getinp(char * prompt, char * * printHoldings) {
    regint i,
     n_match,
     match;
    char * sp;
    int plen;
    for (;;) {
        inter:for (;;) {
            printf(prompt);
            for (sp = buf;( * sp = getchar()) != '\n';) if ( * sp == - 1) continue;
            else if (sp != buf || * sp != ' ') sp++;
            break;
        }
        if (buf[0] == '?' && buf[1] == '\n') {
            printf("Valid inputs are: ");
            for (i = 0, match = 18;printHoldings[i];i++) {
                if ((match += (n_match = strlen(printHoldings[i]))) > MAX_CHARS_PER_LINE) {
                    printf("\n\t");
                    match = n_match + 8;
                }
                if ( * printHoldings[i] == '\0') {
                    match += 8;
                    printf("");
                }
                else printf(printHoldings[i]);
                if (printHoldings[i + 1]) printf(", ");
                else putchar('\n');
                match += 2;
            }
            continue;
        }
         * sp = '\0';
        for (sp = buf; * sp;sp++) if (isupper( * sp)) * sp = tolower( * sp);
        for (i = n_match = 0;printHoldings[i];i++) if (compareToBuf(printHoldings[i])) {
            n_match++;
            match = i;
        }
        if (n_match == 1) return match;
        else if (buf[0] != '\0') printf("Illegal response: \"%s\".  Use '?' to get list of valid answers\n", buf);
    }
}
static compareToBuf(char * s1) {
    regchar * sp,
     * tsp,
     c;
    if (buf[0] != '\0') for (sp = buf, tsp = s1; * sp;) {
        c = isupper( * tsp) ? tolower( * tsp):* tsp;
        tsp++;
        if (c != * sp++) return 0;
    }
    else if ( * s1 != '\0') return 0;
    return 1;
}
#ifndef lint
static char sccsid[] = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
#endif
#include	
#include	
#define	reg	register
#define	LINE	70
static char buf[257];
getinp(char * prompt, char * * printHoldings) {
    regint i,
     n_match,
     match;
    char * sp;
    int plen;
    for (;;) {
        inter:for (;;) {
            printf(prompt);
            for (sp = buf;( * sp = getchar()) != '\n';) if ( * sp == - 1) continue;
            else if (sp != buf || * sp != ' ') sp++;
            break;
        }
        if (buf[0] == '?' && buf[1] == '\n') {
            printf("Valid inputs are: ");
            for (i = 0, match = 18;printHoldings[i];i++) {
                if ((match += (n_match = strlen(printHoldings[i]))) > MAX_CHARS_PER_LINE) {
                    printf("\n\t");
                    match = n_match + 8;
                }
                if ( * printHoldings[i] == '\0') {
                    match += 8;
                    printf("");
                }
                else printf(printHoldings[i]);
                if (printHoldings[i + 1]) printf(", ");
                else putchar('\n');
                match += 2;
            }
            continue;
        }
         * sp = '\0';
        for (sp = buf; * sp;sp++) if (isupper( * sp)) * sp = tolower( * sp);
        for (i = n_match = 0;printHoldings[i];i++) if (compareToBuf(printHoldings[i])) {
            n_match++;
            match = i;
        }
        if (n_match == 1) return match;
        else if (buf[0] != '\0') printf("Illegal response: \"%s\".  Use '?' to get list of valid answers\n", buf);
    }
}
static compareToBuf(char * s1) {
    regchar * sp,
     * tsp,
     c;
    if (buf[0] != '\0') for (sp = buf, tsp = s1; * sp;) {
        c = isupper( * tsp) ? tolower( * tsp):* tsp;
        tsp++;
        if (c != * sp++) return 0;
    }
    else if ( * s1 != '\0') return 0;
    return 1;
}
#if !defined(lint)
static char sccsid[] = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
#endif
#include	
#include	
#define	reg	register
#define	LINE	70
static char buf[257];
getinp(char * prompt, char * * printHoldings) {
    regint i,
     n_match,
     match;
    char * sp;
    int plen;
    for (;;) {
        inter:for (;;) {
            printf(prompt);
            for (sp = buf;( * sp = getchar()) != '\n';) if ( * sp == - 1) continue;
            else if (sp != buf || * sp != ' ') sp++;
            break;
        }
        if (buf[0] == '?' && buf[1] == '\n') {
            printf("Valid inputs are: ");
            for (i = 0, match = 18;printHoldings[i];i++) {
                if ((match += (n_match = strlen(printHoldings[i]))) > MAX_CHARS_PER_LINE) {
                    printf("\n\t");
                    match = n_match + 8;
                }
                if ( * printHoldings[i] == '\0') {
                    match += 8;
                    printf("");
                }
                else printf(printHoldings[i]);
                if (printHoldings[i + 1]) printf(", ");
                else putchar('\n');
                match += 2;
            }
            continue;
        }
         * sp = '\0';
        for (sp = buf; * sp;sp++) if (isupper( * sp)) * sp = tolower( * sp);
        for (i = n_match = 0;printHoldings[i];i++) if (compareToBuf(printHoldings[i])) {
            n_match++;
            match = i;
        }
        if (n_match == 1) return match;
        else if (buf[0] != '\0') printf("Illegal response: \"%s\".  Use '?' to get list of valid answers\n", buf);
    }
}
static compareToBuf(char * s1) {
    regchar * sp,
     * tsp,
     c;
    if (buf[0] != '\0') for (sp = buf, tsp = s1; * sp;) {
        c = isupper( * tsp) ? tolower( * tsp):* tsp;
        tsp++;
        if (c != * sp++) return 0;
    }
    else if ( * s1 != '\0') return 0;
    return 1;
}
static char sccsid[] = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
public final static int LINE = 70;
static char buf[257];
getinp(char * prompt, char * * printHoldings) {
    regint i,
     n_match,
     match;
    char * sp;
    int plen;
    for (;;) {
        inter:for (;;) {
            printf(prompt);
            for (sp = buf;( * sp = getchar()) != '\n';) if ( * sp == - 1) continue;
            else if (sp != buf || * sp != ' ') sp++;
            break;
        }
        if (buf[0] == '?' && buf[1] == '\n') {
            printf("Valid inputs are: ");
            for (i = 0, match = 18;printHoldings[i];i++) {
                if ((match += (n_match = strlen(printHoldings[i]))) > MAX_CHARS_PER_LINE) {
                    printf("\n\t");
                    match = n_match + 8;
                }
                if ( * printHoldings[i] == '\0') {
                    match += 8;
                    printf("");
                }
                else printf(printHoldings[i]);
                if (printHoldings[i + 1]) printf(", ");
                else putchar('\n');
                match += 2;
            }
            continue;
        }
         * sp = '\0';
        for (sp = buf; * sp;sp++) if (isupper( * sp)) * sp = tolower( * sp);
        for (i = n_match = 0;printHoldings[i];i++) if (compareToBuf(printHoldings[i])) {
            n_match++;
            match = i;
        }
        if (n_match == 1) return match;
        else if (buf[0] != '\0') printf("Illegal response: \"%s\".  Use '?' to get list of valid answers\n", buf);
    }
}
static compareToBuf(char * s1) {
    regchar * sp,
     * tsp,
     c;
    if (buf[0] != '\0') for (sp = buf, tsp = s1; * sp;) {
        c = isupper( * tsp) ? tolower( * tsp):* tsp;
        tsp++;
        if (c != * sp++) return 0;
    }
    else if ( * s1 != '\0') return 0;
    return 1;
}
static char sccsid[] = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
public final static int LINE = 70;
static char buf[257];
getinp(char * prompt, char * * printHoldings) {
    register int i,
     n_match,
     match;
    char * sp;
    int plen;
    for (;;) {
        inter:for (;;) {
            printf(prompt);
            for (sp = buf;( * sp = getchar()) != '\n';) if ( * sp == - 1) continue;
            else if (sp != buf || * sp != ' ') sp++;
            break;
        }
        if (buf[0] == '?' && buf[1] == '\n') {
            printf("Valid inputs are: ");
            for (i = 0, match = 18;printHoldings[i];i++) {
                if ((match += (n_match = strlen(printHoldings[i]))) > MAX_CHARS_PER_LINE) {
                    printf("\n\t");
                    match = n_match + 8;
                }
                if ( * printHoldings[i] == '\0') {
                    match += 8;
                    printf("");
                }
                else printf(printHoldings[i]);
                if (printHoldings[i + 1]) printf(", ");
                else putchar('\n');
                match += 2;
            }
            continue;
        }
         * sp = '\0';
        for (sp = buf; * sp;sp++) if (isupper( * sp)) * sp = tolower( * sp);
        for (i = n_match = 0;printHoldings[i];i++) if (compareToBuf(printHoldings[i])) {
            n_match++;
            match = i;
        }
        if (n_match == 1) return match;
        else if (buf[0] != '\0') printf("Illegal response: \"%s\".  Use '?' to get list of valid answers\n", buf);
    }
}
static compareToBuf(char * s1) {
    register char * sp,
     * tsp,
     c;
    if (buf[0] != '\0') for (sp = buf, tsp = s1; * sp;) {
        c = isupper( * tsp) ? tolower( * tsp):* tsp;
        tsp++;
        if (c != * sp++) return 0;
    }
    else if ( * s1 != '\0') return 0;
    return 1;
}
static char sccsid[] = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
public final static int LINE = 70;
static char buf[257];
int getinp(char * prompt, char * * printHoldings) {
    register int i,
     n_match,
     match;
    char * sp;
    int plen;
    for (;;) {
        inter:for (;;) {
            printf(prompt);
            for (sp = buf;( * sp = getchar()) != '\n';) if ( * sp == - 1) continue;
            else if (sp != buf || * sp != ' ') sp++;
            break;
        }
        if (buf[0] == '?' && buf[1] == '\n') {
            printf("Valid inputs are: ");
            for (i = 0, match = 18;printHoldings[i];i++) {
                if ((match += (n_match = strlen(printHoldings[i]))) > MAX_CHARS_PER_LINE) {
                    printf("\n\t");
                    match = n_match + 8;
                }
                if ( * printHoldings[i] == '\0') {
                    match += 8;
                    printf("");
                }
                else printf(printHoldings[i]);
                if (printHoldings[i + 1]) printf(", ");
                else putchar('\n');
                match += 2;
            }
            continue;
        }
         * sp = '\0';
        for (sp = buf; * sp;sp++) if (isupper( * sp)) * sp = tolower( * sp);
        for (i = n_match = 0;printHoldings[i];i++) if (compareToBuf(printHoldings[i])) {
            n_match++;
            match = i;
        }
        if (n_match == 1) return match;
        else if (buf[0] != '\0') printf("Illegal response: \"%s\".  Use '?' to get list of valid answers\n", buf);
    }
}
static int compareToBuf(char * s1) {
    register char * sp,
     * tsp,
     c;
    if (buf[0] != '\0') for (sp = buf, tsp = s1; * sp;) {
        c = isupper( * tsp) ? tolower( * tsp):* tsp;
        tsp++;
        if (c != * sp++) return 0;
    }
    else if ( * s1 != '\0') return 0;
    return 1;
}
static char sccsid[] = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
public final static int LINE = 70;
static char buf[257];
int getinp(char * prompt, char * * printHoldings) {
    int i,
     n_match,
     match;
    char * sp;
    int plen;
    while (true) {
        inter:while (true) {
            printf(prompt);
            for (sp = buf;( * sp = getchar()) != '\n';) if ( * sp == - 1) continue;
            else if (sp != buf || * sp != ' ') sp++;
            break;
        }
        if (buf[0] == '?' && buf[1] == '\n') {
            printf("Valid inputs are: ");
            for (i = 0, match = 18;printHoldings[i];i++) {
                if ((match += (n_match = strlen(printHoldings[i]))) > MAX_CHARS_PER_LINE) {
                    printf("\n\t");
                    match = n_match + 8;
                }
                if ( * printHoldings[i] == '\0') {
                    match += 8;
                    printf("");
                }
                else printf(printHoldings[i]);
                if (printHoldings[i + 1]) printf(", ");
                else putchar('\n');
                match += 2;
            }
            continue;
        }
         * sp = '\0';
        for (sp = buf; * sp;sp++) if (isupper( * sp)) * sp = tolower( * sp);
        for (i = n_match = 0;printHoldings[i];i++) if (compareToBuf(printHoldings[i])) {
            n_match++;
            match = i;
        }
        if (n_match == 1) return match;
        else if (buf[0] != '\0') printf("Illegal response: \"%s\".  Use '?' to get list of valid answers\n", buf);
    }
}
static int compareToBuf(char * s1) {
    char * sp,
     * tsp,
     c;
    if (buf[0] != '\0') for (sp = buf, tsp = s1; * sp;) {
        c = isupper( * tsp) ? tolower( * tsp):* tsp;
        tsp++;
        if (c != * sp++) return 0;
    }
    else if ( * s1 != '\0') return 0;
    return 1;
}
static char sccsid[] = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
public final static int LINE = 70;
static char buf[257];
int getinp(char * prompt, char * * printHoldings) {
    int i,
     n_match,
     match;
    char * sp;
    int plen;
    while (true) {
        inter:while (true) {
            printf(prompt);
            for (sp = buf;( * sp = getchar()) != '\n';) if ( * sp == - 1) continue;
            else if (sp != buf || * sp != ' ') sp++;
            break;
        }
        if (buf[0] == '?' && buf[1] == '\n') {
            printf("Valid inputs are: ");
            i = 0;
            for (match = 18;printHoldings[i];i++) {
                if ((match += (n_match = strlen(printHoldings[i]))) > MAX_CHARS_PER_LINE) {
                    printf("\n\t");
                    match = n_match + 8;
                }
                if ( * printHoldings[i] == '\0') {
                    match += 8;
                    printf("");
                }
                else printf(printHoldings[i]);
                if (printHoldings[i + 1]) printf(", ");
                else putchar('\n');
                match += 2;
            }
            continue;
        }
         * sp = '\0';
        for (sp = buf; * sp;sp++) if (isupper( * sp)) * sp = tolower( * sp);
        for (i = n_match = 0;printHoldings[i];i++) if (compareToBuf(printHoldings[i])) {
            n_match++;
            match = i;
        }
        if (n_match == 1) return match;
        else if (buf[0] != '\0') printf("Illegal response: \"%s\".  Use '?' to get list of valid answers\n", buf);
    }
}
static int compareToBuf(char * s1) {
    char * sp,
     * tsp,
     c;
    if (buf[0] != '\0') for (sp = buf, tsp = s1; * sp;) {
        c = isupper( * tsp) ? tolower( * tsp):* tsp;
        tsp++;
        if (c != * sp++) return 0;
    }
    else if ( * s1 != '\0') return 0;
    return 1;
}
static char sccsid[] = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
public final static int LINE = 70;
static char buf[257];
int getinp(char * prompt, char * * printHoldings) {
    int i;
    int n_match;
    int match;
    char * sp;
    int plen;
    while (true) {
        inter:while (true) {
            printf(prompt);
            for (sp = buf;( * sp = getchar()) != '\n';) if ( * sp == - 1) continue;
            else if (sp != buf || * sp != ' ') sp++;
            break;
        }
        if (buf[0] == '?' && buf[1] == '\n') {
            printf("Valid inputs are: ");
            i = 0;
            for (match = 18;printHoldings[i];i++) {
                if ((match += (n_match = strlen(printHoldings[i]))) > MAX_CHARS_PER_LINE) {
                    printf("\n\t");
                    match = n_match + 8;
                }
                if ( * printHoldings[i] == '\0') {
                    match += 8;
                    printf("");
                }
                else printf(printHoldings[i]);
                if (printHoldings[i + 1]) printf(", ");
                else putchar('\n');
                match += 2;
            }
            continue;
        }
         * sp = '\0';
        for (sp = buf; * sp;sp++) if (isupper( * sp)) * sp = tolower( * sp);
        for (i = n_match = 0;printHoldings[i];i++) if (compareToBuf(printHoldings[i])) {
            n_match++;
            match = i;
        }
        if (n_match == 1) return match;
        else if (buf[0] != '\0') printf("Illegal response: \"%s\".  Use '?' to get list of valid answers\n", buf);
    }
}
static int compareToBuf(char * s1) {
    char * sp;
    char * tsp;
    char c;
    if (buf[0] != '\0') for (sp = buf, tsp = s1; * sp;) {
        c = isupper( * tsp) ? tolower( * tsp):* tsp;
        tsp++;
        if (c != * sp++) return 0;
    }
    else if ( * s1 != '\0') return 0;
    return 1;
}
static char[] sccsid = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
public final static int LINE = 70;
static char[257] buf;
int getinp(char * prompt, char * * printHoldings) {
    int i;
    int n_match;
    int match;
    char * sp;
    int plen;
    while (true) {
        inter:while (true) {
            printf(prompt);
            for (sp = buf;( * sp = getchar()) != '\n';) if ( * sp == - 1) continue;
            else if (sp != buf || * sp != ' ') sp++;
            break;
        }
        if (buf[0] == '?' && buf[1] == '\n') {
            printf("Valid inputs are: ");
            i = 0;
            for (match = 18;printHoldings[i];i++) {
                if ((match += (n_match = strlen(printHoldings[i]))) > MAX_CHARS_PER_LINE) {
                    printf("\n\t");
                    match = n_match + 8;
                }
                if ( * printHoldings[i] == '\0') {
                    match += 8;
                    printf("");
                }
                else printf(printHoldings[i]);
                if (printHoldings[i + 1]) printf(", ");
                else putchar('\n');
                match += 2;
            }
            continue;
        }
         * sp = '\0';
        for (sp = buf; * sp;sp++) if (isupper( * sp)) * sp = tolower( * sp);
        for (i = n_match = 0;printHoldings[i];i++) if (compareToBuf(printHoldings[i])) {
            n_match++;
            match = i;
        }
        if (n_match == 1) return match;
        else if (buf[0] != '\0') printf("Illegal response: \"%s\".  Use '?' to get list of valid answers\n", buf);
    }
}
static int compareToBuf(char * s1) {
    char * sp;
    char * tsp;
    char c;
    if (buf[0] != '\0') for (sp = buf, tsp = s1; * sp;) {
        c = isupper( * tsp) ? tolower( * tsp):* tsp;
        tsp++;
        if (c != * sp++) return 0;
    }
    else if ( * s1 != '\0') return 0;
    return 1;
}
static char[] sccsid = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
public final static int LINE = 70;
static char[257] buf;
int getinp(char * prompt, char * * printHoldings) {
    int i;
    int n_match;
    int match;
    char * sp;
    int plen;
    while (true) {
        inter:while (true) {
            printf(prompt);
            for (sp = buf;( * sp = getchar()) != '\n';) {
                if ( * sp == - 1) {
                    continue;
                }
                else {
                    if (sp != buf || * sp != ' ') {
                        sp++;
                    }
                }
            }
            break;
        }
        if (buf[0] == '?' && buf[1] == '\n') {
            printf("Valid inputs are: ");
            i = 0;
            for (match = 18;printHoldings[i];i++) {
                if ((match += (n_match = strlen(printHoldings[i]))) > MAX_CHARS_PER_LINE) {
                    printf("\n\t");
                    match = n_match + 8;
                }
                if ( * printHoldings[i] == '\0') {
                    match += 8;
                    printf("");
                }
                else {
                    printf(printHoldings[i]);
                }
                if (printHoldings[i + 1]) {
                    printf(", ");
                }
                else {
                    putchar('\n');
                }
                match += 2;
            }
            continue;
        }
         * sp = '\0';
        for (sp = buf; * sp;sp++) {
            if (isupper( * sp)) {
                 * sp = tolower( * sp);
            }
        }
        for (i = n_match = 0;printHoldings[i];i++) {
            if (compareToBuf(printHoldings[i])) {
                n_match++;
                match = i;
            }
        }
        if (n_match == 1) {
            return match;
        }
        else {
            if (buf[0] != '\0') {
                printf("Illegal response: \"%s\".  Use '?' to get list of valid answers\n", buf);
            }
        }
    }
}
static int compareToBuf(char * s1) {
    char * sp;
    char * tsp;
    char c;
    if (buf[0] != '\0') {
        for (sp = buf, tsp = s1; * sp;) {
            c = isupper( * tsp) ? tolower( * tsp):* tsp;
            tsp++;
            if (c != * sp++) {
                return 0;
            }
        }
    }
    else {
        if ( * s1 != '\0') {
            return 0;
        }
    }
    return 1;
}
static char[] sccsid = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
public final static int LINE = 70;
static char[257] buf;
int getinp(char * prompt, char * * printHoldings) {
    int i;
    int n_match;
    int match;
    char * sp;
    int plen;
    while (true) {
        while (true) {
            printf(prompt);
            for (sp = buf;( * sp = getchar()) != '\n';) {
                if ( * sp == - 1) {
                    continue;
                }
                else {
                    if (sp != buf || * sp != ' ') {
                        sp++;
                    }
                }
            }
            break;
        }
        if (buf[0] == '?' && buf[1] == '\n') {
            printf("Valid inputs are: ");
            i = 0;
            for (match = 18;printHoldings[i];i++) {
                if ((match += (n_match = strlen(printHoldings[i]))) > MAX_CHARS_PER_LINE) {
                    printf("\n\t");
                    match = n_match + 8;
                }
                if ( * printHoldings[i] == '\0') {
                    match += 8;
                    printf("");
                }
                else {
                    printf(printHoldings[i]);
                }
                if (printHoldings[i + 1]) {
                    printf(", ");
                }
                else {
                    putchar('\n');
                }
                match += 2;
            }
            continue;
        }
         * sp = '\0';
        for (sp = buf; * sp;sp++) {
            if (isupper( * sp)) {
                 * sp = tolower( * sp);
            }
        }
        for (i = n_match = 0;printHoldings[i];i++) {
            if (compareToBuf(printHoldings[i])) {
                n_match++;
                match = i;
            }
        }
        if (n_match == 1) {
            return match;
        }
        else {
            if (buf[0] != '\0') {
                printf("Illegal response: \"%s\".  Use '?' to get list of valid answers\n", buf);
            }
        }
    }
}
static int compareToBuf(char * s1) {
    char * sp;
    char * tsp;
    char c;
    if (buf[0] != '\0') {
        for (sp = buf, tsp = s1; * sp;) {
            c = isupper( * tsp) ? tolower( * tsp):* tsp;
            tsp++;
            if (c != * sp++) {
                return 0;
            }
        }
    }
    else {
        if ( * s1 != '\0') {
            return 0;
        }
    }
    return 1;
}
static char[] sccsid = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
public final static int LINE = 70;
static char[257] buf;
int getinp(char * prompt, char * * printHoldings1) {
    int i;
    int n_match;
    int match;
    char * sp;
    int plen;
    while (true) {
        while (true) {
            printf(prompt);
            for (sp = buf;( * sp = getchar()) != '\n';) {
                if ( * sp == - 1) {
                    continue;
                }
                else {
                    if (sp != buf || * sp != ' ') {
                        sp++;
                    }
                }
            }
            break;
        }
        if (buf[0] == '?' && buf[1] == '\n') {
            printf("Valid inputs are: ");
            i = 0;
            for (match = 18;printHoldings1[i];i++) {
                if ((match += (n_match = strlen(printHoldings1[i]))) > MAX_CHARS_PER_LINE) {
                    printf("\n\t");
                    match = n_match + 8;
                }
                if ( * printHoldings1[i] == '\0') {
                    match += 8;
                    printf("");
                }
                else {
                    printf(printHoldings1[i]);
                }
                if (printHoldings1[i + 1]) {
                    printf(", ");
                }
                else {
                    putchar('\n');
                }
                match += 2;
            }
            continue;
        }
         * sp = '\0';
        for (sp = buf; * sp;sp++) {
            if (isupper( * sp)) {
                 * sp = tolower( * sp);
            }
        }
        for (i = n_match = 0;printHoldings1[i];i++) {
            if (compareToBuf(printHoldings1[i])) {
                n_match++;
                match = i;
            }
        }
        if (n_match == 1) {
            return match;
        }
        else {
            if (buf[0] != '\0') {
                printf("Illegal response: \"%s\".  Use '?' to get list of valid answers\n", buf);
            }
        }
    }
}
static int compareToBuf(char * s1) {
    char * sp;
    char * tsp;
    char c;
    if (buf[0] != '\0') {
        for (sp = buf, tsp = s1; * sp;) {
            c = isupper( * tsp) ? tolower( * tsp):* tsp;
            tsp++;
            if (c != * sp++) {
                return 0;
            }
        }
    }
    else {
        if ( * s1 != '\0') {
            return 0;
        }
    }
    return 1;
}
static char[] sccsid = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
public final static int LINE = 70;
static char[257] buf;
static int getinp(char * prompt, char * * printHoldings1) {
    int i;
    int n_match;
    int match;
    char * sp;
    int plen;
    while (true) {
        while (true) {
            printf(prompt);
            for (sp = buf;( * sp = getchar()) != '\n';) {
                if ( * sp == - 1) {
                    continue;
                }
                else {
                    if (sp != buf || * sp != ' ') {
                        sp++;
                    }
                }
            }
            break;
        }
        if (buf[0] == '?' && buf[1] == '\n') {
            printf("Valid inputs are: ");
            i = 0;
            for (match = 18;printHoldings1[i];i++) {
                if ((match += (n_match = strlen(printHoldings1[i]))) > MAX_CHARS_PER_LINE) {
                    printf("\n\t");
                    match = n_match + 8;
                }
                if ( * printHoldings1[i] == '\0') {
                    match += 8;
                    printf("");
                }
                else {
                    printf(printHoldings1[i]);
                }
                if (printHoldings1[i + 1]) {
                    printf(", ");
                }
                else {
                    putchar('\n');
                }
                match += 2;
            }
            continue;
        }
         * sp = '\0';
        for (sp = buf; * sp;sp++) {
            if (isupper( * sp)) {
                 * sp = tolower( * sp);
            }
        }
        for (i = n_match = 0;printHoldings1[i];i++) {
            if (compareToBuf(printHoldings1[i])) {
                n_match++;
                match = i;
            }
        }
        if (n_match == 1) {
            return match;
        }
        else {
            if (buf[0] != '\0') {
                printf("Illegal response: \"%s\".  Use '?' to get list of valid answers\n", buf);
            }
        }
    }
}
static int compareToBuf(char * s1) {
    char * sp;
    char * tsp;
    char c;
    if (buf[0] != '\0') {
        for (sp = buf, tsp = s1; * sp;) {
            c = isupper( * tsp) ? tolower( * tsp):* tsp;
            tsp++;
            if (c != * sp++) {
                return 0;
            }
        }
    }
    else {
        if ( * s1 != '\0') {
            return 0;
        }
    }
    return 1;
}
static char[] sccsid = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
public final static int LINE = 70;
static char[257] buf;
static int getinp(char * prompt, char * * printHoldings1) {
    int i;
    int n_match;
    int match;
    char * sp;
    int plen;
    while (true) {
        while (true) {
            printf(prompt);
            for (sp = buf;( * sp = getchar()) != '\n';) {
                if ( * sp == - 1) {
                    continue;
                }
                else {
                    if (sp != buf || * sp != ' ') {
                        sp++;
                    }
                }
            }
            break;
        }
        if (buf[0] == '?' && buf[1] == '\n') {
            printf("Valid inputs are: ");
            i = 0;
            for (match = 18;printHoldings1[i];i++) {
                if ((match += (n_match = strlen(printHoldings1[i]))) > MAX_CHARS_PER_LINE) {
                    printf("\n\t");
                    match = n_match + 8;
                }
                if ( * printHoldings1[i] == '\0') {
                    match += 8;
                    printf("");
                }
                else {
                    printf(printHoldings1[i]);
                }
                if (printHoldings1[i + 1]) {
                    printf(", ");
                }
                else {
                    putchar('\n');
                }
                match += 2;
            }
            continue;
        }
         * sp = '\0';
        for (sp = buf; * sp;sp++) {
            if (isupper( * sp)) {
                 * sp = tolower( * sp);
            }
        }
        for (i = n_match = 0;printHoldings1[i];i++) {
            if (compareToBuf(printHoldings1[i])) {
                n_match++;
                match = i;
            }
        }
        if (n_match == 1) {
            return match;
        }
        else {
            if (buf[0] != '\0') {
                printf("Illegal response: \"%s\".  Use '?' to get list of valid answers\n", buf);
            }
        }
    }
}
static int compareToBuf(char * s1) {
    char * sp;
    char * tsp;
    int c;
    if (buf[0] != '\0') {
        for (sp = buf, tsp = s1; * sp;) {
            c = isupper( * tsp) ? tolower( * tsp):* tsp;
            tsp++;
            if (c != * sp++) {
                return 0;
            }
        }
    }
    else {
        if ( * s1 != '\0') {
            return 0;
        }
    }
    return 1;
}
static char[] sccsid = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
public final static int LINE = 70;
static char[257] buf;
static int getinp(char * prompt, char * * printHoldings1) {
    int i;
    int n_match;
    int match;
    char * sp;
    int plen;
    while (true) {
        while (true) {
            printf(prompt);
            for (sp = buf;( * sp = getchar()) != '\n';) {
                if ( * sp == - 1) {
                    continue;
                }
                else {
                    if (sp != buf || * sp != ' ') {
                        sp++;
                    }
                }
            }
            break;
        }
        if (buf[0] == '?' && buf[1] == '\n') {
            printf("Valid inputs are: ");
            i = 0;
            for (match = 18;printHoldings1[i];i++) {
                if ((match += (n_match = strlen(printHoldings1[i]))) > MAX_CHARS_PER_LINE) {
                    printf("\n\t");
                    match = n_match + 8;
                }
                if ( * printHoldings1[i] == '\0') {
                    match += 8;
                    printf("");
                }
                else {
                    printf(printHoldings1[i]);
                }
                if (printHoldings1[i + 1]) {
                    printf(", ");
                }
                else {
                    putchar('\n');
                }
                match += 2;
            }
            continue;
        }
         * sp = '\0';
        for (sp = buf; * sp;sp++) {
            if (isupper( * sp)) {
                 * sp = tolower( * sp);
            }
        }
        n_match = 0;
        for (i = n_match;printHoldings1[i];i++) {
            if (compareToBuf(printHoldings1[i])) {
                n_match++;
                match = i;
            }
        }
        if (n_match == 1) {
            return match;
        }
        else {
            if (buf[0] != '\0') {
                printf("Illegal response: \"%s\".  Use '?' to get list of valid answers\n", buf);
            }
        }
    }
}
static int compareToBuf(char * s1) {
    char * sp;
    char * tsp;
    int c;
    if (buf[0] != '\0') {
        for (sp = buf, tsp = s1; * sp;) {
            c = isupper( * tsp) ? tolower( * tsp):* tsp;
            tsp++;
            if (c != * sp++) {
                return 0;
            }
        }
    }
    else {
        if ( * s1 != '\0') {
            return 0;
        }
    }
    return 1;
}
static char[] sccsid = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
public final static int LINE = 70;
static char[257] buf;
static int getinp(char * prompt, char * * printHoldings1) {
    int i;
    int n_match;
    int match;
    char * sp;
    int plen;
    while (true) {
        while (true) {
            printf(prompt);
            for (sp = buf;( * sp = getchar()) != '\n';) {
                if ( * sp == - 1) {
                    continue;
                }
                else {
                    if (sp != buf || * sp != ' ') {
                        sp++;
                    }
                }
            }
            break;
        }
        if (buf[0] == '?' && buf[1] == '\n') {
            printf("Valid inputs are: ");
            i = 0;
            for (match = 18;printHoldings1[i];i++) {
                if ((match += (n_match = strlen(printHoldings1[i]))) > MAX_CHARS_PER_LINE) {
                    printf("\n\t");
                    match = n_match + 8;
                }
                if ( * printHoldings1[i] == '\0') {
                    match += 8;
                    printf("");
                }
                else {
                    printf(printHoldings1[i]);
                }
                if (printHoldings1[i + 1]) {
                    printf(", ");
                }
                else {
                    putchar('\n');
                }
                match += 2;
            }
            continue;
        }
         * sp = '\0';
        buf = buf.toLowerCase();
        n_match = 0;
        for (i = n_match;printHoldings1[i];i++) {
            if (compareToBuf(printHoldings1[i])) {
                n_match++;
                match = i;
            }
        }
        if (n_match == 1) {
            return match;
        }
        else {
            if (buf[0] != '\0') {
                printf("Illegal response: \"%s\".  Use '?' to get list of valid answers\n", buf);
            }
        }
    }
}
static int compareToBuf(char * s1) {
    char * sp;
    char * tsp;
    int c;
    if (buf[0] != '\0') {
        for (sp = buf, tsp = s1; * sp;) {
            c = isupper( * tsp) ? tolower( * tsp):* tsp;
            tsp++;
            if (c != * sp++) {
                return 0;
            }
        }
    }
    else {
        if ( * s1 != '\0') {
            return 0;
        }
    }
    return 1;
}
static char[] sccsid = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
public final static int LINE = 70;
static char[257] buf;
static int getinp(char * prompt, char * * printHoldings1) {
    int i;
    int n_match;
    int match;
    char * sp;
    int plen;
    while (true) {
        while (true) {
            printf(prompt);
            buf = stdin.readLine() + '\n';
            break;
        }
        if (buf[0] == '?' && buf[1] == '\n') {
            printf("Valid inputs are: ");
            i = 0;
            for (match = 18;printHoldings1[i];i++) {
                if ((match += (n_match = strlen(printHoldings1[i]))) > MAX_CHARS_PER_LINE) {
                    printf("\n\t");
                    match = n_match + 8;
                }
                if ( * printHoldings1[i] == '\0') {
                    match += 8;
                    printf("");
                }
                else {
                    printf(printHoldings1[i]);
                }
                if (printHoldings1[i + 1]) {
                    printf(", ");
                }
                else {
                    putchar('\n');
                }
                match += 2;
            }
            continue;
        }
         * sp = '\0';
        buf = buf.toLowerCase();
        n_match = 0;
        for (i = n_match;printHoldings1[i];i++) {
            if (compareToBuf(printHoldings1[i])) {
                n_match++;
                match = i;
            }
        }
        if (n_match == 1) {
            return match;
        }
        else {
            if (buf[0] != '\0') {
                printf("Illegal response: \"%s\".  Use '?' to get list of valid answers\n", buf);
            }
        }
    }
}
static int compareToBuf(char * s1) {
    char * sp;
    char * tsp;
    int c;
    if (buf[0] != '\0') {
        for (sp = buf, tsp = s1; * sp;) {
            c = isupper( * tsp) ? tolower( * tsp):* tsp;
            tsp++;
            if (c != * sp++) {
                return 0;
            }
        }
    }
    else {
        if ( * s1 != '\0') {
            return 0;
        }
    }
    return 1;
}
static char[] sccsid = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
public final static int LINE = 70;
static char[] buf = new char[257];
static int getinp(char * prompt, char * * printHoldings1) {
    int i;
    int n_match;
    int match;
    char * sp;
    int plen;
    while (true) {
        while (true) {
            printf(prompt);
            buf = stdin.readLine() + '\n';
            break;
        }
        if (buf[0] == '?' && buf[1] == '\n') {
            printf("Valid inputs are: ");
            i = 0;
            for (match = 18;printHoldings1[i];i++) {
                if ((match += (n_match = strlen(printHoldings1[i]))) > MAX_CHARS_PER_LINE) {
                    printf("\n\t");
                    match = n_match + 8;
                }
                if ( * printHoldings1[i] == '\0') {
                    match += 8;
                    printf("");
                }
                else {
                    printf(printHoldings1[i]);
                }
                if (printHoldings1[i + 1]) {
                    printf(", ");
                }
                else {
                    putchar('\n');
                }
                match += 2;
            }
            continue;
        }
         * sp = '\0';
        buf = buf.toLowerCase();
        n_match = 0;
        for (i = n_match;printHoldings1[i];i++) {
            if (compareToBuf(printHoldings1[i])) {
                n_match++;
                match = i;
            }
        }
        if (n_match == 1) {
            return match;
        }
        else {
            if (buf[0] != '\0') {
                printf("Illegal response: \"%s\".  Use '?' to get list of valid answers\n", buf);
            }
        }
    }
}
static int compareToBuf(char * s1) {
    char * sp;
    char * tsp;
    int c;
    if (buf[0] != '\0') {
        for (sp = buf, tsp = s1; * sp;) {
            c = isupper( * tsp) ? tolower( * tsp):* tsp;
            tsp++;
            if (c != * sp++) {
                return 0;
            }
        }
    }
    else {
        if ( * s1 != '\0') {
            return 0;
        }
    }
    return 1;
}
static String sccsid = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
public final static int LINE = 70;
static String buf = new String();
static int getinp(String prompt, String[] printHoldings1) {
    int i;
    int n_match;
    int match;
    String sp;
    int plen;
    while (true) {
        while (true) {
            printf(prompt);
            buf = stdin.readLine() + '\n';
            break;
        }
        if (buf.charAt(0) == '?' && buf.charAt(1) == '\n') {
            printf("Valid inputs are: ");
            i = 0;
            for (match = 18;printHoldings1[i];i++) {
                if ((match += (n_match = strlen(printHoldings1[i]))) > MAX_CHARS_PER_LINE) {
                    printf("\n\t");
                    match = n_match + 8;
                }
                if (printHoldings1[i].length() == 0) {
                    match += 8;
                    printf("");
                }
                else {
                    printf(printHoldings1[i]);
                }
                if (printHoldings1[i + 1]) {
                    printf(", ");
                }
                else {
                    putchar('\n');
                }
                match += 2;
            }
            continue;
        }
        sp = "";
        buf = buf.toLowerCase();
        n_match = 0;
        for (i = n_match;printHoldings1[i];i++) {
            if (compareToBuf(printHoldings1[i])) {
                n_match++;
                match = i;
            }
        }
        if (n_match == 1) {
            return match;
        }
        else {
            if (buf.charAt(0) != '\0') {
                printf("Illegal response: \"%s\".  Use '?' to get list of valid answers\n", buf);
            }
        }
    }
}
static int compareToBuf(String s1) {
    String sp;
    String tsp;
    int c;
    if (buf.charAt(0) != '\0') {
        for (sp = buf, tsp = s1;sp.charAt(0);) {
            c = isupper(tsp.charAt(0)) ? tolower(tsp.charAt(0)):tsp.charAt(0);
            tsp = tsp.substring(1);
            if (c != (sp = sp.substring(1)).charAt(0)) {
                return 0;
            }
        }
    }
    else {
        if (s1.charAt(0) != '\0') {
            return 0;
        }
    }
    return 1;
}
static String sccsid = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
public final static int LINE = 70;
static String buf = new String();
static int getinp(String prompt, String[] printHoldings1) {
    int i;
    int n_match;
    int match;
    String sp;
    int plen;
    while (true) {
        while (true) {
            printf(prompt);
            buf = stdin.readLine() + '\n';
            break;
        }
        if (buf.charAt(0) == '?' && buf.charAt(1) == '\n') {
            printf("Valid inputs are: ");
            i = 0;
            for (match = 18;printHoldings1[i];i++) {
                if ((match += (n_match = printHoldings1[i].length())) > MAX_CHARS_PER_LINE) {
                    printf("\n\t");
                    match = n_match + 8;
                }
                if (printHoldings1[i].length() == 0) {
                    match += 8;
                    printf("");
                }
                else {
                    printf(printHoldings1[i]);
                }
                if (printHoldings1[i + 1]) {
                    printf(", ");
                }
                else {
                    putchar('\n');
                }
                match += 2;
            }
            continue;
        }
        sp = "";
        buf = buf.toLowerCase();
        n_match = 0;
        for (i = n_match;printHoldings1[i];i++) {
            if (compareToBuf(printHoldings1[i])) {
                n_match++;
                match = i;
            }
        }
        if (n_match == 1) {
            return match;
        }
        else {
            if (buf.charAt(0) != '\0') {
                printf("Illegal response: \"%s\".  Use '?' to get list of valid answers\n", buf);
            }
        }
    }
}
static int compareToBuf(String s1) {
    String sp;
    String tsp;
    int c;
    if (buf.charAt(0) != '\0') {
        for (sp = buf, tsp = s1;sp.charAt(0);) {
            c = Character.isUpperCase(tsp.charAt(0)) ? Character.toLowerCase(tsp.charAt(0)):tsp.charAt(0);
            tsp = tsp.substring(1);
            if (c != (sp = sp.substring(1)).charAt(0)) {
                return 0;
            }
        }
    }
    else {
        if (s1.charAt(0) != '\0') {
            return 0;
        }
    }
    return 1;
}
static String sccsid;
sccsid = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
public final static int LINE;
LINE = 70;
static String buf;
buf = new String();
static int getinp(String prompt, String[] printHoldings1) {
    int i;
    int n_match;
    int match;
    String sp;
    int plen;
    while (true) {
        while (true) {
            printf(prompt);
            buf = stdin.readLine() + '\n';
            break;
        }
        if (buf.charAt(0) == '?' && buf.charAt(1) == '\n') {
            printf("Valid inputs are: ");
            i = 0;
            for (match = 18;printHoldings1[i];i++) {
                if ((match += (n_match = printHoldings1[i].length())) > MAX_CHARS_PER_LINE) {
                    printf("\n\t");
                    match = n_match + 8;
                }
                if (printHoldings1[i].length() == 0) {
                    match += 8;
                    printf("");
                }
                else {
                    printf(printHoldings1[i]);
                }
                if (printHoldings1[i + 1]) {
                    printf(", ");
                }
                else {
                    putchar('\n');
                }
                match += 2;
            }
            continue;
        }
        sp = "";
        buf = buf.toLowerCase();
        n_match = 0;
        for (i = n_match;printHoldings1[i];i++) {
            if (compareToBuf(printHoldings1[i])) {
                n_match++;
                match = i;
            }
        }
        if (n_match == 1) {
            return match;
        }
        else {
            if (buf.charAt(0) != '\0') {
                printf("Illegal response: \"%s\".  Use '?' to get list of valid answers\n", buf);
            }
        }
    }
}
static int compareToBuf(String s1) {
    String sp;
    String tsp;
    int c;
    if (buf.charAt(0) != '\0') {
        for (sp = buf, tsp = s1;sp.charAt(0);) {
            c = Character.isUpperCase(tsp.charAt(0)) ? Character.toLowerCase(tsp.charAt(0)):tsp.charAt(0);
            tsp = tsp.substring(1);
            if (c != (sp = sp.substring(1)).charAt(0)) {
                return 0;
            }
        }
    }
    else {
        if (s1.charAt(0) != '\0') {
            return 0;
        }
    }
    return 1;
}
static String sccsid;
sccsid = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
public final static int LINE;
LINE = 70;
static String buf;
buf = new String();
static int getinp(String prompt, String[] printHoldings1) {
    int i;
    int n_match;
    int match;
    String sp;
    int plen;
    while (true) {
        while (true) {
            printf(prompt);
            buf = stdin.readLine() + '\n';
            break;
        }
        if (buf.charAt(0) == '?' && buf.charAt(1) == '\n') {
            printf("Valid inputs are: ");
            i = 0;
            for (match = 18;i;i++) {
                if ((match += (n_match = printHoldings1[i].length())) > MAX_CHARS_PER_LINE) {
                    printf("\n\t");
                    match = n_match + 8;
                }
                if (printHoldings1[i].length() == 0) {
                    match += 8;
                    printf("");
                }
                else {
                    printf(printHoldings1[i]);
                }
                if (printHoldings1[i + 1]) {
                    printf(", ");
                }
                else {
                    putchar('\n');
                }
                match += 2;
            }
            continue;
        }
        sp = "";
        buf = buf.toLowerCase();
        n_match = 0;
        for (i = n_match;i;i++) {
            if (compareToBuf(printHoldings1[i])) {
                n_match++;
                match = i;
            }
        }
        if (n_match == 1) {
            return match;
        }
        else {
            if (buf.charAt(0) != '\0') {
                printf("Illegal response: \"%s\".  Use '?' to get list of valid answers\n", buf);
            }
        }
    }
}
static int compareToBuf(String s1) {
    String sp;
    String tsp;
    int c;
    if (buf.charAt(0) != '\0') {
        for (sp = buf, tsp = s1;sp.charAt(0);) {
            c = Character.isUpperCase(tsp.charAt(0)) ? Character.toLowerCase(tsp.charAt(0)):tsp.charAt(0);
            tsp = tsp.substring(1);
            if (c != (sp = sp.substring(1)).charAt(0)) {
                return 0;
            }
        }
    }
    else {
        if (s1.charAt(0) != '\0') {
            return 0;
        }
    }
    return 1;
}
static String sccsid;
sccsid = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
public final static int LINE;
LINE = 70;
static String buf;
buf = new String();
static int getinp(String prompt, String[] printHoldings1) {
    int i;
    int n_match;
    int match;
    String sp;
    int plen;
    while (true) {
        while (true) {
            printf(prompt);
            buf = stdin.readLine() + '\n';
            break;
        }
        if (buf.charAt(0) == '?' && buf.charAt(1) == '\n') {
            printf("Valid inputs are: ");
            i = 0;
            for (match = 18;i;i++) {
                if ((match += (n_match = printHoldings1[i].length())) > MAX_CHARS_PER_LINE) {
                    printf("\n\t");
                    match = n_match + 8;
                }
                if (printHoldings1[i].length() == 0) {
                    match += 8;
                    printf("");
                }
                else {
                    printf(printHoldings1[i]);
                }
                if (printHoldings1[i + 1]) {
                    printf(", ");
                }
                else {
                    putchar('\n');
                }
                match += 2;
            }
            continue;
        }
        sp = "";
        buf = buf.toLowerCase();
        n_match = 0;
        for (i = n_match;i;i++) {
            if (compareToBuf(printHoldings1[i])) {
                n_match++;
                match = i;
            }
        }
        if (n_match == 1) {
            return match;
        }
        else {
            if (buf.charAt(0) != '\0') {
                printf("Illegal response: \"%s\".  Use '?' to get list of valid answers\n", buf);
            }
        }
    }
}
static boolean compareToBuf(String s1) {
    String sp;
    String tsp;
    int c;
    if (buf.charAt(0) != '\0') {
        for (sp = buf, tsp = s1;sp.charAt(0);) {
            c = Character.isUpperCase(tsp.charAt(0)) ? Character.toLowerCase(tsp.charAt(0)):tsp.charAt(0);
            tsp = tsp.substring(1);
            if (c != (sp = sp.substring(1)).charAt(0)) {
                return false;
            }
        }
    }
    else {
        if (s1.charAt(0) != '\0') {
            return false;
        }
    }
    return true;
}
static String sccsid;
sccsid = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
public final static int LINE;
LINE = 70;
static String buf;
buf = new String();
static int getinp(String prompt, String[] printHoldings1) {
    int i;
    int n_match;
    int match;
    String sp;
    int plen;
    while (true) {
        while (true) {
            printf(prompt);
            buf = stdin.readLine() + '\n';
            break;
        }
        if (buf.charAt(0) == '?' && buf.charAt(1) == '\n') {
            printf("Valid inputs are: ");
            i = 0;
            for (match = 18;i != 0;i++) {
                if ((match += (n_match = printHoldings1[i].length())) > MAX_CHARS_PER_LINE) {
                    printf("\n\t");
                    match = n_match + 8;
                }
                if (printHoldings1[i].length() == 0) {
                    match += 8;
                    printf("");
                }
                else {
                    printf(printHoldings1[i]);
                }
                if (printHoldings1[i + 1] != null) {
                    printf(", ");
                }
                else {
                    putchar('\n');
                }
                match += 2;
            }
            continue;
        }
        sp = "";
        buf = buf.toLowerCase();
        n_match = 0;
        for (i = n_match;i != 0;i++) {
            if (compareToBuf(printHoldings1[i])) {
                n_match++;
                match = i;
            }
        }
        if (n_match == 1) {
            return match;
        }
        else {
            if (buf.charAt(0) != '\0') {
                printf("Illegal response: \"%s\".  Use '?' to get list of valid answers\n", buf);
            }
        }
    }
}
static boolean compareToBuf(String s1) {
    String sp;
    String tsp;
    int c;
    if (buf.charAt(0) != '\0') {
        for (sp = buf, tsp = s1;sp.charAt(0) != 0;) {
            c = Character.isUpperCase(tsp.charAt(0)) ? Character.toLowerCase(tsp.charAt(0)):tsp.charAt(0);
            tsp = tsp.substring(1);
            if (c != (sp = sp.substring(1)).charAt(0)) {
                return false;
            }
        }
    }
    else {
        if (s1.charAt(0) != '\0') {
            return false;
        }
    }
    return true;
}
static String sccsid;
sccsid = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
public final static int LINE;
LINE = 70;
static String buf;
buf = new String();
static int getinp(String prompt, String[] printHoldings1) {
    int i;
    int n_match;
    int match;
    String sp;
    int plen;
    while (true) {
        while (true) {
            printf(prompt);
            buf = stdin.readLine() + '\n';
            break;
        }
        if (buf.charAt(0) == '?' && buf.charAt(1) == '\n') {
            printf("Valid inputs are: ");
            i = 0;
            for (match = 18;i != 0;i++) {
                if ((match += (n_match = printHoldings1[i].length())) > MAX_CHARS_PER_LINE) {
                    printf("\n\t");
                    match = n_match + 8;
                }
                if (printHoldings1[i].length() == 0) {
                    match += 8;
                    printf("");
                }
                else {
                    printf(printHoldings1[i]);
                }
                if (printHoldings1[i + 1] != null) {
                    printf(", ");
                }
                else {
                    putchar('\n');
                }
                match += 2;
            }
            continue;
        }
        sp = "";
        buf = buf.toLowerCase();
        n_match = 0;
        for (i = n_match;i != 0;i++) {
            if (compareToBuf(printHoldings1[i])) {
                n_match++;
                match = i;
            }
        }
        if (n_match == 1) {
            return match;
        }
        else {
            if (buf.charAt(0) != '\0') {
                printf("Illegal response: \"%s\".  Use '?' to get list of valid answers\n", buf);
            }
        }
    }
}
static boolean compareToBuf(String s1) {
    String sp;
    String tsp;
    int c;
    if (buf.charAt(0) != '\0') {
        for (sp = buf, tsp = s1;sp.charAt(0) != 0;) {
            c = Character.isUpperCase(tsp.charAt(0)) ? Character.toLowerCase(tsp.charAt(0)):tsp.charAt(0);
            tsp = tsp.substring(1);
            if (c != (sp = sp.substring(1)).charAt(0)) {
                return false;
            }
        }
    }
    else {
        if (s1.charAt(0) != '\0') {
            return false;
        }
    }
    return true;
}
static String sccsid;
sccsid = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
public final static int LINE;
LINE = 70;
static String buf;
buf = new String();
static int getinp(String prompt, String[] printHoldings1) {
    int i;
    int n_match;
    int match;
    String sp;
    int plen;
    while (true) {
        while (true) {
            printf(prompt);
            buf = stdin.readLine() + '\n';
            break;
        }
        if (buf.charAt(0) == '?' && buf.charAt(1) == '\n') {
            printf("Valid inputs are: ");
            i = 0;
            for (match = 18;i != 0;i++) {
                if ((match += (n_match = printHoldings1[i].length())) > MAX_CHARS_PER_LINE) {
                    printf("\n\t");
                    match = n_match + 8;
                }
                if (printHoldings1[i].length() == 0) {
                    match += 8;
                    printf("");
                }
                else {
                    printf(printHoldings1[i]);
                }
                if (printHoldings1[i + 1] != null) {
                    printf(", ");
                }
                else {
                    putchar('\n');
                }
                match += 2;
            }
            continue;
        }
        sp = "";
        buf = buf.toLowerCase();
        n_match = 0;
        for (i = n_match;i != 0;i++) {
            if (compareToBuf(printHoldings1[i])) {
                n_match++;
                match = i;
            }
        }
        if (n_match == 1) {
            return match;
        }
        else {
            if (buf.charAt(0) != '\0') {
                printf("Illegal response: \"%s\".  Use '?' to get list of valid answers\n", buf);
            }
        }
    }
}
static boolean compareToBuf(String s1) {
    String sp;
    String tsp;
    int c;
    if (buf.charAt(0) != '\0') {
        for (sp = buf, tsp = s1;sp.length() != 0;) {
            c = Character.isUpperCase(tsp.charAt(0)) ? Character.toLowerCase(tsp.charAt(0)):tsp.charAt(0);
            tsp = tsp.substring(1);
            if (c != (sp = sp.substring(1)).charAt(0)) {
                return false;
            }
        }
    }
    else {
        if (s1.charAt(0) != '\0') {
            return false;
        }
    }
    return true;
}
static String sccsid;
sccsid = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
public final static int LINE;
LINE = 70;
static String buf;
buf = new String();
static int getinp(String prompt, String[] printHoldings1) {
    int i;
    int n_match;
    int match;
    String sp;
    int plen;
    while (true) {
        while (true) {
            fprintf(stdout, prompt);
            buf = stdin.readLine() + '\n';
            break;
        }
        if (buf.charAt(0) == '?' && buf.charAt(1) == '\n') {
            fprintf(stdout, "Valid inputs are: ");
            i = 0;
            for (match = 18;i != 0;i++) {
                if ((match += (n_match = printHoldings1[i].length())) > MAX_CHARS_PER_LINE) {
                    fprintf(stdout, "\n\t");
                    match = n_match + 8;
                }
                if (printHoldings1[i].length() == 0) {
                    match += 8;
                    fprintf(stdout, "");
                }
                else {
                    fprintf(stdout, printHoldings1[i]);
                }
                if (printHoldings1[i + 1] != null) {
                    fprintf(stdout, ", ");
                }
                else {
                    stdout.write('\n');
                }
                match += 2;
            }
            continue;
        }
        sp = "";
        buf = buf.toLowerCase();
        n_match = 0;
        for (i = n_match;i != 0;i++) {
            if (compareToBuf(printHoldings1[i])) {
                n_match++;
                match = i;
            }
        }
        if (n_match == 1) {
            return match;
        }
        else {
            if (buf.charAt(0) != '\0') {
                fprintf(stdout, "Illegal response: \"%s\".  Use '?' to get list of valid answers\n", buf);
            }
        }
    }
}
static boolean compareToBuf(String s1) {
    String sp;
    String tsp;
    int c;
    if (buf.charAt(0) != '\0') {
        for (sp = buf, tsp = s1;sp.length() != 0;) {
            c = Character.isUpperCase(tsp.charAt(0)) ? Character.toLowerCase(tsp.charAt(0)):tsp.charAt(0);
            tsp = tsp.substring(1);
            if (c != (sp = sp.substring(1)).charAt(0)) {
                return false;
            }
        }
    }
    else {
        if (s1.charAt(0) != '\0') {
            return false;
        }
    }
    return true;
}
static String sccsid;
sccsid = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
public final static int LINE;
LINE = 70;
static String buf;
buf = new String();
static int getinp(String prompt, String[] printHoldings1) {
    int i;
    int n_match;
    int match;
    String sp;
    int plen;
    while (true) {
        while (true) {
            fprintf(stdout, prompt);
            buf = stdin.readLine() + '\n';
            break;
        }
        if (buf.charAt(0) == '?' && buf.charAt(1) == '\n') {
            fprintf(stdout, "Valid inputs are: ");
            i = 0;
            for (match = 18;i != 0;i++) {
                if ((match += (n_match = printHoldings1[i].length())) > MAX_CHARS_PER_LINE) {
                    fprintf(stdout, "\n\t");
                    match = n_match + 8;
                }
                if (printHoldings1[i].length() == 0) {
                    match += 8;
                    fprintf(stdout, "");
                }
                else {
                    fprintf(stdout, printHoldings1[i]);
                }
                if (printHoldings1[i + 1] != null) {
                    fprintf(stdout, ", ");
                }
                else {
                    stdout.newLine();
                }
                match += 2;
            }
            continue;
        }
        sp = "";
        buf = buf.toLowerCase();
        n_match = 0;
        for (i = n_match;i != 0;i++) {
            if (compareToBuf(printHoldings1[i])) {
                n_match++;
                match = i;
            }
        }
        if (n_match == 1) {
            return match;
        }
        else {
            if (buf.charAt(0) != '\0') {
                fprintf(stdout, "Illegal response: \"%s\".  Use '?' to get list of valid answers\n", buf);
            }
        }
    }
}
static boolean compareToBuf(String s1) {
    String sp;
    String tsp;
    int c;
    if (buf.charAt(0) != '\0') {
        for (sp = buf, tsp = s1;sp.length() != 0;) {
            c = Character.isUpperCase(tsp.charAt(0)) ? Character.toLowerCase(tsp.charAt(0)):tsp.charAt(0);
            tsp = tsp.substring(1);
            if (c != (sp = sp.substring(1)).charAt(0)) {
                return false;
            }
        }
    }
    else {
        if (s1.charAt(0) != '\0') {
            return false;
        }
    }
    return true;
}
static String sccsid = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
public final static int LINE = 70;
static String buf = new String();
static int getinp(String prompt, String[] printHoldings1) {
    int i;
    int n_match;
    int match;
    String sp;
    int plen;
    while (true) {
        while (true) {
            fprintf(stdout, prompt);
            buf = stdin.readLine() + '\n';
            break;
        }
        if (buf.charAt(0) == '?' && buf.charAt(1) == '\n') {
            fprintf(stdout, "Valid inputs are: ");
            i = 0;
            for (match = 18;i != 0;i++) {
                if ((match += (n_match = printHoldings1[i].length())) > MAX_CHARS_PER_LINE) {
                    fprintf(stdout, "\n\t");
                    match = n_match + 8;
                }
                if (printHoldings1[i].length() == 0) {
                    match += 8;
                    fprintf(stdout, "");
                }
                else {
                    fprintf(stdout, printHoldings1[i]);
                }
                if (printHoldings1[i + 1] != null) {
                    fprintf(stdout, ", ");
                }
                else {
                    stdout.newLine();
                }
                match += 2;
            }
            continue;
        }
        sp = "";
        buf = buf.toLowerCase();
        n_match = 0;
        for (i = n_match;i != 0;i++) {
            if (compareToBuf(printHoldings1[i])) {
                n_match++;
                match = i;
            }
        }
        if (n_match == 1) {
            return match;
        }
        else {
            if (buf.charAt(0) != '\0') {
                fprintf(stdout, "Illegal response: \"%s\".  Use '?' to get list of valid answers\n", buf);
            }
        }
    }
}
static boolean compareToBuf(String s1) {
    String sp;
    String tsp;
    int c;
    if (buf.charAt(0) != '\0') {
        for (sp = buf, tsp = s1;sp.length() != 0;) {
            c = Character.isUpperCase(tsp.charAt(0)) ? Character.toLowerCase(tsp.charAt(0)):tsp.charAt(0);
            tsp = tsp.substring(1);
            if (c != (sp = sp.substring(1)).charAt(0)) {
                return false;
            }
        }
    }
    else {
        if (s1.charAt(0) != '\0') {
            return false;
        }
    }
    return true;
}
static String sccsid = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
public final static int LINE = 70;
static String buf = new String();
static int getinp(String prompt, String[] printHoldings1) {
    int i;
    int n_match;
    int match;
    String sp;
    int plen;
    while (true) {
        while (true) {
            fprintf(stdout, prompt);
            buf = stdin.readLine() + '\n';
            break;
        }
        if (buf.charAt(0) == '?' && buf.charAt(1) == '\n') {
            fprintf(stdout, "Valid inputs are: ");
            i = 0;
            for (match = 18;i != 0;i++) {
                if ((match += (n_match = printHoldings1[i].length())) > MAX_CHARS_PER_LINE) {
                    fprintf(stdout, "\n\t");
                    match = n_match + 8;
                }
                if (printHoldings1[i].length() == 0) {
                    match += 8;
                    fprintf(stdout, "");
                }
                else {
                    fprintf(stdout, printHoldings1[i]);
                }
                if (printHoldings1[i + 1] != null) {
                    fprintf(stdout, ", ");
                }
                else {
                    stdout.newLine();
                }
                match += 2;
            }
            continue;
        }
        sp = "";
        buf = buf.toLowerCase();
        n_match = 0;
        for (i = n_match;i != 0;i++) {
            if (compareToBuf(printHoldings1[i])) {
                n_match++;
                match = i;
            }
        }
        if (n_match == 1) {
            return match;
        }
        else if (buf.charAt(0) != '\0') {
            fprintf(stdout, "Illegal response: \"%s\".  Use '?' to get list of valid answers\n", buf);
        }
    }
}
static boolean compareToBuf(String s1) {
    String sp;
    String tsp;
    int c;
    if (buf.charAt(0) != '\0') {
        for (sp = buf, tsp = s1;sp.length() != 0;) {
            c = Character.isUpperCase(tsp.charAt(0)) ? Character.toLowerCase(tsp.charAt(0)):tsp.charAt(0);
            tsp = tsp.substring(1);
            if (c != (sp = sp.substring(1)).charAt(0)) {
                return false;
            }
        }
    }
    else if (s1.charAt(0) != '\0') {
        return false;
    }
    return true;
}
static String sccsid = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
public final static int LINE = 70;
static String buf = new String();
static int getinp(String prompt, String[] printHoldings1) {
    int i;
    int n_match;
    int match;
    String sp;
    int plen;
    while (true) {
        while (true) {
            System.out.print(prompt);
            buf = stdin.readLine() + '\n';
            break;
        }
        if (buf.charAt(0) == '?' && buf.charAt(1) == '\n') {
            System.out.print("Valid inputs are: ");
            i = 0;
            for (match = 18;i != 0;i++) {
                if ((match += (n_match = printHoldings1[i].length())) > MAX_CHARS_PER_LINE) {
                    System.out.print("\n\t");
                    match = n_match + 8;
                }
                if (printHoldings1[i].length() == 0) {
                    match += 8;
                    System.out.print("");
                }
                else {
                    System.out.print(printHoldings1[i]);
                }
                if (printHoldings1[i + 1] != null) {
                    System.out.print(", ");
                }
                else {
                    stdout.newLine();
                }
                match += 2;
            }
            continue;
        }
        sp = "";
        buf = buf.toLowerCase();
        n_match = 0;
        for (i = n_match;i != 0;i++) {
            if (compareToBuf(printHoldings1[i])) {
                n_match++;
                match = i;
            }
        }
        if (n_match == 1) {
            return match;
        }
        else if (buf.charAt(0) != '\0') {
            System.out.println("Illegal response: \"" + buf + "\".  Use '?' to get list of valid answers");
        }
    }
}
static boolean compareToBuf(String s1) {
    String sp;
    String tsp;
    int c;
    if (buf.charAt(0) != '\0') {
        for (sp = buf, tsp = s1;sp.length() != 0;) {
            c = Character.isUpperCase(tsp.charAt(0)) ? Character.toLowerCase(tsp.charAt(0)):tsp.charAt(0);
            tsp = tsp.substring(1);
            if (c != (sp = sp.substring(1)).charAt(0)) {
                return false;
            }
        }
    }
    else if (s1.charAt(0) != '\0') {
        return false;
    }
    return true;
}
static String sccsid = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
public final static int LINE = 70;
static String buf = new String();
static int getinp(String prompt, String[] printHoldings1) {
    int i;
    int n_match;
    int match;
    String sp;
    int plen;
    while (true) {
        while (true) {
            System.out.print(prompt);
            buf = CIOUtils.stdin.readLine() + '\n';
            break;
        }
        if (buf.charAt(0) == '?' && buf.charAt(1) == '\n') {
            System.out.print("Valid inputs are: ");
            i = 0;
            for (match = 18;i != 0;i++) {
                if ((match += (n_match = printHoldings1[i].length())) > MAX_CHARS_PER_LINE) {
                    System.out.print("\n\t");
                    match = n_match + 8;
                }
                if (printHoldings1[i].length() == 0) {
                    match += 8;
                    System.out.print("");
                }
                else {
                    System.out.print(printHoldings1[i]);
                }
                if (printHoldings1[i + 1] != null) {
                    System.out.print(", ");
                }
                else {
                    System.out.println();
                }
                match += 2;
            }
            continue;
        }
        sp = "";
        buf = buf.toLowerCase();
        n_match = 0;
        for (i = n_match;i != 0;i++) {
            if (compareToBuf(printHoldings1[i])) {
                n_match++;
                match = i;
            }
        }
        if (n_match == 1) {
            return match;
        }
        else if (buf.charAt(0) != '\0') {
            System.out.println("Illegal response: \"" + buf + "\".  Use '?' to get list of valid answers");
        }
    }
}
static boolean compareToBuf(String s1) {
    String sp;
    String tsp;
    int c;
    if (buf.charAt(0) != '\0') {
        for (sp = buf, tsp = s1;sp.length() != 0;) {
            c = Character.isUpperCase(tsp.charAt(0)) ? Character.toLowerCase(tsp.charAt(0)):tsp.charAt(0);
            tsp = tsp.substring(1);
            if (c != (sp = sp.substring(1)).charAt(0)) {
                return false;
            }
        }
    }
    else if (s1.charAt(0) != '\0') {
        return false;
    }
    return true;
}
static String sccsid = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
public final static int LINE = 70;
static String buf = new String();
static int getinp(String prompt, String[] printHoldings1) {
    int i;
    int n_match;
    int match;
    String sp;
    int plen;
    while (true) {
        while (true) {
            System.out.print(prompt);
            try {
                buf = CIOUtils.stdin.readLine() + '\n';
            }
            catch (IOException e) {
                System.err.println("IO Exception:" + e);
            }
            break;
        }
        if (buf.charAt(0) == '?' && buf.charAt(1) == '\n') {
            System.out.print("Valid inputs are: ");
            i = 0;
            for (match = 18;i != 0;i++) {
                if ((match += (n_match = printHoldings1[i].length())) > MAX_CHARS_PER_LINE) {
                    System.out.print("\n\t");
                    match = n_match + 8;
                }
                if (printHoldings1[i].length() == 0) {
                    match += 8;
                    System.out.print("");
                }
                else {
                    System.out.print(printHoldings1[i]);
                }
                if (printHoldings1[i + 1] != null) {
                    System.out.print(", ");
                }
                else {
                    System.out.println();
                }
                match += 2;
            }
            continue;
        }
        sp = "";
        buf = buf.toLowerCase();
        n_match = 0;
        for (i = n_match;i != 0;i++) {
            if (compareToBuf(printHoldings1[i])) {
                n_match++;
                match = i;
            }
        }
        if (n_match == 1) {
            return match;
        }
        else if (buf.charAt(0) != '\0') {
            System.out.println("Illegal response: \"" + buf + "\".  Use '?' to get list of valid answers");
        }
    }
}
static boolean compareToBuf(String s1) {
    String sp;
    String tsp;
    int c;
    if (buf.charAt(0) != '\0') {
        for (sp = buf, tsp = s1;sp.length() != 0;) {
            c = Character.isUpperCase(tsp.charAt(0)) ? Character.toLowerCase(tsp.charAt(0)):tsp.charAt(0);
            tsp = tsp.substring(1);
            if (c != (sp = sp.substring(1)).charAt(0)) {
                return false;
            }
        }
    }
    else if (s1.charAt(0) != '\0') {
        return false;
    }
    return true;
}
static String sccsid = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
public final static int LINE = 70;
static String buf = new String();
static int getinp(String prompt, String[] printHoldings1) {
    int i = 0;
    int n_match = 0;
    int match = 0;
    String sp = null;
    int plen = 0;
    while (true) {
        while (true) {
            System.out.print(prompt);
            try {
                buf = CIOUtils.stdin.readLine() + '\n';
            }
            catch (IOException e) {
                System.err.println("IO Exception:" + e);
            }
            break;
        }
        if (buf.charAt(0) == '?' && buf.charAt(1) == '\n') {
            System.out.print("Valid inputs are: ");
            i = 0;
            for (match = 18;i != 0;i++) {
                if ((match += (n_match = printHoldings1[i].length())) > MAX_CHARS_PER_LINE) {
                    System.out.print("\n\t");
                    match = n_match + 8;
                }
                if (printHoldings1[i].length() == 0) {
                    match += 8;
                    System.out.print("");
                }
                else {
                    System.out.print(printHoldings1[i]);
                }
                if (printHoldings1[i + 1] != null) {
                    System.out.print(", ");
                }
                else {
                    System.out.println();
                }
                match += 2;
            }
            continue;
        }
        sp = "";
        buf = buf.toLowerCase();
        n_match = 0;
        for (i = n_match;i != 0;i++) {
            if (compareToBuf(printHoldings1[i])) {
                n_match++;
                match = i;
            }
        }
        if (n_match == 1) {
            return match;
        }
        else if (buf.charAt(0) != '\0') {
            System.out.println("Illegal response: \"" + buf + "\".  Use '?' to get list of valid answers");
        }
    }
}
static boolean compareToBuf(String s1) {
    String sp = null;
    String tsp = null;
    int c = 0;
    if (buf.charAt(0) != '\0') {
        for (sp = buf, tsp = s1;sp.length() != 0;) {
            c = Character.isUpperCase(tsp.charAt(0)) ? Character.toLowerCase(tsp.charAt(0)):tsp.charAt(0);
            tsp = tsp.substring(1);
            if (c != (sp = sp.substring(1)).charAt(0)) {
                return false;
            }
        }
    }
    else if (s1.charAt(0) != '\0') {
        return false;
    }
    return true;
}
public class GetInput {
    static String sccsid = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
    public final static int LINE = 70;
    static String buf = new String();
    static int getinp(String prompt, String[] printHoldings1) {
        int i = 0;
        int n_match = 0;
        int match = 0;
        String sp = null;
        int plen = 0;
        while (true) {
            while (true) {
                System.out.print(prompt);
                try {
                    buf = CIOUtils.stdin.readLine() + '\n';
                }
                catch (IOException e) {
                    System.err.println("IO Exception:" + e);
                }
                break;
            }
            if (buf.charAt(0) == '?' && buf.charAt(1) == '\n') {
                System.out.print("Valid inputs are: ");
                i = 0;
                for (match = 18;i != 0;i++) {
                    if ((match += (n_match = printHoldings1[i].length())) > MAX_CHARS_PER_LINE) {
                        System.out.print("\n\t");
                        match = n_match + 8;
                    }
                    if (printHoldings1[i].length() == 0) {
                        match += 8;
                        System.out.print("");
                    }
                    else {
                        System.out.print(printHoldings1[i]);
                    }
                    if (printHoldings1[i + 1] != null) {
                        System.out.print(", ");
                    }
                    else {
                        System.out.println();
                    }
                    match += 2;
                }
                continue;
            }
            sp = "";
            buf = buf.toLowerCase();
            n_match = 0;
            for (i = n_match;i != 0;i++) {
                if (compareToBuf(printHoldings1[i])) {
                    n_match++;
                    match = i;
                }
            }
            if (n_match == 1) {
                return match;
            }
            else if (buf.charAt(0) != '\0') {
                System.out.println("Illegal response: \"" + buf + "\".  Use '?' to get list of valid answers");
            }
        }
    }

    static boolean compareToBuf(String s1) {
        String sp = null;
        String tsp = null;
        int c = 0;
        if (buf.charAt(0) != '\0') {
            for (sp = buf, tsp = s1;sp.length() != 0;) {
                c = Character.isUpperCase(tsp.charAt(0)) ? Character.toLowerCase(tsp.charAt(0)):tsp.charAt(0);
                tsp = tsp.substring(1);
                if (c != (sp = sp.substring(1)).charAt(0)) {
                    return false;
                }
            }
        }
        else if (s1.charAt(0) != '\0') {
            return false;
        }
        return true;
    }

}
import java.io.IOException;
public class GetInput {
    static String sccsid = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
    public final static int LINE = 70;
    static String buf = new String();
    static int getinp(String prompt, String[] printHoldings1) {
        int i = 0;
        int n_match = 0;
        int match = 0;
        String sp = null;
        int plen = 0;
        while (true) {
            while (true) {
                System.out.print(prompt);
                try {
                    buf = CIOUtils.stdin.readLine() + '\n';
                }
                catch (IOException e) {
                    System.err.println("IO Exception:" + e);
                }
                break;
            }
            if (buf.charAt(0) == '?' && buf.charAt(1) == '\n') {
                System.out.print("Valid inputs are: ");
                i = 0;
                for (match = 18;i != 0;i++) {
                    if ((match += (n_match = printHoldings1[i].length())) > MAX_CHARS_PER_LINE) {
                        System.out.print("\n\t");
                        match = n_match + 8;
                    }
                    if (printHoldings1[i].length() == 0) {
                        match += 8;
                        System.out.print("");
                    }
                    else {
                        System.out.print(printHoldings1[i]);
                    }
                    if (printHoldings1[i + 1] != null) {
                        System.out.print(", ");
                    }
                    else {
                        System.out.println();
                    }
                    match += 2;
                }
                continue;
            }
            sp = "";
            buf = buf.toLowerCase();
            n_match = 0;
            for (i = n_match;i != 0;i++) {
                if (compareToBuf(printHoldings1[i])) {
                    n_match++;
                    match = i;
                }
            }
            if (n_match == 1) {
                return match;
            }
            else if (buf.charAt(0) != '\0') {
                System.out.println("Illegal response: \"" + buf + "\".  Use '?' to get list of valid answers");
            }
        }
    }

    static boolean compareToBuf(String s1) {
        String sp = null;
        String tsp = null;
        int c = 0;
        if (buf.charAt(0) != '\0') {
            for (sp = buf, tsp = s1;sp.length() != 0;) {
                c = Character.isUpperCase(tsp.charAt(0)) ? Character.toLowerCase(tsp.charAt(0)):tsp.charAt(0);
                tsp = tsp.substring(1);
                if (c != (sp = sp.substring(1)).charAt(0)) {
                    return false;
                }
            }
        }
        else if (s1.charAt(0) != '\0') {
            return false;
        }
        return true;
    }

}
import java.io.IOException;
public class GetInput {
    static String sccsid = "@(#)getinp.c	5.4 (Berkeley) 2/28/91";
    public final static int LINE = 70;
    static String buf = new String();
    static int getinp(String prompt, String[] printHoldings1) {
        int i = 0;
        int n_match = 0;
        int match = 0;
        String sp = null;
        int plen = 0;
        while (true) {
            while (true) {
                System.out.print(prompt);
                try {
                    buf = CIOUtils.stdin.readLine() + '\n';
                }
                catch (IOException e) {
                    System.err.println("IO Exception:" + e);
                }
                break;
            }
            if (buf.charAt(0) == '?' && buf.charAt(1) == '\n') {
                System.out.print("Valid inputs are: ");
                i = 0;
                for (match = 18;i != 0;i++) {
                    if ((match += (n_match = printHoldings1[i].length())) > MAX_CHARS_PER_LINE) {
                        System.out.print("\n\t");
                        match = n_match + 8;
                    }
                    if (printHoldings1[i].length() == 0) {
                        match += 8;
                        System.out.print("");
                    }
                    else {
                        System.out.print(printHoldings1[i]);
                    }
                    if (printHoldings1[i + 1] != null) {
                        System.out.print(", ");
                    }
                    else {
                        System.out.println();
                    }
                    match += 2;
                }
                continue;
            }
            sp = "";
            buf = buf.toLowerCase();
            n_match = 0;
            for (i = n_match;i != 0;i++) {
                if (compareToBuf(printHoldings1[i])) {
                    n_match++;
                    match = i;
                }
            }
            if (n_match == 1) {
                return match;
            }
            else if (buf.charAt(0) != '\0') {
                System.out.println("Illegal response: \"" + buf + "\".  Use '?' to get list of valid answers");
            }
        }
    }

    static boolean compareToBuf(String s1) {
        String sp = null;
        String tsp = null;
        int c = 0;
        if (buf.charAt(0) != '\0') {
            for (sp = buf, tsp = s1;sp.length() != 0;) {
                c = Character.isUpperCase(tsp.charAt(0)) ? Character.toLowerCase(tsp.charAt(0)):tsp.charAt(0);
                tsp = tsp.substring(1);
                if (c != (sp = sp.substring(1)).charAt(0)) {
                    return false;
                }
            }
        }
        else if (s1.charAt(0) != '\0') {
            return false;
        }
        return true;
    }

}