1168925Smtm/*- 2168925Smtm * Copyright (c) 2007 Michael Telahun Makonnen 3168925Smtm * All rights reserved. 4168925Smtm * 5168925Smtm * Redistribution and use in source and binary forms, with or without 6168925Smtm * modification, are permitted provided that the following conditions 7168925Smtm * are met: 8168925Smtm * 1. Redistributions of source code must retain the above copyright 9168925Smtm * notice, this list of conditions and the following disclaimer. 10168925Smtm * 2. Redistributions in binary form must reproduce the above copyright 11168925Smtm * notice, this list of conditions and the following disclaimer in the 12168925Smtm * documentation and/or other materials provided with the distribution. 13168925Smtm * 14168925Smtm * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15168925Smtm * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16168925Smtm * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17168925Smtm * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18168925Smtm * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19168925Smtm * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20168925Smtm * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21168925Smtm * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22168925Smtm * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23168925Smtm * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24168925Smtm * SUCH DAMAGE. 25168925Smtm * 26168925Smtm * $FreeBSD$ 27168925Smtm */ 28168925Smtm 29168925Smtm#include <sys/types.h> 30168925Smtm 31168925Smtm#define LINESIZE 256 32168925Smtm#define FUNCNAMESIZE 32 33168925Smtm 34168925Smtmextern int g_total; 35168925Smtmextern int g_pass; 36168925Smtmextern int g_fail; 37168925Smtmextern char g_funcname[FUNCNAMESIZE]; 38168925Smtmextern char g_testdesc[LINESIZE]; 39168925Smtmextern char g_errbuf[LINESIZE]; 40168925Smtm 41168925Smtmvoid set_funcname(char *, size_t); 42168925Smtmvoid checkptr(caddr_t, caddr_t, const char *); 43168925Smtmvoid checkstr(const char *, const char *, size_t, const char*); 44168925Smtmvoid checknum(int, int, int, const char *); 45