Utilities: Fix local printf issue found for parsed format types.

The following commit has fixed local printf issue in width.prec:

  Commit: 6de9d1e3f1f9383dbe46e2454297873229b59234
  Subject: Utilities: Fix local printf issue.

But this commit only resets width/precision/quialifier to fix the reported
issue and doesn't fix other states issues. So now we still can see breakage
in format types and integer bases.

This patch resets format type/base states for local printf to fix this
issue. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Applications: Enable USE_NATIVE_ALLOCATE_ZEROED environment for all applications.

We now safe to enable USE_NATIVE_ALLOCATE_ZEROED for all applications as
there are implementations in oswinxf.c, osunixxf.c and osefixf.c. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Yizhe Wang <yizhe.wang@intel.com>
Clib: Add porting layer for print APIs.

This patch:
1. Adds AcpiUtVprintf()/AcpiUtPrintf() support.
2. Adds default stdout for AcpiUtFileVprintf()/AcpiUtFilePrintf().
3. Adds wrapper layer for AcpiUtSnprintf()/AcpiUtVsnprintf(),
   AcpiUtFileVprintf()/AcpiUtFilePrintf() and
   AcpiUtVprintf()/AcpiUtPrintf() and converts their usages into the
   invocations of the wrapper layer.
Note that this patch doesn't enable the print APIs for OSPMs that do not
have ACPI_USE_SYSTEM_CLIBRARY defined before fulling testing the
implementations. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Yizhe Wang <yizhe.wang@intel.com>
Applications: Fix a potential issue that help messages may be dumped to AcpiGbl_DebugFile.

There is an issue for usage macros, if an command line option changed
AcpiGbl_DebugFile, then the follow up usage may errornously dumped to the
debug file.
This is just a bug in theory, because currently AcpiGbl_DebugFile can only
be modified by acpibin and acpiexec. Currently this will not trigger such
issue because:
1. For acpibin, AcpiGbl_DebugFile will be modified by "-t" option and the
   program exit after processing this option without dumping help message
   or other error options.
2. For acpiexec, AcpiGbl_DebugFile will only be modified by the open
   command, which happens after parsing the command line options, so no
   help message will be dumped into the debug file.
But maintaining this logic is difficult, so this patch modifies
AcpiOsPrintf() into ACPI_PRINTF() for usage macros so that the help
messages are ensured to be dumped to the stdout. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Yizhe Wang <yizhe.wang@intel.com>
EFI: Fix build errors by adding component/module definitions.

There are build errors for ACPI_DEBUG_OUTPUT enabled tools. This is because
osefixf.c is lacking of component/module definitions. This patch fixes such
build errors by filling this gap. Yizhe Wang.

Signed-off-by: Yizhe Wang <yizhe.wang@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
OSL: Add correct AcpiGbl_DebugTimeout export to allow acpiexec to link.

The AcpiGbl_DebugTimeout implemented in oswinxf.c is only used for WIN32
builds, so acpiexec need to be changed accordingly to make -t option a
no-op for other platforms. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Yizhe Wang <yizhe.wang@intel.com>
Utilities: Fix issue that AcpiUtStrstr() is not implemented correctly.

The AcpiUtStrstr() is not implemented correctly which causes freezes on the
OSPMs that using ACPI_STRSTR(). This patch fixes this function which is not
implemented correctly. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>