]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/BaseSortLib/BaseSortLib.c
Adding StringNoCaseCompare to SortLib
[mirror_edk2.git] / ShellPkg / Library / BaseSortLib / BaseSortLib.c
index 04d818efd1d3a54d8d641fd50227b35d58ac9e68..91b2a17e7abf2840baf9facd0630b345974e03db 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Library used for sorting routines.\r
 \r
-Copyright (c) 2009, Intel Corporation\r
+Copyright (c) 2009, Intel Corporation<BR>\r
 All rights reserved. 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
@@ -50,7 +50,8 @@ QuickSortWorker (
   IN CONST UINTN                        ElementSize,\r
   IN       SORT_COMPARE                 CompareFunction,\r
   IN VOID                               *Buffer\r
-  ){\r
+  )\r
+{\r
   VOID        *Pivot;\r
   UINTN       LoopCount;\r
   UINTN       NextSwapLocation;\r
@@ -149,7 +150,8 @@ PerformQuickSort (
   IN CONST UINTN                        Count,\r
   IN CONST UINTN                        ElementSize,\r
   IN       SORT_COMPARE                 CompareFunction\r
-  ){\r
+  )\r
+{\r
   VOID  *Buffer;\r
 \r
   ASSERT(BufferToSort     != NULL);\r
@@ -168,3 +170,41 @@ PerformQuickSort (
   FreePool(Buffer);\r
   return;\r
 }\r
+\r
+/**\r
+  Not supported in Base version.\r
+  \r
+  ASSERT and return 0.\r
+**/\r
+INTN\r
+DevicePathCompare (\r
+  IN  VOID             *Buffer1,\r
+  IN  VOID             *Buffer2\r
+  )\r
+{\r
+  ASSERT(FALSE);\r
+  return 0;\r
+}\r
+\r
+/**\r
+  Function to compare 2 strings without regard to case of the characters.\r
+\r
+  @param[in] Buffer1            Pointer to String to compare.\r
+  @param[in] Buffer2            Pointer to second String to compare.\r
+\r
+  @retval 0                     Buffer1 equal to Buffer2.\r
+  @return < 0                   Buffer1 is less than Buffer2.\r
+  @return > 0                   Buffer1 is greater than Buffer2.                 \r
+**/\r
+INTN\r
+EFIAPI\r
+StringNoCaseCompare (\r
+  IN  VOID             *Buffer1,\r
+  IN  VOID             *Buffer2\r
+  )\r
+{\r
+  ASSERT(FALSE);\r
+  return 0;\r
+}\r
+\r
+\r