-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix SHOPT_* logic for Exuberant Ctags to find more
This commit has no code or behaviour change at all. I make intensive use of Exubertant Ctags <http://ctags.sf.net/> to find functions and identifiers ('^K ;' in joe; this also works with vi, emacs and others). To (re)generate the tags file, I use: ctags -R --if0 arch bin src (The --if0 includes the dummy function definitions in bltins that are commented as "for the dictionary generator". Handy.) However, in some files, most code wasn't parsed by Ctags because of logic like this, that compiles out certain functionality based on compile-time options (see src/cmd/ksh93/{SHOPT.sh,README}): #if SHOPT_SCRIPTONLY NoN(foo) /* defines dummy function to keep linker happy */ #else ...actual code... #endif /* SHOPT_SCRIPTONLY */ Exuberant Ctags processes the first part of #if...#else...#endif while ignoring everything between #else and #endif, thus ignoring the actual code. So this commit changes turns this around: #if !SHOPT_SCRIPTONLY ...actual code... #else NoN(foo) /* defines dummy function to keep linker happy */ #endif /* !SHOPT_SCRIPTONLY */
- Loading branch information
Showing
7 changed files
with
37 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters