From aa79b0b3799e95bc21e0df32a135cc5a4d749e4b Mon Sep 17 00:00:00 2001
From: jji4 <jji4@6f19259b-4bc3-4df7-8a09-765794883524>
Date: Wed, 3 Dec 2008 08:52:39 +0000
Subject: Global variables have been moved backward ahead of functions. Only a
 few cases were left due to its module structure.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6816 6f19259b-4bc3-4df7-8a09-765794883524
---
 .../Console/GraphicsConsoleDxe/GraphicsConsole.c   | 153 +++++++++++----------
 1 file changed, 77 insertions(+), 76 deletions(-)

(limited to 'MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c')

diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
index ada795b99c..f925daa975 100644
--- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
+++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
@@ -14,82 +14,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 
 #include "GraphicsConsole.h"
 
-/**
-  Gets Graphics Console devcie's foreground color and background color.
-
-  @param  This                  Protocol instance pointer.
-  @param  Foreground            Returned text foreground color.
-  @param  Background            Returned text background color.
-
-  @retval EFI_SUCCESS           It returned always.
-
-**/
-EFI_STATUS
-GetTextColors (
-  IN  EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *This,
-  OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL    *Foreground,
-  OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL    *Background
-  );
-
-/**
-  Draw Unicode string on the Graphice Console device's screen.
-
-  @param  This                  Protocol instance pointer.
-  @param  UnicodeWeight         One Unicode string to be displayed.
-  @param  Count                 The count of Unicode string.
-
-  @retval EFI_OUT_OF_RESOURCES  If no memory resource to use.
-  @retval EFI_UNSUPPORTED       If no Graphics Output protocol and UGA Draw
-                                protocol exist.
-  @retval EFI_SUCCESS           Drawing Unicode string implemented successfully.
-
-**/
-EFI_STATUS
-DrawUnicodeWeightAtCursorN (
-  IN  EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *This,
-  IN  CHAR16                           *UnicodeWeight,
-  IN  UINTN                            Count
-  );
-
-/**
-  Erase the cursor on the screen.
-
-  @param  This                  Protocol instance pointer.
-
-  @retval EFI_SUCCESS           The cursor is erased successfully.
-
-**/
-EFI_STATUS
-EraseCursor (
-  IN  EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *This
-  );
-
-/**
-  Check if the current specific mode supported the user defined resolution
-  for the Graphice Console devcie based on Graphics Output Protocol.
-
-  If yes, set the graphic devcice's current mode to this specific mode.
-  
-  @param  GraphicsOutput        Graphics Output Protocol instance pointer.
-  @param  HorizontalResolution  User defined horizontal resolution
-  @param  VerticalResolution    User defined vertical resolution.
-  @param  CurrentModeNumber     Current specific mode to be check.
-
-  @retval EFI_SUCCESS       The mode is supported.
-  @retval EFI_UNSUPPORTED   The specific mode is out of range of graphics 
-                            devcie supported.
-  @retval other             The specific mode does not support user defined 
-                            resolution or failed to set the current mode to the 
-                            specific mode on graphics device.
-
-**/
-EFI_STATUS
-CheckModeSupported (
-  EFI_GRAPHICS_OUTPUT_PROTOCOL  *GraphicsOutput,
-  IN  UINT32  HorizontalResolution,
-  IN  UINT32  VerticalResolution,
-  OUT UINT32  *CurrentModeNumber
-  );
 
 //
 // Graphics Console Devcie Private Data template
@@ -175,6 +99,83 @@ EFI_DRIVER_BINDING_PROTOCOL gGraphicsConsoleDriverBinding = {
   NULL
 };
 
+/**
+  Gets Graphics Console devcie's foreground color and background color.
+
+  @param  This                  Protocol instance pointer.
+  @param  Foreground            Returned text foreground color.
+  @param  Background            Returned text background color.
+
+  @retval EFI_SUCCESS           It returned always.
+
+**/
+EFI_STATUS
+GetTextColors (
+  IN  EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *This,
+  OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL    *Foreground,
+  OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL    *Background
+  );
+
+/**
+  Draw Unicode string on the Graphice Console device's screen.
+
+  @param  This                  Protocol instance pointer.
+  @param  UnicodeWeight         One Unicode string to be displayed.
+  @param  Count                 The count of Unicode string.
+
+  @retval EFI_OUT_OF_RESOURCES  If no memory resource to use.
+  @retval EFI_UNSUPPORTED       If no Graphics Output protocol and UGA Draw
+                                protocol exist.
+  @retval EFI_SUCCESS           Drawing Unicode string implemented successfully.
+
+**/
+EFI_STATUS
+DrawUnicodeWeightAtCursorN (
+  IN  EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *This,
+  IN  CHAR16                           *UnicodeWeight,
+  IN  UINTN                            Count
+  );
+
+/**
+  Erase the cursor on the screen.
+
+  @param  This                  Protocol instance pointer.
+
+  @retval EFI_SUCCESS           The cursor is erased successfully.
+
+**/
+EFI_STATUS
+EraseCursor (
+  IN  EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *This
+  );
+
+/**
+  Check if the current specific mode supported the user defined resolution
+  for the Graphice Console devcie based on Graphics Output Protocol.
+
+  If yes, set the graphic devcice's current mode to this specific mode.
+  
+  @param  GraphicsOutput        Graphics Output Protocol instance pointer.
+  @param  HorizontalResolution  User defined horizontal resolution
+  @param  VerticalResolution    User defined vertical resolution.
+  @param  CurrentModeNumber     Current specific mode to be check.
+
+  @retval EFI_SUCCESS       The mode is supported.
+  @retval EFI_UNSUPPORTED   The specific mode is out of range of graphics 
+                            devcie supported.
+  @retval other             The specific mode does not support user defined 
+                            resolution or failed to set the current mode to the 
+                            specific mode on graphics device.
+
+**/
+EFI_STATUS
+CheckModeSupported (
+  EFI_GRAPHICS_OUTPUT_PROTOCOL  *GraphicsOutput,
+  IN  UINT32  HorizontalResolution,
+  IN  UINT32  VerticalResolution,
+  OUT UINT32  *CurrentModeNumber
+  );
+
 
 /**
   Test to see if Graphics Console could be supported on the Controller.
-- 
cgit v1.2.3