]>
Commit | Line | Data |
---|---|---|
14c7c974 A |
1 | /* |
2 | * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
6 | * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights | |
7 | * Reserved. This file contains Original Code and/or Modifications of | |
8 | * Original Code as defined in and that are subject to the Apple Public | |
9 | * Source License Version 1.1 (the "License"). You may not use this file | |
10 | * except in compliance with the License. Please obtain a copy of the | |
11 | * License at http://www.apple.com/publicsource and read it before using | |
12 | * this file. | |
13 | * | |
14 | * The Original Code and all software distributed under the License are | |
15 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
16 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | |
17 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
18 | * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the | |
19 | * License for the specific language governing rights and limitations | |
20 | * under the License. | |
21 | * | |
22 | * @APPLE_LICENSE_HEADER_END@ | |
23 | */ | |
24 | ||
25 | #ifndef __BOOT_LIBSA_H | |
26 | #define __BOOT_LIBSA_H | |
27 | ||
28 | /* Exported API for standalone library */ | |
29 | ||
30 | #include <mach-o/loader.h> | |
31 | #include <stdarg.h> | |
32 | #include <stddef.h> | |
33 | ||
34 | /* | |
35 | * string.c | |
36 | */ | |
37 | #ifndef bcopy | |
38 | extern void bcopy(const void * src, void * dst, int len); | |
39 | #endif | |
40 | ||
41 | #ifndef bzero | |
42 | extern void bzero(void * dst, int len); | |
43 | #endif | |
44 | ||
45 | extern void * memset(void * dst, int c, size_t n); | |
46 | extern void * memcpy(void * dst, const void * src, size_t len); | |
47 | extern int strcmp(const char * s1, const char * s2); | |
48 | extern int strncmp(const char * s1, const char * s2, size_t n); | |
49 | extern char * strcpy(char * s1, const char * s2); | |
50 | extern char * strncpy(char * s1, const char * s2, size_t n); | |
51 | extern int atoi(const char * str); | |
52 | extern int ptol(char * str); | |
53 | extern char * strcat(char * s1, const char * s2); | |
54 | extern char * strncat(char * s1, const char * s2, size_t n); | |
55 | ||
56 | #if STRNCASECMP | |
57 | extern int strncasecmp(const char * s1, const char * s2, size_t n); | |
58 | #endif | |
59 | ||
60 | /* | |
61 | * error.c | |
62 | */ | |
63 | extern int errno; | |
64 | extern char * strerror(int errnum); | |
65 | ||
66 | /* | |
67 | * strtol.c | |
68 | */ | |
69 | extern long strtol(const char * nptr, | |
70 | char ** endptr, | |
71 | int base); | |
72 | ||
73 | extern unsigned long strtoul(const char * nptr, | |
74 | char ** endptr, | |
75 | int base); | |
76 | ||
77 | /* | |
78 | * prf.c | |
79 | */ | |
80 | extern void prf(const char * fmt, | |
81 | va_list ap, | |
82 | void (*putfn_p)(), | |
83 | void * putfn_arg); | |
84 | ||
85 | /* | |
86 | * printf.c | |
87 | */ | |
88 | extern int sprintf(char *s, const char * format, ...); | |
89 | extern int slvprintf(char * buffer, | |
90 | int len, | |
91 | const char * fmt, | |
92 | va_list arg); | |
93 | ||
94 | /* | |
95 | * zalloc.c | |
96 | */ | |
14c7c974 A |
97 | extern void malloc_init(char * start, int size, int nodes); |
98 | extern void * malloc(size_t size); | |
99 | extern void free(void * start); | |
100 | extern void * realloc(void * ptr, size_t size); | |
101 | ||
102 | /* | |
103 | * getsegbyname.c | |
104 | */ | |
105 | extern struct segment_command * | |
106 | getsegbynamefromheader(struct mach_header * mhp, char * segname); | |
107 | ||
47b0a8bd A |
108 | /* |
109 | * bswap.c | |
110 | */ | |
111 | extern unsigned long bswap32( unsigned long data ); | |
112 | ||
14c7c974 | 113 | #endif /* !__BOOT_LIBSA_H */ |