bug-grep
[Top][All Lists]
Advanced

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

proposed patch to dfa.c


From: Aharon Robbins
Subject: proposed patch to dfa.c
Date: Thu, 12 Jan 2012 19:42:22 +0200
User-agent: Heirloom mailx 12.4 7/29/08

Hi.  This came up in the context of gawk on DJGPP, which doesn't have
MBS_SUPPORT or btowc.  It was failing several tests.  This looks to me
to be the right change.

Thoughts?

Thanks,

Arnold
---------------------
diff --git a/dfa.c b/dfa.c
index 172ff79..b16bf06 100644
--- a/dfa.c
+++ b/dfa.c
@@ -1083,7 +1083,7 @@ parse_bracket_exp (void)
 #ifdef __GLIBC__
 # define is_valid_unibyte_character(c) 1
 #else
-# define is_valid_unibyte_character(c) (MBS_SUPPORT && btowc (c) != WEOF)
+# define is_valid_unibyte_character(c) (MBS_SUPPORT ? btowc (c) != WEOF : 1)
 #endif
 
 /* Return non-zero if C is a `word-constituent' byte; zero otherwise.  */



reply via email to

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