libtos.h revision 1.3.4.2 1 1.3.4.2 nathanw /* $NetBSD: libtos.h,v 1.3.4.2 2002/02/28 04:08:34 nathanw Exp $ */
2 1.3.4.2 nathanw
3 1.3.4.2 nathanw /*
4 1.3.4.2 nathanw * Copyright (c) 1995 Waldi Ravens.
5 1.3.4.2 nathanw * All rights reserved.
6 1.3.4.2 nathanw *
7 1.3.4.2 nathanw * Redistribution and use in source and binary forms, with or without
8 1.3.4.2 nathanw * modification, are permitted provided that the following conditions
9 1.3.4.2 nathanw * are met:
10 1.3.4.2 nathanw * 1. Redistributions of source code must retain the above copyright
11 1.3.4.2 nathanw * notice, this list of conditions and the following disclaimer.
12 1.3.4.2 nathanw * 2. Redistributions in binary form must reproduce the above copyright
13 1.3.4.2 nathanw * notice, this list of conditions and the following disclaimer in the
14 1.3.4.2 nathanw * documentation and/or other materials provided with the distribution.
15 1.3.4.2 nathanw * 3. All advertising materials mentioning features or use of this software
16 1.3.4.2 nathanw * must display the following acknowledgement:
17 1.3.4.2 nathanw * This product includes software developed by Waldi Ravens.
18 1.3.4.2 nathanw * 4. The name of the author may not be used to endorse or promote products
19 1.3.4.2 nathanw * derived from this software without specific prior written permission.
20 1.3.4.2 nathanw *
21 1.3.4.2 nathanw * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22 1.3.4.2 nathanw * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23 1.3.4.2 nathanw * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24 1.3.4.2 nathanw * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25 1.3.4.2 nathanw * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26 1.3.4.2 nathanw * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 1.3.4.2 nathanw * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 1.3.4.2 nathanw * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 1.3.4.2 nathanw * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30 1.3.4.2 nathanw * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 1.3.4.2 nathanw */
32 1.3.4.2 nathanw
33 1.3.4.2 nathanw #ifndef _LIBTOS_H
34 1.3.4.2 nathanw #define _LIBTOS_H
35 1.3.4.2 nathanw
36 1.3.4.2 nathanw #ifdef __STDC__
37 1.3.4.2 nathanw #define PROTO(x) x
38 1.3.4.2 nathanw #define EXTERN
39 1.3.4.2 nathanw #else
40 1.3.4.2 nathanw #define PROTO(x) ()
41 1.3.4.2 nathanw #define EXTERN extern
42 1.3.4.2 nathanw #endif
43 1.3.4.2 nathanw
44 1.3.4.2 nathanw #ifdef __GNUC__
45 1.3.4.2 nathanw #if (__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 5))
46 1.3.4.2 nathanw #define NORETURN __attribute__((noreturn))
47 1.3.4.2 nathanw #else
48 1.3.4.2 nathanw #define NORETURN
49 1.3.4.2 nathanw #endif
50 1.3.4.2 nathanw #endif
51 1.3.4.2 nathanw
52 1.3.4.2 nathanw #include <sys/types.h>
53 1.3.4.2 nathanw #include <stdarg.h>
54 1.3.4.2 nathanw
55 1.3.4.2 nathanw #ifndef int8_t
56 1.3.4.2 nathanw /*
57 1.3.4.2 nathanw * My TOS/MiNT installation does not define these (Leo 09/10/2001).
58 1.3.4.2 nathanw */
59 1.3.4.2 nathanw typedef unsigned char u_int8_t;
60 1.3.4.2 nathanw typedef unsigned short u_int16_t;
61 1.3.4.2 nathanw typedef unsigned long u_int32_t;
62 1.3.4.2 nathanw #endif /* int8_t */
63 1.3.4.2 nathanw
64 1.3.4.2 nathanw struct kparamb;
65 1.3.4.2 nathanw struct osdsc;
66 1.3.4.2 nathanw
67 1.3.4.2 nathanw EXTERN int aout_load PROTO((int, struct osdsc *, char **, int));
68 1.3.4.2 nathanw EXTERN void bsd_startup PROTO((struct kparamb *)) NORETURN;
69 1.3.4.2 nathanw EXTERN int elf_load PROTO((int, struct osdsc *, char **, int));
70 1.3.4.2 nathanw EXTERN int eprintf PROTO((char *, ...));
71 1.3.4.2 nathanw EXTERN void error PROTO((int, char *, ...));
72 1.3.4.2 nathanw EXTERN void fatal PROTO((int, char *, ...)) NORETURN;
73 1.3.4.2 nathanw EXTERN void init_toslib PROTO((char *));
74 1.3.4.2 nathanw EXTERN int key_wait PROTO((char *));
75 1.3.4.2 nathanw EXTERN void press_any_key PROTO((void));
76 1.3.4.2 nathanw EXTERN void redirect_output PROTO((char *));
77 1.3.4.2 nathanw EXTERN void set_wait_for_key PROTO((void));
78 1.3.4.2 nathanw EXTERN void sys_info PROTO((struct osdsc *));
79 1.3.4.2 nathanw EXTERN int veprintf PROTO((char *, va_list));
80 1.3.4.2 nathanw EXTERN void xexit PROTO((int)) NORETURN;
81 1.3.4.2 nathanw EXTERN void * xmalloc PROTO((size_t));
82 1.3.4.2 nathanw EXTERN void * xrealloc PROTO((void *, size_t));
83 1.3.4.2 nathanw
84 1.3.4.2 nathanw #endif /* !_LIBTOS_H */
85