diff options
author | Michael Kubacki <michael.kubacki@microsoft.com> | 2021-12-05 14:54:13 -0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-12-07 17:24:28 +0000 |
commit | 47d20b54f9a65b08aa602a1866c1b59a69088dfc (patch) | |
tree | e3241dd169bda79544a36248e834a4bebe298418 /ShellPkg/Library/UefiShellDebug1CommandsLib/EditTitleBar.c | |
parent | c411b485b63a671a1e276700cff025c73997233c (diff) | |
download | edk2-47d20b54f9a65b08aa602a1866c1b59a69088dfc.tar.gz edk2-47d20b54f9a65b08aa602a1866c1b59a69088dfc.tar.bz2 edk2-47d20b54f9a65b08aa602a1866c1b59a69088dfc.zip |
ShellPkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737
Apply uncrustify changes to .c/.h files in the ShellPkg package
Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Diffstat (limited to 'ShellPkg/Library/UefiShellDebug1CommandsLib/EditTitleBar.c')
-rw-r--r-- | ShellPkg/Library/UefiShellDebug1CommandsLib/EditTitleBar.c | 71 |
1 files changed, 39 insertions, 32 deletions
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/EditTitleBar.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/EditTitleBar.c index f9ef7117b2..663a872dc2 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/EditTitleBar.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/EditTitleBar.c @@ -22,7 +22,7 @@ CHAR16 *Title = NULL; **/
EFI_STATUS
MainTitleBarInit (
- CONST CHAR16 *Prompt
+ CONST CHAR16 *Prompt
)
{
SHELL_FREE_NON_NULL (Title);
@@ -34,6 +34,7 @@ MainTitleBarInit ( //
Title = CatSPrint (NULL, L"%s", Prompt);
}
+
if (Title == NULL) {
return EFI_OUT_OF_RESOURCES;
}
@@ -54,13 +55,13 @@ MainTitleBarCleanup ( }
typedef struct {
- UINT32 Foreground : 4;
- UINT32 Background : 4;
+ UINT32 Foreground : 4;
+ UINT32 Background : 4;
} TITLE_BAR_COLOR_ATTRIBUTES;
typedef union {
- TITLE_BAR_COLOR_ATTRIBUTES Colors;
- UINTN Data;
+ TITLE_BAR_COLOR_ATTRIBUTES Colors;
+ UINTN Data;
} TITLE_BAR_COLOR_UNION;
/**
@@ -79,21 +80,20 @@ typedef union { **/
EFI_STATUS
MainTitleBarRefresh (
- IN CONST CHAR16 *FileName OPTIONAL,
- IN CONST EDIT_FILE_TYPE FileType,
- IN CONST BOOLEAN ReadOnly,
- IN CONST BOOLEAN Modified,
- IN CONST UINTN LastCol,
- IN CONST UINTN LastRow,
- IN CONST UINTN Offset,
- IN CONST UINTN Size
+ IN CONST CHAR16 *FileName OPTIONAL,
+ IN CONST EDIT_FILE_TYPE FileType,
+ IN CONST BOOLEAN ReadOnly,
+ IN CONST BOOLEAN Modified,
+ IN CONST UINTN LastCol,
+ IN CONST UINTN LastRow,
+ IN CONST UINTN Offset,
+ IN CONST UINTN Size
)
{
- TITLE_BAR_COLOR_UNION Orig;
- TITLE_BAR_COLOR_UNION New;
- CONST CHAR16 *FileNameTmp;
- INTN TempInteger;
-
+ TITLE_BAR_COLOR_UNION Orig;
+ TITLE_BAR_COLOR_UNION New;
+ CONST CHAR16 *FileNameTmp;
+ INTN TempInteger;
//
// backup the old screen attributes
@@ -121,10 +121,12 @@ MainTitleBarRefresh ( Title
);
}
+
if (FileName == NULL) {
gST->ConOut->SetAttribute (gST->ConOut, Orig.Data);
return EFI_SUCCESS;
}
+
//
// First Extract the FileName from fullpath
//
@@ -141,57 +143,62 @@ MainTitleBarRefresh ( // the space for file name is 20 characters
//
if (StrLen (FileNameTmp) <= 20) {
- ShellPrintEx (-1,-1, L"%s ", FileNameTmp);
+ ShellPrintEx (-1, -1, L"%s ", FileNameTmp);
for (TempInteger = StrLen (FileNameTmp); TempInteger < 20; TempInteger++) {
- ShellPrintEx (-1,-1, L" ");
+ ShellPrintEx (-1, -1, L" ");
}
-
} else {
for (TempInteger = 0; TempInteger < 17; TempInteger++) {
- ShellPrintEx (-1,-1, L"%c", FileNameTmp[TempInteger]);
+ ShellPrintEx (-1, -1, L"%c", FileNameTmp[TempInteger]);
}
+
//
// print "..."
//
- ShellPrintEx (-1,-1, L"... ");
+ ShellPrintEx (-1, -1, L"... ");
}
+
//
// print file type field
//
- switch (FileType){
+ switch (FileType) {
case FileTypeAscii:
case FileTypeUnicode:
- if (FileType == FileTypeAscii){
- ShellPrintEx (-1,-1, L" ASCII ");
+ if (FileType == FileTypeAscii) {
+ ShellPrintEx (-1, -1, L" ASCII ");
} else {
- ShellPrintEx (-1,-1, L" UNICODE ");
+ ShellPrintEx (-1, -1, L" UNICODE ");
}
+
//
// print read-only field for text files
//
if (ReadOnly) {
- ShellPrintEx (-1,-1, L"ReadOnly ");
+ ShellPrintEx (-1, -1, L"ReadOnly ");
} else {
- ShellPrintEx (-1,-1, L" ");
+ ShellPrintEx (-1, -1, L" ");
}
- break;
+
+ break;
case FileTypeDiskBuffer:
case FileTypeMemBuffer:
//
// Print the offset.
//
- ShellPrintEx (-1,-1, L"Offset %X | Size %X", Offset, Size);
+ ShellPrintEx (-1, -1, L"Offset %X | Size %X", Offset, Size);
case FileTypeFileBuffer:
break;
default:
break;
}
+
//
// print modified field
//
if (Modified) {
- ShellPrintEx (-1,-1, L"Modified");
+ ShellPrintEx (-1, -1, L"Modified");
}
+
//
// restore the old attribute
//
|