/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 2003-2011 AT&T Intellectual Property *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Phong Vo <kpv@research.att.com> *
* Glenn Fowler <gsf@research.att.com> *
* *
***********************************************************************/
#include <ast_common.h>
#ifndef NIL
#define NIL(t) ((t)0)
#endif
#if __STD_C
#include <stdarg.h>
#else
#include <varargs.h>
#endif
#if !_SFIO_H
#endif
#if !_hdr_unistd
extern int fork();
extern int getpid();
#endif
extern void tstsuccess _ARG_((char*, ...));
static int Tstline;
#ifdef __LINE__
#else
#endif
#ifdef __LINE__
#else
#endif
#ifdef __LINE__
#else
#endif
#ifdef DEBUG
#ifdef __LINE__
#else
#endif
#else
#define TSTDEBUG(x)
#endif
#ifndef MAIN
#if __STD_C
#else
#endif
#endif /*MAIN*/
#ifndef TSTEXIT
#endif
static void tstcleanup()
{
#ifdef DEBUG
twarn("Temp files will not be removed");
#else
int i;
if(Tstfile[i][0])
#endif
}
#if __STD_C
#else
int line;
char* form;
#endif
{
int n;
for(n = 0; n < sizeof(buf); ++n)
buf[n] = 0;
s = buf; n = 0;
if(line >= 0)
{
#if _SFIO_H
#else
#endif
s += (n = strlen(s));
}
#if _SFIO_H
#else
#endif
{ buf[n] = '\n';
n += 1;
}
}
}
#if __STD_C
#else
#endif
{
#if __STD_C
#else
char* form;
#endif
#if _SFIO_H
#else
#endif
tstcleanup();
exit(1);
}
#if __STD_C
#else
void tstsuccess(va_alist)
#endif
{
#if __STD_C
#else
char* form;
#endif
tstcleanup();
exit(0);
}
#if __STD_C
#else
#endif
{
#if TEST_VERBOSE
#if __STD_C
#else
char* form;
#endif
#endif
}
#if __STD_C
static char* tstfile(int n)
#else
static char* tstfile(n)
int n;
#endif
{
static int Setatexit = 0;
if(!Setatexit)
{ Setatexit = 1;
}
terror("Bad temporary file request:%d\n", n);
if(!Tstfile[n][0])
{
#ifdef DEBUG
#if _SFIO_H
#else
#endif
#else
static int pid;
static char* tmp;
if (!tmp)
tmp = "/tmp";
}
#if _SFIO_H
#else
#endif
#endif
}
return Tstfile[n];
}
unsigned int trandom()
{
return rand;
}