Home | History | Annotate | Line # | Download | only in acpibin
acpibin.h revision 1.1
      1  1.1  jruoho 
      2  1.1  jruoho /******************************************************************************
      3  1.1  jruoho  *
      4  1.1  jruoho  * Module Name: acpibinh - Include file for AcpiBin utility
      5  1.1  jruoho  *
      6  1.1  jruoho  *****************************************************************************/
      7  1.1  jruoho 
      8  1.1  jruoho /*
      9  1.1  jruoho  * Copyright (C) 2000 - 2011, Intel Corp.
     10  1.1  jruoho  * All rights reserved.
     11  1.1  jruoho  *
     12  1.1  jruoho  * Redistribution and use in source and binary forms, with or without
     13  1.1  jruoho  * modification, are permitted provided that the following conditions
     14  1.1  jruoho  * are met:
     15  1.1  jruoho  * 1. Redistributions of source code must retain the above copyright
     16  1.1  jruoho  *    notice, this list of conditions, and the following disclaimer,
     17  1.1  jruoho  *    without modification.
     18  1.1  jruoho  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
     19  1.1  jruoho  *    substantially similar to the "NO WARRANTY" disclaimer below
     20  1.1  jruoho  *    ("Disclaimer") and any redistribution must be conditioned upon
     21  1.1  jruoho  *    including a substantially similar Disclaimer requirement for further
     22  1.1  jruoho  *    binary redistribution.
     23  1.1  jruoho  * 3. Neither the names of the above-listed copyright holders nor the names
     24  1.1  jruoho  *    of any contributors may be used to endorse or promote products derived
     25  1.1  jruoho  *    from this software without specific prior written permission.
     26  1.1  jruoho  *
     27  1.1  jruoho  * Alternatively, this software may be distributed under the terms of the
     28  1.1  jruoho  * GNU General Public License ("GPL") version 2 as published by the Free
     29  1.1  jruoho  * Software Foundation.
     30  1.1  jruoho  *
     31  1.1  jruoho  * NO WARRANTY
     32  1.1  jruoho  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     33  1.1  jruoho  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     34  1.1  jruoho  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
     35  1.1  jruoho  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
     36  1.1  jruoho  * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     37  1.1  jruoho  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     38  1.1  jruoho  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     39  1.1  jruoho  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
     40  1.1  jruoho  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
     41  1.1  jruoho  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     42  1.1  jruoho  * POSSIBILITY OF SUCH DAMAGES.
     43  1.1  jruoho  */
     44  1.1  jruoho 
     45  1.1  jruoho #include "acpi.h"
     46  1.1  jruoho #include "accommon.h"
     47  1.1  jruoho 
     48  1.1  jruoho #include <stdio.h>
     49  1.1  jruoho #include <sys/stat.h>
     50  1.1  jruoho #include <sys/types.h>
     51  1.1  jruoho #include <fcntl.h>
     52  1.1  jruoho #include <ctype.h>
     53  1.1  jruoho #include <errno.h>
     54  1.1  jruoho 
     55  1.1  jruoho #ifdef WIN32
     56  1.1  jruoho #include <stdlib.h>
     57  1.1  jruoho #include <io.h>
     58  1.1  jruoho #include <direct.h>
     59  1.1  jruoho #endif
     60  1.1  jruoho 
     61  1.1  jruoho /* O_BINARY is not always defined */
     62  1.1  jruoho #ifndef O_BINARY
     63  1.1  jruoho #define O_BINARY    0x0
     64  1.1  jruoho #endif
     65  1.1  jruoho 
     66  1.1  jruoho #define DB_CONSOLE_OUTPUT            0x02
     67  1.1  jruoho #define ACPI_DB_REDIRECTABLE_OUTPUT  0x01
     68  1.1  jruoho 
     69  1.1  jruoho /*
     70  1.1  jruoho  * Global variables.  Defined in main.c only, externed in all other files
     71  1.1  jruoho  */
     72  1.1  jruoho 
     73  1.1  jruoho #ifdef _DECLARE_GLOBALS
     74  1.1  jruoho #define EXTERN
     75  1.1  jruoho #define INIT_GLOBAL(a,b)        a=b
     76  1.1  jruoho #else
     77  1.1  jruoho #define EXTERN                  extern
     78  1.1  jruoho #define INIT_GLOBAL(a,b)        a
     79  1.1  jruoho #endif
     80  1.1  jruoho 
     81  1.1  jruoho 
     82  1.1  jruoho /* Globals */
     83  1.1  jruoho 
     84  1.1  jruoho EXTERN BOOLEAN              INIT_GLOBAL (Gbl_TerseMode, FALSE);
     85  1.1  jruoho EXTERN FILE                 INIT_GLOBAL (*AcpiGbl_DebugFile, NULL);
     86  1.1  jruoho 
     87  1.1  jruoho 
     88  1.1  jruoho /* Prototypes */
     89  1.1  jruoho 
     90  1.1  jruoho int
     91  1.1  jruoho AbCompareAmlFiles (
     92  1.1  jruoho     char                    *File1Path,
     93  1.1  jruoho     char                    *File2Path);
     94  1.1  jruoho 
     95  1.1  jruoho int
     96  1.1  jruoho AbExtractAmlFile (
     97  1.1  jruoho     char                    *TableSig,
     98  1.1  jruoho     char                    *File1Path,
     99  1.1  jruoho     char                    *File2Path);
    100  1.1  jruoho 
    101  1.1  jruoho int
    102  1.1  jruoho AbDumpAmlFile (
    103  1.1  jruoho     char                    *File1Path,
    104  1.1  jruoho     char                    *File2Path);
    105  1.1  jruoho 
    106  1.1  jruoho void
    107  1.1  jruoho AbComputeChecksum (
    108  1.1  jruoho     char                    *File1Path);
    109  1.1  jruoho 
    110  1.1  jruoho void
    111  1.1  jruoho AbDisplayHeader (
    112  1.1  jruoho     char                    *File1Path);
    113  1.1  jruoho 
    114