summaryrefslogtreecommitdiff
path: root/EdkCompatibilityPkg/Foundation/Library/Dxe
diff options
context:
space:
mode:
authorandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>2011-07-12 02:57:30 +0000
committerandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>2011-07-12 02:57:30 +0000
commit271d2c7f99612aae7b487cdad9c391373384e19b (patch)
treeefcf3f5f59f52b54a2b32c51f14cfc83a2a93cd0 /EdkCompatibilityPkg/Foundation/Library/Dxe
parentd12bed15b344fba00c1a4b511c5c2456109b8e99 (diff)
downloadedk2-platforms-271d2c7f99612aae7b487cdad9c391373384e19b.tar.xz
EdkCompatabilityPkg: Fix build issues with X64 clang
Removed passing VA_LIST and some assembly language compatability issues. Did not fix ReportStatusCode passing VA_LIST (non-ANSI C Code), and some of the assembler was not not ported and int 3 was inserted, as it likely is not needed. signed-off-by: andrewfish reviewed-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12006 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkCompatibilityPkg/Foundation/Library/Dxe')
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/Dxe/Graphics/Print.c165
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/Dxe/Print/Print.c139
2 files changed, 104 insertions, 200 deletions
diff --git a/EdkCompatibilityPkg/Foundation/Library/Dxe/Graphics/Print.c b/EdkCompatibilityPkg/Foundation/Library/Dxe/Graphics/Print.c
index 91f3aaffb5..2c8dc73ae6 100644
--- a/EdkCompatibilityPkg/Foundation/Library/Dxe/Graphics/Print.c
+++ b/EdkCompatibilityPkg/Foundation/Library/Dxe/Graphics/Print.c
@@ -65,14 +65,6 @@ Abstract:
#include EFI_PROTOCOL_DEFINITION (Hii)
#endif
-STATIC
-CHAR_W *
-GetFlagsAndWidth (
- IN CHAR_W *Format,
- OUT UINTN *Flags,
- OUT UINTN *Width,
- IN OUT VA_LIST *Marker
- );
STATIC
UINTN
@@ -552,6 +544,7 @@ Returns:
UINTN BufferLeft;
UINT64 Value;
EFI_GUID *TmpGUID;
+ BOOLEAN Done;
//
// Process the format string. Stop if Buffer is over run.
@@ -578,7 +571,64 @@ Returns:
//
// Now it's time to parse what follows after %
//
- Format = GetFlagsAndWidth (Format, &Flags, &Width, &Marker);
+ Flags = 0;
+ Width = 0;
+ for (Done = FALSE; !Done;) {
+ Format++;
+
+ switch (*Format) {
+
+ case '-':
+ Flags |= LEFT_JUSTIFY;
+ break;
+
+ case '+':
+ Flags |= PREFIX_SIGN;
+ break;
+
+ case ' ':
+ Flags |= PREFIX_BLANK;
+ break;
+
+ case ',':
+ Flags |= COMMA_TYPE;
+ break;
+
+ case 'L':
+ case 'l':
+ Flags |= LONG_TYPE;
+ break;
+
+ case '*':
+ Width = VA_ARG (Marker, UINTN);
+ break;
+
+ case '0':
+ Flags |= PREFIX_ZERO;
+
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ Count = 0;
+ do {
+ Count = (Count * 10) +*Format - '0';
+ Format++;
+ } while ((*Format >= '0') && (*Format <= '9'));
+ Format--;
+ Width = Count;
+ break;
+
+ default:
+ Done = TRUE;
+ }
+ }
+
switch (*Format) {
case 'p':
//
@@ -726,103 +776,6 @@ Returns:
}
STATIC
-CHAR_W *
-GetFlagsAndWidth (
- IN CHAR_W *Format,
- OUT UINTN *Flags,
- OUT UINTN *Width,
- IN OUT VA_LIST *Marker
- )
-/*++
-
-Routine Description:
-
- VSPrint worker function that parses flag and width information from the
- Format string and returns the next index into the Format string that needs
- to be parsed. See file headed for details of Flag and Width.
-
-Arguments:
-
- Format - Current location in the VSPrint format string.
-
- Flags - Returns flags
-
- Width - Returns width of element
-
- Marker - Vararg list that may be paritally consumed and returned.
-
-Returns:
-
- Pointer indexed into the Format string for all the information parsed
- by this routine.
-
---*/
-{
- UINTN Count;
- BOOLEAN Done;
-
- *Flags = 0;
- *Width = 0;
- for (Done = FALSE; !Done;) {
- Format++;
-
- switch (*Format) {
-
- case '-':
- *Flags |= LEFT_JUSTIFY;
- break;
-
- case '+':
- *Flags |= PREFIX_SIGN;
- break;
-
- case ' ':
- *Flags |= PREFIX_BLANK;
- break;
-
- case ',':
- *Flags |= COMMA_TYPE;
- break;
-
- case 'L':
- case 'l':
- *Flags |= LONG_TYPE;
- break;
-
- case '*':
- *Width = VA_ARG (*Marker, UINTN);
- break;
-
- case '0':
- *Flags |= PREFIX_ZERO;
-
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- Count = 0;
- do {
- Count = (Count * 10) +*Format - '0';
- Format++;
- } while ((*Format >= '0') && (*Format <= '9'));
- Format--;
- *Width = Count;
- break;
-
- default:
- Done = TRUE;
- }
- }
-
- return Format;
-}
-
-STATIC
UINTN
GuidToString (
IN EFI_GUID *Guid,
diff --git a/EdkCompatibilityPkg/Foundation/Library/Dxe/Print/Print.c b/EdkCompatibilityPkg/Foundation/Library/Dxe/Print/Print.c
index c07b747380..6585726d27 100644
--- a/EdkCompatibilityPkg/Foundation/Library/Dxe/Print/Print.c
+++ b/EdkCompatibilityPkg/Foundation/Library/Dxe/Print/Print.c
@@ -61,15 +61,6 @@ Abstract:
STATIC
-CHAR_W *
-GetFlagsAndWidth (
- IN CHAR_W *Format,
- OUT UINTN *Flags,
- OUT UINTN *Width,
- IN OUT VA_LIST *Marker
- );
-
-STATIC
UINTN
GuidToString (
IN EFI_GUID *Guid,
@@ -180,6 +171,7 @@ Returns:
UINTN BufferLeft;
UINT64 Value;
EFI_GUID *TmpGUID;
+ BOOLEAN Done;
//
// Process the format string. Stop if Buffer is over run.
@@ -204,8 +196,50 @@ Returns:
//
// Now it's time to parse what follows after %
- //
- Format = GetFlagsAndWidth (Format, &Flags, &Width, &Marker);
+ //
+ Flags = 0;
+ Width = 0;
+ for (Done = FALSE; !Done; ) {
+ Format++;
+
+ switch (*Format) {
+
+ case '-': Flags |= LEFT_JUSTIFY; break;
+ case '+': Flags |= PREFIX_SIGN; break;
+ case ' ': Flags |= PREFIX_BLANK; break;
+ case ',': Flags |= COMMA_TYPE; break;
+ case 'L':
+ case 'l': Flags |= LONG_TYPE; break;
+
+ case '*':
+ Width = VA_ARG (Marker, UINTN);
+ break;
+
+ case '0':
+ Flags |= PREFIX_ZERO;
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ Count = 0;
+ do {
+ Count = (Count * 10) + *Format - '0';
+ Format++;
+ } while ((*Format >= '0') && (*Format <= '9'));
+ Format--;
+ Width = Count;
+ break;
+
+ default:
+ Done = TRUE;
+ }
+ }
+
switch (*Format) {
case 'p':
//
@@ -347,89 +381,6 @@ Returns:
return &Buffer[Index] - StartOfBuffer;
}
-
-
-STATIC
-CHAR_W *
-GetFlagsAndWidth (
- IN CHAR_W *Format,
- OUT UINTN *Flags,
- OUT UINTN *Width,
- IN OUT VA_LIST *Marker
- )
-/*++
-
-Routine Description:
-
- VSPrint worker function that parses flag and width information from the
- Format string and returns the next index into the Format string that needs
- to be parsed. See file headed for details of Flag and Width.
-
-Arguments:
-
- Format - Current location in the VSPrint format string.
-
- Flags - Returns flags
-
- Width - Returns width of element
-
- Marker - Vararg list that may be paritally consumed and returned.
-
-Returns:
-
- Pointer indexed into the Format string for all the information parsed
- by this routine.
-
---*/
-{
- UINTN Count;
- BOOLEAN Done;
-
- *Flags = 0;
- *Width = 0;
- for (Done = FALSE; !Done; ) {
- Format++;
-
- switch (*Format) {
-
- case '-': *Flags |= LEFT_JUSTIFY; break;
- case '+': *Flags |= PREFIX_SIGN; break;
- case ' ': *Flags |= PREFIX_BLANK; break;
- case ',': *Flags |= COMMA_TYPE; break;
- case 'L':
- case 'l': *Flags |= LONG_TYPE; break;
-
- case '*':
- *Width = VA_ARG (*Marker, UINTN);
- break;
-
- case '0':
- *Flags |= PREFIX_ZERO;
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- Count = 0;
- do {
- Count = (Count * 10) + *Format - '0';
- Format++;
- } while ((*Format >= '0') && (*Format <= '9'));
- Format--;
- *Width = Count;
- break;
-
- default:
- Done = TRUE;
- }
- }
- return Format;
-}
-
STATIC
UINTN
GuidToString (