summaryrefslogtreecommitdiffstats
path: root/usr.bin/ctags
diff options
context:
space:
mode:
authorcharnier <charnier@FreeBSD.org>2001-12-12 18:24:42 +0000
committercharnier <charnier@FreeBSD.org>2001-12-12 18:24:42 +0000
commitf6879ce93c9a5c8085927875bd4f0961a79d0cfb (patch)
treeb30ef59722a8fb44406b6408d67bc6abb546853b /usr.bin/ctags
parentcc22344fd1fb72c0f89bfae4564cd0f47509ff7f (diff)
downloadFreeBSD-src-f6879ce93c9a5c8085927875bd4f0961a79d0cfb.zip
FreeBSD-src-f6879ce93c9a5c8085927875bd4f0961a79d0cfb.tar.gz
Remove unused #includes. lex -> Lex, yacc -> Yacc, ... Some .Nm to .Em
conversions. Sort #includes. Spelling. use errx() instead of err() when explicit message is given.
Diffstat (limited to 'usr.bin/ctags')
-rw-r--r--usr.bin/ctags/C.c1
-rw-r--r--usr.bin/ctags/ctags.154
-rw-r--r--usr.bin/ctags/ctags.c4
-rw-r--r--usr.bin/ctags/fortran.c1
-rw-r--r--usr.bin/ctags/print.c2
-rw-r--r--usr.bin/ctags/tree.c2
-rw-r--r--usr.bin/ctags/yacc.c3
7 files changed, 32 insertions, 35 deletions
diff --git a/usr.bin/ctags/C.c b/usr.bin/ctags/C.c
index f7394c5..b1f162d 100644
--- a/usr.bin/ctags/C.c
+++ b/usr.bin/ctags/C.c
@@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$");
#include <limits.h>
#include <stdio.h>
-#include <string.h>
#include "ctags.h"
diff --git a/usr.bin/ctags/ctags.1 b/usr.bin/ctags/ctags.1
index 7082995..0405195 100644
--- a/usr.bin/ctags/ctags.1
+++ b/usr.bin/ctags/ctags.1
@@ -49,8 +49,8 @@ makes a tags file for
.Xr ex 1
from the specified C,
Pascal, Fortran,
-.Tn YACC ,
-lex, and lisp sources.
+Yacc,
+Lex, and Lisp sources.
A tags file gives the locations of specified objects in a group of files.
Each line of the tags file contains the object name, the file in which it
is defined, and a search pattern for the object definition, separated by
@@ -64,33 +64,35 @@ Depending upon the options provided to
.Nm ,
objects will consist of subroutines, typedefs, defines, structs,
enums and unions.
-.Bl -tag -width Ds
+.Pp
+The following options are available:
+.Bl -tag -width indent
.It Fl B
-use backward searching patterns
+Use backward searching patterns
.Pq Li ?...? .
.It Fl F
-use forward searching patterns
+Use forward searching patterns
.Pq Li /.../
(the default).
.It Fl a
-append to
+Append to
.Ar tags
file.
.It Fl d
-create tags for
+Create tags for
.Li #defines
that don't take arguments;
.Li #defines
that take arguments are tagged automatically.
.It Fl f
-Places the tag descriptions in a file called
+Place the tag descriptions in a file called
.Ar tagsfile .
The default behaviour is to place them in a file called
.Ar tags .
.It Fl t
-create tags for typedefs, structs, unions, and enums.
+Create tags for typedefs, structs, unions, and enums.
.It Fl u
-update the specified files in the
+Update the specified files in the
.Ar tags
file, that is, all
references to them are deleted, and the new values are appended to the
@@ -112,7 +114,7 @@ ctags \-v files \&| sort \-f > index
vgrind \-x index
.Ed
.It Fl w
-suppress warning diagnostics.
+Suppress warning diagnostics.
.It Fl x
.Nm
produces a list of object
@@ -123,22 +125,22 @@ function index.
.El
.Pp
Files whose names end in
-.Nm \&.c
+.Em \&.c
or
-.Nm \&.h
+.Em \&.h
are assumed to be C
source files and are searched for C style routine and macro definitions.
Files whose names end in
-.Nm \&.y
+.Em \&.y
are assumed to be
-.Tn YACC
+Yacc
source files.
Files whose names end in
-.Nm \&.l
-are assumed to be lisp files if their
+.Em \&.l
+are assumed to be Lisp files if their
first non-blank character is `;', `(', or `[',
otherwise, they are
-treated as lex files. Other files are first examined to see if they
+treated as Lex files. Other files are first examined to see if they
contain any Pascal or Fortran routine definitions, and, if not, are
searched for C style definitions.
.Pp
@@ -149,20 +151,20 @@ is created by prepending
.Ar M
to the name of the file, with the
trailing
-.Nm \&.c
+.Em \&.c
and any leading pathname components removed. This
makes use of
.Nm
practical in directories with more than one
program.
.Pp
-Yacc and lex files each have a special tag.
+Yacc and Lex files each have a special tag.
.Ar Yyparse
is the start
of the second section of the yacc file, and
.Ar yylex
is the start of
-the second section of the lex file.
+the second section of the Lex file.
.Sh FILES
.Bl -tag -width tags -compact
.It Pa tags
@@ -177,12 +179,12 @@ Duplicate objects are not considered errors.
.Xr vi 1
.Sh BUGS
Recognition of
-.Nm functions ,
-.Nm subroutines
+.Em functions ,
+.Em subroutines
and
-.Nm procedures
+.Em procedures
for
-.Tn FORTRAN
+Fortran
and Pascal is done is a very simpleminded way. No attempt
is made to deal with block structure; if you have two Pascal procedures
in different blocks with the same name you lose.
@@ -191,7 +193,7 @@ doesn't
understand about Pascal types.
.Pp
The method of deciding whether to look for C, Pascal or
-.Tn FORTRAN
+Fortran
functions is a hack.
.Pp
.Nm Ctags
diff --git a/usr.bin/ctags/ctags.c b/usr.bin/ctags/ctags.c
index 199ffb6..eb9519b 100644
--- a/usr.bin/ctags/ctags.c
+++ b/usr.bin/ctags/ctags.c
@@ -49,8 +49,8 @@ __FBSDID("$FreeBSD$");
#include <err.h>
#include <limits.h>
#include <stdio.h>
-#include <string.h>
#include <stdlib.h>
+#include <string.h>
#include <unistd.h>
#include "ctags.h"
@@ -188,7 +188,7 @@ usage()
/*
* init --
- * this routine sets up the boolean psuedo-functions which work by
+ * this routine sets up the boolean pseudo-functions which work by
* setting boolean flags dependent upon the corresponding character.
* Every char which is NOT in that string is false with respect to
* the pseudo-function. Therefore, all of the array "_wht" is NO
diff --git a/usr.bin/ctags/fortran.c b/usr.bin/ctags/fortran.c
index 2195606..05b4acb 100644
--- a/usr.bin/ctags/fortran.c
+++ b/usr.bin/ctags/fortran.c
@@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$");
#include <ctype.h>
#include <limits.h>
#include <stdio.h>
-#include <string.h>
#include "ctags.h"
diff --git a/usr.bin/ctags/print.c b/usr.bin/ctags/print.c
index 36c790b..be64dca 100644
--- a/usr.bin/ctags/print.c
+++ b/usr.bin/ctags/print.c
@@ -42,8 +42,6 @@ __FBSDID("$FreeBSD$");
#include <limits.h>
#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
#include <unistd.h>
#include "ctags.h"
diff --git a/usr.bin/ctags/tree.c b/usr.bin/ctags/tree.c
index ac99639..8c9b25c 100644
--- a/usr.bin/ctags/tree.c
+++ b/usr.bin/ctags/tree.c
@@ -71,7 +71,7 @@ pfnote(name, ln)
free_tree(head);
/*NOSTRICT*/
if (!(head = np = (NODE *)malloc(sizeof(NODE))))
- err(1, "out of space");
+ errx(1, "out of space");
}
if (!xflag && !strcmp(name, "main")) {
if (!(fp = strrchr(curfile, '/')))
diff --git a/usr.bin/ctags/yacc.c b/usr.bin/ctags/yacc.c
index f6f2c3f..025a623 100644
--- a/usr.bin/ctags/yacc.c
+++ b/usr.bin/ctags/yacc.c
@@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$");
#include <ctype.h>
#include <limits.h>
#include <stdio.h>
-#include <string.h>
#include "ctags.h"
@@ -133,7 +132,7 @@ toss_yysec()
* state == 0 : waiting
* state == 1 : received a newline
* state == 2 : received first %
- * state == 3 : recieved second %
+ * state == 3 : received second %
*/
lineftell = ftell(inf);
for (state = 0; GETC(!=, EOF);)
OpenPOWER on IntegriCloud