mirror of
https://github.com/acpica/acpica/
synced 2025-01-27 19:55:25 +03:00
Deploy common signon/header for all ACPICA tools.
Common signon with version,32/64 width,date,copyright.
This commit is contained in:
parent
d01d91a34c
commit
16da8c8163
@ -612,10 +612,10 @@ AdDisassemblerHeader (
|
||||
|
||||
/* Header and input table info */
|
||||
|
||||
AcpiOsPrintf ("/*\n * Intel ACPI Component Architecture\n");
|
||||
AcpiOsPrintf (" * AML Disassembler version %8.8X\n", ACPI_CA_VERSION);
|
||||
AcpiOsPrintf ("/*\n");
|
||||
AcpiOsPrintf (ACPI_COMMON_HEADER ("AML Disassembler", " * "));
|
||||
|
||||
AcpiOsPrintf (" *\n * Disassembly of %s, %s", Filename, ctime (&Timer));
|
||||
AcpiOsPrintf (" * Disassembly of %s, %s", Filename, ctime (&Timer));
|
||||
AcpiOsPrintf (" *\n");
|
||||
}
|
||||
|
||||
|
@ -513,11 +513,11 @@ CgWriteTableHeader (
|
||||
|
||||
/* Compiler ID */
|
||||
|
||||
strncpy (TableHeader.AslCompilerId, CompilerCreatorId, 4);
|
||||
strncpy (TableHeader.AslCompilerId, ASL_CREATOR_ID, 4);
|
||||
|
||||
/* Compiler version */
|
||||
|
||||
TableHeader.AslCompilerRevision = CompilerCreatorRevision;
|
||||
TableHeader.AslCompilerRevision = ASL_REVISION;
|
||||
|
||||
/* Table length. Checksum zero for now, will rewrite later */
|
||||
|
||||
|
@ -117,6 +117,7 @@
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include "aslcompiler.h"
|
||||
#include <acapps.h>
|
||||
|
||||
#define _COMPONENT ACPI_COMPILER
|
||||
ACPI_MODULE_NAME ("aslcompile")
|
||||
@ -155,6 +156,7 @@ AslCompilerSignon (
|
||||
UINT32 FileId)
|
||||
{
|
||||
char *Prefix = "";
|
||||
char *UtilityName;
|
||||
|
||||
|
||||
/* Set line prefix depending on the destination file type */
|
||||
@ -192,36 +194,21 @@ AslCompilerSignon (
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* Compiler signon with copyright
|
||||
*/
|
||||
FlPrintFile (FileId,
|
||||
"%s\n%s%s\n%s",
|
||||
Prefix,
|
||||
Prefix, IntelAcpiCA,
|
||||
Prefix);
|
||||
|
||||
/* Running compiler or disassembler? */
|
||||
|
||||
if (Gbl_DisasmFlag)
|
||||
{
|
||||
FlPrintFile (FileId,
|
||||
"%s", DisassemblerId);
|
||||
UtilityName = AML_DISASSEMBLER_NAME;
|
||||
}
|
||||
else
|
||||
{
|
||||
FlPrintFile (FileId,
|
||||
"%s", CompilerId);
|
||||
UtilityName = ASL_COMPILER_NAME;
|
||||
}
|
||||
|
||||
/* Version, build date, copyright, compliance */
|
||||
/* Compiler signon with copyright */
|
||||
|
||||
FlPrintFile (FileId,
|
||||
" version %X [%s]\n%s%s\n%s%s\n%s\n",
|
||||
(UINT32) ACPI_CA_VERSION, __DATE__,
|
||||
Prefix, CompilerCopyright,
|
||||
Prefix, CompilerCompliance,
|
||||
Prefix);
|
||||
FlPrintFile (FileId, "%s\n", Prefix);
|
||||
FlPrintFile (FileId, ACPI_COMMON_HEADER (UtilityName, Prefix));
|
||||
}
|
||||
|
||||
|
||||
|
@ -122,15 +122,13 @@
|
||||
/*
|
||||
* Compiler versions and names
|
||||
*/
|
||||
#define CompilerCreatorRevision ACPI_CA_VERSION
|
||||
#define ASL_REVISION ACPI_CA_VERSION
|
||||
#define ASL_COMPILER_NAME "ASL Optimizing Compiler"
|
||||
#define AML_DISASSEMBLER_NAME "AML Disassembler"
|
||||
#define ASL_INVOCATION_NAME "iasl"
|
||||
#define ASL_CREATOR_ID "INTL"
|
||||
|
||||
#define IntelAcpiCA "Intel ACPI Component Architecture"
|
||||
#define CompilerId "ASL Optimizing Compiler"
|
||||
#define DisassemblerId "AML Disassembler"
|
||||
#define CompilerCopyright "Copyright (c) 2000 - 2010 Intel Corporation"
|
||||
#define CompilerCompliance "Supports ACPI Specification Revision 4.0a"
|
||||
#define CompilerName "iasl"
|
||||
#define CompilerCreatorId "INTL"
|
||||
#define ASL_COMPLIANCE "Supports ACPI Specification Revision 4.0a"
|
||||
|
||||
|
||||
/* Configuration constants */
|
||||
|
@ -296,7 +296,8 @@ Usage (
|
||||
void)
|
||||
{
|
||||
|
||||
printf ("Usage: %s [Options] [Files]\n\n", CompilerName);
|
||||
printf ("%s\n", ASL_COMPLIANCE);
|
||||
printf ("Usage: %s [Options] [Files]\n\n", ASL_INVOCATION_NAME);
|
||||
Options ();
|
||||
}
|
||||
|
||||
@ -903,7 +904,7 @@ AslCommandLine (
|
||||
|
||||
if (argc < 2)
|
||||
{
|
||||
AslCompilerSignon (ASL_FILE_STDOUT);
|
||||
printf (ACPI_COMMON_SIGNON (ASL_COMPILER_NAME));
|
||||
Usage ();
|
||||
exit (1);
|
||||
}
|
||||
@ -934,7 +935,7 @@ AslCommandLine (
|
||||
|
||||
if (Gbl_DoSignon)
|
||||
{
|
||||
AslCompilerSignon (ASL_FILE_STDOUT);
|
||||
printf (ACPI_COMMON_SIGNON (ASL_COMPILER_NAME));
|
||||
}
|
||||
|
||||
/* Abort if anything went wrong on the command line */
|
||||
|
@ -120,6 +120,7 @@
|
||||
#include "acdisasm.h"
|
||||
#include "acnamesp.h"
|
||||
#include "amlcode.h"
|
||||
#include <acapps.h>
|
||||
|
||||
#define _COMPONENT ACPI_COMPILER
|
||||
ACPI_MODULE_NAME ("aslutils")
|
||||
@ -566,8 +567,8 @@ UtDisplaySummary (
|
||||
{
|
||||
/* Compiler name and version number */
|
||||
|
||||
FlPrintFile (FileId, "%s version %X [%s]\n",
|
||||
CompilerId, (UINT32) ACPI_CA_VERSION, __DATE__);
|
||||
FlPrintFile (FileId, "%s version %X%s [%s]\n",
|
||||
ASL_COMPILER_NAME, (UINT32) ACPI_CA_VERSION, ACPI_WIDTH, __DATE__);
|
||||
}
|
||||
|
||||
if (Gbl_FileType == ASL_INPUT_TYPE_ASCII_DATA)
|
||||
|
@ -314,7 +314,7 @@ DtInsertCompilerIds (
|
||||
Next = Next->Next;
|
||||
}
|
||||
|
||||
Next->Value = CompilerCreatorId;
|
||||
Next->Value = ASL_CREATOR_ID;
|
||||
Next->Flags = DT_FIELD_NOT_ALLOCATED;
|
||||
|
||||
Next = Next->Next;
|
||||
|
@ -377,9 +377,9 @@ DtCreateOneTemplate (
|
||||
|
||||
AcpiOsRedirectOutput (File);
|
||||
|
||||
AcpiOsPrintf ("/*\n * %s\n", IntelAcpiCA);
|
||||
AcpiOsPrintf (" * iASL Compiler/Disassembler version %8.8X\n *\n",
|
||||
ACPI_CA_VERSION);
|
||||
AcpiOsPrintf ("/*\n");
|
||||
AcpiOsPrintf (ACPI_COMMON_HEADER ("iASL Compiler/Disassembler", " * "));
|
||||
|
||||
AcpiOsPrintf (" * Template for [%4.4s] ACPI Table\n",
|
||||
Signature);
|
||||
|
||||
|
32
source/include/acapps.h
Normal file → Executable file
32
source/include/acapps.h
Normal file → Executable file
@ -121,6 +121,38 @@
|
||||
#pragma warning(disable:4100) /* warning C4100: unreferenced formal parameter */
|
||||
#endif
|
||||
|
||||
/* Common info for tool signons */
|
||||
|
||||
#define ACPICA_NAME "Intel ACPI Component Architecture"
|
||||
#define ACPICA_COPYRIGHT "Copyright (c) 2000 - 2010 Intel Corporation"
|
||||
|
||||
#if ACPI_MACHINE_WIDTH == 64
|
||||
#define ACPI_WIDTH "-64"
|
||||
|
||||
#elif ACPI_MACHINE_WIDTH == 32
|
||||
#define ACPI_WIDTH "-32"
|
||||
|
||||
#else
|
||||
#error unknown ACPI_MACHINE_WIDTH
|
||||
#define ACPI_WIDTH "-??"
|
||||
|
||||
#endif
|
||||
|
||||
/* Macros for signons and file headers */
|
||||
|
||||
#define ACPI_COMMON_SIGNON(UtilityName) \
|
||||
"\n%s\n%s version %8.8X%s [%s]\n%s\n\n", \
|
||||
ACPICA_NAME, \
|
||||
UtilityName, ((UINT32) ACPI_CA_VERSION), ACPI_WIDTH, __DATE__, \
|
||||
ACPICA_COPYRIGHT
|
||||
|
||||
#define ACPI_COMMON_HEADER(UtilityName, Prefix) \
|
||||
"%s%s\n%s%s version %8.8X%s [%s]\n%s%s\n%s\n", \
|
||||
Prefix, ACPICA_NAME, \
|
||||
Prefix, UtilityName, ((UINT32) ACPI_CA_VERSION), ACPI_WIDTH, __DATE__, \
|
||||
Prefix, ACPICA_COPYRIGHT, \
|
||||
Prefix
|
||||
|
||||
#define FILE_SUFFIX_DISASSEMBLY "dsl"
|
||||
#define ACPI_TABLE_FILE_SUFFIX ".dat"
|
||||
|
||||
|
@ -177,9 +177,7 @@ main (
|
||||
|
||||
|
||||
AcpiOsInitialize ();
|
||||
|
||||
printf ("\nACPI Binary Utility for AML files version %X [%s]\n\n",
|
||||
ACPI_CA_VERSION, __DATE__);
|
||||
printf (ACPI_COMMON_SIGNON ("ACPI Binary AML File Utility"));
|
||||
|
||||
if (argc < 2)
|
||||
{
|
||||
|
@ -455,9 +455,7 @@ main (
|
||||
_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG));
|
||||
#endif
|
||||
|
||||
printf ("\nIntel ACPI Component Architecture\nAML Execution/Debug Utility");
|
||||
printf (" version %8.8X", ((UINT32) ACPI_CA_VERSION));
|
||||
printf (" [%s]\n\n", __DATE__);
|
||||
printf (ACPI_COMMON_SIGNON ("AML Execution/Debug Utility"));
|
||||
|
||||
if (argc < 2)
|
||||
{
|
||||
|
@ -372,9 +372,7 @@ main (
|
||||
UINT32 FileType;
|
||||
|
||||
|
||||
printf ("ACPI Source Code Conversion Utility");
|
||||
printf (" version %8.8X", ((UINT32) ACPI_CA_VERSION));
|
||||
printf (" [%s]\n\n", __DATE__);
|
||||
printf (ACPI_COMMON_SIGNON ("ACPI Source Code Conversion Utility"));
|
||||
|
||||
if (argc < 2)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user