michael@0: /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: michael@0: /* We need this because Solaris' version of qsort is broken and michael@0: * causes array bounds reads. michael@0: */ michael@0: michael@0: #ifndef nsQuickSort_h___ michael@0: #define nsQuickSort_h___ michael@0: michael@0: #include "nscore.h" michael@0: michael@0: #ifdef __cplusplus michael@0: extern "C" { michael@0: #endif michael@0: michael@0: /** michael@0: * Parameters: michael@0: * 1. the array to sort michael@0: * 2. the number of elements in the array michael@0: * 3. the size of each array element michael@0: * 4. comparison function taking two elements and parameter #5 and michael@0: * returning an integer: michael@0: * + less than zero if the first element should be before the second michael@0: * + 0 if the order of the elements does not matter michael@0: * + greater than zero if the second element should be before the first michael@0: * 5. extra data to pass to comparison function michael@0: */ michael@0: NS_COM_GLUE void NS_QuickSort(void *, unsigned int, unsigned int, michael@0: int (*)(const void *, const void *, void *), michael@0: void *); michael@0: michael@0: #ifdef __cplusplus michael@0: } michael@0: #endif michael@0: michael@0: #endif /* nsQuickSort_h___ */