1 |
+ |
/* $MidnightBSD$ */ |
2 |
|
/* re.c: This file contains the regular expression interface routines for |
3 |
|
the ed line editor. */ |
4 |
|
/*- |
26 |
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
27 |
|
* SUCH DAMAGE. |
28 |
|
*/ |
29 |
< |
/* $FreeBSD: src/bin/ed/re.c,v 1.20 2003/07/20 10:24:09 ru Exp $ */ |
29 |
> |
|
30 |
|
#include <sys/cdefs.h> |
31 |
< |
__MBSDID("$MidnightBSD$"); |
31 |
> |
__FBSDID("$FreeBSD: stable/10/bin/ed/re.c 252374 2013-06-29 15:49:26Z kientzle $"); |
32 |
|
|
33 |
|
#include "ed.h" |
34 |
|
|
34 |
– |
|
35 |
– |
extern int patlock; |
36 |
– |
|
35 |
|
const char *errmsg = ""; |
36 |
|
|
37 |
|
/* get_compiled_pattern: return pointer to compiled pattern from command |
90 |
|
default: |
91 |
|
break; |
92 |
|
case '[': |
93 |
< |
if ((nd = parse_char_class(++nd)) == NULL) { |
93 |
> |
if ((nd = parse_char_class(nd + 1)) == NULL) { |
94 |
|
errmsg = "unbalanced brackets ([])"; |
95 |
|
return NULL; |
96 |
|
} |