Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/ctags Don't recognize `int (*f)(); ' as a function. T...



details:   https://anonhg.NetBSD.org/src/rev/7ad357da0dce
branches:  trunk
changeset: 473495:7ad357da0dce
user:      ross <ross%NetBSD.org@localhost>
date:      Sat Jun 05 19:04:23 1999 +0000

description:
Don't recognize `int (*f)();' as a function. The false match caused the
next real function to be eaten and skipped during the forward scan for `{'.

Restores about 35 lost functions to the kernel tags file.

diffstat:

 usr.bin/ctags/C.c |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (30 lines):

diff -r f97047295f77 -r 7ad357da0dce usr.bin/ctags/C.c
--- a/usr.bin/ctags/C.c Sat Jun 05 16:55:19 1999 +0000
+++ b/usr.bin/ctags/C.c Sat Jun 05 19:04:23 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: C.c,v 1.6 1999/05/26 08:43:30 ross Exp $       */
+/*     $NetBSD: C.c,v 1.7 1999/06/05 19:04:23 ross Exp $       */
 
 /*
  * Copyright (c) 1987, 1993, 1994
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)C.c        8.4 (Berkeley) 4/2/94";
 #else
-__RCSID("$NetBSD: C.c,v 1.6 1999/05/26 08:43:30 ross Exp $");
+__RCSID("$NetBSD: C.c,v 1.7 1999/06/05 19:04:23 ross Exp $");
 #endif
 #endif /* not lint */
 
@@ -146,6 +146,11 @@
                 * level zero indicates a function.
                 */
                case '(':
+                       do c = getc(inf);
+                       while(iswhite(c));
+                       if (c == '*')
+                               break;
+                       else    ungetc(c, inf);
                        if (!level && token) {
                                int     curline;
 



Home | Main Index | Thread Index | Old Index