Article View: gnu.utils.bug
Article #1703Minor bug in gnugrep-1.4 (& fix)
From: Roy Binz
Date: Fri, 12 Jan 1990 19:02
Date: Fri, 12 Jan 1990 19:02
59 lines
2073 bytes
2073 bytes
GNU grep does not treat the underscore as an alphabetic character because
<ctype.h> does not consider it as such. This can be most annoying when
grepping for identifiers which have underscores in them.
Below is a context diff to dfa.h that fixes this problem.
Roy Binz
Solbourne Computer, Longmont, Colorado
Domain: reb@Solbourne.COM, UUCP: {boulder,sun}!stan!reb
Phone : 303-678-4307
------Cut Here-----
------- dfa.h -------
*** /tmp/da3205 Fri Jan 12 12:01:43 1990
--- dfa.h Fri Jan 12 11:51:32 1990
***************
*** 129,136 ****
#define ISALPHA(c) isalpha(c)
#define ISUPPER(C) isupper(c)
#else
! #define ISALNUM(c) (isascii(c) && isalnum(c))
! #define ISALPHA(c) (isascii(c) && isalpha(c))
#define ISUPPER(c) (isascii(c) && isupper(c))
#endif
--- 129,136 ----
#define ISALPHA(c) isalpha(c)
#define ISUPPER(C) isupper(c)
#else
! #define ISALNUM(c) ((isascii(c) && isalnum(c)) || (c) == '_')
! #define ISALPHA(c) ((isascii(c) && isalpha(c)) || (c) == '_')
#define ISUPPER(c) (isascii(c) && isupper(c))
#endif
***************
*** 143,150 ****
extern char *bcopy(), *bzero();
! #define ISALNUM(c) (isascii(c) && isalnum(c))
! #define ISALPHA(c) (isascii(c) && isalpha(c))
#endif /* ! __STDC__ */
--- 143,151 ----
extern char *bcopy(), *bzero();
! #define ISALNUM(c) ((isascii(c) && isalnum(c)) || (c) == '_')
! #define ISALPHA(c) ((isascii(c) && isalpha(c)) || (c) == '_')
! #define ISUPPER(c) (isascii(c) && isupper(c))
#endif /* ! __STDC__ */
--
Roy Binz
Solbourne Computer, Longmont, Colorado
Domain: reb@Solbourne.COM, UUCP: {boulder,sun}!stan!reb
Phone : 303-678-4307
Technical Details
Message-ID:
<1990Jan12.190259.16569@Solbourne.COM>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!stan!starwolf!rebShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!stan!starwolf!reb From: reb@starwolf.Solbourne.COM (Roy Binz) Newsgroups: gnu.utils.bug Subject: Minor bug in gnugrep-1.4 (& fix) Message-ID: <1990Jan12.190259.16569@Solbourne.COM> Date: 12 Jan 90 19:02:59 GMT Sender: news@Solbourne.COM Organization: Solbourne Computer, Inc. Lines: 59