| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
#ifndef _ACCLIB_H |
| 46 |
#define _ACCLIB_H |
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
extern const UINT8 AcpiGbl_Ctypes[]; |
| 56 |
|
| 57 |
#define _ACPI_XA 0x00 |
| 58 |
#define _ACPI_XS 0x40 |
| 59 |
#define _ACPI_BB 0x00 |
| 60 |
#define _ACPI_CN 0x20 |
| 61 |
#define _ACPI_DI 0x04 |
| 62 |
#define _ACPI_LO 0x02 |
| 63 |
#define _ACPI_PU 0x10 |
| 64 |
#define _ACPI_SP 0x08 |
| 65 |
#define _ACPI_UP 0x01 |
| 66 |
#define _ACPI_XD 0x80 |
| 67 |
|
| 68 |
#define isdigit(c) (AcpiGbl_Ctypes[(unsigned char)(c)] & (_ACPI_DI)) |
| 69 |
#define isspace(c) (AcpiGbl_Ctypes[(unsigned char)(c)] & (_ACPI_SP)) |
| 70 |
#define isxdigit(c) (AcpiGbl_Ctypes[(unsigned char)(c)] & (_ACPI_XD)) |
| 71 |
#define isupper(c) (AcpiGbl_Ctypes[(unsigned char)(c)] & (_ACPI_UP)) |
| 72 |
#define islower(c) (AcpiGbl_Ctypes[(unsigned char)(c)] & (_ACPI_LO)) |
| 73 |
#define isprint(c) (AcpiGbl_Ctypes[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP | _ACPI_DI | _ACPI_XS | _ACPI_PU)) |
| 74 |
#define isalpha(c) (AcpiGbl_Ctypes[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP)) |
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
#define EPERM 1 |
| 79 |
#define ENOENT 2 |
| 80 |
#define EINTR 4 |
| 81 |
#define EIO 5 |
| 82 |
#define EBADF 9 |
| 83 |
#define EAGAIN 11 |
| 84 |
#define ENOMEM 12 |
| 85 |
#define EACCES 13 |
| 86 |
#define EFAULT 14 |
| 87 |
#define EBUSY 16 |
| 88 |
#define EEXIST 17 |
| 89 |
#define ENODEV 19 |
| 90 |
#define EINVAL 22 |
| 91 |
#define EPIPE 32 |
| 92 |
#define ERANGE 34 |
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
char * |
| 97 |
strcat ( |
| 98 |
char *DstString, |
| 99 |
const char *SrcString); |
| 100 |
|
| 101 |
char * |
| 102 |
strchr ( |
| 103 |
const char *String, |
| 104 |
int ch); |
| 105 |
|
| 106 |
char * |
| 107 |
strpbrk ( |
| 108 |
const char *String, |
| 109 |
const char *Delimiters); |
| 110 |
|
| 111 |
char * |
| 112 |
strtok ( |
| 113 |
char *String, |
| 114 |
const char *Delimiters); |
| 115 |
|
| 116 |
char * |
| 117 |
strcpy ( |
| 118 |
char *DstString, |
| 119 |
const char *SrcString); |
| 120 |
|
| 121 |
int |
| 122 |
strcmp ( |
| 123 |
const char *String1, |
| 124 |
const char *String2); |
| 125 |
|
| 126 |
ACPI_SIZE |
| 127 |
strlen ( |
| 128 |
const char *String); |
| 129 |
|
| 130 |
char * |
| 131 |
strncat ( |
| 132 |
char *DstString, |
| 133 |
const char *SrcString, |
| 134 |
ACPI_SIZE Count); |
| 135 |
|
| 136 |
int |
| 137 |
strncmp ( |
| 138 |
const char *String1, |
| 139 |
const char *String2, |
| 140 |
ACPI_SIZE Count); |
| 141 |
|
| 142 |
char * |
| 143 |
strncpy ( |
| 144 |
char *DstString, |
| 145 |
const char *SrcString, |
| 146 |
ACPI_SIZE Count); |
| 147 |
|
| 148 |
char * |
| 149 |
strstr ( |
| 150 |
char *String1, |
| 151 |
char *String2); |
| 152 |
|
| 153 |
|
| 154 |
|
| 155 |
|
| 156 |
UINT32 |
| 157 |
strtoul ( |
| 158 |
const char *String, |
| 159 |
char **Terminator, |
| 160 |
UINT32 Base); |
| 161 |
|
| 162 |
|
| 163 |
|
| 164 |
|
| 165 |
int |
| 166 |
memcmp ( |
| 167 |
void *Buffer1, |
| 168 |
void *Buffer2, |
| 169 |
ACPI_SIZE Count); |
| 170 |
|
| 171 |
void * |
| 172 |
memcpy ( |
| 173 |
void *Dest, |
| 174 |
const void *Src, |
| 175 |
ACPI_SIZE Count); |
| 176 |
|
| 177 |
void * |
| 178 |
memmove ( |
| 179 |
void *Dest, |
| 180 |
const void *Src, |
| 181 |
ACPI_SIZE Count); |
| 182 |
|
| 183 |
void * |
| 184 |
memset ( |
| 185 |
void *Dest, |
| 186 |
int Value, |
| 187 |
ACPI_SIZE Count); |
| 188 |
|
| 189 |
|
| 190 |
|
| 191 |
|
| 192 |
int |
| 193 |
tolower ( |
| 194 |
int c); |
| 195 |
|
| 196 |
int |
| 197 |
toupper ( |
| 198 |
int c); |
| 199 |
|
| 200 |
|
| 201 |
|
| 202 |
|
| 203 |
const char * |
| 204 |
AcpiUtScanNumber ( |
| 205 |
const char *String, |
| 206 |
UINT64 *NumberPtr); |
| 207 |
|
| 208 |
const char * |
| 209 |
AcpiUtPrintNumber ( |
| 210 |
char *String, |
| 211 |
UINT64 Number); |
| 212 |
|
| 213 |
int |
| 214 |
vsnprintf ( |
| 215 |
char *String, |
| 216 |
ACPI_SIZE Size, |
| 217 |
const char *Format, |
| 218 |
va_list Args); |
| 219 |
|
| 220 |
int |
| 221 |
snprintf ( |
| 222 |
char *String, |
| 223 |
ACPI_SIZE Size, |
| 224 |
const char *Format, |
| 225 |
...); |
| 226 |
|
| 227 |
int |
| 228 |
sprintf ( |
| 229 |
char *String, |
| 230 |
const char *Format, |
| 231 |
...); |
| 232 |
|
| 233 |
#ifdef ACPI_APPLICATION |
| 234 |
#define SEEK_SET 0 |
| 235 |
#define SEEK_CUR 1 |
| 236 |
#define SEEK_END 2 |
| 237 |
|
| 238 |
|
| 239 |
|
| 240 |
|
| 241 |
|
| 242 |
|
| 243 |
extern int errno; |
| 244 |
|
| 245 |
#ifndef EOF |
| 246 |
#define EOF (-1) |
| 247 |
#endif |
| 248 |
|
| 249 |
#define putchar(c) fputc(stdout, c) |
| 250 |
#define getchar(c) fgetc(stdin) |
| 251 |
|
| 252 |
int |
| 253 |
vprintf ( |
| 254 |
const char *Format, |
| 255 |
va_list Args); |
| 256 |
|
| 257 |
int |
| 258 |
printf ( |
| 259 |
const char *Format, |
| 260 |
...); |
| 261 |
|
| 262 |
int |
| 263 |
vfprintf ( |
| 264 |
FILE *File, |
| 265 |
const char *Format, |
| 266 |
va_list Args); |
| 267 |
|
| 268 |
int |
| 269 |
fprintf ( |
| 270 |
FILE *File, |
| 271 |
const char *Format, |
| 272 |
...); |
| 273 |
|
| 274 |
FILE * |
| 275 |
fopen ( |
| 276 |
const char *Path, |
| 277 |
const char *Modes); |
| 278 |
|
| 279 |
void |
| 280 |
fclose ( |
| 281 |
FILE *File); |
| 282 |
|
| 283 |
int |
| 284 |
fread ( |
| 285 |
void *Buffer, |
| 286 |
ACPI_SIZE Size, |
| 287 |
ACPI_SIZE Count, |
| 288 |
FILE *File); |
| 289 |
|
| 290 |
int |
| 291 |
fwrite ( |
| 292 |
void *Buffer, |
| 293 |
ACPI_SIZE Size, |
| 294 |
ACPI_SIZE Count, |
| 295 |
FILE *File); |
| 296 |
|
| 297 |
int |
| 298 |
fseek ( |
| 299 |
FILE *File, |
| 300 |
long Offset, |
| 301 |
int From); |
| 302 |
|
| 303 |
long |
| 304 |
ftell ( |
| 305 |
FILE *File); |
| 306 |
|
| 307 |
int |
| 308 |
fgetc ( |
| 309 |
FILE *File); |
| 310 |
|
| 311 |
int |
| 312 |
fputc ( |
| 313 |
FILE *File, |
| 314 |
char c); |
| 315 |
|
| 316 |
char * |
| 317 |
fgets ( |
| 318 |
char *s, |
| 319 |
ACPI_SIZE Size, |
| 320 |
FILE *File); |
| 321 |
#endif |
| 322 |
|
| 323 |
#endif |