aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/vgrind
diff options
context:
space:
mode:
authorJoerg Wunsch <joerg@FreeBSD.org>1996-10-18 17:23:33 +0000
committerJoerg Wunsch <joerg@FreeBSD.org>1996-10-18 17:23:33 +0000
commit0d4abe6259e049829fb50d86b5cdb7f4fbb04483 (patch)
tree02719197ee39358e0ec5e055a8df55fc2c83928b /usr.bin/vgrind
parent43658eac6462232f0d9112fc9cddbf97456c05ca (diff)
Notes
Diffstat (limited to 'usr.bin/vgrind')
-rw-r--r--usr.bin/vgrind/regexp.c7
-rw-r--r--usr.bin/vgrind/vgrindefs.src6
2 files changed, 10 insertions, 3 deletions
diff --git a/usr.bin/vgrind/regexp.c b/usr.bin/vgrind/regexp.c
index 472b6d420fa56..d606620c3af2c 100644
--- a/usr.bin/vgrind/regexp.c
+++ b/usr.bin/vgrind/regexp.c
@@ -458,7 +458,12 @@ expmatch (s, re, mstring)
/* not optional and we still matched */
return (NIL);
}
- if (!isalnum(*s1) && *s1 != '_')
+ if (!(isalnum(*s1) || *s1 == '_' ||
+ /* C++ destructor */
+ *s1 == '~' ||
+ /* C++ scope operator */
+ (strlen(s1) > 1 && *s1 == ':' && s1[1] == ':' &&
+ (s1++, TRUE))))
return (NIL);
if (*s1 == '\\')
_escaped = _escaped ? FALSE : TRUE;
diff --git a/usr.bin/vgrind/vgrindefs.src b/usr.bin/vgrind/vgrindefs.src
index a5e12eee0c377..c19e836d5dc7c 100644
--- a/usr.bin/vgrind/vgrindefs.src
+++ b/usr.bin/vgrind/vgrindefs.src
@@ -33,7 +33,8 @@
#
C|c:\
- :pb=^\d?*?\d?\p\d?\(\a?\)(\d|{):bb={:be=}:cb=/*:ce=*/:sb=":se=\e":lb=':\
+ :pb=^\a?\d?*?\d?\p\d?\(\a?\)(\d|{):\
+ :bb={:be=}:cb=/*:ce=*/:sb=":se=\e":lb=':\
:le=\e':tl:\
:kw=asm auto break case char continue default do double else enum\
extern float for fortran goto if int long register return short\
@@ -134,7 +135,8 @@ yacc|Yacc|y:\
#else #endif #if #ifdef #ifndef #include #undef # define else endif\
if ifdef ifndef include undef:
C++|c++:\
- :pb=^\d?*?\d?\p\d?\(\a?\)(\d|{):bb={:be=}:cb=/*:ce=*/:ab=//:\
+ :pb=^\a?\d?*?\d?\p\d?\(\a?\)(\d|{):\
+ :bb={:be=}:cb=/*:ce=*/:ab=//:\
:ae=$:sb=":se=\e":lb=':\
:le=\e':tl:\
:kw=asm auto break case char continue default do double else enum\