NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
PR/58786 CVS commit: src/usr.bin/ctags
The following reply was made to PR bin/58786; it has been noted by GNATS.
From: "Robert Elz" <kre%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc:
Subject: PR/58786 CVS commit: src/usr.bin/ctags
Date: Thu, 31 Oct 2024 01:50:20 +0000
Module Name: src
Committed By: kre
Date: Thu Oct 31 01:50:20 UTC 2024
Modified Files:
src/usr.bin/ctags: ctags.c
Log Message:
PR bin/58786 Partly fix ctags -u processing
RVP pointed out that the command in the previous version to
remove old entries from the tags file would fail, if some were
not there (-u being used to add a new file's tags) as grep
exits 1 when the pattern is not found. (The original version
would almost never fail, even when it should have, as its status
was just from the final "rm" command).
So make the command more complex to deal with that.
While there, do away with the OTAGS nonsense, and use mktemp(1) instead.
Also do away with the absurdly short 100 byte command buffer, and
use asprintf() instead.
And also properly quote strings being passed to system(3) (why the
code needs to use system(3) at all is an entirely different question).
There are still oh so many weirdnesses in this program, but when
used in the typical way, it should be no worse than it ever was.
XXX no pullups intended
To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/usr.bin/ctags/ctags.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index