wcscoll.c (290494) | wcscoll.c (298830) |
---|---|
1/*- 2 * Copyright 2010 Nexenta Systems, Inc. All rights reserved. 3 * Copyright (c) 2002 Tim J. Robbins 4 * All rights reserved. 5 * 6 * Copyright (c) 2011 The FreeBSD Foundation 7 * All rights reserved. 8 * Portions of this software were developed by David Chisnall --- 17 unchanged lines hidden (view full) --- 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> | 1/*- 2 * Copyright 2010 Nexenta Systems, Inc. All rights reserved. 3 * Copyright (c) 2002 Tim J. Robbins 4 * All rights reserved. 5 * 6 * Copyright (c) 2011 The FreeBSD Foundation 7 * All rights reserved. 8 * Portions of this software were developed by David Chisnall --- 17 unchanged lines hidden (view full) --- 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> |
34__FBSDID("$FreeBSD: head/lib/libc/string/wcscoll.c 290494 2015-11-07 12:43:35Z bapt $"); | 34__FBSDID("$FreeBSD: head/lib/libc/string/wcscoll.c 298830 2016-04-30 01:24:24Z pfg $"); |
35 36#include <errno.h> 37#include <stdlib.h> 38#include <string.h> 39#include <wchar.h> 40#include "collate.h" 41 42int --- 17 unchanged lines hidden (view full) --- 60 ret = 0; 61 62 /* 63 * Once upon a time we had code to try to optimize this, but 64 * it turns out that you really can't make many assumptions 65 * safely. You absolutely have to run this pass by pass, 66 * because some passes will be ignored for a given character, 67 * while others will not. Simpler locales will benefit from | 35 36#include <errno.h> 37#include <stdlib.h> 38#include <string.h> 39#include <wchar.h> 40#include "collate.h" 41 42int --- 17 unchanged lines hidden (view full) --- 60 ret = 0; 61 62 /* 63 * Once upon a time we had code to try to optimize this, but 64 * it turns out that you really can't make many assumptions 65 * safely. You absolutely have to run this pass by pass, 66 * because some passes will be ignored for a given character, 67 * while others will not. Simpler locales will benefit from |
68 * having fewer passes, and most comparisions should resolve | 68 * having fewer passes, and most comparisons should resolve |
69 * during the primary pass anyway. 70 * 71 * Note that we do one final extra pass at the end to pick 72 * up UNDEFINED elements. There is special handling for them. 73 */ 74 for (pass = 0; pass <= table->info->directive_count; pass++) { 75 76 const int32_t *st1 = NULL; --- 147 unchanged lines hidden --- | 69 * during the primary pass anyway. 70 * 71 * Note that we do one final extra pass at the end to pick 72 * up UNDEFINED elements. There is special handling for them. 73 */ 74 for (pass = 0; pass <= table->info->directive_count; pass++) { 75 76 const int32_t *st1 = NULL; --- 147 unchanged lines hidden --- |