-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix $LINENO corruption when autoloading functions
Autoloading a function caused the calling script's $LINENO to be off by the number of lines in the function definition file. In addition, while running autoloaded functions, errors/warnings were reported with wrong line numbers. src/cmd/ksh93/sh/path.c: - Save $LINENO (shp->inlineno) before autoloading a function, reset it to 1 so that the correct line number offset is remembered for the function definition, and restore it after. src/cmd/ksh93/tests/variables.sh: - Add regression test for $LINENO, directly and in error messages, within and outside a non-autoloaded and an autoloaded function. Fixes: #116
- Loading branch information
Showing
3 changed files
with
54 additions
and
1 deletion.
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