Commit Graph

46 Commits

Author SHA1 Message Date
Ralf S. Engelschall
865b0cf06c cleanup code: remove unnecessary and useless void cast
from void-function skip_string().
2007-02-04 20:07:07 +00:00
Ralf S. Engelschall
0c9dffd3af Correct parser by using intended C equality ("==") instead of
assignment ("=") operator.
2007-02-04 20:06:10 +00:00
Ralf S. Engelschall
f615552554 fix bug: avoid dereferencing content of an already free(3)'ed chunk 2007-02-04 20:04:29 +00:00
Stefan Farfeleder
cd1de708cd Fix type mismatch between char * and unsigned char *. C guarantees that
the values of the characters here are positive, so it's safe to index arrays
with them.
2006-07-18 07:29:42 +00:00
Ruslan Ermilov
a866e17077 Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
Crist J. Clark
e075483771 It was pointed out[0] that ctags(1) uses some potentially dangerous
system(3) calls where user-supplied data is used with no sanity
checking. Since ctags(1) is not setuid and is not likely to be used
in a privileged situation, this is not a big deal. However, the
fix is relatively easy and less ugly than the current code, let's be
safe. (I'm sure there are about 2^134 other system(3) calls like this
out there.)

[0] On freebsd-security by Roman Bogorodskiy <bogorodskiy@inbox.ru>
with subject "ctags(1) command execution vulnerability."

MFC after:	3 days
2004-05-07 19:44:40 +00:00
Philippe Charnier
a8e0f0e094 The .Xr files 2003-06-08 13:43:56 +00:00
Ruslan Ermilov
06e482e60a mdoc(7) police: markup polishing.
Approved by:	re
2002-11-26 17:33:37 +00:00
David Malone
c10b37bf7a ANSIify function definitions to avoid a warning. 2002-07-28 15:50:38 +00:00
Tim J. Robbins
231b81bd22 Document conformance to IEEE Std 1003.1-2001. 2002-05-30 12:13:18 +00:00
Tim J. Robbins
38b8c17f6a Sort sections according to mdoc(7). 2002-05-30 12:02:55 +00:00
Tim J. Robbins
df111dde6e Sort entries by locale collating order when -x is specified. 2002-05-30 11:43:20 +00:00
Tim J. Robbins
a5d5212371 Create tags for typedefs, structs, unions and enums by default (imply the
-t option). Make a new option, -T, to revert to the old behaviour.
2002-05-30 11:36:12 +00:00
Tim J. Robbins
e58bac2e7f Avoid buffer overrun when identifies or filenames are extremely long.
OpenBSD revisions: C.c 1.4-1.5, ctags.c 1.5, fortran.c 1.3, lisp.c 1.3,
tree.c 1.2

Obtained from:	OpenBSD
2002-05-30 10:54:53 +00:00
Tim J. Robbins
880ff11350 Exit non-zero if the tags file cannot be opened. 2002-05-27 03:54:45 +00:00
Philippe Charnier
3898680cf7 Use `The .Nm utility' 2002-04-19 23:44:58 +00:00
Warner Losh
f1bb2cd2aa remove __P 2002-03-22 01:22:50 +00:00
David Malone
653b788c5e Add missing "#include <string.h>" for memcmp, noticed by gcc3. 2002-02-27 14:56:58 +00:00
Gregory Neil Shapiro
b24e2c8a23 ctags would create a corrupt tags file if the source C file used '//' style
comments such as:

// The main() function

Teach ctags about this style of commenting.

Submitted by:	Eric Allman <eric@Sendmail.ORG>
MFC after:	1 week
2002-02-24 03:02:52 +00:00
Mark Murray
91bd71d206 Remove leaf node WARNS?=2 (that mainly I added). This should
help the GCC3 transition and CURRENT in general.
2002-02-08 22:31:43 +00:00
Andrew Gallatin
f9393c5e72 add missing <string.h> to give strcpy() a prototype 2002-02-08 03:01:03 +00:00
Ruslan Ermilov
9a665c3136 mdoc(7) police overhaul. 2001-12-14 09:48:03 +00:00
Philippe Charnier
93b3633be5 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.
2001-12-12 18:24:42 +00:00
David Malone
9f5b04e925 Style improvements recommended by Bruce as a follow up to some
of the recent WARNS commits. The idea is:

1) FreeBSD id tags should follow vendor tags.
2) Vendor tags should not be compiled (though copyrights probably should).
3) There should be no blank line between including cdefs and __FBSDIF.
2001-12-10 21:13:08 +00:00
Mark Murray
f86b9f6d64 Use __FBSDID(). 2001-12-03 00:07:59 +00:00
Mark Murray
acd1ad8825 WARNS=2 fixup. 2001-12-02 13:36:14 +00:00
Mike Heffner
cbf16fdf21 Print a space between the function name and line number.
PR:		bin/10980
MFC after:	2 weeks
2001-08-16 16:18:14 +00:00
Mike Heffner
1ac49cd896 Add $FreeBSD$
MFC after:	2 weeks
2001-08-16 16:16:07 +00:00
Dima Dorfman
f247324df7 Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
Ruslan Ermilov
625003720a mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 14:16:33 +00:00
Ruslan Ermilov
8fe908ef0c mdoc(7) police: use the new features of the Nm macro. 2000-11-20 19:21:22 +00:00
Matt Jacob
623136a74f Style change and comment difference per bde.
Obtained from:bde@freebsd.org
Marionette by:mjacob@freebsd.org
2000-01-27 16:15:51 +00:00
Matt Jacob
e6d26e0a6f A cleaner fix to previous.
Obtained from:bde@freebsd.org
2000-01-27 07:58:27 +00:00
Matt Jacob
1445426340 Fix ctags from core dumping on alpha. Let the diffs out to review,
but I timed out. Added FreeBSD CVS header.
2000-01-27 05:46:58 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Nik Clayton
3be5f1f5ce Add $Id$, to make it simpler for members of the translation teams to
track.

The $Id$ line is normally at the bottom of the main comment block in the
man page, separated from the rest of the manpage by an empty comment,
like so;

     .\"    $Id$
     .\"

If the immediately preceding comment is a @(#) format ID marker than the
the $Id$ will line up underneath it with no intervening blank lines.
Otherwise, an additional blank line is inserted.

Approved by:            bde
1999-07-12 20:24:20 +00:00
Bill Fumerola
465ebdc6e3 Add braces to avoid ambigious else. 1999-07-02 15:26:53 +00:00
Archie Cobbs
fa146c5335 Tweaks to allow compiling -Wall (mostly adding "const" to char rcsid[]). 1998-12-06 22:58:23 +00:00
Poul-Henning Kamp
d459926593 Ctags write to buffer beyond the end of it when the source file
doesn't end with '\n'. It brings segmentation fault.

PR:		4812
Reviewed by:	phk
Submitted by:	Shigio Yamaguchi <shigio@wafu.netgate.net>
1998-04-19 18:00:49 +00:00
Alexander Langer
d7d1005304 -Wall cleanup. 1997-12-29 00:09:06 +00:00
Steve Price
0c30eecaa0 Teach ctags(1) how to handle intermediate whitespace in macros
and function definitions.

PR:		misc/4128
Submitted by:	Shigio Yamaguchi <shigio@wafu.netgate.net>
1997-08-23 16:13:45 +00:00
Philippe Charnier
044addf89a Add usage string. Typo in man page. 1997-06-30 06:45:53 +00:00
Warner Losh
1c8af87873 compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-29 04:34:07 +00:00
Paul Traina
9c197ec156 Add newline, closes bin/1433 1996-07-26 23:45:36 +00:00
Mike Pritchard
4a8d02835c Fix a bunch of spelling errors in a bunch of man pages. 1996-01-30 13:52:50 +00:00
Rodney W. Grimes
9b50d90275 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00