On Wednesday 21 January 2009, Johannes Schindelin <Johannes.Schindelin@xxxxxx> wrote about 'Re: [PATCH] Change the spelling of "wordregex".': >On Tue, 20 Jan 2009, Boyd Stephen Smith Jr. wrote: >> diff --git a/userdiff.c b/userdiff.c >> index 2b55509..d556da9 100644 >> --- a/userdiff.c >> +++ b/userdiff.c >> @@ -6,8 +6,8 @@ static struct userdiff_driver *drivers; >> static int ndrivers; >> static int drivers_alloc; >> >> -#define PATTERNS(name, pattern, wordregex) \ >> - { name, NULL, -1, { pattern, REG_EXTENDED }, wordregex } >> +#define PATTERNS(name, pattern, word_regex) \ >> + { name, NULL, -1, { pattern, REG_EXTENDED }, word_regex } >> static struct userdiff_driver builtin_drivers[] = { >> PATTERNS("html", "^[ \t]*(<[Hh][1-6][ \t].*>.*)$", >> "[^<>= \t]+|[^[:space:]]|[\x80-\xff]+"), > >In general, it is an awesomly good idea to imitate code that is already >there. That literally guarantees consistency (which is Good, as you >know). Agreed that consistency is good. However, using "wordregex" isn't consistent. The rest of the time it is used as an identifier in the code, it's spelled "word_regex" or "word_regexp", even before my patch. (Declarations in: userdiff.h, builtin-grep.c, 3x diff.c, and grep.h) In particular, the macro is used to initialize "struct userdiff_driver"s and the relevant member of that struct uses "word_regex" before my patch. -- Boyd Stephen Smith Jr. ,= ,-_-. =. bss@xxxxxxxxxxxxxxxxx ((_/)o o(\_)) ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-' http://iguanasuicide.net/ \_/
Attachment:
signature.asc
Description: This is a digitally signed message part.