new copyright notice
[unix-history] / usr / src / usr.bin / ctags / ctags.c
index 533b7d1..3befa94 100644 (file)
@@ -1,21 +1,22 @@
 /*
 /*
- * Copyright (c) 1987 Regents of the University of California.
- * All rights reserved.  The Berkeley software License Agreement
- * specifies the terms and conditions for redistribution.
+ * Copyright (c) 1987 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * %sccs.include.redist.c%
  */
 
 #ifndef lint
 char copyright[] =
  */
 
 #ifndef lint
 char copyright[] =
-"@(#) Copyright (c) 1987 Regents of the University of California.\n\
+"@(#) Copyright (c) 1987 The Regents of the University of California.\n\
  All rights reserved.\n";
  All rights reserved.\n";
-#endif not lint
+#endif /* not lint */
 
 #ifndef lint
 
 #ifndef lint
-static char sccsid[] = "@(#)ctags.c    5.3 (Berkeley) %G%";
-#endif not lint
+static char sccsid[] = "@(#)ctags.c    5.7 (Berkeley) %G%";
+#endif /* not lint */
 
 #include <ctags.h>
 
 #include <ctags.h>
-#include <strings.h>
+#include <string.h>
 
 /*
  * ctags: create a tags file
 
 /*
  * ctags: create a tags file
@@ -206,8 +207,10 @@ find_entries(file)
                                 * we search all 3 parts of a lex file
                                 * for C references.  This may be wrong.
                                 */
                                 * we search all 3 parts of a lex file
                                 * for C references.  This may be wrong.
                                 */
+                               toss_yysec();
                                (void)strcpy(lbuf,"%%$");
                                (void)strcpy(lbuf,"%%$");
-                               pfnote("yylex",0);
+                               pfnote("yylex",lineno);
+                               rewind(inf);
                        }
                }
 /* yacc */     else if (cp[1] == 'y' && !cp[2]) {
                        }
                }
 /* yacc */     else if (cp[1] == 'y' && !cp[2]) {
@@ -216,6 +219,8 @@ find_entries(file)
                         * for C references.  This may be wrong.
                         */
                        toss_yysec();
                         * for C references.  This may be wrong.
                         */
                        toss_yysec();
+                       (void)strcpy(lbuf,"%%$");
+                       pfnote("yyparse",lineno);
                        y_entries();
                }
 /* fortran */  else if ((cp[1] != 'c' && cp[1] != 'h') && !cp[2]) {
                        y_entries();
                }
 /* fortran */  else if ((cp[1] != 'c' && cp[1] != 'h') && !cp[2]) {