On Mon, Jun 25, 2018 at 2:30 PM Warren Young <war...@etr-usa.com> wrote:

> On Sun, Jun 24, 2018 at 4:48 PM, Stephan Beal <sgb...@googlemail.com>
> wrote:
>
>> Isn't adding hundreds (literally) of gotos just as fraught with
>> opportunities for failure ;)?
>>
>
> #ifdef LIBFOSSIL
> #  define FOSSIL_EXIT(n) longjmp(blabla)
> #else
> #  define FOSSIL_EXIT(n) exit(n)
> #endif
>

Yeah, i was exaggerating, but still... i think the required effort is being
underestimated by at least an order of magnitude. That said: i would
_absolutely love_ to be proven wrong.

$ sed -i -e 's/exit(/FOSSIL_EXIT(/g' src/*.c
>

i recommend a slight variation:

perl -i -pe 's/\bexit\(/FOSSIL_EXIT(/g' src/*.c

sed probably also has a \b (at-word-boundary) equivalent, but i'm not as
well-versed in that flavor of regex.

Sidebar: i once corrupted a fossil checkout db by using $(find . -type f)
as my target for some perl -i-style refactoring :|. Never perlify your
sqlite db files.

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to