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 * This code is derived from software contributed to Berkeley by 7 * Henry Spencer. 8 * --- 32 unchanged lines hidden (view full) --- 41static char sccsid[] = "@(#)regcomp.c 8.5 (Berkeley) 3/20/94"; 42#endif /* LIBC_SCCS and not lint */ 43 44#include <sys/types.h> 45#include <stdio.h> 46#include <string.h> 47#include <ctype.h> 48#include <limits.h> |
49#include <stdlib.h> 50#include <regex.h> 51 |
52#include "collate.h" 53 |
54#include "utils.h" 55#include "regex2.h" 56 57#include "cclass.h" 58#include "cname.h" 59 60/* 61 * parse structure, passed up and down to avoid global variables and --- 737 unchanged lines hidden (view full) --- 799 finish = '-'; 800 else 801 finish = p_b_symbol(p); 802 } else 803 finish = start; 804 if (start == finish) 805 CHadd(cs, start); 806 else { |
807 (void)REQUIRE(__collate_range_cmp(start, finish) <= 0, REG_ERANGE); |
808 for (i = CHAR_MIN; i <= CHAR_MAX; i++) { |
809 if ( __collate_range_cmp(start, i) <= 0 810 && __collate_range_cmp(i, finish) <= 0 |
811 ) 812 CHadd(cs, i); 813 } 814 } 815 break; 816 } 817} 818 --- 953 unchanged lines hidden --- |