Deleted Added
full compact
regcomp.c (298830) regcomp.c (301461)
1/*-
2 * Copyright (c) 1992, 1993, 1994 Henry Spencer.
3 * Copyright (c) 1992, 1993, 1994
4 * The Regents of the University of California. 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

--- 28 unchanged lines hidden (view full) ---

37 *
38 * @(#)regcomp.c 8.5 (Berkeley) 3/20/94
39 */
40
41#if defined(LIBC_SCCS) && !defined(lint)
42static char sccsid[] = "@(#)regcomp.c 8.5 (Berkeley) 3/20/94";
43#endif /* LIBC_SCCS and not lint */
44#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1992, 1993, 1994 Henry Spencer.
3 * Copyright (c) 1992, 1993, 1994
4 * The Regents of the University of California. 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

--- 28 unchanged lines hidden (view full) ---

37 *
38 * @(#)regcomp.c 8.5 (Berkeley) 3/20/94
39 */
40
41#if defined(LIBC_SCCS) && !defined(lint)
42static char sccsid[] = "@(#)regcomp.c 8.5 (Berkeley) 3/20/94";
43#endif /* LIBC_SCCS and not lint */
44#include <sys/cdefs.h>
45__FBSDID("$FreeBSD: head/lib/libc/regex/regcomp.c 298830 2016-04-30 01:24:24Z pfg $");
45__FBSDID("$FreeBSD: head/lib/libc/regex/regcomp.c 301461 2016-06-05 19:12:52Z pfg $");
46
47#include <sys/types.h>
48#include <stdio.h>
49#include <string.h>
50#include <ctype.h>
51#include <limits.h>
52#include <stdlib.h>
53#include <regex.h>

--- 762 unchanged lines hidden (view full) ---

816 finish = start;
817 if (start == finish)
818 CHadd(p, cs, start);
819 else {
820 if (table->__collate_load_error) {
821 (void)REQUIRE((uch)start <= (uch)finish, REG_ERANGE);
822 CHaddrange(p, cs, start, finish);
823 } else {
46
47#include <sys/types.h>
48#include <stdio.h>
49#include <string.h>
50#include <ctype.h>
51#include <limits.h>
52#include <stdlib.h>
53#include <regex.h>

--- 762 unchanged lines hidden (view full) ---

816 finish = start;
817 if (start == finish)
818 CHadd(p, cs, start);
819 else {
820 if (table->__collate_load_error) {
821 (void)REQUIRE((uch)start <= (uch)finish, REG_ERANGE);
822 CHaddrange(p, cs, start, finish);
823 } else {
824 (void)REQUIRE(__collate_range_cmp(table, start, finish) <= 0, REG_ERANGE);
824 (void)REQUIRE(__wcollate_range_cmp(table, start, finish) <= 0, REG_ERANGE);
825 for (i = 0; i <= UCHAR_MAX; i++) {
825 for (i = 0; i <= UCHAR_MAX; i++) {
826 if ( __collate_range_cmp(table, start, i) <= 0
827 && __collate_range_cmp(table, i, finish) <= 0
826 if ( __wcollate_range_cmp(table, start, i) <= 0
827 && __wcollate_range_cmp(table, i, finish) <= 0
828 )
829 CHadd(p, cs, i);
830 }
831 }
832 }
833 break;
834 }
835}

--- 983 unchanged lines hidden ---
828 )
829 CHadd(p, cs, i);
830 }
831 }
832 }
833 break;
834 }
835}

--- 983 unchanged lines hidden ---