strcoll.c (16255) | strcoll.c (17141) |
---|---|
1/*- 2 * Copyright (c) 1995 Alex Tatmanjants <alex@elvisti.kiev.ua> 3 * at Electronni Visti IA, Kiev, Ukraine. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 10 unchanged lines hidden (view full) --- 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * | 1/*- 2 * Copyright (c) 1995 Alex Tatmanjants <alex@elvisti.kiev.ua> 3 * at Electronni Visti IA, Kiev, Ukraine. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 10 unchanged lines hidden (view full) --- 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * |
27 * $Id: strcoll.c,v 1.4 1995/04/16 22:43:45 ache Exp $ | 27 * $Id: strcoll.c,v 1.5 1996/06/09 14:56:06 ache Exp $ |
28 */ 29 30#include <stdlib.h> 31#include <string.h> 32#include <ctype.h> 33#include "collate.h" 34 35int --- 10 unchanged lines hidden (view full) --- 46 47 while (tolower(*us1) == tolower(*us2)) { 48 if (*us1 == '\0') 49 return (0); 50 if (isupper(*us1) && islower(*us2)) 51 return (-1); 52 else if (islower(*us1) && isupper(*us2)) 53 return (1); | 28 */ 29 30#include <stdlib.h> 31#include <string.h> 32#include <ctype.h> 33#include "collate.h" 34 35int --- 10 unchanged lines hidden (view full) --- 46 47 while (tolower(*us1) == tolower(*us2)) { 48 if (*us1 == '\0') 49 return (0); 50 if (isupper(*us1) && islower(*us2)) 51 return (-1); 52 else if (islower(*us1) && isupper(*us2)) 53 return (1); |
54 *us1++; 55 *us2++; | 54 us1++; 55 us2++; |
56 } 57 return (tolower(*us1) - tolower(*us2)); 58 } 59 60 len = len2 = 1; 61 ret = ret2 = 0; 62 tt = t = __collate_substitute(s); 63 tt2 = t2 = __collate_substitute(s2); --- 31 unchanged lines hidden --- | 56 } 57 return (tolower(*us1) - tolower(*us2)); 58 } 59 60 len = len2 = 1; 61 ret = ret2 = 0; 62 tt = t = __collate_substitute(s); 63 tt2 = t2 = __collate_substitute(s2); --- 31 unchanged lines hidden --- |