Home | History | Annotate | Line # | Download | only in 060sp
      1  1.5  martin /*	$NetBSD: dotest.c,v 1.5 2008/04/28 20:23:05 martin 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  *
     16  1.3  itojun  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     17  1.3  itojun  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     18  1.3  itojun  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     19  1.3  itojun  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     20  1.3  itojun  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     21  1.3  itojun  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     22  1.3  itojun  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     23  1.3  itojun  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     24  1.3  itojun  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     25  1.3  itojun  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     26  1.3  itojun  * POSSIBILITY OF SUCH DAMAGE.
     27  1.3  itojun  */
     28  1.2   perry 
     29  1.1      is #include <stdio.h>
     30  1.4     mrg #include <stdlib.h>
     31  1.1      is 
     32  1.1      is void print_str(const char *s);
     33  1.1      is void print_num(const int);
     34  1.1      is void itest(void);
     35  1.1      is void ftest1(void);
     36  1.1      is void ftest2(void);
     37  1.1      is void ftest3(void);
     38  1.1      is 
     39  1.1      is void
     40  1.1      is print_str(s)
     41  1.1      is 	const char *s;
     42  1.1      is {
     43  1.1      is 	printf("%s", s);
     44  1.1      is 	fflush(stdout);
     45  1.1      is }
     46  1.1      is 
     47  1.1      is void
     48  1.1      is print_num(i)
     49  1.1      is 	int i;
     50  1.1      is {
     51  1.1      is 	printf("%d", i);
     52  1.1      is 	fflush(stdout);
     53  1.1      is }
     54  1.1      is 
     55  1.1      is int
     56  1.1      is main()
     57  1.1      is {
     58  1.1      is 	itest();
     59  1.1      is 	ftest1();
     60  1.1      is 	ftest2();
     61  1.1      is #if 0
     62  1.1      is 	/*
     63  1.1      is 	 * We would need a special kernel, that clears the exception condition
     64  1.1      is 	 * and does RTE, to run this.
     65  1.1      is 	 */
     66  1.1      is 	ftest3();
     67  1.1      is #endif
     68  1.1      is 	exit (0);
     69  1.1      is }
     70