bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] print regerror string on regcomp error


From: Grisha Levit
Subject: Re: [PATCH] print regerror string on regcomp error
Date: Mon, 17 Jul 2023 13:10:39 -0400

On Mon, Jul 17, 2023, 12:09 Chet Ramey <chet.ramey@case.edu> wrote:

> I guess we'll see how much the text of regerror(3)
> error messages varies across regexp implementations.
>

Is that a concern? The GNU strings [1] are translated and even their
untranslated text does differ from that of the BSD ones [2].

The set of errors is also different, e.g. REG_EMPTY is only in BSD because
its regcomp() does not accept `()' while GNU's does.  But it's precisely
this difference that I think would help clue users into why their scripts
work on one platform and not another.


[1]:
https://sourceware.org/git/?p=glibc.git;a=blob;f=posix/regcomp.c;h=12650714c06890d99a6a7aaa96437a2f83cc973b;hb=HEAD#l132

[2]:
https://cgit.freebsd.org/src/tree/lib/libc/regex/regerror.c?id=8a16b7a18f5d0b031f09832fd7752fba717e2a97#n90


reply via email to

[Prev in Thread] Current Thread [Next in Thread]