dotest.c revision 1.3 1 1.3 itojun /* $NetBSD: dotest.c,v 1.3 2002/02/21 07:38:19 itojun Exp $ */
2 1.3 itojun
3 1.3 itojun /*-
4 1.3 itojun * Copyright (c) 1997 The NetBSD Foundation, Inc.
5 1.3 itojun * All rights reserved.
6 1.3 itojun *
7 1.3 itojun * Redistribution and use in source and binary forms, with or without
8 1.3 itojun * modification, are permitted provided that the following conditions
9 1.3 itojun * are met:
10 1.3 itojun * 1. Redistributions of source code must retain the above copyright
11 1.3 itojun * notice, this list of conditions and the following disclaimer.
12 1.3 itojun * 2. Redistributions in binary form must reproduce the above copyright
13 1.3 itojun * notice, this list of conditions and the following disclaimer in the
14 1.3 itojun * documentation and/or other materials provided with the distribution.
15 1.3 itojun * 3. All advertising materials mentioning features or use of this software
16 1.3 itojun * must display the following acknowledgement:
17 1.3 itojun * This product includes software developed by the NetBSD
18 1.3 itojun * Foundation, Inc. and its contributors.
19 1.3 itojun * 4. Neither the name of The NetBSD Foundation nor the names of its
20 1.3 itojun * contributors may be used to endorse or promote products derived
21 1.3 itojun * from this software without specific prior written permission.
22 1.3 itojun *
23 1.3 itojun * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
24 1.3 itojun * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
25 1.3 itojun * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
26 1.3 itojun * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
27 1.3 itojun * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28 1.3 itojun * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29 1.3 itojun * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30 1.3 itojun * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31 1.3 itojun * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32 1.3 itojun * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 1.3 itojun * POSSIBILITY OF SUCH DAMAGE.
34 1.3 itojun */
35 1.2 perry
36 1.1 is #include <stdio.h>
37 1.1 is
38 1.1 is void print_str(const char *s);
39 1.1 is void print_num(const int);
40 1.1 is void itest(void);
41 1.1 is void ftest1(void);
42 1.1 is void ftest2(void);
43 1.1 is void ftest3(void);
44 1.1 is
45 1.1 is void
46 1.1 is print_str(s)
47 1.1 is const char *s;
48 1.1 is {
49 1.1 is printf("%s", s);
50 1.1 is fflush(stdout);
51 1.1 is }
52 1.1 is
53 1.1 is void
54 1.1 is print_num(i)
55 1.1 is int i;
56 1.1 is {
57 1.1 is printf("%d", i);
58 1.1 is fflush(stdout);
59 1.1 is }
60 1.1 is
61 1.1 is int
62 1.1 is main()
63 1.1 is {
64 1.1 is itest();
65 1.1 is ftest1();
66 1.1 is ftest2();
67 1.1 is #if 0
68 1.1 is /*
69 1.1 is * We would need a special kernel, that clears the exception condition
70 1.1 is * and does RTE, to run this.
71 1.1 is */
72 1.1 is ftest3();
73 1.1 is #endif
74 1.1 is exit (0);
75 1.1 is }
76