/** @file\r
\r
-Copyright (c) 2007, Intel Corporation All rights reserved.<BR>\r
+Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
\r
#define EFI_DEBUG_MAX_PRINT_BUFFER (80 * 4)\r
\r
+/**\r
+\r
+ Convert hex string to uint.\r
+\r
+ @param Str - The string\r
+\r
+**/\r
UINTN\r
EFIAPI\r
Xtoi (\r
- CHAR16 *str\r
+ CHAR16 *Str\r
);\r
\r
+/**\r
+\r
+ Convert hex string to uint.\r
+\r
+ @param Str - The string\r
+\r
+**/\r
UINT64\r
EFIAPI\r
LXtoi (\r
- CHAR16 *str\r
+ CHAR16 *Str\r
);\r
\r
+/**\r
+\r
+ Convert hex string to uint.\r
+\r
+ @param Str - The string\r
+\r
+**/\r
UINTN\r
EFIAPI\r
Atoi (\r
- CHAR16 *str\r
+ CHAR16 *Str\r
);\r
\r
+/**\r
+\r
+ Convert hex string to uint.\r
+\r
+ @param Str - The string\r
+\r
+**/\r
UINTN\r
EFIAPI\r
AsciiXtoi (\r
- CHAR8 *str\r
+ CHAR8 *Str\r
);\r
\r
+/**\r
+\r
+ Convert hex string to uint.\r
+\r
+ @param Str - The string\r
+\r
+**/\r
UINTN\r
EFIAPI\r
AsciiAtoi (\r
- CHAR8 *str\r
+ CHAR8 *Str\r
);\r
\r
+/**\r
+ Compare the Unicode and Ascii string pointed by String to the string pointed by String2.\r
+\r
+ @param String - Unicode String to process\r
+\r
+ @param String2 - Ascii string to process\r
+\r
+ @return Return a positive integer if String is lexicall greater than String2; Zero if\r
+ the two strings are identical; and a negative interger if String is lexically\r
+ less than String2.\r
+\r
+**/\r
INTN\r
EFIAPI\r
StrCmpUnicodeAndAscii (\r
IN CHAR8 *String2\r
);\r
\r
+/**\r
+\r
+ Compare the Unicode string pointed by String to the string pointed by String2.\r
+\r
+ @param String - Unicode String to process\r
+ @param String2 - Unicode string to process\r
+\r
+ @return Return a positive integer if String is lexically greater than String2; Zero if\r
+ the two strings are identical; and a negative integer if String is lexically\r
+ less than String2.\r
+\r
+**/\r
INTN\r
EFIAPI\r
StriCmp (\r
IN CHAR16 *String2\r
);\r
\r
+/**\r
+\r
+ Compare the Unicode and Ascii string pointed by String to the string pointed by String2.\r
+\r
+ @param String - Unicode String to process\r
+ @param String2 - Ascii string to process\r
+\r
+ @return Return a positive integer if String is lexically greater than String2; Zero if\r
+ the two strings are identical; and a negative integer if String is lexically\r
+ less than String2.\r
+\r
+**/\r
INTN\r
EFIAPI\r
StriCmpUnicodeAndAscii (\r
IN CHAR8 *String2\r
);\r
\r
+/**\r
+\r
+ Verify if the string is end with the sub string.\r
+\r
+ @param Str - The string where to search the sub string\r
+ @param SubStr - The substring.\r
+\r
+**/\r
BOOLEAN\r
EFIAPI\r
StrEndWith (\r
IN CHAR16 *SubStr\r
);\r
\r
+/**\r
+ Duplicate a string.\r
+\r
+ @param Src The string to be duplicated.\r
+\r
+**/\r
CHAR16 *\r
EFIAPI\r
StrDuplicate (\r
IN CHAR16 *Src\r
);\r
\r
+/**\r
+\r
+ Find the next token after one or more specified characters.\r
+\r
+ @param String Point to the string where to find the substring.\r
+ @param CharSet Point to the string to be found.\r
+\r
+**/\r
CHAR16 *\r
EFIAPI\r
StrGetNewTokenLine (\r
IN CHAR16 *CharSet\r
);\r
\r
+/**\r
+\r
+ Find the next token after one or more specified characters.\r
+\r
+ @param CharSet Point to the string to be found.\r
+\r
+**/\r
CHAR16 *\r
EFIAPI\r
StrGetNextTokenLine (\r
IN CHAR16 *CharSet\r
);\r
\r
+/**\r
+\r
+ Find the next token after one specificed characters.\r
+\r
+ @param String Point to the string where to find the substring.\r
+ @param CharSet Point to the string to be found.\r
+\r
+**/\r
CHAR16 *\r
EFIAPI\r
StrGetNewTokenField (\r
IN CHAR16 *CharSet\r
);\r
\r
+/**\r
+\r
+ Find the next token after one specificed characters.\r
+\r
+ @param CharSet Point to the string to be found.\r
+\r
+**/\r
CHAR16 *\r
EFIAPI\r
StrGetNextTokenField (\r
IN CHAR16 *CharSet\r
);\r
\r
+/**\r
+\r
+ Patch a character to the end of a string.\r
+\r
+ @param Buffer The string to be patched.\r
+ @param Patch The patch character.\r
+\r
+**/\r
VOID\r
EFIAPI\r
PatchForStrTokenAfter (\r
IN CHAR16 Patch\r
);\r
\r
+/**\r
+ Patch a character at the beginning of a string.\r
+\r
+ @param Buffer The string to be patched.\r
+ @param Patch The patch character.\r
+\r
+**/\r
VOID\r
EFIAPI\r
PatchForStrTokenBefore (\r
IN CHAR16 Patch\r
);\r
\r
+/**\r
+\r
+ Find the next token after one or more specified characters.\r
+\r
+ @param String Point to the string where to find the substring.\r
+ @param CharSet Point to the string to be found.\r
+\r
+**/\r
CHAR8 *\r
EFIAPI\r
AsciiStrGetNewTokenLine (\r
IN CHAR8 *CharSet\r
);\r
\r
+/**\r
+\r
+ Find the next token after one or more specified characters.\r
+\r
+ @param CharSet Point to the string to be found.\r
+\r
+**/\r
CHAR8 *\r
EFIAPI\r
AsciiStrGetNextTokenLine (\r
IN CHAR8 *CharSet\r
);\r
\r
+/**\r
+\r
+ Find the next token after one specificed characters.\r
+\r
+ @param String Point to the string where to find the substring.\r
+ @param CharSet Point to the string to be found.\r
+\r
+**/\r
CHAR8 *\r
EFIAPI\r
AsciiStrGetNewTokenField (\r
IN CHAR8 *CharSet\r
);\r
\r
+/**\r
+\r
+ Find the next token after one specificed characters.\r
+\r
+ @param CharSet Point to the string to be found.\r
+\r
+**/\r
CHAR8 *\r
EFIAPI\r
AsciiStrGetNextTokenField (\r
IN CHAR8 *CharSet\r
);\r
\r
+/**\r
+\r
+ Patch a character to the end of a string.\r
+\r
+ @param Buffer The string to be patched.\r
+ @param Patch The patch character.\r
+\r
+**/\r
VOID\r
EFIAPI\r
PatchForAsciiStrTokenAfter (\r
IN CHAR8 Patch\r
);\r
\r
+/**\r
+ Patch a character at the beginning of a string.\r
+\r
+ @param Buffer The string to be patched.\r
+ @param Patch The patch character.\r
+\r
+**/\r
VOID\r
EFIAPI\r
PatchForAsciiStrTokenBefore (\r
);\r
\r
/**\r
-Shell Library.\r
+\r
+ Shell Library.\r
+ Get user input.\r
+\r
+ @param Prompt The prompt string.\r
+ @param InStr Point to the input string.\r
+ @param StrLen The max length of string user can input.\r
+\r
**/\r
VOID\r
EFIAPI\r
IN UINTN StrLen\r
);\r
\r
+/**\r
+\r
+ SetPageBreak.\r
+\r
+**/\r
BOOLEAN\r
EFIAPI\r
SetPageBreak (\r
VOID\r
);\r
\r
+/**\r
+ Print a Unicode string to the output device.\r
+\r
+ @param Format A Null-terminated Unicode format string.\r
+ @param ... The variable argument list that contains pointers to Null-\r
+ terminated Unicode strings to be printed\r
+\r
+**/\r
UINTN\r
EFIAPI\r
EDBPrint (\r
...\r
);\r
\r
+/**\r
+ Print a Unicode string to the output buffer.\r
+\r
+ @param Buffer A pointer to the output buffer for the produced Null-terminated\r
+ Unicode string.\r
+ @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.\r
+ @param Format A Null-terminated Unicode format string.\r
+ @param ... The variable argument list that contains pointers to Null-\r
+ terminated Unicode strings to be printed\r
+\r
+**/\r
UINTN\r
EFIAPI\r
EDBSPrint (\r
...\r
);\r
\r
+/**\r
+ Print a Unicode string to the output buffer with specified offset..\r
+\r
+ @param Buffer A pointer to the output buffer for the produced Null-terminated\r
+ Unicode string.\r
+ @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.\r
+ @param Offset The offset of the buffer.\r
+ @param Format A Null-terminated Unicode format string.\r
+ @param ... The variable argument list that contains pointers to Null-\r
+ terminated Unicode strings to be printed\r
+\r
+**/\r
UINTN\r
EFIAPI\r
EDBSPrintWithOffset (\r
...\r
);\r
\r
+/**\r
+\r
+ Read a file.\r
+ If ScanFs is FLASE, it will use DebuggerPrivate->Vol as default Fs.\r
+ If ScanFs is TRUE, it will scan all FS and check the file.\r
+ If there is only one file match the name, it will be read.\r
+ If there is more than one file match the name, it will return Error.\r
+\r
+ @param DebuggerPrivate - EBC Debugger private data structure\r
+ @param FileName - The file to be read.\r
+ @param BufferSize - The file buffer size\r
+ @param Buffer - The file buffer\r
+ @param ScanFs - Need Scan all FS\r
+\r
+ @retval EFI_SUCCESS - read file successfully\r
+ @retval EFI_NOT_FOUND - file not found\r
+ @retval EFI_NO_MAPPING - there is duplicated files found\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
ReadFileToBuffer (\r
IN BOOLEAN ScanFs\r
);\r
\r
+/**\r
+\r
+ Get file name under this dir with index\r
+\r
+ @param DebuggerPrivate - EBC Debugger private data structure\r
+ @param DirName - The dir to be read.\r
+ @param FileName - The file name pattern under this dir\r
+ @param Index - The file index under this dir\r
+\r
+ @return File Name which match the pattern and index.\r
+\r
+**/\r
CHAR16 *\r
EFIAPI\r
GetFileNameUnderDir (\r