=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/awk/b.c,v retrieving revision 1.31 retrieving revision 1.32 diff -c -r1.31 -r1.32 *** src/usr.bin/awk/b.c 2020/06/10 21:05:02 1.31 --- src/usr.bin/awk/b.c 2020/06/26 15:57:39 1.32 *************** *** 1,4 **** ! /* $OpenBSD: b.c,v 1.31 2020/06/10 21:05:02 millert Exp $ */ /**************************************************************** Copyright (C) Lucent Technologies 1997 All Rights Reserved --- 1,4 ---- ! /* $OpenBSD: b.c,v 1.32 2020/06/26 15:57:39 millert Exp $ */ /**************************************************************** Copyright (C) Lucent Technologies 1997 All Rights Reserved *************** *** 405,411 **** i++; } *bp = 0; ! DPRINTF( ("cclenter: in = |%s|, out = |%s|\n", op, buf) ); xfree(op); return (char *) tostring((char *) buf); } --- 405,411 ---- i++; } *bp = 0; ! DPRINTF("cclenter: in = |%s|, out = |%s|\n", op, buf); xfree(op); return (char *) tostring((char *) buf); } *************** *** 741,747 **** { /* uses relex() to scan regular expression */ Node *np; ! DPRINTF( ("reparse <%s>\n", p) ); lastre = prestr = (const uschar *) p; /* prestr points to string to be parsed */ rtok = relex(); /* GNU compatibility: an empty regexp matches anything */ --- 741,747 ---- { /* uses relex() to scan regular expression */ Node *np; ! DPRINTF("reparse <%s>\n", p); lastre = prestr = (const uschar *) p; /* prestr points to string to be parsed */ rtok = relex(); /* GNU compatibility: an empty regexp matches anything */ *************** *** 1112,1117 **** --- 1112,1123 ---- if (!adjbuf((char **) &buf, &bufsz, bp-buf+1, 100, (char **) &bp, "relex2")) FATAL("out of space for reg expr %.10s...", lastre); if (cc->cc_func(i)) { + /* escape backslash */ + if (i == '\\') { + *bp++ = '\\'; + n++; + } + *bp++ = i; n++; }