Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | |
michael@0 | 7 | /* We need this because Solaris' version of qsort is broken and |
michael@0 | 8 | * causes array bounds reads. |
michael@0 | 9 | */ |
michael@0 | 10 | |
michael@0 | 11 | #ifndef nsQuickSort_h___ |
michael@0 | 12 | #define nsQuickSort_h___ |
michael@0 | 13 | |
michael@0 | 14 | #include "nscore.h" |
michael@0 | 15 | |
michael@0 | 16 | #ifdef __cplusplus |
michael@0 | 17 | extern "C" { |
michael@0 | 18 | #endif |
michael@0 | 19 | |
michael@0 | 20 | /** |
michael@0 | 21 | * Parameters: |
michael@0 | 22 | * 1. the array to sort |
michael@0 | 23 | * 2. the number of elements in the array |
michael@0 | 24 | * 3. the size of each array element |
michael@0 | 25 | * 4. comparison function taking two elements and parameter #5 and |
michael@0 | 26 | * returning an integer: |
michael@0 | 27 | * + less than zero if the first element should be before the second |
michael@0 | 28 | * + 0 if the order of the elements does not matter |
michael@0 | 29 | * + greater than zero if the second element should be before the first |
michael@0 | 30 | * 5. extra data to pass to comparison function |
michael@0 | 31 | */ |
michael@0 | 32 | NS_COM_GLUE void NS_QuickSort(void *, unsigned int, unsigned int, |
michael@0 | 33 | int (*)(const void *, const void *, void *), |
michael@0 | 34 | void *); |
michael@0 | 35 | |
michael@0 | 36 | #ifdef __cplusplus |
michael@0 | 37 | } |
michael@0 | 38 | #endif |
michael@0 | 39 | |
michael@0 | 40 | #endif /* nsQuickSort_h___ */ |