/** @file\r
This is a test application that demonstrates how to use the sorting functions.\r
\r
- Copyright (c) 2009-2010, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2009 - 2010, 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
#include <Library/ShellCEntryLib.h>\r
#include <Library/SortLib.h>\r
\r
-INTN Test(CONST VOID*b1, CONST VOID*b2)\r
+/**\r
+ Test comparator.\r
+\r
+ @param[in] b1 The first INTN\r
+ @param[in] b2 The other INTN\r
+\r
+ @retval 0 They are the same.\r
+ @retval -1 b1 is less than b2\r
+ @retval 1 b1 is greater then b2\r
+**/\r
+INTN\r
+EFIAPI\r
+Test(CONST VOID *b1, CONST VOID *b2)\r
{\r
if (*(INTN*)b1 == *(INTN*)b2) {\r
return (0);\r
The ShellCEntryLib library instance wrappers the actual UEFI application\r
entry point and calls this ShellAppMain function.\r
\r
- @param ImageHandle The image handle of the UEFI Application.\r
- @param SystemTable A pointer to the EFI System Table.\r
+ @param Argc Argument count\r
+ @param Argv The parsed arguments\r
\r
@retval 0 The application exited normally.\r
@retval Other An error occurred.\r
IN CHAR16 **Argv\r
)\r
{\r
- INTN Array[10] = {2,3,4,1,5,6,7,8,1,5};\r
+ INTN Array[10];\r
+\r
+ Array[0] = 2;\r
+ Array[1] = 3;\r
+ Array[2] = 4;\r
+ Array[3] = 1;\r
+ Array[4] = 5;\r
+ Array[5] = 6;\r
+ Array[6] = 7;\r
+ Array[7] = 8;\r
+ Array[8] = 1;\r
+ Array[9] = 5;\r
+\r
Print(L"Array = %d, %d, %d, %d, %d, %d, %d, %d, %d, %d\r\n", Array[0],Array[1],Array[2],Array[3],Array[4],Array[5],Array[6],Array[7],Array[8],Array[9]);\r
PerformQuickSort(Array, 10, sizeof(INTN), Test);\r
Print(L"POST-SORT\r\n");\r