diff options
Diffstat (limited to 'source/tools/acpisrc')
-rw-r--r-- | source/tools/acpisrc/acpisrc.h | 11 | ||||
-rw-r--r-- | source/tools/acpisrc/ascase.c | 2 | ||||
-rw-r--r-- | source/tools/acpisrc/asconvrt.c | 2 | ||||
-rw-r--r-- | source/tools/acpisrc/asfile.c | 13 | ||||
-rw-r--r-- | source/tools/acpisrc/asmain.c | 12 | ||||
-rw-r--r-- | source/tools/acpisrc/asremove.c | 2 | ||||
-rw-r--r-- | source/tools/acpisrc/astable.c | 71 | ||||
-rw-r--r-- | source/tools/acpisrc/asutils.c | 2 |
8 files changed, 103 insertions, 12 deletions
diff --git a/source/tools/acpisrc/acpisrc.h b/source/tools/acpisrc/acpisrc.h index 101083deed5b..cdf7f0d99b33 100644 --- a/source/tools/acpisrc/acpisrc.h +++ b/source/tools/acpisrc/acpisrc.h @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -70,6 +70,7 @@ #define FILE_TYPE_SOURCE 1 #define FILE_TYPE_HEADER 2 #define FILE_TYPE_DIRECTORY 3 +#define FILE_TYPE_PATCH 4 #define CVT_COUNT_TABS 0x00000001 #define CVT_COUNT_NON_ANSI_COMMENTS 0x00000002 @@ -189,6 +190,14 @@ typedef struct acpi_conversion_table ACPI_IDENTIFIER_TABLE *HeaderSpecialMacroTable; UINT32 HeaderFunctions; + ACPI_STRING_TABLE *PatchStringTable; + ACPI_IDENTIFIER_TABLE *PatchLineTable; + ACPI_IDENTIFIER_TABLE *PatchConditionalTable; + ACPI_IDENTIFIER_TABLE *PatchMacroTable; + ACPI_TYPED_IDENTIFIER_TABLE *PatchStructTable; + ACPI_IDENTIFIER_TABLE *PatchSpecialMacroTable; + UINT32 PatchFunctions; + } ACPI_CONVERSION_TABLE; diff --git a/source/tools/acpisrc/ascase.c b/source/tools/acpisrc/ascase.c index 919029a2cffb..2007acc84584 100644 --- a/source/tools/acpisrc/ascase.c +++ b/source/tools/acpisrc/ascase.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/tools/acpisrc/asconvrt.c b/source/tools/acpisrc/asconvrt.c index 76db87133017..53c0c5454059 100644 --- a/source/tools/acpisrc/asconvrt.c +++ b/source/tools/acpisrc/asconvrt.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/tools/acpisrc/asfile.c b/source/tools/acpisrc/asfile.c index e28a4cf0a777..42cefa46e88e 100644 --- a/source/tools/acpisrc/asfile.c +++ b/source/tools/acpisrc/asfile.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -334,6 +334,17 @@ AsConvertFile ( SpecialMacroTable = ConversionTable->HeaderSpecialMacroTable; break; + case FILE_TYPE_PATCH: + + Functions = ConversionTable->PatchFunctions; + StringTable = ConversionTable->PatchStringTable; + LineTable = ConversionTable->PatchLineTable; + ConditionalTable = ConversionTable->PatchConditionalTable; + MacroTable = ConversionTable->PatchMacroTable; + StructTable = ConversionTable->PatchStructTable; + SpecialMacroTable = ConversionTable->PatchSpecialMacroTable; + break; + default: printf ("Unknown file type, cannot process\n"); diff --git a/source/tools/acpisrc/asmain.c b/source/tools/acpisrc/asmain.c index 9ce25a5df9c6..8c75769c5196 100644 --- a/source/tools/acpisrc/asmain.c +++ b/source/tools/acpisrc/asmain.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -495,10 +495,18 @@ main ( { AsProcessOneFile (ConversionTable, NULL, TargetPath, 0, SourcePath, FILE_TYPE_HEADER); } - else + else if (strstr (SourcePath, ".c")) { AsProcessOneFile (ConversionTable, NULL, TargetPath, 0, SourcePath, FILE_TYPE_SOURCE); } + else if (strstr (SourcePath, ".patch")) + { + AsProcessOneFile (ConversionTable, NULL, TargetPath, 0, SourcePath, FILE_TYPE_PATCH); + } + else + { + printf ("Unknown file type - %s\n", SourcePath); + } } /* Always display final summary and stats */ diff --git a/source/tools/acpisrc/asremove.c b/source/tools/acpisrc/asremove.c index 78cbd6ef5d6c..1d4fe5f92b90 100644 --- a/source/tools/acpisrc/asremove.c +++ b/source/tools/acpisrc/asremove.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/tools/acpisrc/astable.c b/source/tools/acpisrc/astable.c index 081767b19ea2..7c3d663695c9 100644 --- a/source/tools/acpisrc/astable.c +++ b/source/tools/acpisrc/astable.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -90,7 +90,7 @@ ACPI_STRING_TABLE StandardDataTypes[] = { char DualLicenseHeader[] = "/*\n" -" * Copyright (C) 2000 - 2013, Intel Corp.\n" +" * Copyright (C) 2000 - 2014, Intel Corp.\n" " * All rights reserved.\n" " *\n" " * Redistribution and use in source and binary forms, with or without\n" @@ -761,6 +761,17 @@ ACPI_CONVERSION_TABLE LinuxConversionTable = { CVT_TRIM_LINES | CVT_MIXED_CASE_TO_UNDERSCORES | CVT_LOWER_CASE_IDENTIFIERS | CVT_TRIM_WHITESPACE | CVT_REMOVE_EMPTY_BLOCKS| CVT_REDUCE_TYPEDEFS | CVT_SPACES_TO_TABS8), + + /* Patch files */ + + LinuxDataTypes, + NULL, + NULL, + NULL, + AcpiIdentifiers, + NULL, + (CVT_COUNT_TABS | CVT_COUNT_NON_ANSI_COMMENTS | CVT_COUNT_LINES | + CVT_MIXED_CASE_TO_UNDERSCORES), }; @@ -796,6 +807,16 @@ ACPI_CONVERSION_TABLE CleanupConversionTable = { NULL, (CVT_COUNT_TABS | CVT_COUNT_NON_ANSI_COMMENTS | CVT_COUNT_LINES | CVT_TRIM_LINES | CVT_TRIM_WHITESPACE), + + /* Patch files */ + + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + (CVT_COUNT_TABS | CVT_COUNT_NON_ANSI_COMMENTS | CVT_COUNT_LINES), }; @@ -826,6 +847,17 @@ ACPI_CONVERSION_TABLE StatsConversionTable = { NULL, (CVT_COUNT_TABS | CVT_COUNT_NON_ANSI_COMMENTS | CVT_COUNT_LINES | CVT_COUNT_SHORTMULTILINE_COMMENTS), + + /* Patch files */ + + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + (CVT_COUNT_TABS | CVT_COUNT_NON_ANSI_COMMENTS | CVT_COUNT_LINES | + CVT_COUNT_SHORTMULTILINE_COMMENTS), }; @@ -862,6 +894,17 @@ ACPI_CONVERSION_TABLE LicenseConversionTable = { NULL, (CVT_COUNT_TABS | CVT_COUNT_NON_ANSI_COMMENTS | CVT_COUNT_LINES | CVT_COUNT_SHORTMULTILINE_COMMENTS), + + /* Patch files */ + + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + (CVT_COUNT_TABS | CVT_COUNT_NON_ANSI_COMMENTS | CVT_COUNT_LINES | + CVT_COUNT_SHORTMULTILINE_COMMENTS), }; @@ -874,8 +917,8 @@ ACPI_CONVERSION_TABLE LicenseConversionTable = { ACPI_STRING_TABLE CustomReplacements[] = { - {"(c) 1999 - 2012", "(c) 1999 - 2013", REPLACE_WHOLE_WORD}, /* Main ACPICA source */ - {"(c) 2006 - 2012", "(c) 2006 - 2013", REPLACE_WHOLE_WORD}, /* Test suites */ + {"(c) 1999 - 2013", "(c) 1999 - 2014", REPLACE_WHOLE_WORD}, /* Main ACPICA source */ + {"(c) 2006 - 2013", "(c) 2006 - 2014", REPLACE_WHOLE_WORD}, /* Test suites */ #if 0 {"SUPPORT, ASSISTANCE", "SUPPORT, ASSISTANCE", REPLACE_WHOLE_WORD}, /* Fix intel header */ @@ -953,6 +996,16 @@ ACPI_CONVERSION_TABLE CustomConversionTable = { NULL, (CVT_COUNT_TABS | CVT_COUNT_NON_ANSI_COMMENTS | CVT_COUNT_LINES | CVT_TRIM_LINES | CVT_TRIM_WHITESPACE), + + /* C header files */ + + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + (CVT_COUNT_TABS | CVT_COUNT_NON_ANSI_COMMENTS | CVT_COUNT_LINES), }; @@ -990,4 +1043,14 @@ ACPI_CONVERSION_TABLE IndentConversionTable = { LinuxSpecialMacros, (CVT_COUNT_TABS | CVT_COUNT_NON_ANSI_COMMENTS | CVT_COUNT_LINES | CVT_TRIM_LINES | CVT_TRIM_WHITESPACE), + + /* C header files */ + + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + (CVT_COUNT_TABS | CVT_COUNT_NON_ANSI_COMMENTS | CVT_COUNT_LINES), }; diff --git a/source/tools/acpisrc/asutils.c b/source/tools/acpisrc/asutils.c index a35859696546..050d343388ba 100644 --- a/source/tools/acpisrc/asutils.c +++ b/source/tools/acpisrc/asutils.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without |