re.c
Calls a native string-search APICalls a character-class helper
SHA-256afd3f05726f1cc251d0abfefbbff531609a5bf46c7cf8658aede98d83ff25e30
MaleculeO(Er)H(Db₂)
Evidence
6 * Copyright (C) 1991-2019, 2021, 2022, 2023
7 * the Free Software Foundation, Inc.
8 *
9 * This file is part of GAWK, the GNU implementation of the
10 * AWK Programming Language.
11 *
12 * GAWK is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 3 of the License, or
15 * (at you …
15:30… version.
16 *
17 * GAWK is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
25 */
26
27#include "awk.h"
28
29#include "localeinfo.h"
30
31static reg_syntax_t syn;
⋯6 lines
40:28… size_t len, bool ignorecase, bool dfa, bool canfatal)
41{
42 static char metas[] = ".*+(){}[]|?^$\\";
43 Regexp *rp;
44 const char *rerr;
⋯4 lines
163:17… = 1
164 && do_traditional
165 && ! do_posix
166 && (isdigit(c) || c == 'x')
167 && strchr(metas, *result) != NULL)
168 *dest++ = '\\';
169
⋯4 lines