1*ce099b40Smartin /* $NetBSD: dotest.c,v 1.5 2008/04/28 20:23:05 martin Exp $ */
20dd5877aSitojun
30dd5877aSitojun /*-
40dd5877aSitojun * Copyright (c) 1997 The NetBSD Foundation, Inc.
50dd5877aSitojun * All rights reserved.
60dd5877aSitojun *
70dd5877aSitojun * Redistribution and use in source and binary forms, with or without
80dd5877aSitojun * modification, are permitted provided that the following conditions
90dd5877aSitojun * are met:
100dd5877aSitojun * 1. Redistributions of source code must retain the above copyright
110dd5877aSitojun * notice, this list of conditions and the following disclaimer.
120dd5877aSitojun * 2. Redistributions in binary form must reproduce the above copyright
130dd5877aSitojun * notice, this list of conditions and the following disclaimer in the
140dd5877aSitojun * documentation and/or other materials provided with the distribution.
150dd5877aSitojun *
160dd5877aSitojun * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
170dd5877aSitojun * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
180dd5877aSitojun * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
190dd5877aSitojun * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
200dd5877aSitojun * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
210dd5877aSitojun * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
220dd5877aSitojun * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
230dd5877aSitojun * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
240dd5877aSitojun * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
250dd5877aSitojun * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
260dd5877aSitojun * POSSIBILITY OF SUCH DAMAGE.
270dd5877aSitojun */
283fe138c1Sperry
29fceedefeSis #include <stdio.h>
301a1dc23aSmrg #include <stdlib.h>
31fceedefeSis
32fceedefeSis void print_str(const char *s);
33fceedefeSis void print_num(const int);
34fceedefeSis void itest(void);
35fceedefeSis void ftest1(void);
36fceedefeSis void ftest2(void);
37fceedefeSis void ftest3(void);
38fceedefeSis
39fceedefeSis void
print_str(s)40fceedefeSis print_str(s)
41fceedefeSis const char *s;
42fceedefeSis {
43fceedefeSis printf("%s", s);
44fceedefeSis fflush(stdout);
45fceedefeSis }
46fceedefeSis
47fceedefeSis void
print_num(i)48fceedefeSis print_num(i)
49fceedefeSis int i;
50fceedefeSis {
51fceedefeSis printf("%d", i);
52fceedefeSis fflush(stdout);
53fceedefeSis }
54fceedefeSis
55fceedefeSis int
main()56fceedefeSis main()
57fceedefeSis {
58fceedefeSis itest();
59fceedefeSis ftest1();
60fceedefeSis ftest2();
61fceedefeSis #if 0
62fceedefeSis /*
63fceedefeSis * We would need a special kernel, that clears the exception condition
64fceedefeSis * and does RTE, to run this.
65fceedefeSis */
66fceedefeSis ftest3();
67fceedefeSis #endif
68fceedefeSis exit (0);
69fceedefeSis }
70