fixed license header / copyright date on all files.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9810 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
#/** @file
|
||||
# Provides interface to shell functionality for shell commands and applications.
|
||||
#
|
||||
# Copyright (c) 2006 - 2009, Intel Corporation.
|
||||
# Copyright (c) 2006 - 2010, Intel Corporation.All rights reserved. <BR>
|
||||
#
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
[Protocols]
|
||||
gEfiSimpleFileSystemProtocolGuid # ALWAYS_USED
|
||||
|
||||
|
||||
[Guids]
|
||||
gEfiFileInfoGuid # ALWAYS_CONSUMED
|
||||
|
||||
|
@@ -1,14 +1,14 @@
|
||||
/** @file
|
||||
Library used for sorting routines.
|
||||
|
||||
Copyright (c) 2009, Intel Corporation<BR>
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
Copyright (c) 2009-2010, Intel Corporation. All rights reserved. <BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
@@ -18,11 +18,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#include <Library/BaseMemoryLib.h>
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/MemoryAllocationLib.h>
|
||||
#include <Library/SortLib.h>
|
||||
#include <Library/SortLib.h>
|
||||
|
||||
/**
|
||||
Worker function for QuickSorting. This function is identical to PerformQuickSort,
|
||||
except that is uses the pre-allocated buffer so the in place sorting does not need to
|
||||
Worker function for QuickSorting. This function is identical to PerformQuickSort,
|
||||
except that is uses the pre-allocated buffer so the in place sorting does not need to
|
||||
allocate and free buffers constantly.
|
||||
|
||||
Each element must be equal sized.
|
||||
@@ -38,7 +38,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
on return a buffer of sorted elements
|
||||
@param[in] Count the number of elements in the buffer to sort
|
||||
@param[in] ElementSize Size of an element in bytes
|
||||
@param[in] CompareFunction The function to call to perform the comparison
|
||||
@param[in] CompareFunction The function to call to perform the comparison
|
||||
of any 2 elements
|
||||
@param[in] Buffer Buffer of size ElementSize for use in swapping
|
||||
**/
|
||||
@@ -60,7 +60,7 @@ QuickSortWorker (
|
||||
ASSERT(CompareFunction != NULL);
|
||||
ASSERT(Buffer != NULL);
|
||||
|
||||
if ( Count < 2
|
||||
if ( Count < 2
|
||||
|| ElementSize < 1
|
||||
){
|
||||
return;
|
||||
@@ -78,7 +78,7 @@ QuickSortWorker (
|
||||
// and everything "right" are above it
|
||||
//
|
||||
for ( LoopCount = 0
|
||||
; LoopCount < Count -1
|
||||
; LoopCount < Count -1
|
||||
; LoopCount++
|
||||
){
|
||||
//
|
||||
@@ -86,7 +86,7 @@ QuickSortWorker (
|
||||
//
|
||||
if (CompareFunction((VOID*)((UINT8*)BufferToSort+((LoopCount)*ElementSize)),Pivot) <= 0){
|
||||
//
|
||||
// swap
|
||||
// swap
|
||||
//
|
||||
CopyMem (Buffer, (UINT8*)BufferToSort+(NextSwapLocation*ElementSize), ElementSize);
|
||||
CopyMem ((UINT8*)BufferToSort+(NextSwapLocation*ElementSize), (UINT8*)BufferToSort+((LoopCount)*ElementSize), ElementSize);
|
||||
@@ -94,7 +94,7 @@ QuickSortWorker (
|
||||
|
||||
//
|
||||
// increment NextSwapLocation
|
||||
//
|
||||
//
|
||||
NextSwapLocation++;
|
||||
}
|
||||
}
|
||||
@@ -106,20 +106,20 @@ QuickSortWorker (
|
||||
CopyMem ((UINT8*)BufferToSort+(NextSwapLocation*ElementSize), Buffer, ElementSize);
|
||||
|
||||
//
|
||||
// Now recurse on 2 paritial lists. neither of these will have the 'pivot' element
|
||||
// Now recurse on 2 paritial lists. neither of these will have the 'pivot' element
|
||||
// IE list is sorted left half, pivot element, sorted right half...
|
||||
//
|
||||
QuickSortWorker(
|
||||
BufferToSort,
|
||||
NextSwapLocation,
|
||||
ElementSize,
|
||||
BufferToSort,
|
||||
NextSwapLocation,
|
||||
ElementSize,
|
||||
CompareFunction,
|
||||
Buffer);
|
||||
|
||||
QuickSortWorker(
|
||||
(UINT8 *)BufferToSort + (NextSwapLocation+1) * ElementSize,
|
||||
Count - NextSwapLocation - 1,
|
||||
ElementSize,
|
||||
Count - NextSwapLocation - 1,
|
||||
ElementSize,
|
||||
CompareFunction,
|
||||
Buffer);
|
||||
|
||||
@@ -140,7 +140,7 @@ QuickSortWorker (
|
||||
on return a buffer of sorted elements
|
||||
@param[in] Count the number of elements in the buffer to sort
|
||||
@param[in] ElementSize Size of an element in bytes
|
||||
@param[in] CompareFunction The function to call to perform the comparison
|
||||
@param[in] CompareFunction The function to call to perform the comparison
|
||||
of any 2 elements
|
||||
**/
|
||||
VOID
|
||||
@@ -173,7 +173,7 @@ PerformQuickSort (
|
||||
|
||||
/**
|
||||
Not supported in Base version.
|
||||
|
||||
|
||||
ASSERT and return 0.
|
||||
**/
|
||||
INTN
|
||||
@@ -194,7 +194,7 @@ DevicePathCompare (
|
||||
|
||||
@retval 0 Buffer1 equal to Buffer2.
|
||||
@return < 0 Buffer1 is less than Buffer2.
|
||||
@return > 0 Buffer1 is greater than Buffer2.
|
||||
@return > 0 Buffer1 is greater than Buffer2.
|
||||
**/
|
||||
INTN
|
||||
EFIAPI
|
||||
|
@@ -1,9 +1,9 @@
|
||||
#/** @file
|
||||
# Library used for sorting routines.
|
||||
#
|
||||
# Copyright (c) 2009, Intel Corporation.
|
||||
# Copyright (c) 2009-2010, Intel Corporation.All rights reserved. <BR>
|
||||
#
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
|
@@ -1,14 +1,14 @@
|
||||
/** @file
|
||||
Provides application point extension for "C" style main funciton
|
||||
Provides application point extension for "C" style main funciton
|
||||
|
||||
Copyright (c) 2009, Intel Corporation<BR>
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
Copyright (c) 2009-2010, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
@@ -53,7 +53,7 @@ ShellCEntryLib (
|
||||
EfiShellParametersProtocol = NULL;
|
||||
EfiShellInterface = NULL;
|
||||
|
||||
Status = SystemTable->BootServices->OpenProtocol(ImageHandle,
|
||||
Status = SystemTable->BootServices->OpenProtocol(ImageHandle,
|
||||
&gEfiShellParametersProtocolGuid,
|
||||
(VOID **)&EfiShellParametersProtocol,
|
||||
ImageHandle,
|
||||
@@ -72,7 +72,7 @@ ShellCEntryLib (
|
||||
//
|
||||
// try to get shell 1.0 interface instead.
|
||||
//
|
||||
Status = SystemTable->BootServices->OpenProtocol(ImageHandle,
|
||||
Status = SystemTable->BootServices->OpenProtocol(ImageHandle,
|
||||
&gEfiShellInterfaceGuid,
|
||||
(VOID **)&EfiShellInterface,
|
||||
ImageHandle,
|
||||
@@ -82,7 +82,7 @@ ShellCEntryLib (
|
||||
if (!EFI_ERROR(Status)) {
|
||||
//
|
||||
// use shell 1.0 interface
|
||||
//
|
||||
//
|
||||
ReturnFromMain = ShellAppMain (
|
||||
EfiShellInterface->Argc,
|
||||
EfiShellInterface->Argv
|
||||
|
@@ -1,9 +1,9 @@
|
||||
#/** @file
|
||||
# Provides interface to shell functionality for shell commands and applications.
|
||||
# Provides interface to shell functionality for shell commands and applications.
|
||||
#
|
||||
# Copyright (c) 2006 - 2009, Intel Corporation.
|
||||
# Copyright (c) 2006 - 2010, Intel Corporation.All rights reserved. <BR>
|
||||
#
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,8 @@
|
||||
/** @file
|
||||
Provides interface to shell functionality for shell commands and applications.
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation<BR>
|
||||
All rights reserved. This program and the accompanying materials
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
@@ -1,9 +1,9 @@
|
||||
#/** @file
|
||||
# Provides interface to shell functionality for shell commands and applications.
|
||||
#
|
||||
# Copyright (c) 2006 - 2009, Intel Corporation.
|
||||
# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved. <BR>
|
||||
#
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
@@ -50,8 +50,8 @@
|
||||
|
||||
[Protocols]
|
||||
gEfiSimpleFileSystemProtocolGuid # ALWAYS_CONSUMED
|
||||
|
||||
# shell 2.0
|
||||
|
||||
# shell 2.0
|
||||
gEfiShellProtocolGuid # SOMETIMES_CONSUMED
|
||||
gEfiShellParametersProtocolGuid # SOMETIMES_CONSUMED
|
||||
|
||||
@@ -66,4 +66,4 @@
|
||||
[Pcd.common]
|
||||
gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize # ALWAYS_CONSUMED
|
||||
gEfiShellPkgTokenSpaceGuid.PcdShellPrintBufferSize # ALWAYS_CONSUMED
|
||||
gEfiMdePkgTokenSpaceGuid.PcdMaximumUnicodeStringLength # ALWAYS_CONSUMED
|
||||
gEfiMdePkgTokenSpaceGuid.PcdMaximumUnicodeStringLength # ALWAYS_CONSUMED
|
||||
|
@@ -1,14 +1,14 @@
|
||||
/** @file
|
||||
Library used for sorting routines.
|
||||
|
||||
Copyright (c) 2009, Intel Corporation<BR>
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
Copyright (c) 2009-2010, Intel Corporation. All rights reserved. <BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
@@ -23,15 +23,15 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#include <Library/BaseMemoryLib.h>
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/MemoryAllocationLib.h>
|
||||
#include <Library/SortLib.h>
|
||||
#include <Library/SortLib.h>
|
||||
|
||||
STATIC EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *mDevicePathToText = NULL;
|
||||
STATIC EFI_UNICODE_COLLATION_PROTOCOL *mUnicodeCollation = NULL;
|
||||
|
||||
|
||||
/**
|
||||
Worker function for QuickSorting. This function is identical to PerformQuickSort,
|
||||
except that is uses the pre-allocated buffer so the in place sorting does not need to
|
||||
Worker function for QuickSorting. This function is identical to PerformQuickSort,
|
||||
except that is uses the pre-allocated buffer so the in place sorting does not need to
|
||||
allocate and free buffers constantly.
|
||||
|
||||
Each element must be equal sized.
|
||||
@@ -47,7 +47,7 @@ STATIC EFI_UNICODE_COLLATION_PROTOCOL *mUnicodeCollation = NULL;
|
||||
on return a buffer of sorted elements
|
||||
@param[in] Count the number of elements in the buffer to sort
|
||||
@param[in] ElementSize Size of an element in bytes
|
||||
@param[in] CompareFunction The function to call to perform the comparison
|
||||
@param[in] CompareFunction The function to call to perform the comparison
|
||||
of any 2 elements
|
||||
@param[in] Buffer Buffer of size ElementSize for use in swapping
|
||||
**/
|
||||
@@ -69,7 +69,7 @@ QuickSortWorker (
|
||||
ASSERT(CompareFunction != NULL);
|
||||
ASSERT(Buffer != NULL);
|
||||
|
||||
if ( Count < 2
|
||||
if ( Count < 2
|
||||
|| ElementSize < 1
|
||||
){
|
||||
return;
|
||||
@@ -87,7 +87,7 @@ QuickSortWorker (
|
||||
// and everything "right" are above it
|
||||
//
|
||||
for ( LoopCount = 0
|
||||
; LoopCount < Count -1
|
||||
; LoopCount < Count -1
|
||||
; LoopCount++
|
||||
){
|
||||
//
|
||||
@@ -95,7 +95,7 @@ QuickSortWorker (
|
||||
//
|
||||
if (CompareFunction((VOID*)((UINT8*)BufferToSort+((LoopCount)*ElementSize)),Pivot) <= 0){
|
||||
//
|
||||
// swap
|
||||
// swap
|
||||
//
|
||||
CopyMem (Buffer, (UINT8*)BufferToSort+(NextSwapLocation*ElementSize), ElementSize);
|
||||
CopyMem ((UINT8*)BufferToSort+(NextSwapLocation*ElementSize), (UINT8*)BufferToSort+((LoopCount)*ElementSize), ElementSize);
|
||||
@@ -103,7 +103,7 @@ QuickSortWorker (
|
||||
|
||||
//
|
||||
// increment NextSwapLocation
|
||||
//
|
||||
//
|
||||
NextSwapLocation++;
|
||||
}
|
||||
}
|
||||
@@ -115,20 +115,20 @@ QuickSortWorker (
|
||||
CopyMem ((UINT8*)BufferToSort+(NextSwapLocation*ElementSize), Buffer, ElementSize);
|
||||
|
||||
//
|
||||
// Now recurse on 2 paritial lists. neither of these will have the 'pivot' element
|
||||
// Now recurse on 2 paritial lists. neither of these will have the 'pivot' element
|
||||
// IE list is sorted left half, pivot element, sorted right half...
|
||||
//
|
||||
QuickSortWorker(
|
||||
BufferToSort,
|
||||
NextSwapLocation,
|
||||
ElementSize,
|
||||
BufferToSort,
|
||||
NextSwapLocation,
|
||||
ElementSize,
|
||||
CompareFunction,
|
||||
Buffer);
|
||||
|
||||
QuickSortWorker(
|
||||
(UINT8 *)BufferToSort + (NextSwapLocation+1) * ElementSize,
|
||||
Count - NextSwapLocation - 1,
|
||||
ElementSize,
|
||||
Count - NextSwapLocation - 1,
|
||||
ElementSize,
|
||||
CompareFunction,
|
||||
Buffer);
|
||||
|
||||
@@ -149,7 +149,7 @@ QuickSortWorker (
|
||||
on return a buffer of sorted elements
|
||||
@param[in] Count the number of elements in the buffer to sort
|
||||
@param[in] ElementSize Size of an element in bytes
|
||||
@param[in] CompareFunction The function to call to perform the comparison
|
||||
@param[in] CompareFunction The function to call to perform the comparison
|
||||
of any 2 elements
|
||||
**/
|
||||
VOID
|
||||
@@ -188,7 +188,7 @@ PerformQuickSort (
|
||||
|
||||
@retval 0 Buffer1 equal to Buffer2
|
||||
@return < 0 Buffer1 is less than Buffer2
|
||||
@return > 0 Buffer1 is greater than Buffer2
|
||||
@return > 0 Buffer1 is greater than Buffer2
|
||||
**/
|
||||
INTN
|
||||
DevicePathCompare (
|
||||
@@ -202,7 +202,7 @@ DevicePathCompare (
|
||||
CHAR16 *TextPath2;
|
||||
EFI_STATUS Status;
|
||||
INTN RetVal;
|
||||
|
||||
|
||||
DevicePath1 = *(EFI_DEVICE_PATH_PROTOCOL**)Buffer1;
|
||||
DevicePath2 = *(EFI_DEVICE_PATH_PROTOCOL**)Buffer2;
|
||||
|
||||
@@ -217,7 +217,7 @@ DevicePathCompare (
|
||||
if (DevicePath2 == NULL) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
if (mDevicePathToText == NULL) {
|
||||
Status = gBS->LocateProtocol(
|
||||
&gEfiDevicePathToTextProtocolGuid,
|
||||
@@ -245,7 +245,7 @@ DevicePathCompare (
|
||||
DevicePath2,
|
||||
FALSE,
|
||||
FALSE);
|
||||
|
||||
|
||||
RetVal = mUnicodeCollation->StriColl(
|
||||
mUnicodeCollation,
|
||||
TextPath1,
|
||||
@@ -265,7 +265,7 @@ DevicePathCompare (
|
||||
|
||||
@retval 0 Buffer1 equal to Buffer2.
|
||||
@return < 0 Buffer1 is less than Buffer2.
|
||||
@return > 0 Buffer1 is greater than Buffer2.
|
||||
@return > 0 Buffer1 is greater than Buffer2.
|
||||
**/
|
||||
INTN
|
||||
EFIAPI
|
||||
|
@@ -1,9 +1,9 @@
|
||||
#/** @file
|
||||
# Library used for sorting routines.
|
||||
#
|
||||
# Copyright (c) 2009, Intel Corporation.
|
||||
# Copyright (c) 2009, Intel Corporation. All rights reserved. <BR>
|
||||
#
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
|
Reference in New Issue
Block a user