/*
 * 5799-WZQ (C) COPYRIGHT IBM CORPORATION 1986
 * LICENSED MATERIALS - PROPERTY OF IBM
 * REFER TO COPYRIGHT INSTRUCTIONS FORM NUMBER G120-2083
 */
/* $Header:vlong.c 12.0$ */
/* $ACIS:vlong.c 12.0$ */
/* $Source: /ibm/acis/usr/src/ibm/aedtest/RCS/vlong.c,v $ */

#ifndef lint
static char *rcsid = "$Header:vlong.c 12.0$";
#endif

/* vlong.c */
#include "vikst.h"

#ifdef BSD
  extern FILE *out,*spool;
	extern dumpspool();
	extern int v_control;
#endif

longtst()
{ INT16 h,m,s,hth;
  INT16  t3;
  extern UINT16 zero;
  INT16 t1,t2;

  load("long.vkt");
  p1m("\nThis test takes 30 seconds.\n");
  starttime();
  while(elapsedtime() < 30)
    {  
       vread(&h,1,0x4000); 
#ifndef BSD
	swap(&h);
#endif
/* 	PRINTF("debug vlong:h=%0xd\n",h); */
       if (h== 0xDEAD) return(0xAAAA);
    }
  zero = chk30; /* tell viking time is up.  */
  VIKCONT;
  zero = 0;
#ifndef NOTIMEOUT
  if (look(&h,&m,&s)) abortb("Time-out in Long test.\n");
#else 
  if (look(&h,&m,&s)) 
	{p1d("\007Time-out in Long test -- continuing.\n");
	p2d("look returned %x\n",h);
	dumptime();}
#endif
  return(0);
}
