t...@burken:~/test/mawk/mawk-1.3.3/rexp$ diff -u rexp2.c.orig rexp2.c
--- rexp2.c.orig        2009-01-06 20:05:46.000000000 +0100
+++ rexp2.c     2009-01-06 20:06:33.000000000 +0100
@@ -323,6 +323,8 @@
    register STATE *p ;
    unsigned *lenp ;
 {
+  if (!p) return (char *) 0;
+  
    if (p[0].type == M_STR && p[1].type == M_ACCEPT)
    {
       *lenp = p->len ;

The output becomes
$./mawk -v RS='\n|'
mawk: line 0: regular expression compile failed (missing operand)

|
$

/Jörgen




--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to