]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ctags: Support writing to stdout instead of a file.
authorDag-Erling Smørgrav <des@FreeBSD.org>
Thu, 25 May 2023 11:55:56 +0000 (11:55 +0000)
committerDag-Erling Smørgrav <des@FreeBSD.org>
Wed, 14 Jun 2023 12:48:54 +0000 (14:48 +0200)
commit06520254ed83c12fe176e719ef130be6c924bb6b
tree735095b39a1f9a720bb4cdf58c23abadf8feaa33
parentcfa209265a30952ffc5c58d7d63439a6f61d3f49
ctags: Support writing to stdout instead of a file.

* Understand "-" to mean stdout as per convention.
* Check that the output is a regular file and ignore -u if not, otherwise we might try to rm /dev/stdout.
* As a bonus, if -u was specified but the output file does not exist, proceed as if -u had not been specified instead of erroring out.

MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: cracauer, debdrup
Differential Revision: https://reviews.freebsd.org/D40237

(cherry picked from commit 430d064ba5b0cb2e91a26af34c15df48d290e417)

ctags: Recognize __attribute__ in function declarations.

MFC after: 1 week
Obtained from: NetBSD
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D40264

(cherry picked from commit 9f35eb8f96a55aac92fc0c7d08f4b6ab0ae9bc39)

ctags: Don't undercount lines when handling // comments.

MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D40374

(cherry picked from commit 7ba6119e22b54c2104b1948f0e8a4157d4112958)
usr.bin/ctags/C.c
usr.bin/ctags/ctags.1
usr.bin/ctags/ctags.c