-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Streamline some nval(3) and related flaggery
In the olden days, ksh used the hash(3) library to store variables, aliases, functions, etc. For many years, it's been using the cdt(3) library instead. But the low-level nv_search() name-value tree lookup function was still repurposing some bit flags from the old hash API for its options, though that API is otherwise unused. So we were still including the entire obsolete <hash.h> API just to use two repurposed HASH_* bit flags for nv_search(). This commit makes nv_search() repurpose some flags from <nval.h> instead. This commit should not change ksh's behaviour. src/cmd/ksh93/sh/nvdisc.c: - Make nv_search() use NV_NOSCOPE instead of HASH_NOSCOPE and NV_REF instead of HASH_BUCKET. - The HASH_SCOPE flag was also passed to some nv_search() calls, but nv_search() ignores it, so that flag is deleted from those. - Document nv_search() in a comment. src/cmd/ksh93/include/name.h: - Move NV_UNATTR to nval.h to join the other nv_open() options there. (re: 1184b2a) src/cmd/ksh93/include/nval.h: - Since we no longer use HASH_* macros, do not include <hash.h>. - Remove unused NV_NOASSIGN macro, defined to 0. This was there for "backward compatibility" since before 1995; long enough. src/cmd/ksh93/include/shell.h: - Bump SH_VERSION due to the nv_search() API change (even though no changes were made to the APIs documented in nval.3 or shell.3). All other changed files: - Update to match the flaggery changes.
- Loading branch information
Showing
21 changed files
with
74 additions
and
69 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ | |
* | ||
*/ | ||
|
||
#define SH_VERSION 20220106 | ||
#define SH_VERSION 20220719 | ||
|
||
#include <ast.h> | ||
#include <cdt.h> | ||
|
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
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
Oops, something went wrong.