/**********************************************************************
 * cache.c -- trn-caching routines for lucy
 *
 * $Source$
 * $Author: brlewis $
 * $Header$
 *
 * Copyright 1990 by the Massachusetts Institute of Technology.
 * For copying and distribution information, see the file
 * "mit-copyright.h".
 **********************************************************************/
#include "mit-copyright.h"

#ifndef lint
static char rcsid_cache_c[] = "$Header$";
#endif /* lint */

#include <stdio.h>
#include "lucy/lucy.h"
tfile unix_tfile();		/* XXX should be in discuss .h file */

long
lucy_cache(n, fnp);
     int argc;
     char **fnp;
{
  long code;
  tfile tfstdout;
  lucy_qident i;
  name_blk *nb;
  lucyqlist l;
  char filename[64];
  FILE *fp;

  i = atoi(argv[1]);
  tfstdout = unix_tfile(1);
  code = lucy_qnb(&nb);
  if (code) {
    com_err(argv[0], code, "");
    return;
  }
  dsc_get_trn(nb, i, tfstdout, &code);
  if (code) {
    com_err(argv[0], code, "");
    return;
  }
  return;
}
