/**********************************************************************
 * do_unarchive.c  -- SS command for unarchiving a question
 * tty lucy client using SS library
 *
 * $Author: brlewis $
 * $Source: /afs/athena.mit.edu/astaff/project/lucydev/src/tty/do_unarchive.c,v $
 * $Header: /afs/athena.mit.edu/astaff/project/lucydev/src/tty/do_unarchive.c,v 1.1 91/09/24 14:47:41 brlewis Exp Locker: brlewis $
 *
 * Copyright 1991 by the Massachusetts Institute of Technology.
 *
 * For copying and distribution information, please see the file
 * <mit-copyright.h>.
 **********************************************************************/
#include <mit-copyright.h>

#ifndef lint
static char rcsid_do_unarchive_c[] = "$Header: /afs/athena.mit.edu/astaff/project/lucydev/src/tty/do_unarchive.c,v 1.1 91/09/24 14:47:41 brlewis Exp Locker: brlewis $";
#endif /* lint */

#include <stdio.h>
#include <strings.h>
#include <ss/ss.h>
#include "lucy/lucy.h"
#include "config.h"

void
do_unarchive(argc, argv)
     int argc;
     char *argv[];
{
  long code;
  int n, n2;

  /* Check usage */
  if (argc != 2 || !(n=atoi(argv[1]))) {
    printf("Usage: %s number.\n", argv[0]);
    return;
  }

  /* do actual unarchiving */
  if (code=luc_unarchive(&luv_qmtg, n, &n2)) {
    com_err(argv[0], code, "(%s)", luv_context);
    return;
  }
  printf("Unarchived %d.  Type `scan %d' to see it.\n", n, n2);
  return;
}
