/************************************************************************
*                 Test program for WHOIS server
*************************************************************************
* Author : Eric Smith
* Date   : 12/20/91
* Usage  : This program allows testing of the whois parsing routines without
*          the network connections.
*          For instructions on using the WHOIS server, read the file
*          whois.help.
*          For instructions on creating the whois database and reconfiguring
*          the fields in the database, read the file whoisadmin.help.
************************************************************************/
#include <stdio.h>

int printflag;

main(argc, argv)
  int argc;
  char *argv[];
{
  FILE *fp;

  int i, j, k, cc;
  int index;
  unsigned short temp;

  char *command;
  char commandbuff[100];
/*
 * Copy command line arguments into the string command.  Terminate with a zero.
 */
  printflag = 1;

  command = commandbuff;
  index = 0;
  for (i=1; i<argc; i++) {
    for (j=0; j<strlen(argv[i]); j++)
      command[index++] = argv[i][j];
    if (i != argc-1) command[index++] = ' ';
  }
  command[index] = 0;
/*
 * Call whois parser.
 */
  whois_parse(command, temp);
}


/*
 * This routine provides the output to the terminal for testing purposes.
 */
output_string(buffer)
  char *buffer;
{
  if (printflag)
    printf("%s", buffer);
}
