1cefb9df3fa34d08734f29005cfafa6be5cf3e93Mark Andrews * Copyright (C) 1999-2005, 2007-2010, 2013, 2014, 2016, 2017 Internet Systems Consortium, Inc. ("ISC")
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
/* $Id: t_api.c,v 1.68 2010/12/21 04:20:23 marka Exp $ */
#include <config.h>
#include <ctype.h>
#include <errno.h>
#include <limits.h>
#include <signal.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
#ifndef WIN32
#include <direct.h>
#ifdef WIN32
printhelp(void);
printusage(void);
#ifndef WIN32
#ifndef WIN32
#ifndef WIN32
#ifndef WIN32
if (first) {
tnum = 0;
if (first) {
sizeof(T_tvec));
++pts;
++tnum;
printhelp();
exit(0);
printusage();
exit(0);
#ifndef WIN32
subprocs = 0;
#ifndef WIN32
if (T_debug)
tnum = 0;
#ifndef WIN32
if (subprocs) {
if (T_pid == 0) {
exit(0);
} else if (T_pid > 0) {
T_int = 0;
deadpid =
T_int) {
T_int = 0;
alarm(0);
errno);
++pts;
++tnum;
switch (result) {
case T_PASS:
case T_FAIL:
case T_UNRESOLVED:
case T_SKIPPED:
case T_UNTESTED:
case T_THREADONLY:
case T_PKCS11ONLY:
n = NULL;
p = &T_env[0];
while (*p != NULL) {
p = &T_env[0];
while (n < T_MAXENV) {
if (*p == NULL)
(void)free(*p);
rval = 0;
return (rval);
p = &T_env[0];
while (*p != NULL) {
rval = 0;
return(rval);
size_t n;
p = buf;
if ( n >= size ) {
size * sizeof(char));
goto err;
p = buf + n;
if (c == EOF && n == 0U) {
return (NULL);
return (buf);
err:
return(NULL);
return(rval);
size_t n;
time_t t;
struct tm *p;
p = localtime(&t);
++pmap;
return (result);
{ 0, NULL }
++pmap;
return(dc_method);
cnt = 0;
*toks++ = p;
++cnt;
return(cnt);
++pts;
++cnt;
npass = 0;
nfails = 0;
nprobs = 0;
line = 0;
++line;
(void)free(p);
switch (tresult) {
case T_PASS:
++npass;
case T_FAIL:
++nfails;
case T_SKIPPED:
case T_UNTESTED:
++nprobs;
++nprobs;
(void)free(p);
++nprobs;
else if (nfails > 0)
else if (npass == 0)
return (result);
#ifdef WIN32