15ef50723SJung-uk Kim /****************************************************************************** 25ef50723SJung-uk Kim * 35ef50723SJung-uk Kim * Name: acclib.h -- C library support. Prototypes for the (optional) local 45ef50723SJung-uk Kim * implementations of required C library functions. 55ef50723SJung-uk Kim * 65ef50723SJung-uk Kim *****************************************************************************/ 75ef50723SJung-uk Kim 80d84335fSJung-uk Kim /****************************************************************************** 90d84335fSJung-uk Kim * 100d84335fSJung-uk Kim * 1. Copyright Notice 110d84335fSJung-uk Kim * 12*58308fadSJung-uk Kim * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. 135ef50723SJung-uk Kim * All rights reserved. 145ef50723SJung-uk Kim * 150d84335fSJung-uk Kim * 2. License 160d84335fSJung-uk Kim * 170d84335fSJung-uk Kim * 2.1. This is your license from Intel Corp. under its intellectual property 180d84335fSJung-uk Kim * rights. You may have additional license terms from the party that provided 190d84335fSJung-uk Kim * you this software, covering your right to use that party's intellectual 200d84335fSJung-uk Kim * property rights. 210d84335fSJung-uk Kim * 220d84335fSJung-uk Kim * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 230d84335fSJung-uk Kim * copy of the source code appearing in this file ("Covered Code") an 240d84335fSJung-uk Kim * irrevocable, perpetual, worldwide license under Intel's copyrights in the 250d84335fSJung-uk Kim * base code distributed originally by Intel ("Original Intel Code") to copy, 260d84335fSJung-uk Kim * make derivatives, distribute, use and display any portion of the Covered 270d84335fSJung-uk Kim * Code in any form, with the right to sublicense such rights; and 280d84335fSJung-uk Kim * 290d84335fSJung-uk Kim * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 300d84335fSJung-uk Kim * license (with the right to sublicense), under only those claims of Intel 310d84335fSJung-uk Kim * patents that are infringed by the Original Intel Code, to make, use, sell, 320d84335fSJung-uk Kim * offer to sell, and import the Covered Code and derivative works thereof 330d84335fSJung-uk Kim * solely to the minimum extent necessary to exercise the above copyright 340d84335fSJung-uk Kim * license, and in no event shall the patent license extend to any additions 350d84335fSJung-uk Kim * to or modifications of the Original Intel Code. No other license or right 360d84335fSJung-uk Kim * is granted directly or by implication, estoppel or otherwise; 370d84335fSJung-uk Kim * 380d84335fSJung-uk Kim * The above copyright and patent license is granted only if the following 390d84335fSJung-uk Kim * conditions are met: 400d84335fSJung-uk Kim * 410d84335fSJung-uk Kim * 3. Conditions 420d84335fSJung-uk Kim * 430d84335fSJung-uk Kim * 3.1. Redistribution of Source with Rights to Further Distribute Source. 440d84335fSJung-uk Kim * Redistribution of source code of any substantial portion of the Covered 450d84335fSJung-uk Kim * Code or modification with rights to further distribute source must include 460d84335fSJung-uk Kim * the above Copyright Notice, the above License, this list of Conditions, 470d84335fSJung-uk Kim * and the following Disclaimer and Export Compliance provision. In addition, 480d84335fSJung-uk Kim * Licensee must cause all Covered Code to which Licensee contributes to 490d84335fSJung-uk Kim * contain a file documenting the changes Licensee made to create that Covered 500d84335fSJung-uk Kim * Code and the date of any change. Licensee must include in that file the 510d84335fSJung-uk Kim * documentation of any changes made by any predecessor Licensee. Licensee 520d84335fSJung-uk Kim * must include a prominent statement that the modification is derived, 530d84335fSJung-uk Kim * directly or indirectly, from Original Intel Code. 540d84335fSJung-uk Kim * 550d84335fSJung-uk Kim * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 560d84335fSJung-uk Kim * Redistribution of source code of any substantial portion of the Covered 570d84335fSJung-uk Kim * Code or modification without rights to further distribute source must 580d84335fSJung-uk Kim * include the following Disclaimer and Export Compliance provision in the 590d84335fSJung-uk Kim * documentation and/or other materials provided with distribution. In 600d84335fSJung-uk Kim * addition, Licensee may not authorize further sublicense of source of any 610d84335fSJung-uk Kim * portion of the Covered Code, and must include terms to the effect that the 620d84335fSJung-uk Kim * license from Licensee to its licensee is limited to the intellectual 630d84335fSJung-uk Kim * property embodied in the software Licensee provides to its licensee, and 640d84335fSJung-uk Kim * not to intellectual property embodied in modifications its licensee may 650d84335fSJung-uk Kim * make. 660d84335fSJung-uk Kim * 670d84335fSJung-uk Kim * 3.3. Redistribution of Executable. Redistribution in executable form of any 680d84335fSJung-uk Kim * substantial portion of the Covered Code or modification must reproduce the 690d84335fSJung-uk Kim * above Copyright Notice, and the following Disclaimer and Export Compliance 700d84335fSJung-uk Kim * provision in the documentation and/or other materials provided with the 710d84335fSJung-uk Kim * distribution. 720d84335fSJung-uk Kim * 730d84335fSJung-uk Kim * 3.4. Intel retains all right, title, and interest in and to the Original 740d84335fSJung-uk Kim * Intel Code. 750d84335fSJung-uk Kim * 760d84335fSJung-uk Kim * 3.5. Neither the name Intel nor any other trademark owned or controlled by 770d84335fSJung-uk Kim * Intel shall be used in advertising or otherwise to promote the sale, use or 780d84335fSJung-uk Kim * other dealings in products derived from or relating to the Covered Code 790d84335fSJung-uk Kim * without prior written authorization from Intel. 800d84335fSJung-uk Kim * 810d84335fSJung-uk Kim * 4. Disclaimer and Export Compliance 820d84335fSJung-uk Kim * 830d84335fSJung-uk Kim * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 840d84335fSJung-uk Kim * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 850d84335fSJung-uk Kim * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 860d84335fSJung-uk Kim * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 870d84335fSJung-uk Kim * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 880d84335fSJung-uk Kim * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 890d84335fSJung-uk Kim * PARTICULAR PURPOSE. 900d84335fSJung-uk Kim * 910d84335fSJung-uk Kim * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 920d84335fSJung-uk Kim * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 930d84335fSJung-uk Kim * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 940d84335fSJung-uk Kim * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 950d84335fSJung-uk Kim * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 960d84335fSJung-uk Kim * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 970d84335fSJung-uk Kim * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 980d84335fSJung-uk Kim * LIMITED REMEDY. 990d84335fSJung-uk Kim * 1000d84335fSJung-uk Kim * 4.3. Licensee shall not export, either directly or indirectly, any of this 1010d84335fSJung-uk Kim * software or system incorporating such software without first obtaining any 1020d84335fSJung-uk Kim * required license or other approval from the U. S. Department of Commerce or 1030d84335fSJung-uk Kim * any other agency or department of the United States Government. In the 1040d84335fSJung-uk Kim * event Licensee exports any such software from the United States or 1050d84335fSJung-uk Kim * re-exports any such software from a foreign destination, Licensee shall 1060d84335fSJung-uk Kim * ensure that the distribution and export/re-export of the software is in 1070d84335fSJung-uk Kim * compliance with all laws, regulations, orders, or other restrictions of the 1080d84335fSJung-uk Kim * U.S. Export Administration Regulations. Licensee agrees that neither it nor 1090d84335fSJung-uk Kim * any of its subsidiaries will export/re-export any technical data, process, 1100d84335fSJung-uk Kim * software, or service, directly or indirectly, to any country for which the 1110d84335fSJung-uk Kim * United States government or any agency thereof requires an export license, 1120d84335fSJung-uk Kim * other governmental approval, or letter of assurance, without first obtaining 1130d84335fSJung-uk Kim * such license, approval or letter. 1140d84335fSJung-uk Kim * 1150d84335fSJung-uk Kim ***************************************************************************** 1160d84335fSJung-uk Kim * 1170d84335fSJung-uk Kim * Alternatively, you may choose to be licensed under the terms of the 1180d84335fSJung-uk Kim * following license: 1190d84335fSJung-uk Kim * 1205ef50723SJung-uk Kim * Redistribution and use in source and binary forms, with or without 1215ef50723SJung-uk Kim * modification, are permitted provided that the following conditions 1225ef50723SJung-uk Kim * are met: 1235ef50723SJung-uk Kim * 1. Redistributions of source code must retain the above copyright 1245ef50723SJung-uk Kim * notice, this list of conditions, and the following disclaimer, 1255ef50723SJung-uk Kim * without modification. 1265ef50723SJung-uk Kim * 2. Redistributions in binary form must reproduce at minimum a disclaimer 1275ef50723SJung-uk Kim * substantially similar to the "NO WARRANTY" disclaimer below 1285ef50723SJung-uk Kim * ("Disclaimer") and any redistribution must be conditioned upon 1295ef50723SJung-uk Kim * including a substantially similar Disclaimer requirement for further 1305ef50723SJung-uk Kim * binary redistribution. 1315ef50723SJung-uk Kim * 3. Neither the names of the above-listed copyright holders nor the names 1325ef50723SJung-uk Kim * of any contributors may be used to endorse or promote products derived 1335ef50723SJung-uk Kim * from this software without specific prior written permission. 1345ef50723SJung-uk Kim * 1350d84335fSJung-uk Kim * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1360d84335fSJung-uk Kim * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1370d84335fSJung-uk Kim * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1380d84335fSJung-uk Kim * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1390d84335fSJung-uk Kim * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1400d84335fSJung-uk Kim * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1410d84335fSJung-uk Kim * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 1420d84335fSJung-uk Kim * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 1430d84335fSJung-uk Kim * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 1440d84335fSJung-uk Kim * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 1450d84335fSJung-uk Kim * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1460d84335fSJung-uk Kim * 1470d84335fSJung-uk Kim * Alternatively, you may choose to be licensed under the terms of the 1485ef50723SJung-uk Kim * GNU General Public License ("GPL") version 2 as published by the Free 1495ef50723SJung-uk Kim * Software Foundation. 1505ef50723SJung-uk Kim * 1510d84335fSJung-uk Kim *****************************************************************************/ 1525ef50723SJung-uk Kim 1535ef50723SJung-uk Kim #ifndef _ACCLIB_H 1545ef50723SJung-uk Kim #define _ACCLIB_H 1555ef50723SJung-uk Kim 1565ef50723SJung-uk Kim 1575ef50723SJung-uk Kim /* 1585ef50723SJung-uk Kim * Prototypes and macros for local implementations of C library functions 1595ef50723SJung-uk Kim */ 1605ef50723SJung-uk Kim 1615ef50723SJung-uk Kim /* is* functions. The AcpiGbl_Ctypes array is defined in utclib.c */ 1625ef50723SJung-uk Kim 1635ef50723SJung-uk Kim extern const UINT8 AcpiGbl_Ctypes[]; 1645ef50723SJung-uk Kim 1655ef50723SJung-uk Kim #define _ACPI_XA 0x00 /* extra alphabetic - not supported */ 1665ef50723SJung-uk Kim #define _ACPI_XS 0x40 /* extra space */ 1675ef50723SJung-uk Kim #define _ACPI_BB 0x00 /* BEL, BS, etc. - not supported */ 1685ef50723SJung-uk Kim #define _ACPI_CN 0x20 /* CR, FF, HT, NL, VT */ 1695ef50723SJung-uk Kim #define _ACPI_DI 0x04 /* '0'-'9' */ 1705ef50723SJung-uk Kim #define _ACPI_LO 0x02 /* 'a'-'z' */ 1715ef50723SJung-uk Kim #define _ACPI_PU 0x10 /* punctuation */ 1725ef50723SJung-uk Kim #define _ACPI_SP 0x08 /* space, tab, CR, LF, VT, FF */ 1735ef50723SJung-uk Kim #define _ACPI_UP 0x01 /* 'A'-'Z' */ 1745ef50723SJung-uk Kim #define _ACPI_XD 0x80 /* '0'-'9', 'A'-'F', 'a'-'f' */ 1755ef50723SJung-uk Kim 1765ef50723SJung-uk Kim #define isdigit(c) (AcpiGbl_Ctypes[(unsigned char)(c)] & (_ACPI_DI)) 1775ef50723SJung-uk Kim #define isspace(c) (AcpiGbl_Ctypes[(unsigned char)(c)] & (_ACPI_SP)) 1785ef50723SJung-uk Kim #define isxdigit(c) (AcpiGbl_Ctypes[(unsigned char)(c)] & (_ACPI_XD)) 1795ef50723SJung-uk Kim #define isupper(c) (AcpiGbl_Ctypes[(unsigned char)(c)] & (_ACPI_UP)) 1805ef50723SJung-uk Kim #define islower(c) (AcpiGbl_Ctypes[(unsigned char)(c)] & (_ACPI_LO)) 1815ef50723SJung-uk Kim #define isprint(c) (AcpiGbl_Ctypes[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP | _ACPI_DI | _ACPI_XS | _ACPI_PU)) 1825ef50723SJung-uk Kim #define isalpha(c) (AcpiGbl_Ctypes[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP)) 1835ef50723SJung-uk Kim 184493deb39SJung-uk Kim /* Error code */ 185493deb39SJung-uk Kim 186493deb39SJung-uk Kim #define EPERM 1 /* Operation not permitted */ 187493deb39SJung-uk Kim #define ENOENT 2 /* No such file or directory */ 188493deb39SJung-uk Kim #define EINTR 4 /* Interrupted system call */ 189493deb39SJung-uk Kim #define EIO 5 /* I/O error */ 190493deb39SJung-uk Kim #define EBADF 9 /* Bad file number */ 191493deb39SJung-uk Kim #define EAGAIN 11 /* Try again */ 192493deb39SJung-uk Kim #define ENOMEM 12 /* Out of memory */ 193493deb39SJung-uk Kim #define EACCES 13 /* Permission denied */ 194493deb39SJung-uk Kim #define EFAULT 14 /* Bad address */ 195493deb39SJung-uk Kim #define EBUSY 16 /* Device or resource busy */ 196493deb39SJung-uk Kim #define EEXIST 17 /* File exists */ 197493deb39SJung-uk Kim #define ENODEV 19 /* No such device */ 198493deb39SJung-uk Kim #define EINVAL 22 /* Invalid argument */ 199493deb39SJung-uk Kim #define EPIPE 32 /* Broken pipe */ 200493deb39SJung-uk Kim #define ERANGE 34 /* Math result not representable */ 2015ef50723SJung-uk Kim 2025ef50723SJung-uk Kim /* Strings */ 2035ef50723SJung-uk Kim 2045ef50723SJung-uk Kim char * 2055ef50723SJung-uk Kim strcat ( 2065ef50723SJung-uk Kim char *DstString, 2075ef50723SJung-uk Kim const char *SrcString); 2085ef50723SJung-uk Kim 2095ef50723SJung-uk Kim char * 2105ef50723SJung-uk Kim strchr ( 2115ef50723SJung-uk Kim const char *String, 2125ef50723SJung-uk Kim int ch); 2135ef50723SJung-uk Kim 2145ef50723SJung-uk Kim char * 21528482948SJung-uk Kim strpbrk ( 21628482948SJung-uk Kim const char *String, 21728482948SJung-uk Kim const char *Delimiters); 21828482948SJung-uk Kim 21928482948SJung-uk Kim char * 22028482948SJung-uk Kim strtok ( 22128482948SJung-uk Kim char *String, 22228482948SJung-uk Kim const char *Delimiters); 22328482948SJung-uk Kim 22428482948SJung-uk Kim char * 2255ef50723SJung-uk Kim strcpy ( 2265ef50723SJung-uk Kim char *DstString, 2275ef50723SJung-uk Kim const char *SrcString); 2285ef50723SJung-uk Kim 2295ef50723SJung-uk Kim int 2305ef50723SJung-uk Kim strcmp ( 2315ef50723SJung-uk Kim const char *String1, 2325ef50723SJung-uk Kim const char *String2); 2335ef50723SJung-uk Kim 2345ef50723SJung-uk Kim ACPI_SIZE 2355ef50723SJung-uk Kim strlen ( 2365ef50723SJung-uk Kim const char *String); 2375ef50723SJung-uk Kim 2385ef50723SJung-uk Kim char * 2395ef50723SJung-uk Kim strncat ( 2405ef50723SJung-uk Kim char *DstString, 2415ef50723SJung-uk Kim const char *SrcString, 2425ef50723SJung-uk Kim ACPI_SIZE Count); 2435ef50723SJung-uk Kim 2445ef50723SJung-uk Kim int 2455ef50723SJung-uk Kim strncmp ( 2465ef50723SJung-uk Kim const char *String1, 2475ef50723SJung-uk Kim const char *String2, 2485ef50723SJung-uk Kim ACPI_SIZE Count); 2495ef50723SJung-uk Kim 2505ef50723SJung-uk Kim char * 2515ef50723SJung-uk Kim strncpy ( 2525ef50723SJung-uk Kim char *DstString, 2535ef50723SJung-uk Kim const char *SrcString, 2545ef50723SJung-uk Kim ACPI_SIZE Count); 2555ef50723SJung-uk Kim 2565ef50723SJung-uk Kim char * 2575ef50723SJung-uk Kim strstr ( 2585ef50723SJung-uk Kim char *String1, 2595ef50723SJung-uk Kim char *String2); 2605ef50723SJung-uk Kim 2615ef50723SJung-uk Kim 2625ef50723SJung-uk Kim /* Conversion */ 2635ef50723SJung-uk Kim 2645ef50723SJung-uk Kim UINT32 2655ef50723SJung-uk Kim strtoul ( 2665ef50723SJung-uk Kim const char *String, 2675ef50723SJung-uk Kim char **Terminator, 2685ef50723SJung-uk Kim UINT32 Base); 2695ef50723SJung-uk Kim 2705ef50723SJung-uk Kim 2715ef50723SJung-uk Kim /* Memory */ 2725ef50723SJung-uk Kim 2735ef50723SJung-uk Kim int 2745ef50723SJung-uk Kim memcmp ( 2755ef50723SJung-uk Kim void *Buffer1, 2765ef50723SJung-uk Kim void *Buffer2, 2775ef50723SJung-uk Kim ACPI_SIZE Count); 2785ef50723SJung-uk Kim 2795ef50723SJung-uk Kim void * 2805ef50723SJung-uk Kim memcpy ( 2815ef50723SJung-uk Kim void *Dest, 2825ef50723SJung-uk Kim const void *Src, 2835ef50723SJung-uk Kim ACPI_SIZE Count); 2845ef50723SJung-uk Kim 2855ef50723SJung-uk Kim void * 28628482948SJung-uk Kim memmove ( 28728482948SJung-uk Kim void *Dest, 28828482948SJung-uk Kim const void *Src, 28928482948SJung-uk Kim ACPI_SIZE Count); 29028482948SJung-uk Kim 29128482948SJung-uk Kim void * 2925ef50723SJung-uk Kim memset ( 2935ef50723SJung-uk Kim void *Dest, 2945ef50723SJung-uk Kim int Value, 2955ef50723SJung-uk Kim ACPI_SIZE Count); 2965ef50723SJung-uk Kim 2975ef50723SJung-uk Kim 2985ef50723SJung-uk Kim /* upper/lower case */ 2995ef50723SJung-uk Kim 3005ef50723SJung-uk Kim int 3015ef50723SJung-uk Kim tolower ( 3025ef50723SJung-uk Kim int c); 3035ef50723SJung-uk Kim 3045ef50723SJung-uk Kim int 3055ef50723SJung-uk Kim toupper ( 3065ef50723SJung-uk Kim int c); 3075ef50723SJung-uk Kim 308493deb39SJung-uk Kim /* 309493deb39SJung-uk Kim * utprint - printf/vprintf output functions 310493deb39SJung-uk Kim */ 311493deb39SJung-uk Kim const char * 312493deb39SJung-uk Kim AcpiUtScanNumber ( 313493deb39SJung-uk Kim const char *String, 314493deb39SJung-uk Kim UINT64 *NumberPtr); 315493deb39SJung-uk Kim 316493deb39SJung-uk Kim const char * 317493deb39SJung-uk Kim AcpiUtPrintNumber ( 318493deb39SJung-uk Kim char *String, 319493deb39SJung-uk Kim UINT64 Number); 320493deb39SJung-uk Kim 321493deb39SJung-uk Kim int 322493deb39SJung-uk Kim vsnprintf ( 323493deb39SJung-uk Kim char *String, 324493deb39SJung-uk Kim ACPI_SIZE Size, 325493deb39SJung-uk Kim const char *Format, 326493deb39SJung-uk Kim va_list Args); 327493deb39SJung-uk Kim 328493deb39SJung-uk Kim int 329493deb39SJung-uk Kim snprintf ( 330493deb39SJung-uk Kim char *String, 331493deb39SJung-uk Kim ACPI_SIZE Size, 332493deb39SJung-uk Kim const char *Format, 333493deb39SJung-uk Kim ...); 334493deb39SJung-uk Kim 335493deb39SJung-uk Kim int 336493deb39SJung-uk Kim sprintf ( 337493deb39SJung-uk Kim char *String, 338493deb39SJung-uk Kim const char *Format, 339493deb39SJung-uk Kim ...); 340493deb39SJung-uk Kim 341493deb39SJung-uk Kim #ifdef ACPI_APPLICATION 342493deb39SJung-uk Kim #define SEEK_SET 0 343493deb39SJung-uk Kim #define SEEK_CUR 1 344493deb39SJung-uk Kim #define SEEK_END 2 345493deb39SJung-uk Kim 346493deb39SJung-uk Kim /* 347493deb39SJung-uk Kim * NOTE: Currently we only need to update errno for file IOs. Other 348cd6518c7SJung-uk Kim * Clibrary invocations in ACPICA do not make decisions according to 349493deb39SJung-uk Kim * the errno. 350493deb39SJung-uk Kim */ 351493deb39SJung-uk Kim extern int errno; 352493deb39SJung-uk Kim 35328482948SJung-uk Kim #ifndef EOF 35428482948SJung-uk Kim #define EOF (-1) 35528482948SJung-uk Kim #endif 35628482948SJung-uk Kim 35728482948SJung-uk Kim #define putchar(c) fputc(stdout, c) 35828482948SJung-uk Kim #define getchar(c) fgetc(stdin) 35928482948SJung-uk Kim 360493deb39SJung-uk Kim int 361493deb39SJung-uk Kim vprintf ( 362493deb39SJung-uk Kim const char *Format, 363493deb39SJung-uk Kim va_list Args); 364493deb39SJung-uk Kim 365493deb39SJung-uk Kim int 366493deb39SJung-uk Kim printf ( 367493deb39SJung-uk Kim const char *Format, 368493deb39SJung-uk Kim ...); 369493deb39SJung-uk Kim 370493deb39SJung-uk Kim int 371493deb39SJung-uk Kim vfprintf ( 372493deb39SJung-uk Kim FILE *File, 373493deb39SJung-uk Kim const char *Format, 374493deb39SJung-uk Kim va_list Args); 375493deb39SJung-uk Kim 376493deb39SJung-uk Kim int 377493deb39SJung-uk Kim fprintf ( 378493deb39SJung-uk Kim FILE *File, 379493deb39SJung-uk Kim const char *Format, 380493deb39SJung-uk Kim ...); 381493deb39SJung-uk Kim 382493deb39SJung-uk Kim FILE * 383493deb39SJung-uk Kim fopen ( 384493deb39SJung-uk Kim const char *Path, 385493deb39SJung-uk Kim const char *Modes); 386493deb39SJung-uk Kim 387493deb39SJung-uk Kim void 388493deb39SJung-uk Kim fclose ( 389493deb39SJung-uk Kim FILE *File); 390493deb39SJung-uk Kim 391493deb39SJung-uk Kim int 392493deb39SJung-uk Kim fread ( 393493deb39SJung-uk Kim void *Buffer, 394493deb39SJung-uk Kim ACPI_SIZE Size, 395493deb39SJung-uk Kim ACPI_SIZE Count, 396493deb39SJung-uk Kim FILE *File); 397493deb39SJung-uk Kim 398493deb39SJung-uk Kim int 399493deb39SJung-uk Kim fwrite ( 400493deb39SJung-uk Kim void *Buffer, 401493deb39SJung-uk Kim ACPI_SIZE Size, 402493deb39SJung-uk Kim ACPI_SIZE Count, 403493deb39SJung-uk Kim FILE *File); 404493deb39SJung-uk Kim 405493deb39SJung-uk Kim int 406493deb39SJung-uk Kim fseek ( 407493deb39SJung-uk Kim FILE *File, 408493deb39SJung-uk Kim long Offset, 409493deb39SJung-uk Kim int From); 410493deb39SJung-uk Kim 411493deb39SJung-uk Kim long 412493deb39SJung-uk Kim ftell ( 413493deb39SJung-uk Kim FILE *File); 41428482948SJung-uk Kim 41528482948SJung-uk Kim int 41628482948SJung-uk Kim fgetc ( 41728482948SJung-uk Kim FILE *File); 41828482948SJung-uk Kim 41928482948SJung-uk Kim int 42028482948SJung-uk Kim fputc ( 42128482948SJung-uk Kim FILE *File, 42228482948SJung-uk Kim char c); 42328482948SJung-uk Kim 42428482948SJung-uk Kim char * 42528482948SJung-uk Kim fgets ( 42628482948SJung-uk Kim char *s, 42728482948SJung-uk Kim ACPI_SIZE Size, 42828482948SJung-uk Kim FILE *File); 429493deb39SJung-uk Kim #endif 430493deb39SJung-uk Kim 4315ef50723SJung-uk Kim #endif /* _ACCLIB_H */ 432